View source: R/dada_phyloseq.R
plot_guild_pq | R Documentation |
add_funguild_info()
Graphical function.
plot_guild_pq(physeq, levels_order = NULL, clean_pq = TRUE, ...)
physeq |
(required): a |
levels_order |
(Default NULL) A character vector to reorder the levels of guild. See examples. |
clean_pq |
(logical, default TRUE): Does the phyloseq
object is cleaned using the |
... |
Other params for be passed on to
|
A ggplot2 object
Adrien Taudière
add_funguild_info()
if (requireNamespace("httr")) {
d_fung_mini <- add_funguild_info(data_fungi_mini,
taxLevels = c(
"Domain",
"Phylum",
"Class",
"Order",
"Family",
"Genus",
"Species"
)
)
sort(table(d_fung_mini@tax_table[, "guild"]), decreasing = TRUE)
p <- plot_guild_pq(d_fung_mini)
if (requireNamespace("patchwork")) {
(plot_guild_pq(subset_samples(d_fung_mini, Height == "Low"),
levels_order = p$data$Guild[order(p$data$nb_seq)]
) + theme(legend.position = "none")) +
(plot_guild_pq(subset_samples(d_fung_mini, Height == "High"),
levels_order = p$data$Guild[order(p$data$nb_seq)]
) + ylab("") + theme(axis.text.y = element_blank()))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.