view tools/mothur/indicator.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_indicator" name="Indicator" version="@WRAPPER_VERSION@.0">
    <description>Identify indicator "species" for nodes on a tree</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="aggressive"><![CDATA[
        echo 'indicator(
            #if $withdesign.tree:
                tree=$withdesign.tree,
            #end if
            #if $otu.is_of_type("mothur.relabund"):
                relabund=$otu,
            #elif $otu.is_of_type("mothur.shared"):
                shared=$otu,
            #end if
            #if $label:
                label=${ str($label).replace(",","-") },
            #end if
            #if $withdesign.groups:
                groups=${ str($withdesign.groups).replace(",","-") },
            #end if
            #if $withdesign.havedesign == "yes":
                design=$withdesign.design,
            #end if
            processors='\${GALAXY_SLOTS:-8}'
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur &&

        ## move output files to correct destination
        #if $tree:
            prefix='$tree' &&
            mv \${prefix%.dat}*.tre '$tree_out' &&
        #end if
        prefix='$otu' &&
        mv mothur.*.logfile '$logfile' &&
        mv \${prefix%.dat}*.summary '$summary'
    ]]></command>
    <inputs>
        <param name="otu" type="data" format="mothur.shared,mothur.relabund" label="shared/relabund - OTU dataset"/>
        <param name="label" type="select" optional="true" multiple="false" label="label - OTU Labels">
            <expand macro="labeloptions"/>
        </param>
        <conditional name="withdesign">
            <param name="havedesign" type="select" label="Will you supply a design file?">
                <option value="yes">yes</option>
                <option value="no">no</option>
            </param>
            <when value="yes">
                <param name="tree" type="data" format="tree" optional="true" label="tree - A newick-formatted tree" help="Optional, if a design file is provided."/>
                <param name="design" type="data" format="mothur.design" optional="true" label="design - assign groups to new grouping" help="make sure your file is of type mothur.design. Design has 2 columns: group(col 1) and grouping(col 2) (separated by a TAB character)"/>
                <param name="groups" type="select" optional="true" label="groups - Pick groups to annalyze" multiple="true">
                    <options>
                        <filter type="data_meta" ref="design" key="groups"/>
                    </options>
                </param>
            </when>
            <when value="no">
                <param name="tree" type="data" format="tree" label="tree - A newick-formatted tree" help="Mandatory if no design file is provided"/>
                <param name="groups" type="select" optional="true" label="groups - Pick groups to annalyze" multiple="true">
                    <options>
                        <filter type="data_meta" ref="otu" key="groups"/>
                    </options>
                </param>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/>
        <data name="tree_out" format="mothur.tre" label="${tool.name} on ${on_string}: indicator.tre">
            <filter>tree</filter>
        </data>
        <data name="summary" format="tabular" label="${tool.name} on ${on_string}: indicator.summary"/>
    </outputs>
    <tests>
        <test><!-- test with design input -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="havedesign" value="yes"/>
            <param name="design" value="toymothur.design2" ftype="mothur.design"/>
            <param name="label" value="0.03"/>
            <param name="groups" value="tardis,dalek"/>
            <output name="summary">
                <assert_contents>
                    <has_line_matching expression="^OTU\tIndicator_Groups\tIndicator_Value\tpValue$"/>
                    <has_text text="forest"/>
                    <has_text text="pasture"/>
                </assert_contents>
            </output>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with design input and subset of groups-->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="havedesign" value="yes"/>
            <param name="design" value="toymothur.design2" ftype="mothur.design"/>
            <param name="groups" value="tardis"/>
            <output name="summary">
                <assert_contents>
                    <has_line_matching expression="^OTU\tIndicator_Groups\tIndicator_Value\tpValue$"/>
                    <has_text text="forest"/>
                    <not_has_text text="pasture"/>
                </assert_contents>
            </output>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with tree input -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="havedesign" value="no"/>
            <param name="tree" value="amazon.an.jclass.unique.tre"/>
            <param name="groups" value="forest,pasture"/>
            <output name="summary">
                <assert_contents>
                    <has_text text="TreeNode"/>
                    <has_text text="forest-pasture"/>
                </assert_contents>
            </output>
            <output name="tree_out" md5="a22f90898611e1f4c5d84cfe18dc6ebe"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with tree input and subset of groups -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="havedesign" value="no"/>
            <param name="tree" value="amazon.an.jclass.unique.tre"/>
            <param name="groups" value="forest"/>
            <output name="summary">
                <assert_contents>
                    <has_text text="TreeNode"/>
                    <not_has_text text="forest-pasture"/>
                </assert_contents>
            </output>
            <output name="tree_out" md5="756bfd16311e141a099cfe96db458d83"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documenation**

The indicator_ command reads a shared_ or relabund_ file and a tree file, and outputs a .indicator.summary file and when a tree file is given a .indicator.tre file. The summary file lists the indicator value for each OTU for each node.  The new tree contains labels at each internal node. The label is the node number so you can relate the tree to the summary file.

.. _shared: http://www.mothur.org/wiki/Shared_file
.. _relabund: http://www.mothur.org/wiki/Get.relabund
.. _indicator: http://www.mothur.org/wiki/Indicator

v.1.22.0: Updated to Mothur 1.33
]]>
    </help>
    <expand macro="citations"/>
</tool>