[BioC] Adjusting contrast in a heatmap

Wolfgang Huber whuber at embl.de
Thu Apr 15 00:37:27 CEST 2010


Hi Tony


One way of improving contrast (but loosing the quantitative scale) is to 
rank-transform the image. By definition, this uses the available color 
range uniformly.


Example:

library(affydata)
data("Dilution")

image(Dilution[,1], transfo=function(x) x)
image(Dilution[,1], transfo=rank)
  ## the default for 'transfo' here is 'log')

	Best wishes
	Wolfgang


Anthony Ferrari ha scritto:
> Hi all,
> 
> I am working on a gene expression analysis.
> I want to plot the heatmap resulting from the clustering (for both arrays
> and genes)
> 
> I am generating this plot with image() function with a red-black-green color
> palette but the resulting image has a really poor contrast (because of the
> extreme expression values most of the image is dark)
> 
> Is there a known graphical parameter or a simple idea which I can use to
> obtain an image with good contrast ? (As we usually do in the pixels
> settings with treeview software )
> 
> Best,
> 
> Tony
> 
> ps : I don't wanna use existing packages like heatmap or heatmap.plus as I
> am customizing distances and linkage.
> 
> thanks !
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 


Wolfgang Huber
EMBL
http://www.embl.de/research/units/genome_biology/huber



More information about the Bioconductor mailing list