Provides an easy way to produce full heatmap figures with the most common features such as dendrograms from clustering, row and column labels and a matrix of clinical variables. Many of the arguments will take on sensible defaults if omitted (as described below).
This function makes extensive use of the grid package and mixes it with standard R graphics plots using gridBase. The figure is divided into regions (with grid.layout which is similar to base R's layout function) as directed by the layout.mat character matrix. The strings in layout.mat will determine where each component of the figure will be drawn. Other arguments are as described for the heatmap functions above.
1 2 3 4 5 6 7 8 9 10 | heatmap.simple(exprs, layout.mat = NULL, widths = NULL, heights = NULL,
color.scheme = heatmap.color.scheme(),
key.min = utils::head(color.scheme$breaks, 1) - 1,
key.max = utils::tail(color.scheme$breaks, 1) + 1, na.color = "grey",
scale = "row", key.line.color = "cyan", row.labels = NULL,
col.labels = NULL, row.clust = TRUE, row.clust.dist.fun = "cor",
row.clust.fun = "average", col.clust = TRUE, col.clust.dist.fun = "cor",
col.clust.fun = "average", col.grid = NA, clinical = NULL,
clinical.labels = NULL, clinical.na.color = na.color, title = NULL,
use.raster = FALSE)
|
layout.mat |
a character matrix describing the layout of the figure and its parts. The figure will be divided into rows and columns corresponding to the rows and columns of layout.mat. Each entry should be a string describing what should be plotted in that region. The list of recognized entries are: * heatmap * key * title * row.labels.ljust * row.labels.rjust * col.labels.ljust * col.labels.rjust * row.ddr.left * row.ddr.right * col.ddr.up * col.ddr.down * clinical * clinical.labels.ljust * clinical.labels.rjust If layout.mat is omitted, the function will try to provide a sensible one depending on what other options have been supplied. |
widths |
relative widths for the layout |
heights |
relative heights for the layout. If 'layout.mat' is omitted, care should be taken when supplying these since they have to match the size of the default layout.mat, which can vary depending on other arguments. |
color.scheme |
a list defining the color scheme to be used for the heatmap. See the heatmap.color.scheme() function for details on the requirements for this variable |
scale |
for now only supports "row", "none", or a user-supplied function that will be applied to each row. |
row.labels |
If omitted, will default to rownames of x. |
col.labels |
If omitted, will default to colnames of x. |
row.clust |
determines whether row should be clustered. If set to TRUE, method is determined by row.clust.dist.fun and row.clust.fun |
row.clust.dist.fun |
specifies how to compute the distance matrix for row clustering. The acceptable character strings are "cor" and any method specification that can be passed on to the dist() function. If 'dist.elem' is "cor", then 1-correlation (between the columns of 'exprs') is used as distance. |
row.clust.fun |
specifies how to compute the row dendrogram. Possible specifications are: an object that can be coerced to "dendrogram" (using as.dendrogram()), a function that takes a distance matrix and produces an object that can be coerced to a dendrogram, a character string specifying how to compute, from a distance matrix, an object that can be coerced to a dendrogram, or a character string specifying how to compute a dendrogram from a distance matrix. (see dist() for more details) |
col.clust |
determines whether columns should be clustered. If set to TRUE, clustering method is determined by col.clust.dist.fun and col.clust.fun |
col.clust.dist.fun |
specifies how to compute the distance matrix for column clustering. The acceptable character strings are "cor" and any method specification that can be passed on to the dist() function. If 'dist.elem' is "cor", then 1-correlation (between the columns of 'exprs') is used as distance. |
col.clust.fun |
specifies how to compute the row dendrogram. Possible specifications are: an object that can be coerced to "dendrogram" (using as.dendrogram()), a function that takes a distance matrix and produces an object that can be coerced to a dendrogram, a character string specifying how to compute, from a distance matrix, an object that can be coerced to a dendrogram, or a character string specifying how to compute a dendrogram from a distance matrix. (see dist() for more details) |
clinical |
a matrix of colors or a data frame to be passed to heatmap.clinical. |
clinical.labels |
If omitted, will default to rownames of clinical'. |
title |
text string to be printed as a title |
x |
matrix of values for the main heatmap. |
lwd |
line width relative to the default (default=0.01) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.