view metaphlan_hclust_heatmap.xml @ 2:2e3056f02c60 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metaphlan2/ commit bfc25b2695b9689c60101f84162610194a33c886"
author iuc
date Fri, 19 Mar 2021 21:39:54 +0000
parents f7353110d18c
children
line wrap: on
line source

<tool id="metaphlan_hclust_heatmap" name="Generate heatmap" version="@WRAPPER_VERSION@.0">

    <description>with hierarchical clustering of both samples
and microbial clades for MetaPhlAn2</description>

    <macros>
        <import>metaphlan2_macros.xml</import>
    </macros>

    <expand macro="requirements"/>
    <expand macro="stdio"/>

    <version_command>metaphlan_hclust_heatmap.py -v</version_command>

    <command>
<![CDATA[
        metaphlan_hclust_heatmap.py
            --in '$in'

            #if $output_format == "png"
                --out 'output.png'
            #else if $output_format == "pdf"
                --out 'output.pdf'
            #else if $output_format == "svg"
                --out 'output.svg'
            #end if

            -m '$m'
            -d '$d'
            -f '$f'

            #if $x
                -x '$x'
            #end if
            #if $y
                -y '$y'
            #end if
            --minv '$minv'
            #if $maxv
                --maxv $maxv
            #end if
            --tax_lev '$tax_lev'
            --perc '$perc'
            #if $top
                --top '$top'
            #end if
            --sdend_h '$sdend_h'
            --fdend_w '$fdend_w'
            --cm_h '$cm_h'
            --font_size '$font_size'
            --clust_line_w '$clust_line_w'
            -c '$c'
]]>
    </command>

    <inputs>
        <param argument="--in" type="data" format="tabular,txt" label="Input file of microbial relative abundances" help="This file is typically obtained with merge_metaphlan_tables"/>
        <param name="output_format" type="select" label="Format for the output image">
            <option value="png" selected="true">PNG</option>
            <option value="pdf">PDF</option>
            <option value="svg">SVG</option>
        </param>
        <param argument="-m" type="select" label="Hierarchical clustering method">
            <option value="average" selected="true">Average</option>
            <option value="centroid">Centroid</option>
            <option value="complete">Complete</option>
            <option value="median">Median</option>
            <option value="single">Single</option>
            <option value="ward">Ward</option>
            <option value="weighted">Weighted</option>
        </param>
        <param argument="-d" type="select" label="Distance function for samples">
            <option value="braycurtis" selected="true">braycurtis</option>
            <option value="canberra">canberra</option>
            <option value="chebyshev">chebyshev</option>
            <option value="cityblock">cityblock</option>
            <option value="correlation">correlation</option>
            <option value="cosine">cosine</option>
            <option value="dice">dice</option>
            <option value="euclidean">euclidean</option>
            <option value="hamming">hamming</option>
            <option value="jaccard">jaccard</option>
            <option value="kulsinski">kulsinski</option>
            <option value="mahalanobis">mahalanobis</option>
            <option value="matching">matching</option>
            <option value="minkowski">minkowski</option>
            <option value="rogerstanimoto">rogerstanimoto</option>
            <option value="russellrao">russellrao</option>
            <option value="seuclidean">seuclidean</option>
            <option value="sokalmichener">sokalmichener</option>
            <option value="sokalsneath">sokalsneath</option>
            <option value="sqeuclidean">sqeuclidean</option>
            <option value="wminkowski">wminkowski</option>
            <option value="ward">ward</option>            
            <option value="yule">yule</option>
        </param>
        <param argument="-f" type="select" label="Distance function for microbes">
            <option value="braycurtis">braycurtis</option>
            <option value="canberra">canberra</option>
            <option value="chebyshev">chebyshev</option>
            <option value="cityblock">cityblock</option>
            <option value="correlation" selected="true">correlation</option>
            <option value="cosine">cosine</option>
            <option value="dice">dice</option>
            <option value="euclidean">euclidean</option>
            <option value="hamming">hamming</option>
            <option value="jaccard">jaccard</option>
            <option value="kulsinski">kulsinski</option>
            <option value="mahalanobis">mahalanobis</option>
            <option value="matching">matching</option>
            <option value="minkowski">minkowski</option>
            <option value="rogerstanimoto">rogerstanimoto</option>
            <option value="russellrao">russellrao</option>
            <option value="seuclidean">seuclidean</option>
            <option value="sokalmichener">sokalmichener</option>
            <option value="sokalsneath">sokalsneath</option>
            <option value="sqeuclidean">sqeuclidean</option>
            <option value="wminkowski">wminkowski</option>
            <option value="ward">ward</option>            
            <option value="yule">yule</option>
        </param>
        <param argument="-x" type="integer" optional="True" label="Width of heatmap cells" help="Automatically set, this option should not be necessary unless for very large heatmaps"/>
        <param argument="-y" type="integer" optional="True" label="Height of heatmap cells" help="Automatically set, this option should not be necessary unless for very large heatmaps"/>
        <param argument="--minv" type="float" value="0" label="Minimum value to display" help="Values around 0.001 are also reasonable"/>
        <param argument="--maxv" type="float" optional="True" label="Maximum value to display" help="Default is maximum value present, can be set e.g. to 100 to display the full scale"/>
        <param argument="--tax_lev" type="select" label="Taxonomic level to display">
            <option value="a">All taxonomic levels</option>
            <option value="k">Kingdoms (Bacteria and Archaea) only</option>
            <option value="p">Phyla only</option>
            <option value="c">Classes only</option>
            <option value="o">Orders only</option>
            <option value="f">Families only</option>
            <option value="g">Genera only</option>
            <option value="s" selected="true">Species only</option>
        </param>
        <param argument="--perc" type="integer" value="90" label="Percentile to be used for ordering the microbes"/>
        <param argument="--top" type="integer" optional="True" label="Number of most abundant microbes to display"/>
        <param argument="--sdend_h" type="float" value="0.1" label="Height of the sample dendrogram"/>
        <param argument="--fdend_w" type="float" value="0.1" label="Width of the sample dendrogram"/>
        <param argument="--cm_h" type="float" value="0.03" label="Height of the colormap"/>
        <param argument="--font_size" type="integer" value="7" label="Label font sizes"/>
        <param argument="--clust_line_w" type="float" value="" label="Line width for the dendrograms"/>
        <param argument="-c" type="select" label="Taxonomic level to display">
            <option value="autumn">autumn</option>
            <option value="bbcyr">bbcyr</option>
            <option value="bbcry">bbcry</option>
            <option value="binary">binary</option>
            <option value="Blues">Blues</option>
            <option value="bone">bone</option>
            <option value="BrBG">BrBG</option>
            <option value="brg">brg</option>
            <option value="BuGn">BuGn</option>
            <option value="BuPu">BuPu</option>
            <option value="bwr">bwr</option>
            <option value="cool">cool</option>
            <option value="copper">copper</option>
            <option value="gist_earth">gist_earth</option>
            <option value="gist_ncar">gist_ncar</option>
            <option value="gist_rainbow">gist_rainbow</option>
            <option value="gist_stern">gist_stern</option>
            <option value="GnBu">GnBu</option>
            <option value="gray">gray</option>
            <option value="Greys">Greys</option>
            <option value="hot">hot</option>
            <option value="hsv">hsv</option>
            <option value="jet" selected="true">jet</option>
            <option value="OrRd">OrRd</option>
            <option value="Oranges">Oranges</option>
            <option value="PRGn">PRGn</option>
            <option value="pink">pink</option>
            <option value="PiYG">PiYG</option>
            <option value="PuBu">PuBu</option>
            <option value="PuBuGn">PuBuGn</option>
            <option value="PuOr">PuOr</option>
            <option value="PuRd">PuRd</option>
            <option value="Purples">Purples</option>
            <option value="RdBu">RdBu</option>
            <option value="RdGy">RdGy</option>
            <option value="RdPu">RdPu</option>            
            <option value="RdYlBu">RdYlBu</option>
            <option value="RdYlGn">RdYlGn</option>
            <option value="Reds">Reds</option>
            <option value="seismic">seismic</option>
            <option value="spectral">spectral</option>
            <option value="Spectral">Spectral</option>
            <option value="spring">spring</option>
            <option value="summer">summer</option>
            <option value="terrain">terrain</option>
            <option value="winter">winter</option>
            <option value="YlGn">YlGn</option>
            <option value="YlGnBu">YlGnBu</option>
            <option value="YlOrBr">YlOrBr</option>
            <option value="YlOrRd">YlOrRd</option>
        </param>
    </inputs>

    <outputs>
        <data format="pdf" name="out_pdf" from_work_dir="output.pdf" label="${tool.name} on ${on_string}">
            <filter>output_format == "pdf"</filter>
        </data>
        <data format="png" name="out_png" from_work_dir="output.png" label="${tool.name} on ${on_string}">
            <filter>output_format == "png"</filter>
        </data>
        <data format="svg" name="out_svg" from_work_dir="output.svg" label="${tool.name} on ${on_string}">
            <filter>output_format == "svg"</filter>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="in" value="merged_community_profile.tabular"/>
            <param name="output_format" value="png"/>
            <param name="m" value="average"/>
            <param name="d" value="braycurtis"/>
            <param name="f" value="correlation"/>
            <param name="minv" value="0"/>
            <param name="tax_lev" value="a"/>
            <param name="perc" value="90"/>
            <param name="sdend_h" value="0.1"/>
            <param name="fdend_w" value="0.1"/>
            <param name="cm_h" value="0.03"/>
            <param name="font_size" value="7"/>
            <param name="clust_line_w" value="1"/>
            <param name="c" value="jet"/>
            <output name="out_png" file="heatmap.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <param name="in" value="merged_community_profile.tabular"/>
            <param name="output_format" value="pdf"/>
            <param name="m" value="ward"/>
            <param name="d" value="euclidean"/>
            <param name="f" value="euclidean"/>
            <param name="minv" value="0"/>
            <param name="tax_lev" value="a"/>
            <param name="perc" value="90"/>
            <param name="sdend_h" value="0.1"/>
            <param name="fdend_w" value="0.1"/>
            <param name="cm_h" value="0.03"/>
            <param name="font_size" value="7"/>
            <param name="clust_line_w" value="1"/>
            <param name="c" value="pink"/>
            <output name="out_pdf" file="heatmap.pdf" compare="sim_size"/>
        </test>
        <test>
            <param name="in" value="merged_community_profile.tabular"/>
            <param name="output_format" value="svg"/>
            <param name="m" value="complete"/>
            <param name="d" value="hamming"/>
            <param name="f" value="matching"/>
            <param name="minv" value="0"/>
            <param name="tax_lev" value="a"/>
            <param name="perc" value="90"/>
            <param name="sdend_h" value="0.1"/>
            <param name="fdend_w" value="0.1"/>
            <param name="cm_h" value="0.03"/>
            <param name="font_size" value="7"/>
            <param name="clust_line_w" value="1"/>
            <param name="c" value="pink"/>
            <output name="out_svg" file="heatmap.svg" ftype="svg" compare="sim_size"/>
        </test>
    </tests>

    <help><![CDATA[

**What it does**

MetaPhlAn is a computational tool to profile the structure and the composition of microbial communities (Bacteria, Archaea, Eukaryotes and Viruses) from metagenomic shotgun sequencing data with species level resolution. For more information, check the `user manual <https://bitbucket.org/biobakery/metaphlan2/>`_.

This tool generates heatmaps with hierarchical clustering of both samples
and microbial clades. The script can also subsample the number of clades to
display based on the their nth percentile abundance value in each sample

    ]]></help>

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