plasticity: Plasticity

View source: R/plasticity.R

plasticityR Documentation

Plasticity

Description

Calculated difference in microbiota composition for each individual between two timepoints.

Usage

plasticity(x, dist.method = "bray", participant.col)

Arguments

x

phyloseq-class object

dist.method

Any of the methods supported by phyloseq::distance or correlation method cor()

participant.col

Column name with participant IDs

Details

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.

Value

plot

References

  • 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

Examples

## 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)

microsud/microbiomeutilities documentation built on Nov. 29, 2022, 12:18 a.m.