ChEMBL Resources

The SARfaris: GPCR, Kinase, ADME

Thursday, 6 October 2016

ChEMBL 22 release - technical notes

The ChEMBL 22 release brings lots of new data. But we also released some new software so if you are interested in technical details please read on.

1. First of all, please note that ChEMBL 22 is the last release where we provide Oracle 9i dumps.
Oracle 9i has been out of support now for at nearly a decade and shouldn't be in use anymore but please let us know if this is a problem. On the other hand, we will do our best to provide Oracle 12c dumps for the next release.

2. If you are using the python API client please upgrade it by running:

[sudo] pip install -U chembl_webresource_client

This will upgrade the client to the latest version which solves some minor bugs and adds an ability to search in document abstracts. It will also create a new cache so you will see new chembl data immediately. Otherwise, you will need to clear your cache manually.

3. New version (2.4.9) of the ChEMBL API has been released as well. This version includes:
 - new endpoints: tissue and target_relation
 - mechanism endpoint contains references now
 - solr index has been added to documents so their abstracts can be searched for example searching  for 'cytocine': api/data/document/search.json?q=cytokine
 - the outdated chemical cartridge used by API (Biovia Direct) has been updated from 6.3 to 2016 Direct. The result is better handling of SMILES string, for example this API call:[O--].[Fe++].OCC1OC(OC2C(CO)OC(OC3C(O)C(CO)OC(OCC4OC(OCC5OC(O)C(O)C(OC6OC(CO)C(O)C(OC7OC(COC8OC(COC9OC(CO)C(O)C(O)C9O)C(O)C(O)C8O)C(O)C(OC8OC(CO)C(O)C(OC9OC(CO)C(O)C(OC%2510OC(COC%2511OC(COC%2512OC(COC%2513OC(COC%2514OC(COC%2515OC(CO)C(O)C(O)C%2515O)C(O)C(OC%2515OC(CO)C(O)C%2515O)C%2514O)C(O)C(O)C%2513O)C(O)C(O)C%2512O)C(O)C(O)C%2511O)C(O)C(OC%2511OC(CO)C(O)C(O)C%2511O)C%2510O)C9O)C8O)C7O)C6O)C5O)C(O)C(O)C4O)C3O)C2O)C(O)C1O/70
works fine now.
 - status endpoint provides API software version as well as ChEMBL release version.
 - there are many smaller bug fixes and improvements.

4. Since our API is maturing we started preparing collection of embedable widgets written in JS/CSS/HTML that you can use on your website/blog/webapplication. This will be a base for our new ChEMBL website. An example widget providing some besic information about a ChEMBL compound can be found below, the code used to embed it is:

<object data="" width="800px" height="350px"></object>

Another example is an assay co-occurance matrix for compounds extracted from a single document. Again the code to embed is:

<object data="" width="800px" height="800px"></object>

Thursday, 29 September 2016

ChEMBL 22 Released

We are pleased to announce the release of ChEMBL 22. This version of the database, prepared on 8th August 2016 contains:

  • 2,043,051 compound records
  • 1,686,695 compounds (of which 1,678,393 have mol files)
  • 14,371,219 activities
  • 1,246,132 assays
  • 11,224 targets
  • 65,213 documents

Data can be downloaded from the ChEMBL ftpsite or viewed via the ChEMBL interface. Please see ChEMBL_22 release notes for full details of all changes in this release.


In addition to the regular updates to the Scientific Literature, PubChem, FDA Orange Book and USP Dictionary of USAN and INN Investigational Drug Names this release of ChEMBL also includes the following new data:

Deposited Data Sets:

Two new deposited data sets have been included in ChEMBL_22: the MMV Pathogen Box compound set ( and GSK Tres Cantos Follow-up TB Screening Data (

Patent Data from BindingDB:

We have worked with the BindingDB team to integrate the bioactivity data that they have extracted from more than 1000 granted US patents published from 2013 onwards ( into ChEMBL. This data is incorporated into ChEMBL in the same way as literature-extracted bioactivity information, but with a new source (SRC_ID = 37, BindingDB Database) and a document type of 'PATENT'. In total this data set provides 99K bioactivity measurements for 68K compounds.

Withdrawn Drugs:

We have compiled a list of drugs that have been withdrawn in one or more countries due to safety or efficacy issues from multiple sources. Where available, the year of withdrawal, the applicable countries/areas and the reasons for the withdrawal are captured. Withdrawal information is shown on the Compound Report Card and a new icon has been added to the availability type section of the  Molecule Features image to denote drugs that have been withdrawn (e.g.,

Tissue Annotation:

We have identified tissues used in assays (e.g., tissues in which measurements were made after in-vivo dosing, isolated tissues on which assays were performed, or tissues from which sub-cellular fractions were prepared) using the Uberon ontology ( A TISSUE_DICTIONARY table has been created, which stores a list of the identified tissues, their corresponding ChEMBL_IDs, names and Uberon IDs. Mappings are also provided to the Experimental Factor Ontology (, Brenda Tissue Ontology ( and CALOHA Ontology ( Tissue Report Cards have been created (e.g.,, providing a mechanism to view all of the assay data associated with a particular tissue. The keyword search now also allows searching by tissue name, Uberon ID, EFO ID, Brenda Tissue ID or CALOHA tissue ID.

Indications for Clinical Candidates:

Indication information has now been extended to cover clinical candidates. This information has been extracted from and is included in the 'Browse Drug Indications' view and on Compound Report Cards.

Drug Metabolism Viewer:

An additional section has been added to Compound Report Cards to display drug metabolism schemes (e.g., These schemes can be opened in an expanded view by clicking the link above the image. Where known, enzyme information is shown on edges and clicking on an edge of interest will provide additional information about the reaction, including references. Clicking on the nodes allows linking to Compound Report Cards for the metabolites.

Variant Sequences:

For cases where assay data has been measured against a variant protein (e.g., site-directed mutagenesis or drug-resistance studies) we have created a VARIANT_SEQUENCES table to store the variant protein sequence used in the assay (the target for the assay will still be the wild-type protein). Since the exact protein sequence used in an assay is rarely reported in the medicinal chemistry literature, these sequences have been re-created by introducing the specified point mutation into the current UniProt sequence for the target. The resulting sequence is not therefore guaranteed to be the exact sequence used in the assay but provides a more robust way to document the relevant mutation(s) than the current use of residue name and position in most publications and ChEMBL assay descriptions (which quickly becomes obsolete when sequences change). In cases where the reported residue positions could not be reconciled with any UniProt sequence, variant sequence information has not been included in ChEMBL. Further sequences (requiring more curation) will be added in future releases. Assays with variant sequence information available are linked to the VARIANT_SEQUENCES table via the VARIANT_ID column. Please note, this information is not yet displayed on the ChEMBL interface.

We recommend you review the ChEMBL_22 release notes for a comprehensive overview of all updates and changes in ChEMBL 22, including schema changes, and as always, we greatly appreciate the reporting of any omissions or errors.

Keep an eye on the ChEMBL twitter and blog accounts for news and updates.

The ChEMBL Team

Monday, 19 September 2016

ChEMBL_22 is coming soon....

ChEMBL_22 will be released in the next week or two. For those of you who want to plan ahead, here is a preview of the new schema (full documentation here)

We would also like to inform users that we plan to discontinue the Oracle 9i download format after this release. Please contact us as soon as possible if you rely on this version.

Wednesday, 18 May 2016

Join the EMBL-EBI Chemogenomics team!

We are currently seeking multiple talented individuals to join the Chemogenomics team here at EMBL-EBI, both to work on our group resources (ChEMBL, SureChEMBL) and support external projects (FP7 HeCaToS and NIH Illuminating the Druggable Genome). If you are interested in applying for these positions (or for more information) please follow the links below. The closing date for all positions is 12th June.

Tuesday, 29 March 2016

Target Prediction Models Update

In case you have been too busy to notice, ChEMBL_21 has arrived with the usual additions, improvements and enhancements both on the data/annotation side, as well as on the interface/services. To complement this, we have also updated the target prediction models, which can be downloaded from our ftp here

The good news is that, besides the increase in terms of training data (compounds and targets), the new models were built using the latest stable versions of RDKit (2015.09.2) and scikit-learn (0.17). The latter was upgraded from the much older 0.14 version, which was causing incompatibility issues (see MultiLabelBinarizer) to several of you while trying to use the models.

We've also put together a quick Jupyter Notebook demo on how to get predictions from the models here: 

The new models will also be available on myChEMBL 21 along with a more detailed and elaborate Jupyter Notebook.

On a side note, am I allowed to be impressed by how easy it is nowadays to install Python and RDKit? 
It is literally just a matter of 6 commands and 5 minutes (on my Mac): 

curl -o
conda create -n rd27 python=2.7
source activate rd27
conda install ipython ipython-notebook pillow pandas requests
conda install -c rdkit

To put things in perspective: the first time I tried to compile Python and RDKit from scratch was in 2010 (on a RedHat 5.6 machine, of course); it took me about 4 days :) 


Friday, 18 March 2016

This Python InChI Key resolver will blow your mind

This scientific clickbait title introduces our promised blog post about the integration of UniChem into our ChEMBL python client. UniChem is a very important resource, as it contains information about 134 million (and counting) unique compound structures and cross references between various chemistry resources. Since UniChem is developed in-house and provides its own web services, we thought it would make sense to integrate it with our python client library. Before we present a systematic translation between raw HTTP calls described in the UniChem API documentation and client calls, let us provide some preliminary information:

In order to install the client, you should use pip:

pip install -U chembl_webresource_client

Once you have it installed, you can import the unichem module:

from chembl_webresource_client.unichem import unichem_client as unichem

OK, so how to resolve an InChI Key to InChI string? It's very simple:

Of course in order to resolve InChI Key to InChI, the client connects to the UniChem database via REST, retrieves the results and gives them to you. This is done in a very efficient way and abstracts away all network-related issues, such as setting the HTTP session, handling retries, caching results etc. From the user point of view, it looks like a standard function call, that is executed locally but in fact working internet connection is required to successfully fetch results (unless they are already cached). We've just heard that there is another InChi resolver written entirely in CSS3, click here to find out.

OK, we admit that resolving InChI key to InChI may not be the most important UniChem use case so we invite you to take a look at the Jupyter notebook providing examples of using all available methods:

Wednesday, 9 March 2016

ChEMBL 21 web services update

Traditionally, along with the release of the new ChEMBL version, we have made a few updates to our RESTful API. Below you can find a short description of the most important changes:


Data API (

1. New resources: Since ChEMBL 21 introduced a few new tables, we have made them available via the API. The new resources are:

Moreover, the target_component endpoint has been enhanced to provide a list of related GO terms.

2. Solr-based search: a very popular feature request was the ability to search resources by a keyword. A form of searching was already possible before, using filtering terms, such as [i]contains,[i]startswith and [i]endswtith filters. For example, in order to search molecules for 'metazide' in their preferred name, this filter can be used:

However, this approach has many drawbacks:
  • it's executed on the database level and can be very slow
  • in order to search in several attributes, you have to add the filter separately to each of them, which can result with a very long tail of filters
  • you can't search in one-to-many/many-to-many attributes (for example you cannot search molecule by its synonym because a molecule can have many synonyms)
The good news is that in order to solve this problem, we implemented a solr-based solution using django-haystack. Let's just jump straight into examples:

What if we want to search for some term in molecules, targets and assays at once? No problem, the chembl_id_lookup endpoint can be used for this, for example searching for 'morphine' will look like:

Looking at the results of the last request, it's very easy to tell (by examining the 'entity_type' attribute) that a large number of compounds and assays were returned.

Another important thing to note is that every result of search query has a 'score' attribute, indicating the relevancy of the given result. The results are sorted by the score descending (i.e. the most relevant are always first) and although you can add additional filters, for example:

you cannot change ordering by appending 'order_by=...' attribute.

You may ask, why do we only offer searching for 3 resources (well, 4 including the chembl_id_lookup)? This is because these resources are most popular and most important but we are planning to add more (such as searching in document abstracts, cell descriptions, activities) in the near future. If you have any suggestions about which resources should offer search functionality in the first place, please let us know in comments or write your suggestions to You can easily check which resources offer searching by looking at our live documentation, where all the searching methods are listed.

Furthermore, we would also appreciate your feedback about the quality of search results. If you believe that some results should have higher relevancy score than others and currently that's not the case, let us know so we can properly adjust boosts.

3. Compound images have transparent background by default. So now you can use them regardless of the color scheme used in your website:

 It's also possible to explicitly specify background color, by appending the 'bgColor=color_name' attribute for example in order to get a nice and warm orange background you have do:

The colour names are the standard names defined for HTML, you can check the full list here.

4. Datatables support: Datatables is one of the most popular jQuery plugins for rendering tabular data. In order for you to use it in a generic way (i.e. write the code in such a way it can use datatables to render data from any API endpoint), we have to be able to provide definitions of columns (e.g. how many columns we have for a given endpoint, are they searchable, sortable, what type of data they contain). This is possible using the schema API method (for example:, that describes every resource in a vary detailed way; however, the data provided by the schema has to be transformed to the format compatible with datatables. This is why we decided to provide another method, which is directly compatible with datatables:

Below is an example code snippet that renders a datatable from the target resource. Click on the 'Result' tab to see the table - you can sort by columns, change pages and set the number of rows displayed per page. Notice that if you change the name of the resource in the first line of code (from 'target' to 'source' or 'assay' for example), the columns and data will change as well.

Utils API (

There is a small update to the utilities (Beaker) part of the API. There is a new method called ctab2xyz, which converts a molfile to the xyz file format. You will notice the new method is now available in the live docs. Also the compound rendering code has been improved so it's now compatible with the latest versions of Pillow library.

Python client (

Our official Python client library has been updated as well in order to reflect recent changes. Just to remind you, in order to get the latest version of the client, you should install it via pip:

pip install -U chembl_webresource_client

Some examples of using recently added resources (drug indications, GO slim, drug metabolism):

Searching is exposed as well, examples below:

Another important change to the client is the integration with UniChem API. The latter deserves a separate blog post, so stay tuned.

Friday, 4 March 2016

ChEMBL DB on SQLite, is that even possible?

Short answer: Yes; Andrew Dalke did it in 2014 for ChEMBL 19 compounds but now it's officially supported by the ChEMBL team and covers the whole database.

One thing you can notice looking at the ChEMBL 21 FTP directory is a  new file called chembl_21_sqlite.tar.gz. What's that?

It's a binary SQLite database file containing all the ChEMBL 21 tables and data. If you don't know what the SQLite is, it's a very lightweight database system, that stores the entire database (definitions, tables, indices, and the data itself) as a single cross-platform file on a host machine. It's very popular as well, so if you have a Mac, Windows 10 or a Linux box, chances are that SQLite is already installed on your computer. Skype uses SQLite to store the local copy of conversation history and the Python language has SQLite bundled as a core library.

If it's so "lightweight", why is the SQLite ChEMBL 21 file 2.4GB, compared to less than 1.4GB for Oracle, MySQL and PostgreSQL dumps and is the largest file in the FTP directory? This is because the 'dumps' only contain raw data in a form of SQL statements, that yet have to be executed in order to create a database. In contrast, SQLite file IS a database already. This means that if you download a MySQL dump, for example, you need to install the MySQL server first. Most probably you will have to configure it as well. Once this is done, you install the MySQL client to create a new database and populate it with a data from the dump file. This can take several hours during which the engine will create tables and indexes. If you never done this before, the whole process can take you much longer and possibly you will need some help.

SQLite can make your life easier, all you have to do is to download the file from our FTP and uncompress it. The uncompressed file (named chembl_21.db ) will take about 12GB of your disk space. Once you done this, you can open a terminal and change the current directory to the one, which contains the file. Now all you have to do is to type:

sqlite3 chembl_21.db

If you have SQLite installed you will see the prompt ready to execute your SQL statements:

SQLite standard terminal shell has many useful commands making is extremely convenient for simple tasks such as exports. We use SQLite CLI ourselves to prepare chembl_21_chemreps.txt.gz file, which is a text file containing structure information of all the ChEMBL compounds used by the UniChem software. In order to create it, we execute the following commands:

OK, but I hate terminal, can I have a GUI instead? Yes, just install sqlitebrowser and open the file as you would with any other program. You will see ChEMBL 21 tables, you can browse data and execute SQL statements with autocompletion. Of course you can also use SQLite in your Python (or IPython notebooks) scripts or KNIME workflows.

Isn't ChEMBL a bit too large for SQLite capabilities? Of course SQLite has its limitations. It's good for quick hacking and prototyping but as it doesn't implement client-server architecture it doesn't scale well. If all you need is the ability to run a SQL query locally on your laptop or extract some data, then probably SQLite would be your best choice. It's exceptionally fast on SSD hard drives. The chemreps file we've described above was generated on the Mid 2014 MacBook Pro with SSD and it took less than a minute to prepare. Just keep in mind, that SQLite always does a full table scan for


It does not keep meta information on tables to speed this process up so this operation will always be slower than on other engines.

How about chemistry logic? Riccardo Vianello created a project called ChemicaLite which is a cheminformatic SQLite database extension. It can generate and store fingerprints, compute descriptors, run chemical queries so everything you would expect from a normal chemical database.

Thursday, 3 March 2016

ChEMBL 21 Released

We are pleased to announce the release of ChEMBL_21. This version of the database was prepared on 1st February 2016 and contains:

• 1,929,473 compound records
• 1,592,191 compounds (of which 1,583,897 have mol files)
• 13,968,617 activities
• 1,212,831 assays
• 11,019 targets
• 62,502 source documents

Data can be downloaded from the ChEMBL ftpsite or viewed via the ChEMBL interface. Please see ChEMBL_21 release notes for full details of all changes in this release.


In addition to the regular updates to the Scientific Literature, PubChem, FDA Orange Book and USP Dictionary of USAN and INN Investigational Drug Names this release of ChEMBL also includes the following new data:

* Data Depositions

Eight new deposited data sets have been included in ChEMBL_21. These include HepG2 cell viability data for the Gates Library Compound Collection from the University of Dundee, three depositions from groups screening the MMV Malaria Box (from TropIQ, Netherlands; Mahidol University, Thailand and Keele University, United Kingdom), anti-protozoal screening data from DNDi, anti-kinetoplastid screening data from GSK Tres Cantos, Leishmania screening data from St. Jude Children’s Hospital and carnitine palmitoyltransferase modulator screening data from Roche.

* Clinical Candidates

We have added >900 additional compounds in clinical development (phase I-III) to ChEMBL. These candidates mainly cover kinase, GPCR and nuclear hormone receptor targets. For each of these new candidates, we have curated likely efficacy targets (from a variety of sources such as scientific literature and pharmaceutical company pipeline documents) and added this information to the database. We have also updated the highest known development phase for compounds already in ChEMBL (such as monoclonal antibodies and compounds with USAN applications). We will continue to add further clinical candidate and target information in future releases (including targets for the existing monoclonal antibody candidates, and candidates for ion channel targets). Mechanism of action information for clinical candidates has been added to the 'Browse Drug Targets' tab on the ChEMBL interface, as well as the Compound and Target Report Cards:

* Drug Indications

We have identified indications for FDA approved drugs from a number of sources including Prescribing Information, and the WHO ATC classification and mapped these to both MeSH disease identifiers and Experimental Factor Ontology disease identifiers. We will add further indications for compounds in clinical development in future ChEMBL releases. Drug indications can be viewed on Compound Report Cards and also on the 'Browse Drug Indications' tab:

* Drug Metabolism and Pharmacokinetic data

We have extracted drug metabolism and pharmacokinetic (PK) data from a number of data sources:
- Curated Drug Metabolism Pathways from a variety of literature/reference sources
- FDA Drug Approval Packages
- Drug Metabolism and Disposition Journal

Experimental assay data from these sources can be viewed via the Compound and Assay Report Cards and Bioactivity Summary views as usual. Further interface enhancements will be included in the near future to allow browsing of drug metabolism pathway data.

* GO Drug Target Slim:

We have created a Gene Ontology slim (GO slim) containing a subset of Gene Ontology terms that are well represented in protein targets from the ChEMBL database (see and Targets can now be browsed by GO slim terms on the interface:

* HELM Notation

HELM Notations for monoclonal antibodies have been generated by Stefan Klostermann and team at Roche Diagnostics, and added to the database. In addition, HELM Notations have been generated for ~1100 new peptides that have been added to the ChEMBL_21 release.

* Improved Organism Classification

The organism classification has been enhanced for plant, insect and fungal targets to facilitate retrieval of crop protection data from the database. 

* RDF Update

ChEMBL 21 RDF files have been updated and can be downloaded from the ChEMBL-RDF ftpsite. The EBI-RDF Platform will be updated with the ChEMBL 21 RDF shortly.

We recommend you review the ChEMBL_21 release notes for a comprehensive overview of all updates and changes in ChEMBL 21, including schema changes, and as always, we greatly appreciate the reporting of any omissions or errors.

Keep an eye on the ChEMBL twitter and blog accounts for news and updates.

The ChEMBL Team

Monday, 22 February 2016

Forthcoming Conferences

There are a number of Conferences and meetings coming up in the next few weeks that might be of interest:

Firstly, it's not too late to register for the KNIME Spring Summit in Berlin 24th -26th February
More details here

The next SME Forum will be held on the Wellcome Genome Campus at Hinxton near Cambridge on 7th and 8th March.  Come and find out more about EMBL-EBI's  freely available data resources including ChEMBL and SureChEMBL. More details on the meeting and registration here

UKQSAR and Physchem Forum Joint Symposium
This is a two day meeting being held on 15th to 16th March at Stevenage in the UK.  There are a limited number of places still available and you must register (by 29th Feb) if you want to attend.  More details can be found here.

Last but not least consider going to the Spring ACS meeting in San Diego 13th to 17th March where there will be a couple of ChEMBL talks and if anyone would like to catch up with us please get in touch.  More details about the meeting here.