-
Notifications
You must be signed in to change notification settings - Fork 11
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
filter on node attributes #174
Comments
In TRAPI 1.1,
Based on that, it appears we need to change |
update for TRAPI v1.2. I think the query constraints work the same as specified above. I updated the query below (maybe use SmallMolecule or ChemicalEntity?):
|
This is dependent on #302 and its PRs. I think it's addressed by this PR: biothings/bte_trapi_query_graph_handler#45 |
@marcodarko some feedback on biothings/bte_trapi_query_graph_handler#45: I only took a quick look based on this query, which worked as-expected compared to its unconstrained version: Click for query
Also, there is some complicated and unclear behavior in the specification regarding the operators and values...I think this involves some discussion with @andrewsu...
|
For now, let's only deal with single-value constraints. We also need to deal with mismatch between
|
Note that the following queries are working as-expected. However, I am currently using a local environ that excludes all pending biothings APIs except clinical risk kp api / multiomics wellness api... Modified version of A.2_RHOBTB2_twohop_constrainedModified from this
Modified version of A.9_EGFR_advancedModified from this
With the removal of pending apis, we currently cannot do the following query (no metaKG edges to do the operation with negatively regulates... Modified version of A.2a_expanded_RHOBTB2_twohop_constrainedModified from this
|
@marcodarko note that we may want to change the node attribute name from biolink:"highest_FDA_approval_status" to "biolink:"drug_regulatory_status_world_wide". @andrewsu please confirm whether we want to make this change or not... |
@marcodarko also FYI the discussion here NCATSTranslator/ReasonerAPI#298. It's difficult to know how to implement constraints when the node attribute's value is actually a list (not an int or string)....which is the case for most of the node attributes described above. |
Yes, the mapping of |
Just tried again with a full api list and the following queries ran and looked like they worked compared to the queries without the constraint:
|
@colleenXu @andrewsu great thank you both, I'll update the PRs |
Updating the queries to use Modified version of A.2_RHOBTB2_twohop_constrainedModified from this
Modified version of A.9_EGFR_advancedModified from this
With the removal of pending apis, we currently cannot do the following query (no metaKG edges to do the operation with negatively regulates... Modified version of A.2a_expanded_RHOBTB2_twohop_constrainedModified from this
|
Closing because it's been deployed on prod. Next steps are @andrewsu discussing whether the demo queries can use our node constraint modifications: #174 (comment) |
noting that only == was implemented (so I can't do <= or >=)... #380 |
I'm not sure if this is still working...the following query is hitting a TypeError: Query:
Console logs:
|
Node attributes on chemical compounds indicate drug approval status. Clearly we could filter based on these attributes post-query, and a helper tool to do this may be quite useful in the short term. But it would also be good to allow filtering on these node attributes as part of the query. Filters would presumably be based on EITHER the value of a certain attribute OR the existence of an attribute.
More details
This query gives all compounds related to SLC2A1 / GLUT1 (Updated to TRAPI v1.1 2021-06-08):
one of the results is pasted below -- several attributes seem to indicate FDA approval status, including
chembl_max_phase
,drugbank_groups
,fda_epc_pharmacology_class
The text was updated successfully, but these errors were encountered: