Skip to content

Conversation

@bencap
Copy link
Collaborator

@bencap bencap commented Dec 31, 2025

This pull request improves error handling and robustness in the ClinGen Allele Registry integration. The main changes allow the code to gracefully handle error responses from the ClinGen registry, extends support for additional allele types, and add comprehensive tests to cover these scenarios.

Error handling and type safety improvements:

  • Added a new ClinGenSubmissionError type to represent error responses from the ClinGen registry, and updated the type annotations in get_allele_registry_associations to accept both successful and error responses. [1] [2]
  • Updated get_allele_registry_associations to skip and log error responses in the submission results, preventing errors from breaking the association logic.
  • Previous behavior exited upon encountering these errors, which was preventing some score sets from having ClinGen IDs set on mapped variants.

Functionality enhancements:

  • Extended get_allele_registry_associations to support aminoAcidAlleles in addition to genomicAlleles and transcriptAlleles, ensuring all relevant allele types are handled.
  • Previous behavior was not supporting such alleles, which resulted in incomplete linkage to ClinGen IDs for certain score sets.

Testing improvements:

  • Added new tests to cover error responses, mixed success/error responses, and the handling of aminoAcidAlleles in get_allele_registry_associations, improving test coverage and reliability. [1] [2] [3]

Code organization and cleanup:

  • Cleaned up imports and improved ordering for clarity and consistency in several files. [1] [2] [3]

@bencap bencap requested review from jstone-dev and sallybg December 31, 2025 20:27
@bencap bencap force-pushed the feature/bencap/clingen-service-tweaks branch from 3f8fdbf to 1aae496 Compare December 31, 2025 21:12
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.

2 participants