OLS icon indicating copy to clipboard operation
OLS copied to clipboard

Help with configuring ontologies to support synonyms in OLS

Open marius-mather opened this issue 2 years ago • 2 comments

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.:

  • For Mondo I eventually worked out that I can get synonyms returned in the search API if I include has_exact_synonym_annotation in the fieldList parameter
  • For VBO I can see synonyms when I look up individual terms via the API, under the obo_synonym field, but can't seem to get them reported via the search API.

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.

marius-mather avatar Oct 21 '22 05:10 marius-mather

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.

serjoshua avatar Oct 25 '22 12:10 serjoshua

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.

marius-mather avatar Oct 26 '22 00:10 marius-mather

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.

serjoshua avatar Oct 26 '22 13:10 serjoshua

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

matentzn avatar Nov 10 '22 05:11 matentzn

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 avatar Nov 10 '22 09:11 serjoshua

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 avatar Nov 10 '22 09:11 serjoshua

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.

serjoshua avatar Nov 10 '22 11:11 serjoshua

Maybe we are misunderstanding @marius-mather question?

matentzn avatar Nov 10 '22 14:11 matentzn

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.

serjoshua avatar Nov 10 '22 14:11 serjoshua

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.

marius-mather avatar Nov 23 '22 03:11 marius-mather