RTXteam / RTX-KG2

Build system for the RTX-KG2 biomedical knowledge graph, part of the ARAX reasoning system (https://github.com/RTXTeam/RTX)
MIT License
38 stars 8 forks source link

TRAPI 1.5 validation error - result node binding attributes missing #376

Closed maximusunc closed 5 months ago

maximusunc commented 7 months ago

My understanding is that result node binding attributes are required: https://github.com/NCATSTranslator/ReasonerAPI/blob/master/TranslatorReasonerAPI.yaml#L665

saramsey commented 7 months ago

Kevin and Sundar, could one of you please take a look at this issue? I think maybe it will be a one-line fix, to ensure that in our RTX-KG2 TRAPI response, a node binding object which does not have any attributes will be denoted by having an empty list instead of None.

kvnthomas98 commented 7 months ago

Hi @saramsey , I can fix this today

saramsey commented 7 months ago

Thank you @kvnthomas98 I suppose this issue should be moved to the RTX project area. What do you think?

saramsey commented 7 months ago

@maximusunc we will get this fixed for the Eel release of the RTX-KG2 KP.

kvnthomas98 commented 7 months ago

@saramsey I agree! I'll raise an issue there.

maximusunc commented 7 months ago

As I mentioned to Steve on Slack yesterday, I really think this fix should be included in the current release and not the next one. Otherwise, RTX-KG2 will be failing TRAPI validation for an entire sprint.

cbizon commented 7 months ago

Strongly agree

kvnthomas98 commented 7 months ago

@saramsey the fix is in merged into master and tested on ci

maximusunc commented 7 months ago

Hey @kvnthomas98 I'm running some queries against dev and seeing the same TRAPI validation error.

kvnthomas98 commented 7 months ago

@maximusunc can you send me the query you used and also the arax/kg2 endpoint called?

maximusunc commented 7 months ago

Sure:

curl -X POST https://arax.ncats.io/beta/api/rtxkg2/v1.4/query \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "message": {
    "query_graph": {
      "nodes": {
        "disease": {
          "ids": ["MONDO:0004979"],
          "categories": ["biolink:Disease"],
          "set_interpretation": "BATCH",
          "constraints": []
        },
        "e": {
          "categories": ["biolink:ChemicalEntity"],
          "set_interpretation": "BATCH",
          "constraints": []
        }
      },
      "edges": {
        "edge_0": {
          "subject": "e",
          "object": "disease",
          "predicates": ["biolink:treats"],
          "attribute_constraints": [],
          "qualifier_constraints": []
        }
      }
    }
  },
  "bypass_cache": false,
  "submitter": "infores:aragorn"
}' > kg2_response.json

One other note is that your urls still reference v1.4 even though you are on v1.5.

maximusunc commented 7 months ago

I also just noticed that the result analysis edge bindings all need attributes as well.

saramsey commented 7 months ago

Regarding the 1.4/1.5 issue, can you please reach out to Eric about that? He has the latest info, I think.

saramsey commented 7 months ago

I think it's fixed now on arax.ncats.io/beta/api/rtxkg2/v1.4/query:

        "node_bindings": {
          "disease": [
            {
              "attributes": [],
              "id": "MONDO:0004979"
            }

And on kg2.ci.transltr.io/api/rtxkg2/v1.4/query:

        "node_bindings": {
          "disease": [
            {
              "attributes": [],
              "id": "MONDO:0004979"
            }
saramsey commented 7 months ago

Seems like edge binding attributes are fixed too? This is from ITRB CI:

            "edge_bindings": {
              "edge_0": [
                {
                  "attributes": [],
                  "id": "23392974"
                }
              ]
            },
kvnthomas98 commented 7 months ago

Thanks @saramsey and @sundareswarpullela for deploying on the /beta and the /kg2beta endpoints

saramsey commented 5 months ago

Can we close out this issue now?

edeutsch commented 5 months ago

yes, thank you all!