view beta_diversity.xml @ 5:206c7eb264db draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit 3b54163c4f7daff76fcc589c4a9057bb03904380
author iuc
date Sat, 05 Aug 2017 07:33:12 -0400
parents 0f76694d7591
children b38301bc5335
line wrap: on
line source

<tool id="qiime_beta_diversity" name="Calculate beta diversity" version="@WRAPPER_VERSION@.0">
    <description>(pairwise sample dissimilarity) on one or many otu tables (beta_diversity)</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <stdio>
        <regex match="VisibleDeprecationWarning" source="both" level="warning" description="VisibleDeprecationWarning on numpy for `rank`"/>
    </stdio>
    <version_command>beta_diversity.py --version</version_command>
    <command detect_errors="aggressive"><![CDATA[
#set $chosen_metrics = str( $metrics ).split( "," )
beta_diversity.py
    --input_path '$input_path'
    #if $rows
        --rows '$rows'
    #end if
    -o beta_diversity
    --metrics '$metrics'
    #if ("unifrac_g" in $chosen_metrics or "unifrac_g_full_tree" in $chosen_metrics or "unweighted_unifrac" in $chosen_metrics or "unweighted_unifrac_full_tree" in $chosen_metrics or "weighted_normalized_unifrac" in $chosen_metrics or "weighted_unifrac" in $chosen_metrics) and $tree_path
        --tree_path '$tree_path'
    #end if
    $full_tree
    ]]></command>
    <inputs>
        <param argument="--input_path" type="data" format="tabular,txt,tsv" label="OTU table"/>
        <param argument="--rows" type="text" value="" optional="true" label="Rows on which distance matrix is computed (optional)" help="A comma-separated list of sample names is expected"/>
        <param argument="--metrics" type="select" multiple="True" display="checkboxes" label="Beta-diversity metric(s) to use">
            <option value="abund_jaccard">Abundance weighted Jaccard distance</option>
            <option value="binary_chisq">Binary chi-square distance</option>
            <option value="binary_chord">Binary chord distance</option>
            <option value="binary_euclidean">Binary euclidean distance</option>
            <option value="binary_hamming">Binary Hamming distance (binary Manhattan distance)</option>
            <option value="binary_jaccard">Binary Jaccard distance (binary Soergel distance)</option>
            <option value="binary_lennon">Binary Lennon distance</option>
            <option value="binary_ochiai">Binary Ochiai distance</option>
            <option value="binary_pearson">Binary Pearson distance</option>
            <option value="binary_sorensen_dice">Binary Sörensen-Dice distance (binary Bray-Curtis distance or binary Whittaker distance)</option>
            <option value="bray_curtis">Bray-Curtis distance (normalized Manhattan distance)</option>
            <option value="canberra">Canberra distance</option>
            <option value="chisq">Chi-square distance</option>
            <option value="chord">Chord distance</option>
            <option value="euclidean">Euclidean distance</option>
            <option value="gower">Gower distance</option>
            <option value="hellinger">Hellinger distance</option>
            <option value="kulczynski">Kulczynski distance</option>
            <option value="manhattan">Manhattan distance</option>
            <option value="morisita_horn">Morisita-Horn distance</option>
            <option value="pearson">Pearson distance</option>
            <option value="soergel">Soergel distance</option>
            <option value="spearman_approx">Spearman rank distance</option>
            <option value="specprof">Species profile distance</option>
            <option value="unifrac_g">G UniFrac metric (phylogenetic)</option>
            <option value="unifrac_g_full_tree">G UniFrac full tree metric (phylogenetic)</option>
            <option value="unweighted_unifrac" selected="true">Unweighted UniFrac metric (phylogenetic)</option>
            <option value="unweighted_unifrac_full_tree">Unweighted UniFrac full tree metric (phylogenetic)</option>
            <option value="weighted_normalized_unifrac">Normalized weighted UniFrac metric (phylogenetic)</option>
            <option value="weighted_unifrac" selected="true">Weighted UniFrac metric (phylogenetic)</option>
        </param>
        <param argument="--tree_path" type="data" format="nhx,txt" optional="true" label="Newick tree (optional, except for PD_whole_tree metric)"/>
        <param argument="--full_tree" type="boolean" truevalue="--full_tree" falsevalue="" checked="false" label="Skip the removal of tips not corresponding to OTUs in the OTU table from the tree for diversity calculations?" help="By default, tips not corresponding to OTUs in the OTU table are removed from the tree for diversity calculations. Pass to skip this step if you’re already passing a minimal tree. Beware with 'full_tree' metrics, as extra tips in the tree change the result"/>
    </inputs>
    <outputs>
        <collection name="beta_diversity" type="list" label="${tool.name} on ${on_string}: Beta diversity metrics">
            <discover_datasets pattern="(?P&lt;designation&gt;.*)_dataset.*\.txt*" directory="beta_diversity"/>
        </collection>
    </outputs>
    <tests>
        <test>
            <param name="input_path" value="beta_diversity/otu_table.biom"/>
            <param name="tree_path" value="beta_diversity/rep_set.tre"/>
            <param name="metrics" value="unweighted_unifrac,weighted_unifrac"/>
            <param name="full_tree" value=""/>
            <output_collection name="beta_diversity" count="2">
                <element name="unweighted_unifrac" md5="59ab72d4e729c9bcd3194b86ce82c327"/>
                <element name="weighted_unifrac" md5="c9815ca77064e014579797ab0d0023f7"/>
            </output_collection>
        </test>
        <test>
            <param name="input_path" value="beta_diversity/otu_table.biom"/>
            <param name="tree_path" value="beta_diversity/rep_set.tre"/>
            <param name="metrics" value="abund_jaccard,binary_chisq,binary_chord,binary_euclidean,binary_hamming,binary_jaccard,binary_lennon,binary_ochiai,binary_pearson,binary_sorensen_dice,bray_curtis,canberra,chisq,chord,euclidean,gower,hellinger,kulczynski,manhattan,morisita_horn,pearson,soergel,spearman_approx,specprof,unifrac_g,unifrac_g_full_tree,unweighted_unifrac,unweighted_unifrac_full_tree,weighted_normalized_unifrac,weighted_unifrac"/>            
            <param name="full_tree" value=""/>
            <output_collection name="beta_diversity" count="30">
                <element name="canberra" md5="79d919bef870d6e43a49ee3da9c6e2f9"/>
                <element name="pearson" md5="c87ebfdb7b4a2cfbbc9a5c228aaec38d"/>
            </output_collection>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This script generate distance matrices containing a dissimilarity value for each
pairwise comparison.

A number of metrics are currently supported, including unweighted and weighted UniFrac (pass the -s option to see available metrics). In general, because unifrac uses phylogenetic information, one of the unifrac metrics is recommended, as results can be vastly more useful (Hamady & Knight, 2009). Quantitative measures (e.g. weighted unifrac) are ideally suited to revealing community differences that are due to changes in relative taxon abundance (e.g., when a particular set of taxa flourish because a limiting nutrient source becomes abundant). Qualitative measures (e.g. unweighted unifrac) are most informative when communities differ primarily by what can live in them (e.g., at high temperatures), in part because abundance information can obscure significant patterns of variation in which taxa are present (Lozupone et al., 2007). Most qualitative measures are referred to here e.g. “binary_jaccard”. Typically both weighted and unweighted unifrac are used.

More information about this tool is available on
`QIIME documentation <http://qiime.org/scripts/beta_diversity.html>`_.
    ]]></help>
    <citations>
        <expand macro="citations"/>
    </citations>
</tool>