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

Weird FET warning in message output. Possible bug. #1808

Closed
finnagin opened this issue Mar 10, 2022 · 3 comments
Closed

Weird FET warning in message output. Possible bug. #1808

finnagin opened this issue Mar 10, 2022 · 3 comments
Assignees

Comments

@finnagin
Copy link
Member

finnagin commented Mar 10, 2022

In this query: https://arax.ncats.io/?r=38025

We get the following message:
2022-03-10T21:45:07.679701 WARNING: Most of edges between the subject node with qnode key n00 and object node with qnode key n01 are from RTX-KG2 rather than RTX-KG2. But we can't access the total number of nodes with specific node type from RTX-KG2, so RTX-KG2 was still used to calcualte Fisher's exact test.

Seems like FET may not be noticing that RTX-KG2 is the same as RTX-KG2. Maybe there is white space in the string?

@finnagin
Copy link
Member Author

The original input json is as follows:

{
  "workflow": [
    {
      "id": "fill"
    },
    {
      "id": "overlay_compute_ngd",
      "parameters": {
        "virtual_relation_label": "NGD1",
        "qnode_keys": [
          "n00",
          "n01"
        ]
      }
    },
    {
      "id": "overlay_compute_ngd",
      "parameters": {
        "virtual_relation_label": "NGD2",
        "qnode_keys": [
          "n01",
          "n02"
        ]
      }
    },
    {
      "id": "overlay_fisher_exact_test",
      "parameters": {
        "subject_qnode_key": "n00",
        "object_qnode_key": "n01",
        "virtual_relation_label": "FET1"
      }
    },
    {
      "id": "overlay_fisher_exact_test",
      "parameters": {
        "subject_qnode_key": "n01",
        "object_qnode_key": "n02",
        "virtual_relation_label": "FET2"
      }
    },
    {
      "id": "complete_results"
    },
    {
      "id": "score"
    },
    {
      "id": "sort_results_score",
      "parameters": {
        "ascending_or_descending": "descending"
      }
    }
  ],
  "message": {
    "query_graph": {
      "edges": {
        "e00": {
          "subject": "n00",
          "object": "n01",
          "predicates": [
            "biolink:related_to"
          ]
        },
        "e01": {
          "subject": "n01",
          "object": "n02",
          "predicates": [
            "biolink:related_to"
          ]
        }
      },
      "nodes": {
        "n00": {
          "ids": [
            "PUBCHEM.COMPOUND:644073"
          ],
          "categories": [
            "biolink:ChemicalEntity"
          ]
        },
        "n01": {
          "categories": [
            "biolink:NamedThing"
          ]
        },
        "n02": {
          "ids": [
            "HP:0000217"
          ],
          "categories": [
            "biolink:DiseaseOrPhenotypicFeature"
          ]
        }
      }
    }
  }
}

@chunyuma
Copy link
Collaborator

Hi @finnagin, this should not be a bug. I let the FET script print out this warning to make us realize that there is more than one knowledge source between n00 and n01. However, most of the edges are still from RTX-KG2c so it should be fine to use infores:rtx-kg2 was still used to calculate Fisher's exact test.

This warning message might make people feel confused. I have changed it to There is more than one knowledge source for the edges between the subject node with qnode key {subject_qnode_key} and object node with qnode key {object_qnode_key} and most of them are from {kp}. The infores:rtx-kg2 is still used to calculate Fisher's exact test.

@finnagin
Copy link
Member Author

Ah that makes sense. Thanks @chunyuma !

@finnagin finnagin removed the bug label Mar 12, 2022
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