[BioC] non-symmetric heatmap colors

Wolfgang Huber huber at ebi.ac.uk
Thu Feb 3 04:48:43 CET 2005


Hi Arne,

try the following:

library(RColorBrewer)
library(geneplotter)
f = colorRamp(brewer.pal(11, "RdBu"))

then f is a functions that takes numbers between 0 and 1 and maps them
to colors between red and blue.

And

g = function(x) f( (x-x0)/(x1-x0) )

maps numbers between x0 and x1 to these colors.

Best wishes
  Wolfgang


Arne.Muller at sanofi-aventis.com wrote:
> Hello,
> 
> well, it's about heatmap colors, again ... .
> 
> Does anybody know a package to create a non-symmetric color map with user-choosen mir point and satuaration? I've a fold-change matrix, with values from -3 fold (ratio 1/3) to +7 fold. I'd like to go from 0.5 (green) to 1 (black) to 3 (red).
> 
> I think maPallete just assigns the lowest FC to the first color and the highest FC to the last color, i.e. an evenly distributed color list, right?
> 
> 	Any hints are welcome,
> 
> 	Arne

-------------------------------------
Wolfgang Huber
European Bioinformatics Institute
European Molecular Biology Laboratory
Cambridge CB10 1SD
England
Phone: +44 1223 494642
Fax:   +44 1223 494486
Http:  www.ebi.ac.uk/huber



More information about the Bioconductor mailing list