View source: R/phyloseq_summary.R
phyloseq_summary | R Documentation |
This function could be used for comparison of multiple phyloseq objects (e.g., after trimming).
phyloseq_summary(physeq, ..., cols = NULL, more_stats = FALSE, long = FALSE)
physeq |
A phyloseq-class object |
... |
Optionally more phyloseq objects |
cols |
Character vector with column names for phy1 & phy2 in the resulting table |
more_stats |
Logical; if TRUE, some additional OTU abundance statistics will be calculated |
long |
Logical; if TRUE, results will be returned in a long format |
Optionally (if more_stats = TRUE), some additional OTU abundance statistics may be estimated (min, max, median, Q1, Q3, and CQV of OTU abundance). Coefficient of quartile variation (a.k.a., Quartile coefficient of dispersion) is preferred to the 'classical' coefficient of variation for the analysis of samples from nonnormal distributions. It is estimated by the following formula: (Q3-Q1)/(Q3+Q1), where Q1 is the population 25th percentile and Q3 is the population 75th percentile.
Data frame with number and percentage of OTUs.
# Load data
data(esophagus)
# Single sample summary
phyloseq_summary(esophagus, cols = "Esophagus")
phyloseq_summary(esophagus, cols = "Esophagus", more_stats = T)
## Compare trimmed and raw data
# Remove taxa that have less than 5 reads
eso_trim <- prune_taxa(taxa_sums(esophagus) >= 5, esophagus)
phyloseq_summary(esophagus, eso_trim, cols = c("Esophagus", "Trimmed_esophagus"))
phyloseq_summary(esophagus, eso_trim, cols = c("Esophagus", "Trimmed_esophagus"), more_stats = T)
eso_trim2 <- phyloseq_filter_top_taxa(esophagus, perc = 20)
phyloseq_summary(esophagus, eso_trim, eso_trim2, cols = c("Esophagus", "Trimmed_1", "Trimmed_2"), more_stats = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.