This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to control the order of cells in dittoHeatmap for scRNAseq data analysis?

I just found something when using dittoHeatmap. I got a gene expression data file which is called "AM". The heatmap for the first 10 genes as the following 1st figure. Then I plot another heatmap using the 8th to 17th genes, same configuration for plot.

But as you can see, for the same gene (Lats1 for example), the expression in both plots are different, somehow the cell order has been changed. Is there anyway to have control on this to make it consistent?

dittoHeatmap(AM[1:10, ], order.by = "condition", annot.by = "condition",
             scale = "none", use_raster = TRUE, fontsize = 14,
             annotation_colors = list(condition = c(Normal = "orange",Veh = "purple", "RAP-011" = "cyan"))
             , heatmap.colors = colorRampPalette(c("darkblue","darkblue","darkblue","white","firebrick4","firebrick4","firebrick4"))(200), 
             cluster_cols = FALSE,
             breaks = seq(-6, 6, 0.06))
dev.off()
dittoHeatmap(AM[8:17, ], order.by = "condition", annot.by = "condition",
             scale = "none", use_raster = TRUE, fontsize = 14,
             annotation_colors = list(condition = c(Normal = "orange",Veh = "purple", "RAP-011" = "cyan"))
             , heatmap.colors = colorRampPalette(c("darkblue","darkblue","darkblue","white","firebrick4","firebrick4","firebrick4"))(200), 
             cluster_cols = FALSE,
             breaks = seq(-6, 6, 0.06))
dev.off()

figure 1 figure 2

cell scrna dittoheatmap single

0 answers

No answers yet.

Log in to answer this question.