[BioC] Heatmap hints and identifying differentially expressed genes
a7johnson at gmail.com
Mon Mar 2 15:34:09 CET 2009
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);
x <- as.matrix(data);
heatmap.2(x, Rowv=FALSE, Colv=FALSE, col=rev(redgreen(100)), key=FALSE,
mydata.csv is like this:
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.
More information about the Bioconductor