view indicator.xml @ 10:1c6dadf7bc72 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit dfdd4c590370ecb3a9806314d43eb5668e36a01a"
author iuc
date Thu, 21 Jan 2021 23:42:23 +0000
parents 0232e2fe594c
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="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@SHELL_OPTIONS@

## create symlinks to input datasets
ln -s '$otu' otu.dat &&
#if $withdesign.tree:
    ln -s '$withdesign.tree' withdesign.tree.dat &&
#end if
#if $withdesign.havedesign == "yes":
    ln -s '$withdesign.design' withdesign.design.dat &&
#end if

echo 'indicator(
    #if $withdesign.tree:
        tree=withdesign.tree.dat,
    #end if
    #if $otu.is_of_type("mothur.relabund"):
        relabund=otu.dat,
    #elif $otu.is_of_type("mothur.shared"):
        shared=otu.dat,
    #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.dat,
    #end if
    processors='\${GALAXY_SLOTS:-8}'
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></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="mothur.tre" 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" multiple="true" label="groups - Pick groups to annalyze">
                    <options>
                        <filter type="data_meta" ref="design" key="groups"/>
                    </options>
                </param>
            </when>
            <when value="no">
                <param name="tree" type="data" format="mothur.tre" label="tree - A newick-formatted tree" help="Mandatory if no design file is provided"/>
                <param name="groups" type="select" optional="true" multiple="true" label="groups - Pick groups to annalyze">
                    <options>
                        <filter type="data_meta" ref="otu" key="groups"/>
                    </options>
                </param>
            </when>
        </conditional>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="tree_out" format="mothur.tre" from_work_dir="withdesign.tree*.tre" label="${tool.name} on ${on_string}: indicator.tre">
            <filter>tree</filter>
        </data>
        <data name="summary" format="tabular" from_work_dir="otu*.summary" 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>
            <param name="savelog" value="true"/>
            <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>
            <param name="savelog" value="true"/>
            <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"/>
            <param name="savelog" value="true"/>
            <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"/>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

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: https://www.mothur.org/wiki/Shared_file
.. _relabund: https://www.mothur.org/wiki/Get.relabund
.. _indicator: https://www.mothur.org/wiki/Indicator

v.1.22.0: Updated to Mothur 1.33

    ]]></help>
    <expand macro="citations">
        <citation type="doi">10.1890/0012-9615(1997)067[0345:SAAIST]2.0.CO;2</citation>
        <expand macro="citations-ecology"/>
    </expand>
</tool>