ChEMBL Resources


Thursday, 30 January 2020

New ChEMBL ligand-based target predictions docker image available

Resultado de imagen de zoltar fortune

One year ago we published a new version of our target prediction models and since then we've been working on its implementation for the upcoming ChEMBL 26 release.

What did we do?

First of all we re-trained the models with the LightGBM library instead of using scikit-learn. By doing this and tuning a bit the parameters our prediction timing improved by 2 orders of magnitude while keeping comparable prediction power. Having quicker models allowed us to easily implement a simple web service providing real time predictions.

Since we are currently migrating to a more sustainable Kubernetes infrastructure it made sense to us to directly write the small target prediction web service as a cloud native app. We then decided to give OpenFaaS a try as a platform to deploy machine learning models.

OpenFaaS is a framework for building serverless functions with Docker and Kubernetes. It provides templates for deploying functions as REST endpoints in many different programming languages (Python, Node, Java, Ruby, go...).

Our target predicitons OpenFaaS function source code is now available in our github repository. A Docker image with ready to use ChEMBL 25 trained models is also available here.

Does this mean that you won't be able to use the models without an Kubernetes/OpenFaaS installation? No way! It is also easy to start an instance in your local machine:

docker run -p 8080:8080 chembl/mcp:25
# in a different shell
curl -X POST -H 'Accept: */*' -H 'Content-Type: application/json' -d '{"smiles": "CC(=O)Oc1ccccc1C(=O)O"}'

Bear in mind that the service needs to load the models into memory, so it may take few minutes until it returns predictions. The predictions returned by the service are the ones for the models with CCR ((sensitivity + specificity) / 2) >= 0.85