[R] heatmap.2
John Celniker
celniker.john at gmail.com
Wed Oct 14 05:04:45 CEST 2009
Hi folks,
I have been working with the ellipse library and trying to use the
heatmap.2 function. I have called the function as follows
hh <- heatmap.2(DATA, Rowv= F, trace = "none",
colsep=seq(1, 4), rowsep = seq(1,dim(GENES)[1]), col =
brewer.pal(9, "YlOrRd"),
lmat=rbind( c(3, 4,0), c(2,1,1)), lwid=c(0.2, 1,0.5 ), lhei= c
(0.18,0.5),
breaks = br1)
where DATA is a numeric matrix and
>br1
[1] 0.0000000 0.5337751 1.0675502 1.6013253 2.1351003 2.6688754
3.2026505 3.7364256 4.2702007
[10] 4.8039758
when I try to change the breaks to:
> br2
[1] 0.0000000 0.5337751 1.0675502 1.6013253 2.1351003 3.0000000
3.5000000 4.0000000 4.5000000
[10] 4.8039758
I get the correct heatmap representation but the color key does not
update correctly to reflect changes in breaks even though the
superimposed histogram is correct.
I looked at the souce code for heatmap.2. The relevant section of the
function that outputs the color key begins at line 324, but I could
not figure out how I could fix it.
Thanks for any help on this!
John Celniker
More information about the R-help
mailing list