view classify.otu.xml @ 1:e664787de3ab draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 721531d2e9fd1e208a3fba8cfbe5dcd572599ca2
author iuc
date Tue, 05 Sep 2017 16:51:43 -0400
parents ddb2e4c51634
children 1ae93cdb2383
line wrap: on
line source

<tool profile="16.07" id="mothur_classify_otu" name="Classify.otu" version="@WRAPPER_VERSION@.0">
    <description>Assign sequences to taxonomy</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 "$otu" otu.dat &&
        ln -s "$tax.taxonomy" tax.taxonomy.dat &&
        ln -s "$name" name.dat &&
        ln -s "$count" count.dat &&
        ln -s "$group" group.dat &&
        #if $reftax.source2:
            ln -s "$reftax.taxonomy" myreftax.taxonomy &&
            ln -s "$sum" myreftax.tree.sum &&
        #end if

        echo 'classify.otu(
            list=otu.dat,
            taxonomy=tax.taxonomy.dat,
            #if $name:
                name=name.dat,
            #end if
            #if $count:
                count=count.dat,
            #end if
            #if $reftax.source2:
                reftaxonomy=myreftax.taxonomy,
            #end if
            #if $label:
                label=${ str($label).replace(",","-") },
            #end if
            #if $group:
                group=group.dat,
            #end if
            basis=$basis,
            probs=$probs,
            persample=$persample,
            cutoff=$cutoff
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
    ]]></command>
    <inputs>
        <param name="otu" type="data" format="mothur.list" label="list - OTU List "/>
        <param name="name" type="data" format="mothur.names" optional="true" label="name - taxonomy sequence names"/>
        <param name="count" type="data" format="mothur.count_table" optional="true" label="count - used to represent the number of duplicate sequences for a given representative sequence"/>
        <conditional name="tax">
            <param name="source" type="select" label="Select Taxonomy from" help="">
                <option value="hist">History</option>
                <option value="ref">Cached Reference</option>
            </param>
            <when value="ref">
                <param name="taxonomy" type="select" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy Reference">
                    <options from_data_table="mothur_taxonomy"/>
                </param>
            </when>
            <when value="hist">
                <param name="taxonomy" type="data" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy Reference"/>
            </when>
        </conditional>
        <conditional name="reftax">
            <param name="source2" type="select" label="Select Reference Taxonomy used in Classify.seqs from" help="Including the reference taxonomy file used when you classified your sequences keep the rankIDs in the summary file static.">
                <option value="">Selection is Optional</option>
                <option value="hist">History</option>
                <option value="ref">Cached Reference</option>
            </param>
            <when value=""/>
            <when value="ref">
                <param name="taxonomy" type="select" format="mothur.seq.taxonomy" label="reftaxonomy - Taxonomy Reference used when sequences were classified">
                    <options from_data_table="mothur_taxonomy"/>
                </param>
                <param name="sum" type="data" format="tabular" label="tree.sum - summary file produced when sequences were classified" help="run classify.seqs to get this file"/>
            </when>
            <when value="hist">
                <param name="taxonomy" type="data" format="mothur.seq.taxonomy" label="reftaxonomy - Taxonomy Reference used when sequences were classified"/>
                <param name="sum" type="data" format="tabular" label="tree.sum - summary file produced when sequences were classified" help="run classify.seqs to get this file"/>
            </when>
        </conditional>
        <param name="label" type="select" label="label - OTU Labels" multiple="true">
            <expand macro="labeloptions"/>
        </param>
        <param name="cutoff" type="integer" value="60" min="0" max="100" label="cutoff - Confindence percentage cutoff between 1 and 100"/>
        <param name="probs" type="boolean" falsevalue="false" truevalue="true" checked="true" label="probs - Show probabilities"/>
        <param name="basis" type="select" label="basis - Summary file gives numbers of" help="">
            <option value="otu">OTU</option>
            <option value="sequence">sequence</option>
        </param>
        <param name="group" type="data" format="mothur.groups" optional="true" label="group - Groups for summary file"/>
        <param name="persample" type="boolean" falsevalue="false" truevalue="true" checked="false" label="persample - allows you to find a consensus taxonomy for each group. default=f"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <collection name="taxsummaries" type="list" label="${tool.name} on ${on_string}: tax.summary">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.cons\.tax\.summary" format="mothur.tax.summary"/>
        </collection>
        <collection name="taxonomies" type="list" label="${tool.name} on ${on_string}: taxonomy">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.cons\.taxonomy" format="mothur.cons.taxonomy"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with defaults -->
            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
            <param name="source" value="hist"/>
            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <output_collection name="taxonomies" count="36">
                <element name="0.18" md5="69a80ebaeb368d4944aa95ce120c6643" ftype="mothur.cons.taxonomy"/>
            </output_collection>
            <output_collection name="taxsummaries" count="36">
                <element name="0.18" md5="bd5613b544a70c5c19f21a3d6602d926" ftype="mothur.tax.summary"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with reftaxonomy and names file and label select -->
            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
            <param name="name" value="amazon1.names" ftype="mothur.names"/>
            <param name="source" value="hist"/>
            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <param name="source2" value="hist"/>
            <param name="reftaxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <param name="sum" value="abrecovery.pds.wang.tree.sum"/>
            <param name="label" value="unique,0.05,0.18"/>
            <output_collection name="taxonomies" count="3">
                <element name="0.18" md5="69a80ebaeb368d4944aa95ce120c6643" ftype="mothur.cons.taxonomy"/>
            </output_collection>
            <output_collection name="taxsummaries" count="3">
                <element name="0.18" md5="115769aa33dcfd121dd945a40ea11dcb" ftype="mothur.tax.summary"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with count table -->
            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
            <param name="count" value="amazon1.count_table" ftype="mothur.count_table"/>
            <param name="source" value="hist"/>
            <param name="label" value="unique,0.05,0.18"/>
            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <output_collection name="taxonomies" count="3">
                <element name="0.18" md5="69a80ebaeb368d4944aa95ce120c6643" ftype="mothur.cons.taxonomy"/>
            </output_collection>
            <output_collection name="taxsummaries" count="3">
                <element name="0.18" md5="bd5613b544a70c5c19f21a3d6602d926" ftype="mothur.tax.summary"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with group file -->
            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
            <param name="group" value="amazon.groups" ftype="mothur.groups"/>
            <param name="source" value="hist"/>
            <param name="label" value="unique,0.05,0.18"/>
            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <output_collection name="taxonomies" count="3">
                <element name="0.18" md5="69a80ebaeb368d4944aa95ce120c6643" ftype="mothur.cons.taxonomy"/>
            </output_collection>
            <output_collection name="taxsummaries" count="3">
                <element name="0.18" md5="fe038e7670fbc5d68c1f5bb79d8ef4ac" ftype="mothur.tax.summary"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The classify.otu_ command assigns sequences to chosen taxonomy outline.

The basis parameter allows you indicate what you want the summary file to represent, options are otu and sequence. Default is otu. For example consider the following basis=sequence could give Clostridiales 3 105 16 43 46, where 105 is the total number of sequences whose otu classified to Clostridiales. 16 is the number of sequences in the otus from groupA, 43 is the number of sequences in the otus from groupB, and 46 is the number of sequences in the otus from groupC. Now for basis=otu could give Clostridiales 3 7 6 1 2, where 7 is the number of otus that classified to Clostridiales. 6 is the number of otus containing sequences from groupA, 1 is the number of otus containing sequences from groupB, and 2 is the number of otus containing sequences from groupC.

.. _classify.otu: https://www.mothur.org/wiki/Classify.otu

v1.21.0: Updated to use Mothur 1.33. Added count parameter (1.28.0) and persample parameter (1.29.0)
]]>
    </help>
    <expand macro="citations"/>
</tool>