GenomicMedLab / dgipy

Python client for fast access to the Drug-Gene Interaction Database (DGIDb)
MIT License
0 stars 0 forks source link

Combine `get_interactions` for drugs and genes #26

Open jsstevenson opened 7 months ago

jsstevenson commented 7 months ago

I'm sort of surprised there's no graphql endpoint that can search on both at once, but I guess I'm not sure how exactly it would work (union or intersection?). Given that, we should just split this thing into separate methods, since it's really doing two separate things.

jsstevenson commented 7 months ago

Also, both should return the same structure of object IMO

jsstevenson commented 7 months ago

They should also return some stuff about InteractionTypes.

jsstevenson commented 7 months ago

In this commit, we changed the drugs query to do a left anchored search on names -- I think for autocomplete reasons? However, this means that if you eg use the get_interactions() method here and just search for "b" you will get like a hundred different drugs.

It might be smart to change the name of the field in the drugs query to a special one for the left anchored search and keep names as an exact match. Really, though, we should just be able to search for interactions by drug/gene directly, so it might be better to focus on that.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 135 days with no activity. This issue will be closed if no further activity occurs in 14 days.