biothings / biothings_explorer_archived

BioThings Explorer: a schema-based client for API interoperability
Apache License 2.0
14 stars 14 forks source link

mygene using association as predicate #176

Closed cbizon closed 3 years ago

cbizon commented 3 years ago

It looks like mygene.info is using biolink:functional_association as the relationship between gene and pathway, but that's a biolink association, not a predicate. The upshot is that e.g. aragorn is not able to use BTE to find gene/pathway edges.

kevinxin90 commented 3 years ago

Sure. I can update the SmartAPI spec for MyGene. @cbizon any recommendations for the predicate? Maybe enables?

colleenXu commented 3 years ago

@kevinxin90 Would you like me to do this update?

And how about Gene - participates in -> pathway? One of the narrow mappings is "NCIT:gene_product_is_element_in_pathway"

kevinxin90 commented 3 years ago

Sure. participates_in sounds good to me. Also don't forget to update the reverse edge in the spec, in this case would be has_participants then.

colleenXu commented 3 years ago

Okay. I'll make a PR in https://github.com/NCATS-Tangerine/translator-api-registry for these MyGene registry changes

cbizon commented 3 years ago

Maybe I'm jumping the gun, but it looks like the the /predicates endpoint is fixed! But when I try to query it, I'm not getting results? So this is the TRAPI Query:

m = {
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "id": "NCBIGENE:1017",
                    "category":"biolink:Gene"
                },
                "n1": {
                    "category": "biolink:Pathway"
                }
            },
            "edges": {
                "e01": {
                    "subject": "n0",
                    "object": "n1",
                    "predicate":"biolink:participates_in"
                }
        }
        }
    }
}

If I take the predicate off, I get results....

kevinxin90 commented 3 years ago

@cbizon Hi Chris, the above query is available through our TRAPI service now. Feel free to try it out:

curl --location --request POST 'https://api.bte.ncats.io/v1/query' \
--header 'Content-Type: application/json' \
--data-raw '{
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "id": "NCBIGENE:1017",
                    "category":"biolink:Gene"
                },
                "n1": {
                    "category": "biolink:Pathway"
                }
            },
            "edges": {
                "e01": {
                    "subject": "n0",
                    "object": "n1",
                    "predicate":"biolink:participates_in"
                }
        }
        }
    }
}'