Question: How to compute scale bar of the dendrogram for heatmap using heatmap2 ?
1
gravatar for jack
4.3 years ago by
jack790
Germany
jack790 wrote:

Hi,

I have created a heatmap for the genes expression across different samples. I need to compute the scale bar of the dendrogram for my heatmaps which shows how the hierarchically clustered samples are similar to each other.

Does anybody knows how can I do that using heatmap2 function in R ?

R • 2.1k views
ADD COMMENTlink modified 4.3 years ago by alolex900 • written 4.3 years ago by jack790

Have you tried googling for this? This page might be helpful.

ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by ethan.kaufman360
0
gravatar for alolex
4.3 years ago by
alolex900
United States
alolex900 wrote:

To my knowledge I don't think you can do this AND have the dendrogram scale bar show up in the same figure as the heatmap--at least using the heatmap.2 function.  However, you can plot just the row and/or column dendrogram and it will show you the scale bar on that figure.  See R code below:

M <- matrix(sample.int(20, size=100, replace=TRUE), nrow=10, byrow=TRUE)
figdata <- heatmap.2(M)
names(figdata)
plot(figdata$colDendrogram)
plot(figdata$rowDendrogram)

Or, you can see if the aheamap() function from the NMF package (http://cran.r-project.org/web/packages/NMF/NMF.pdf) does what you need.  I just found this function, so haven't had a chance to experiment with it yet.

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by alolex900
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2392 users visited in the last hour