view scikit_bio_diversity_beta_diversity.xml @ 0:63706c95c9ed draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scikit_bio commit d46d41c5fec10407bd6b5cb77a11d9b43b82b95e
author iuc
date Fri, 23 Sep 2016 12:17:38 -0400
parents
children
line wrap: on
line source

<tool id="scikit_bio_diversity_beta_diversity" name="Beta Diversity" version="@VERSION@.0">
    <description>
        using scikit-bio
    </description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <command><![CDATA[
        python ${__tool_directory__}/scikit_bio_diversity_beta_diversity.py
        --input "${input_abundance}"
        #if $otu_column:
            --otu_column "${otu_column}"
        #end if
        #if $sample_columns:
            --sample_columns "${sample_columns}"
        #end if
        ${header}
        --distance_metric "${distance_metric.beta_diversity_method}"
        #if str( $distance_metric.beta_diversity_method ) in [ 'unweighted_unifrac', 'weighted_unifrac' ]:
            --tree
            #if $distance_metric.input_tree:
                "${distance_metric.input_tree}"
            #else:
                "${input_tree_config_file}"
            #end if
        #end if
        --output "${output_beta_diversity}"
    ]]>
    </command>
    <configfiles>
        <configfile name="input_tree_config_file">#if str( $distance_metric.beta_diversity_method ) in [ 'unweighted_unifrac', 'weighted_unifrac' ] then $distance_metric.tree else ''#</configfile>
    </configfiles>
    <inputs>
        <param name="input_abundance" type="data" format="tabular" label="File with abundance values for community" help="Rows are samples; columns are species/phyla/community classifier"/>
        <param name="otu_column" label="Group name column" type="data_column" data_ref="input_abundance" value="1" optional="True" help="Species, phylum, etc"/>
        <param name="sample_columns" label="Select Sample count columns" type="data_column" multiple="True" value="" optional="True" data_ref="input_abundance" help="Leave blank for all"/>
        <param name="header" type="boolean" truevalue="--header" falsevalue="" checked="False" label="Input has a header line"/>
        <conditional name="distance_metric">
            <param name="beta_diversity_method" type="select" multiple="False" label="Diversity index to compute">
                <option value="unweighted_unifrac">unweighted_unifrac</option>
                <option value="weighted_unifrac" selected="True">weighted_unifrac</option>
                <option value="euclidean">euclidean</option>
                <option value="minkowski">minkowski</option>
                <option value="cityblock">cityblock</option>
                <option value="seuclidean">seuclidean</option>
                <option value="sqeuclidean">sqeuclidean</option>
                <option value="cosine">cosine</option>
                <option value="correlation">correlation</option>
                <option value="hamming">hamming</option>
                <option value="jaccard">jaccard</option>
                <option value="chebyshev">chebyshev</option>
                <option value="canberra">canberra</option>
                <option value="braycurtis">braycurtis</option>
                <option value="mahalanobis">mahalanobis</option>
                <option value="yule">yule</option>
                <option value="matching">matching</option>
                <option value="dice">dice</option>
                <option value="kulsinski">kulsinski</option>
                <option value="rogerstanimoto">rogerstanimoto</option>
                <option value="russellrao">russellrao</option>
                <option value="sokalmichener">sokalmichener</option>
                <option value="sokalsneath">sokalsneath</option>
                <option value="wminkowski">wminkowski</option>
            </param>
            <when value="euclidean"/>
            <when value="minkowski"/>
            <when value="cityblock"/>
            <when value="seuclidean"/>
            <when value="sqeuclidean"/>
            <when value="cosine"/>
            <when value="correlation"/>
            <when value="hamming"/>
            <when value="jaccard"/>
            <when value="chebyshev"/>
            <when value="canberra"/>
            <when value="braycurtis"/>
            <when value="mahalanobis"/>
            <when value="yule"/>
            <when value="matching"/>
            <when value="dice"/>
            <when value="kulsinski"/>
            <when value="rogerstanimoto"/>
            <when value="russellrao"/>
            <when value="sokalmichener"/>
            <when value="sokalsneath"/>
            <when value="wminkowski"/>
            <when value="unweighted_unifrac">
                <expand macro="params_tree" />
            </when>
            <when value="weighted_unifrac">
                <expand macro="params_tree" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="tabular" name="output_beta_diversity" label="${tool.name} on ${on_string} (${distance_metric.beta_diversity_method})"/>
    </outputs>
    <tests>
        <test>
            <param name="input_abundance" ftype="tabular" value="input_abundance_1.tabular"/>
            <param name="otu_column" value="1"/>
            <param name="sample_columns" value="2,3,4"/>
            <param name="header" value="True"/>
            <conditional name="distance_metric">
                <param name="beta_diversity_method" value="weighted_unifrac"/>
                <param name="input_tree" value="input_tree_1.newick"/>
                <param name="tree" value=""/>
            </conditional>
            <output name="output_beta_diversity" ftype="tabular" file="output_weighted_unifrac_1.tabular" />
        </test>
    </tests>
    <help>
        <![CDATA[
        
Calculates beta diversity using the selected metric.

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