abundance_heatmap: Create a heatmap of the out_table from a phyloseq-object.

View source: R/abundance_heatmap.R

abundance_heatmapR Documentation

Create a heatmap of the out_table from a phyloseq-object.

Description

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.

Usage

abundance_heatmap(phyloseq_obj, classification = NULL, 
  treatment =  NULL, subset = NULL, transformation = 'none', 
  colors = 'default', treatment_labels = NULL, sample_labels = NULL,
  classification_labels= NULL)

Arguments

phyloseq_obj

A phyloseq-class object.

classification

The level of taxonomy to examine. Must be a column name from the tax_table of the phyloseq_object. tax_table.

treatment

Column name as a string, or vector of strings, from the sample_data.

subset

A level within the treatment. Multiple levels can be given as a vector.

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.

Value

ggplot-object

Examples

data(GlobalPatterns)
abundance_heatmap(GlobalPatterns, classification = "Phylum",
 treatment = "SampleType", transformation = "log2")

schuyler-smith/phyloschuyler documentation built on Aug. 16, 2024, 5:36 a.m.