0
$\begingroup$

I want to use the DotPlot function from Seurat v3 to visualise the expression of some genes across clusters. However when the expression of a gene is zero or very low, the dot size is so small that it is not clearly visible when printed on paper. Please is there a possibility to increase the minimum dot size in the DotPlot function to make the dot sizes more visible when printed?

For example, I would like to have a minimum dot size set to be like

in this image

from this publication

Rather than:

this image

from this other publication

Thank you in advance for your helpful hint.

$\endgroup$
4
  • $\begingroup$ You can set the scale using the dot.scale option. This will affect all the points, not only the 0s. $\endgroup$ – fra Nov 8 '19 at 9:45
  • $\begingroup$ @fra. Thank you but when I increase the dot.scale parameter,only the bigger points really change. The smaller points change only when the dot.scale value is really high and the rest of the image now looks unappealing. $\endgroup$ – Charles Nov 8 '19 at 12:04
  • $\begingroup$ It would be much easier to answer your question if you provided a reproducible example $\endgroup$ – jan-glx Nov 18 '19 at 17:38
  • $\begingroup$ Had also been asked on github.com/satijalab/seurat/issues/2297 . $\endgroup$ – jan-glx Nov 18 '19 at 18:09
1
$\begingroup$

Did you try to use DotPlot(..., scale.by = "size")?

In contrast to the default scale.by= "radius", this will link the area (==2*pi*r^2), not the radius, of the circles to the fraction of cells expressing the feature. This corresponds much better to our perception of size and will make differences in low values easier to see.

Reading ?Seurat::DotPlot the scale.min parameter looked promising but looking at the code it seems to censor the data as well.

Since Seurat's plotting functionality is based on ggplot2 you can also adjust the color scale by simply adding scale_fill_viridis() etc. to the returned plot. This might also work for size. Try something like:

DotPlot(...) + scale_size(range = c(5, 10)) # will like warn about supplying the same scale twice

Apart from this, Seurat's plotting system is not very hackable and I find it much easier to extract the relevant data and plot them myself with ggplot2.

Yet another comment: Your plot with the strong differences looks much more convincing to me wrt. to the marker property of these genese than thee cited plot.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.