Load packages

library("ampvis")

Load data

data(DNAext_1.0)

Subset to the relevant dataset

Note: The “input.mg” samples were extracted using another beadbeating setting (40s at 6m/s) compared to the time-series data (160s at 6m/s)!

input <- subset_samples(V13, Exp.input.mg == "YES") %>%
  rarefy_even_depth(sample.size = 25000, rngseed = 712) %>%
  filter_taxa(function(x) max(x) > 10, TRUE)

Figure S4A: Overall differences between samples using PCA

PCA with square root transformed OTU abundances. The effect of sampling from different tanks is tested using the envfit function in vegan (permutation test).

pca <- amp_ordinate(data = input, 
             plot.color = "Input.mg", 
             plot.point.size = 3,
             plot.theme = "clean",
             envfit.factor = "Input.mg",
             envfit.show = F,
             output = "complete"
             )

Plot the PCA. It looks like there might be some significant grouping. At least the 22 mg seem different.

pca$plot +
  theme(legend.position = "none")

ggsave("plots/S4A.eps", width = 55, height = 55, units = "mm")

The model reports a p-value of 0.014, hence there is an effect of the amount of input material.

pca$eff.model
## 
## ***FACTORS:
## 
## Centroids:
##                    PC1     PC2
## Input.mg0.9 mg -2.6435  0.5021
## Input.mg2.2 mg -0.4447 -2.2143
## Input.mg22 mg   3.0881  1.7122
## 
## Goodness of fit:
##              r2 Pr(>r)  
## Input.mg 0.6488  0.014 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Permutation: free
## Number of permutations: 999

Figure S4B: Overall differences between samples using beta diversity

The Bray-Curtis dissimilarity index is used as an alternative method to test for significant groupings in the dataset.

beta <- amp_test_cluster(data = input, 
                         group = "Input.mg", 
                         method = "bray", 
                         plot.color = "Input.mg", 
                         plot.label = "Input.mg",
                         plot.theme = "clean")

Using adonis we also a small significant effect of storage method as the p-value is 0.004.

beta$adonis
## 
## Call:
## adonis(formula = test_formula, data = sample) 
## 
## Permutation: free
## Number of permutations: 999
## 
## Terms added sequentially (first to last)
## 
##           Df SumsOfSqs   MeanSqs F.Model      R2 Pr(>F)   
## Input.mg   2  0.041337 0.0206687  3.2973 0.52361  0.004 **
## Residuals  6  0.037610 0.0062684         0.47639          
## Total      8  0.078948                   1.00000          
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Clustering the data also shows that there is no difference between using 0.9 and 2.2 mg of input material, while there is an effect from using 22 mg of input material.

beta$plot_cluster +
  theme(legend.position = "none")

ggsave("plots/S4B.eps", width = 60, height = 55, units = "mm")