monarch-initiative / mondo

Mondo Disease Ontology
http://obofoundry.org/ontology/mondo
Creative Commons Attribution 4.0 International
236 stars 54 forks source link

Synonyms not returned in OLS search API #5416

Closed marius-mather closed 1 year ago

marius-mather commented 2 years ago

I'm attempting to use Mondo via the OLS API, particularly the search endpoint as I'd like to get good results if users enter synonyms for terms, as well as showing the user those synonyms.

Using the search endpoint currently, it doesn't seem to be possible to get synonyms returned in the search results, even when specifiying it in the fieldList , e.g. https://www.ebi.ac.uk/ols/api/search?q=gallbladder%20disorder&queryFields=label,synonym,annotations&fieldList=id,iri,label,synonym,annotations&ontology=mondo

Instead, I have to then grab each individual term from a different endpoint, and find the synonyms in term -> annotation -> has_exact_synonym

Is it possible to configure the synonym field in the ontology metadata so that synonyms work correctly? I'm trying to understand the different configurations/processes involved. It looks like synonyms work in some OLS search results because the synonym_property has been set, e.g. EFO has a config file with:

    synonym_property:
      - http://www.geneontology.org/formats/oboInOwl#hasExactSynonym

I haven't been able to work out whether adding this field to the metadata on OBOFoundry will work - or whether additional configuration is needed.

Any thoughts on whether this can be achieved?

nicolevasilevsky commented 2 years ago

@marius-mather thanks for reporting this issue, we'll look into it. Several of us are attending conferences this week, so thanks for your patience if it takes us longer than usual to look into this.

nicolevasilevsky commented 1 year ago

Hi @marius-mather sorry for the long delay. I this still an issue?

marius-mather commented 1 year ago

Hi @nicolevasilevsky - I think I eventually figured out that I could get the synonyms from the API using has_exact_synonym_annotation in the fieldList when searching - so synonyms are available from the OLS API, just not in an obvious place. But maybe this just needs documenting rather than a change to the OLS config?

nicolevasilevsky commented 1 year ago

Sure, we can document this!

We have this documentation: https://mondo.readthedocs.io/en/latest/editors-guide/f-entities/#synonyms

Would you know to look here? It's linked from our website too (https://mondo.monarchinitiative.org/pages/editors/)

On the readthedocs site, there is a section called Users Corner - I should make that more prominent on the website.

Any other advice about improving our documentation is welcomed!

nicolevasilevsky commented 1 year ago

I updated our website, closing

nicolevasilevsky commented 1 year ago

https://mondo.monarchinitiative.org/pages/contributors/