[BioC] Heatmap hints and identifying differentially expressed genes
mariherrmann at gmx.de
Mon Mar 2 16:10:14 CET 2009
you can set up every color you want with this command:
mycolors<-function(n) colorpanel(n, "blue", "white", "brown")
you can fit in every color from the R color chart, which you can find here:
in the heatmap-command you set col=mycolors(32)
I hope this helps you!
Am 3/2/09 3:34 PM schrieb "Amy Johnson" unter <a7johnson at gmail.com>:
> 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,
> trace="none", dendrogram="none");
> 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.
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> Search the archives:
More information about the Bioconductor