Skip to content

Export and re-import managed variants with bcftools liftover#6225

Open
northwestwitch wants to merge 116 commits into
mainfrom
managed_liftover
Open

Export and re-import managed variants with bcftools liftover#6225
northwestwitch wants to merge 116 commits into
mainfrom
managed_liftover

Conversation

@northwestwitch

@northwestwitch northwestwitch commented Apr 22, 2026

Copy link
Copy Markdown
Member

This PR adds a functionality or fixes a bug.

Testing on cg-vm1 server (Clinical Genomics Stockholm)

Prepare for testing

  1. Make sure the PR is pushed and available on Docker Hub
  2. First book your testing time using the Pax software available at https://pax.scilifelab.se/. The resource you are going to call dibs on is scout-stage and the server is cg-vm1.
  3. ssh <USER.NAME>@cg-vm1.scilifelab.se
  4. sudo -iu hiseq.clinical
  5. ssh localhost
  6. (optional) Find out which scout branch is currently deployed on cg-vm1: podman ps
  7. Stop the service with current deployed branch: systemctl --user stop scout@<name_of_currently_deployed_branch>
  8. Start the scout service with the branch to test: systemctl --user start scout@<this_branch>
  9. Make sure the branch is deployed: systemctl --user status scout.target
  10. After testing is done, repeat procedure at https://pax.scilifelab.se/, which will release the allocated resource (scout-stage) to be used for testing by other users.
Testing on hasta server (Clinical Genomics Stockholm)

Prepare for testing

  1. ssh <USER.NAME>@hasta.scilifelab.se
  2. Book your testing time using the Pax software. us; paxa -u <user> -s hasta -r scout-stage. You can also use the WSGI Pax app available at https://pax.scilifelab.se/.
  3. (optional) Find out which scout branch is currently deployed on cg-vm1: conda activate S_scout; pip freeze | grep scout-browser
  4. Deploy the branch to test: bash /home/proj/production/servers/resources/hasta.scilifelab.se/update-tool-stage.sh -e S_scout -t scout -b <this_branch>
  5. Make sure the branch is deployed: us; scout --version
  6. After testing is done, repeat the paxa procedure, which will release the allocated resource (scout-stage) to be used for testing by other users.

How to test:

  1. how to test it, possibly with real cases/data

Expected outcome:
The functionality should be working
Take a screenshot and attach or copy/paste the output.

Review:

  • code approved by
  • tests executed by CR

@northwestwitch northwestwitch changed the title Managed liftover Export and re-import managed variants with liftover Apr 22, 2026
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 18.36735% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.93%. Comparing base (5e26627) to head (0c50789).

Files with missing lines Patch % Lines
scout/export/variant.py 11.62% 38 Missing ⚠️
scout/commands/export/variant.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6225      +/-   ##
==========================================
- Coverage   84.08%   83.93%   -0.16%     
==========================================
  Files         347      347              
  Lines       21835    21880      +45     
==========================================
+ Hits        18359    18364       +5     
- Misses       3476     3516      +40     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@northwestwitch northwestwitch marked this pull request as ready for review April 22, 2026 09:48
@northwestwitch northwestwitch requested a review from dnil April 22, 2026 10:20
@northwestwitch northwestwitch marked this pull request as draft April 22, 2026 11:48
@northwestwitch

Copy link
Copy Markdown
Member Author

@dnil wait with this one, I'm testing it on stage before

Comment thread scout/export/variant.py Outdated
continue
build = "38" if liftover_from == "37" else "37"
if (
variant_obj.get("build", "37") == build

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Perhaps variant_obj.get("build") == build only ?

@northwestwitch northwestwitch marked this pull request as ready for review June 2, 2026 05:44
@northwestwitch

Copy link
Copy Markdown
Member Author

If we plan to export and lift over causatives 37 every month or so then this branch has to be kept alive. If we want to continue using this code to do the lift over than I'd rather merge the branch, because several times during the last two weeks I've been struggling with fixing conflicts in here after merging another PR.
We can discuss about it and I can add a test for the functionality. Let me know what you think @dnil

@sonarqubecloud

Copy link
Copy Markdown

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.

Export lifted-over managed variants

3 participants