Skip to content

feat: Migrate CAR/LDH jobs onto Allele data model#774

Draft
bencap wants to merge 2 commits into
feature/bencap/739/allele-data-model-schemafrom
feature/bencap/741/register-all-alleles-with-clingen
Draft

feat: Migrate CAR/LDH jobs onto Allele data model#774
bencap wants to merge 2 commits into
feature/bencap/739/allele-data-model-schemafrom
feature/bencap/741/register-all-alleles-with-clingen

Conversation

@bencap

@bencap bencap commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

bencap added 2 commits June 18, 2026 15:07
…ndle null gracefully

- `translate_hgvs_to_variation` now attaches an `Expression` to each
  allele produced from a cis-phased or single HGVS string, mirroring
  the dcd_mapping authoritative-allele convention so `post_mapped` is
  self-describing without a separate round-trip.
- `hgvs_from_vrs_allele` returns `None` instead of crashing when
  `expressions` is null or empty (valid for cis-phased block members),
  and `get_hgvs_from_post_mapped` propagates that as a `None` result.
- `post_mapped` is now serialized with `exclude_none=True`, matching
  the mapper's output format.
- Minor formatting clean-ups in reverse_translation.py (no logic change).
… model

- `submit_score_set_mappings_to_car` now operates on Allele rows
  (authoritative + RT-derived) rather than MappedVariant, deduplicating
  by allele_id so each VRS allele is registered exactly once regardless
  of how many variants share it. Adds `force_reregister` param and
  per-allele outcome counters.
- `submit_score_set_mappings_to_ldh` queries MappingRecord + Allele for
  pre/post-mapped data instead of the deprecated MappedVariant join.
- `construct_ldh_submission_entity` signature updated to accept
  MappingRecord and Allele separately, since those fields now live on
  different models.
- `warm_clingen_cache` switched to the shared `get_alleles_for_score_set`
  helper to keep allele scope consistent across all three jobs.
- Extracts `get_alleles_for_score_set` and `ScoreSetAlleleRow` into
  `lib/clingen/alleles.py` as the single canonical query for both CAR
  and cache jobs.
@bencap bencap linked an issue Jun 18, 2026 that may be closed by this pull request
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.

feat: Pre-register coding and genomic Allele rows with ClinGen

1 participant