Plot taxon abundance for samples.
plot_taxa_boxplot(
x,
taxonomic.level,
top.otu,
keep.other = FALSE,
group,
title,
group.colors = NULL,
group.order = NULL,
add.violin = TRUE,
violin.opacity = 0.25,
box.opacity = 0.25,
dot.opacity = 0.25,
dot.size = 2
)
phyloseq-class
object
Merge the OTUs (for phyloseq object) into a higher taxonomic level. This has to be one from colnames(tax_table(x)).
Top number of taxa to plot.
TRUE or FALSE. Default is FALSE. This will not plot taxa group as Other
Specify main variable of interest. This should be one of the variables in sample_variables(x).
title for the plot
Colors for plotting groups
Default is NULL. a list specifing order of x-axis. E.g. c("H","CRC","nonCRC")
Loical. If half violoin to the added. Default=TRUE
If add.violin=TRUE, opacity for violin.
For ggplot alpha to determine opacity for box
For ggplot alpha to determine opacity for points
For ggplot alpha to determine size for points
A ggplot
plot object.
if (FALSE) {
# Example data
library(microbiomeutilities)
library(RColorBrewer)
data("zackular2014")
ps0 <- zackular2014
mycols <- c("brown3", "steelblue", "grey50")
pn <- plot_taxa_boxplot(ps0,
taxonomic.level = "Phylum",
top.otu = 6,
group = "DiseaseState",
title = "Relative abudance plot",
keep.other = FALSE,
group.order = c("H", "CRC", "nonCRC"),
group.colors = mycols
)
print(pn + theme_biome_utils())
}