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

Institute-level soft filters for variants #5254

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

northwestwitch
Copy link
Member

@northwestwitch northwestwitch commented Feb 19, 2025

I'm not a big fan of custom-made solutions that add a lot of code but are used only by a group. So in order to fix #5201 I'm proposing this more general feature which can allow filtering on basically any key/value present on variants documents

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. Fist 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.target
  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. Go to a case and check number of variants. Example with demo case:
image
  1. As an admin, go to instititute's settings and add a custom soft filter to filter institute's variants with (can be any key/value present in the variant document. Example:
image
  1. Back to variants page, you don't get the same results as before:
image

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

Review:

  • code approved by
  • tests executed by

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 4 lines in your changes missing coverage. Please review.

Project coverage is 84.41%. Comparing base (7d089ff) to head (494e3bb).

Files with missing lines Patch % Lines
scout/server/blueprints/institutes/controllers.py 78.57% 3 Missing ⚠️
scout/server/blueprints/variants/controllers.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5254   +/-   ##
=======================================
  Coverage   84.41%   84.41%           
=======================================
  Files         326      326           
  Lines       19859    19892   +33     
=======================================
+ Hits        16763    16792   +29     
- Misses       3096     3100    +4     

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

@northwestwitch northwestwitch changed the title Default tnscope:germline_risk and bcftools:in_normal soft filters applied to Balsamic SNVs Institute-level custom settings for soft variant filters Feb 19, 2025
@northwestwitch northwestwitch changed the title Institute-level custom settings for soft variant filters Institute-level soft filters for variants Feb 20, 2025
@northwestwitch northwestwitch marked this pull request as ready for review February 20, 2025 07:40
@northwestwitch
Copy link
Member Author

Ready for review now

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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

Successfully merging this pull request may close these issues.

Enable filtering on matched normal
2 participants