View source: R/plot_listed_taxa.R
plot_listed_taxa | R Documentation |
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 )
x |
|
select.taxa |
a character list of taxa to be plotted. eg. select.taxa <- c("OTU-370251", "OTU-311173", "OTU-341024"). |
group |
Grouping variable to compare |
group.colors |
Colors for plotting groups |
dot.opacity |
For ggplot alpha to determine opacity for points |
box.opacity |
For ggplot alpha to determine opacity for box |
group.order |
Default is NULL. a list specifing order of x-axis. |
add.violin |
Loical. If half violoin to the added. Default=TRUE |
violin.opacity |
If add.violin=TRUE, opacity for violin. |
panel.arrange |
panels "grid" or "wrap" ggplot's facet_XXX |
ncol |
if wrap, specify number of columns. |
nrow |
if wrap, specify number of rows. |
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.
ggplot
object. This can be further modified using ggpubr.
## Not run: # 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.