view core_diversity_analyses.xml @ 6:5fc2acd6de43 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
author iuc
date Tue, 30 Oct 2018 19:30:31 -0400
parents 486570c88d1b
children 57deb17cadbf
line wrap: on
line source

<tool id="qiime_core_diversity" name="Run a core set of QIIME diversity analyses" version="@WRAPPER_VERSION@.0">
    <description>(core_diversity_analyses)</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <version_command>core_diversity_analyses.py --version</version_command>
    <command detect_errors="aggressive"><![CDATA[
## set matplotlib backend
echo "backend:agg" > matplotlibrc &&

core_diversity_analyses.py
    --input_biom_fp '$input_biom_fp'
    -o core_diversity_analyses
    --mapping_fp '$mapping_fp'
    --sampling_depth '$sampling_depth'
    #if $parameter_fp
        --parameter_fp '$parameter_fp'
    #end if
    $parallel
    -O "\${GALAXY_SLOTS:-4}"
    $phylogenetic.nonphylogenetic_diversity
    #if str( $phylogenetic.nonphylogenetic_diversity ) == ""
        --tree_fp '$phylogenetic.tree_fp'
    #end if
    $suppress_taxa_summary
    $suppress_beta_diversity
    $suppress_alpha_diversity
    $suppress_group_significance
    #if str( $categories ):
        --categories '$categories'
    #end if

&& mkdir -p '$html_report.files_path'
&& cp -r core_diversity_analyses/* '$html_report.files_path'
&& mv '$html_report.files_path/index.html' '$html_report'
    ]]></command>
    <inputs>
        <param argument="--input_biom_fp" type="data" format="tabular,txt,biom,h5" label="OTU table"/>
        <param argument="--mapping_fp" type="data" format="tabular,txt,tsv" label="Mapping file" />
        <param argument="--sampling_depth" type="integer" value="" label="Sequencing depth to use for even sub-sampling and maximum rarefaction depth" help="To decide this value, review the output of the ‘biom summarize-table’"/>
        <param argument="--parameter_fp" type="data" format="txt" label="Parameter file" help="It specifies changes to the default behavior" optional="true"/>
        <param argument="--parallel" type="boolean" truevalue="--parallel" falsevalue="" checked="true" label="Run in parallel where available?"/>
        <conditional name="phylogenetic">
            <param argument="--nonphylogenetic_diversity" type="select" label="Apply non-phylogenetic alpha (chao1 and observed_otus) and beta (bray_curtis) diversity calculations?" help="This is useful if, for example, when working with non-amplicon BIOM tables, or if a reliable tree is not available">
                <option value="--nonphylogenetic_diversity">Yes</option>
                <option value="" selected="true">No</option>
            </param>
            <when value="">
                <param argument="--tree_fp" type="data" format="txt" label="Tree file"/>
            </when>
            <when value="--nonphylogenetic_diversity"/>
        </conditional>
        <param argument="--suppress_taxa_summary" type="boolean" truevalue="--suppress_taxa_summary" falsevalue="" checked="false" label="Suppress generation of taxa summary plots?"/>
        <param argument="--suppress_beta_diversity" type="boolean" truevalue="--suppress_beta_diversity" falsevalue="" checked="false" label="Suppress beta diversity analyses?"/>
        <param argument="--suppress_alpha_diversity" type="boolean" truevalue="--suppress_alpha_diversity" falsevalue="" checked="false" label="Suppress alpha diversity analyses?"/>
        <param argument="--suppress_group_significance" type="boolean" truevalue="--suppress_group_significance" falsevalue="" checked="false" label="Suppress OTU/category significance analysis?"/>
        <param argument="--categories" type="text" value="" optional="true" label="Metadata category or categories to compare for categorical analyses (optional)" help="The column headers in the mapping file should be passed as a comma-separated list. By default, no categorical analyses are performed"/>
    </inputs>
    <outputs>
        <data name="html_report" format="html" label="${tool.name} on ${on_string}: Core diversity report"/>
    </outputs>
    <tests>
        <test> <!-- test taxa summary and group significance -->
            <param name="input_biom_fp" value="core_diversity_analyses/otu_table.biom"/>
            <param name="mapping_fp" value="core_diversity_analyses/map.txt"/>
            <param name="sampling_depth" value="22"/>
            <param name="parallel" value="--parallel"/>
            <param name="nonphylogenetic_diversity" value=""/>
            <param name="tree_fp" value="core_diversity_analyses/rep_set.tre"/>
            <param name="suppress_taxa_summary" value=""/>
            <param name="suppress_beta_diversity" value="--suppress_beta_diversity"/>
            <param name="suppress_alpha_diversity" value="--suppress_alpha_diversity"/>
            <param name="suppress_group_significance" value=""/>
            <output name="html_report">
                <assert_contents>
                    <has_text text="Filtered BIOM table (minimum sequence count: 22)"/>
                    <has_text text="rarefied BIOM table (sampling depth: 22)"/>
                    <has_text text="Taxa summary bar plots"/>
                </assert_contents>
            </output>
        </test>
        <test><!-- test beta diversity -->
            <param name="input_biom_fp" value="core_diversity_analyses/otu_table.biom"/>
            <param name="mapping_fp" value="core_diversity_analyses/map.txt"/>
            <param name="sampling_depth" value="22"/>
            <param name="parallel" value="--parallel"/>
            <param name="nonphylogenetic_diversity" value="--nonphylogenetic_diversity"/>
            <param name="suppress_taxa_summary" value="--suppress_taxa_summary"/>
            <param name="suppress_beta_diversity" value=""/>
            <param name="suppress_alpha_diversity" value="--suppress_alpha_diversity"/>
            <param name="suppress_group_significance" value="--suppress_group_significance"/>
            <output name="html_report">
                <assert_contents>
                    <has_text text="Filtered BIOM table (minimum sequence count: 22)"/>
                    <has_text text="rarefied BIOM table (sampling depth: 22)"/>
                    <has_text text="Beta diversity results"/>
                </assert_contents>
            </output>
        </test>
        <test><!-- test alpha diversity -->
             <param name="input_biom_fp" value="core_diversity_analyses/otu_table.biom"/>
             <param name="mapping_fp" value="core_diversity_analyses/map.txt"/>
             <param name="parameter_fp" value="core_diversity_analyses/alpha_diversity_params.txt"/>
             <param name="sampling_depth" value="22"/>
             <param name="parallel" value="--parallel"/>
             <param name="nonphylogenetic_diversity" value="--nonphylogenetic_diversity"/>
             <param name="suppress_taxa_summary" value="--suppress_taxa_summary"/>
             <param name="suppress_beta_diversity" value="--suppress_beta_diversity"/>
             <param name="suppress_alpha_diversity" value=""/>
             <param name="suppress_group_significance" value="--suppress_group_significance"/>
             <output name="html_report">
                 <assert_contents>
                     <has_text text="Filtered BIOM table (minimum sequence count: 22)"/>
                     <has_text text="rarefied BIOM table (sampling depth: 22)"/>
                     <has_text text="Alpha rarefaction plots"/>
                 </assert_contents>
             </output>
        </test>
        <test><!-- test suppressing all -->
            <param name="input_biom_fp" value="core_diversity_analyses/otu_table.biom"/>
            <param name="mapping_fp" value="core_diversity_analyses/map.txt"/>
            <param name="sampling_depth" value="22"/>
            <param name="parallel" value="--parallel"/>
            <param name="nonphylogenetic_diversity" value="--nonphylogenetic_diversity"/>
            <param name="suppress_taxa_summary" value="--suppress_taxa_summary"/>
            <param name="suppress_beta_diversity" value="--suppress_beta_diversity"/>
            <param name="suppress_alpha_diversity" value="--suppress_alpha_diversity"/>
            <param name="suppress_group_significance" value="--suppress_group_significance"/>
            <output name="html_report">
                <assert_contents>
                    <has_text text="Filtered BIOM table (minimum sequence count: 22)"/>
                    <has_text text="rarefied BIOM table (sampling depth: 22)"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool calculates alpha diversity, or within-sample diversity, using an
OTU table.

The resulting file(s) is a tab-delimited text file, where the columns correspond
to alpha diversity metrics and the rows correspond to samples and their calculated
diversity measurements. When a folder is given as input (-i), the script processes
every otu table file in the given folder, and creates a corresponding file in the
output directory.

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