RTX icon indicating copy to clipboard operation
RTX copied to clipboard

QGI not interpreting query graph correctly

Open dkoslicki opened this issue 3 years ago • 4 comments

In this result: https://arax.ncats.io/?r=50233 This query:

{
        "edges": {
            "e00": {
                "subject": "n00",
                "object": "n01"
            }
        },
        "nodes": {
            "n00": {
                "ids": ["MONDO:0021783"],
                "categories": ["biolink:Disease"]
            },
            "n01": {
                "categories": ["biolink:ChemicalEntity"]
            }
        }
    }

Should match this template. However, it appears to be matching this template instead.

@edeutsch Is the QGI greedy, in that it selects the first template it sees and just runs with it? I figured since this query matched a more specific one, it would have triggered that.

dkoslicki avatar Jul 01 '22 20:07 dkoslicki

It's been a long time since I looked at this code, but I'm pretty sure to computes a goodness-of-match for all possible templates and selects the closest. Not the just first.

edeutsch avatar Jul 01 '22 20:07 edeutsch

Ok, I'll keep poking at it

dkoslicki avatar Jul 01 '22 20:07 dkoslicki

So I figured out what was going on: a) categories were being ignored if curies were present and b) the template requires categories like categories=['biolink:Disease'] not categories=biolinkDisease.

The question now is: do we want master to have these changes? My concerns are:

  1. If there are operations and workflow, we don't want the QGI overriding these (I don't think it does currently, but not 100% sure)
  2. Make sure that the inferred is handled correctly, since this property is likely ignored by the QGI when doing template matching

dkoslicki avatar Jul 01 '22 20:07 dkoslicki

See PR #1858

dkoslicki avatar Jul 06 '22 21:07 dkoslicki

Associated PR was closed, and this is also depreciated due to the inferred mode

dkoslicki avatar Jun 19 '24 16:06 dkoslicki