NCATSTranslator / Feedback

A repo for tracking gaps in Translator data and finding ways to fill them.
7 stars 0 forks source link

ARAX ignores a node in a query where subject and object is fixed #574

Closed sandrine-muller-research closed 4 months ago

sandrine-muller-research commented 1 year ago

I made the following query through ARAX UI (CI environment):

{
  "edges": {
    "t_edge": {
      "attribute_constraints": [],
      "knowledge_type": "inferred",
      "object": "on",
      "predicates": [
        "biolink:treats"
      ],
      "qualifier_constraints": [],
      "subject": "sn"
    }
  },
  "nodes": {
    "on": {
      "categories": [
        "biolink:Disease"
      ],
      "constraints": [],
      "ids": [
        "MONDO:0019600"
      ],
      "is_set": false
    },
    "sn": {
      "categories": [
        "biolink:SmallMolecule"
      ],
      "constraints": [],
      "ids": [
        "PUBCHEM.COMPOUND:23931"
      ],
      "is_set": false
    }
  }
}

I am getting plenty of other compounds but not the one I asked. If there would have been no results, I would have expected 0 as an answer.

saramsey commented 1 year ago

Can confirm, kg2cploverdb.ci.transltr.io (queried directly) returns no results for the above TRAPI query graph.

edeutsch commented 1 year ago

I'm thinking that PloverDB is fine with that, but this is an inferred query, so it is going to xDTD. I am thinking that xDTD queries were not designed to be initiated with a fixed drug. It was perhaps designed assuming that the drugs node is unconstrained (i.e. Which drugs treat X).

saramsey commented 1 year ago

We've opened ARAX issue 2160 on this

dkoslicki commented 1 year ago

We've determined that this is indeed an ARAX issue: we have a plan in place to fix this month. The planned behavior is when both nodes are pinned, if these are in the top 50 precomputed xDTD results (creative mode), these and the associated lookup will be returned. If the pinned drug is not in the top 50 precomputed creative results, only the lookup will be returned.

Side note: arbitrary (drug, disease) pinned pair xDTD queries are out of scope, but this repo allows you to run this yourself if you really want them

sandrine-muller-research commented 1 year ago

thank you @dkoslicki for the feedback! I put the issue to no longer needs review. Please keep us posted if you'd like us to make some testing whenever. Thank you!

edeutsch commented 1 year ago

This is now working in ARAX CI. Although there are no results for the original query in this post. It does work fine in cases where an answer is expected: https://arax.ci.transltr.io/?r=173216 Okay to close?

sandrine-muller-research commented 1 year ago

I reran the first query as a retest on ARAX CI and I still get plenty of compounds back.

edeutsch commented 1 year ago

The results you link to were not run on CI: https://ars.ci.transltr.io/ars/api/messages/f43938aa-125e-49be-9b68-5ad151045f7b

They were run on prod: https://ars-prod.transltr.io/ars/api/messages/f43938aa-125e-49be-9b68-5ad151045f7b

The code changes to support your use case have only make it as far as CI so far, so you will need to query through CI so see the change.

sandrine-muller-research commented 12 months ago

Thank you @edeutsch, I do not see the responses unfortunately. I'll wait until the push to test is effective (would somebody of your team mind tell us in this ticket when) and I'll make a retest and close.

saramsey commented 9 months ago

Taking myself off the assignment for this issue since it looks like @dkoslicki and @edeutsch kindly took point on this one.

dkoslicki commented 4 months ago

Confirmed in CI that this has been fixed. See https://github.com/RTXteam/RTX/issues/2160