view tools/mothur/get.seqs.xml @ 0:ee4fee239fe7 draft default tip

planemo upload commit 68a4fd4cc5332c57ac39bef73db224425af0706c-dirty
author sanbi-uwc
date Fri, 03 Jun 2016 09:32:47 -0400
parents
children
line wrap: on
line source

<tool profile="16.07" id="mothur_get_seqs" name="Get.seqs" version="@WRAPPER_VERSION@.0">
    <description>Picks sequences by name</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="aggressive"><![CDATA[
        echo 'get.seqs(
            accnos=$accnos,
            #if $fasta_in:
                fasta=$fasta_in,
            #end if
            #if $fastq_in:
                fastq=$fastq_in,
            #end if
            #if $count_in:
                count=$count_in,
            #end if
            #if $qfile_in:
                qfile=$qfile_in,
            #end if
            #if $name_in:
                name=$name_in,
            #end if
            #if $group_in:
                group=$group_in,
            #end if
            #if $alignreport_in:
                alignreport=$alignreport_in,
            #end if
            #if $list_in:
                list=$list_in,
            #end if
            #if $taxonomy_in:
                taxonomy=$taxonomy_in,
            #end if
            dups=$dups
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur &&

        ## move output files to correct destination
        mv mothur.*.logfile "$logfile"

        #if $fasta_in:
            && prefix='$fasta_in'
            && mv \${prefix%.dat}*.pick.* "$fasta_out"
        #end if
        #if $fastq_in:
            && prefix='$fastq_in'
            && mv \${prefix%.dat}*.pick.* "$fastq_out"
        #end if
        #if $count_in:
            && prefix='$count_in'
            && mv \${prefix%.dat}*.pick.* "$count_out"
        #end if
        #if $qfile_in:
            && prefix='$qfile_in'
            && mv \${prefix%.dat}*.pick.* "$qfile_out"
        #end if
        #if $name_in:
            && prefix='$name_in'
            && mv \${prefix%.dat}*.pick.* "$name_out"
        #end if
        #if $group_in:
            && prefix='$group_in'
            && mv \${prefix%.dat}*.pick.* "$group_out"
        #end if
        #if $alignreport_in:
            && prefix='$alignreport_in'
            && mv \${prefix%.dat}*.pick.* "$alignreport_out"
        #end if
        #if $list_in:
            && prefix='$list_in'
            && mv \${prefix%.dat}*.pick.* "$list_out"
        #end if
        #if $taxonomy_in:
            && prefix='$taxonomy_in'
            && mv \${prefix%.dat}*.pick.* "$taxonomy_out"
        #end if
    ]]></command>
    <inputs>
        <param name="accnos" type="data" format="mothur.accnos" label="accnos - Accession Names"/>
        <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - Fasta Sequences"/>
        <param name="qfile_in" type="data" format="qual" optional="true" label="qfile - Fasta Quality"/>
        <param name="fastq_in" type="data" format="fastq" optional="true" label="count - a count_table" help="fastq - allows you to select sequences from your fastq file"/>
        <param name="count_in" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="generated by count.seqs"/>
        <param name="name_in" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
        <param name="group_in" type="data" format="mothur.groups" optional="true" label="group - Sequences Groups"/>
        <param name="alignreport_in" type="data" format="mothur.align.report" optional="true" label="alignreport - Align Report"/>
        <param name="list_in" type="data" format="mothur.list" optional="true" label="list - OTU List"/>
        <param name="taxonomy_in" type="data" format="mothur.seq.taxonomy" optional="true" label="taxonomy - Taxonomy"/>
        <param name="dups" type="boolean" truevalue="dups" falsevalue="false" checked="true" label="dups - Apply to duplicates"/>
    </inputs>
    <outputs>
        <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/>
        <data name="fasta_out" format_source="fasta_in" label="${tool.name} on ${on_string}: pick.fasta">
            <filter>fasta_in</filter>
        </data>
        <data name="fastq_out" format_source="fastq_in" label="${tool.name} on ${on_string}: pick.fastq">
            <filter>fastq_in</filter>
        </data>
        <data name="count_out" format_source="count_in" label="${tool.name} on ${on_string}: pick.count">
            <filter>count_in</filter>
        </data>
        <data name="qfile_out" format_source="qfile_in" label="${tool.name} on ${on_string}: pick.qfile">
            <filter>qfile_in</filter>
        </data>
        <data name="name_out" format="mothur.names" label="${tool.name} on ${on_string}: pick.names">
            <filter>name_in</filter>
        </data>
        <data name="group_out" format="mothur.groups" label="${tool.name} on ${on_string}: pick.groups">
            <filter>group_in</filter>
        </data>
        <data name="alignreport_out" format="mothur.align.report" label="${tool.name} on ${on_string}: pick.align.report">
            <filter>alignreport_in</filter>
        </data>
        <data name="list_out" format="mothur.list" label="${tool.name} on ${on_string}: pick.list">
            <filter>list_in</filter>
        </data>
        <data name="taxonomy_out" format="mothur.seq.taxonomy" label="${tool.name} on ${on_string}: pick.taxonomy">
            <filter>taxonomy_in</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="accnos" value="Mock_S280_L001_R1_001_small.trim.contigs.bad.accnos"/>
            <param name="fasta_in" value="Mock_S280_L001_R1_001_small.trim.contigs.fasta"/>
            <param name="dups" value=""/>
            <output name="fasta_out" md5="f9335b6b70dc639e420d33809e51431d"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="accnos" value="Mock_S280_L001_R1_001_small.trim.contigs.bad.accnos"/>
            <param name="fastq_in" value="Mock_S280_L001_R1_001_small.fastq"/>
            <output name="fastq_out" md5="e9aae546bf9c00cb7e884dff267d4ba1"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <!-- test two input files -->
            <param name="accnos" value="Mock_S280_L001_R1_001_small.trim.contigs.bad.accnos"/>
            <param name="fasta_in" value="Mock_S280_L001_R1_001_small.trim.contigs.fasta"/>
            <param name="fastq_in" value="Mock_S280_L001_R1_001_small.fastq"/>
            <param name="dups" value="false"/>
            <output name="fasta_out" md5="f9335b6b70dc639e420d33809e51431d"/>
            <output name="fastq_out" md5="e9aae546bf9c00cb7e884dff267d4ba1"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="accnos" value="amazon.bad.accnos"/>
            <param name="count_in" value="amazon.count_table"/>
            <output name="count_out" md5="6892dd99850ce9e9f8f15e77b28f57e2"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documenation**

The get.seqs_ command takes a list of sequence names and either a fasta, name_, group_, list_, align.report_ or taxonomy_ file to generate a new file that contains only the sequences in the list. This command may be used in conjunction with the list.seqs_ command to help screen a sequence collection.

.. _name: http://www.mothur.org/wiki/Name_file
.. _group: http://www.mothur.org/wiki/Group_file
.. _list: http://www.mothur.org/wiki/List_file
.. _align.report: http://www.mothur.org/wiki/Align.seqs
.. _taxonomy: http://www.mothur.org/wiki/Taxonomy_outline
.. _list.seqs: http://www.mothur.org/wiki/list.seqs
.. _get.seqs: http://www.mothur.org/wiki/Get.seqs

v.1.27.0 : Updated to Mothur 1.33, added count and fastq params
]]>
    </help>
    <expand macro="citations"/>
</tool>