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

biolink-api /bioentity/function/ route does not seem to implement taxon filters #365

Open kltm opened 4 years ago

kltm commented 4 years ago

While it appears in the documentation, it seems that the biolink-api /bioentity/function/ route does not seem to implement taxon filters. For example, the following two queries give the same results:

/bioentity/function/GO%3A0002544/genes?rows=100&relationship_type=involved_in /bioentity/function/GO%3A0002544/genes?rows=100&taxon=NCBITaxon%3A9606&relationship_type=involved_in

Originating question (from the GO fork): https://github.com/geneontology/helpdesk/issues/285

Tagging @deepakunni3 @kshefchek

deepakunni3 commented 4 years ago

So the above query translates to the following GOlr query:

http://golr-aux.geneontology.io/solr/select/?q=%2A%3A%2A&fq=document_category%3A%22annotation%22&fq=isa_partof_closure%3A%22GO%3A0002544%22&facet=off&facet.limit=25&facet.mincount=1&fl=id%2Cassigned_by%2Csource%2Cbioentity%2Cbioentity_label%2Ctaxon%2Ctaxon_label%2Cqualifier%2Crelation_label%2Cannotation_class%2Cannotation_class_label%2Cobject_taxon%2Cobject_taxon_label%2Cevidence%2Cevidence_closure_map%2Cfrequency%2Cfrequency_label%2Conset%2Conset_label%2Cevidence_graph&rows=100&stats=false&wt=json

When instead, it should be translating the query to: http://golr-aux.geneontology.io/solr/select/?q=%2A%3A%2A&fq=document_category%3A%22annotation%22&fq=isa_partof_closure%3A%22GO%3A0002544%22&fq=taxon:%22NCBITaxon:9606%22&facet=off&facet.limit=25&facet.mincount=1&fl=id%2Cassigned_by%2Csource%2Cbioentity%2Cbioentity_label%2Ctaxon%2Ctaxon_label%2Cqualifier%2Crelation_label%2Cannotation_class%2Cannotation_class_label%2Cobject_taxon%2Cobject_taxon_label%2Cevidence%2Cevidence_closure_map%2Cfrequency%2Cfrequency_label%2Conset%2Conset_label%2Cevidence_graph&rows=100&stats=false&wt=json

Cause: There is a mismatch of fields between Monarch Solr and GOlr: object_taxon vs taxon

deepakunni3 commented 4 years ago

The fix for this should be in Ontobio.

kltm commented 3 years ago

@deepakunni3 Just to clarify, we need another ticket for ontobio to reach closure on this issue?

suzialeksander commented 3 years ago

@deepakunni3 this issue still hasn't been resolved, is there another step or another ticket we need to open somewhere? https://github.com/geneontology/helpdesk/issues/285

kltm commented 3 years ago

@suzialeksander , Deepak has now moved on to a new position. We'll need to revisit this.

suzialeksander commented 3 years ago

@kltm is there anyone to ping about this? Just checked and I think it's still misbehaving.

sierra-moxon commented 3 years ago

I think I can raise my hand for this, particularly if it is ontobio and a priority. :)

kltm commented 3 years ago

@sierra-moxon If this is as "simple" as bumping the ontobio in GO API and rolling it out, it's probably worth doing. (That by itself may be new ground for us as we'll need to deal with the dev environment for the GO API.) However, if it requires more plumbing, we might want to also look at the fix of correcting the documentation or trimming the non-existent feature.

kltm commented 3 years ago

I touched bases with @cmungall about priorities v/briefly and exploring this and moving ahead should be fine in almost any case.

kltm commented 2 years ago

@sierra-moxon I wanted to check if this fix was in scope for: 1) a "quick" fix for what we have; 2) would be better handled in the refactored API (assuming this is likely); 3) part of a route that will no longer be serviced by the refactored API?

sierra-moxon commented 2 years ago

looking a little closer at this, I think it is a few things:

I think it's a more straightforward fix for the new implementation (not a fix in ontobio, but passing params correctly to ontobio) than trying to fix it in our current production.