UniProt protein-grounding pass: ground 9 protein labels (+ 8-col writer fix)#105
Merged
Conversation
…writer) Runs scripts/match_uniprot_to_proteins.py to match residual GENE_OR_PROTEIN causal-node labels against the kg-microbe UniProt index, picks tier-1/2/3 representatives, and grounds them via ground_causal_nodes.py --apply. Node grounding rises 985 -> 995 / 1643 (59% -> 60%). 9 representatives added to mappings/node_grounding.tsv (all single-protein, tier-1 exact-name unless noted): nitrogenase, multicopper oxidase, catalase, urease, luciferase, proteorhodopsin, metal efflux pump (tier-2), drug efflux pump (tier-2), czc cation-efflux system (tier-3 paren) The matcher correctly declined multi-protein complexes (photosystem II, type III/IX secretion system, flagellar motor/basal body, photosynthetic reaction center) — these stay residual rather than grounding to one subunit. Bug fix: match_uniprot_to_proteins.py --apply emitted a 7-column row, but mappings/node_grounding.tsv gained a predicate_id column in #83. The writer now emits 8 columns with predicate_id=skos:closeMatch (a single UniProt sequence represents a generic protein concept — never an exact match). validate-strict: 477 files, 0 errors. Grounding is idempotent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Grounds residual GENE_OR_PROTEIN causal-node labels via
scripts/match_uniprot_to_proteins.py(streams the kg-microbe UniProt index), picks tier-1/2/3 representatives, and applies them withground_causal_nodes.py --apply.Node grounding: 985 → 995 / 1643 (59% → 60%).
9 representatives added (
mappings/node_grounding.tsv)All single-protein, tier-1 exact-name match unless noted:
nitrogenase,multicopper oxidase,catalase,urease,luciferase,proteorhodopsin,metal efflux pump(tier-2 suffix),drug efflux pump(tier-2),czc cation-efflux system(tier-3 paren).The matcher correctly declined multi-protein complexes — photosystem II, type III/IX secretion systems, flagellar motor/basal body, photosynthetic reaction center — rather than grounding a whole machine to one subunit. Those stay residual.
Bug fix (carried in this PR)
match_uniprot_to_proteins.py --applyemitted a 7-column row, butnode_grounding.tsvgained apredicate_idcolumn in #83 (PR #101). Left unfixed,--applywould have misaligned every column. The writer now emits 8 columns withpredicate_id=skos:closeMatch— a single UniProt sequence represents a generic protein concept, so the match is close, never exact (consistent with the existing protein groundings).Verification
just validate-strict: 477 files, 0 errors.🤖 Generated with Claude Code