[BioC] heatmaps and pearson correlation
Arne.Muller at aventis.com
Arne.Muller at aventis.com
Wed Jul 21 09:45:22 CEST 2004
Thanks for your help, this is exactly what I was looking for. However, now I've a problem with the colors of the heatmap.
Tme values in the heatmap matrix range from 0 to 17 were 1 is neutral. I'd like to have a gradient from blue (values 0 to >1) to grey (neutral, here 1) and red (value >1 to 17). I've tried maPalette from the marray package, the colors don't seem to be assigned as I'd like them (the value range from 0 to 17 of my data matrix gets distributed evenly overthe color range).
I'm happy for any suggestions, on how to construct the gradients, maybe there's already a package available ...
thanks again for your help,
Arne
-----Original Message-----
From: Wolski [mailto:wolski at molgen.mpg.de]
Sent: 20 July 2004 16:45
To: Muller, Arne PH/FR; bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] heatmaps and pearson correlation
Hi!
If your data are in the matrix use cor.
cor returns you the correlation matrix.
use ?t (transpose)
to compute the simmilarities either for rows or for columns.
mydist<-as.dist(1-cor(mymatrix))
now you can pass it to hclust.
Hope it helps.
*********** REPLY SEPARATOR ***********
On 7/20/2004 at 4:27 PM Arne.Muller at aventis.com wrote:
Hello,
I'm trying to construct a heatmap by clustering two dimensions (genes, treatments) using pearson correlation for both the distances (1 - correlation). Unfortinately the hclust and dist methods don't provide the pearson as a metric for distances (is there any reason for this?).
Has anyone a hint on how to make hclust and heatmap to cluster both dimensions via pearson correlation?
thanks a lot for help,
Arne
Dipl. bio-chem. Eryk Witold Wolski @ MPI-Moleculare Genetic
Ihnestrasse 63-73 14195 Berlin 'v'
tel: 0049-30-83875219 / \
mail: wolski at molgen.mpg.de ---W-W---- http://www.molgen.mpg.de/~wolski
More information about the Bioconductor
mailing list