Entering edit mode
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
> ********************************************
>