view core_diversity_analyses.xml @ 1:f5054cbc5d1c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit a9d1e0debcd357d8080a1c6c5f1d206dd45a7a4d
author iuc
date Fri, 19 May 2017 03:36:58 -0400
parents 2a7e18c4a657
children 61e86fd975a4
line wrap: on
line source

<tool id="qiime_core_diversity" name="Compute core set of diversity analyses" version="@WRAPPER_VERSION@.0">
    <description>A workflow for running a core set of QIIME 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" label="Run in parallel where available?" truevalue="--parallel" falsevalue="" checked="true"/>
        <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" label="Suppress generation of taxa summary plots?" truevalue="--suppress_taxa_summary" falsevalue="" checked="False"/>
        <param argument="--suppress_beta_diversity" type="boolean" label="Suppress beta diversity analyses?" truevalue="--suppress_beta_diversity" falsevalue="" checked="False"/>
        <param argument="--suppress_alpha_diversity" type="boolean" label="Suppress alpha diversity analyses?" truevalue="--suppress_alpha_diversity" falsevalue="" checked="False"/>
        <param argument="--suppress_group_significance" type="boolean" label="Suppress OTU/category significance analysis?" truevalue="--suppress_group_significance" falsevalue="" checked="False"/>
        <param argument="--categories" type="text" value="" 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" optional="true"/>
    </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 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>