Skip to content
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

Release 2.0 can no longer expand OMIM IDs #62

Closed
kevinschaper opened this issue Jan 2, 2024 · 2 comments · Fixed by #63
Closed

Release 2.0 can no longer expand OMIM IDs #62

kevinschaper opened this issue Jan 2, 2024 · 2 comments · Fixed by #63

Comments

@kevinschaper
Copy link

Notebook demonstrating the problem: https://colab.research.google.com/drive/1O0hAD5frD6lY0yVrvFVR2zYrM1elFLic#scrollTo=__ctJM_dA7Ts

from curies import Converter
from prefixmaps.io.parser import load_multi_context

context = load_multi_context(["merged"])
extended_prefix_map = context.as_extended_prefix_map()
converter = Converter.from_extended_prefix_map(extended_prefix_map)
print(converter.expand("OMIM:123"))

prints None

I don't think this is the only prefix that's failing for us in the latest release, but it's one that jumped out.

@amc-corey-cox
Copy link
Contributor

amc-corey-cox commented Jan 4, 2024

Okay, the OMIM issue is here:

from prefixmaps.io.parser import load_multi_context
context = load_multi_context(["merged"])
extended_prefix_map = context.as_extended_prefix_map()
converter = Converter.from_extended_prefix_map(extended_prefix_map)
print(converter.expand("OMIM:123")) # = 'None'

But when I use the load_converter instead as suggested in the readme OMIM is there in the converter.

from prefixmaps import load_converter
new_converter = load_converter("merged")
print(new_converter.expand("OMIM:123")) # = 'http://identifiers.org/mim/123'
  1. I think that is our expected behavior. Kevin can we switch to using load_converter or is there some reason we're using load_multi_context to get the context first?
  2. Do we need to fix load_multi_context or is it acting as intended?

@amc-corey-cox
Copy link
Contributor

PR #63 fixes this issue.

@amc-corey-cox amc-corey-cox linked a pull request Jan 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants