Guides
Guides

Beta Diversity

What is beta diversity?

Beta diversity helps you understand the relationships between samples and how their microbial communities differ ("how different?"). 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

Bray-Curtis (recommended)

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.

Jaccard

This metric measures how similar samples are based on the presence or absence of species, without considering their abundance. It ranges from 0 to 1, where 0 means no species are shared between samples, and 1 means they share the exact same species. Going back to the fruit basket analogy, if both baskets have at least one apple, their Jaccard score would be closer to 1, even if the number of apples differs.


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.

📘

Statistics: PERMANOVA Analysis

How does PERMANOVA work and what do the results mean?

PERMANOVA stands for Permutational multivariate analysis of variance [1,2], and is a non-parametric multivariate statistical test. The test is based on the prior calculation of the distance between any two cohorts. PERMANOVA measures the sum-of-squares within and between cohorts and makes use of the F test to compare within-cohort to between-cohort variance. PERMANOVA draws tests for significance by comparing the actual F test result to that gained from random permutations of the objects between the groups.

PERMANOVA is used to compare cohorts of samples and test the null hypothesis that the centroids and dispersion of the cohorts (as defined by the 3-dimensional Principal Coordinate space) are equivalent for all cohorts.

A rejection of the null hypothesis (p-values of 0.05 and below) means that either the centroid and/or the spread of the objects is different between the cohorts. This is a test on beta diversity this means that in this case the samples for two cohorts are drawn from distributions that are compositionally distinct.

A table lists for each cohort combination the number of included samples, the number of permutations performed, the test statistic (returning the F statistic) and normalized p-value.

It is possible to export the PERMANOVA analysis results to TSV.

Viewing the test results

Above and to the right of the alpha diversity charts you can find a Result Switcher and a Cohort Menu.

The Result Switcher allows you to view test results/p-values of either "ALL" cohorts or "SIGNIFICANT" comparisons (p<0.05). NONE setting is selected by default.

The Cohort Menu to the right of the Result Switcher offers another way to filter the displayed cohort combinations. A pulldown menu lists all possible cohort combinations. Selecting checkboxes for the cohort pairs of interest will reduce the rows with test statistics and p-values in the table accordingly.
It is possible to export the test results to TSV.


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