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

500 error when biolink:DiseaseOrPhenotypicFeature in QNode categories #18

Open
CaseyTa opened this issue Jul 16, 2024 · 3 comments
Open

Comments

@CaseyTa
Copy link

CaseyTa commented Jul 16, 2024

I ran a query in UI-Test for what drugs may treat rheuamtoid arthritis to check ARAX's interaction with Knowledge Collaboratory.

Test run from UI: https://ui.test.transltr.io/main/results?l=Rheumatoid%20Arthritis&i=MONDO:0008383&t=0&r=0&q=6909142a-5150-42e9-aeef-523ee7cf6d10

Here are the specific results from ARAX: https://arax.ncats.io/?r=7a6a3b30-78e6-4a6a-8f9b-a2a5ae1ba613

Results from ARAX UI show that Knowledge Collab responded with HTTP error 500.

ARAX UI says this is the query sent to Knowledge Collab:

{
  "message": {
    "query_graph": {
      "edges": {
        "t_edge": {
          "knowledge_type": "lookup",
          "object": "on",
          "predicates": [
            "biolink:treats"
          ],
          "subject": "sn"
        }
      },
      "nodes": {
        "on": {
          "categories": [
            "biolink:PhenotypicFeature",
            "biolink:DiseaseOrPhenotypicFeature",
            "biolink:Disease"
          ],
          "ids": [
            "MONDO:0008383"
          ],
          "is_set": false,
          "set_interpretation": "BATCH"
        },
        "sn": {
          "categories": [
            "biolink:ChemicalEntity"
          ],
          "is_set": true,
          "set_interpretation": "BATCH"
        }
      }
    }
  },
  "submitter": "infores:arax"
}

I sent that query directly to Knowledge Collab in ITRB-Test and can replicate the 500 error.

After testing several variations of the query, it seems like it's the inclusion of biolink:DiseaseOrPhenotypicFeature that induces the 500 error. Removing just biolink:DiseaseOrPhenotypicFeature allows Knowledge Collab to return a successful response, e.g.,:

{
  "message": {
    "query_graph": {
      "edges": {
        "t_edge": {
          "knowledge_type": "lookup",
          "object": "on",
          "predicates": [
            "biolink:treats"
          ],
          "subject": "sn"
        }
      },
      "nodes": {
        "on": {
          "categories": [
            "biolink:PhenotypicFeature",
            "biolink:Disease"
          ],
          "ids": [
            "MONDO:0008383"
          ],
          "is_set": false,
          "set_interpretation": "BATCH"
        },
        "sn": {
          "categories": [
            "biolink:ChemicalEntity"
          ],
          "is_set": true,
          "set_interpretation": "BATCH"
        }
      }
    }
  },
  "submitter": "infores:arax"
}

Conversely, having only biolink:DiseaesOrPhenotypicFeature causes the error.

{
  "message": {
    "query_graph": {
      "edges": {
        "t_edge": {
          "knowledge_type": "lookup",
          "object": "on",
          "predicates": [
            "biolink:treats"
          ],
          "subject": "sn"
        }
      },
      "nodes": {
        "on": {
          "categories": [
            "biolink:DiseaseOrPhenotypicFeature"
          ],
          "ids": [
            "MONDO:0008383"
          ],
          "is_set": false,
          "set_interpretation": "BATCH"
        },
        "sn": {
          "categories": [
            "biolink:ChemicalEntity"
          ],
          "is_set": true,
          "set_interpretation": "BATCH"
        }
      }
    }
  },
  "submitter": "infores:arax"
}
@CaseyTa
Copy link
Author

CaseyTa commented Oct 3, 2024

@micheldumontier This issue is ongoing, and I believe is the cause of the following issue created by @isbluis (ARAX)
NCATSTranslator/Feedback#946

From their example, the query they're sending is:

{
  "message": {
    "query_graph": {
      "edges": {
        "e0": {
          "knowledge_type": "inferred",
          "object": "un",
          "predicates": [
            "biolink:related_to"
          ],
          "subject": "sn"
        }
      },
      "nodes": {
        "sn": {
          "categories": [
            "biolink:DiseaseOrPhenotypicFeature",
            "biolink:PhenotypicFeature",
            "biolink:Disease"
          ],
          "ids": [
            "MONDO:0005180"
          ],
          "is_set": false,
          "set_interpretation": "BATCH"
        },
        "un": {
          "categories": [
            "biolink:NamedThing"
          ],
          "is_set": true,
          "set_interpretation": "BATCH"
        }
      }
    }
  },
  "submitter": "infores:arax"
}

@micheldumontier
Copy link
Contributor

i tried these queries on our locally deployed services, and i don't get the error. without access to the docker containers to see the errors, i can't fix this.

@CaseyTa
Copy link
Author

CaseyTa commented Oct 9, 2024

@micheldumontier This seems to be better, but not fully resolved yet.

This query still produces the 500 error, but at least it does so within a couple seconds (not 30 seconds anymore):

{
  "message": {
    "query_graph": {
      "edges": {
        "t_edge": {
          "knowledge_type": "lookup",
          "object": "on",
          "predicates": [
            "biolink:treats"
          ],
          "subject": "sn"
        }
      },
      "nodes": {
        "on": {
          "categories": [
            "biolink:DiseaseOrPhenotypicFeature"
          ],
          "ids": [
            "MONDO:0008383"
          ]
        },
        "sn": {
          "categories": [
            "biolink:ChemicalEntity"
          ]
        }
      }
    }
  },
  "submitter": "infores:arax"
}

The same query with ID MONDO:0005180 now returns 200 OK status response.

Will message you with the log file in Slack

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

2 participants