INCATools / ontology-access-kit

Ontology Access Kit: A python library and command line application for working with ontologies
https://incatools.github.io/ontology-access-kit/
Apache License 2.0
116 stars 27 forks source link

bioportal client should implement mapping between OBO prefixes and bioportal prefixes #588

Open cmungall opened 1 year ago

cmungall commented 1 year ago

Currently using the bioportal client with some ontologies like FBbt, WBbt results in failure, because bioportal uses different names eg FB-BT

We should implement the mapping - using bioregistry? in this lib or in https://github.com/cthoyt/ontoportal-client?

cthoyt commented 1 year ago

You can use one of the two endpoints in the Bioregistry:

~I realize that the route implements the logic in https://github.com/biopragmatics/bioregistry/blob/db0ef92f1f52fd871d62ee71fd876fb6c93003a1/src/bioregistry/app/api.py#L273-L315, so it's not reusable at the moment from the Python API.~ Update: you can use the following code in Bioregistry v0.9.64:

>>> from bioregistry import manager
>>> diff = manager.get_external_mappings("obofoundry", "bioportal")
>>> diff.mappings["gaz"]
'GAZ'