What is beta diversity and how is it calculated?

In a microbiome study, beta diversity can indicate how environmental factors, treatments, or other variables may affect microbial composition. For example, samples from a healthy gut microbiome may cluster closely together on a PCoA plot, whereas samples from a diseased gut may be more spread out, indicating greater variability in microbial composition.

Beta diversity is the ratio between the regional and local species diversity. In other words, it measures the distance or dissimilarity between each sample pair. Relative abundance is used as the input metric to reflect the underlying microbiome composition of the community. The aggregation level of the input data has been set to species level.

What is the difference between alpha diversity and beta diversity?

Alpha diversity is how many different taxa are detected in each sample. Beta diversity is the difference in microbial composition between samples. Alpha diversity looks at each sample and asks how many. Beta diversity compares samples and asks what are the differences in microbial composition between the samples.

Measures of Beta Diversity

This metric compares the abundance of species between samples. It ranges from 0 to 1, where 0 means the samples have identical compositions, and 1 means they are completely different. Imagine comparing two fruit baskets: if both have the same types and amounts of fruit, their Bray-Curtis score would be 0. If one basket is full of apples and the other is filled with oranges, the score would be closer to 1.

This metric takes abundance into account and is non-phylogeny based.

PCoA

CosmosID-HUB uses PCoA (Principal Coordinate Analysis) plots to visualize beta diversity results. PCoA plots represent samples in a two-dimensional space where the distance between points reflects the dissimilarity between samples.

  • Bray-Curtis PCoA plots will show how much the composition of species differs between samples based on their relative abundances.
  • Jaccard PCoA plots will reflect whether or not species are present in both samples, without considering how many of each species are found.

Options for viewing PCoA

  • 2D/3D View - The switcher to switch between 2D and 3D view
  • Rotate graph - Click anywhere on the PCoA and hold down to rotate the graph.
  • Labels - You can click on a label to hide samples belonging to the corresponding cohort, click it again to show them.
    • Please note that selecting cohort labels in the Legend does not recompute the plot but only hides/reveals the corresponding samples while rescaling the axis. The axis label values for % variability explained by each principal coordinate (PCo) axis are not recalculated and correspond to a visualization including all cohorts and samples.
  • Export - Click “Export” in the top right corner to download the PCoA as a png or svg.

Beta Diversity Statistics: PERMANOVA

How does PERMANOVA work and what do the results mean?

PERMANOVA (Permutational Multivariate Analysis of Variance) is a non-parametric test used to evaluate differences in beta diversity between cohorts. It calculates pairwise distances, measures within- and between-cohort variability, and employs an F test based on permutations to assess significance.

A significant result (p ≤ 0.05) indicates differences in either centroid positions or dispersion among cohorts, meaning they differ compositionally.

Results for each cohort comparison include sample sizes, permutation counts, F statistics, and p-values, all exportable as TSV.

Viewing the test results

The Result Switcher (default: “NONE”) above the charts enables viewing results for either “ALL” cohort comparisons or only those with “SIGNIFICANT” differences (p<0.05).

The Cohort Menu allows further filtering of cohort comparisons via checkboxes, adjusting the displayed results accordingly. Export options to TSV are available.

The video below demonstrates different functionalities of the PCoA plot

References

Anderson, M. (2001). A new method for non‐parametric multivariate analysis of variance. Austral Ecology 26(1), 32-46. https://dx.doi.org/10.1111/j.1442-9993.2001.01070.pp.x

Anderson, M. (2014). Permutational Multivariate Analysis of Variance (PERMANOVA). Wiley StatsRef: Statistics Reference Online. https://doi.org/10.1002/9781118445112.stat07841