Heatmap hints and identifying differentially expressed genes
2
0
Entering edit mode
Amy Johnson ▴ 40
@amy-johnson-3014
Last seen 9.6 years ago
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
Microarray Microarray • 2.6k views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 13 months ago
United States
Hi, > 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)? Yeah, just fixing a global threshold of fold change for differential expression isn't really the best. For a relatively easy way to get differentially expressed genes, look into the limma package: http://www.bioconductor.org/packages/2.3/bioc/html/limma.html It'll get you the p-values you're after, as well. Hope that helps, -steve -- Steve Lianoglou Graduate Student: Physiology, Biophysics and Systems Biology Weill Medical College of Cornell University http://cbio.mskcc.org/~lianos
ADD COMMENT
0
Entering edit mode
@marietta-herrmann-3216
Last seen 9.6 years ago
Hi Amy, 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: http://research.stowers-institute.org/efg/R/Color/Chart/ in the heatmap-command you set col=mycolors(32) I hope this helps you! Best regards, Marietta Herrmann Am 3/2/09 3:34 PM schrieb "Amy Johnson" unter <a7johnson at="" gmail.com="">: > 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 > > _______________________________________________ > 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
ADD COMMENT

Login before adding your answer.

Traffic: 524 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6