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
Seurat has a function
DoHeatmap
that 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
GetAssayData
function, 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.