Microbiome Data Is Compositional: Why a Taxon Can Appear to Rise When Nothing About It Changed

Microbiome Data Is Compositional: Why a Taxon Can Appear to Rise When Nothing About It Changed — Zetobit
Zetobit Bioinformatics Insight Series
BIOINFORMATICS INSIGHT SERIES Microbiome Data Is Compositional Why a taxon can appear to rise when nothing about it changed sample A (=100%) sample B (=100%) one taxon truly grew… …so the rest only appear to shrink Kanna Nandakumar, PhD · Zetobit

Microbiome Statistics

Microbiome Data Is Compositional: Why a Taxon Can Appear to Rise When Nothing About It Changed

A sequencer does not count how many bacteria are in a sample — it reports what fraction of the reads each taxon claimed. Those fractions are forced to sum to one, and that single constraint quietly manufactures correlations and abundance shifts that are artifacts of the arithmetic, not the biology.

A microbiome dataset looks like a table of counts: taxa down the rows, samples across the columns, a read count in every cell. It is tempting to treat those counts the way you would treat any measurement — compare them across groups, correlate them, run a t-test per taxon. That instinct is the source of a large fraction of irreproducible microbiome findings, and the reason is a property of the data so basic it is easy to look straight past.

The total number of reads in a sequencing run is set by the instrument, not by the biology. Microbiome datasets generated by high-throughput sequencing are compositional because they have an arbitrary total imposed by the instrument — the sequencer delivers a fixed budget of reads and divides it among whatever DNA was loaded.1 So a read count is not an absolute abundance; it is a share of a fixed pie. And the moment your measurements are shares of a fixed total, an entire branch of ordinary statistics stops behaving.

The constant-sum constraint, and what it forces

Formally, the features in a compositional sample carry a constant-sum constraint: they sum to a fixed total (100%), a constraint imposed because the sequencing instrument has an upper limit on the number of reads, which introduces dependence between features and creates spurious correlations.2 The dependence is not subtle once you see it: if the proportions must add to one, then any taxon that goes up must be exactly counterbalanced by others going down. They are not free to vary independently, because one degree of freedom has been removed by the constraint.

This has a precise consequence for correlation. With proportions constrained to a constant sum, the covariances among taxa are forced to carry a built-in negative bias — the sum of each taxon’s covariances with the others is pinned to the negative of its own variance:

j xij = 1  ⇒  ∑j≠k cov(xij, xik) = − var(xik)

In words: because the proportions sum to a constant, the correlations among taxa are pushed toward a negative trend even when the true underlying abundances are independent.3 A naive Pearson correlation on proportions will report taxa as inversely related for no reason other than that they are sharing a fixed pie. This is not a small-sample fluke — it was noted by Karl Pearson himself in 1897, and it is structural.

The interpretation trap

The correlation problem has a twin on the differential-abundance side, and it is the one most likely to produce a wrong headline finding. An increase in the relative abundance of one taxon does not necessarily indicate an absolute increase in that taxon; it can arise entirely from a decrease in other taxa — and from a compositional dataset alone it is impossible to distinguish a true biological response from this artifact.4

Consider a two-group study where one organism genuinely blooms — say it grows tenfold in the treatment group — while every other organism’s absolute abundance stays exactly the same. Because the proportions must renormalize to one, the bloom of that one taxon shrinks everyone else’s share. Run a per-taxon test on the proportions and you will find a long list of taxa “significantly decreased” in the treatment group. Not one of them changed. The only real event was the single bloom; the rest is the constraint redistributing the fixed pie. A reader of that results table sees a coordinated community shift where the biology contained a single event.

Absolute counts (truth) A B only teal changed — others identical Proportions (what you measure) A B all three others “decrease”
One real change, many false ones. On the left, a single taxon grows tenfold and the other three are untouched. On the right — the same samples as proportions — the grown taxon claims a bigger slice, so the three unchanged taxa show smaller slices and register as “significantly decreased.” A per-taxon test on proportions cannot tell this apart from three genuine declines.

Why the usual fixes don’t fix it

The common reflexes fail in instructive ways. Rarefying or converting to percentages does not help — it just makes the constant-sum constraint explicit; the compositional effect cannot be diluted away as has sometimes been recommended.1 Subsetting to a few taxa of interest is worse than neutral: compositional data exhibit spurious correlation upon subsetting or aggregation, so filtering to your favorite genera can create correlations that were not there in the full table.1 And a per-taxon t-test or Wilcoxon on proportions inherits the interpretation trap wholesale. The constraint is not a nuisance you can normalize away with a scaling factor; it changes the geometry of the data.

The principled route is to stop analyzing abundances and start analyzing ratios between them, because a ratio of two taxa is invariant to the total. This is the core of compositional data analysis (CoDa): log-ratio transformations — the centered log-ratio (CLR) and additive log-ratio (ALR) — re-express each sample relative to a reference (the geometric mean of all taxa, or a chosen taxon), which intrinsically eliminates the effect of the arbitrary sampling fraction by working within-sample in log-ratio space.5 Tools built on this idea — ALDEx2 and ANCOM being the best known — explicitly acknowledge the multivariate compositional nature of the data and control false positives far better than the usual per-taxon approaches.5 ALDEx2 goes further and models the measurement error from finite sequencing by drawing Monte Carlo samples from a Dirichlet distribution, so that low-count taxa are not treated as if their proportions were known exactly.5

Sequencing measures relative abundance, and relative abundance alone cannot answer an absolute question. If you truly need to know whether a taxon went up in the gut — not just up as a share of reads — the analysis cannot supply it; you need an external anchor: total microbial load by flow cytometry or qPCR, or a spike-in of known quantity. Log-ratio methods make the relative analysis honest; only absolute measurement makes it absolute.

What to do with a microbiome table

The practical discipline follows directly from taking compositionality seriously:

  • Treat counts as proportions from the start. The instrument total is arbitrary, so absolute read counts are not comparable across samples; only the composition is.1
  • Never trust a raw Pearson/Spearman correlation between taxa. The constant-sum constraint biases correlations negative even for independent taxa; use compositionally aware measures (e.g. proportionality, SparCC) instead.3
  • Use log-ratio-based differential abundance. ALDEx2, ANCOM/ANCOM-BC and related CoDa methods control false positives that per-taxon tests on proportions do not.5
  • Don’t rarefy or subset to escape the problem. Neither removes the constraint; subsetting can add spurious correlations of its own.1
  • Get an absolute anchor when the question is absolute. Total-load measurement or spike-ins are the only way to convert relative findings into statements about absolute abundance.4

Compositionality is the microbiome’s version of a theme that runs through this series: a number that looks like a direct measurement is actually a measurement relative to something arbitrary. A read count feels like an abundance the way a genome build feels like a ruler or a velocity arrow feels like a direction — and in each case the quiet error is forgetting what the number is actually relative to. For the microbiome the answer is always the same fixed pie, and every honest analysis begins by admitting it.

The Takeaway

Sequencing gives you shares of a fixed pie, not head counts — so before any statistic, ask what your numbers are relative to.

The trap: because taxa proportions must sum to one, one organism blooming forces every other to appear to fall. That single constraint biases correlations negative even for independent taxa and turns one real change into a long list of false “decreases” — and no standard t-test, rarefaction, or subsetting removes it.

The fix: analyze ratios, not abundances. Log-ratio methods (CLR/ALR) and the tools built on them — ALDEx2, ANCOM/ANCOM-BC — are compositionally honest where per-taxon tests are not.

The hard limit: relative data cannot answer an absolute question. If you need to know whether a taxon truly rose in the gut, add an external anchor — total microbial load by qPCR or flow cytometry, or a known spike-in. Everything else only tells you about shares.

References

  1. Gloor GB, Macklaim JM, Pawlowsky-Glahn V, Egozcue JJ. Microbiome datasets are compositional: and this is not optional. Frontiers in Microbiology. 2017;8:2224. frontiersin.org/articles/10.3389/fmicb.2017.02224
  2. Impact of data compositionality on the detection of microbiota responses. Gut Microbes / PMC. 2025. pmc.ncbi.nlm.nih.gov/articles/PMC12674323
  3. Statistical computation methods for microbiome compositional data network inference. arXiv. 2021;2109.01993. (Derivation of the negative correlation bias under the sum constraint.) arxiv.org/pdf/2109.01993
  4. Impact of data compositionality on the detection of microbiota responses (interpretation of relative vs absolute change). Gut Microbes. 2025. tandfonline.com/doi/full/10.1080/19490976.2025.2590841
  5. Gloor GB, Reid G. Compositional analysis: a valid approach to analyze microbiome high-throughput sequencing data. Canadian Journal of Microbiology. 2016;62(8):692–703. (On CLR/ALR, ALDEx2, ANCOM, and spurious correlation.) cdnsciencepub.com/doi/10.1139/cjm-2015-0821
© Zetobit LLC · Bioinformatics Insight Series zetobit.com
Previous
Previous

Genotype Imputation Quality: Why a High INFO Score Is Confidence, Not Correctness

Next
Next

Sample Swaps and Identity QC: Why the Cleanest VCF in Your Batch Can Belong to the Wrong Person