EBISPOT / OLS

Ontology Lookup Service from SPOT at EBI
http://www.ebi.ac.uk/ols
Apache License 2.0
95 stars 40 forks source link

Help with configuring ontologies to support synonyms in OLS #646

Closed marius-mather closed 1 year ago

marius-mather commented 1 year ago

I'm trying to work with a few different ontologies via the OLS search API. For my purposes, if I could search by synonym and get synonyms returned in the search results, that would cover all my needs. As someone a bit new to the area I am having trouble understanding how to do this consistently e.g.:

What configuration needs to occur to have the synonyms defined in these ontologies come through in the OLS search API? I've seen some references to configuration files like the metadata/<ontology_name>.md files but can't work out what changes need to be made.

Any advice is appreciated.

serjoshua commented 1 year ago

Hi Marius,

Thank you for raising your concern to us. We are more than happy to help but first, may we know if the concerned ontology is already available in OLS? And if so, how it is configured? It is possible that the creators of that ontology themselves could help you more as well.

marius-mather commented 1 year ago

Hi Josh, Both Mondo and VBO are in the EBI instance of the OLS already. I have asked about this in the Mondo github https://github.com/monarch-initiative/mondo/issues/5416 . I assume the relevant configuration for Mondo is under metadata, (e.g. https://github.com/monarch-initiative/mondo/tree/master/src/ontology/metadata), but I'm having trouble understanding how this could be updated to make better use of synonyms, both for Mondo and other ontologies more generally.

serjoshua commented 1 year ago

Hello Marius,

I see. Well, in OLS, we could do overrides or custom configurations. One of those is the use of a synonym_property configuration wherein you can list property URIs (e.g., http://www.w3.org/2004/02/skos/core#closeMatch, http://www.w3.org/2004/02/skos/core#exactMatch) that will be used in the ontology to define synonyms among terms. We have this in our "form" when someone wants to add their ontology to OLS. I hope it helps.

matentzn commented 1 year ago

@serjoshua what is the default config of synonym_property? Seems to me oio:hasExactSynonym should be in it?

serjoshua commented 1 year ago

Good day @matentzn,

Yes, we can add oio:hasExactSynonym under VBO's OLS synonym_property configuration. But first, may I know what is the exact URI? And, do we only need to add it under VBO?

Also, you can consider this your ticket for this request @marius-mather. We only need the details mentioned above. I want to add though that we will be having a data release next week (very timely) and right now, we only do data updates to specific ontologies as needed. If we do these changes, I can include VBO (and/or MONDO) to our data release.

serjoshua commented 1 year ago

Apologies @matentzn, I just realized what you were asking. As far as I know, we do have hasExactSynonym as default. I might need to double check it.

serjoshua commented 1 year ago

I did some investigation and we do have http://www.geneontology.org/formats/oboInOwl#hasExactSynonym as default. As long as it is loaded from OBO Foundry configuration (which VBO is), it will set the synonym property to http://www.geneontology.org/formats/oboInOwl#hasExactSynonym when there is none specified.

matentzn commented 1 year ago

Maybe we are misunderstanding @marius-mather question?

serjoshua commented 1 year ago

We could be. So, referring back to the original query, may we know what are you expecting from the search API response? And if there is a more specific scenario where we can maybe replicate or test on our side, it would be of great help @marius-mather. Thanks Nico by the way.

marius-mather commented 1 year ago

The VBO breed synonyms are now being returned in the search API response (when including fieldList=synonym in the request), so maybe this just needed a new round of data ingestion for the synonyms to be loaded correctly. Thanks for all your help.