Alpha diversity

Diversity within a single sample

Alpha diversity

Measures diversity within a single sample

Captures two key aspects:

  • Richness: how many unique species are present
  • Evenness: how evenly distributed they are

Counting richness and evenness

Coloured dots in a field are sorted into a box, with one column per species, to count richness and evenness

Richness versus evenness

Three circles with coloured dots illustrating high richness with low evenness, low richness with high evenness, and high richness with high evenness

Finite sampling

Cartoon of a sequencer sampling only some of the DNA fragments in a pool

Applications

Alpha diversity, ageing and body-mass index across the life span.

Scatter plot of Shannon diversity against age with low-diversity samples circled

Applications

Screenshot of Koenen et al. 2021 showing associations of food scores with alpha and beta diversity

Richness

\[ R = \text{Number of unique species} \]

Observed richness

  • Counting the number of unique species

True richness to be estimated based on a finite sample (Sanders, 1968)

  • Chao1: more sensitive to sampling effort
  • ACE: more stable, emphasizes information from rare taxa

Shannon diversity

\[ H' = - \sum_{i=1}^{R} p_i \log(p_i) \]

where:

  • \(p_i\) = relative abundance of species \(i\)
  • \(R\) = total number of species

Combines richness and evenness in one metric.

Pielou’s evenness

\[ E = \frac{Shannon\ diversity}{ln(Obs.\ Richness)} = \frac{H}{ln(S)}\]

Berger-Parker dominance

Maximum relative abundance in the sample; or relative abundance \(p_i\) of the most abundant type.

\[ max_i (p_i) \]

Simpson’s dominance index

Simpson index \(\lambda\) measures how likely two randomly picked individuals represent the same species.

\[\lambda = \sum_{i=1}^{R} p_i^2\]

where:

  • \(p_i\) = relative abundance of species \(i\)
  • \(R\) = richness, or the number of unique species

Simpson’s diversity?

However, the original Simpson index \(\lambda\) decreases with diversity. Therefore we typically use:

  • Inverse Simpson: \(1 / \lambda\) (the most common case of Simpson’s diversity)
  • Reciprocal Simpson (or Gini-Simpson): \(1 - \lambda\)

Hill’s diversity: a unifying concept

True diversity, the effective number of types, refers to the number of equally abundant types needed for the average proportional abundance of the types to equal what is observed in the dataset of interest.

\[ ^qD = \frac{1}{M_{q-1}} = (\sum_{i=1}^R p_i^q)^\frac{1}{1-q}, \]

where (again)

  • \(p_i\) is relative abundance of species \(i\),
  • \(R\) is the richness (number of species)
  • \(q^D\) is the Hill number of order \(q\), the effective number of species
  • Denominator \(M_{q-1}\): average relative abundance, with weighted generalized mean with exponent \(q − 1\).

Hill’s diversity: a unifying concept

Common diversity measures are special cases:

  • \(q = 0\): Observed Richness
  • \(q = 1\): Shannon diversity
  • \(q = 2\): (Inverse) Simpson diversity
  • \(q ≠ 1\): Renyi entropy
  • \(q = \infty\): \(\frac{1}{{^{\infty}}D}\): Berger-Parker index

Faith phylogenetic diversity

Faith index incorporates phylogenetic differences (tree) to diversity: sum of branch lengths in a phylogenetic tree that connects all species present in a sample.

A random phylogenetic tree with the species present in a sample marked in red, and the same tree with branch lengths that contribute to Faith's PD highlighted

Faith phylogenetic diversity

Phylogenetic diversity provides increased statistical power to differentiate age groups in shotgun metagenomics but not in 16S rRNA sequencing.

Statistical power against sample size for Faith PD and observed features in 16S and metagenomics data

Faith phylogenetic diversity

Phylogenetic tree colored by age-group log of the likelihood ratio of older to younger adults per node.

Faith's PD by age group as boxplots (A) and a circular phylogenetic tree coloured by likelihood of enrichment in older versus younger adults (B)

(A) Distribution of Faith’s PD by age group on the full data set.

(B) Web of Life (WoL) phylogenetic tree, branches colored by log likelihood of old vs. young adults (FINRISK cohort).

Fast Faith implementation

Efficient computation of Faith’s phylogenetic diversity with applications in characterizing microbiomes.

TreeSE (gray) versus phyloseq (black)

Execution time and allocated memory against number of samples for family agglomeration and Faith diversity; TreeSE in gray and phyloseq in black

Recommendation

Guidelines for alpha diversity, to capture complementary views: Cassol et al. (2025)

  • Richness: number of observed unique species
  • Dominance: Berger-Parker
  • Information: Shannon
  • Phylogenetics: Faith

Demonstration

library(mia)
tse <- addAlpha(tse)

library(mia)
tse <- addAlpha(tse)

library(miaViz)
plotBoxplot(tse, col.var = "faith_diversity", x = "patient_status") +
    labs(x = "Diagnosis", y = "Faith's diversity")
Boxplot of Faith's diversity by diagnosis (ADHD versus control) in the Tengeler2020 data

Exercises

OMA online book, Chapter 13: Alpha diversity

microbiome.github.io/OMA › Alpha diversity

Exercises 1.2, 1.3, 1.4, 1.9, 1.10

Metacommunity and total richness

Screenshot of the paper presenting the unified catalog of 204,938 reference genomes from the human gut microbiome

Detecting species in metagenomics

Schematic of genome binning from metagenomic reads and a PCA of binned contigs for a mock community

On reference databases

Screenshots of papers on the GTDB bacterial taxonomy and on correcting index databases for metagenomic studies

References

Cassol, Ignacio, Mauro Ibañez, and Juan Pablo Bustamante. 2025. “Key Features and Guidelines for the Application of Microbial Alpha Diversity Metrics.” Scientific Reports 15 (1). https://doi.org/10.1038/s41598-024-77864-y.

Screenshot of the abstract of a PubMed Central article on the microbiota-gut-brain axis and medication response

Beta diversity revisited

Ordination plots: PCoA with Bray-Curtis distance preserving distances, and PCA with Aitchison distance capturing largest variation