Closed kevinschaper closed 8 months ago
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?
PR https://github.com/linkml/prefixmaps/pull/63 fixes this issue.
Notebook demonstrating the problem: https://colab.research.google.com/drive/1O0hAD5frD6lY0yVrvFVR2zYrM1elFLic#scrollTo=__ctJM_dA7Ts
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.