circularmap {NeatMap}R Documentation

Heatmap arranged as an annular region

Description

These functions display a matrix as an annular heatmap reflecting the periodicity of the row ordering

Usage

circularmap(pos, profiles, column.order=NULL, cluster.result = NULL, 
cluster.heights = NULL, Rin = 10, Rout = 30, thickness = 3, label.names = NULL,
Rlabel = 32, label.size = 1.5, normalize.profiles = T)

make.circularmap(profiles, method = "nMDS", column.method="none",
cluster.method = "average.linkage", metric = "pearson", column.metric="pearson",
Rin = 10, Rout = 30, thickness = 3, label.names = NULL, Rlabel = 32,
label.size = 1.5, normalize.profiles = T)

Arguments

pos The positions for the rows as produced by some dimensional reduction technique. Can either be list of angles, or of 2d positions.
profiles A matrix containing the values to be displayed as a heatmap.
column.order A vector containing the order in which columns should be shown
cluster.result The hierarchical clustering result of type hclust for the rows, superposed on the heatmap for validation. If NULL no clustering result is shown.
cluster.heights An optional vector of heights to over-ride the heights specified in cluster.result.
Rin Inner radius of annulus.
Rout Outer radius of annulus.
thickness Thickness of the individual row expression level bands.
label.names list of row labels.
Rlabel Radius at which row labels are placed.
label.size Font size for labels.
normalize.profiles logical: if true the profiles are normalized (mean zero, unit variance) before display.
method The dimensional reduction method used by make.circularmap to produce angular positions for the rows. One of "nMDS" or "PCA".
column.method The dimensional reduction method used by make.circularmap to order columns. One of "none","nMDS","PCA", "average.linkage" or "complete.linkage".
cluster.method clustering method used for superposed row cluster. Either "complete.linkage" or "average.linkage".
metric the distance function used for row embedding. Can be either "pearson" or "euclidean".
column.metric the distance function used for column embedding. Can be either "pearson" or "euclidean".

Details

These are function used to construct heatmap like plots arranged in an annular ring. The assumption is that the 2d embedding result for the rows of the given matrix is circular in shape (the user should confirm this is indeed the case). The angular positions of each point (i.e., row) in this embedding is the angular position of its profile in the circular map. circularmap is the base function that takes the expression matrix and the result of dimensional reduction (expressed as a 2d positions or a list of angles) and produces the annular heatmap. make.circularmap is a convenience wrapper function that takes the given matrix, performs dimensional reduction using either "nMDS" or "PCA", produces cluster analysis on the row, and passes these results to circularmap for plotting.

Apart from the circular (vs linear) ordering, this function differs from heatmap1 in that the profiles are no longer equally spaced, and may reflect the non-uniformity of the angular positions. On the other hand, heatmap1 treats rows and columns on an equal footing while these functions focus primarily on the relations between rows.

The cluster analysis makes use of the same distance measure (specified by metric) as the dimensional reduction method.

Value

A ggplot2 plot of class ggplot.

Author(s)

Satwik Rajaram and Yoshi Oono

See Also

image,heatmap,heatmap1.

Examples

make.circularmap(as.matrix(mtcars),metric="euclidean",cluster.method="complete.linkage",
normalize.profiles=FALSE)

#is equivalent to
mtcars.nMDS<-nMDS(as.matrix(mtcars),metric="euclidean")
mtcars.cluster<-hclust(dist(mtcars),method="complete")
circularmap(mtcars.nMDS$x,as.matrix(mtcars),normalize.profiles=FALSE,
cluster.result=mtcars.cluster)

#To change coloring scheme etc
make.circularmap(as.matrix(mtcars),metric="euclidean",cluster.method="complete.linkage",
normalize.profiles=FALSE)+scale_fill_gradient2(low="yellow",high="blue",
mid="black",midpoint=200);

[Package NeatMap version 0.2 Index]