Skip to content

Release 2026.2.2#731

Merged
bencap merged 4 commits into
mainfrom
release-2026.2.2
May 12, 2026
Merged

Release 2026.2.2#731
bencap merged 4 commits into
mainfrom
release-2026.2.2

Conversation

@bencap
Copy link
Copy Markdown
Collaborator

@bencap 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

bencap added 4 commits May 12, 2026 12:33
…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).
@bencap bencap merged commit 9247dca into main May 12, 2026
12 checks passed
@bencap bencap deleted the release-2026.2.2 branch May 12, 2026 21:40
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.

1 participant