view tools/mothur/deunique.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_deunique_seqs" name="Deunique.seqs" version="@WRAPPER_VERSION@.0">
    <description>Return all sequences</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="aggressive"><![CDATA[
         echo 'deunique.seqs(
            #if $inputtype.intype == "countfile":
                count=$names,
            #else
                name=$names,
            #end if
            fasta=$fasta
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur &&

        ## move output files to correct destination
        prefix="$fasta" &&
        prefix2="$names" &&
        mv \${prefix%.dat}*.redundant.fasta "$out_fasta" &&
        mv mothur.*.logfile "$logfile";
        #if $inputtype.intype == 'countfile':
            if [[ -f \${prefix2%.dat}.redundant.groups ]];
            then
                mv \${prefix2%.dat}.redundant.groups "$groups_file";
            fi
        #end if
    ]]></command>
    <inputs>
        <param name="fasta" type="data" format="fasta" label="fasta - Sequences to filter"/>
        <conditional name="inputtype">
            <param name="intype" type="select" label="type of file to provide, may be either a names or a count file" help="">
                <option value="namesfile">names</option>
                <option value="countfile">count table</option>
            </param>
            <when value="namesfile">
                <param name="names" type="data" format="mothur.names" label="provide a names file" help="A names file will generate a new faste file containing all the sequences."/>
            </when>
            <when value="countfile">
                <param name="names" type="data" format="mothur.count_table" label="provide a count table" help="A counts table will generate a new faste file containing all the sequences. If the file contains group information, a group file will also be created."/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/>
        <data name="out_fasta" format_source="fasta" label="${tool.name} on ${on_string}: fasta"/>
        <!-- groups file is created when a count file is used as input, but will be empty if the count file did not contain group information -->
        <data name="groups_file" format="mothur.groups" label="${tool.name} on ${on_string}: groups">
            <filter>inputtype.intype == 'countfile'</filter>
        </data>
    </outputs>
    <tests>
        <test><!-- test names file input -->
            <param name="fasta" value="amazon.unique.fasta"/>
            <param name="intype" value="namesfile"/>
            <param name="names" value="amazon.unique.names"/>
            <output name="out_fasta" md5="579698b8037ee939dd730e2cf0dd018d" ftype="fasta"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test count file input with group file output -->
            <param name="fasta" value="amazon.unique.fasta"/>
            <param name="intype" value="countfile"/>
            <param name="names" value="amazon_withgroups.count_table"/>
            <output name="out_fasta" md5="177f5cf92a84ab3aef0a665e06178bbe" ftype="fasta"/>
            <output name="groups_file" file="amazon_withgroups.redundant.groups" ftype="mothur.groups"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test count file input without group file output -->
            <param name="fasta" value="amazon.unique.fasta"/>
            <param name="intype" value="countfile"/>
            <param name="names" value="amazon.count_table"/>
            <output name="out_fasta" md5="177f5cf92a84ab3aef0a665e06178bbe" ftype="fasta"/>
            <output name="groups_file" md5="d41d8cd98f00b204e9800998ecf8427e" ftype="mothur.groups"/> <!--empty-->
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documenation**

The deunique.seqs_ command is the reverse of the unique.seqs command, and creates a fasta file from a fasta and name_ file.

.. _name: http://www.mothur.org/wiki/Name_file
.. _deunique.seqs: http://www.mothur.org/wiki/Deunique.seqs

v.1.21.0: Updated to Mothur 1.33, added option to provide count instead of names file, new groups file as output

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