Shotgun metagenomics · illustrated

Two ways to name what is in a sample

Give the same shotgun metagenome to MetaPhlAn and to Kraken and you get two tables that disagree — on which taxa are present, on their abundances, and on what "abundance" even means. Neither is broken. They are answering different questions with different evidence, and the version of each that you ran changes the answer again.

This site is about those differences: what each family of method actually does, what every version changed, and how to tell whether two results are comparable. There are also six games.

The two paradigms

Everything downstream follows from one design decision: do you compare reads against a small set of chosen marker genes, or against every base of every reference genome you have?

shotgun reads host · vectors · unknowns marker genes · MetaPhlAn a few clade-specific genes per genome 2 of 9 reads used everything else is discarded, by design buys small DB · fast · estimates cell fraction costs no markers → invisible taxon most reads unused every k-mer · Kraken every base of every reference genome 7 of 9 reads labelled, some only to phylum nothing curated away — the DB is the whole collection buys every read gets a shot at a label plasmids, phage, higher-rank fallback costs large DB · inherits its contamination reads ≠ cells until corrected fraction of cells ≠ fraction of reads

Why the version matters more here than almost anywhere else

Both tool families made a change between major versions that alters what the output means, not merely how accurate it is. If you are comparing your results against a published study, or against your own results from two years ago, these are the changes that invalidate the comparison.

MetaPhlAn 3 → 4

Version 3 profiled named species using markers drawn from reference genomes. Version 4 profiles species-level genome bins — including thousands of unknown SGBs assembled from metagenomes that have no name and no isolate. The rows in your table are no longer the same kind of object. → In detail

Kraken 1 → 2

Version 1 stored every k-mer exactly. Version 2 stores minimizers in a compact, probabilistic hash table, which is what makes it fast and small — and introduces a small rate of hash-collision false positives that the confidence threshold exists to control. → In detail

The result that reframes the whole question

Wright, Comeau and Langille (Microbial Genomics, 2023) titled their paper "From defaults to databases: parameter and database choice dramatically impact the performance of metagenomic taxonomic classification tools" — and that is the finding. Which reference database you point the tool at, and which non-default parameters you set, move the results more than which tool you picked. "We used Kraken2" is not a method. The database and the confidence threshold are the method.

What is on this site

  1. MetaPhlAn 3 versus 4 Markers and ChocoPhlAn, what an SGB is, the known/unknown split, the database version strings, and how to compare a version 3 table with a version 4 one.
  2. Kraken 1, 2, KrakenUniq and Bracken The LCA algorithm animated, what minimizers and spaced seeds actually do, the confidence score and why its default is zero, distinct-minimizer counts as a false-positive filter, and what Bracken re-estimates.
  3. Head to head Where the two disagree and why, the unknown fraction, and how to make a defensible comparison if you have to make one.
  4. The version matrix Every version, what it changed, and a comparability verdict for each change.
  5. Six games Click the lowest common ancestor before the clock runs out; tell a real taxon from a hash-collision artefact; choose a tool and database for a study that punishes the wrong one.