User specifed OTUs are plotted.
plot_listed_taxa(
x,
select.taxa,
group,
group.colors,
dot.opacity = 0.25,
box.opacity = 0.25,
group.order = NULL,
add.violin = TRUE,
violin.opacity = 0.25,
panel.arrange = "grid",
ncol = NULL,
nrow = NULL
)
phyloseq-class
object.
a character list of taxa to be plotted. eg. select.taxa <- c("OTU-370251", "OTU-311173", "OTU-341024").
Grouping variable to compare
Colors for plotting groups
For ggplot alpha to determine opacity for points
For ggplot alpha to determine opacity for box
Default is NULL. a list specifing order of x-axis.
Loical. If half violoin to the added. Default=TRUE
If add.violin=TRUE, opacity for violin.
panels "grid" or "wrap" ggplot's facet_XXX
if wrap, specify number of columns.
if wrap, specify number of rows.
ggplot
object. This can be further modified using ggpubr.
Useful for instances where user is interested only in some OTUs. For example OTUs reported to be significantly diferent. This can also be used at higher taxonomic levels, output from phyloseq::tax_glom or microbiome::aggregate_taxa.
if (FALSE) {
# Example data
library(microbiome)
library(microbiomeutilities)
data("zackular2014")
p0 <- zackular2014
p0.f <- format_to_besthit(p0)
select.taxa <- c("OTU-d__denovo31:Dorea", "OTU-d__denovo24:Blautia")
mycols <- c("brown3", "steelblue", "grey50")
p <- plot_listed_taxa(p0.f, select.taxa,
group = "DiseaseState",
add.violin = TRUE,
group.colors = mycols
)
print(p)
}