[BioC] How to use distance functions from hopach package in a heatmap?
Katherine Pollard
kpollard at soe.ucsc.edu
Fri Jul 1 01:50:53 CEST 2005
FYI: the dendogram that is made with Stefano's code is the usual binary
hierarchical tree from hclust, but using the new distance function (eg:
disscosangle). At this time, it is not possible to view the hopach
hierarchical tree (which is non-binary) with heatmap. However, the
function hopach2tree in the hopach package writes the necessary files to
view the hopach tree created with any distance in the java software tool
mapletree. This is the latest version of Mike Eisen's TreeView, which now
has a view for hopach trees.
Cheers,
Katie
> Date: Tue, 21 Jun 2005 16:18:32 -0400
> From: Lourdes Pe?a Castillo <lourdes.pena at gmail.com>
> Subject: [BioC] How to use distance functions from hopach package in a
> heatmap?
> To: bioconductor at stat.math.ethz.ch
> Message-ID: <1c759b1505062113181a20c481 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> 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
> Date: Wed, 22 Jun 2005 10:34:35 +0200
> From: Stefano Calza <stecalza at tiscali.it>
> Subject: Re: [BioC] How to use distance functions from hopach package
> in a heatmap?
> To: bioconductor at stat.math.ethz.ch
> Message-ID: <20050622083435.GA5995@#drslump>
> Content-Type: text/plain; charset=iso-8859-1
>
> Hi,
>
> assuming cols of probExp are samples, you can do something like this:
>
> ydist = as.dist(disscosangle(probesExp))
> yclust = as.dendrogram(hclust(ydist,...))
>
> heatmap(probesExp,...,Colv=yclust)
>
> HIH
>
> Stefano
>
> On Tue, Jun 21, 2005 at 04:18:32PM -0400, Lourdes Pe?a Castillo wrote:
> <Lourdes>Hello,
> <Lourdes>
> <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>
> <Lourdes>Specifically, I was trying to use disscosangle available in the
> <Lourdes>hopach package setting distfun as follows:
> <Lourdes>
> <Lourdes>>heatmap(t(probesExp), col = mypalette, distfun = disscosangle, labCol
> <Lourdes>= "", scale = "none");
> <Lourdes>
> <Lourdes>but I get this error:
> <Lourdes>
> <Lourdes>Error in if (n < 2) stop("must have n >= 2 objects to cluster") :
> <Lourdes> argument is of length zero
> <Lourdes>
> <Lourdes>I checked whether disscosangle could be used at all using:
> <Lourdes>as.dist(disscosangle(probesExp))
> <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>
> <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>
> <Lourdes>Thanks!
> <Lourdes>
> <Lourdes>Lourdes
> <Lourdes>
> <Lourdes>_______________________________________________
> <Lourdes>Bioconductor mailing list
> <Lourdes>Bioconductor at stat.math.ethz.ch
> <Lourdes>https://stat.ethz.ch/mailman/listinfo/bioconductor
>
> --
> 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
>
>
>
> ------------------------------
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>
>
> End of Bioconductor Digest, Vol 28, Issue 21
> ********************************************
>
More information about the Bioconductor
mailing list