-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Add extended prefix map artifact to custom context generation #792
Comments
cthoyt
added a commit
that referenced
this issue
Apr 4, 2023
@cthoyt awesome thanks a ton! |
Example usage: import curies
#: OBO context's extended prefix map
url = "https://github.com/biopragmatics/bioregistry/raw/main/exports/contexts/obo.epm.json"
converter = curies.Converter.from_extended_prefix_map(url)
>>> converter.expand("GO:1234567")
'http://purl.obolibrary.org/obo/GO_1234567'
>>> converter.compress("http://purl.obolibrary.org/obo/GO_1234567")
'GO:1234567'
>>> converter.compress("http://amigo.geneontology.org/amigo/term/GO:1234567")
'GO:1234567'
>>> converter.standardize_prefix("gomf")
'GO'
>>> converter.standardize_curie("gomf:1234567")
'GO:1234567'
>>> converter.standardize_uri("http://amigo.geneontology.org/amigo/term/GO:1234567")
'http://purl.obolibrary.org/obo/GO_1234567' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The world should rejoice at you https://github.com/cthoyt/curies#standardization
It would be great if we had the full extended prefix map for custom context generation.
(I still think we should discuss distinguishing preferred URI expansion from GUPRI expansion, but these issues are parallel)
The text was updated successfully, but these errors were encountered: