MaastrichtU-IDS / translator-openpredict

🔮🐍 A package to help serve predictions of biomedical concepts associations as Translator Reasoner API
https://openpredict.semanticscience.org
MIT License
11 stars 6 forks source link

disease treats disease being returned on TRAPI query #48

Closed CaseyTa closed 1 year ago

CaseyTa commented 1 year ago

Describe the problem

During today's stand-up meeting, there was a query for ChemicalEntity treats MONDO:0005180 (parkinson disease), and OpenPredict was returning many results saying MONDO:0005180 (Parkinson disease) treats MONDO:0008199 (late-onset Parkinson disease). I believe this was in the dev environment.

PKs: ARS: ecbaf378-e57e-4d6d-bc78-419e8c280a7e OpenPredict result: https://arax.ncats.io/?r=4548bc8a-9466-485f-814e-f0829876b8e7

Sample edge:

        "e0": {
          "attributes": [
            {
              "attribute_type_id": "EDAM:data_1048",
              "description": "model_id",
              "value": "openpredict_baseline"
            },
            {
              "attribute_type_id": "EDAM:data_1772",
              "description": "score",
              "value": "0.9835270306548173"
            }
          ],
          "object": "MONDO:0008199",
          "predicate": "biolink:treats",
          "sources": [
            {
              "resource_id": "infores:openpredict",
              "resource_role": "primary_knowledge_source"
            },
            {
              "resource_id": "infores:cohd",
              "resource_role": "supporting_data_source"
            }
          ],
          "subject": "MONDO:0005180"
        },
vemonet commented 1 year ago

Thanks @CaseyTa is there a TRAPI query JSON we can use to reproduce the error?

CaseyTa commented 1 year ago

I think this:

{
    "message": {
        "query_graph": {
            "edges": {
                "e0": {
                "attribute_constraints": [],
                "knowledge_type": "inferred",
                "object": "n0",
                "predicates": [
                    "biolink:treats"
                ],
                "qualifier_constraints": [],
                "subject": "n1"
                }
            },
            "nodes": {
                "n0": {
                "categories": [
                    "biolink:Disease"
                ],
                "constraints": [],
                "ids": [
                    "MONDO:0005180"
                ],
                "is_set": false,
                "name": "parkinson disease"
                },
                "n1": {
                "categories": [
                    "biolink:ChemicalEntity"
                ],
                "constraints": [],
                "is_set": false
                }
            }
        }
    }
}

Got this from the ARAX UI, under Query > JSON

Edit: the JSON from ARAX UI just needed to be wrapped in message and query_graph objects. I sent the above to the dev instance (https://openpredict.semanticscience.org/query) and get back edges like

                    "subject": "MONDO:0005180",
                    "object": "OMIM:168600",
                    "predicate": "biolink:treats"
vemonet commented 1 year ago

Thanks @CaseyTa the issue was coming from a behavior of the NodeNormalization that was not handled, it's now fixed on the dev server, it now properly returns drugs predictions for parkinson

CaseyTa commented 1 year ago

Thanks @vemonet!