view fastq_paired_end_interlacer.xml @ 6:b41c2c1bcfbf draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/galaxy_sequence_utils/fastq_paired_end_interlacer commit bb5df9e62585e12f08dfc0a9f86eec8e205b4845
author iuc
date Fri, 04 Oct 2024 10:35:03 +0000
parents 2ccb8dcabddc
children
line wrap: on
line source

<tool id="fastq_paired_end_interlacer" name="FASTQ interlacer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>on paired end reads</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <edam_topics>
        <edam_topic>topic_0622</edam_topic>
    </edam_topics>
    <edam_operations>
        <edam_operation>operation_3436</edam_operation>
    </edam_operations>
    <expand macro="requirements"/>
    <command><![CDATA[
gx-fastq-paired-end-interlacer
#if $reads.reads_selector == 'paired'
    '${reads.input1_file}' ${reads.input1_file.extension[len('fastq'):]} '${reads.input2_file}' ${reads.input2_file.extension[len('fastq'):]}
    '$outfile_pairs' '$outfile_singles'
#else
    '${reads.reads_coll.forward}' ${reads.reads_coll.forward.extension[len('fastq'):]} '${reads.reads_coll.reverse}' ${reads.reads_coll.reverse.extension[len('fastq'):]}
    '$outfile_pairs_from_coll' '$outfile_singles_from_coll'
#end if
    ]]></command>
    <inputs>
        <conditional name="reads">
            <param name="reads_selector" type="select" label="Type of paired-end datasets">
                <option value="paired">2 separate datasets</option>
                <option value="paired_collection">1 paired dataset collection</option>
            </param>
            <when value="paired">
                <param name="input1_file" type="data" format="fastqsanger,fastqcssanger,fastqsanger.gz,fastqcssanger.gz,fastqsanger.bz2,fastqcssanger.bz2" label="Left-hand mates" />
                <param name="input2_file" type="data" format="fastqsanger,fastqcssanger,fastqsanger.gz,fastqcssanger.gz,fastqsanger.bz2,fastqcssanger.bz2" label="Right-hand mates" />
            </when>
            <when value="paired_collection">
                <param name="reads_coll" type="data_collection" collection_type="paired" format="fastqsanger,fastqcssanger,fastqsanger.gz,fastqcssanger.gz,fastqsanger.bz2,fastqcssanger.bz2" label="Paired-end reads collection" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <!-- $input1_file.name = filename  , e.g. paired_end_2_errors.fastqsanger -->
        <!-- $input1_file.id   = ID        , e.g. 10 -->
        <!-- $input1_file.hid  = history ID, e.g. 5  -->
        <data name="outfile_pairs" format_source="input1_file" label="FASTQ interlacer pairs from ${on_string}">
            <filter>reads['reads_selector'] == 'paired'</filter>
        </data>
        <data name="outfile_singles" format_source="input1_file" label="FASTQ interlacer singles from ${on_string}">
            <filter>reads['reads_selector'] == 'paired'</filter>
        </data>
        <data name="outfile_pairs_from_coll" format_source="reads_coll['forward']" label="FASTQ interlacer pairs from ${on_string}">
            <filter>reads['reads_selector'] == 'paired_collection'</filter>
        </data>
        <data name="outfile_singles_from_coll" format_source="reads_coll['forward']" label="FASTQ interlacer singles from ${on_string}">
            <filter>reads['reads_selector'] == 'paired_collection'</filter>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="2">
            <param name="reads_selector" value="paired" />
            <param name="input1_file" value="paired_end_1.fastqsanger" ftype="fastqsanger" />
            <param name="input2_file" value="paired_end_2.fastqsanger" ftype="fastqsanger" />
            <output name="outfile_pairs" file="paired_end_merged.fastqsanger" ftype="fastqsanger" />
            <output name="outfile_singles" file="paired_end_merged_singles.fastqsanger" ftype="fastqsanger" />
        </test>
        <test expect_num_outputs="2">
            <param name="reads_selector" value="paired" />
            <param name="input1_file" value="paired_end_1_errors.fastqsanger" ftype="fastqsanger" />
            <param name="input2_file" value="paired_end_2_errors.fastqsanger" ftype="fastqsanger" />
            <output name="outfile_pairs" file="paired_end_merged_cleaned.fastqsanger" ftype="fastqsanger" />
            <output name="outfile_singles" file="paired_end_merged_cleaned_singles.fastqsanger" ftype="fastqsanger" />
        </test>
        <test expect_num_outputs="2">
            <param name="reads_selector" value="paired" />
            <param name="input1_file" value="paired_end_1_errors.fastqsanger.gz" ftype="fastqsanger.gz" />
            <param name="input2_file" value="paired_end_2_errors.fastqsanger.gz" ftype="fastqsanger.gz" />
            <output name="outfile_pairs" file="paired_end_merged_cleaned.fastqsanger" ftype="fastqsanger.gz" decompress="true" />
            <output name="outfile_singles" file="paired_end_merged_cleaned_singles.fastqsanger" ftype="fastqsanger.gz" decompress="true" />
        </test>
        <test expect_num_outputs="2">
            <param name="reads_selector" value="paired" />
            <param name="input1_file" value="paired_end_1_errors.fastqsanger.bz2" ftype="fastqsanger.bz2" />
            <param name="input2_file" value="paired_end_2_errors.fastqsanger.bz2" ftype="fastqsanger.bz2" />
            <output name="outfile_pairs" file="paired_end_merged_cleaned.fastqsanger" ftype="fastqsanger.bz2" decompress="true" />
            <output name="outfile_singles" file="paired_end_merged_cleaned_singles.fastqsanger" ftype="fastqsanger.bz2" decompress="true" />
        </test>
        <test expect_num_outputs="2">
            <param name="reads_selector" value="paired_collection" />
            <param name="reads_coll">
                <collection type="paired">
                    <element name="forward" value="paired_end_1.fastqsanger" ftype="fastqsanger" />
                    <element name="reverse" value="paired_end_2.fastqsanger" ftype="fastqsanger" />
                </collection>
            </param>
            <output name="outfile_pairs_from_coll" file="paired_end_merged.fastqsanger" ftype="fastqsanger" />
            <output name="outfile_singles_from_coll" file="paired_end_merged_singles.fastqsanger" ftype="fastqsanger" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool joins paired end FASTQ reads from two separate files, one with the left mates and one with the right mates, into a single files where left mates alternate with their right mates. The join is performed using sequence identifiers, allowing the two files to contain differing ordering. If a sequence identifier does not appear in both files, it is included in a separate file.

Sequence identifiers with /1 and /2 appended override the left-hand and right-hand designation; i.e. if the reads end with /1 and /2, the read containing /1 will be used as the left-hand read and the read containing /2 will be used as the right-hand read. Sequences without this designation will follow the left-hand and right-hand settings set by the user.

-----

**Input**

Left-hand mates, for example::

    @1539:931/1
    ACTTCCCGCGCGTGAAGGCGCCGGCAAACGAGGCTCGGGAAGGGGCTCCCG
    +1539:931/1
    BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

Right-hand mates, for example::

    @1539:931/2
    CGCCATTCCGAATCGTAGTTGTCGGCGTCTTCCAGTGCGGCAAGGCATCGT
    +1539:931/2
    WNUUZ\P^`BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

-----

**Output**

A multiple-fastq file containing interlaced left and right paired reads::

    @1539:931/1
    ACTTCCCGCGCGTGAAGGCGCCGGCAAACGAGGCTCGGGAAGGGGCTCCCG
    +1539:931/1
    BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
    @1539:931/2
    CGCCATTCCGAATCGTAGTTGTCGGCGTCTTCCAGTGCGGCAAGGCATCGT
    +1539:931/2
    WNUUZ\P^`BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB

A multiple-fastq file containing reads that have no mate is also produced.
    ]]></help>
    <citations>
        <citation type="doi">10.1093/bioinformatics/btq281</citation>
    </citations>
</tool>