cellxgene icon indicating copy to clipboard operation
cellxgene copied to clipboard

[FEATURE REQUEST] Option to choose the dot plot order [low to high expression as in Scanpy]

Open gokceneraslan opened this issue 1 year ago • 1 comments

I was wondering if there is a way to plot dots in the order of expression, similar to sort_order parameter in scanpy sc.pl.umap (https://scanpy.readthedocs.io/en/stable/generated/scanpy.pl.umap.html) in a way that dots with higher values are plotted after those with lower values in the z-axis. Having an option to change the dot plot order from random to sorted would be very useful.

The reasoning of this is that very lowly expressed genes are very difficult to see when dot plotting order is random. In some cases, this might result in overestimation of expression but this is a trade off and I think it should be up to the user to decide. This is why we have this option in Scanpy in the first place.

gokceneraslan avatar Aug 15 '23 09:08 gokceneraslan

As I explain in #2629 I think the proper way to plot single-cell data is to first plot the zeros in light grey, then plot non-zeros using a colormap, on top. As long as point overlap is kept to a minimum (often also an issue in cellxgene), this way of plotting accurately reveals both low and no expression.

For example, consider the difference for AQP4 expression in this example of glioblasts when using grey for zeros (left) or just using the colormap (right):

image

When just using a colormap gradient, the true structure of gene expression disappears. Plotting low-to-high will not make any difference to the plot.

slinnarsson avatar Sep 06 '23 12:09 slinnarsson