Colsep for dendrogram and ColSideColors in heatmap.2
0
0
Entering edit mode
3 months ago
fabian ▴ 10

Hi dear community,

I created a heat map of DE genes from my RNA-Seq experiment with the heatmap.2 function. I would like to seperate the two main clusters in my heat map visually.

I managed to seperate the columns using the colsep and sepwidth arguments of the function but cant manage to seperate the dendrogram or the colours of the groups.

col.pan <- colorpanel(100, "blue", "white", "red")
colrow.colors <- case_when(
  colnames(logCPM) == "No" ~ "yellow",
  colnames(logCPM) == "Yes" ~ "red"
)

heatmap_plot <- heatmap.2(logCPM, 
          col = col.pan,
          Rowv = TRUE,
          scale = "none",
          trace = "none", 
          dendrogram = "column", #both 
          cexRow = 5, 
          cexCol = 5, 
          density.info = "none",
          margin = c(10, 30),
          ColSideColors = colrow.colors,
          labCol = "",
          lhei = c(0.85, 6.8),
          lwid = c(2.5, 20),
          keysize = c(0.6),
          key.par = list(cex = 3),
          labRow = NA,
          colsep = c(40),
          sepwidth = c(2, 5),
          distfun = function(x) dist(x, method="euclidean"),
          hclustfun = function(x) hclust(x, method="ward.D2")
          )

Heatmap generated with the code

Heatmap DGE EdgeR heatmap.2 • 356 views
ADD COMMENT

Login before adding your answer.

Traffic: 5248 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