[R] Analyzing dendograms??

Johan Lindberg johanl at kiev.biotech.kth.se
Mon Jan 5 12:19:11 CET 2004


Thanks for the ideas but I already tested to give the heatmapfunction the 
argument ylim but I get the following error message:

Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), ylim = 0.5 +  :
         formal argument "ylim" matched by multiple actual arguments

So then I tried to adjust the function and changed the ylim argument when 
the "heatmapfunction" calls "image". But this only makes it possible to 
zoom in on the "picture" that is drawn in the heatmapfunction. The result 
is that the function draws the full dendogram on a truncated picure.

Any ideas, anyone?

/ Johan


At 13:31 2004-01-04 -0500, you wrote:
>Johan  -
>
>Disclaimer:  I've never used  heatmap(), so probably I shouldn't
>be answering this.
>
>However ... the function  heatmap() probably calls either  plot()
>or  image() (regular graphics) or  xyplot() (lattice graphics)  in
>order to set up axes and initialize the actual plotting.  heatmap()
>may also have a  "..."  argument which passes additional parameters
>through to  plot(), unchanged.  If both of my guesses are correct
>(use  help("heatmap")  to find out) then I would try calling
>heatmap() again with an additional parameter  ylim=c(a,b),  where
>"a" and "b" are two numbers, with  a < b,  which indicate plotting
>coordinates which bracket the group of genes you wish to zoom in on.
>
>It will take a bit of experimentation to figure out what internal
>coordinate system  heatmap()  uses to do the plotting, but this
>seems like a direct way to zoom in on just a part of the plot.
>
>This is completely untested.  I leave it to you to read  help("heatmap")
>and see whether any of this makes sense.  Hope this helps.
>
>-  tom blackwell  -  u michigan medical school  -  ann arbor  -
>
>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.
> >
> > Best regards.
> >
> > / Johan
> >
> >
> >
> > 
> *******************************************************************************************
> > 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
> >

*******************************************************************************************
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




More information about the R-help mailing list