[BioC] heatmaps and pearson correlation

Wolski wolski at molgen.mpg.de
Tue Jul 20 16:44:35 CEST 2004


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


	[[alternative HTML version deleted]]



More information about the Bioconductor mailing list