view tools/mothur/normalize.shared.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_normalize_shared" name="Normalize.shared" version="@WRAPPER_VERSION@.0">
    <description>Normalize the number of sequences per group to a specified level</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="aggressive"><![CDATA[
        echo 'normalize.shared(
            #if $otu.is_of_type("mothur.relabund"):
                relabund=$otu
            #elif $otu.is_of_type("mothur.shared"):
                shared=$otu,
                makerelabund=$makerelabund
            #end if
            #if $label:
                ,label=${ str($label).replace(",","-") }
            #end if
            #if $groups:
                ,groups=${ str($groups).replace(",","-") }
            #end if
            #if $method:
                ,method=${ str($method).replace(",","-") }
            #end if
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur &&

        ## move output files to correct destination
        prefix="$otu" &&
        mv mothur.*.logfile "$logfile" &&
        mv \${prefix%.dat}*.shared .
    ]]></command>
    <inputs>
        <param name="otu" type="data" format="mothur.shared,mothur.relabund" label="shared,relabund - OTU Shared or Relabund file"/>
        <param name="label" type="select" label="label - OTU Labels" multiple="true">
            <expand macro="labeloptions"/>
        </param>
        <param name="groups" type="select" label="groups - Groups to include" multiple="true">
            <options>
                <filter type="data_meta" ref="otu" key="groups"/>
            </options>
        </param>
        <param name="method" type="select" label="method - Normalization method">
            <option value="totalgroup" selected="true">Total Group</option>
            <option value="zscore">Z Score</option>
        </param>
        <param name="makerelabund" type="boolean" truevalue="true" falsevalue="false" checked="false" label="makerelabund - convert a shared file to a relabund file before you normalize"/>
    </inputs>
    <outputs>
        <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/>
        <collection name="sharedfiles" type="list" label="${tool.name} on ${on_string}: norm.shared files collection">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.shared" format="mothur.shared"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test default settings -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <output_collection name="sharedfiles" count="36">
                <element name="0.26.norm" md5="73ad51ce74e5b3efbc1d9ec8ed6e1c07" ftype="mothur.shared"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test default settings -->
            <param name="otu" value="amazon.an.relabund" ftype="mothur.relabund"/>
            <param name="label" value="0.03,0.05,0.22,0.26"/>
            <param name="groups" value="forest,pasture"/>
            <param name="method" value="zscore"/>
            <output_collection name="sharedfiles" count="4">
                <element name="0.26.norm" md5="1204d65c732fd880585180e956610026" ftype="mothur.shared"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documenation**

The normalize.shared_ command normalizes the number of sequences per group to a specified level.  The input is a shared_ or relabund_ file.

.. _shared: http://www.mothur.org/wiki/Shared_file
.. _relabund: http://www.mothur.org/wiki/Get.relabund
.. _normalize.shared: http://www.mothur.org/wiki/Normalize.shared
]]>
    </help>
    <expand macro="citations"/>
</tool>