14 Further exercises
When done with the differential abundance testing examples, you can investigate the use of the following standard methods for microbiome studies. We are available to discuss and explain the technical aspects in more detail during the class.
14.1 Compositionality
Compositionality effect compare the effect of CLR transformation (microbiome::clr) on microbiome analysis results. 1) Compare t-test and/or Wilcoxon test results between data that is transformed with compositional or clr transformation (see the function microbiome::transform); and/or 2) Prepare PCoA with Bray-Curtis distances for compositional data; and PCoA with euclidean distances for CLR-transformed data (microbiome::transform). For examples, see microbiome tutorial.
14.2 Redundancy analysis (RDA)
A very good overview of various multivariate methods used in microbial ecology is provided here. Read the Redundancy analysis (and possibly other) section. Next, try to perform simple redundancy analysis in R based on the following examples.
Standard RDA for microbiota profiles versus the given (here ‘time’) variable from sample metadata (see also the RDA method in phyloseq::ordinate)
x <- transform(dietswap, "compositional")
otu <- abundances(x)
metadata <- meta(x)
library(vegan)
rda.result <- vegan::rda(t(otu) ~ factor(metadata$nationality),
na.action = na.fail, scale = TRUE)
Visualize the standard RDA output:
plot(rda.result, choices = c(1,2), type = "points", pch = 15, scaling = 3, cex = 0.7, col = metadata$time)
points(rda.result, choices = c(1,2), pch = 15, scaling = 3, cex = 0.7, col = metadata$time)
pl <- ordihull(rda.result, metadata$nationality, scaling = 3, label = TRUE)
Test RDA significance:
Include confounding variables: