Learn R Programming

RAM (version 1.2.1.3)

group.heatmap: Plot OTU Abundance at a Given Rank with Metadata Annotation

Description

This function plots the abundance for all taxon groups at a given rank. Additionally, it can display metadata for the samples as annotations along the rows of the heatmap.

Usage

group.heatmap(data, is.OTU=TRUE, meta, rank, factors, top=25, remove.unclassified=TRUE, stand.method=NULL, dist.method="bray", hclust.method="average", dendro.row.status="yes", dendro.col.status="hidden", row.labels=TRUE, row.cex=1, cut=NULL, file=NULL, ext=NULL, width=9, height=9)

Arguments

data
the OTU table to be used.
is.OTU
logical. Whether or not the data is an OTU table.
meta
the metadata table to be used.
rank
the taxonomic rank to use (see RAM.rank.formatting for formatting details).
factors
a named character vector indicating the columns of the metadata table to be used (see RAM.factors).
top
the number of groups to select, starting with the most abundant. If NULL, all are selected.
remove.unclassified
logical. Define whether OTUs labelled "unclassified" or missing classification at the given taxonomic rank should be excluded.
stand.method
optional. Data standardization methods specified in decostand.
dist.method
distance matrix calculation methods specified vegdist.
hclust.method
the agglomeration methods specified in hclust. This should be unambiguous abbreviation of one of the following: 'ward.D', 'ward.D2', 'single', 'complete', 'average', 'mcquitty', 'median' or 'centroid'.
dendro.row.status
whether or not to use the dendrogram to re-order the rows. It should be one of the following: 'yes' that use the dendrogram to re-order the rows/columns and display the dendrogram; 'hidden' means re-rorder, but do not display; 'no' means do not use the dendrogram at all. See also annHeatmap2
dendro.col.status
whether or not to use the dendrogram to re-order the columns. It should be one of the following: 'yes' that use the dendrogram to re-order the rows/columns and display the dendrogram; 'hidden' means re-rorder, but do not display; 'no' means do not use the dendrogram at all. See also annHeatmap2
row.labels
logical. Whether or not to plot the row labels.
row.cex
the size of row labels if row.labels is TRUE
cut
the height at which to cut the sample tree, this will create distinct coloured groups. Currently this will allow for at most nine groups (see Details).
file
the file path where the image should be created (see ?RAM.plotting).
ext
the file type to be used; one of "pdf", "png", "tiff", "bmp", "jpg", or "svg".
height
the height of the image to be created (in inches).
width
the width of the image to be created (in inches).

Details

A warning from brewer.pal indicating "n too large, allowed maximum for palette Pastel1 is 9" means that the cut height is too low to allow for that many groups. This should be fixed in a future release.

See Also

decostand, annHeatmap2

Examples

Run this code
data(ITS1, meta)
## Not run: 
# #library("Heatplus")
# #library("RColorBrewer")
# #group.heatmap(ITS1, is.OTU=TRUE, meta=meta, rank="c", 
#               factors=c(Crop="Crop", City="City"), 
#               stand.method="chi", dist.method="euc",
#               hclust.method="mcquitty", cut=0.5)
# ### End(Not run)

Run the code above in your browser using DataLab