Just wondering how you determine the range of colors at which you represent your expression data. Is there a standard or is it case-by-case basis (i.e. expecting minute changes between groups, etc)?
library(gplots) # contains heatmap.2
plotgenes <- matrix(rnorm(1000),100,10) # generate random data
colbreak = c(seq(-2,-.5,length=100),seq(-.5,.5,length=100),seq(.5,2,length=100))
mycolors <- colorRampPalette(c("red", "black", "green"))(n = 299)
par(cex.main=.8)
ht <- heatmap.2(plotgenes, main=title, col=mycolors, breaks=colbreak,
density.info="none", trace="none", srtCol = 45, margins=c(7,10), cexCol= .7,
offsetCol = -.6, dendrogram=c("none"), symm=F,symkey=F,symbreaks=T,
scale="row", Colv = NA)
1 answer
In my experience it's case by case because data sets have different levels of spread and significance. But I usually expect, and am satisfied to see -3 to 3 (encompassing 8-fold expression differences in log2 scale) because a lot of data sets fit in that range on microarray platforms, and it's comfortable biologically. If it's wider than that - good for you; if it's narrower than that, good luck convincing me. By the way, you might add the following two lines to your code above:
library(gplots) # contains heatmap.2
plotgenes <- matrix(rnorm(1000),100,10) # generate random data
(By the way, in your example, the color breaks are not linear across the range of -2 to 2, which should only be done as long as a legend is also drawn to clearly illustrate the color spectrum).
Log in to answer this question.