mapping-commons / sssom-py

Python toolkit for SSSOM mapping format
https://mapping-commons.github.io/sssom-py/index.html#
MIT License
49 stars 12 forks source link

Use bioregistry context as default context for prefix resolution #60

Closed matentzn closed 3 years ago

matentzn commented 3 years ago

https://github.com/bioregistry/bioregistry/blob/generalize-prefixe-maps/docs/_data/contexts/obo_context_synonyms.jsonld

@cthoyt thanks

cthoyt commented 3 years ago

I'm not super happy with the name. Do you think there's a need to make the export without the synonyms? If not, then i will delete it and rename this one to obo_context.jsonld

matentzn commented 3 years ago

I would suggests we leave it as is until I get to review and use it in full - in any case I would want to use a persistent ID for the context, so we will have to think about naming in any case.

cthoyt commented 3 years ago

For context (no pun intended), the updated context was introduced in https://github.com/bioregistry/bioregistry/pull/89.

cthoyt commented 3 years ago

I've merge the branch and renamed the files so you can now use:

matentzn commented 3 years ago

Thank you @cthoyt

I would have expected the OBO preferences to be identical to https://github.com/OBOFoundry/OBOFoundry.github.io/blob/master/registry/context.jsonld

But they are not, see for example: https://github.com/OBOFoundry/OBOFoundry.github.io/blob/2031cf6119308ee56905eccfa1569742fc0a75fb/registry/context.jsonld#L8

which is not even in the context, nor is dce etc.

matentzn commented 3 years ago

Can you remind me @cthoyt, in addition to the question above, what was the difference between the two contexts?

matentzn commented 3 years ago

I also noticed that the oboInOwl prefix is missing from those maps!

matentzn commented 3 years ago

Another requirement we have I forgot to mention: the prefix map needs to a bidrectional hashmap, so not only should the prefixes be unique (case sensitive, i.e. considering fbt and fBt different), but also we should have that each URL prefix matches exactly to one prefix. Is this the case?

matentzn commented 3 years ago

I have implement the biocontext in SSSOM as a default for now, but we need to straighten out the questions above before we can really close this ticket..

matentzn commented 3 years ago

This is implemented for a while now, and the latest version on pypi. Thanks @cthoyt