> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cosmosid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alpha diversity Overview

# What is Alpha Diversity?

Alpha diversity is a fundamental measure in microbiome studies that captures how rich and diverse a single sample is in terms of the microorganisms it contains. Calculating it means summarizing the microbial composition of one sample in a single number. An alpha diversity metric condenses the full microbial feature profile, whether taxa, genes, pathways, or functions, into a value that reflects how many different features are present and how evenly they contribute to the total abundance.

# Why is Alpha Diversity useful?

Alpha diversity is usually one of the most popular and useful analyses in a microbiome study because it gives a compact overview of within-sample community structure. Many biological and environmental factors, including disease, antibiotics, diet, age, treatment, host genetics, and body site, have an influence on the microbial communities that is reflected on alpha-diversity.

For this reason, when groups of samples that differ by a biological variable of interest (for example, health status or treatment) also show different alpha diversity distributions, it suggests that this variable may be influencing their overall microbiome.

When interpreting alpha-diversity in human-related studies, remember that not a universal “health score” and its interpretation depends strongly on the environmenta and biological system under study.

In many ecosystems, higher diversity can indicate a more complex and potentially more stable community with greater functional redundancy. For example, a soil or gut microbiome where multiple taxa can buffer the loss of individual species.

In other cases, low diversity can be characteristic of a healthy, specialized community, such as the Lactobacillus‑dominated vaginal microbiome, where increased diversity often signals dysbiosis. Changes in alpha diversity, whether increases or decreases, therefore need to be interpreted relative to the specific habitat, host, and perturbation, rather than assumed to be good or bad on their own.

# How does alpha diversity work?

<Frame>
  <img src="https://mintcdn.com/cmbio/oNFmEIJ4OI637vcN/images/alphadiv_overview.png?fit=max&auto=format&n=oNFmEIJ4OI637vcN&q=85&s=38f30d7d2430d6d20f15d0d1cd36d3ce" alt="Alphadiv Overview" width="1021" height="463" data-path="images/alphadiv_overview.png" />
</Frame>

<Steps>
  <Step title="Start with a feature table">
    The input to alpha diversity analysis is a table of microbial features that describes the taxonomic or functional composition of each sample in your cohort.

    The value of a feature in a sample may be the number of sequencing reads assigned to a given taxon or function (counts), or a relative abundance.

    Each sample's profile is therefore a vector of numbers, and alpha diversity indexes allow to reduce that profile to a single value.
  </Step>

  <Step title="Choose the question you want to answer">
    Alpha diversity measures fall mainly into two categories, depending on what they quantify:

    * **Taxa richness:** a count of how many different species are present in a sample. It does not account for the abundance of each species or how evenly they are distributed.
    * **Taxa evenness:** a measure of how the relative abundances are distributed across the taxa that make up the richness of a microbial community. High evenness means the species are present in similar proportions; low evenness means a few species dominate.

    Before choosing a metric, ask what you care about most:

    * How many microbial taxa or functions are present or detected in my community?
    * Is my community dominated by a few abundant organisms, or are they spread evenly across many?
  </Step>

  <Step title="Pick an alpha diversity metric">
    Depending on which question you need to answer, choose  **alpha diversity metric** . Cosmos-Hub 2.0 currently supports three:

    | Metric                | What it captures                                                                                                                | Best used when                                                            | Keep in mind                                                                                                                          |
    | :-------------------- | :------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------ |
    | **Observed richness** | The number of detected features in a sample.                                                                                    | You want the simplest answer to "How many taxa or features are present?"  | It is strongly influenced by sequencing depth, because deeper sequencing tends to recover more rare features.                         |
    | **Shannon**           | A combination of richness and evenness; values increase when a sample contains more taxa and when abundances are more balanced. | You want one summary value that reflects both community size and balance. | It is widely used and more interpretable than many advanced indices, though still less intuitive than a percentage or a direct count. |
    | **Simpson**           | The contribution of dominant taxa; it is more influenced by abundant organisms and less sensitive to rare ones.                 | You care most about whether a few organisms dominate the community.       | It can miss subtle shifts that happen mainly among low-abundance organisms.                                                           |
  </Step>

  <Step title="Calculate one value per sample">
    The chosen metric is calculated separately for each sample, so the output is a table with one alpha diversity value per sample.

    For example, calculating Shannon diversity for 80 gut samples gives 80 Shannon values, one per sample.
  </Step>

  <Step title="Compare groups using metadata">
    Once each sample has a diversity value, you can compare those values across groups defined by **metadata**, meaning descriptive variables such as treatment, disease status, body site, time point, cohort, sex, or age group.

    For example, in a treated-versus-control study, you might group samples by **Treatment** and ask whether one group tends to have higher or lower within-sample diversity than the other.
  </Step>

  <Step title="Visualize patterns and test them">
    Alpha diversity is usually visualized with boxplots, violin plots, or scatter-based group comparisons, where each point represents one sample. The plot helps you see whether groups differ in central tendency, spread, or outliers.

    Common questions to ask when reading the plot:

    * Does one group show consistently higher or lower diversity?
    * Is one group much more variable than the others?
    * Are there outlier samples that may reflect biology or technical issues?

    Statistical testing can then assess whether the observed differences are stronger than expected by chance.
  </Step>
</Steps>

<Note>
  A statistically significant difference in alpha diversity tells you that groups differ for the selected metric, but it does **not** tell you which taxa caused the difference. To identify the organisms or features driving the shift, follow up with abundance-based or differential analyses.
</Note>

## References

**Wurm, J., et al.** (2024). "The effect of antibiotics on the intestinal microbiota in children." -  antibiotic-associated decrease in gut alpha diversity

**Gong, D., et al.** (2016). "Involvement of Reduced Microbial Diversity in Inflammatory Bowel Disease." - lower Shannon diversity in IBD

**Han, Y., et al.** (2021). "Role of Vaginal Microbiota Dysbiosis in Gynecological Diseases." - Vaginal dysbiosis and loss of Lactobacillus dominance
