I have generated some dotplots for some genes in my scRNAseq data.
As the Seurat
object was already annotated with Ensembl IDs (and not gene names), I am struggling a bit trying to replace those IDs to gene names in my plots.
In this context, I am trying to generate a DotPlot
for two genes at the same time and although I have tried to specify the gene name, I only managed to put it as a title and not replace it at the bottom (in the x-axis).
Seurat::DotPlot(seuObject,
features = list("Gene1" = "ENSXXXXXXXXXX", "Gene2" = "ENSXXXXXXXXXXX"), group.by = "Conditions") +
labs(title = "Gene1 & Gene2") + xlab("")
Does anybody know how I could remove the Ensembl IDs (ENSGXXXXX) from the bottom and instead writing the gene names (that I have at the top) in this type of plot?
Thanks very much in advance
Just what I wanted. It works perfectly. Thanks a lot!
Just in case someone gets to this post with the same question but using
SCpubr::do_DotPlot
, you can use the same accepted answer adding an extra line of code: