[BioC] Heatmap hints and identifying differentially expressed genes

Amy Johnson a7johnson at gmail.com
Mon Mar 2 15:34:09 CET 2009


Hi,

I'm new to biostatistics and R programming. I need some help for heatmap or 
heatmap.2 functions, especially I'm confused about the color settings. 
Here is what I'm trying to do: I have microarray data with several groups 
of treated samples and one group of control samples. I have calculated 
the averaged intensity of each gene in each group and calculated the 
simple fold change by comparing it to corresponding gene in the control 
group. I have picked the activated genes (>2-fold) and repressed genes 
(<0.5-fold). Now I need to show my boss of the fold changes in heatmap. 
I'd like to shown genes with fold changes < 1 in blue gradient color and 
genes with fold changes > 1 in red gradient color. Genes with 
fold-changes close to 1 in yellow color. How do I specify the color 
parameter in heatmap (or heatmap.2) function? 

Heat is my code (not working):

data <- read.csv("mydata.csv", header=TRUE);
library(gplots);
x <- as.matrix(data);
heatmap.2(x, Rowv=FALSE, Colv=FALSE, col=rev(redgreen(100)), key=FALSE, 
trace="none", dendrogram="none");

mydata.csv is like this:

treat1,treat2,treat3
GREB1,9.3,6.47,5.37
SUSD3,7.95,3.41,3.64
FOS,6.68,15.91,18.02
GAL,3.63,1.19,1.33
CXCL12,3.58,2.59,2.24
SLC7A5,3.52,2.1,3.24
LOC51057,3.45,0.83,2.53
PKIB,3.45,0.79,0.8
H2-ALPHA,3.38,2.57,2.22
LRRC54,3.25,7.11,5.04
...
LOC57400,0.31,0.67,0.23
ABCC3,0.3,0.47,0.4
BX118285,0.3,0.59,0.37
AY227436,0.29,0.4,0.14
AF222023,0.29,0.53,0.27
FLJ20489,0.26,0.62,0.28
FHL5,0.26,0.29,0.28
AB014766,0.24,0.38,0.22

Note that, I need heatmap to be in color blue-yellow-red, but I have no 
idea how to specify that. Any help will be appreciated. 

Here is another quick question: how do I calculate the p-value for each 
gene? I'm simply calculating the fold-changes. But it is better to do 
some kinds of statistical analysis. In my experiment, each sample group 
is in triplicate. What is the best way to pick up differentially 
expressed genes (not using fold changes)?

Thanks in advance. 

Amy



More information about the Bioconductor mailing list