[R] Analyzing dendograms??

Sean Davis sdavis2 at mail.nih.gov
Tue Jan 6 13:22:24 CET 2004


Johan,

This is possible.  It is not an interactive process, though--R does not have
that capability with heatmap.  See ?cutree which you can apply to gclus to
get the indices of genes in clusters that you define based on the dendrogram
and then use these genes as input to heatmap (this will amount to a subset
of your M-matrix).

Sean

----- Original Message -----
From: "Johan Lindberg" <johanl at kiev.biotech.kth.se>
To: <r-help at stat.math.ethz.ch>
Sent: Tuesday, January 06, 2004 6:49 AM
Subject: RE: [R] Analyzing dendograms??


Id like to thank you guys how have taken the time to look into my problem.
I think the question drifted away from my original question as Simon Fear
said. What I wanted to know was the following:

""I have used heatmap to visualize my microarray data. I have a matrix of
M-values. I do the following.

#The distance between the columns.
sampdist <- dist(t(matrix[,]), method="euclidean")
sclus <- hclust(sampdist, method="average")
#The distance between the rows.
genedist <- dist(matrix[,], method="euclidean")
gclus <- hclust(genedist, method="average")
heatmap(matrix[,],Rowv=as.dendrogram(gclus),Colv=as.dendrogram(sclus),
col=rbg)

So far so good. But what if I want to look at a group of genes that appear
to have the same expression pattern in the heatmap? How do I zoom in on a
dendogram in a heatmap to look at which genes that are forming the
interesting clusters? I would really appreciate if someone could give me a
pointer.""

But since I did not get any good answers of how to analyze
dendograms/heatmaps/hclust in R in a proper way I ask myself, is there a
way of doing this in R? or is this a limitation of the functions available
today in the R programming language. I know there are some functions like
cutree etc but the documentation is really, really sparse. Are there any
tutorials out there of how to do these things? or should one turn to
alternative programs like MEV from TIGR?

A confused mind looking for answers..

/ J





At 15:20 2004-01-05 +0000, Simon Fear wrote:
>Post script: I'm afraid my `solution` was no good, because
>I forgot the need to change nc and nr. (I got bogged down
>in passing ylim and lost track of your real question.)
>
>Hopefully someone with a deeper understanding of the
>original problem will come to the rescue. If not there may
>be milage on restricting your matrix[,] to matrix[<cond1>,<cond2>]
>according to information in sclus and gclus. But I am in
>over my depth here.
>
> > >On Sun, 4 Jan 2004, Johan Lindberg wrote:
> > >
> > > >
> > > > I have used heatmap to visualize my microarray data. I
> > have a matrix of
> > > > M-values. I do the following.
> > > >
> > > > #The distance between the columns.
> > > > sampdist <- dist(t(matrix[,]), method="euclidean")
> > > > sclus <- hclust(sampdist, method="average")
> > > > #The distance between the rows.
> > > > genedist <- dist(matrix[,], method="euclidean")
> > > > gclus <- hclust(genedist, method="average")
> > > >
> > heatmap(matrix[,],Rowv=as.dendrogram(gclus),Colv=as.dendrogram
> > (sclus),
> > > col=rbg)
> > > >
> > > > So far so good. But what if I want to look at a group of
> > genes that appear
> > > > to have the same expression pattern in the heatmap? How
> > do I zoom in on a
> > > > dendogram in a heatmap to look at which genes that are forming the
> > > > interesting clusters? I would really appreciate if
> > someone could give me a
> > > > pointer.
>
>Simon Fear
>Senior Statistician
>Syne qua non Ltd
>Tel: +44 (0) 1379 644449
>Fax: +44 (0) 1379 644445
>email: Simon.Fear at synequanon.com
>web: http://www.synequanon.com
>
>Number of attachments included with this message: 0
>
>This message (and any associated files) is confidential and\...{{dropped}}
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

****************************************************************************
***************
Johan Lindberg
Royal Institute of Technology
AlbaNova University Center
Stockholm Center for Physics, Astronomy and Biotechnology
Department of Molecular Biotechnology
106 91 Stockholm, Sweden

Phone (office): +46 8 553 783 45
Fax: + 46 8 553 784 81
Visiting adress: Roslagstullsbacken 21, Floor 3
Delivery adress: Roslagsvägen 30B

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html




More information about the R-help mailing list