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

Fix RNA uploads/delivery message #4145

Merged
merged 16 commits into from
Jan 30, 2025
Merged

Fix RNA uploads/delivery message #4145

merged 16 commits into from
Jan 30, 2025

Conversation

islean
Copy link
Contributor

@islean islean commented Jan 23, 2025

Description

Closes #4115. The main change is that we filter on the RNA case's collaborators, rather than its samples' but it also merges the logic in the upload flow and the delivery message flow, where different parts of the code was used to link the RNA case to its DNA cases.

Added

Changed

  • The RNA uploads to Scout use the query logic found in the ReadHandler
  • More robust error raising in the ReadHandler for when there are multiple matching DNA samples or when no subject id is passed.

Fixed

How to prepare for test

  • Ssh to relevant server (depending on type of change)
  • Use stage: us
  • Paxa the environment: paxa
  • Install on stage (example for Hasta):
    bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_cg -t cg -b fix-rna-uploads -a

How to test

  • Do ...

Expected test outcome

  • Check that ...
  • Take a screenshot and attach or copy/paste the output.

Review

  • Tests executed by
  • "Merge and deploy" approved by
    Thanks for filling in who performed the code review and the test!

This version is a

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

Implementation Plan

  • Document in ...
  • Deploy this branch on ...
  • Inform to ...

@islean islean marked this pull request as ready for review January 28, 2025 12:03
@islean islean requested a review from a team as a code owner January 28, 2025 12:03
cg/store/api/data_classes.py Show resolved Hide resolved
cg/store/crud/read.py Show resolved Hide resolved
@diitaz93 diitaz93 self-requested a review January 28, 2025 12:26
Copy link
Contributor

@Vince-janv Vince-janv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof. At least the we use the same logic now 😅 Well done

cg/meta/upload/scout/uploadscoutapi.py Show resolved Hide resolved
cg/store/crud/read.py Show resolved Hide resolved
cg/store/api/data_classes.py Show resolved Hide resolved
cg/store/crud/read.py Show resolved Hide resolved
cg/store/crud/read.py Outdated Show resolved Hide resolved
cg/store/crud/read.py Show resolved Hide resolved
cg/store/crud/read.py Show resolved Hide resolved
cg/store/crud/read.py Outdated Show resolved Hide resolved
cg/store/crud/read.py Show resolved Hide resolved
Copy link
Contributor

@diitaz93 diitaz93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good 👍

@islean
Copy link
Contributor Author

islean commented Jan 29, 2025

Upload linking works ✅

[isak.ohlsson@hasta:2025-01-29] [S_base] $ cg upload rna-junctions-to-scout --dry-run sharpbulldog
----------------- UPLOAD -----------------
----------------- UPLOAD RNA JUNCTIONS TO SCOUT -----------------------
Uploading splice junctions bed file for sample ACC5701A14DS800C0M in case alerthawk in Scout.
Uploaded splice junctions bed file for sample ACC5701A14DS800C0M in case alerthawk.
Upload splice junctions bed file finished!
Uploading RNA coverage bigwig file for sample ACC5701A14DS800C0M in case alerthawk in Scout.
Uploaded bigwig coverage file for sample ACC5701A14DS800C0M in case alerthawk.
Upload RNA coverage bigwig file finished!
[isak.ohlsson@hasta:2025-01-29] [S_base] $

@clingen-sthlm clingen-sthlm temporarily deployed to stage January 29, 2025 15:49 Inactive
@islean islean changed the title Fix RNA uploads/delivery message draft Fix RNA uploads/delivery message Jan 30, 2025
@islean islean merged commit eb104d8 into master Jan 30, 2025
10 checks passed
@islean islean deleted the fix-rna-uploads branch January 30, 2025 13:35
@islean
Copy link
Contributor Author

islean commented Jan 30, 2025

Deployed to Hasta:

Log deploy... done.
cg, version 67.0.15
...
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Updating aabb8f7..e0648ab
Fast-forward
 .bumpversion.cfg                                         |   2 +-
 cg/__init__.py                                           |   2 +-
 cg/meta/upload/scout/uploadscoutapi.py                   |  99 ++++++++++++++++++++-------------------------------------------------------------------
 cg/store/api/data_classes.py                             |  11 ++++++++++
 cg/store/crud/read.py                                    | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------
 pyproject.toml                                           |   2 +-
 tests/meta/upload/scout/test_meta_upload_scoutapi_rna.py |  52 +++++++++++++++++++++-------------------------
 tests/store/crud/conftest.py                             |  36 +-------------------------------
 tests/store/crud/read/test_read_sample.py                |  65 ---------------------------------------------------------
 9 files changed, 167 insertions(+), 260 deletions(-)
 create mode 100644 cg/store/api/data_classes.py
/home/isak.ohlsson
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.

@islean
Copy link
Contributor Author

islean commented Jan 30, 2025

Deployed to the VMs

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

Successfully merging this pull request may close these issues.

Avoid cross collaboration RNA uploads
4 participants