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

Don't create default cluster fragment for reference AnnData files (SCP-5825) #2150

Closed bistline closed 2 weeks ago

bistline commented 3 weeks ago

BACKGROUND & CHANGES

This fixes a regression introduced in #2127 where reference AnnData files (i.e. non-parsed files, added in Classic upload UX) have a default clustering X_umap fragment created. This ends up accidentally switching the user in the AnnData upload experience, even if they have existing normal files. Additionally, this fixes a logic bug where reference AnnData files never had their parse_status flag updated after uploading, meaning they could never be deleted normally by a user.

MANUAL TESTING

Note: there is an existing bug where reference AnnData files are still being validated. For testing, you will need to use a valid file.

  1. Boot all services, sign in, and go to a new or empty study
  2. Select the "Classic" upload UX and go to the AnnData tab
  3. Upload a file (or use bucket path) and save, confirming the file saves
  4. In a separate Rails console session, load the file and confirm that it did not create the X_umap cluster fragment:
    
    file = StudyFile.last
    file.is_reference_anndata?
    => true

file.ann_data_file_info.data_fragments => []

file.ann_data_file_info.obsm_key_names => []


5. Wait for the ingest process to complete and confirm that the `Delete` button is now enabled in the upload wizard
codecov[bot] commented 3 weeks ago

Codecov Report

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

Project coverage is 69.73%. Comparing base (ef68190) to head (ca12d1d). Report is 25 commits behind head on development.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2150/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/2150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute) ```diff @@ Coverage Diff @@ ## development #2150 +/- ## ============================================ Coverage 69.73% 69.73% ============================================ Files 331 331 Lines 27956 27956 Branches 2447 2447 ============================================ Hits 19496 19496 Misses 8308 8308 Partials 152 152 ``` | [Files with missing lines](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2150?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute) | Coverage Δ | | |---|---|---| | [app/models/ann\_data\_file\_info.rb](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2150?src=pr&el=tree&filepath=app%2Fmodels%2Fann_data_file_info.rb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute#diff-YXBwL21vZGVscy9hbm5fZGF0YV9maWxlX2luZm8ucmI=) | `97.56% <100.00%> (ø)` | | | [app/models/ingest\_job.rb](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2150?src=pr&el=tree&filepath=app%2Fmodels%2Fingest_job.rb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute#diff-YXBwL21vZGVscy9pbmdlc3Rfam9iLnJi) | `50.51% <100.00%> (ø)` | |