opentargets / issues

Issue tracker for Open Targets Platform and Open Targets Genetics Portal
https://platform.opentargets.org https://genetics.opentargets.org
Apache License 2.0
12 stars 2 forks source link

Implement facet id filter on AOTF endpoint #3277

Closed jdhayhurst closed 2 months ago

jdhayhurst commented 2 months ago

As a user I want to be able to filter the AOTF results based on one or more facets.

Using facet ids from https://github.com/opentargets/issues/issues/3276 the user should be able to filter the AOTF results with these ids.

The backend will resolve these facet ids to a set of target or disease ids and use that to filter the AOTF results.

Background

see https://github.com/opentargets/issues/issues/3239

Tasks

Acceptance tests

How do we know the task is complete?

  1. when I use the AOTF API endpoint, I'm able to filter the results by one or more facetId(s)
jdhayhurst commented 2 months ago

Added facetFilters argument to the associatedTargets and associatedDiseases endpoints, which takes an array of facet IDs that can be obtained from the facets API from opentargets/issue#3276. The facet Ids are subsequently resolved to target/disease IDs (i.e. BIDS) to expand the BID set for filtering. So the BID filtering is applied with an "OR" operator.