This is a test version of Biostars. For the public version, visit https://www.biostars.org.
complex heatmap with CPM

Hi all, To draw complex heatmap, I started to use ComplexHeatmap package in R. I have a RNASeq data which has 2 cell lines with 2 conditions (CellLine1-WT, CellLine1-KO, CellLine2-WT, CellLine2-KO). When I try to draw heatmap with log2(CPM+1) values, the h2052 doesnt cluster together but they should cluster together. Is there a specific way to do that? enter image description here

edger rna-seq dge heatmap deseq2

Are you telling us that H2052_ATG_1 and 2 should be clustering with H2052_REN_1 and 2? Because my eyes are telling me that H2052_REN_1/2 are clustered exactly as they should be.

true. Also the clustering of the samples can change depending on the genes you choose. I have a tutorial on it at

and deep understand heatmap at

1 answer

You seem to use logcpm rather than scaled counts for the heatmap. This causes clustering by expression level rather than by differences in expression. See my answer here for details:

Scaling RNA-Seq data before clustering?

Log in to answer this question.