[BioC] How to use distance functions from hopach package in a heatmap?

Stefano Calza stecalza at tiscali.it
Wed Jun 22 10:34:35 CEST 2005


assuming cols of probExp are samples, you can do something like this:

ydist = as.dist(disscosangle(probesExp))
yclust = as.dendrogram(hclust(ydist,...))




On Tue, Jun 21, 2005 at 04:18:32PM -0400, Lourdes Peña Castillo wrote:
<Lourdes>I am trying to get a heatmap from gene expression data using a
<Lourdes>different distance function rather than the default (dist with
<Lourdes>euclidean distance).
<Lourdes>Specifically,  I was trying to use disscosangle available in the
<Lourdes>hopach package setting distfun as follows:
<Lourdes>>heatmap(t(probesExp), col = mypalette, distfun = disscosangle, labCol
<Lourdes>= "", scale = "none");
<Lourdes>but I get this error:
<Lourdes>Error in if (n < 2) stop("must have n >= 2 objects to cluster") : 
<Lourdes>        argument is of length zero
<Lourdes>I checked whether disscosangle could be used at all using:
<Lourdes>and it works fine.
<Lourdes>However, I could not find the right way to give it as a parameter to
<Lourdes>heatmap.  Somebody knows how to do this?
<Lourdes>In addition,  how can I  add to the image of the heatmap a map between
<Lourdes>the colors used and the values of the data? I mean how to have the
<Lourdes>color palette in one side of the image with the corresponding value
<Lourdes>each color represents.
<Lourdes>Bioconductor mailing list
<Lourdes>Bioconductor at stat.math.ethz.ch

Stefano Calza, PhD
Sezione di Statistica Medica e Biometria
Dip. di Scienze Biomediche e Biotecnologie
Università degli Studi di Brescia - Italia
Viale Europa, 11 25123 Brescia
email: calza at med.unibs.it
Telefono/Phone: +390303717532
Fax: +390303717488

Section of Medical Statistics and Biometry
Dept. Biomedical Sciences and Biotechnology
University of Brescia - Italy

More information about the Bioconductor mailing list