phyloseq_prevalence_plot: Prevalence plot (total OTU abundance vs OTU prevalence).

View source: R/phyloseq_prevalence_plot.R

phyloseq_prevalence_plotR Documentation

Prevalence plot (total OTU abundance vs OTU prevalence).

Description

This function will plot total OTU abundance vs the fraction of samples in which an OTU is observed.

Usage

phyloseq_prevalence_plot(
  physeq,
  prev.trh = NULL,
  taxcolor = NULL,
  facet = FALSE,
  point_alpha = 0.7,
  showplot = T
)

Arguments

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

Value

Plot of class 'ggplot'.

See Also

phyloseq_filter_prevalence

Examples

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)


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.