Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: distinguish zeros when plotting #2616

Open
slinnarsson opened this issue Jun 18, 2023 · 0 comments
Open

Feature request: distinguish zeros when plotting #2616

slinnarsson opened this issue Jun 18, 2023 · 0 comments

Comments

@slinnarsson
Copy link

slinnarsson commented Jun 18, 2023

Single-cell data is sparse (i.e. there are many zeros), and the difference between not-expressed (zero) and expressed (1, 2, 3, ...) can be highly informative. Currently cellxgene plots data using a colormap that does not distinguish zeros. This makes it often near-impossible to distinguish low expression from no expression.

I suggest to first plot all cells in a light grey shade. This shows the position of every cell, regardless of expression. Then, plot all non-zeros on top, using a perceptually uniform, linear colormap that goes from 1 (assuming integer expression values as in 10x Chromium; otherwise use the lowest non-zero value) to the 99th percentile of the data. Of course plot non-zeros in random order.

The difference is stark, as in the example below showing AQP4 expression in glioblasts in the human developing brain:

image

With the common approach of just plotting zeros as the lowest value in the colormap, it becomes near-impossible to distinguish low expression from no expression.

My group has used this approach for many years and it is really preferable. It could be implemented in cellxgene using a checkbox "Use grey for zeros".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant