biothings / biothings_explorer_archived

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

Consistency issue with predicates. #177

Closed MarkDWilliams closed 3 years ago

MarkDWilliams commented 3 years ago

When I run this query:

    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "id": "NCBIGENE:1956",
                    "category":"biolink:Gene"
                },
                "n1": {

                    "category": "biolink:Gene"
                }
            },
            "edges": {
                "e01": {
                    "subject": "n0",
                                        "object": "n1
                              }
            }
        }
    }
}

One of the results is E2F1(NCBIGENE:1869) with a predicate of biolink:negatively_regulated_by. However, when running a query specifically looking for genes with a relation ship of biolink:negatively_regulated_by, E2F1 does not appear to be among the results.

{
    "message": {
        "query_graph": {
            "nodes": {
                "n0": {
                    "id": "NCBIGENE:1956",
                    "category":"biolink:Gene"
                },
                "n1": {

                    "category": "biolink:Gene"
                }
            },
            "edges": {
                "e01": {
                    "subject": "n0",
                    "object": "n1",
                    "predicate":"biolink:negatively_regulated_by"
                }
            }
        }
    }
}

Let me know if this is just user-error or an issue with my query that I'm not seeing.

kevinxin90 commented 3 years ago

Huh...that's weird.

When I make the query to BTE (without predicate):

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:1956",
                    "category":"biolink:Gene"
                },
                "n1": {

                    "category": "biolink:Gene"
                                 }
            },
            "edges": {
                "e01": {
                    "subject": "n0",
                                       "object": "n1"
                                 }
            }
        }
    }
}'

I don't see E2F1(NCBIGENE:1869) as one of the results...

This is not an issue of BTE handling predicate, since the above query returns CDKN1A(NCBIGENE:1026) as one of the results with predicate "biolink:negatiively_regulated_by".

And when I make the query with predicate included:

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:1956",
                    "category":"biolink:Gene"
                },
                "n1": {

                    "category": "biolink:Gene"
                }
            },
            "edges": {
                "e01": {
                    "subject": "n0",
                                        "object": "n1",
                                        "predicate": "biolink:negatively_regulated_by"
                                }
            }
        }
    }
}'

I do see CDKN1A(NCBIGENE:1026) as one of the results.

So seems to be this is an issue of BTE missing data, instead of Consistency issue with predicates.

If you have previous results from BTE stored in ARS for the above queries, I can also take a better look to figure things out.