Repository navigation
epic: Better Reverse Translation #746
Copy link
Copy link
Labels
app: backendTask implementation touches the backendTask implementation touches the backendapp: databaseTask implementation requires database changesTask implementation requires database changesapp: frontendTask implementation touches the frontendTask implementation touches the frontendapp: mapperTask implementation touches the mapperTask implementation touches the mapperapp: workerTask implementation touches the workerTask implementation touches the worker
Milestone
Description
Activity
- addedapp: backendTask implementation touches the backendTask implementation touches the backendapp: frontendTask implementation touches the frontendTask implementation touches the frontendapp: mapperTask implementation touches the mapperTask implementation touches the mapperapp: workerTask implementation touches the workerTask implementation touches the workerapp: databaseTask implementation requires database changesTask implementation requires database changes
on May 18, 2026 - added sub-issues
on May 18, 2026 - added a commit that references this issue
on Jul 9, 2026 - linked a pull request that will close this issueepic: Allele centric mapping, storage, and service #791
on Sep 19, 2026 - linked a pull request that will close this issueRebuild variant detail, allele grouping, and clinical controls on the allele-centric API #723
on Sep 19, 2026
Metadata
Metadata
Assignees
Labels
app: backendTask implementation touches the backendTask implementation touches the backendapp: databaseTask implementation requires database changesTask implementation requires database changesapp: frontendTask implementation touches the frontendTask implementation touches the frontendapp: mapperTask implementation touches the mapperTask implementation touches the mapperapp: workerTask implementation touches the workerTask implementation touches the worker
Problem
Three gaps in MaveDB's current reverse translation system:
Architecture
Data model (
AssayedVariant→MappingRecord→Allele):MappingRecordreplacesMappedVariantas the provenance record per mapping run. It carriesvrs_digest(indexed, pre-mapped variant),pre_mappedJSONB,assay_level, mapping metadata, and QC fields. It has a M:N relationship toAllelerows via amapping_record_allelesassociation table.Alleleis a flat table (no inheritance) deduplicated by VRS digest across all score sets. Key columns:vrs_digestlevelgenomic|coding|proteintranscripthgvs_g/hgvs_c/hgvs_pclingen_allele_idpost_mappedThe same allele appearing in multiple score sets shares a single row; annotation results are shared accordingly.
Annotation FKs point to
allele_id.AnnotationStatusis scoped to QC/audit only. Annotation data lives in first-class per-type tables withsuperseded_atfor temporal queries:VEPAnnotation(new),GnomADVariant(updated),ClinicalControl(updated).Schema rule: Fields stable by construction (HGVS strings, ClinGen IDs) live as columns on the
alleles/mapping_recordstables. External interpretations subject to revision (VEP, gnomAD, ClinVar) live in temporal annotation tables withsuperseded_at.Pipeline:
MappingRecord+Allelerows at all applicable levels for every variant. For protein-level targets, reverse translation enumerates all coding variants encoding each amino acid change.Allelerows (level = 'coding'orlevel = 'genomic') are submitted to ClinGen pre-registration. Alleles already registered are skipped.Allelerows viaallele_id, with level-appropriate routing driven by thelevelcolumn.API transit:
AssayedVariantwithMappingRecord.assay_level = protein→mapping_record_alleles→Allelerows wherelevel = 'coding'→ CatVRS members.allelestable; CatVRS lives only in responses.Child Issues
dcd_mapping2
Data Model & Storage
ClinGen Pre-Registration
Annotation Pipeline
API Layer
Backfill
feat: Retroactive backfill — migrate MappedVariant data and run reverse translation for existing score sets #747 — Retroactive coverage for existing data
feat: Cross-level translation for multi-variant haplotype assay variants dcd_mapping2#103 — Non-adjacent protein haplotypes and multi-member nucleotide haplotypes (3-member cap)
Deferred
RLS Coordination (tracked under #808)
scoreset_idonmapped_variants; the link-table version reuses the same pattern