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

Lourdes Peña Castillo lourdes.pena at gmail.com
Tue Jun 21 22:18:32 CEST 2005


Hello,

I am trying to get a heatmap from gene expression data using a
different distance function rather than the default (dist with
euclidean distance).

Specifically,  I was trying to use disscosangle available in the
hopach package setting distfun as follows:

>heatmap(t(probesExp), col = mypalette, distfun = disscosangle, labCol
= "", scale = "none");

but I get this error:

Error in if (n < 2) stop("must have n >= 2 objects to cluster") : 
        argument is of length zero

I checked whether disscosangle could be used at all using:
as.dist(disscosangle(probesExp))
and it works fine.
However, I could not find the right way to give it as a parameter to
heatmap.  Somebody knows how to do this?

In addition,  how can I  add to the image of the heatmap a map between
the colors used and the values of the data? I mean how to have the
color palette in one side of the image with the corresponding value
each color represents.

Thanks!

Lourdes



More information about the Bioconductor mailing list