Plots Mean Abundance-Prevalence for taxa. Mean abundance, mean prevalence, and upper and lower confidence interval for each taxa is calculated by random subsampling.
plot_abund_prev(
x,
lower.conf = 0.025,
upper.conf = 0.975,
bs.iter = 99,
color = "steelblue",
dot.opacity = 0.5,
dot.size = 2,
label.core = FALSE,
label.size = NULL,
label.opacity = NULL,
label.color = "grey70",
mean.abund.thres = NULL,
mean.prev.thres = NULL,
log.scale = TRUE,
nudge.label = NULL,
...
)
phyloseq-class
object
Lower confidence interval =0.025
Upper confidence interval =0.975
Number of bootstrap iterations =99
taxa level to color. Preferably at phylum or just a single color
Numeric for ggplot alpha. Default is 0.5
Numeric size of point
Logical default is FALSE
If label_core is TRUE specify text size. Default is NULL
Numeric for ggplot alpha. Defualt is NULL
Color for labels. Default="grey70"
If label_core is TRUE specify mean abundance threshold. Default is NULL
If label_core is TRUE specify mean prevalence threshold. Default is NULL
Plot log10 scale. Default is TRUE abundance criteria. Default is NULL
Argument to pass to ggrepel::geom_text_repel Default is NULL
Arguments to pass to sample() function.
A ggplot
plot object.
Check if there are spurious OTUs/ASVs.
if (FALSE) {
# Example data
library(microbiomeutilities)
asv_ps <- zackular2014
asv_ps <- microbiome::transform(asv_ps, "compositional")
asv_ps <- core(asv_ps, detection = 0.0001, prevalence = 0.5)
asv_ps <- format_to_besthit(asv_ps)
set.seed(2349)
p_v <- plot_abund_prev(asv_ps, size = 20, replace = TRUE) +
geom_vline(xintercept = 0.75, lty = "dashed", alpha = 0.7) +
geom_hline(yintercept = 0.01, lty = "dashed", alpha = 0.7) +
scale_color_brewer(palette = "Paired")
p_v
}