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

TRAPI 1.4 validation error when interacts_with predicate is in QEdges or Edges #701

Closed
colleenXu opened this issue Aug 17, 2023 · 2 comments
Labels
external Requires fixes to an external service On Test Related changes are deployed to Test server trapi 1.4

Comments

@colleenXu
Copy link
Collaborator

colleenXu commented Aug 17, 2023

Previously I identified that there was a TRAPI 1.4 validation error whenever interacts_with was the predicate for a QEdge or Edge.

This kind of error can be raised during BTE's creative-mode for chem affects gene because the 4th and 5th templates for both "increases" and "decreases" use interacts_with - so responses can theoretically have Edges with interacts_with. But in practice, it seems uncommon for BTE to get to the 4th template.

Note: the most recent changes to the templates did not adjust / add the interacts_with.

Example responses that raise this error:

  • creative-mode:
  • not-creative-mode:
    • Nortriptyline DRUGBANK:DB00540 interacts with what other genes: interacts.txt

The reasoner-validator raises the following:

Snippet of error info for Edges:

{'infores:ddinter -> infores:biothings-ddinter -> infores:service-provider-trapi': {'biolink:interacts_with': [{'edge_id': 'PUBCHEM.COMPOUND:4543[biolink:SmallMolecule]--biolink:interacts_with->PUBCHEM.COMPOUND:24872560[biolink:SmallMolecule]'},
   {'edge_id': 'PUBCHEM.COMPOUND:4543[biolink:SmallMolecule]--biolink:interacts_with->PUBCHEM.COMPOUND:6741[biolink:SmallMolecule]'},
   {'edge_id': 'PUBCHEM.COMPOUND:4543[biolink:SmallMolecule]--biolink:interacts_with->PUBCHEM.COMPOUND:4173[biolink:SmallMolecule]'},

Error info for QEdge:

{'warning.query_graph.edge.predicate.non_canonical': {'global': {'biolink:interacts_with': [{'edge_id': "n0[biolink:SmallMolecule]--['biolink:interacts_with']->n1[biolink:SmallMolecule]"}]}}}

These errors are occurring because interacts_with is a mixin and doesn't have canonical_predicate information.

@colleenXu colleenXu added trapi 1.4 external Requires fixes to an external service labels Aug 17, 2023
@colleenXu
Copy link
Collaborator Author

I consider this less important and unlikely to cause issues downstream...but maybe it'd be good to ask about this anyways?

  • Regarding creative-mode, this could be addressed by replacing interacts_with -> physically_interacts_with for the templates. But if we want to get this in before code-freeze, it has to be done ASAP (@tokebe , thoughts?)
  • This originates from us (our x-bte annotations using interacts_with), so we'd be the ones starting data-modeling / reasoner-validator discussions.
  • We previously had issues with interacts_with being an abstract term, but I didn't get clear guidance on how to proceed (like what other predicates to use) Issues with abstract terms: interacts_with biolink/biolink-model#1171. The predicate isn't an abstract term anymore.

@colleenXu
Copy link
Collaborator Author

colleenXu commented Aug 17, 2023

Addressed by replacing interacts_with -> physically_interacts_with in the templates.

Retested here and I confirmed that removal of the templates addresses this issue. Specifically: the TRAPI validation error isn't raised anymore for the response to what chem decreases activity/abundance of MAPK8IP3 NCBIGene:23162: new_MAPK8IP3decreased.txt

As noted in this post, I didn't notice any TRAPI errors when retesting biothings/bte_trapi_query_graph_handler#169 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Requires fixes to an external service On Test Related changes are deployed to Test server trapi 1.4
Projects
None yet
Development

No branches or pull requests

2 participants