Entering edit mode
7 days ago
Picasa
▴
650
Hi,
I would like to create a heatmap of the top 20 DEGs for each of my 5 clusters. However, there are duplicates among these 100 genes, and the DoHeatmap() function only plots unique genes.
I have a Seurat v5 object.
Is there a solution to this issue?
Why are there duplicates? What do you mean? Add code and plots to illustrate a problem.
Example:
For instance the gene A is expressed in cluster1 and cluster2 but after doing:
Only one A is retained for the heatmap:
I would like both A to be retained.
I bet you ran
FindAllMarkers
on your dataset and ended up with the same genes found as DE in multiple clustersYes, right
Finding DEGs is not a finality, what do you want to show on the heatmap ? Expression of these genes in each cluster I presume. Then, calculate the expression of each gene in each cluster to plot a heatmap of gene expression.
What you get in the output of
FindAllMarkers
is a logFC between one cluster to the rest of the cells, indeed some genes can be makers in different clusters. But you cannot plot the output ofFindAllMarkers
as it is on an heatmapNot sure to understand why you said I can't.
They are doing it here:
https://satijalab.org/seurat/articles/pbmc3k_tutorial.html
This is not possible the way you describe it, it does not make sense. Or please reexplain your problem.
If you want to keep "unique" genes, the output of
FindAllMarkers
has a columngene
that you can call the functionunique
on.