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

extend EBI OLS registry item #12

Open
andrewsu opened this issue Feb 13, 2018 · 11 comments
Open

extend EBI OLS registry item #12

andrewsu opened this issue Feb 13, 2018 · 11 comments

Comments

@andrewsu
Copy link
Contributor

currently have endpoint for going from string to DOID. Extend to use DOID to get parents, children, xrefs. Do initially for diseases, but in theory could be expanded to other types.

(based on discussion with @stuppie and how disease ontology endpoint does this in a somewhat non-intuitive way.)

@kevinxin90
Copy link
Contributor

@andrewsu Sorry I just looked into this. It's pretty hard at this moment. The problem is below:
The endpoint you want to add is this one: "http://www.ebi.ac.uk/ols/api/ontologies/go/terms/{IRI}/ancestors"
As you can see, it requires IRI as its input. And IRIs looks like this: http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226.
So it's using GO_0043226 as its ID. However, GO term should look like something like this GO:0043226, which is in CURIE format.
If we want to describe this endpoint using SmartAPI specification, we are going to specify the input as 'http://identifiers.org/go/', which should correspond to the format like GO:******. However, the curie format wouldn't be accepted by that API endpoint.

@kevinxin90
Copy link
Contributor

I was using GO as an example here, but it also applies to DOID, etc.

@andrewsu
Copy link
Contributor Author

other other ideas on how we can query subclass relationships within the smartAPI / biothings explorer ecosystem?

@cmungall
Copy link
Member

cmungall commented Mar 20, 2018

You could do SPARQL queries over ontobee. There are other ontology APIs. You could use the monarch scigraph one (but we load mondo not doid). Or you could just write a wrapper for the OLS API or piggy back off a beacon wrapper. Or you could ask Simon to add CURIEs.

FWIW, I don't think OLS is doing anything wrong here. The obolibrary PURL is canonical for OBO IDs (note: not identifiers.org).

I'm interested in how this will be used. Let's say I have a disease, say Charcot-Marie-Tooth, and I want to traverse to genes. The desired semantics will be from the query disease to subclasses (reflexive transitive) (e.g. CMT2B) to directly associated genes. A semantics-unaware pathfinder will find all manner of interesting paths from an ontology class to annotated data, maybe going two hops up to "nervous system disease" and then 3 hops down to a completely unrelated disease. This could be overcome by a combined reasoner and planner - is this the direction you are going?

Of course, we could simply assume that we will have semantics aware endpoints that bake in the ontology axioms. For example if you query monarch for CMT you will get back associations with subject either equal to CMT or to a subclass of it.

@kevinxin90
Copy link
Contributor

@cmungall @andrewsu Thanks for the reply. Regarding the OLS API, the best scenario for BioThings Explorer at the moment would be that OLS API would add this feature, so no wrapper is needed. I do see there is an issue opened earlier in OLS API github. I will follow up with them and hopefully, the new feature would be added soon.
As for the semantics-unaware pathfinder, we are not at the stage of implementing that yet. But I do see a lot of the reasoning teams are actually traversing the disease ontology or human phenotype ontology (e.g. find child ontology) to populate their local neo4j databases. So this is definitely something worth exploring once we have the data integration architecture fully implemented.
Thanks!

@simonjupp
Copy link
Contributor

simonjupp commented Mar 20, 2018

We have a new service called OxO https://www.ebi.ac.uk/spot/oxo/. This does both CURIE resolving and gives you access to ontology xrefs. e.g. https://www.ebi.ac.uk/spot/oxo/api/terms/GO:0043226 returns the canonical URI which could feed into the OLS API query and you can also get mappings from this endpoint https://www.ebi.ac.uk/spot/oxo/api/mappings?fromId=DOID:162

@kevinxin90
Copy link
Contributor

@simonjupp Hi Simon, thanks for the reply! I just looked at the OxO service. That's super useful in terms of mapping ontology ids.
And sorry I didn't make make my question clear enough on the OLS github. What we try to achieve with OLS is to retrieve parent/children information for a specific DOID or other ontology ids. And the problem we are having now is that for that OLS endpoint, it seems you guys only support IRI as the input. However, what we would really like is that you guys would directly support CURIEs, so we no longer need to first convert the CURIE into IRI, then use your service.
For example, currently to retrieve the parent information of a specific GO term, you would have to query like this: https://www.ebi.ac.uk/ols/api/ontologies/go/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FGO_0043226/children. What we hope is that we could directly query OLS service like this: https://www.ebi.ac.uk/ols/api/ontologies/go/terms/GO:0043226/children.
I'm wondering is this something you guys would consider implementing in the future?
Thanks a lot!

@simonjupp
Copy link
Contributor

simonjupp commented Mar 20, 2018

I'm just adding some new API endpoints for you. I'll let you know when these go live.

Direct parents - https://www.ebi.ac.uk/ols/api/ontologies/go/parents?id=GO:0043226
All parents (transitive) - https://www.ebi.ac.uk/ols/api/ontologies/go/ancestors?id=GO:0043226
All parents and related (transitive) e.g. includes part_of https://www.ebi.ac.uk/ols/api/ontologies/go/hierarchicalAncestors?id=GO:0043226

https://www.ebi.ac.uk/ols/api/ontologies/go/children?id=GO:0043226
https://www.ebi.ac.uk/ols/api/ontologies/go/descendants?id=GO:0043226
https://www.ebi.ac.uk/ols/api/ontologies/go/hierarchicalDescendants?id=GO:0043226

The id parameter can take any value and will attempt to resolve it e.g. id=http://purl.obolibrary.org/obo/GO_0043226, id=GO_0043226 or id=GO:0043226

or you can be explicit using iri, short_form or obo_id parameter
https://www.ebi.ac.uk/ols/api/ontologies/go/parents?iri=http://purl.obolibrary.org/obo/GO_0043226
https://www.ebi.ac.uk/ols/api/ontologies/go/parents?short_form= GO_0043226
https://www.ebi.ac.uk/ols/api/ontologies/go/parents?obo_id=GO:0043226

@kevinxin90
Copy link
Contributor

@simonjupp Hi Simon, that's great! Thank you so much! Just to confirm, these new endpoints to be added will not be limited to GO right? Will it be applied to other ontologies whose IDs have CURIE format, e.g. disease ontology id (DOID)?
Thanks!

@simonjupp
Copy link
Contributor

Of course, there may be a subset of ontologies where the curie format is not suitable, but certainly for the ontologies in the OBO library this will work.

@kevinxin90
Copy link
Contributor

That's prefect! Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants