ersilia-os / pharmacogx-embeddings

Pharmacogenomics knowledge graph embeddings and related analyses
GNU General Public License v3.0
3 stars 0 forks source link

Write PharmGKB Python API mirroring PharmGKB website #1

Closed miquelduranfrigola closed 1 year ago

miquelduranfrigola commented 1 year ago

We need to write a simple Python API to access PharmGKB on a static (downloaded) form.

Ideally, we want to mirror the PharmGKB interface organization, which is very nicely structured.

We will have different types of entities, namely Chemical, Gene, Variant, Haplotype and Disease

See incipient code here: https://github.com/ersilia-os/pharmacogx-embeddings/blob/main/src/pharmgkb.py

GemmaTuron commented 1 year ago

We have decided to pause the API for the moment and focus on enriching the backend in the KG with more edges.

For the future, the API we are working in is of the following type:

from pgxembeddings import Chemical

ch = Chemical()
ch.name = "izoniazid"

print(ch.get_associated_variants())
GemmaTuron commented 1 year ago

There is work in progress on the PharmGKB side to develop an API (not completed yet) I'll close this issue as the api is already good enough as is: https://api.pharmgkb.org/