heatmapPlus: Display heatmap for clusters

Description Usage Arguments Value Author(s) Examples

Description

Visualize clusters with heatmap

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
heatmapPlus(x, 
Rowv = NULL, 
Colv = if (symm) "Rowv" else NULL, 
distfun = dist, 
hclustfun = hclust, 
reorderfun = function(d, w) reorder(d, w), 
add.expr, 
symm = FALSE, 
revC = identical(Colv, "Rowv"), 
scale = c("row", "column", "none"), 
na.rm = TRUE, 
margins = c(5, 5), 
ColSideColors, 
RowSideColors, 
cexRow = 0.2 + 1/log10(nr), 
cexCol = 0.2 + 1/log10(nc), 
labRow = NULL, 
labCol = NULL, 
main = NULL, 
xlab = NULL, 
ylab = NULL, 
keep.dendro = FALSE, 
verbose = getOption("verbose"), ...)

Arguments

x

numeric matrix of the values to be plotted.

Rowv

determines if and how the row dendrogram should be computed and reordered. Either a dendrogram or a vector of values used to reorder the row dendrogram or NA to suppress any row dendrogram (and reordering) or by default, NULL.

Colv

determines if and how the column dendrogram should be reordered. Has the same options as the Rowv argument above and additionally when x is a square matrix, Colv = "Rowv" means that columns should be treated identically to the rows.

distfun

function used to compute the distance (dissimilarity) between both rows and columns. Defaults to dist.

hclustfun

function used to compute the hierarchical clustering when Rowv or Colv are not dendrograms. Defaults to hclust.

reorderfun

function(d,w) of dendrogram and weights for reordering the row and column dendrograms. The default uses reorder.dendrogram.

add.expr

expression that will be evaluated after the call to image. Can be used to add components to the plot.

symm

logical indicating if x should be treated symmetrically; can only be true when x is a square matrix.

revC

logical indicating if the column order should be reversed for plotting, such that e.g., for the symmetric case, the symmetry axis is as usual.

scale

character indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default is "row" if symm false, and "none" otherwise.

na.rm

logical indicating whether NA's should be removed.

margins

numeric vector of length 2 containing the margins (see par(mar= *)) for column and row names, respectively.

ColSideColors

(optional) character matrix with number of rows matching number of rows in x. Each column is plotted as a row similar to heatmap()'s ColSideColors. colnames() will be used for labels if present.

RowSideColors

(optional)character matrix with number of rows matching number of columns in x. Each column is plotted as a row similar to heatmap()'s RowSideColors. colnames() will be used for labels if present.

cexRow

positive numbers, used as cex.axis in for the row axis labeling. The defaults currently only use number of rows.

cexCol

positive numbers, used as cex.axis in for the column axis labeling. The defaults currently only use number of columns.

labRow

character vectors with row labels to use; these default to rownames(x).

labCol

character vectors with column labels to use; these default to colnames(x).

main

y-axis titles; defaults to none.

xlab

x-axis titles; defaults to none.

ylab

main titles; defaults to none.

keep.dendro

logical indicating if the dendrogram(s) should be kept as part of the result (when Rowv and/or Colv are not NA).

verbose

logical indicating if information should be printed.

...

additional arguments passed on to image, e.g., col specifying the colors

Value

Invisibly, a list with components

rowInd row index permutation vector as returned by order.dendrogram.

colInd column index permutation vector.

Rowv the row dendrogram; only if input Rowv was not NA and keep.dendro is true.

Colv the column dendrogram; only if input Colv was not NA and keep.dendro is true.

Author(s)

Dr. Anna Goldenberg, Bo Wang, Aziz Mezlini, Feyyaz Demir

Examples

1
2
3
4
5
6
  z = matrix(rnorm(30),nrow=5,ncol=6);
  rlab = matrix(as.character(c(1:5,2:6,3:7,4:8)),nrow=5,ncol=4);
  clab = matrix(as.character(c(1:6,6:1)),nrow=6,ncol=2);
  colnames(rlab) = LETTERS[1:dim(rlab)[2]];
  colnames(clab) = 1:dim(clab)[2];
  heatmapPlus(z,ColSideColors=clab,RowSideColors=rlab);

SNFtool documentation built on June 11, 2021, 9:06 a.m.

Related to heatmapPlus in SNFtool...