plasticity | R Documentation |
Calculated difference in microbiota composition for each individual between two timepoints.
plasticity(x, dist.method = "bray", participant.col)
x |
|
dist.method |
Any of the methods supported by phyloseq::distance or correlation method cor() |
participant.col |
Column name with participant IDs |
Using a beta diversity metrics or correlation matrix to identify variability in microbiota of an individual. The code is slight modification from Grembi et. al. see ref below. This is useful for instance if one wants to quantiify changes in microbiota before and after a treatment, dietary modulation, antibiotic treatment, etc. The choice of index is important. For example, Bray-Curtis dissimilarity, the higher values mean higher plasticity/variability. On the contrary, higer spearman correlation values mean lower plasticity.
plot
Grembi, J.A., Nguyen, L.H., Haggerty, T.D. et al. Gut microbiota plasticity is correlated with sustained weight loss on a low-carb or low-fat dietary intervention. Sci Rep 10, 1405 (2020).https://www.nature.com/articles/s41598-020-58000-y
## Not run: library(microbiome) library(microbiomeutilities) library(dplyr) library(ggpubr) data(peerj32) pseq <- peerj32$phyloseq pseq.rel <- microbiome::transform(pseq, "compositional") pl <- plasticity(pseq.rel, participant.col = "subject") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.