chanzuckerberg / cellxgene

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

genes can show up twice in RSB, and selection gets confusing when this happens #1585

Open bkmartinjr opened 4 years ago

bkmartinjr commented 4 years ago

if you do diffexp, it adds genes to the rsb. If you also manually add a gene that is in the diffexp result, it will now display twice in the rsb. You can brush select both of these, and they will show different range selections. But only the most recent one is applied to the crossfilter.

This fundamentally has to do with the fact that we create two separate brushable histograms, but only one underlying crossfilter selection dimension.

Very confusing. We probably need to figure out what selection UI we want here, as part of gene sets. To my brain, it would make more sense if the selection on any given gene was consistent, no matter how many times it was rendering on the screen. Alternatively, we could allow multiple range/gate selections on a single gene.

image.png

signechambers1 commented 4 years ago

Brainstormed with @colinmegill and came up with a simple fix: remove the selection from the older histogram.

Example of expected behavior: Actions:

  1. User adds GRP
  2. User brushes on GRP from 4-6
  3. User adds GRP again
  4. User brushes on new GRP from 9-11

Results in:

  1. No brushed selection is shown for the first GRP (just a plain histogram)
  2. Second GRP shows 9-11 as selected