view consensus.seqs.xml @ 0:82a5c9700e76 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit a9d1e0debcd357d8080a1c6c5f1d206dd45a7a4d
author iuc
date Fri, 19 May 2017 05:41:07 -0400
parents
children 4f4de4518aca
line wrap: on
line source

<tool profile="16.07" id="mothur_consensus_seqs" name="Consensus.seqs" version="@WRAPPER_VERSION@.0">
    <description>Find a consensus sequence for each OTU or phylotype</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
        @SHELL_OPTIONS@

        ## create symlinks to input datasets
        ln -s "$fasta" fasta.dat &&
        ln -s "$name" name.dat &&
        ln -s "$count" count.dat &&
        #if $perotu.use == "yes":
            ln -s "$perotu.otu" perotu.otu.dat &&
        #end if

        echo 'consensus.seqs(
            fasta=fasta.dat
            #if $name:
                ,name=name.dat
            #end if
            #if $cutoff:
                ,cutoff=$cutoff
            #end if
            #if $perotu.use == "yes":
                ,list=perotu.otu.dat
                #if $perotu.label:
                    ,label=${ str($perotu.label).replace(",","-") }
                #end if
            #end if
            #if $count:
                ,count=count.dat
            #end if
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
    ]]></command>
    <inputs>
        <param name="fasta" type="data" format="mothur.align" label="fasta - Sequences to Bin" help="Sequences must be aligned"/>
        <param name="name" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
        <conditional name="perotu">
            <param name="use" type="select" label="Consensus sequence">
                <option value="no" selected="true">Single consensus sequence</option>
                <option value="yes">Consensus sequence for each OTU in list</option>
            </param>
            <when value="yes">
                <param name="otu" type="data" format="mothur.list" label="list - OTU List"/>
                <param name="label" type="select" optional="true" multiple="true" label="label - Select OTU Labels" help="By default all labels are used">
                    <expand macro="labeloptions"/>
                </param>
            </when>
            <when value="no"/>
        </conditional>
        <param name="cutoff" type="integer" value="" optional="True" min="1" max="100" label="Cutoff - set a percentage of sequences that support the base" help="For example: cutoff=95 would return the base that was supported by at least 95% of sequences. Must be between 1 and 100. Optional"/>
        <param name="count" type="data" format="mothur.count_table" optional="true" label="Count - a count table" help="this file can be generated by count.seqs"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="summary" format="tabular" from_work_dir="fasta*.cons.summary" label="${tool.name} on ${on_string}: cons.summary">
            <filter>perotu['use'] == 'no'</filter>
        </data>
        <data name="cons_fasta" format="mothur.align" from_work_dir="fasta*.cons.fasta" label="${tool.name} on ${on_string}: cons.fasta">
            <filter>perotu['use'] == 'no'</filter>
        </data>
        <collection name="consensusfastas" type="list" label="${tool.name} on ${on_string}: consensus fasta files per OTU">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.cons\.fasta" format="mothur.align"/>
            <filter>perotu['use'] == 'yes'</filter>
        </collection>
        <collection name="consensusnames" type="list" label="${tool.name} on ${on_string}: consensus names files per OTU">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.cons\.names" format="mothur.names"/>
            <filter>perotu['use'] == 'yes'</filter>
        </collection>
        <collection name="consensussummaries" type="list" label="${tool.name} on ${on_string}: consensus summary files per OTU">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.cons\.summary" format="tabular"/>
            <filter>perotu['use'] == 'yes'</filter>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with default values -->
            <param name="fasta" value="amazon.align_head" ftype="mothur.align"/>
            <output name="summary" md5="61a0e170a8b881135421afd0cea8305a" ftype="tabular"/>
            <output name="cons_fasta" md5="82f3475b61f240eba09597a409364c04" ftype="mothur.align"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with list file -->
            <param name="fasta" value="amazon.align_head" ftype="mothur.align"/>
            <param name="use" value="yes"/>
            <param name="otu" value="amazon.align_head.list" ftype="mothur.list"/>
            <param name="count" value="amazon.align_head.count_table" ftype="mothur.count_table"/>
            <param name="labels" value="unique,0.30,0.33"/>
            <output_collection name="consensusfastas" count="3">
                <element name="0.30" md5="a5c8c17814f02124194dba2e37f566c7" ftype="mothur.align"/>
            </output_collection>
            <output_collection name="consensusnames" count="3">
                <element name="0.30" md5="9de4f7e774e0c16eaf7cf6ffbba9d475" ftype="mothur.names"/>
            </output_collection>
            <output_collection name="consensussummaries" count="3">
                <element name="0.30" md5="d595234c6018dfcc1465e59d35d59205" ftype="tabular"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The consensus.seqs_ command can be used in 2 ways: create a consensus sequence from a fastafile, or with a listfile create a consensus sequence for each otu. Sequences must be aligned.

.. _consensus.seqs: https://www.mothur.org/wiki/Consensus.seqs
]]>
    </help>
    <expand macro="citations"/>
</tool>