[BioC] dendrograms on heatmap.2 (gplots)

Steve Lianoglou mailinglist.honeypot at gmail.com
Sat May 28 15:31:55 CEST 2011


Hi,

On Sat, May 28, 2011 at 12:58 AM, Gavin Koh <gavin.koh at gmail.com> wrote:
> Dear all,
>
> I have human Illumina gene expression data that I want to present in a
> heatmap. I have already for the perfect heatmap using heatmap.2
> (gplots) and RColorBrewer (R 2.13.0). I just want to put an dendrogram
> on the columns, but the default behaviour of heatmap.2 is to reorder
> the columns, which I do not want.
>
> Reading the heatmap.2 help file, it looks like I would need hclust()
> and dendrogram() to first generate the dendrogram (ideally
> unsupervised k-nearest neighbours), which I can do easily, but again:
> heatmap.2 will just reorder the columns according to the dendrogram.
>
> Help, please? How do I get R to draw me a KNN dendrogram with two
> clusters and add it to my heatmap without reordering it?

I could be mistaken, but I'm not sure that you can.

Let's think of the most pathological case:

Imagine that the first and last column of your expression matrix are
considered closest by their distance on the dendrogram. How would you
draw the dendrogram "correctly" without first moving the first and
last columns next to each other?

I guess your situation isn't as extreme as that, but ... I'm guessing
you think your columns are already "grouped' together and just want to
draw the dendrogram on top to better illustrate that point, but when
you do it ends up showing you something that is different than you
expected to see?

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list