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

Add raredisease panel cmd #2718

Merged
merged 27 commits into from
Dec 7, 2023
Merged

Conversation

henrikstranneheim
Copy link
Contributor

@henrikstranneheim henrikstranneheim commented Nov 29, 2023

Description

Added

  • Panel CLI
  • Test and fixtures

Changed

  • Refactored panel functions and gene panel constants

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 add-raredisease-panel-cmd -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 ...

@henrikstranneheim henrikstranneheim self-assigned this Nov 29, 2023
@henrikstranneheim henrikstranneheim marked this pull request as ready for review December 5, 2023 09:17
@henrikstranneheim henrikstranneheim requested a review from a team as a code owner December 5, 2023 09:17
@henrikstranneheim henrikstranneheim added the Project Task Part of a quarterly project label Dec 5, 2023
@henrikstranneheim
Copy link
Contributor Author

@rannick @peterpru @jemten Ready for review!

Copy link
Contributor

@jemten jemten 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 to me! Although, you should probably get someone more cg savvy then me to review it :)

@henrikstranneheim
Copy link
Contributor Author

@henrikstranneheim
Copy link
Contributor Author

cg workflow mip-dna panel justhusky ✅

[henrik.stranneheim@hasta:~] [S_base] 48s $ cg workflow mip-dna panel justhusky
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Case justhusky exists in Status DB
Running command /home/proj/stage/bin/miniconda3/envs/S_scout/bin/scout --config /home/proj/stage/servers/config/hasta.scilifelab.se/scout-stage.yaml export panel --bed BRAIN Cardiology CILM CH CTD DIAB ENDO EP HEARING HYDRO IBMFS IEM IF mcarta MHT MIT MOVE mtDNA NBS-M NEURODEG NMD OMIM-AUTO PANELAPP-GREEN PEDHEP PID PIDCAD RETINA SKD SOVM STROKE AID --build 37
θ60° [henrik.stranneheim@hasta:~] [S_base] 51s $ head /home/proj/stage/rare-disease/cases/justhusky/gene_panels.bed
##genome_build=37
##gene_panel=BRAIN,version=1.0,updated_at=2020-02-14,display_name=BRAIN
##gene_panel=Cardiology,version=1.0,updated_at=2020-01-21,display_name=Cardiology
##gene_panel=CILM,version=59.0,updated_at=2018-03-22,display_name=Ciliopathy
##gene_panel=CTD,version=55.0,updated_at=2021-12-13,display_name=Connective Tissue Diseases
##gene_panel=DIAB,version=17.0,updated_at=2023-03-20,display_name=DIAB
##gene_panel=ENDO,version=12.0,updated_at=2018-02-05,display_name=Endocrinology
##gene_panel=EP,version=15.0,updated_at=2021-12-10,display_name=Epilepsy
##gene_panel=HYDRO,version=4.0,updated_at=2018-01-19,display_name=Hydropspanel
##gene_panel=IBMFS,version=13.0,updated_at=2018-01-31,display_name=Inherited Bone Marrow Failure Syndromes

@henrikstranneheim
Copy link
Contributor Author

No raredisease case in statusDB to test with but we have no live functionality yet and raredisease uses identical functions as mip-dna so this is good enough I think.

Copy link
Contributor

@ChrOertlin ChrOertlin 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!

cg/constants/constants.py Outdated Show resolved Hide resolved
cg/meta/workflow/mip_dna.py Outdated Show resolved Hide resolved
cg/meta/workflow/mip_rna.py Outdated Show resolved Hide resolved
cg/meta/workflow/raredisease.py Outdated 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! Made some suggestions about the code duplication

cg/meta/workflow/analysis.py Show resolved Hide resolved
cg/meta/workflow/mip_dna.py Outdated Show resolved Hide resolved
cg/meta/workflow/mip_dna.py Outdated Show resolved Hide resolved
cg/meta/workflow/raredisease.py Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/io/test_io_controller.py Outdated Show resolved Hide resolved
tests/io/test_io_txt.py Outdated Show resolved Hide resolved
tests/mocks/mip_analysis_mock.py Outdated Show resolved Hide resolved
@henrikstranneheim
Copy link
Contributor Author

cg workflow mip-dna panel justhusky ✅

[henrik.stranneheim@hasta:~] [S_base] 13s $ cg workflow mip-dna panel justhusky
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Case justhusky exists in Status DB
Running command /home/proj/stage/bin/miniconda3/envs/S_scout/bin/scout --config /home/proj/stage/servers/config/hasta.scilifelab.se/scout-stage.yaml export panel --bed BRAIN Cardiology CILM CH CTD DIAB ENDO EP HEARING HYDRO IBMFS IEM IF mcarta MHT MIT MOVE mtDNA NBS-M NEURODEG NMD OMIM-AUTO PANELAPP-GREEN PEDHEP PID PIDCAD RETINA SKD SOVM STROKE AID --build 37

@henrikstranneheim
Copy link
Contributor Author

cg, version 53.5.4
[henrik.stranneheim@hasta:~] [S_base] 2m59s $ cg workflow raredisease --help
Usage: cg workflow raredisease [OPTIONS] COMMAND [ARGS]...

  NF-core/raredisease analysis workflow.

Options:
  --help  Show this message and exit.

Commands:
  panel  Write aggregated gene panel file exported from Scout.
[henrik.stranneheim@hasta:~] [S_base] 23s $ cg workflow raredisease panel --help
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Called undefined __fields__ on HousekeeperAPI, please wrap
Usage: cg workflow raredisease panel [OPTIONS] CASE_ID

  Write aggregated gene panel file exported from Scout.

Options:
  -d, --dry-run  Simulate process without executing
  --help         Show this message and exit.

Copy link

sonarqubecloud bot commented Dec 7, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
9.2% 9.2% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@henrikstranneheim henrikstranneheim merged commit c33d482 into master Dec 7, 2023
8 of 9 checks passed
@henrikstranneheim henrikstranneheim deleted the add-raredisease-panel-cmd branch December 7, 2023 10:50
@henrikstranneheim
Copy link
Contributor Author

Deployed to production:

Log deploy... done.
cg, version 53.6.0

@jemten jemten added the raredisease Issues related to nextflow raredisease pipeline label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project Task Part of a quarterly project raredisease Issues related to nextflow raredisease pipeline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants