monarch-initiative / biolink-api

API for linked biological knowledge
https://api.monarchinitiative.org/api/
BSD 3-Clause "New" or "Revised" License
64 stars 25 forks source link

500 for substance treats query #135

Open kshefchek opened 6 years ago

kshefchek commented 6 years ago

For example: https://api.monarchinitiative.org/api/bioentity/substance/CHEBI%3A40036/treats/?fetch_objects=true&rows=100

Stack trace ends with: File "/opt/biolink-api-master/biowikidata/wd_sparql.py", line 94, in resolve_towikidata (,is_curie,p) = prefix_map.dbprefix2prop()[prefix]

deepakunni3 commented 6 years ago

@cmungall Testing with fixes made in branch issue-135 yields proper result for this query.

Adding an example URL that uses CHEBI:28748: https://api.monarchinitiative.org/api/bioentity/substance/CHEBI%3A28748/treats/?fetch_objects=true&rows=100

which gives three Disease Ontology IDs:

[
    "DOID:1612",
    "DOID:2394",
    "DOID:11054"
]
cmungall commented 6 years ago

OK.

We should have this method return association objects rather than a list. Let me check with others what our strategy should be

cmungall commented 6 years ago

Given https://github.com/monarch-initiative/dipper/pull/562 we may best be waiting until it ingests