That's a really handy wrapper for pheatmap, thanks for sharing!
Hi,
I am working on single-cell data, I have identified cell types in each cluster by using marker genes expression using Seurat. I want to Plot a Heatmap which shows gene scores for the marker genes (rows) in each expression module identified by clustering. Example figure is as follows. Please let me know how best i can plot this type of image using Seurat or any other pipeline.
Thanks a lot for your kind help,
Regards, Dave

1 answer
Thanks. We will probably change the underlying code to utilize ComplexHeatmap eventually, as it's an easy switch and will allow us to use some of the rasterization features that will really help reduce the plot file size and make plots easier to edit in Illustrator, etc.
I find that the scRNA-seq dim plots will sometimes melt illustrator as well. I found a handy library, ggraster, that will let you rasterize the points but keep the labels and such as vectors. I figured I would pass this along in case you haven't seen it.
To keep this up to date, dittoHeatmap supports rasterization now by using ComplexHeatmap.
Log in to answer this question.
Seurat has a function
DoHeatmapthat will make a heatmap based on the given features and clusters.Thanks a lot for such a fast reply, I tried with DoHeatmap, but i couldn't add Tissue/Donor/Sample Info to the Heatmap. I couldn't produce heatmap wth all the cell type markers, my graph will become very cluttery and it's difficult to read.
If you want to add extra information like tissue and donor, you'll need to extract the metadata and UMI counts from the seurat object, and then construct the heatmap using the ComplexHeatmap library. You can get the counts using the
GetAssayDatafunction, and the metadata can be accessed with two opened and closed square bracketsseurat_object[[]].Can you please share any script for this, i am a biologist, my hold on R is very Limited.
ComplexHeatmap has a long but detailed vignette that you can go through.
Your can prepare your count matrix with this code. Put the genes you want to include the the genes vector.
You can then prepare your metadata using this code.
These can then be used as input to ComplexHeatmap.
Thanks a lot for your kind help, i am trying this code.