[BioC] heatmap genenames
michael watson (IAH-C)
michael.watson at bbsrc.ac.uk
Thu Nov 4 18:34:37 CET 2004
Hi Claire
I will have a look at this tomorrow when I have R actually in front of me, but in the meantime, may I reccomend that you specifically use hclust and dist when using heatmap? I always do - it gives you more control over what exactly is going on!
So do:
d <- dist(mydata)
hc <- hclust(d)
heatmap(mydata, RowV=as.dendrogram(hc))
gene.order = hc$order
Mick
-----Original Message-----
From: Claire Wilson [mailto:ClaireWilson at picr.man.ac.uk]
Sent: Thu 11/4/2004 5:03 PM
To: alessandro ambrosi
Cc: BioC mailing list
Subject: RE: [BioC] heatmap genenames
Hello,
Many thanks for your reply, I have tried repeating the clustering done
by heatmap using hclust to obtain the row order as follows:
d <- dist(mydata)
hc.d <- hclust(d)
gene.order <- hc.d$order
and compared the order to what I see on a heatmap when I do
heatmap(mydata)
However, it would appear that the ordering of genes within a heatmap
made from heatmap(mydata) is different to that seen if a dendrogram is
made from from hc.d. So I am thinking something else happens after doing
the hierarchical clustering within the heatmap function, but I have so
far been unsuccessful in my attempts to try and work out what it is.
Claire
> Dear Claire,
>
> if I remember well heatmap uses hclust as default clustering
> function with
> distances given by "dist" that, in turn, uses "euclidean"
> distance as default.
>
> So, I guess that you should be able to obtain the desired
> order easily runing
>
> hclust(dist( your.data ))$order
>
> or something like
>
> my.cluster<-hclust(dist( my.data ))
> rownames( my.data )[my.cluster$order]
>
>
> Let me know if it works
> Alessandro
>
>
> At 15.06 04/11/2004, you wrote:
> >Dear all,
> >
> >I have been using the heatmap function to visualise my data and would
> >like to obtain a list of my genes in the same order that
> they appear in
> >the heatmap. I have looked through the mail archives and tried just
> >creating a dendogram and using order.dendogram but have so far been
> >unsuccessful. Can anyone point me in the right direction?
> >
> >cheers
> >
> >claire
> >
> >--------------------------------------------------------
> >
> >
> >This email is confidential and intended solely for the use
> o...{{dropped}}
> >
> >_______________________________________________
> >Bioconductor mailing list
> >Bioconductor at stat.math.ethz.ch
> >https://stat.ethz.ch/mailman/listinfo/bioconductor
>
>
>
>
--------------------------------------------------------
This email is confidential and intended solely for the use o...{{dropped}}
_______________________________________________
Bioconductor mailing list
Bioconductor at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/bioconductor
More information about the Bioconductor
mailing list