Hi Biostars,
I recently read a post on heatmap by Mick Watson https://biomickwatson.wordpress.com/2015/04/05/you-probably-dont-understand-heatmaps/
Also see a previous post at biostars When Using Heatmap.2 From R To Make A Heatmap Of Microarray Data, How Are The Genes Clustered?
They cleared some of my confusions on heatmap.
However, I still have questions on heatmap. Now, I have a microarray gene expression matrix (control vs Knockdown, triplicates for each condition) , and I want to draw a heatmap. there are several ways to select a subset of the genes to make a heatmap:
1) Use genefilter package, to select the first 100 great varied genes.
library(genefilter)
e<- exprs(eset)
rv<- rowVars(e)
idx<- order(-rv)[1:100]
mat<- e[idx,]
2) Select the genes that are differentially expressed with a p.adjust < 0.05
and abs(logFC) >1
So, what do you use for selecting genes? I will stick using pearson correlation as distance measure and scale row by using scale="row" in the heatmap.2 function.
Ideally, I should see Knockdown samples cluster together, control samples cluster together. and green(down-regulated) and red(up-regulated) colors cluster together (by scaling with row, we are looking at the "shape" for each gene as in the Mick's post). But my heatmap still looks not as I expected(I could not see clear patterns going no). Do you have any suggestions?
Thanks so much!
Ming