[BioC] heatmap and hclust results

Antoine Lucas antoinelucas at libertysurf.fr
Mon Mar 13 09:31:11 CET 2006


Le Thu, 9 Mar 2006 14:54:52 +0100 (CET)
kfbargad at ehu.es a écrit:

> Dear list,
> 
> I obtained a dendrogram for a set of d.e genes using hclust() with 
> the following code:
> 
> mygenes.tree<-exprs(mygenes.eset)
> r = cor(mygenes.tree, method=”pearson”)
> d = 1 - r
> hc = hclust(as.dist(r), method=”average”)
> plot(hc, labels = sampleNames)
> 
> and tried to compare it with a heatmap with the same genes:
> 
> heatmap(mygenes.tree, col=rbg, distfun = function(c){1 - Dist(c,method 
> = "pearson")},hclustfun= function (d) {hclust(d, method=”average”) }, 
> labCol= sampleNames,Colv=cov(mygenes.tree),Rowv=cov(mygenes.tree)))
> 


Hi,

function Dist implement distance "centered pearson" and "uncentered pearson" with methods "pearson" and "correlation" (distance based on correlation). 

You should have same results with functions:
1-cor(t(x),method="pearson") 
Dist(x,method="correlation")

Antoine.

-- 
Antoine Lucas
Centre de génétique Moléculaire, CNRS
91198 Gif sur Yvette Cedex
Tel: (33)1 69 82 38 89
Fax: (33)1 69 82 38 77



More information about the Bioconductor mailing list