-
Notifications
You must be signed in to change notification settings - Fork 5
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
retrieve sorted classes and class descendants #165
Comments
Marcos' suggested approach is indeed the most optimal here. I am implementing this feature using the search endpoint. The signatures will be as follows: Ontology Classeshttp://data.bioontology.org/search?ontologies=NCIT&sort=prefLabel Descendants ClassesAs of now,
|
Does that sort order give prefLabel prioritory (because it is last)? I expect that's what CEDAR would want, to sort by prefLabel overall, and by acronym only within that. Maybe Marcos can confirm, if he hasn't already. |
@graybeal You are right, prefLabel should have the highest priority. Here is an example to clarify the desired behavior: |
Got it. I had assumed that you wanted terms grouped by ontology. I'll change the sort order. |
…class descendants
This has been implemented and deployed to production. |
@mdorf I'm integrating this capability into CEDAR and I've found an issue: I want to retrieve the descendants of the class "Delivery Procedures", from the NLMVS ontology. If I use the "descendants" call, I get 89 results. However, if I use the search endpoint with the "subtree_root_id" parameter, I get 88 results. The class "Breech extraction with internal podalic version (procedure)" is missing. Descendants endpoint, 89 results: Search endpoint, 88 results: This is a relatively small problem in this case (just one missing class), but it shows that there might be an indexing issue that might cause more serious problems in other calls. |
There is an index record for the class "Breech extraction with internal podalic version (procedure)" (http://purl.bioontology.org/ontology/SNOMEDCT/302382009), but it doesn't include any parents: I plan to re-index NLMVS ontology to see if that addresses the issue. |
Re-indexing of NLMVS appears to have fixed the issue. |
Thanks for fixing that, @mdorf. Unfortunately, it seems that this issue is affecting other ontologies as well. For example, the number of classes from NCIT differs substantially when using the classes endpoint vs. the search endpoint: http://data.bioontology.org/ontologies/NCIT/classes/ -> 159453 classes I wonder if there is there is something related to when the indexing is triggered that needs to be fixed. |
Unfortunately, the index is a copy of the data, and, like any copy, it is susceptible to discrepancies. Perhaps we need an automated way to verify that the number of records in the index corresponds with the total number of classes for each ontology. |
I would only suggest to add this parameter to the API documentation : |
Marcos has written up a detailed description of a capability CEDAR would benefit from, to be able to request sorted list of classes in an ontology, or class descendants from each class. It is described at https://docs.google.com/document/d/1rdU65dAubkRytCpXxTFZXsbqaAgLIgZoTTuaNZT4WDk/edit.
The text was updated successfully, but these errors were encountered: