Pad ARI ids in the equivalencies export to match the ontology - #62
Merged
KrishnaTO merged 2 commits intoAug 16, 2026
Merged
Conversation
69 rows spelled their disease as ARI 1001 where the ontology and ari.sssom.tsv both spell it ARI 0001001, so the three files did not join on disease id without normalising first. That is what kept the drift between the two exports hard to see. The correct spelling is read from ARI_ID in the ontology rather than assumed to be seven digits, because ARI:0002 and ARI:0003 are genuinely four digits there and must not be re-padded. Only column 2 differs on every rewritten row; no row added or removed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3 tasks
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.
Stacked on #61 — its base is
claude/remove-icd9-codes-from-data, so review that one first. GitHub will retarget this tomainautomatically once #61 merges. Stacking avoids a delete-versus-modify conflict on the four rows both changes touch.What and why
69 rows in
mappings/ari.equivalencies.tsvspelled their disease asARI 1001where the ontology andmappings/ari.sssom.tsvboth spell itARI 0001001. The three files therefore did not join on disease id without normalising first — which is exactly what kept the drift between the two exports invisible for so long.12 distinct diseases, 69 rows, one column.
The correct spelling is read, not assumed
The fix takes each id from
ARI_IDinontologies/ari_t1d.owlrather than zero-padding to a fixed width. That matters:ARI:0002andARI:0003are genuinely four digits in the ontology, and padding them to seven would have introduced the same class of bug in the other direction.Verification
subject-paddingfinding cleared.Advances #23 ("Validate all diseases with database xrefs"); referenced rather than closed.
🤖 Generated with Claude Code