EBISPOT / ols4

Version 4 of the EMBL-EBI Ontology Lookup Service (OLS)
http://www.ebi.ac.uk/ols4/
Apache License 2.0
48 stars 22 forks source link

IAO property label not displayed #234

Closed jamesamcl closed 1 year ago

jamesamcl commented 1 year ago

https://www.ebi.ac.uk/ols4/ontologies/efo/classes/http%253A%252F%252Fwww.ebi.ac.uk%252Fefo%252FEFO_0000400

Screenshot 2023-02-28 at 02 41 57

IAO is in OLS so the label should be available.

jamesamcl commented 1 year ago

It is populated in linkedEntities but the label is an underscored CURIE thingy

"http://purl.obolibrary.org/obo/IAO_0000589" : {
  "definedBy" : [ "iao" ],
  "numAppearsIn" : "108",
  "hasLocalDefinition" : true,
  "label" : "IAO_0000589",
  "type" : "property"
},
jamesamcl commented 1 year ago

The definition of the term has an rdfs:label:

<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000589">
    <obo:IAO_0000111 xml:lang="en">OBO foundry unique label</obo:IAO_0000111>
    <obo:IAO_0000114 rdf:resource="http://purl.obolibrary.org/obo/IAO_0000125"/>
    <obo:IAO_0000115 xml:lang="en">An alternative name for a class or property which is unique across the OBO Foundry.</obo:IAO_0000115>
    <obo:IAO_0000116 xml:lang="en">The intended usage of that property is as follow: OBO foundry unique labels are automatically generated based on regular expressions provided by each ontology, so that SO could specify unique label = &apos;sequence &apos; + [label], etc. , MA could specify &apos;mouse + [label]&apos; etc. Upon importing terms, ontology developers can choose to use the &apos;OBO foundry unique label&apos; for an imported term or not. The same applies to tools .</obo:IAO_0000116>
    <obo:IAO_0000117 xml:lang="en">PERSON:Alan Ruttenberg</obo:IAO_0000117>
    <obo:IAO_0000117 xml:lang="en">PERSON:Bjoern Peters</obo:IAO_0000117>
    <obo:IAO_0000117 xml:lang="en">PERSON:Chris Mungall</obo:IAO_0000117>
    <obo:IAO_0000117 xml:lang="en">PERSON:Melanie Courtot</obo:IAO_0000117>
    <obo:IAO_0000119 xml:lang="en">GROUP:OBO Foundry &lt;http://obofoundry.org/&gt;</obo:IAO_0000119>
    <rdfs:label xml:lang="en">OBO foundry unique label</rdfs:label>
</owl:AnnotationProperty>

and displays properly in OLS4:

Screenshot 2023-02-28 at 02 51 10
jamesamcl commented 1 year ago

label is also present in the API:

Screenshot 2023-02-28 at 02 53 29
jamesamcl commented 1 year ago

This is because we are taking the label from the importing ontology (EFO) rather than the defining ontology (IAO). EFO doesn't define the label when it imports the term, so OLS falls back on the short form.

I don't see any reason for not defaulting to the label from the defining ontology at this point.

matentzn commented 1 year ago

This is an interesting question- I would discuss this with David and Henriette and tend to "if a label exist in the ontology, use it, else use the label provided by the defining ontology". I would have a further rule that imports a label from an arbitrary ontology.

jamesamcl commented 1 year ago

That sounds reasonable but would require some changes in how we populate the label property, as currently we fall back on the CURIE in the dataload, so it would be impossible to implement that logic without being able to tell whether the label was explicitly populated or as a fallback.

I've flipped the logic for now so that the defining labels are used, but it's easy enough to change in the future. I'll open a separate issue.