heatmap genenames
5
0
Entering edit mode
Claire Wilson ▴ 280
@claire-wilson-273
Last seen 10.3 years ago
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}}
• 1.6k views
ADD COMMENT
0
Entering edit mode
@michael-watson-iah-c-378
Last seen 10.3 years ago
Hi Claire What does your call to heatmap look like? Do you cluster using something like hclust() first, or do you just put in a call to heatmap? Mick -----Original Message----- From: Claire Wilson [mailto:ClaireWilson@picr.man.ac.uk] Sent: Thu 11/4/2004 2:06 PM To: BioC mailing list Cc: Subject: [BioC] heatmap genenames 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@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
Claire Wilson ▴ 280
@claire-wilson-273
Last seen 10.3 years ago
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@stat.math.ethz.ch > >https://stat.ethz.ch/mailman/listinfo/bioconductor > > > > -------------------------------------------------------- This email is confidential and intended solely for the use o...{{dropped}}
ADD COMMENT
0
Entering edit mode
If I remember correctly, heatmap does reorder the genes with respect to the dendrogram (not with R right now). Try using heatmap( ....., rowV=1:n) where n is the number of genes. Also, check the capitalization for rowV. Sean On Nov 4, 2004, at 12:03 PM, Claire Wilson wrote: > > 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@stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >> >> >> >> > > -------------------------------------------------------- > > > This email is confidential and intended solely for the use...{{dropped}}
ADD REPLY
0
Entering edit mode
@martin-maechler-2
Last seen 5.4 years ago
Switzerland
>>>>> "Claire" == Claire Wilson <clairewilson@picr.man.ac.uk> >>>>> on Thu, 4 Nov 2004 14:06:28 -0000 writes: Claire> I have been using the heatmap function to visualise Claire> my data and would like to obtain a list of my genes Claire> in the same order that they appear in the heatmap. I Claire> have looked through the mail archives and tried just Claire> creating a dendogram and using order.dendogram but Claire> have so far been unsuccessful. Can anyone point me Claire> in the right direction? Right directions: 1) Please do read the posting guide (for R-help) that applies here as well: ---> http://www.R-project.org/posting-guide.html 2) The posting guide tells among other things, to really read the help page of function. ?heatmap and look at the section called "Value:" ==> I'm pretty sure that r <- heatmap(...........) r$colInd ## gives you the desired ordering. Regards, Martin Maechler, ETH Zurich
ADD COMMENT
0
Entering edit mode
@michael-watson-iah-c-378
Last seen 10.3 years ago
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@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@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@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
Francois Pepin ★ 1.3k
@francois-pepin-1012
Last seen 10.3 years ago
Hi everyone, we've been looking at something similar to try to pick single a series of genes from the heatmap. Based on Michael's suggestion: d <- dist(mydata) hc <- hclust(d) heatmap(mydata, RowV=as.dendrogram(hc)) genes<-identify(hc) So you can select the branch(es) of interest on the dendogram and get back the list of genes selected. Francois On Thu, 2004-11-04 at 09:06, Claire Wilson 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@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT

Login before adding your answer.

Traffic: 408 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6