broadinstitute / single_cell_portal_core

Rails/Docker application for the Broad Institute's single cell RNA-seq data portal
https://singlecell.broadinstitute.org
BSD 3-Clause "New" or "Revised" License
62 stars 26 forks source link

Only use refColorMap in multi-plot context (SCP-5692) #2073

Closed bistline closed 3 months ago

bistline commented 3 months ago

BACKGROUND & CHANGES

This fixes a bug introduced in #2070 where color assignments becomes skewed when switching back and forth between clustering plots in a non-spatial context. Additionally, colors did not map correctly in a single- or multi-gene view. Now, color assignments always reset between plots and are consistent across all gene-based views.

Note: this does not fix and existing bug with correlation scatter plots where color assignments are not consistent.

MANUAL TESTING

  1. Boot as normal and load the Human milk - differential expression example study
  2. Search for CLDN4
  3. Confirm that LC1 and LC2 are pink & grey respectively and match in the scatter & violin tabs
  4. Switch to the Epithelial cells UMAP and confirm LC1 and LC2 are now red & blue in both tabs
  5. (Optional) re-check the steps from #2070 and confirm that spatial plot color assignments are still correct
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.61%. Comparing base (c669aff) to head (12c39b5).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2073/graphs/tree.svg?width=650&height=150&src=pr&token=HMWE5BO2a4&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute)](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2073?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute) ```diff @@ Coverage Diff @@ ## development #2073 +/- ## =============================================== - Coverage 69.62% 69.61% -0.02% =============================================== Files 323 323 Lines 27149 27153 +4 Branches 2227 2229 +2 =============================================== Hits 18902 18902 - Misses 8122 8126 +4 Partials 125 125 ``` | [Files](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2073?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute) | Coverage Δ | | |---|---|---| | [app/javascript/components/explore/ScatterTab.jsx](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2073?src=pr&el=tree&filepath=app%2Fjavascript%2Fcomponents%2Fexplore%2FScatterTab.jsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute#diff-YXBwL2phdmFzY3JpcHQvY29tcG9uZW50cy9leHBsb3JlL1NjYXR0ZXJUYWIuanN4) | `72.72% <100.00%> (+0.35%)` | :arrow_up: | | [...avascript/components/visualization/ScatterPlot.jsx](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2073?src=pr&el=tree&filepath=app%2Fjavascript%2Fcomponents%2Fvisualization%2FScatterPlot.jsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute#diff-YXBwL2phdmFzY3JpcHQvY29tcG9uZW50cy92aXN1YWxpemF0aW9uL1NjYXR0ZXJQbG90LmpzeA==) | `64.67% <100.00%> (+0.24%)` | :arrow_up: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2073/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute)