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 end coordinates in ClinVar for indels #4593

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Conversation

northwestwitch
Copy link
Member

@northwestwitch northwestwitch commented Apr 25, 2024

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. Deploy on stage and add to a ClinVar submission a variant that has stop coord different than start coord

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

Review:

  • code approved by DN
  • tests executed by CR

@northwestwitch northwestwitch changed the title Fix end coorinates in ClinVar for for indels Fix end coordinates in ClinVar for for indels Apr 25, 2024
@northwestwitch northwestwitch changed the title Fix end coordinates in ClinVar for for indels Fix end coordinates in ClinVar for indels Apr 25, 2024
@northwestwitch northwestwitch marked this pull request as draft April 25, 2024 07:29
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.58%. Comparing base (51ee90f) to head (00d65c5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4593   +/-   ##
=======================================
  Coverage   84.58%   84.58%           
=======================================
  Files         310      310           
  Lines       18634    18634           
=======================================
  Hits        15762    15762           
  Misses       2872     2872           

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

@northwestwitch
Copy link
Member Author

Tested on stage with this variant

Main branch:

image

This branch:

image

@northwestwitch northwestwitch marked this pull request as ready for review April 25, 2024 07:44
Copy link
Collaborator

@dnil dnil 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! Test / check docs for how they want end coords described: it may not be on VCF standard. 😊

@@ -107,7 +107,7 @@ def _get_snv_var_form(variant_obj, case_obj):
var_form.variations_ids.data = var_ids.split(";")[0]
var_form.chromosome.data = variant_obj.get("chromosome")
var_form.start.data = variant_obj.get("position")
var_form.stop.data = variant_obj.get("position")
var_form.stop.data = variant_obj.get("end")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you check the docs or test with their stage endpoint to see if this is correct in terms of inclusive coords (off by one or not)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope. I can try!

Copy link
Member Author

Choose a reason for hiding this comment

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

Tested using the current submission for cust000 on stage.
Downloaded it as json and used it in a dry-run using preClinVar:

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

And before they would have failed it? 😊

Copy link
Member Author

Choose a reason for hiding this comment

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

No, the dry run doesn't check that type of things it seems (I tried now). It returns success as well

Checked on their docs and they say:
image

So we should be fine, no?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think so, yes, but I would be a wealthy person if I got a minute amount of currency for every off-by-one error I've had.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you check the JSON summary report from the dry-run? It should be available with that sub nr right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's try like this. We can fix if they complain. It's not that they make us test better using the test endpoint

Copy link
Member Author

Choose a reason for hiding this comment

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

Tested on validate preClinVar endpoint and this fix is effective. There is another error related to the condition that perhaps needs fixing. but this is good to merge

@@ -276,7 +276,7 @@ def parse_variant_form_fields(form):
clinvar_var["variations_ids"] = form["dbsnp_id"]

if clinvar_var.get("ref_seq") and clinvar_var.get("hgvs"):
# Variant is described by RefSeq and HGVS already, remove redundanti fields from submission
# Variant is described by RefSeq and HGVS already, remove redundant fields from submission
Copy link
Collaborator

Choose a reason for hiding this comment

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

😄

Copy link

sonarcloud bot commented Apr 25, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@northwestwitch northwestwitch merged commit aa29c89 into main Apr 25, 2024
20 checks passed
@northwestwitch northwestwitch deleted the fix_clinvar_end_coords branch April 26, 2024 06:09
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.

ClinVar submission error - variant location for indel
2 participants