Improved metagenomic analysis with Kraken 2
Abstract
Although Krakens k-mer-based approach provides fast taxonomic classification of metagenomic sequence data, its large memory requirements can be limiting for some applications. Kraken 2 improves upon Kraken 1 by reducing memory usage by 85%, allowing greater amounts of reference genomic data to be used, while maintaining high accuracy and increasing speed five-fold. Kraken 2 also introduces a translated search mode, providing increased sensitivity in viral metagenomics analysis.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 7,156
- FWCI
- 145.11
- Field percentile
- top 1%
- Organism
- Assay
- Research Focus
- Approach
In-depth summary
Claude Opus 5.5 · max effort · 8 Nov 2026 · from the full text (7 Sept 2019) · CC0 1.0
Kraken 2's minimizer-keyed compact hash table cuts memory 85% versus Kraken 1 and classifies over 5 times faster with comparable accuracy; translated search boosts viral sensitivity.
Kraken 1's table of k-mer/lowest-common-ancestor (LCA) pairs can exceed 100 GB of memory, especially with large eukaryotic genomes, forcing users onto the reduced-sensitivity MiniKraken database or many partial indexes. Kraken 2 shrinks the index so six to seven times more reference data can be used than with Kraken 1, while speeding classification, adding amino-acid translated search and keeping Bracken compatibility.
Key results
ShownIndexing only minimizers in a compact hash table with 32-bit cells, instead of Kraken 1's 96-bit k-mer/LCA records, cuts database and classification memory by about 85%.
For a 9.1 Gbp reference, classification used 10.6 GB vs 72.4 GB for Kraken 1; memory was 15% of Kraken 1's and 2.5 times that of Centrifuge, the leanest tool. Distinct k-mers ≈3.1 times distinct minimizers; full strain-exclusion set: 10.456 GB hash table vs 68.901 GB Kraken 1 database.kdb (ratio 0.152). · Abstract; Compact hash table; Evaluation of database sizes of Kraken 1 and…
ShownKraken 2 was the fastest classifier tested: only distinct query minimizers trigger hash-table probes, and moving most input parsing out of the critical section improves multithreaded scaling.
With 16 threads on 25 million simulated paired-end fragments (inputs on a RAM filesystem), Kraken 2 exceeded 93 million reads per minute, more than 5 times the speed of second-ranked Kraken 1. Tests at 1, 4 and 16 threads showed better speedup than Kraken 1, most clearly with paired-end input. · Abstract; Parsing of input files; Execution of strain exclusion experiments; Evaluation of thread scaling efficiency
ShownWith source strains withheld from a shared reference, Kraken 2 matched and often beat the per-read accuracy of other nucleotide classifiers, and on real isolate data its genus-level agreement with sample labels was similar to theirs.
Strain exclusion: 40 prokaryotic and 10 viral genomes withheld; genus-rank sensitivity, positive predictive value and F1 on 1000 fragments per genome (50,000 total) vs Centrifuge, CLARK, Kraken 1 and KrakenUniq. FDA-ARGOS: 25 Illumina runs (250,000 paired-end fragments, PRJNA231221), genus-level concordance similar to other nucleotide tools. · Abstract; Execution of strain exclusion experiments; Evaluation of accuracy in strain exclusion…; FDA-ARGOS experimental concordance evaluation
ShownKraken 2X, which matches six-frame read translations in a 16-letter reduced amino acid alphabet against protein minimizers, approaches Kaiju's accuracy at lower cost, and translated search beats nucleotide search on divergent viral reads.
Both translated classifiers (Kraken 2X, Kaiju) were more accurate than nucleotide tools on reads from the 10 withheld viral genomes. Kraken 2X accuracy was similar to but slightly below Kaiju's while running over 3 times faster with 47% less memory; on FDA-ARGOS runs it agreed somewhat less with isolate labels than Kaiju. · Abstract; Translated search
SuggestedKraken 2 output stays compatible with Bracken, and Bayesian re-estimation of genus and species read abundances was more accurate from Kraken 2 than from Kraken 1 classifications even though the true strains were absent.
Prokaryotic strain-exclusion reads only (viral reads excluded); error scored as mean absolute percentage error over n = 40 species and genera, each with 1000 true reads. Bracken recovered most true genus- and species-level abundances from both Kraken versions and ran in less than 1 s. · Abstract; Bracken experiments on strain exclusion data
Methods, data and reproducibility
Kraken 2 maps spaced-seed-masked canonical minimizers (defaults k = 35, ℓ = 31, s = 7) to lowest-common-ancestor taxa in a compact hash table of 32-bit cells, with a six-frame translated protein mode (Kraken 2X). Both were benchmarked against Kraken 1, KrakenUniq, CLARK, Centrifuge and Kaiju on strain-excluded simulated reads and FDA-ARGOS data.
- NCBI archaeal, bacterial and viral reference genomes, proteins and taxonomy (January 2018) with the 50 strains of origin removed, used to build all classifier databases · archaea, bacteria and viruses
- Mason 2-simulated 100-bp paired-end Illumina reads from 40 prokaryotic and 10 viral strains, each having at least 2 sister subspecies and 2 sister species in the reference · prokaryotes and viruses · n = 500,000 fragments per strain; 1000 per strain for accuracy · 10.5281/zenodo.3520278 (simulation and benchmark code archive)
- FDA-ARGOS isolate runs from the NCBI Sequence Read Archive (SRA), limited to HiSeq 4000 151-bp reads, 1 experiment per genus, reservoir-sampled to 10,000 paired-end fragments each · microbial isolates (multiple genera) · n = 25 of 1392 experiments; 250,000 paired-end fragments · PRJNA231221
- Collision-rate test set: a bacterial reference genome, eight genomes at increasing taxonomic distance (species to phylum) and a uniformly random synthetic genome · bacteria; synthetic random DNA · n = nine genomes plus a 4 Mbp random sequence
- Methods & tools
- Kraken 2 v2.0.8 with translated mode Kraken 2X, Kraken 1.1.1, KrakenUniq 0.5.6, CLARK 1.2.4 (genus-rank database), Centrifuge 1.0.3-beta, Kaiju 1.5.0, Bracken, Mason 2 (mason_simulator), NCBI dustmasker and segmasker, MurmurHash3 finalization function, Solis 15-character reduced amino acid alphabet, NCBI taxonomy; GRCh38 and UniVec_Core in the default database
- Reagents & environment
- Kraken 2 v2.0.8 (MIT License) compared with Kaiju 1.5.0, Centrifuge 1.0.3-beta, CLARK 1.2.4, KrakenUniq 0.5.6 and Kraken 1.1.1; reads from Mason 2 with default error rates; NCBI genomes, proteins and taxonomy downloaded January 2018.
- Assay conditions & compute
- Server with 244 GB RAM and 32 Xeon 2.3 GHz CPUs (16 hyperthreaded cores); 16-thread runs pinned with taskset, reads and databases on a RAM filesystem; wall time and peak resident memory from /usr/bin/time -v.
- Reproducibility gaps
- Strain-exclusion data are described as downloadable and code as on GitHub, but no URLs are printed; only Zenodo DOIs 10.5281/zenodo.3520278 (experiment code) and 10.5281/zenodo.3520272 (Kraken 2 v2.0.8) appear.
Limitations (6)
- The compact hash table costs some specificity and accuracy: truncated hash codes can create false hits or less specific LCAs (under 1% at the default 70% load; 0.016% in a random-sequence test), tables cannot be resized, and optional hash subsampling further lowers accuracy. · stated by the authors
- For some genomes Kraken 2 missed correct species calls for a large share of reads despite sister strains in the reference, giving wrong species or genus-or-higher labels where taxa such as Shigella, Bacillus and Pseudomonas share high genomic identity; a phylogeny-based taxonomy may help. · stated by the authors
- Nucleotide classifiers, Kraken 2 included, had low sensitivity on the divergent simulated viral reads, so viral reads were excluded from the Bracken evaluation; viral taxonomy also groups some species without regard to ancestry or sequence similarity. · stated by the authors
- Real FDA-ARGOS runs lack per-read ground truth (reference divergence, poor runs or contamination may explain disagreements), so only genus-level concordance with SRA labels was reported, not sensitivity or positive predictive value. · stated by the authors
- Defaults (k = 35, ℓ = 31, s = 7) were picked from parameter sweeps on the same strain-exclusion data used for the cross-tool comparison, a possible optimistic bias, though many settings gave near-optimal accuracy. · noted in this summary
- No real community metagenome was benchmarked: accuracy rests on a simulated 50-strain read mixture (Mason 2 default errors, 0.4% mismatches) and single-isolate FDA-ARGOS HiSeq 4000 151-bp runs, so other platforms and long reads are untested. · noted in this summary
Who should read:Read this if you classify metagenomic reads on memory-limited hardware, need translated search for divergent viral reads, or want a strain-exclusion design for benchmarking taxonomic classifiers.
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Metagenomic classification with KrakenUniq on low-memory computers
Christopher Pockrandt, Aleksey V. Zimin, Steven L. Salzberg·The Journal of Open Source SoftwarePeer-reviewed·Dec 28, 2022
- From defaults to databases: parameter and database choice dramatically impact the performance of metagenomic taxonomic classification tools
Robyn Wright, A. Comeau, Morgan G. I. Langille·Microbial GenomicsPeer-reviewed·Mar 3, 2023
- Ultrafast and accurate 16S microbial community analysis using Kraken 2
Jennifer Lu, Steven L. Salzberg·MicrobiomePeer-reviewed·Aug 28, 2020
- kASA: Taxonomic Analysis of Metagenomic Data on a Notebook
Silvio Weging, Andreas Gogol‐Döring, Ivo Große·Nucleic Acids ResearchPeer-reviewed·Mar 10, 2021
- KrakenHLL: Confident and fast metagenomics classification using unique k-mer counts
Florian P. Breitwieser, Daniel N. Baker, Steven L. Salzberg·Genome biologyPeer-reviewed·Nov 16, 2018
- Improving Metagenomic Classification using Discriminative k-mers from Sequencing Data
Davide Storato, Matteo Comin·Lecture notes in computer sciencePeer-reviewed·Jan 1, 2020