view heatmap.sim.xml @ 3:dd4ed83dbcc9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 283d5933cd945b7815b3da2ce45baa60d73e9746
author iuc
date Fri, 06 Apr 2018 04:18:50 -0400
parents 6c7e2e05f606
children
line wrap: on
line source

<tool profile="16.07" id="mothur_heatmap_sim" name="Heatmap.sim" version="@WRAPPER_VERSION@.0">
    <description>Generate a heatmap for pariwise similarity</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 '$count' count.dat &&
#if $input.source == 'shared':
    ln -s '$input.otu' input_otu.dat &&
#else
    ln -s '$input.dist' input_dist.dat &&
    #if $input.source == 'column':
        ln -s '$input.name' input_name.dat &&
    #end if
#end if

echo 'heatmap.sim(
    #if $input.source == "shared":
        shared=input_otu.dat,
        #if $input.label:
            label=${ str($input.label).replace(",","-") },
        #end if
        #if $input.groups:
            groups=${ str($input.groups).replace(",","-") },
        #end if
        #if $input.calc:
            calc=${ str($input.calc).replace(",","-") },
        #end if
    #elif $input.source == "column":
        column=input_dist.dat,
        name=input_name.dat,
    #elif $input.source == "phylip":
        phylip=input_dist.dat,
    #end if
    #if $count:
        count=count.dat,
    #end if
    fontsize=$fontsize
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <conditional name="input">
            <param name="source" type="select" label="Generate Heatmap for">
                <option value="shared">shared - Sample Similarity - OTU Shared</option>
                <option value="phylip">phylip - Phylip Distance Matrix</option>
                <option value="column">colomn - Pairwise Column Distance Matrix</option>
            </param>
            <when value="shared">
                <param name="otu" type="data" format="mothur.shared" label="shared - OTU Shared"/>
                <param name="label" type="select" label="label - OTU Labels" multiple="true">
                    <expand macro="labeloptions"/>
                </param>
                <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="calc" type="select" multiple="true" label="calc - Calculators (Uses defaults if none selected)">
                    <option value="jclass">jclass - Community Membership Similarity the traditional Jaccard similarity coefficient based on the observed richness</option>
                    <option value="jest" selected="true">jest - Community Membership Similarity the Jaccard similarity coefficient based on the Chao1 estimated richnesses</option>
                    <option value="sorclass">sorclass - Community Membership Similarity the Sorenson similarity coefficient based on the observed richness</option>
                    <option value="sorest">sorest - Community Membership Similarity the Sorenson similarity coefficient based on the Chao1 estimated richnesses</option>
                    <option value="braycurtis">braycurtis - Community Structure Similarity the Bray-Curtis similarity coefficient</option>
                    <option value="jabund">jabund - Community Structure Similarity the abundance-based Jaccard similarity coefficient</option>
                    <option value="morisitahorn">morisitahorn - Community Structure Similarity the Morisita-Horn similarity coefficient</option>
                    <option value="sorabund">sorabund - Community Structure Similarity the abundance-based Sorenson similarity coefficient</option>
                    <option value="thetan">thetan - Community Structure Similarity the Smith theta similarity coefficient</option>
                    <option value="thetayc" selected="true">thetayc - Community Structure Similarity the Yue &amp; Clayton theta similarity coefficient</option>
                </param>
            </when>
            <when value="column">
                <param name="dist" type="data" format="mothur.pair.dist" label="column - Distance Matrix"/>
                <param name="name" type="data" format="mothur.names" label="name - Names"/>
            </when>
            <when value="phylip">
                <param name="dist" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
            </when>
        </conditional>
        <param name="fontsize" type="integer" value="24" min="0" max="100" label="fontsize - Fontsize (default is 24)"/>
        <param name="count" type="data" format="mothur.count_table" optional="true" label="count - a count table" help="generated by count.seqs"/>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="heatmap" format="svg" from_work_dir="input_dist*.heatmap.sim.svg" label="${tool.name} on ${on_string}: heatmap.sim.svg">
            <filter>input['source'] != 'shared'</filter>
        </data>
        <collection name="heatmaps" type="list" label="${tool.name} on ${on_string}: Heatmaps">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.sim\.svg"/>
            <filter>input['source'] == 'shared'</filter>
        </collection>
    </outputs>
    <tests>
        <test>
            <param name="source" value="phylip"/>
            <param name="dist" value="amazon.dist" ftype="mothur.square.dist"/>
            <output name="heatmap">
                <assert_contents>
                    <has_text text="svg xmlns:svg="/>
                    <has_text text="Heatmap for"/>
                    <has_text text="U68640"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="source" value="shared"/>
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <output_collection name="heatmaps" count="72">
                <element name="0.55.jest.heatmap">
                    <assert_contents>
                        <has_text text="svg xmlns:svg="/>
                        <has_text text="Heatmap at distance 0.55"/>
                    </assert_contents>
                </element>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="source" value="shared"/>
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="label" value="0.03,0.26,0.55"/>
            <param name="calc" value="jclass,jest,sorclass,sorest,braycurtis,jabund,morisitahorn,sorabund,thetan,thetayc"/>
            <param name="groups" value="forest,pasture"/>
            <output_collection name="heatmaps" count="30">
                <element name="0.03.braycurtis.heatmap">
                    <assert_contents>
                        <has_text text="svg xmlns:svg="/>
                        <has_text text="Heatmap at distance 0.03"/>
                    </assert_contents>
                </element>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The heatmap.sim_ command generates a heat map from data provided in either a shared_ file, a phylip_ distance matrix, or a column_ distance matrix and a name_ file.  For calc parameter choices see: https://www.mothur.org/wiki/Calculators

.. _shared: https://www.mothur.org/wiki/Shared_file
.. _phylip: https://www.mothur.org/wiki/Phylip-formatted_distance_matrix
.. _column: https://www.mothur.org/wiki/Column-formatted_distance_matrix
.. _name: https://www.mothur.org/wiki/Name_file
.. _heatmap.sim: https://www.mothur.org/wiki/Heatmap.sim

v.1.24.0: Updated to Mothur 1.33, added count parameter

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