View source: R/abundance_heatmap.R
abundance_heatmap | R Documentation |
Uses a phyloseq-class
object as input and
creates a ggplot-heatmap of the abundances across samples.
The default color choice is the viridis palette.
abundance_heatmap(phyloseq_obj, classification = NULL,
treatment = NULL, subset = NULL, transformation = 'none',
colors = 'default', treatment_labels = NULL, sample_labels = NULL,
classification_labels= NULL)
phyloseq_obj |
A |
classification |
The level of taxonomy to examine. Must be a column name
from the tax_table of the phyloseq_object.
|
treatment |
Column name as a string, or vector of strings, from the
|
subset |
A level within the |
transformation |
Transformation to be used on the data. "none", "relative_abundance", "log", "log10", "log1p", "log2", "asn", "atanh", "boxcox", "exp", "identity", "logit", "probability", "probit", "reciprocal", "reverse" and "sqrt" |
colors |
Name of a color set from the RColorBrewer package or a vector palette of R-accepted colors. The default is an adaption of the palette from https://www.nature.com/articles/nmeth.1618 |
treatment_labels |
a vector of names to be used as labels for treatments/facets, in the order they appear in the figure. |
sample_labels |
a vector of names to be used as labels for Samples, in the order they appear in the figure. |
classification_labels |
a vector of names to be used as labels for the taxonomic classifications, in the order they appear in the figure. |
ggplot-object
data(GlobalPatterns)
abundance_heatmap(GlobalPatterns, classification = "Phylum",
treatment = "SampleType", transformation = "log2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.