[BioC] Fwd: heatmap.2 question

James W. MacDonald jmacdon at uw.edu
Thu May 24 17:42:23 CEST 2012


Yep. The heatmap itself is created using image(), which plots the matrix 
from the bottom up, so the [1,1] position of the matrix is at the lower 
left of the image.


Best,

Jim

On 5/24/2012 11:29 AM, Steve Lianoglou wrote:
> Also: Someone correct me if I'm wrong, as I often turn myself around
> on this one, but also note that the y-axis you see on the heatmap.2 is
> "flipped." So the "first" row (`result$rowInd[1]`) is at the bottom of
> the heatmap, not the top.
>
> -steve
>
> On Thu, May 24, 2012 at 11:18 AM, James W. MacDonald<jmacdon at uw.edu>  wrote:
>> Hi Alyaa,
>>
>>
>> On 5/24/2012 11:04 AM, Alyaa Mahmoud wrote:
>>> Hi All
>>>
>>> How can I possibly extract the clusters by rows from a heatmap generated
>>> by
>>> heatmap.2 function. i.e. the heatmap is generated with colouring for every
>>> cluster of rows and I want to retrieve the members of each cluster.
>>
>> Note that heatmap.2() uses hclust() to create the clusters. There is a
>> function cutree() that can be used to get the groups from the output of
>> hclust().
>>
>> Also note that heatmap.2() invisibly returns a list that includes both the
>> row and column dendrograms (by returning the list invisibly, you don't get a
>> bunch of junk printed out to your console. However, if you use the
>> assignment function (<-) to assign the output to an object, you can then
>> extract whichever dendrogram you want.).
>>
>> Best,
>>
>> Jim
>>
>>
>>
>>>
>>> Any clue would be much appreciated
>>>
>>> Thank you very much
>>> Alyaa
>>>
>>> KAUST/AUC Marine Genomics Project
>>> American University in Cairo
>>> Egypt
>>> 2918
>>>
>> --
>> James W. MacDonald, M.S.
>> Biostatistician
>> University of Washington
>> Environmental and Occupational Health Sciences
>> 4225 Roosevelt Way NE, # 100
>> Seattle WA 98105-6099
>>
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>

-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list