fix(worker): clear stale uniprot_id_from_mapped_metadata on remap - #849
Conversation
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
Coverage Report for CI Build 32328937926Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Warning No base build found for commit Coverage: 88.789%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
bencap
left a comment
There was a problem hiding this comment.
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.
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.
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