plot_guild_pq {MiscMetabar} | R Documentation |
Plot information about Guild from tax_table slot previously
created with add_funguild_info()
Description
Usage
plot_guild_pq(physeq, levels_order = NULL, clean_pq = TRUE, ...)
Arguments
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
|
Value
A ggplot2 object
Author(s)
Adrien Taudière
See Also
Examples
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()))
}
}
[Package MiscMetabar version 0.9.1 Index]