RENCI-AUTOMAT / Automat-server

MIT License
0 stars 0 forks source link

TRAPI Query not returning results it should #6

Closed cbizon closed 3 years ago

cbizon commented 3 years ago

query:

{
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "category": "biolink:Gene",
                    "is_set": false,
                    "id": "NCBIGene:6611"
                },
                "n1": {
                    "category": "biolink:ChemicalSubstance",
                    "is_set": false
                }
            },
            "edges": {
                "e01": {
                    "subject": "n0",
                    "object": "n1",
                    "predicate": "biolink:related_to"
                }
            }
        }
    }
}

returns no results in Automat/Pharos.

But this cypher query:

{
  "query": "MATCH (n:`biolink:Gene` {id:'NCBIGene:6611'})-[x]-(c:`biolink:ChemicalSubstance`) RETURN type(x),count(*)"
}

returns 2 biolink:decreases_activity_of edges

cbizon commented 3 years ago

replacing the predicate with biolink:decreases_activity_of (and inverting n0,n1) does return the results, so this seems like a problem in the transpiler? @patrickkwang ?

YaphetKG commented 3 years ago

I think this relates #4, wrt using latest transplier , this works with latest transplier code deployed at automat-dev.edc.renci.org

curl -X POST "https://automat-dev.edc.renci.org/pharos/query" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"message\":{\"query_graph\":{\"nodes\":{\"n0\":{\"category\":\"biolink:Gene\",\"is_set\":false,\"id\":\"NCBIGene:6611\"},\"n1\":{\"category\":\"biolink:ChemicalSubstance\",\"is_set\":false}},\"edges\":{\"e01\":{\"subject\":\"n0\",\"object\":\"n1\",\"predicate\":\"biolink:related_to\"}}}}}"
cbizon commented 3 years ago

This seems to be working now, thanks