Mercurial > repos > devteam > kraken_filter
changeset 2:317726be0703 draft
planemo upload for repository https://github.com/galaxyproject/tools-devteam/blob/master/tool_collections/kraken/kraken_filter/ commit cb6ebb843c71dcfc73aa05cc616f8e3229170108-dirty
author | devteam |
---|---|
date | Wed, 15 Jul 2015 15:22:22 -0400 |
parents | f093ba52debe |
children | 7fb926851f66 |
files | README.md README.rst kraken-filter.xml tool_dependencies.xml |
diffstat | 4 files changed, 115 insertions(+), 102 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Tue May 19 16:42:21 2015 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -Introduction -============ - -[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. Our -tests on various real and simulated data have shown [Kraken] to have -sensitivity slightly lower than Megablast with precision being slightly -higher. On a set of simulated 100 bp reads, [Kraken] processed over 1.3 -million reads per minute on a single core in normal operation, and over -4.1 million reads per minute in quick operation. - -The latest released version of Kraken will be available at the -[Kraken website], and the latest updates to the Kraken source code -are available at the [Kraken GitHub repository]. - -If you use [Kraken] in your research, please cite the [Kraken paper]. -Thank you! - -[Kraken]: http://ccb.jhu.edu/software/kraken/ -[Kraken website]: http://ccb.jhu.edu/software/kraken/ -[Kraken paper]: http://genomebiology.com/2014/15/3/R46 -[Kraken GitHub repository]: https://github.com/DerrickWood/kraken - - -System Requirements -=================== - -Note: Users concerned about the disk or memory requirements should -read the paragraph about MiniKraken, below. - -* **Disk space**: Construction of Kraken's standard database will require at - least 160 GB of disk space. Customized databases may require - more or less space. Disk space used is linearly proportional - to the number of distinct $k$-mers; as of Feb. 2015, Kraken's - default database contains just under 6 billion (6e9) distinct $k$-mers. - - In addition, the disk used to store the database should be - locally-attached storage. Storing the database on a network - filesystem (NFS) partition can cause Kraken's operation to be - very slow, or to be stopped completely. As NFS accesses are - much slower than local disk accesses, both preloading and database - building will be slowed by use of NFS. - -* **Memory**: To run efficiently, Kraken requires enough free memory to - hold the database in RAM. While this can be accomplished using a - ramdisk, Kraken supplies a utility for loading the database into - RAM via the OS cache. The default database size is 75 GB (as of - Feb. 2015), and so you will need at least that much RAM if you want - to build or run with the default database. - -* **Dependencies**: Kraken currently makes extensive use of Linux utilities - such as sed, find, and wget. Many scripts are written using the - Bash shell, and the main scripts are written using Perl. Core - programs needed to build the database and run the classifier are - written in C++, and need to be compiled using g++. Multithreading - is handled using OpenMP. Downloads of NCBI data are performed by - wget and in some cases, by rsync. Most Linux systems that have any - sort of development package installed will have all of the above - listed programs and libraries available. - - Finally, if you want to build your own database, you will need to - install the [Jellyfish] $k$-mer counter. Note that Kraken only - supports use of Jellyfish version 1. Jellyfish version 2 is not - yet compatible with Kraken. - -* **Network connectivity**: Kraken's standard database build and download - commands expect unfettered FTP and rsync access to the NCBI FTP - server. If you're working behind a proxy, you may need to set - certain environment variables (such as `ftp_proxy` or `RSYNC_PROXY`) - in order to get these commands to work properly. - -* **MiniKraken**: To allow users with low-memory computing environments to - use Kraken, we supply a reduced standard database that can be - downloaded from the Kraken web site. When Kraken is run with a - reduced database, we call it MiniKraken. - - The database we make available is only 4 GB in size, and should - run well on computers with as little as 8 GB of RAM. Disk space - required for this database is also only 4 GB. - -[Jellyfish]: http://www.cbcb.umd.edu/software/jellyfish/ \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Wed Jul 15 15:22:22 2015 -0400 @@ -0,0 +1,92 @@ +Introduction +============ + +`Kraken <http://ccb.jhu.edu/software/kraken/>`__ is a taxonomic sequence +classifier that assigns taxonomic labels to short DNA reads. It does +this by examining the :math:`k`-mers within a read and querying a +database with those :math:`k`-mers. This database contains a mapping of +every :math:`k`-mer in +`Kraken <http://ccb.jhu.edu/software/kraken/>`__'s genomic library to +the lowest common ancestor (LCA) in a taxonomic tree of all genomes that +contain that :math:`k`-mer. The set of LCA taxa that correspond to the +:math:`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 <http://ccb.jhu.edu/software/kraken/>`__ is designed to be +rapid, sensitive, and highly precise. Our tests on various real and +simulated data have shown +`Kraken <http://ccb.jhu.edu/software/kraken/>`__ to have sensitivity +slightly lower than Megablast with precision being slightly higher. On a +set of simulated 100 bp reads, +`Kraken <http://ccb.jhu.edu/software/kraken/>`__ processed over 1.3 +million reads per minute on a single core in normal operation, and over +4.1 million reads per minute in quick operation. + +The latest released version of Kraken will be available at the `Kraken +website <http://ccb.jhu.edu/software/kraken/>`__, and the latest updates +to the Kraken source code are available at the `Kraken GitHub +repository <https://github.com/DerrickWood/kraken>`__. + +If you use `Kraken <http://ccb.jhu.edu/software/kraken/>`__ in your +research, please cite the `Kraken +paper <http://genomebiology.com/2014/15/3/R46>`__. Thank you! + +System Requirements +=================== + +Note: Users concerned about the disk or memory requirements should read +the paragraph about MiniKraken, below. + +- **Disk space**: Construction of Kraken's standard database will + require at least 160 GB of disk space. Customized databases may + require more or less space. Disk space used is linearly proportional + to the number of distinct :math:`k`-mers; as of Feb. 2015, Kraken's + default database contains just under 6 billion (6e9) distinct + :math:`k`-mers. + + In addition, the disk used to store the database should be + locally-attached storage. Storing the database on a network + filesystem (NFS) partition can cause Kraken's operation to be very + slow, or to be stopped completely. As NFS accesses are much slower + than local disk accesses, both preloading and database building will + be slowed by use of NFS. + +- **Memory**: To run efficiently, Kraken requires enough free memory to + hold the database in RAM. While this can be accomplished using a + ramdisk, Kraken supplies a utility for loading the database into RAM + via the OS cache. The default database size is 75 GB (as of Feb. + 2015), and so you will need at least that much RAM if you want to + build or run with the default database. + +- **Dependencies**: Kraken currently makes extensive use of Linux + utilities such as sed, find, and wget. Many scripts are written using + the Bash shell, and the main scripts are written using Perl. Core + programs needed to build the database and run the classifier are + written in C++, and need to be compiled using g++. Multithreading is + handled using OpenMP. Downloads of NCBI data are performed by wget + and in some cases, by rsync. Most Linux systems that have any sort of + development package installed will have all of the above listed + programs and libraries available. + + Finally, if you want to build your own database, you will need to + install the + `Jellyfish <http://www.cbcb.umd.edu/software/jellyfish/>`__ + :math:`k`-mer counter. Note that Kraken only supports use of + Jellyfish version 1. Jellyfish version 2 is not yet compatible with + Kraken. + +- **Network connectivity**: Kraken's standard database build and + download commands expect unfettered FTP and rsync access to the NCBI + FTP server. If you're working behind a proxy, you may need to set + certain environment variables (such as ``ftp_proxy`` or + ``RSYNC_PROXY``) in order to get these commands to work properly. + +- **MiniKraken**: To allow users with low-memory computing environments + to use Kraken, we supply a reduced standard database that can be + downloaded from the Kraken web site. When Kraken is run with a + reduced database, we call it MiniKraken. + + The database we make available is only 4 GB in size, and should run + well on computers with as little as 8 GB of RAM. Disk space required + for this database is also only 4 GB. + +
--- a/kraken-filter.xml Tue May 19 16:42:21 2015 -0400 +++ b/kraken-filter.xml Wed Jul 15 15:22:22 2015 -0400 @@ -1,6 +1,6 @@ -<tool id="kraken-filter" name="Filter Kraken" version="1.0.0"> +<tool id="kraken-filter" name="Kraken-filter" version="1.1.0"> <description> - by confidence score + filter classification by confidence score </description> <macros> <import>macros.xml</import> @@ -12,8 +12,8 @@ ]]> </command> <inputs> - <param format="tabular" label="Kraken classified output" name="input" type="data" /> - <param label="Confidence threshold" max="1" min="0" name="threshold" type="float" value="0" /> + <param format="tabular" label="Kraken output" name="input" type="data" help="Select taxonomy classification produced by kraken"/> + <param label="Confidence threshold" max="1" min="0" name="threshold" type="float" value="0" help="--threshold; A number between 0 and 1; default=0"/> <expand macro="input_database" /> </inputs> <outputs> @@ -22,18 +22,27 @@ <help> <![CDATA[ -***Note that the database used must be the same as the one used to generate -the output file, or the report script may encounter problems.*** +.. class:: warningmark + +**Note**: the database used must be the same as the one used in the original Kraken run -A sequence label's score is a fraction C/Q, where C is the number of k-mers mapped to LCA values in the clade rooted at the label, and Q is the number of k-mers in the sequence that lack an ambiguous nucleotide (i.e., they were queried against the database). Consider the example of the LCA mappings in Kraken's output given earlier: +----- + +**What it does** + +At present, we have not yet developed a confidence score with a solid probabilistic interpretation for Kraken. However, we have developed a simple scoring scheme that has yielded good results for us, and we've made that available in the kraken-filter script. The approach we use allows a user to specify a threshold score in the [0,1] interval; the ``kraken-filter`` script then will adjust labels up the tree until the label's score (described below) meets or exceeds that threshold. If a label at the root of the taxonomic tree would not have a score exceeding the threshold, the sequence is called unclassified by ``kraken-filter``. -"562:13 561:4 A:31 0:1 562:3" would indicate that: +A sequence label's score is a fraction C/Q, where C is the number of k-mers mapped to LCA values in the clade rooted at the label, and Q is the number of k-mers in the sequence that lack an ambiguous nucleotide (i.e., they were queried against the database). Consider the example of the LCA mappings in Kraken's output:: + + 562:13 561:4 A:31 0:1 562:3 + +would indicate that:: - the first 13 k-mers mapped to taxonomy ID #562 - the next 4 k-mers mapped to taxonomy ID #561 - the next 31 k-mers contained an ambiguous nucleotide - the next k-mer was not in the database - the last 3 k-mers mapped to taxonomy ID #562 + the first 13 k-mers mapped to taxonomy ID #562 + the next 4 k-mers mapped to taxonomy ID #561 + the next 31 k-mers contained an ambiguous nucleotide + the next k-mer was not in the database + the last 3 k-mers mapped to taxonomy ID #562 In this case, ID #561 is the parent node of #562. Here, a label of #562 for this sequence would have a score of C/Q = (13+3)/(13+4+1+3) = 16/21. A label of #561 would have a score of C/Q = (13+4+3)/(13+4+1+3) = 20/21. If a user specified a threshold over 16/21, kraken-filter would adjust the original label from #562 to #561; if the threshold was greater than 20/21, the sequence would become unclassified. ]]>
--- a/tool_dependencies.xml Tue May 19 16:42:21 2015 -0400 +++ b/tool_dependencies.xml Wed Jul 15 15:22:22 2015 -0400 @@ -1,6 +1,6 @@ <?xml version="1.0"?> <tool_dependency> <package name="kraken" version="0.10.5"> - <repository changeset_revision="e79fee8f87fa" name="package_kraken_0_10_5" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" /> + <repository changeset_revision="3525db901c16" name="package_kraken_0_10_5" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" /> </package> </tool_dependency>