ChEMBL

Web Services

version 2.x

Michał Nowotka
ChEMBL Group
EMBL-EBI

Web services - what's that?

A Web service is a method of communication between two electronic devices over a network.


A software system designed to support interoperable machine-to-machine interaction over a network. [WC3]

Web services - what's that?

A Web API is a development in Web services where emphasis has been moving to simpler representational state transfer (REST) based communications. RESTful APIs do not require XML-based Web service protocols (SOAP and WSDL) to support their interfaces.

What's new?

  • More resources
  • Better (more RESTful design)
  • Pagination
  • Filtering
  • Ordering
  • Improved client
  • Beaker integration
  • Vector images

What's new?

Resources

Pagination

Pagination

Filtering

Select all approved drugs:
molecule?max_phase=4


Select all approved drugs with two or more aromatic rings: molecule?max_phase=4&molecule_properties__aromatic_rings__gte=2


Select all targets with name starting from 'serotonin': target?pref_name__istartswith=serotonin

Ordering

Order molecules by weight, ascending:
molecule?order_by=molecule_properties__full_mwt


Order molecules by weight, descending:
molecule?molecule_properties__isnull=false&order_by=-molecule_properties__full_mwt


Order by aromatic rings ascending and then by weight descending: molecule?order_by=molecule_properties__aromatic_rings&order_by=-molecule_properties__full_mwt

Intergration with Beaker

KNIME integration

"KNIME and REST: A dream team for Life Sciences Discovery Informatics"

Python client

  • Hides all network interaction
  • Kind of RPC
  • Tons of syntactic sugar
  • Lazy eavluation based on Django's QuerySet
  • Client-side caching
  • TODO: Include UniChEM

Python client


           molecule.get(['CHEMBL6498', 'CHEMBL6499', 'CHEMBL6505'])

           molecule.filter(molecule_properties__acd_logp__gte=1.9)
           .filter(molecule_properties__aromatic_rings__lte=3)
           .filter(chirality=(-1))
           .exists()

           mol = utils.smiles2ctab("[Na]OC(=O)c1ccccc1")
           br = utils.breakbonds(mol)
           fingerprints = utils.sdf2fps(mol)
       
    

  • No makefiles
  • Tons of syntactic sugar
  • No heavy FTP downloads
  • How cool is that?

Alternative client - bioservices

"A short comment with respect to the difference of speed between BioServices and your implementation on the example provided (9 minutes instead of a few seconds sounds bad indeed).
If you use the latest version of BioServices (1.3.5), this should now be equivalent in terms of speed. The reason for the slow behaviour in previous versions was that we were waiting 1 second between requests (if the request was failing) to be nice with ChEMBL REST API.
Thomas Cokelaer, on behalf of BioServices users and developers.
BioServices on Pypi
BioServices on github"

Javascript "Client"

Getting raster images from JS

Getting vector images from JS

Vector graphics can be animated!

Easter egg!

Here

More RESTful?

Better GET support

GET or POST?

Other ideas

  • Chemical flashcards
  • Chemspider-like (or better) interfaces
  • Drag and Drop OSRA
  • In browser Clippy
  • Mobile app
  • Data Tables

Other ideas

JsPlumb for web based KNIME-like experience.

Technologies used

Software dependencies

Software dependencies

Deployment infrastructure

Future improvements

  • Solr-based search
  • BLAST
  • Widgets gallery
  • JSON-LD support

Other info

Thank you!

Questions?