Skip to content

fix(worker): clear stale uniprot_id_from_mapped_metadata on remap - #849

Merged
davereinhart merged 3 commits into
release-2026.3.0from
fix/davereinhart/794/clear-stale-uniprot-id
Aug 20, 2026
Merged

fix(worker): clear stale uniprot_id_from_mapped_metadata on remap#849
davereinhart merged 3 commits into
release-2026.3.0from
fix/davereinhart/794/clear-stale-uniprot-id

Conversation

@davereinhart

Copy link
Copy Markdown
Collaborator

The UniProt polling job only writes target_gene.uniprot_id_from_mapped_metadata on a successful lookup. When a remap produced no UniProt ID (no results, ambiguous results, or the target gene was not found), the value from the previous mapping run survived and became mismatched against the freshly written pre/post mapped metadata — a state unreachable for a new target_gene record.

Clear the field alongside the other mapped metadata writes in map_variants_for_score_set, so it is reset before the downstream UniProt mapping jobs run.

Closes #794

The UniProt polling job only writes target_gene.uniprot_id_from_mapped_metadata
on a successful lookup. When a remap produced no UniProt ID (no results,
ambiguous results, or the target gene was not found), the value from the
previous mapping run survived and became mismatched against the freshly
written pre/post mapped metadata — a state unreachable for a new target_gene
record.

Clear the field alongside the other mapped metadata writes in
map_variants_for_score_set, so it is reset before the downstream UniProt
mapping jobs run.

Closes #794
@coveralls

coveralls commented Aug 18, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32328937926

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Warning

No base build found for commit b1c84da on release-2026.3.0.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 88.789%

Details

  • Patch coverage: 3 of 3 lines across 1 file are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 15609
Covered Lines: 13859
Line Coverage: 88.79%
Coverage Strength: 0.89 hits per line

💛 - Coveralls

@bencap bencap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Dave, looks good. I had a thought that our handling of the mapped_hgnc_symbol property looked really similar to the shape of this bug. If you'd rather keep this PR clean to just the issue at hand, I can open up a new issue for that one. Just lmk.

Comment thread src/mavedb/worker/jobs/variant_processing/mapping.py
The mapping job only wrote mapped_hgnc_name when gene info was present, so a
target gene remapped without gene info kept values from a prior run. Explicitly
reset to None in the else branch.
Add a unit test for the fix in 79b3a6b. The test seeds mapped_hgnc_name on every
target gene, runs map_variants_for_score_set against mapping output with no
gene_info, and asserts the field is reset to None.

The existing missing-gene-info test asserted the same final state but never seeded
a prior value, so it passed before the fix. This one fails without the else branch.
@davereinhart
davereinhart merged commit 62ca7f7 into release-2026.3.0 Aug 20, 2026
5 checks passed
@davereinhart
davereinhart deleted the fix/davereinhart/794/clear-stale-uniprot-id branch August 20, 2026 19:36
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.

Clear existing uniprot_id_from_mapped_metadata value from target_gene prior to updating

3 participants