[BioC] heatmaps and pearson correlation

Wolfgang Huber w.huber at dkfz-heidelberg.de
Wed Jul 21 10:37:59 CEST 2004


Arne.Muller at aventis.com wrote:
> 
> Tme values in the heatmap matrix range from 0 to 17 were 1 is neutral. 
> I'd like to have a gradient from blue (values 0 to >1) to grey (neutral, 
 > ere 1) and red (value >1 to 17). I've tried maPalette from the marray
 > package, the colors don't seem to be assigned as I'd like them
 > he value range from 0 to 17 of my data matrix gets distributed evenly
> overthe color range).>

Assuming that your data doesn't really start at 0 but at some small 
positive value, you could log-transform them:

nx <- log(x)
nx <- nx / max(abs(nx)) + 0.5

and then they live in the interval [0,1] with 0.5 in the middle.

For color maps, you may also try geneplotter::colorRamp and the 
RColorBrewer packages.

Bw
  Wolfgang

-------------------------------------
Wolfgang Huber
Division of Molecular Genome Analysis
German Cancer Research Center
Heidelberg, Germany
Phone: +49 6221 424709
Fax:   +49 6221 42524709
Http:  www.dkfz.de/abt0840/whuber



More information about the Bioconductor mailing list