Description Usage Arguments Details Value Note Author(s) References See Also Examples
heatplot
calls heatmap.2
using a red-green colour scheme by
default. It also draws dendrograms of the cases and variables
using correlation similarity metric and average linkage clustering as
described by Eisen. heatplot
is useful for a
quick overview or exploratory analysis of data
1 2 3 4 5 |
dataset |
a |
dend |
A character indicating whether dendrograms should be drawn for both rows and columms "both", just rows "row" or column "column" or no dendrogram "none". Default is both. |
cols.default |
Logical. Default is |
lowcol, highcol |
Character indicating colours to be used for down and upregulated genes when drawing heatmap if the default colors are not used, that is cols.default = FALSE. |
scale |
Default is row. Scale and center either "none","row", or "column"). |
classvec,classvec2 |
A |
classvecCol |
A vector of length the number of levels in the factor classvec. These are the colors to be used for the row or column colorbar. Colors should be in the same order, as the levels(factor(classvec)) |
distfun |
A character, indicating function used to compute the distance between both rows and columns. Defaults to 1- Pearson Correlation coefficient |
method |
The agglomeration method to be used. This should be one of '"ward"', '"single"','"complete"', '"average"', '"mcquitty"', '"median"' or '"centroid"'. See |
dualScale |
A |
zlim |
A |
scaleKey |
A |
returnSampleTree |
A |
.
... |
further arguments passed to or from other methods. |
The hierarchical plot is produced using average linkage cluster analysis with a
correlation metric distance. heatplot
calls heatmap.2
in the R package gplots
.
NOTE: We have changed heatplot scaling in made4 (v 1.19.1) in Bioconductor v2.5. Heatplot by default dual scales the data to limits of -3,3. To reproduce older version of heatplot, use the parameters dualScale=FALSE, scale="row".
Plots a heatmap with dendrogram of hierarchical cluster analysis. If returnSampleTree is TRUE, it returns an object dendrogram
which can be manipulated using
Because Eisen et al., 1998 use green-red colours for the heatmap heatplot
uses these by default however a blue-red or yellow-blue are easily obtained by
changing lowcol and highcol
Aedin Culhane
Eisen MB, Spellman PT, Brown PO and Botstein D. (1998). Cluster Analysis and Display of Genome-Wide Expression Patterns. Proc Natl Acad Sci USA 95, 14863-8.
See also as hclust
,
heatmap
and dendrogram
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | data(khan)
## Change color scheme
heatplot(khan$train[1:30,])
heatplot(khan$train[1:30,], cols.default=FALSE, lowcol="white", highcol="red")
## Add labels to rows, columns
heatplot(khan$train[1:26,], labCol = c(64:1), labRow=LETTERS[1:26])
## Add a color bar
heatplot(khan$train[1:26,], classvec=khan$train.classes)
heatplot(khan$train[1:26,], classvec=khan$train.classes,
classvecCol=c("magenta", "yellow", "cyan", "orange"))
## Change the scaling to the older made4 version (pre Bioconductor 2.5)
heatplot(khan$train[1:26,], classvec=khan$train.classes,
dualScale=FALSE, scale="row")
## Getting the members of a cluster and manuipulating the tree
sTree<-heatplot(khan$train, classvec=khan$train.classes,
returnSampleTree=TRUE)
class(sTree)
plot(sTree)
## Cut the tree at the height=1.0
lapply(cut(sTree,h=1)$lower, labels)
## Zoom in on the first cluster
plot(cut(sTree,1)$lower[[1]])
str(cut(sTree,1.0)$lower[[1]])
## Visualizing results from an ordination using heatplot
if (require(ade4, quiet = TRUE)) {
# save 5 components from correspondence analysis
res<-ord(khan$train, ord.nf=5)
khan.coa = res$ord
}
# Provides a view of the components of the Correspondence analysis
# (gene projection)
# first 5 components, do not cluster columns, only rows.
heatplot(khan.coa$li, dend="row", dualScale=FALSE)
# Provides a view of the components of the Correspondence analysis
# (sample projection)
# The difference between tissues and cell line samples
# are defined in the first axis.
# Change the margin size. The default is c(5,5)
heatplot(khan.coa$co, margins=c(4,20), dend="row")
# Add a colorbar, change the heatmap color scheme and no scaling of data
heatplot(khan.coa$co,classvec2=khan$train.classes, cols.default=FALSE,
lowcol="blue", dend="row", dualScale=FALSE)
apply(khan.coa$co,2, range)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.