NCATSTranslator / testing

Materials and tools for testing Translator components
1 stars 9 forks source link

Two one-hop queries vs one two-hop query for Snyder-Robinson syndrome #53

Open sstemann opened 3 years ago

sstemann commented 3 years ago

Queries: One-hop first half: Disease (MONDO:0010664 Snyder-Robinson syndrome) - Gene PK: b24bd1b0-6b17-40c3-a793-2517e1a90736

image

One-hop second half: Gene (NCBIGENE:6611 SMS spermine synthase) - ChemicalSubstance PK: 4382e0f0-a4ec-4bfb-a1ba-bd594aa23f2a

image

Two-hop: Disease (MONDO:0010664 Snyder-Robinson syndrome) - Gene - Chemical Substance PK: 586de7d4-d016-483e-b693-3567a1416525

image

Results Tracking Sheet

webyrd commented 3 years ago

The answers returned for the one-hop query appear to be co-occurrence edges from the TextMiningProvider KG.

rtroper commented 3 years ago

I've investigated why our drug response KP isn't providing results for the second hop (Gene NCBIGENE:6611 to ChemicalSubstance). We have 257 edges with NCBIGENE:6611, but in our smart API spec, we impose a filter based on two edge properties (effect_size and pvalue) restricting results as follows:

image

andrewsu commented 3 years ago

As mentioned, we added some additional filters on the APIs being called and the allowed timeout periods. BTE is now returning 6166 edges in response to the two-hop query.

$ time curl --silent --location --request POST "https://api.bte.ncats.io/v1/query/" --header "Content-Type: application/json" --data-raw "{ \"message\": { \"query_graph\": { \"nodes\": { \"n0\": { \"id\": \"MONDO:0010664\", \"category\":\"biolink:Disease\" }, \"n1\": { \"category\": \"biolink:Gene\"                 },                 \"n2\":{                     \"category\": \"biolink:ChemicalSubstance\"                 } }, \"edges\": { \"e01\": { \"subject\": \"n0\",                     \"object\": \"n1\"                 },                 \"e02\": { \"subject\": \"n1\",
  \"object\": \"n2\"                 } } } } }" | jq '.message.knowledge_graph.edges | length'
6166

real    0m19.851s
user    0m0.399s
sys     0m0.158s
vdancik commented 3 years ago

MolePro behaves as expected.

colleenXu commented 3 years ago

I ran the updated one-hop query (first half) below through the ARS, PK: 24a94d28-c55f-456c-9565-3faf4f352d3a

Screen Shot 2021-09-22 at 1 54 14 PM

updated one-hop query:

{
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "ids": ["MONDO:0010664"],
                    "categories":["biolink:Disease"]
                },
                "n1": {
                    "categories": ["biolink:Gene"]
                }
            },
            "edges": {
                "e0": {
                    "subject": "n0",
                    "object": "n1"
                }
            }
        }
    }
}
colleenXu commented 3 years ago

I ran the updated one-hop query (second half) below through the ARS, PK: 06f8ec90-cfe7-4ef2-8a64-4fae5508cb40

Screen Shot 2021-09-22 at 2 10 15 PM

The updated query could be something like this (it's missing the workflow section but the rest is TRAPI v1.2):

{
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "ids": ["NCBIGene:6611"],
                    "categories":["biolink:Gene"]
                },
                "n1": {
                    "categories": ["biolink:ChemicalEntity"]
                }
            },
            "edges": {
                "e0": {
                    "subject": "n0",
                    "object": "n1"
                }
            }
        }
    }
}
colleenXu commented 3 years ago

I ran an updated two-hop query below through the ARS, PK: cd959133-de18-4dcc-a104-6c0c1eb3e874

@andrewsu Please untag us (Exploring Agent) from this issue.

Screen Shot 2021-10-12 at 9 00 02 PM

The updated query could be something like this (it's missing the workflow section but the rest is TRAPI v1.2):

{
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "ids": ["MONDO:0010664"],
                    "categories":["biolink:Disease"]
                },
                "n1": {
                    "categories": ["biolink:Gene"]
                },
                "n2": {
                    "categories": ["biolink:ChemicalEntity"]
                }
            },
            "edges": {
                "e0": {
                    "subject": "n0",
                    "object": "n1"
                },
                "e1": {
                    "subject": "n1",
                    "object": "n2"
                }
            }
        }
    }
}