Alpha diversity

Wednesday, August 27, 2025

Alpha diversity

  • Measures diversity within a single sample
  • Two key aspects:
    • Richness: how many taxa are present
    • Evenness: how evenly distributed the taxa are

Richness

\[ S = \text{Number of observed taxa} \]

  • Counts unique species/ASVs/OTUs in a sample

Simpson’s evenness

\[ E_{\mathrm{Simpson}} = \frac{1}{S \sum_{i=1}^{S} p_i^2} \]

where:

  • \(p_i\) = relative abundance of taxon \(i\)

  • \(S\) = number of taxa

  • Bounded between 0 (low evenness) and 1 (perfectly even)

Shannon diversity

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

where:

  • \(p_i\) = relative abundance of taxon \(i\)

  • \(S\) = total number of taxa

  • Combines richness and evenness in one metric

Recommendation

Guidelines for alpha diversity: Cassol, Ibañez, and Bustamante (2025)

  • Richness: The number of observed unique features
  • 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")

Exercises

From OMA online book, Chapter 14: Alpha diversity

  • 1.2, 1.3, 1.4, 1.9, 1.10

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.