view kraken.xml @ 6:1496744bd2ad draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/blob/master/tool_collections/kraken/kraken/ commit 4782f9ad9bfe2479685ccaf51b66b0d32f83f193-dirty
author devteam
date Thu, 05 Nov 2015 10:10:05 -0500
parents bc918f32d4be
children 19939bfcf283
line wrap: on
line source

<?xml version="1.0"?>
<tool id="kraken" name="Kraken" version="1.1.2">
    <description>
        assign taxonomic labels to sequencing reads
    </description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <command>
        <![CDATA[
        @SET_DATABASE_PATH@ &&
        kraken --threads \${GALAXY_SLOTS:-1} @INPUT_DATABASE@ 
        
        ${only_classified_output}

        #if str( $quick_operation.quick ) == "yes":
            --quick
            --min-hits ${quick_operation.min_hits}

        #end if

        #if $single_paired.single_paired_selector == "yes":
            #if $forward_input.is_of_type( 'fastq' ):
                --fastq-input
            #else:
                --fasta-input
            #end if
            "$forward_input" "$reverse_input"
            ${single_paired.check_names}
        #elif $single_paired.single_paired_selector == "collection":
            #if $single_paired.input_pair.forward.is_of_type( 'fastq' ):
                --fastq-input
            #else:
                --fasta-input
            #end if
            "${single_paired.input_pair.forward}" "${single_paired.input_pair.reverse}"
            ${single_paired.check_names}
        #else:
            #if $input_sequences.is_of_type( 'fastq' ):
                --fastq-input
            #else:
                --fasta-input
            #end if
            "$input_sequences"
        #end if

        #if $split_reads:
            --classified-out "${classified_out}" --unclassified-out "${unclassified_out}"
        #end if
        --output "${output}"
        ##kraken-translate --db ${kraken_database.fields.name} "${output}" > "${translated}"
        ]]>
    </command>
    <inputs>
        <conditional name="single_paired">
            <param name="single_paired_selector" type="select" label="Single or paired reads" help="--paired">
                <option value="collection">Collection</option>
                <option value="yes">Yes</option>
                <option selected="True" value="no">No</option>
            </param>
            <when value="collection">
                <param format="fasta,fastq" label="Collection of paired reads" name="input_pair" type="data_collection" collection_type="paired" help="FASTA or FASTQ datasets" />
                <param name="check_names" type="boolean" checked="False" truevalue="--paired --check-names" falsevalue="--paired" label="Verify read names match" help="--check-names" />
            </when>
            <when value="yes">
                <param format="fasta,fastq" label="Forward strand" name="forward_input" type="data" help="FASTA or FASTQ dataset"/>
                <param format="fasta,fastq" label="Reverse strand" name="reverse_input" type="data" help="FASTA or FASTQ dataset"/>
                <param name="check_names" type="boolean" checked="False" truevalue="--paired --check-names" falsevalue="--paired" label="Verify read names match" help="--check-names" />
            </when>
            <when value="no">
                <param format="fasta,fastq" label="Input sequences" name="input_sequences" type="data" help="FASTA or FASTQ datasets"/>
            </when>

        </conditional>
        <param label="Output classified and unclassified reads?" name="split_reads" type="boolean" help="Sets --unclassified-out and --classified-out"/>
  
        <conditional name="quick_operation">
            <param name="quick" type="select" label="Enable quick operation?" help="--quick; Rather than searching all k-mers in a sequence, stop classification after a specified number of database hit">
                <option value="yes">Yes</option>
                <option selected="True" value="no">No</option>
            </param>
            <when value="yes">
                <param name="min_hits" type="integer" value="1" label="Number of hits required for classification" help="--min-hits; min-hits will allow you to require multiple hits before declaring a sequence classified, which can be especially useful with custom databases when testing to see if sequences either do or do not belong to a particular genome; default=1"/>
            </when>
            <when value="no">
                <!-- Do absolutely nothing -->
            </when>
        </conditional>

        <param name="only_classified_output" type="boolean" checked="False" truevalue="--only-classified-output" falsevalue="" label="Print no Kraken output for unclassified sequences" help="--only-classified-output"/>

        <expand macro="input_database" />
    </inputs>
    <outputs>
        <data format_source="input_sequences" label="${tool.name} on ${on_string}: Classified reads" name="classified_out">
            <filter>(split_reads)</filter>
        </data>
        <data format_source="input_sequences" label="${tool.name} on ${on_string}: Unclassified reads" name="unclassified_out">
            <filter>(split_reads)</filter>
        </data>
        <data format="tabular" label="${tool.name} on ${on_string}: Classification" name="output" />
        <!--<data format="tabular" label="${tool.name} on ${on_string}: Translated classification" name="translated" />-->
    </outputs>
    <help>
        <![CDATA[
**What it does**

Kraken is a taxonomic sequence classifier that assigns taxonomic labels to short DNA reads. It does this by examining the k-mers within a read and querying a database with those k-mers. This database contains a mapping of every k-mer in Kraken's genomic library to the lowest common ancestor (LCA) in a taxonomic tree of all genomes that contain that k-mer. The set of LCA taxa that correspond to the k-mers in a read are then analyzed to create a single taxonomic label for the read; this label can be any of the nodes in the taxonomic tree. Kraken is designed to be rapid, sensitive, and highly precise.

-----

**Kraken options**

The Galaxy version of Kraken implements the following options::

        
  --fasta-input             Input is FASTA format
  --fastq-input             Input is FASTQ format
  --quick                   Quick operation (use first hit or hits)
  --min-hits NUM            In quick op., number of hits req'd for classification
                            NOTE: this is ignored if --quick is not specified
  --unclassified-out        Print unclassified sequences to filename
  --classified-out          Print classified sequences to filename

  --only-classified-output  Print no Kraken output for unclassified sequences
                          
------

**Output Format**

Each sequence classified by Kraken results in a single line of output. Output lines contain five tab-delimited fields; from left to right, they are::

    1. "C"/"U": one letter code indicating that the sequence was either classified or unclassified.
    2. The sequence ID, obtained from the FASTA/FASTQ header.
    3. The taxonomy ID Kraken used to label the sequence; this is 0 if the sequence is unclassified.
    4. The length of the sequence in bp.
    5. A space-delimited list indicating the LCA mapping of each k-mer in the sequence. For example, "562:13 561:4 A:31 0:1 562:3" would indicate that:
            a) the first 13 k-mers mapped to taxonomy ID #562
            b) the next 4 k-mers mapped to taxonomy ID #561
            c) the next 31 k-mers contained an ambiguous nucleotide
            d) the next k-mer was not in the database
            e) the last 3 k-mers mapped to taxonomy ID #562
        ]]>
    </help>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <expand macro="citations" />
</tool>