Gplots Bioconductor

broken image


Draws heatmap with dendrograms.
  • DOI: 10.18129/B9.bioc.DiffBind Differential Binding Analysis of ChIP-Seq Peak Data. Bioconductor version: Release (3.12) Compute differentially bound sites from multiple ChIP-seq experiments using affinity (quantitative) data.
  • Gplots: Various R Programming Tools for Plotting Data. Various R programming tools for plotting data, including: - calculating and plotting locally smoothed summary.
  • DOI: 10.18129/B9.bioc.genefilter genefilter: methods for filtering genes from high-throughput experiments. Bioconductor version: Release (3.12) Some basic functions for filtering genes.
  • マイクロアレイ解析やオミックス解析でよく見かけるheatmap。 下記サイトを参考にheatmapの描き方を勉強したのでメモ。.

DOI: 10.18129/B9.bioc.limma Linear Models for Microarray Data. Bioconductor version: Release (3.12) Data analysis, linear models and differential expression for microarray data.

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

Keywords
manip, hplot
Usage
Arguments
dataset
a matrix, data.frame, ExpressionSet or marrayRaw-class. If the input is gene expression data in a matrix or data.frame. The rows and columns are expected to contain the variables (genes) and cases (array samples) respectively.
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 TRUE. Use blue-brown color scheme.
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 factor or vector which describes the classes in columns or rows of the dataset. Default is NULL. If included, a color bar including the class of each column (array sample) or row (gene) will be drawn. It will automatically add to either the columns or row, depending if the length(as.character(classvec)) nrow(dataset) or ncol(dataset).
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 hclust for more details. Default is 'ave'
dualScale
A logical indicating whether to scale the data by row and columns. Default is TRUE
zlim
A vector of length 2, with lower and upper limits using for scaling data. Default is c(-3,3)
scaleKey
A logical indicating whether to draw a heatmap color-key bar. Default is TRUE
returnSampleTree
A logical indicating whether to return the sample (column) tree. If TRUE it will return an object of class dendrogram. Default is FALSE
...
further arguments passed to or from other methods.
Details

The hierarchical plot is produced using average linkage cluster analysis with acorrelation 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 Bioconductor

Value
dendrogram which can be manipulated using
Note

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

References

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

See also as hclust, heatmap and dendrogram

Aliases
  • heatplot
Examples
Documentation reproduced from package made4, version 1.46.0, License: Artistic-2.0
Bioconductor

Community examples

API documentation

I'm comparing two ways of creating heatmaps with dendrograms in R, one with made4's heatplot (from bioconductor) and one with gplots of heatmap.2. The appropriate results depend on the analysis but I'm trying to understand why the defaults are so different, and how to get both functions to give the same result (or highly similar result) so that I understand all the 'blackbox' parameters that go into this.

This is the example data and packages:

Clustering the data with heatmap.2 gives:

Using heatplot gives:

Gplots Bioconductor

very different results and scalings initially. heatplot results look more reasonable in this case so I'd like to understand what parameters to feed into heatmap.2 to get it to do the same, since heatmap.2 has other advantages/features I'd like to use and because I want to understand the missing ingredients.

Bioconductor

Community examples

API documentation

I'm comparing two ways of creating heatmaps with dendrograms in R, one with made4's heatplot (from bioconductor) and one with gplots of heatmap.2. The appropriate results depend on the analysis but I'm trying to understand why the defaults are so different, and how to get both functions to give the same result (or highly similar result) so that I understand all the 'blackbox' parameters that go into this.

This is the example data and packages:

Clustering the data with heatmap.2 gives:

Using heatplot gives:

Gplots Bioconductor

very different results and scalings initially. heatplot results look more reasonable in this case so I'd like to understand what parameters to feed into heatmap.2 to get it to do the same, since heatmap.2 has other advantages/features I'd like to use and because I want to understand the missing ingredients.

heatplot uses average linkage with correlation distance so we can feed that into heatmap.2 to ensure similar clusterings are used (based on: https://stat.ethz.ch/pipermail/bioconductor/2010-August/034757.html)

resulting in:

this makes the row-side dendrograms look more similar but the columns are still different and so are the scales. It appears that heatplot scales the columns somehow by default that heatmap.2 doesn't do that by default. If I add a row-scaling to heatmap.2, I get:

which still isn't identical but is closer. How can I reproduce heatplot's results with heatmap.2? What are the differences?

edit2: it seems like a key difference is that heatplot rescales the data with both rows and columns, using:

this is what I'm trying to import to my call to heatmap.2. The reason I like it is because it makes the contrasts larger between the low and high values, whereas just passing zlim to heatmap.2 gets simply ignored. How can I use this 'dual scaling' while preserving the clustering along the columns? All I want is the increased contrast you get with:

heatplot(..., dualScale=TRUE, scale='none')

compared with the low contrast you get with:

heatplot(..., dualScale=FALSE, scale='row')

any ideas on this?





broken image