Add converter with configurable pre-processing#171
Merged
Conversation
e2528d1 to
be74a4e
Compare
matentzn
reviewed
Apr 22, 2025
Collaborator
matentzn
left a comment
There was a problem hiding this comment.
Massive pr, will be super useful even if it contains some mild scope violations for a curies library. But who cares if it is useful
| full={"is_a": "rdf:type"}, | ||
| prefix={ | ||
| "OMIM:PS": "omim.ps:", | ||
| "omim:PS": "omim.ps:", |
Member
Author
There was a problem hiding this comment.
FYI all of this existed in PyOBO already, but I'm making it fully reusable and configurable
| }, | ||
| resource_prefix={ | ||
| "clo": { | ||
| "j": "NCIT:", |
Collaborator
There was a problem hiding this comment.
This goes a bit far but whyyyy not 😂
Member
Author
There was a problem hiding this comment.
you have to appreciate how many string processing rules I have curated to deal with the nonsense of non-standardized OBO ontologies
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.
This PR adds an extension to the
curies.Converterthat allows for pre-configuring string processing.This is necessary in many places where what;s possible with simple contraction and expansion isn't enough to parse CURIEs, URIs, or other strings that might appear in places where CURIEs or URIs are supposed to be.
The idea and draft code for this PR existed already in PyOBO, but this PR generalizes and makes it fully reusable. Here's the inspiration: