view tools/mothur/otu.association.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_otu_association" name="Otu.association" version="@WRAPPER_VERSION@.0">
    <description>Calculate the correlation coefficient for the otus</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="aggressive"><![CDATA[
        echo 'otu.association(
            #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 $groups:
                ,groups=${ str($groups).replace(",","-") }
            #end if
            #if $method:
                ,method=$method
            #end if
            #if $metadata:
                ,metadata=$metadata
            #end if
            #if $cutoff:
                ,cutoff=$cutoff
            #end if
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur &&

        ## move output files to correct destination
        prefix="$otu" &&
        mv \${prefix%.dat}*.otu.corr . &&
        mv mothur.*.logfile "$logfile"
    ]]></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" help="By default all labels are used">
            <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="pearson" selected="true">pearson</option>
            <option value="spearman">spearman</option>
            <option value="kendall">kendall</option>
        </param>
        <param name="metadata" type="data" format="tabular" optional="true" label="metadata - find the association between the otus and the metadata."/>
        <param name="cutoff" type="float" value="" min="0" max="1" optional="true" label="cutoff - set a pvalue at which the otu will be reported"/>
    </inputs>
    <outputs>
        <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/>
        <collection name="correlations" type="list" label="${tool.name} on ${on_string}: correlation coefficient files per OTU label">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.otu\.corr" format="mothur.otu.corr"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with shared file and default settings -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <output_collection name="correlations" count="36">
                <element name="0.41.pearson" md5="ba93b529a7b0e5ca3baa8fe9a41b4107" ftype="mothur.otu.corr"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with relabund file and label and group select -->
            <param name="otu" value="amazon.an.relabund" ftype="mothur.relabund"/>
            <param name="method" value="kendall"/>
            <param name="label" value="0.03,0.05,0.36,0.41,0.55"/>
            <param name="groups" value="forest,pasture"/>
            <output_collection name="correlations" count="5">
                <element name="0.41.kendall" md5="f01da5dc45d0bae35b692a7306bdc581" ftype="mothur.otu.corr"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documenation**

The otu.association_ command calculates the correlation coefficient for the otus in a shared_ or relabund_ file.

.. _shared: http://www.mothur.org/wiki/Shared_file
.. _relabund: http://www.mothur.org/wiki/Get.relabund
.. _otu.association: http://www.mothur.org/wiki/Otu.association

v.1.25.0: Updated to mothur 1.33, added cutoff option
]]>
    </help>
    <expand macro="citations"/>
</tool>