monarch-initiative / monarch-ui

The previous version of the Monarch Initiative website
https://previous.monarchinitiative.org/
BSD 3-Clause "New" or "Revised" License
17 stars 28 forks source link

Update taxon filter to remove 'facets' filter #168

Closed monicacecilia closed 4 years ago

monicacecilia commented 5 years ago

FOR NOW, a decision has been made to remove the current 'facets' filters shown on the left column of our results pages and instead:

Don't @ me. :bowtie:

monicacecilia commented 5 years ago

Somewhat related to monarch-initiative/monarch-app#789 - @jmcmurry perhaps we should consider punting monarch-initiative/monarch-app#789 to the Monarch-UI v1.1 milestone in favour of this ticker, for now.

iimpulse commented 5 years ago

@kshefchek @monicacecilia

There are only a few card types that "have taxon". Previously.. we were building facets based off the total card counts and when selecting/deselecting a taxon, it would update the counts. When moving to a table level taxon we need the counts per taxon based on the card type..

For example homolog or genotype. But since we are paginating I only have unique taxon counts for that page.

monicacecilia commented 5 years ago

Ping to @deepakunni3 as well.

kshefchek commented 5 years ago

If you set facet=true when getting the data it should return some meaningful facets, but it looks like it's hard coded for subject_taxon_label and object_closure. It would be useful to make this configurable at the API level similar to solr, ie a facet_field param.

monicacecilia commented 5 years ago

We need some @deepakunni3 awesomeness. right.here. Haaaalp! 🙏

kshefchek commented 5 years ago

this should be on dev now, https://api-dev.monarchinitiative.org/api/bioentity/gene/NCBIGene%3A3630/homologs?rows=0&facet=true&facet_fields=object_taxon&unselect_evidence=false&exclude_automatic_assertions=false&fetch_objects=false&use_compact_associations=false

Or alongside the data https://api-dev.monarchinitiative.org/api/bioentity/gene/NCBIGene%3A3630/homologs?rows=100&facet=true&facet_fields=object_taxon&unselect_evidence=false&exclude_automatic_assertions=false&fetch_objects=false&use_compact_associations=false

iimpulse commented 5 years ago

So, I've almost fully implemented this, there seems to be a few endpoints under gene that don't support "taxon" by array. When that is cleared I think this ticket is finished.

/gene/{id}/homologs /gene/{id}/variants

@deepakunni3 @kshefchek

iimpulse commented 4 years ago

@deepakunni3 looks like variants endpoint is still not filtering correctly in dev, homologs looks good

deepakunni3 commented 4 years ago

@iimpulse Could you provide an example gene where you are seeing this? Just for sake of testing and debugging

deepakunni3 commented 4 years ago

@iimpulse This should be now fixed on api-dev

monicacecilia commented 4 years ago

Work also being done at https://github.com/monarch-initiative/dipper/issues/860

iimpulse commented 4 years ago

Updates on how to proceed? @monicacecilia

kshefchek commented 4 years ago

I've added some code to biolink to query taxa directly, which should fix the odd filter behavior. However, we're having network issues on our servers and I can't stage the changes on api-dev. Essentially it will be adding a new param, direct_taxon=true, when loading the tables. If you want to get your PR ready I can just update it when the api is ready.

kshefchek commented 4 years ago

@iimpulse to filter on a taxon/taxa directly, add direct_taxon: true to the params, for example https://api.monarchinitiative.org/api/bioentity/gene/HGNC%3A10896/variants?rows=100&direct_taxon=true&taxon=NCBITaxon:9606