-
Notifications
You must be signed in to change notification settings - Fork 13
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
Handler for BioThings API providing graph type data #20
Comments
A good test case is: If the feature is implemented correctly, the second query should be able to return 1 hit which is a reverse version of the 1 query. |
The predicate mapping file is available here: https://github.com/biothings/pending.api/blob/master/predicate_mapping.json. But feel free to suggest other places which is more appropriate to put it. The key of the dictionary is the predicate, and the value is the reverse of the predicate. |
@kevinxin90 I wanna go over this initial implementation with you before I refine the details, please check if this is the intended behavior: For a query to
It is translated to:
and got the result:
If this is the expected behavior, I'll add the result transformation logic and other refinements. |
@newgene do you have an opinion on the additional input format support, should we take extra time to implement dot notation support, mixing url params & url encoded POST body, etc? |
Implemented in pending.api/web/handlers/graph.py Line 19 in 7530fec
|
Example Graph representation:
Above output could be represented in another way by switching the subject & object and reverse the predicate, e.g.
So if the user provides the following query
It should be translated into two queries
And the response from the 2nd query should also be reversed and merge with the first query.
In summary:
We have an API set up providing graph type data for testing: https://biothings.ncats.io/biggim
The text was updated successfully, but these errors were encountered: