library("ampvis")
data(DNAext_1.0)
bb_time_plant <- subset_samples(V13, Exp.beadbeating == "YES" | (Exp.time == "YES" & Date != "2012-10-31") | Plant == "AAE") %>%
rarefy_even_depth(sample.size = 25000, rngseed = 712) %>%
filter_taxa(function(x) max(x) > 10, TRUE)
beta_time <- amp_test_cluster(data = bb_time_plant,
group = "Beadbeating",
method = "bray",
plot.color = "Date",
plot.label = c("Beadbeating", "Plant"),
plot.theme = "clean")
The clustering supports the conclusion that varience from different bead beating settings is larger than the varience by sampling 5 months appart. While still enables clustering of samples within the same wastewater treatment plant.
beta_time$plot_cluster +
scale_color_discrete(name = "Sampling date") +
theme(legend.key.width = unit(3, "mm"),
legend.key.height = unit(3, "mm"),
legend.key = element_blank(),
legend.text = element_text(size = 10),
legend.title = element_text(size = 10),
legend.position = c(0.89,0.89))
ggsave("plots/S5_Fig.eps", width = 140, height = 120, units = "mm")