chembl / chembl_webresource_client

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

Clinical trial phase #8

Closed samoturk closed 9 years ago

samoturk commented 9 years ago

I'm having trouble figuring out how would one get a clinical trial phase of a compound via chembl_webresource_client. Is this possible?

mnowotka commented 9 years ago

Yes, you have to use new client:

from chembl_webresource_client.new_client import new_client as nc

and then if you select a single compound you will find max_phase field:

nc.molecule.get('CHEMBL25')
>>> {u'max_phase': 4,...}

you can even filter by max_phase for example:

approved_drugs = nc.molecule.filter(max_phase=4).order_by('molecule_chembl_id')
# do something useful....
drug_ids = [drug['chembl_id'] for drug in approved_drugs]
samoturk commented 9 years ago

Thanks! I wasn't even aware there is a new client..

mnowotka commented 9 years ago

I know, blog post is coming soon...

samoturk commented 9 years ago

Maybe a talktorial at RDKit UGM? :)

mnowotka commented 9 years ago

I wish to but I UGM date collides with my personal plans :(