RTX-KG2 icon indicating copy to clipboard operation
RTX-KG2 copied to clipboard

TRAPI 1.5 validation error - result node binding attributes missing

Open maximusunc opened this issue 1 year ago • 16 comments

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

maximusunc avatar Apr 19 '24 15:04 maximusunc

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.

saramsey avatar Apr 25 '24 16:04 saramsey

Hi @saramsey , I can fix this today

kvnthomas98 avatar Apr 25 '24 17:04 kvnthomas98

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

saramsey avatar Apr 25 '24 19:04 saramsey

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

saramsey avatar Apr 25 '24 19:04 saramsey

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

kvnthomas98 avatar Apr 25 '24 21:04 kvnthomas98

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.

maximusunc avatar Apr 26 '24 13:04 maximusunc

Strongly agree

cbizon avatar Apr 26 '24 13:04 cbizon

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

kvnthomas98 avatar Apr 26 '24 13:04 kvnthomas98

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

maximusunc avatar Apr 26 '24 14:04 maximusunc

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

kvnthomas98 avatar Apr 26 '24 14:04 kvnthomas98

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 avatar Apr 26 '24 15:04 maximusunc

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

maximusunc avatar Apr 26 '24 15:04 maximusunc

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

saramsey avatar Apr 26 '24 21:04 saramsey

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 avatar Apr 26 '24 21:04 saramsey

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

            "edge_bindings": {
              "edge_0": [
                {
                  "attributes": [],
                  "id": "23392974"
                }
              ]
            },

saramsey avatar Apr 26 '24 21:04 saramsey

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

kvnthomas98 avatar Apr 26 '24 21:04 kvnthomas98

Can we close out this issue now?

saramsey avatar Jun 06 '24 20:06 saramsey

yes, thank you all!

edeutsch avatar Jun 06 '24 20:06 edeutsch