[BioC] heatmap() column ordering

Vincent Carey 525-2265 stvjc at channing.harvard.edu
Mon Nov 3 18:19:05 MET 2003


> I have four experiments (two dye swaps) and this is the original order:
> > colnames(mav)
> [1] Cy3="Cancer" Cy5="Normal" Cy3="Cancer" Cy5="Normal" Cy3="Normal"
> Cy5="Cancer"Cy3=" Normal" Cy5="Cancer"
>
> I want to get a heatmap of the top 30 expressed genes but ordered by
> cancerous vs. normal tissue.
> > hv <- heatmap(mav[genes %in% topgenes$Name,],col=RGcol)
> > title("Heatmap of Top 30 genes")
> > str(hv)
> List of 2
>  $ rowInd: int [1:30] 5 8 30 13 7 27 19 21 25 26 ...
>  $ colInd: int [1:8] 4 3 8 7 1 5 2 6
>
> No matter what I do, the columns are reordered. Furthermore, if I set Colv=F
> the heatmap stays the same but the ordering changes.

I believe this needs to be taken up with the R developers.
I have not seen how to suppress reordering short of going
into the source and commenting out the reordering step.

A non-invasive workaround is to create a dendrogram that corresponds
to the order you desire and to use that as the argument value.
In my case, I clustered 1:n, reordered the result a little
bit and I was able to subvert the heatmap behavior.  Sorry for
the vague account -- it was an emergency operation and the
materials are not ready to hand.



More information about the Bioconductor mailing list