Release 2026.2.2#731
Merged
Merged
Conversation
Collaborator
bencap
commented
May 12, 2026
- Fixes a bug where normalized HGVS was not being recognized as submitted succesfully to ClinGen
- Fixes a bug where variant recoder outputs were not being properly parsed and used in phase 3 of VEP lookup
…AR responses CAR's batch API guarantees responses are returned in the same order as submitted HGVS strings (per API docs). The previous HGVS string-matching approach failed when CAR normalized expressions (e.g. "delinsA" → "del"), because the submitted string never appeared in the returned allele's hgvs lists, silently dropping valid registrations into the failure path. - Replace `get_allele_registry_associations` with a direct `zip` of submitted HGVS strings and CAR responses in the job; positional correspondence is the documented contract - Remove `get_allele_registry_associations` from services.py and `is_car_submission_error` TypeGuard helper (replaced by inline `"errorType" in response` key check which pyright narrows correctly) - Write `MISSING_IDENTIFIER` failure annotations for variants that cannot produce a valid HGVS string before submission, rather than silently skipping them - Handle truncated CAR responses (network drop / service-side omission) via `hgvs_list[len(registered_alleles):]` with `EXTERNAL_API_ERROR` - Update tests: rename `no_linked_alleles` → `all_car_errors` with proper error-response mocks; remove tests for deleted function
…ocessing
- request_with_backoff: re-raise 4xx errors immediately (except 429,
which is retried); avoids ~10 min hang from exhausting retry sleeps
on unretryable client errors
- run_variant_recoder: catch HTTPError and return {} so a 400 from
Ensembl marks affected variants FAILED instead of aborting the job
- get_functional_consequence: same HTTPError handling; a 4xx on Phase 1
routes all variants to Recoder, a 4xx on Phase 3 marks them FAILED
- Phase 1: filter None consequences before storing; VEP returning a
None most_severe_consequence is now treated as a miss and routed
through Recoder rather than falling into the UNKNOWN outcome branch
- Phase 3: flatten hgvs_to_genomic.values() (list-of-lists) to a
deduplicated set of strings before batching; the previous code sent
nested lists to VEP which returned nothing
- Remove dead missing_hgvs_to_variant_ids variable
Add unit tests covering:
- None consequence routing to Recoder
- Most-severe priority selection across multiple genomic HGVS strings
- Multiple mapped variants sharing an HGVS all receiving the consequence
- Realistic Variant Recoder and VEP response format parsing (new file
tests/lib/test_vep.py)
Restore E2E network test for the Recoder fallback path with a protein
HGVS fixture (NP_009225.1:p.Val1696His).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.