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

Unable to programmatically query for ontology terms (started 1/28/2025) #834

Open
jlchang opened this issue Jan 29, 2025 · 6 comments
Open
Assignees
Labels
bug High priority Widespread issue that reduces usability substantially or an ontology that is completely unusable

Comments

@jlchang
Copy link

jlchang commented Jan 29, 2025

Describe the bug
To do an ontology lookup we compose a compound URL that is composed of a URL to to target the terms endpoint for a particular ontology followed by a double url-encoded ontology term IRI.

Example: 'https://www.ebi.ac.uk/ols/api/ontologies/ncbitaxon/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FNCBITaxon_9606'

To get the base URI, we would query for information about the ontology and obtain the non-encoded URI from $.config.fileLocation in the response object. Today, the fileLocation property is not populated and this breaks our ability to programmatically generate queries.

To Reproduce
Example query output where fileLocation is null:

curl -i -H 'Accept: application/json' -L 'https://www.ebi.ac.uk/ols/api/ontologies/mondo'

HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Date: Wed, 29 Jan 2025 00:41:01 GMT
Location: https://www.ebi.ac.uk/ols4/api/ontologies/mondo
Connection: Keep-Alive
Content-Length: 0

HTTP/1.1 200
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Strict-Transport-Security: max-age=0
Access-Control-Max-Age: 3600
Date: Wed, 29 Jan 2025 00:41:01 GMT
Transfer-Encoding: chunked
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: GET

{
"languages" : [ "en" ],
"lang" : "en",
"ontologyId" : "mondo",
"loaded" : "2025-01-27T04:15:58.744540303",
"updated" : "2025-01-27T04:15:58.744540303",
"status" : "LOADED",
"message" : "",
"version" : null,
"fileHash" : null,
"loadAttempts" : 0,
"numberOfTerms" : 55994,
"numberOfProperties" : 469,
"numberOfIndividuals" : 18,
"config" : {
"id" : "mondo",
"versionIri" : "http://purl.obolibrary.org/obo/mondo/releases/2025-01-07/mondo.owl",
"namespace" : "mondo",
"preferredPrefix" : "MONDO",
"title" : "Mondo Disease Ontology",
"description" : "A semi-automatically constructed ontology that merges in multiple disease resources to yield a coherent merged ontology.",
"homepage" : "https://monarch-initiative.github.io/mondo",
"version" : null,
"mailingList" : null,
"tracker" : "https://github.com/monarch-initiative/mondo/issues",
"logo" : null,
"creators" : [ ],
"annotations" : null,
"fileLocation" : null,
"oboSlims" : false,
"labelProperty" : "http://www.w3.org/2000/01/rdf-schema#label",
"definitionProperties" : [ ],
"synonymProperties" : [ ],
"hierarchicalProperties" : [ ],
"baseUris" : [ ],
"hiddenProperties" : [ ],
"preferredRootTerms" : [ ],
"isSkos" : false,
"allowDownload" : false
},
"baseUris" : [ ],
"_links" : {
"self" : {
"href" : "https://www.ebi.ac.uk/ols4/api/ontologies/mondo?lang=en"
},
"terms" : {
"href" : "https://www.ebi.ac.uk/ols4/api/ontologies/mondo/terms"
},
"properties" : {
"href" : "https://www.ebi.ac.uk/ols4/api/ontologies/mondo/properties"
},
"individuals" : {
"href" : "https://www.ebi.ac.uk/ols4/api/ontologies/mondo/individuals"
}
}
}

Expected behavior
$.config.fileLocation for MONDO ontology should yield:
https://purl.obolibrary.org/obo

If this change is intended, please recommended a more robust method to obtain the base URI for a given ontology.

Screenshots
FYI, probably related but thought I'd include.

Image

Additional context
Add any other context about the problem here.

@jlchang jlchang added the bug label Jan 29, 2025
@haideriqbal haideriqbal self-assigned this Jan 29, 2025
@haideriqbal haideriqbal added the High priority Widespread issue that reduces usability substantially or an ontology that is completely unusable label Jan 29, 2025
@haideriqbal
Copy link
Collaborator

Thanks for reporting this @jlchang! the change is not intended and we will investigate it.

@jamesamcl
Copy link
Member

I think the base uri should be in the baseUris property? But it seems to be empty

@haideriqbal
Copy link
Collaborator

i believe the issue would be resolved in the coming release within next 12-48 hours. The issue arose because we have changed the ontology purl field from "ontology_purl" -> "ontologyPurl". This is the field which populated the fileLocation field. The code change was deployed before the data was reindexed, hence seeing the null values....

We'll keep this in mind for the future and this issue will be resolved in next few 12-24 hours. Apologies for the inconvenience.

@haideriqbal
Copy link
Collaborator

in terms of help docs not visible... fixing that now!

@jlchang
Copy link
Author

jlchang commented Jan 29, 2025

Thanks for the context around how the issue came to be - much appreciated. Glad to hear it will be resolved soon with a reindex of the relevant data.

@haideriqbal
Copy link
Collaborator

No worries! help page link is fixed as well and will be available in the upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug High priority Widespread issue that reduces usability substantially or an ontology that is completely unusable
Projects
None yet
Development

No branches or pull requests

3 participants