view humann2_barplot.xml @ 0:efd98a5e8255 draft

planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/tools/humann2/ commit 6753a2c0fec9222f5977cab43a855c63fa9f7bee
author iuc
date Tue, 01 Aug 2017 07:57:29 -0400
parents
children 56cb2b0269d1
line wrap: on
line source

<tool id="humann2_barplot" name="Barplot" version="@WRAPPER_VERSION@.0">
    <description>stratified HUMAnN2 features</description>
    <macros>
        <import>humann2_macros.xml</import>
    </macros>
    <expand macro="requirements">
        <requirement type="package" version="2.0.2">matplotlib</requirement>
        <requirement type="package" version="1.13.1">numpy</requirement>
        <requirement type="package" version="0.19.1">scipy</requirement>
    </expand>
    <expand macro="version"/>
    <command detect_errors="exit_code"><![CDATA[
humann2_barplot
    --input '$input'
    --focal-feature '$focal_feature'
    #if str($top_strata) != ''
        --top-strata '$top_strata'
    #end if
    --sort $sort
    --last-metadatum '$last_metadatum'
    --focal-metadatum '$focal_metadatum'
    #if str($colormap) != ''
        --colormap '$'colormap'
    #end if
    #if str($meta_colormap) != ''
        --meta-colormap '$meta_colormap'
    #end if
    $exclude_unclassified
    --scaling '$scaling'
    $as_genera       
    $grid            
    $remove_zeroes   
    --width '$width'
    --dimensions '$height' '$width'
    #if str($ylims) != ''
        --ylims '$ylims'
    #end if
    #if $format == 'png'
        --output 'output.png'
    #elif $format == 'pdf'
        --output 'output.pdf'
    #elif $format == 'svg'
        --output 'output.svg'
    #end if
    ]]></command>
    <inputs>
        <param argument="--input" type="data" format="tsv,tabular" label="HUMAnN2 table with optional metadata"/>
        <param name="focal_feature" argument="--focal-feature" type="text" value="" label="Feature ID of interest (give ID not full name)">
            <validator type="empty_field" />
        </param>
        <param name="top_strata" argument="--top-strata" type="integer" value="" optional="true" label="Number of top stratifications to highlight" help="top = highest grand means"/>
        <param argument="--sort" type="select" label="Sample sorting methods">
            <option value="none">Default</option>
            <option value="sum">Sum of stratified values</option>
            <option value="dominant">Value of the most dominant stratification</option>
            <option value="similarity">Bray-Curtis agreement of relative stratifications</option>
            <option value="usimilarity">Bray-Curtis agreement of raw stratifications</option>
            <option value="metadata">Given metadata label</option>
        </param>
        <param name="focal_metadatum" argument="--focal-metadatum" type="text" value="" label="Metadatum to highlight / group by">
            <validator type="empty_field" />
        </param>
        <param name="last_metadatum" argument="--last-metadatum" type="text" value="" label="End of metadata rows">
            <validator type="empty_field" />
        </param>
        <param argument="--colormap" type="text" value="" optional="true" label="Color space for stratifications"/>
        <param name="meta_colormap" argument="--meta-colormap" type="text" value="" optional="true" label="Color space for metadata levels"/>
        <param name="exclude_unclassified" argument="--exclude-unclassified" type="boolean" truevalue="--exclude-unclassified" falsevalue="" checked="false" label="Do not include the 'unclassified' stratum?"/>
        <param argument="--scaling" type="select" label="Scaling options for total bar heights" help="Strata are always proportional to height">
            <option value="none">Default</option>
            <option value="pseudolog">Total bar heights log-scaled (strata are NOT log scaled)</option>
            <option value="normalize">Bars all have height=1 (highlighting relative attribution)</option>
        </param>
        <param name="as_genera" argument="--as-genera" type="boolean" truevalue="--as-genera" falsevalue="" checked="false" label="Collapse species to genera?"/>
        <param argument="--grid" type="boolean" truevalue="--grid" falsevalue="" checked="false" label="Add y-axis grid?"/>
        <param name="remove_zeroes" argument="--remove-zeroes" type="boolean" truevalue="--remove-zeroes" falsevalue="" checked="false" label="Do not plot samples with zero sum for this feature?"/>
        <param argument="--width" type="integer" value="5" label="Relative width of the plot vs. legend"/>
        <param name="height" argument="--dimensions" type="text" value="8" label="Image height in inches"/>
        <param name="width" argument="--dimensions" type="text" value="4" label="Image width in inches"/>
        <param argument="--ylims" type="text" value="" optional="true" label="Limits of y-axis (2 floats separated with a space)"/>
        <param name="format" type="select" label="Format for the output">
            <option value="pdf">PDF</option>
            <option value="png">PNG</option>
            <option value="svg">SVG</option>
        </param>
    </inputs>
    <outputs>
        <data format="png" name="barplot_png" from_work_dir="output.png" label="${tool.name} on ${on_string}">
            <filter>format == 'png'</filter>
        </data>
        <data format="pdf" name="barplot_pdf" from_work_dir="output.pdf" label="${tool.name} on ${on_string}">
            <filter>format == 'pdf'</filter>
        </data>
        <data format="svg" name="barplot_svg" from_work_dir="output.svg" label="${tool.name} on ${on_string}">
            <filter>format == 'svg'</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="input" value="hmp_pathabund.txt"/>
            <param name="focal_feature" value="ANAGLYCOLYSIS-PWY"/>
            <param name="sort" value="none"/>
            <param name="last_metadatum" value="STSite"/>
            <param name="focal_metadatum" value="STSite"/>
            <param name="exclude_unclassified" value=""/>
            <param name="scaling" value="none"/>
            <param name="as_genera" value=""/>
            <param name="grid" value=""/>
            <param name="remove_zeroes" value=""/>
            <param name="width" value="5"/>
            <param name="height" value="8"/>
            <param name="width" value="4"/>
            <param name="format" value="png"/>
            <output name="barplot_png" file="barplot1.png" ftype="png" compare="sim_size"/>
        </test>
        <test>
            <param name="input" value="hmp_pathabund.txt"/>
            <param name="focal_feature" value="ANAGLYCOLYSIS-PWY"/>
            <param name="sort" value="sum"/>
            <param name="last_metadatum" value="STSite"/>
            <param name="focal_metadatum" value="STSite"/>
            <param name="exclude_unclassified" value=""/>
            <param name="scaling" value="none"/>
            <param name="as_genera" value=""/>
            <param name="grid" value=""/>
            <param name="remove_zeroes" value=""/>
            <param name="width" value="5"/>
            <param name="height" value="8"/>
            <param name="width" value="4"/>
            <param name="format" value="pdf"/>
            <output name="barplot_pdf" file="barplot2.pdf" ftype="pdf" compare="sim_size"/>
        </test>
        <test>
            <param name="input" value="hmp_pathabund.txt"/>
            <param name="focal_feature" value="ANAGLYCOLYSIS-PWY"/>
            <param name="sort" value="metadata"/>
            <param name="last_metadatum" value="STSite"/>
            <param name="focal_metadatum" value="STSite"/>
            <param name="exclude_unclassified" value="--exclude-unclassified"/>
            <param name="scaling" value="none"/>
            <param name="as_genera" value="--as-genera"/>
            <param name="grid" value="--grid"/>
            <param name="remove_zeroes" value="--remove-zeroes"/>
            <param name="width" value="5"/>
            <param name="height" value="8"/>
            <param name="width" value="4"/>
            <param name="format" value="svg"/>
            <output name="barplot_svg" file="barplot3.svg" ftype="svg" compare="sim_size"/>
        </test>
        <test>
            <param name="input" value="hmp_pathabund.txt"/>
            <param name="focal_feature" value="ANAGLYCOLYSIS-PWY"/>
            <param name="top_strata" value="12"/>
            <param name="sort" value="sum"/>
            <param name="last_metadatum" value="STSite"/>
            <param name="focal_metadatum" value="STSite"/>
            <param name="exclude_unclassified" value=""/>
            <param name="scaling" value="normalize"/>
            <param name="as_genera" value=""/>
            <param name="grid" value=""/>
            <param name="remove_zeroes" value=""/>
            <param name="width" value="5"/>
            <param name="height" value="8"/>
            <param name="width" value="4"/>
            <param name="format" value="png"/>
            <output name="barplot_png" file="barplot4.png" ftype="png" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[
@HELP_HEADER@

humann2_barplot produces plots of stratified HUMAnN2 features and includes many options for sorting and scaling data

Here is an example of a HUMAnN2 barplot for a pathway (denitrification) that was preferentially enriched in Human Microbiome Project oral samples relative to other body sites. This figure uses many options from humann2_barplot, including regrouping by genus, pseudolog scaling, and sorting samples by similarity and metadata:

.. image:: $PATH_TO_IMAGES/731303924-page_DENITRIFICATION-PWY.png
   :width: 800
    ]]></help>
    <expand macro="citations"/>
</tool>