chanzuckerberg / cellxgene

An interactive explorer for single-cell transcriptomics data
https://chanzuckerberg.github.io/cellxgene/
MIT License
634 stars 119 forks source link

feature request: split screen option #2090

Open LisaSikkema opened 3 years ago

LisaSikkema commented 3 years ago

Hi! I'm working a lot with cellxgene and one thing that would be really useful for me is a split-screen option, allowing for two UMAPS colored in two different ways. This facilitates investigating co-localization or separation of specific features in the umap. For example, it might be interesting for me to see if cells of a specific cluster/cell type (categorical variable 1) show mixing of batches (categorical variable 2) in the umap. Similarly, I might want to see if a gene (continuous variable 1) is homogeneously expressed in each of my clusters (categorical variable 1) of interest, or if there seems to be a gradient of low-to-high expression in that cluster.

It is of course possible to switch back and forth from one umap to the other, but that significantly slows down the data exploration.

Alternatively, one could open two browser windows. However, that also has a few disadvantages. First, when working from a laptop there's simply not enough space to do that and still see everything. Second (assuming your screen is big enough), you cannot use the variables generated within one cellxgene instance in your second instance (e.g. a cell selection using the lasso tool), or you would have to re-do the same analysis twice, which wastes computing resources.

It would be a really great feature to add, and I'm curious to hear what you guys think about it!

colinmegill commented 3 years ago

@LisaSikkema Thanks so much for the great feedback. If you could:

  1. collapse sidebars to maximize umap real estate
  2. synchronize / access some (tbd, definitely current_cell_selection) of the application state across browser tabs given that it's the same url

Do you think that would satisfy the split screen req's?

LisaSikkema commented 3 years ago

Interesting! Yes I think it would

baohongz commented 3 years ago

Lisa,

Can you use cellxgene VIP to show one UMAP in VIP window and the other in the main window? You can hide input and minimize the menu to make more space in VIP window. Colin, how to collapse sidebars to maximize screen real estate?

Screen Shot 2021-03-10 at 12 15 47 AM

Colin, how to collapse sidebars to maximize screen real estate?

colinmegill commented 3 years ago

Collapsing sidebars isn't currently possible, in this case, that is a feature proposal in this thread.

olympiahardy commented 2 years ago

Hi there! I was wondering if any progress has been made on this split UMAP feature? I agree in that it would be a really useful feature if you could have a dual view of two UMAPs split by some metadata column. It's a feature I would be interested to develop, so any information on this would be massively appreciated, thanks!

atarashansky commented 2 years ago

Really great feature suggestion.

Hi! I'm working a lot with cellxgene and one thing that would be really useful for me is a split-screen option, allowing for two UMAPS colored in two different ways. This facilitates investigating co-localization or separation of specific features in the umap. For example, it might be interesting for me to see if cells of a specific cluster/cell type (categorical variable 1) show mixing of batches (categorical variable 2) in the umap.

In my fork of cellxgene (excellxgene), I added a feature that might be helpful to you. If you deem that it would be useful to you, then it would be great to have that documented here as we plan feature development for the future in the base version of cellxgene :). In the meantime, perhaps excellxgene would be a good place to start (though be warned, it is quite poorly documented and no longer actively maintained). Instead of showing two UMAPs side by side, would a sankey plot be helpful? For example:

Check the metadata you wish to compare:

image

Click the sankey button in the menubar:

image

Display the alignment scores (basically, how overlapping the labels are in the manifold):

image

This would let you see if cell types are mixed across batches.

Similarly, I might want to see if a gene (continuous variable 1) is homogeneously expressed in each of my clusters (categorical variable 1) of interest, or if there seems to be a gradient of low-to-high expression in that cluster. It is of course possible to switch back and forth from one umap to the other, but that significantly slows down the data exploration.

Could you subset to the cluster of interest and then display gene expression? Though I acknowledge it is more clicks than seeing two UMAPs side by side and you can only interrogate one cluster at a time.

In general, I think there is a lot of room for improvement for being able to simultaneously visualize categorical and continuous metadata. A split-screen UMAP is hard to accomplish with the limited real-estate we have - personally, I don't think collapsing the sidebars is the most elegant solution, especially since most of the interactivity is concentrated there (e.g. users will have to keep opening and closing those sidebars).

How do you guys feel about this feature? In excellxgene, we have a little airplane tool that lets you interactively display the metadata for cells your mouse is hovering over.

For example, categorical data:

image

And gene expression data:

image

It would be pretty straightforward to allow users to select multiple kinds of metadata for display in a nice, "summary" popover. That way you'd be able to hover your mouse around the UMAP and get a sense for the relationship between different categorical and continuous metadata.

Let me know what you think!