view heatmap.bin.xml @ 4:a271eda55001 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit be5c8af076296a53959fc3ed2b82d92dc7607eeb
author iuc
date Mon, 23 Apr 2018 09:58:11 -0400
parents ac2fa6a167ad
children 35a719cd08da
line wrap: on
line source

<tool profile="16.07" id="mothur_heatmap_bin" name="Heatmap.bin" version="@WRAPPER_VERSION@.0">
    <description>Generate a heatmap for OTUs</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 '$input.otu' input_otu.dat &&

echo 'heatmap.bin(
    #if $input.otu.is_of_type("mothur.rabund"):
        rabund=input_otu.dat,
    #elif $input.otu.is_of_type("mothur.sabund"):
        sabund=input_otu.dat,
    #elif $input.otu.is_of_type("mothur.list"):
        list=input_otu.dat,
    #elif $input.otu.is_of_type("mothur.relabund"):
        relabund=input_otu.dat,
    #elif $input.otu.is_of_type("mothur.shared"):
        shared=input_otu.dat,
    #end if
    #if $input.has_groups == 'yes' and $input.groups:
        groups=${ str($input.groups).replace(",","-") },
    #end if
    #if $input.label:
        label=${ str($input.label).replace(",","-") },
    #end if
    scale=$scale,
    sorted=$sorted,
    numotu=$numotu,
    fontsize=$fontsize
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <conditional name="input">
            <param name="has_groups" type="select" label="Generate Heatmap for">
                <option value="no">list, rabund, sabund</option>
                <option value="yes">shared, relabund</option>
            </param>
            <when value="no">
                <param name="otu" type="data" format="mothur.list,mothur.rabund,mothur.sabund" label="list,rabund,sabund - OTU List"/>
                <param name="label" type="select" label="label - OTU Labels" multiple="true">
                    <expand macro="labeloptions"/>
                </param>
            </when>
            <when value="yes">
                <param name="otu" type="data" format="mothur.shared,mothur.relabund" label="shared or relabund file - OTU List"/>
                <param name="groups" type="select" multiple="true" label="groups - Groups to include">
                    <options>
                        <filter type="data_meta" ref="otu" key="groups"/>
                    </options>
                </param>
                <param name="label" type="select" multiple="true" label="label - OTU Labels">
                    <expand macro="labeloptions"/>
                </param>
            </when>
        </conditional>
        <param name="scale" type="select" label="scale - Scaling for heatmap">
            <option value="log10" selected="true">Log10</option>
            <option value="log2">Log2</option>
            <option value="linear">Linear</option>
        </param>
        <param name="sorted" type="select" label="sorted - Sort heatmap">
            <option value="shared" selected="true">By shared</option>
            <option value="none">Don't sort</option>
            <option value="topotu">By Total OTUs</option>
            <option value="topgroup">By Total Groups</option>
        </param>
        <param name="numotu" type="integer" value="0" min="0" label="numotu - Limit the number of OTUs displayed (ignored if 0)"/>
        <param name="fontsize" type="integer" value="24" min="0" max="100" label="fontsize - Fontsize (default is 24)"/>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <collection name="heatmaps" type="list" label="${tool.name} on ${on_string}: Heatmaps">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.bin\.svg"/>
        </collection>
    </outputs>
    <tests>
        <test>
            <param name="otu" value="amazon.an.list" ftype="mothur.list"/>
            <param name="has_groups" value="no"/>
            <output_collection name="heatmaps" count="36">
                <element name="0.26.heatmap" md5="8f0d5cb95808115e50729e6df60629cc"/>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="otu" value="amazon.an.relabund" ftype="mothur.relabund"/>
            <param name="has_groups" value="yes"/>
            <param name="groups" value="forest"/>
            <param name="label" value="0.26"/>
            <output_collection name="heatmaps" count="1">
                <element name="0.26.heatmap" md5="b2b46b7e55f55e2b260cd6dc6ccb4485"/>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="has_groups" value="yes"/>
            <param name="label" value="0.03,0.26,0.55"/>
            <param name="groups" value="forest,pasture"/>
            <param name="fontsize" value="100"/>
            <param name="scale" value="linear"/>
            <param name="sorted" value="none"/>
            <output_collection name="heatmaps" count="3">
                <element name="0.26.heatmap" md5="b46ed47e441a30588f60e1554ff703bb"/>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@


**Command Documentation**

The heatmap.bin_ command generates a heat map from data provided in either a list_ or a shared_ file.

.. _list: https://www.mothur.org/wiki/List_file
.. _shared: https://www.mothur.org/wiki/Shared_file
.. _heatmap.bin: https://www.mothur.org/wiki/Heatmap.bin

v.1.21.0: Updated to Mothur 1.33

    ]]></help>
    <expand macro="citations"/>
</tool>