[BioC] dendrograms on heatmap.2 (gplots)
Gavin Koh
gavin.koh at gmail.com
Sat May 28 17:06:28 CEST 2011
Dear Steve, I have healthy controls and patients, so two groups.
k-means misclassifies a few study subjects, but by and large,
redrawing the dendrogram while preserving the ordering is not going to
serious mess things up. Gavin.
On 28 May 2011 15:31, Steve Lianoglou <mailinglist.honeypot at gmail.com> wrote:
> 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
>
--
Hofstadter's Law: It always takes longer than you expect, even when
you take into account Hofstadter's Law.
—Douglas Hofstadter (in Gödel, Escher, Bach, 1979)
More information about the Bioconductor
mailing list