[BioC] Any way to ouput the reordered gene list from heatmap.2()?

Steve Lianoglou mailinglist.honeypot at gmail.com
Fri Jan 22 00:08:03 CET 2010


Hi Xiang,

1. Please keep replies on list.
2. I've never used the mad4::heatplot function, so I have no idea,
sorry. Perhaps someone else can chime in ... I do notice from its help
file, though, that it says it internally uses "heatmap" and
"dendrogram" functions, so ...

-steve

On Thu, Jan 21, 2010 at 3:48 PM, xiangxue Guo <xiangxue_guo at yahoo.com> wrote:
> Hi, Steve:
>
> when use heatplot() in package made4 for a heatmap, Do you know any corresponding function to the " rowInd in heatmap.2()" ?
>
> Xiang
>
> --- On Thu, 1/21/10, Steve Lianoglou <mailinglist.honeypot at gmail.com> wrote:
>
>> From: Steve Lianoglou <mailinglist.honeypot at gmail.com>
>> Subject: Re: [BioC] Any way to ouput the reordered gene list from heatmap.2()?
>> To: "Juan Lin" <julin at aecom.yu.edu>
>> Cc: bioconductor at stat.math.ethz.ch
>> Date: Thursday, January 21, 2010, 10:40 AM
>> Hi Juan,
>>
>> On Thu, Jan 21, 2010 at 12:20 PM, Juan Lin <julin at aecom.yu.edu>
>> wrote:
>> > Hi dear all
>> >
>> > I am using the heatmap.2 function in the gplots
>> package to draw a heatmap of
>> > 297 gene list. The plot looks very nice. But  since
>> the rows(genes) were
>> > reordered along with the dendrogram, is there any way
>> to output this
>> > reordered gene list from heatmap.2()?
>>
>> Yes ... take a closer look at the documentation for
>> ?heatmap.2 and in
>> particular look at the "Value" section.
>>
>> You'll see that you are (invisibly) returned a list that
>> contains a
>> component named "rowInd" which contains the permutation of
>> rows used
>> in the display. So, in your example, simply assign the
>> returned value
>> from heatmap.2 to a variable, and grab the appropriate
>> component, eg:
>>
>> R> h <- heatmap.2(ht, Rowv=TRUE, ...)
>> R> h$rowInd
>>
>> or
>>
>> R> rownames(ht)[h$rowInd]
>>
>> Hope that helps,
>> -steve
>>
>> >
>> >
>> >
>> > The code I used is as below:
>> >
>> >
>> >
>> > heatmap.2(ht,Rowv=TRUE,Colv=FALSE,
>> >
>> > dendrogram= "row",
>> >
>> > labRow=rownames(ht),
>> >
>> > distfun = dist,
>> >
>> > hclustfun = hclust,
>> >
>> > key=TRUE,
>> >
>> > keysize=1,
>> >
>> > lhei=c(0.5,4.5),
>> >
>> > trace="none",
>> >
>> > density.info="none",
>> >
>> > margins=c(3,8),
>> >
>> > col=rev(redgreen(256)),
>> >
>> > main="297 genes with high fold change"
>> >
>> > )
>> >
>> > Many thanks!
>> >
>> > Juan
>> >
>> > -----------------------------
>> >
>> > Juan Lin
>> >
>> > Faculty Associate
>> >
>> > Department of Epidemiology and Population Health
>> >
>> > Albert Einstein College of Medicine
>> >
>> >
>> >
>> >
>> >        [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > Bioconductor mailing list
>> > Bioconductor at stat.math.ethz.ch
>> > https://stat.ethz.ch/mailman/listinfo/bioconductor
>> > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>> >
>>
>>
>>
>> --
>> Steve Lianoglou
>> Graduate Student: Computational Systems Biology
>>  | Memorial Sloan-Kettering Cancer Center
>>  | Weill Medical College of Cornell University
>> Contact Info: http://cbio.mskcc.org/~lianos/contact
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>
>
>



-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list