view tools/mothur/sort.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_sort_seqs" name="Sort.seqs" version="@WRAPPER_VERSION@.0">
    <description>put sequences in different files in the same order</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="aggressive"><![CDATA[
        echo 'sort.seqs(
            #if $fasta_in:
                fasta=$fasta_in,
            #end if
            #if $qfile_in:
                qfile=$qfile_in,
            #end if
            #if $flow_in:
                flow=$flow_in,
            #end if
            #if $name_in:
                name=$name_in,
            #end if
            #if $group_in:
                group=$group_in,
            #end if
            #if $tax_in:
                taxonomy=$tax_in,
            #end if
            #if $accnos:
                accnos=$accnos,
            #end if
            #if $count:
                count=$count,
            #end if
            large=$large
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur &&

        ## move output files to correct destination
        #if $fasta_in:
            prefix="$fasta_in" &&
            mv \${prefix%.dat}*.sorted.* "$fasta_out" &&
        #end if
        #if $qfile_in:
            prefix="$qfile_in" &&
            mv \${prefix%.dat}*.sorted.* "$qfile_out" &&
        #end if
        #if $flow_in:
            prefix="$flow_in" &&
            mv \${prefix%.dat}*.sorted.* "$flow_out" &&
        #end if
        #if $name_in:
            prefix="$name_in" &&
            mv \${prefix%.dat}*.sorted.* "$name_out" &&
        #end if
        #if $group_in:
            prefix="$group_in" &&
            mv \${prefix%.dat}*.sorted.* "$group_out" &&
        #end if
        #if $tax_in:
            prefix="$tax_in" &&
            mv \${prefix%.dat}*.sorted.* "$taxanomy_out" &&
        #end if
        mv mothur.*.logfile "$logfile"
    ]]></command>
    <inputs>
        <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - sequences" help="format must be fasta"/>
        <param name="qfile_in" type="data" format="qual454" optional="true" label="qfile - sequence quality" help="format must be qual454"/>
        <param name="flow_in" type="data" format="mothur.sff.flow" optional="true" label="flow - sff flowgram" help="format must be mothur.sff.flow"/>
        <param name="group_in" type="data" format="mothur.groups" optional="true" label="groups - sequence groupings" help="format must be mothur.groups"/>
        <param name="name_in" type="data" format="mothur.names" optional="true" label="names - name reference" help="format must be mothur.names"/>
        <param name="tax_in" type="data" format="mothur.seq.taxonomy" optional="true" label="taxonomy - taxonomy reference" help="format must be mothur.seq.taxonomy"/>
        <param name="accnos" type="data" format="mothur.accnos" optional="true" label="accnos - sort" help="format must be mothur.accnos"/>
        <param name="count" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="format must be mothur.count_table (generated by count.seqs)"/>
        <param name="large" type="boolean" checked="false" truevalue="true" falsevalue="false" label="large - Datasets are large and may not fit in RAM"/>
    </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}: sorted.fasta">
            <filter>fasta_in</filter>
        </data>
        <data name="qfile_out" format_source="qfile_in" label="${tool.name} on ${on_string}: sorted.qfile">
            <filter>qfile_in</filter>
        </data>
        <data name="flow_out" format_source="flow_in" label="${tool.name} on ${on_string}: sorted.flow">
            <filter>flow_in</filter>
        </data>
        <data name="group_out" format_source="group_in" label="${tool.name} on ${on_string}: sorted.group">
            <filter>group_in</filter>
        </data>
        <data name="name_out" format_source="name_in" label="${tool.name} on ${on_string}: sorted.name">
            <filter>name_in</filter>
        </data>
        <data name="taxonomy_out" format_source="tax_in" label="${tool.name} on ${on_string}: sorted.taxonomy">
            <filter>tax_in</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="fasta_in" value="amazon.fasta" ftype="fasta"/>
            <output name="fasta_out" md5="0bc9320647234e8367c3b1b654f9302d" ftype="fasta"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="qfile_in" value="Mock_S280_L001_R1_001_small.trim.contigs.qual" ftype="qual454"/>
            <output name="qfile_out" md5="abed9d1811786c810a12fd00a376cee4" ftype="qual454"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
            <output name="group_out" md5="fb60628ae445e7b06f9833f632b2cd0c" ftype="mothur.groups"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="fasta_in" value="amazon.fasta" ftype="fasta"/>
            <param name="count" value="amazon.count_table" ftype="mothur.count_table"/>
            <output name="fasta_out" md5="0bc9320647234e8367c3b1b654f9302d" ftype="fasta"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with multiple file types input -->
            <param name="fasta_in" value="amazon.fasta" ftype="fasta"/>
            <param name="qfile_in" value="Mock_S280_L001_R1_001_small.trim.contigs.qual" ftype="qual454"/>
            <param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
            <output name="fasta_out" md5="0bc9320647234e8367c3b1b654f9302d" ftype="fasta"/>
            <output name="qfile_out" md5="abed9d1811786c810a12fd00a376cee4" ftype="qual454"/>
            <output name="group_out" md5="fb60628ae445e7b06f9833f632b2cd0c" ftype="mothur.groups"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documenation**

The sort.seqs_ command puts sequences from a fasta, name, group, quality, flow or taxonomy file in the same order.
You can provide an accnos file to indicate the order you want, otherwise mothur will use the order of the first file it reads.

.. _sort.seqs: http://www.mothur.org/wiki/Sort.seqs

]]>
    </help>
    <expand macro="citations"/>
</tool>