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

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

Open
cmungall opened this issue Jun 1, 2023 · 1 comment

Comments

@cmungall
Copy link
Collaborator

cmungall commented Jun 1, 2023

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
Copy link
Collaborator

cthoyt commented Jul 2, 2023

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'

cthoyt added a commit to biopragmatics/bioregistry that referenced this issue Jul 3, 2023
cthoyt added a commit to biopragmatics/bioregistry that referenced this issue Jul 3, 2023
There's an API endpoint that lets you get all if the mappings from one
external registry to another. For example, getting all mappings from OBO
Foundry to Bioportal can be done with
https://bioregistry.io/api/metaregistry/obofoundry/mapping/bioportal.

However, the implementation of this functionality is built in to the API
route itself. This PR externalizes that implementation into the
Bioregistry's manager class so it can be reused.

Related to INCATools/ontology-access-kit#588
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

No branches or pull requests

2 participants