chembl / chembl_webresource_client

Official Python client for accessing ChEMBL API
https://www.ebi.ac.uk/chembl/api/data/docs
Other
360 stars 95 forks source link

Efficient query for protein target classification #104

Open BlakeList opened 3 years ago

BlakeList commented 3 years ago

Hi there,

I am wondering what is the most efficient way to get the protein target classification (e.g. Ion channel > Voltage-gated ion channel > Voltage-gated sodium channel) for a given chembl_id (e.g. CHEMBL4296) using chembl_webresource_client?

At the moment I am creating instances of the client for target, target_component, and protein_class so that I can get the 'component_id', 'protein_classification_id', and finally, the protein classification (e.g. 'l1). This can take a little bit of time if querying many gene targets and seems overly complicated, so I was wondering if there is a more elegant way to do this query using the package (as opposed to a standard SQL query to the API using a prebuilt chembl db).

Thank you, Blake