Question: How to compute scale bar of the dendrogram for heatmap using heatmap2 ?
1
gravatar for jack
3.9 years ago by
jack750
Germany
jack750 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 • 1.9k views
ADD COMMENTlink modified 3.9 years ago by alolex890 • written 3.9 years ago by jack750

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

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by ethan.kaufman360
0
gravatar for alolex
3.9 years ago by
alolex890
United States
alolex890 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 3.9 years ago • written 3.9 years ago by alolex890
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: 1479 users visited in the last hour