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

Don't do subclass_of stuff on a subclass_of query #77

Open
cbizon opened this issue Jun 2, 2023 · 2 comments
Open

Don't do subclass_of stuff on a subclass_of query #77

cbizon opened this issue Jun 2, 2023 · 2 comments
Assignees

Comments

@cbizon
Copy link
Contributor

cbizon commented Jun 2, 2023

For instance, if you run this against ontological hierarchy:

{
    "message": {
        "query_graph": {
            "edges": {
                "e00": {
                    "subject": "n00",
                    "object": "n01",
                    "predicates": [
                        "biolink:subclass_of"
                    ]
                }
            },
            "nodes": {
                "n00": {
               
                    "categories": [
                        "biolink:Disease"
                    ]
                },
                "n01": {
                    "ids": [
                        "MONDO:0009242"
                    ],
                    "categories": [
                        "biolink:Disease"
                    ]
                }
            }
        }
    }
}

It doesn't really make sense to do the subclass_of for n01 in the cypher query. It causes there to be a bunch of crummy self edger results like:

{
        "node_bindings": {
          "n01": [
            {
              "id": "MONDO:0024543",
              "query_id": null,
              "attributes": null,
              "qnode_id": "MONDO:0009242"
            }
          ],
          "n00": [
            {
              "id": "MONDO:0024543",
              "query_id": null,
              "attributes": null
            }
          ]
        },
        "
@cbizon
Copy link
Contributor Author

cbizon commented Jun 2, 2023

It's even worse when you are looking for superclasses of X. You start looking for subclasses of X and their superclasses. But there's no guarantee that a superclass of a subclass of X is a subclass of X. What gets returned is technically correct because of the qnode_id markings, but it leads to confusion, as well as an extreeeemly slow query.

See broadinstitute/molecular-data-provider#308

@EvanDietzMorris
Copy link
Collaborator

This issue is fixed in dev now. I could not reproduce the results from @vdancik's query (broadinstitute/molecular-data-provider#308), but using the example query here above shows that in dev (https://automat.renci.org/#/ubergraph/) we are no longer performing subclass inference for nodes that are connected to subclass_of or superclass_of edges.

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