view kraken_taxonomy_report.xml @ 0:3f1a0d47ea8d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tools/kraken_taxonomy_report/ commit 1c0a7aff7c5f6578a11e6e8e9bface8d02e7f8a1
author iuc
date Wed, 01 Jun 2016 17:25:40 -0400
parents
children b97694b21bc3
line wrap: on
line source

<?xml version="1.0"?>
<tool id="kraken_taxonomy_report" name="Kraken taxonomic report" version="0.0.1">
    <description>view report of classification for multiple samples</description>
    <requirements>
        <requirement type="package" version="1.66">biopython</requirement>
    </requirements>
    <stdio>
        <exit_code range="1:" />
        <exit_code range=":-1" />
    </stdio>
    <version_command>python ${__tool_directory__}/kraken_taxonomy_report.py --version</version_command>
    <command>
<![CDATA[

#for $input_classification in $classification:
    ln -s "${input_classification}" "${input_classification.element_identifier}" &&
#end for

export KRAKEN_DB_PATH="${kraken_database.fields.path}" && 
python ${__tool_directory__}/kraken_taxonomy_report.py

--db "${kraken_database.fields.name}"
${show_zeros}
${header_line}
${otu_name}
${taxonomy}
${show_rank}
${intermediate}
${sanitize_names}
#if str( $cluster.cluster ):
    --cluster "${cluster.cluster}"
#else:
    ${cluster.summation}
#end if

--output "${output_report}"

#if $output_tree:
    --output-tree "${output_tree}"
#end if

#for $input_classification in $classification:
    "${input_classification.element_identifier}"
#end for

]]>
    </command>
    <inputs>
        <param format="tabular" label="Kraken output" multiple="True" name="classification" type="data" />
        <param checked="False" falsevalue="" argument="--show-zeros" label="Display taxa even if they lack a read in any sample" name="show_zeros" truevalue="--show-zeros" type="boolean" />
        <param checked="True" falsevalue="" argument="--header-line" label="Display a header line indicating sample IDs" name="header_line" truevalue="--header-line" type="boolean" />
        <param label="Select a Kraken database" name="kraken_database" type="select" help="Select the same database used to classify reads">
            <options from_data_table="kraken_databases">
                <validator message="No Kraken databases are available" type="no_options" />
            </options>
        </param>
        <param label="How to name OTUs" name="otu_name" type="select" multiple="False">
            <option value="" selected="True">Node name only</option>
            <option value="--name-long">Taxonified Name</option>
            <option value="--name-id">Node ID</option>
        </param>
        <param checked="True" falsevalue="" argument="--sanitize-names" label="Sanitize Names" name="sanitize_names" truevalue="--sanitize-names" type="boolean" help="Replace special chars (\t| |\||\.;) with underscore (_)" />
        <param checked="False" falsevalue="" argument="--show-rank" label="Output Rank Name in (second to) last column" name="show_rank" truevalue="--show-rank" type="boolean" />
        <param checked="False" falsevalue="" argument="--taxonomy" label="Output taxonomy in last column" name="taxonomy" truevalue="--taxonomy" type="boolean" />
        <param checked="False" falsevalue="" argument="--intermediate" label="Display intermediate ranks" name="intermediate" truevalue="--intermediate" type="boolean" />
        <conditional name="cluster">
            <param argument="--cluster" help="Combines rows under the selected taxon and reports only selected rank." label="Cluster by taxonomic rank" name="cluster" type="select">
                <option value="Superkingdom">Superkingdom</option>
                <option value="Kingdom">Kingdom</option>
                <option value="Subkingdom">Subkingdom</option>
                <option value="Superphylum">Superphylum</option>
                <option value="Phylum">Phylum</option>
                <option value="Subphylum">Subphylum</option>
                <option value="Superclass">Superclass</option>
                <option value="Class">Class</option>
                <option value="Subclass">Subclass</option>
                <option value="Infraclass">Infraclass</option>
                <option value="Superorder">Superorder</option>
                <option value="Order">Order</option>
                <option value="Suborder">Suborder</option>
                <option value="Infraorder">infraorder</option>
                <option value="Parvorder">Parvorder</option>
                <option value="Superfamily">Superfamily</option>
                <option value="Family">Family</option>
                <option value="Subfamily">Subfamily</option>
                <option value="Tribe">Tribe</option>
                <option value="Subtribe">Subtribe</option>
                <option value="Genus">Genus</option>
                <option value="Subgenus">Subgenus</option>
                <option value="Species Group">Species Group</option>
                <option value="Species Subgroup">Species Subgroup</option>
                <option value="Species">Species</option>
                <option value="Subspecies">Subspecies</option>
                <option value="Varietas">Varietas</option>
                <option value="Forma">Forma</option>
                <option value="" selected="True">No Clustering</option>
            </param>
            <when value="">
                <param checked="False" falsevalue="" argument="--summation" label="Summation of lower ranks into higher ranks" name="summation" truevalue="--summation" type="boolean" />
            </when>
            <when value="Superkingdom"/>
            <when value="Kingdom"/>
            <when value="Subkingdom"/>
            <when value="Superphylum"/>
            <when value="Phylum"/>
            <when value="Subphylum"/>
            <when value="Superclass"/>
            <when value="Class"/>
            <when value="Subclass"/>
            <when value="Infraclass"/>
            <when value="Superorder"/>
            <when value="Order"/>
            <when value="Suborder"/>
            <when value="Infraorder"/>
            <when value="Parvorder"/>
            <when value="Superfamily"/>
            <when value="Family"/>
            <when value="Subfamily"/>
            <when value="Tribe"/>
            <when value="Subtribe"/>
            <when value="Genus"/>
            <when value="Subgenus"/>
            <when value="Species Group"/>
            <when value="Species Subgroup"/>
            <when value="Species"/>
            <when value="Subspecies"/>
            <when value="Varietas"/>
            <when value="Forma"/>
        </conditional>
        <param checked="False" falsevalue="" label="Output a newick tree" name="tree" truevalue="true" type="boolean" help="Trees are pruned at specified rank when clustering"/>
    </inputs>
    <outputs>
        <data format="tabular" name="output_report" label="${tool.name} on ${on_string} (Abundances)"/>
        <data format="txt" name="output_tree" label="${tool.name} on ${on_string} (Newick Tree)">
            <filter>tree</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="classification" value="input_kraken_1.tabular" ftype="tabular"/>
            <param name="show_zeros" value="True"/>
            <param name="header_line" value="True"/>
            <param name="kraken_database" value="test_db"/>
            <param name="otu_name" value=""/>
            <param name="sanitize_names" value="True"/>
            <param name="show_rank" value="True"/>
            <param name="taxonomy" value="True"/>
            <param name="intermediate" value="True"/>
            <conditional name="cluster">
                <param name="cluster" value=""/>
                <param name="summation" value="True"/>
            </conditional>
            <param name="tree" value="True"/>
            <output name="output_report" file="output_abundance_1.tabular" ftype="tabular"/>
            <output name="output_tree" file="output_tree_1.newick" />
        </test>
        <test>
            <param name="classification" value="input_kraken_1.tabular" ftype="tabular"/>
            <param name="show_zeros" value="True"/>
            <param name="header_line" value="True"/>
            <param name="kraken_database" value="test_db"/>
            <param name="otu_name" value=""/>
            <param name="sanitize_names" value="True"/>
            <param name="show_rank" value="True"/>
            <param name="taxonomy" value="True"/>
            <param name="intermediate" value="True"/>
            <conditional name="cluster">
                <param name="cluster" value=""/>
                <param name="summation" value="False"/>
            </conditional>
            <param name="tree" value="True"/>
            <output name="output_report" file="output_abundance_2.tabular" ftype="tabular"/>
            <output name="output_tree" file="output_tree_1.newick" />
        </test>
        <test>
            <param name="classification" value="input_kraken_1.tabular" ftype="tabular"/>
            <param name="show_zeros" value="True"/>
            <param name="header_line" value="True"/>
            <param name="kraken_database" value="test_db"/>
            <param name="otu_name" value=""/>
            <param name="sanitize_names" value="True"/>
            <param name="show_rank" value="True"/>
            <param name="taxonomy" value="True"/>
            <param name="intermediate" value="False"/>
            <conditional name="cluster">
                <param name="cluster" value="Species"/>
            </conditional>
            <param name="tree" value="True"/>
            <output name="output_report" file="output_abundance_3.tabular" ftype="tabular"/>
            <output name="output_tree" file="output_tree_3.newick" />
        </test>
        <test>
            <param name="classification" value="input_kraken_1.tabular,input_kraken_2.tabular" ftype="tabular"/>
            <param name="show_zeros" value="True"/>
            <param name="header_line" value="True"/>
            <param name="kraken_database" value="test_db"/>
            <param name="otu_name" value=""/>
            <param name="sanitize_names" value="True"/>
            <param name="show_rank" value="True"/>
            <param name="taxonomy" value="True"/>
            <param name="intermediate" value="False"/>
            <conditional name="cluster">
                <param name="cluster" value="Species"/>
            </conditional>
            <param name="tree" value="True"/>
            <output name="output_report" file="output_abundance_4.tabular" ftype="tabular"/>
            <output name="output_tree" file="output_tree_3.newick" />
        </test>
    </tests>
    <help>
<![CDATA[

.. class:: warningmark

**Note**: the database used must be the same as the one used in the original Kraken run

-----

**What is Does**

Summarizes read counts across taxonomic ranks for multiple samples. This is convenient for comparing results across multiple experiments, conditions, locations, etc.

-----

**Output**

The output is tab-delimited, with one line per taxon.

Will optionally output a newick tree built from the kraken database taxonomy using the specified options. Tree branch lengths will be set to "1.00000".


]]>
    </help>
    <citations>
        <citation type="bibtex">@unpublished{Kraken-Taxonomy-Report:2016,
          title  = "Kraken Taxonomy Report",
          author = "Daniel Blankenberg",
          url    = "https://github.com/blankenberg/Kraken-Taxonomy-Report",
          year   = "2016 (accessed June 1, 2016)"
        }</citation>
    </citations>
</tool>