Uncategorized

ChEMBL multitask prediction with python requrests #memo #chembl #cheminfo – Is life worth living?


ChEMBL provides multitask prediction model from its github repo. And shared useful blog post.
https://chembl.blogspot.com/2019/05/multi-task-neural-network-on-chembl.html

By using the code, we can get predicted target list from given molecules. And the prediction can run python, C++, JS and Knime! ChEMBL team provides not only source code but also predicted results when we search compound in ChEMBL DB. The screen shot is shown below.

I found the bottom of the predicted target list, prediction API is provided too! For example, I can get predicted results as JSON format when I posted query below.

curl 'https://www.ebi.ac.uk/chembl/target-predictions' -H 'Content-Type: application/json' --data-raw '{"smiles":"CN(Cc1cnc2nc(N)nc(N)c2n1)c1ccc(C(=O)N[C@@H](CCC(=O)O)C(=O)O)cc1"}' 

Web based API is useful because user don’t need prepare the environment on own computational enviroment. So I tried to make query with python requests, because by using python I can make chemoinformatics pipeline easily.

Here is an example code 😉

Sorry, something went wrong. Reload?

Sorry, we cannot display this file.

Sorry, this file is invalid so it cannot be displayed.

Tips for making query is data definition part.
F-String can’t escape curry branckets with backslash. {{someting}} means {someting}, as a normal strings.

### tips
data = f'{{"smiles":"{smi}"}}' >>> '{"smiles" : "user defined smiles"}'

The code worked well but I wondered that predicted results don’t contain COX2 which is primary target of celecoxib. I would like to check some other approved drugs with same way.


Published by iwatobipen

I’m medicinal chemist in mid size of pharmaceutical company.
I love chemoinfo, cording, organic synthesis, my family.
View more posts



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *