Seurat Dotplot _ How can I have different panels on my doplot?
3
0
Entering edit mode
2.8 years ago
Darya • 0

I'm trying to generate a dotplot like the following one using a seurat object and seurat Dotplot function, Does anyone know how can I generate it? I want to have different panels based on experiment conditions?

enter image description here

DotPlot scRNAseq Seurat • 4.0k views
ADD COMMENT
1
Entering edit mode

You can use patchwork to easily combine multiple plots. dot1 <- DotPlot(...) dot2 <- DotPlot(...) dot3 <- DotPlot(...) and then dot1 / dot2 / dot3 or dot1 | dot2 | dot3 for horizontal alignment.

ADD REPLY
4
Entering edit mode
2.8 years ago

You can use the dittoSeq package, which readily interprets Seurat objects and allows you to either use their in-built split.by parameters or to report extra.vars so that you can use standard ggplot2 syntax, e.g.

my_dotPlot <- dittoSeq(SeuratObject, ...., extra.vars = "mouse.type")
my_dotPlot + facet_wrap(~mouse.type)
ADD COMMENT
2
Entering edit mode
2.8 years ago
abedkurdi10 ▴ 190

You can use patchwork R package. You can save your plot into variables and all you have to do is the following:

dot1 <- DotPlot(...)
dot2 <- DotPlot(...)
dot3 <- DotPlot(...)

to draw them vertically above each other:

dot1 / dot2 / dot3

to draw them side by side:

dot1 + dot2 + dot3
ADD COMMENT

Login before adding your answer.

Traffic: 2083 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6