View source: R/phyloseq_prevalence_plot.R
phyloseq_prevalence_plot | R Documentation |
This function will plot total OTU abundance vs the fraction of samples in which an OTU is observed.
phyloseq_prevalence_plot(
physeq,
prev.trh = NULL,
taxcolor = NULL,
facet = FALSE,
point_alpha = 0.7,
showplot = T
)
physeq |
A phyloseq-class object |
prev.trh |
Add horizontal line with prevalence threshold (default is NULL, but 0.05 = 5% of samples) |
taxcolor |
Taxonomy rank for coloring the points (e.g. "Phylum") |
facet |
Logical, split to separate panels by taxonomy rank used for coloring the points |
point_alpha |
Point transparency value |
showplot |
Logical, show plot on screen |
Plot of class 'ggplot'.
phyloseq_filter_prevalence
data(GlobalPatterns)
# Subset data
GP <- subset_taxa(GlobalPatterns, Phylum %in% c("Acidobacteria", "Actinobacteria", "Firmicutes", "Verrucomicrobia"))
phyloseq_prevalence_plot(GP, taxcolor = "Phylum", facet = TRUE, point_alpha = 0.5, prev.trh = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.