This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Question About Heatmap In R

Hi everyone,

I did a heatmap using library(gplots) in R. I have a very nice plot but I don’t know how many clusters are on the plot! is there any function or something for extracting this information ?

Thanks

Sara

heatmap r

3 answers

Hi,

This article should help you : link text

You can also look at this library: heatmap_plus {Heatplus}

Hi Sara, Do you mean you would like to see the dendrogram of your data alongside the heatmap rows/columns? There is a nice walk-through of the documentation of gplot 2.10.1 here.

This question isn't really bioinformatics specific, but...

If you use hclust to define your clusters, then you can do this: http://stackoverflow.com/questions/7227008/retrieving-members-from-a-cluster-using-r

The heatmap.2 function, if you capture the output, should return a dendrogram that you can examine using list syntax...

h<-heatmap.2(as.matrix(USArrests))
labels(h$rowDendrogram[[1]])
labels(h$rowDendrogram[[2]][[2]])

Log in to answer this question.