view summarize_taxa_through_plots.xml @ 1:0e114b9a3370 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:38:57 -0400
parents 72b02cea4123
children 62eb36dff24d
line wrap: on
line source

<tool id="qiime_summarize_taxa_through_plots" name="Perform taxonomy" version="@WRAPPER_VERSION@.0">
    <description>summaries and plots</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <version_command>summarize_taxa_through_plots.py --version</version_command>
    <command detect_errors="aggressive"><![CDATA[
        ## set matplotlib backend
        export MPLBACKEND="Agg" &&
        echo "backend:agg" > matplotlibrc &&

        summarize_taxa_through_plots.py
            --otu_table_fp '$otu_table_fp'
            --output_dir output
            #if $parameter_fp
                --parameter_fp '$parameter_fp'
            #end if
            #if $mapping.use_mapping == "yes"
                --mapping_fp '$mapping.mapping_fp'
                #if str($mapping.mapping_category) != ''
                    --mapping_category '$mapping.mapping_category'
                #end if
            #end if
            $sort
        && mkdir -p '$area_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/area_charts.html' '$area_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/charts' '$area_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/css' '$area_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/js' '$area_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/raw_data' '$area_charts_html_report.files_path'
        && mv '$area_charts_html_report.files_path/area_charts.html' '$area_charts_html_report'

        && mkdir -p '$bar_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/bar_charts.html' '$bar_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/charts' '$bar_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/css' '$bar_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/js' '$bar_charts_html_report.files_path'
        && cp -r 'output/taxa_summary_plots/raw_data' '$bar_charts_html_report.files_path'
        && mv '$bar_charts_html_report.files_path/bar_charts.html' '$bar_charts_html_report'
    ]]></command>
    <inputs>
        <param argument="--otu_table_fp" type="data" format="biom1,tabular,txt" label="Input OTU table"/>
        <conditional name="mapping">
            <param name="use_mapping" type="select" label="Use a metadata mapping file?">
                <option value="yes">Yes</option>
                <option value="no">No</option>
            </param>
            <when value="yes">
                <param argument="--mapping_fp" type="data" format="tabular,csv" label="Input metadata mapping"/>
                <param argument="--mapping_category" type="text" value="" label="Category to use to summarize OTU table" optional="True"/>
            </when>
            <when value="no"/>
        </conditional>
        <param argument="--parameter_fp" type="data" format="txt" label="Parameter file" help="It specifies changes to the default behavior of join_paired_ends.py" optional="true"/>
        <param argument="--sort" type="boolean" label="Sort OTU table?" truevalue="--sort" falsevalue="" checked="False"/>
    </inputs>
    <outputs>
        <collection name="otu_table" type="list" label="${tool.name} on ${on_string}: OTU tables for the different taxonomic levels">
            <discover_datasets pattern=".*_L(?P&lt;designation&gt;.+)\.txt" directory="output/" />
        </collection>
        <collection name="biom_otu_table" type="list" label="${tool.name} on ${on_string}: BIOM OTU tables for the different taxonomic levels">
            <discover_datasets pattern=".*_L(?P&lt;designation&gt;.+)\.biom" format="biom1" directory="output/" />
        </collection>
        <data name="bar_charts_html_report" format="html" label="${tool.name} on ${on_string}: Bar charts"/>
        <data name="area_charts_html_report" format="html" label="${tool.name} on ${on_string}: Area charts"/>
    </outputs>
    <tests>
        <test>
            <param name="otu_table_fp" value="summarize_taxa_through_plots/otu_table.biom"/>
            <conditional name="mapping">
                <param name="use_mapping" value="yes"/>
                <param name="mapping_fp" value="summarize_taxa_through_plots/Fasting_Map.txt"/>
            </conditional>
            <output_collection name="otu_table" type="list">
                <element name="2" file="summarize_taxa_through_plots/mapping/otu_table_L2.txt"/>
                <element name="3" file="summarize_taxa_through_plots/mapping/otu_table_L3.txt"/>
                <element name="4" file="summarize_taxa_through_plots/mapping/otu_table_L4.txt"/>
                <element name="5" file="summarize_taxa_through_plots/mapping/otu_table_L5.txt"/>
                <element name="6" file="summarize_taxa_through_plots/mapping/otu_table_L6.txt"/>
            </output_collection>
            <output_collection name="biom_otu_table" type="list">
                <element name="2" file="summarize_taxa_through_plots/mapping/otu_table_L2_json.biom" compare="sim_size" />
                <element name="3" file="summarize_taxa_through_plots/mapping/otu_table_L3_json.biom" compare="sim_size" />
                <element name="4" file="summarize_taxa_through_plots/mapping/otu_table_L4_json.biom" compare="sim_size" />
                <element name="5" file="summarize_taxa_through_plots/mapping/otu_table_L5_json.biom" compare="sim_size" />
                <element name="6" file="summarize_taxa_through_plots/mapping/otu_table_L6_json.biom" compare="sim_size" />
            </output_collection>
            <output name="bar_charts_html_report" file="summarize_taxa_through_plots/mapping/bar_charts.html" compare="sim_size" />
            <output name="area_charts_html_report" file="summarize_taxa_through_plots/mapping/area_charts.html" compare="sim_size" />
        </test>
        <test>
            <param name="otu_table_fp" value="summarize_taxa_through_plots/otu_table.biom"/>
            <conditional name="mapping">
                <param name="use_mapping" value="yes"/>
                <param name="mapping_fp" value="summarize_taxa_through_plots/Fasting_Map.txt"/>
                <param name="mapping_category" value="Treatment"/>
            </conditional>
            <output_collection name="otu_table" type="list">
                <element name="2" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L2.txt"/>
                <element name="3" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L3.txt"/>
                <element name="4" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L4.txt"/>
                <element name="5" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L5.txt"/>
                <element name="6" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L6.txt"/>
            </output_collection>
            <output_collection name="biom_otu_table" type="list">
                <element name="2" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L2_json.biom" compare="sim_size" />
                <element name="3" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L3_json.biom" compare="sim_size" />
                <element name="4" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L4_json.biom" compare="sim_size" />
                <element name="5" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L5_json.biom" compare="sim_size" />
                <element name="6" file="summarize_taxa_through_plots/mapping_categories/Treatment_otu_table_L6_json.biom" compare="sim_size" />
            </output_collection>
            <output name="bar_charts_html_report" file="summarize_taxa_through_plots/mapping_categories/bar_charts.html" compare="sim_size" />
            <output name="area_charts_html_report"  file="summarize_taxa_through_plots/mapping_categories/area_charts.html" compare="sim_size" />
        </test>
        <test>
            <param name="otu_table_fp" value="summarize_taxa_through_plots/otu_table.biom"/>
            <conditional name="mapping">
                <param name="use_mapping" value="yes"/>
                <param name="mapping_fp" value="summarize_taxa_through_plots/Fasting_Map.txt"/>
            </conditional>
            <param name="sort" value="--sort"/>
            <output_collection name="otu_table" type="list">
                <element name="2" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L2.txt"/>
                <element name="3" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L3.txt"/>
                <element name="4" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L4.txt"/>
                <element name="5" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L5.txt"/>
                <element name="6" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L6.txt"/>
            </output_collection>
            <output_collection name="biom_otu_table" type="list">
                <element name="2" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L2_json.biom" compare="sim_size" />
                <element name="3" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L3_json.biom" compare="sim_size" />
                <element name="4" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L4_json.biom" compare="sim_size" />
                <element name="5" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L5_json.biom" compare="sim_size" />
                <element name="6" file="summarize_taxa_through_plots/mapping_sort/otu_table_sorted_L6_json.biom" compare="sim_size" />
            </output_collection>
            <output name="bar_charts_html_report" file="summarize_taxa_through_plots/mapping_sort/bar_charts.html" compare="sim_size" />
            <output name="area_charts_html_report"  file="summarize_taxa_through_plots/mapping_sort/area_charts.html" compare="sim_size" />
        </test>
        <test>
            <param name="otu_table_fp" value="summarize_taxa_through_plots/otu_table.biom"/>
            <conditional name="mapping">
                <param name="use_mapping" value="no"/>
            </conditional>
            <output_collection name="otu_table" type="list">
                <element name="2" file="summarize_taxa_through_plots/without_mapping/otu_table_L2.txt"/>
                <element name="3" file="summarize_taxa_through_plots/without_mapping/otu_table_L3.txt"/>
                <element name="4" file="summarize_taxa_through_plots/without_mapping/otu_table_L4.txt"/>
                <element name="5" file="summarize_taxa_through_plots/without_mapping/otu_table_L5.txt"/>
                <element name="6" file="summarize_taxa_through_plots/without_mapping/otu_table_L6.txt"/>
            </output_collection>
            <output_collection name="biom_otu_table" type="list">
                <element name="2" file="summarize_taxa_through_plots/without_mapping/otu_table_L2_json.biom" compare="sim_size" />
                <element name="3" file="summarize_taxa_through_plots/without_mapping/otu_table_L3_json.biom" compare="sim_size" />
                <element name="4" file="summarize_taxa_through_plots/without_mapping/otu_table_L4_json.biom" compare="sim_size" />
                <element name="5" file="summarize_taxa_through_plots/without_mapping/otu_table_L5_json.biom" compare="sim_size" />
                <element name="6" file="summarize_taxa_through_plots/without_mapping/otu_table_L6_json.biom" compare="sim_size" />
            </output_collection>
            <output name="bar_charts_html_report" file="summarize_taxa_through_plots/without_mapping/bar_charts.html" compare="sim_size" />
            <output name="area_charts_html_report"  file="summarize_taxa_through_plots/without_mapping/area_charts.html" compare="sim_size" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

This tool summarizes OTU by Category (optional), summarizes taxonomy and plots
taxonomy summary.

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