Skip to main content

ChEMBL release 23, technical aspects.

ChEMBL release 23, technical aspects.


MV5BNDkwNzQ3Nzk4Nl5BMl5BanBnXkFtZTYwMjM0OTU5._V1_UX182_CR0,0,182,268_AL_.jpg

In this blog post, we would like to highlight some important technical improvements we've deployed as a part of the ChEMBL 23 release. You may find them useful if you work with ChEMBL data using FTP downloads and API.

1. FPS format support.


Many users download our SDF file containing all ChEMBL structures in order to compute fingerprints as an immediate next step. We decided to help them and publish precomputed fingerprints in a FPS text fingerprint format. The FPS format was developed by Andrew Dalke to "define and promote common file formats for storing and exchanging cheminformatics fingerprint data sets". It is used by chemfp, RDKit, OpenBabel and CACTVS and we believe it deserves promotion. The computed fingerprints are 2048 bit radius 2 morgan FPs, which we think is the most popular and generic type but please let us know in comments if other type can serve better. We are fully aware that fingerprint type can heavily depend on the specific application but it can be helpful for educational purposes and prototyping.

2. SQLite dump improvements.


As of release 21 we publish a SQLite dump which is an embedded file-based database. This proved to be very useful but as Andrew Dalke noticed on his blog, this dump wasn't optimised. We decided to follow Andrew's advice and pre-analyze tables during dump creation. We hope this will save you a few hours of computing. This is also a first ChEMBL release built with the support of our new Luigi-based pipelines. All the FTP files, including the schema image, SQL dumps and RDF data has been generated automatically using our python workflows. We are hoping to automate more and more parts of the release process, which should result in more frequent data releases and increased reproducibility in the long run.

3. API software updates


ChEMBL API is an open source project. This means that combining it with SQL dumps we provide, everyone can use it to create their own API instance. So far the biggest obstacle with integrating ChEMBL API software with other libraries was the fact, that the API was built on top of very old dependencies. For example, we were using Django 1.5, which was released about 5 years ago. We decided to upgrade the software making it compatible with the latest versions of most critical dependencies. After this change, the ChEMBL API software stack is now compatible with Django 1.11(.2) (which is the LTS edition), haystack 2.6.0, tastypie 0.13.3 and others. As a part of the upgrade process we also switched from virtualenv to conda as a default deployment environment which allowed us to easily install latest RDKit (2017.03.2 at the time of writing) and upgrade the Python interpreter itself (2.7.13). Using conda should make it easier to keep up with a future software updates as well, so from now on our software stack should always be using the latest stable dependencies.

All those changes should have a positive impact on the performance (more about that in the next paragraph), increase the security as well as compatibility with modern software stacks so it should be easier to integrate our software with your existing applications. Also, since all the dependencies are Python3-ready we are much closer to making a switch to Python 3.x. So far we migrated our API client library, which is compatible with both Python 2 and 3.

4. API performance improvements


The main reason to upgrade our software stack was improving the performance of our API. We decided to use Django Prefetch object (introduced in Django 1.7) to fine-tune SQL queries containing joins. We carefully analyzed all SQL queries generated by Django ORM when using the API. Introducing miniconda, which comes with precompiled binaries for python interpreter and libraries like numpy also had a positive impact on the performance, especially molecule images generation. We also added a full text search index on Assay description so now you can perform sophisticated full text queries. For example, searching for Activities, that have related assays with description containing 'TG-GATES', would look like this:


5. Extending Solr-based search


The above query can be rewritten to use Solr:


This query should be much faster than the one from the previous paragraph. We extended Solr indexes so now they cover 6 ChEMBL entities:


In total we have now indexed 17793020 solr documents. Some more example queries are:

A much more sophisticated query would be one that involves Solr-based search combined with DB-based filtering. For example, getting all assays that match 'inhibitor' in description and have assay type equal to 'A':


Such a "federated" query is quite heavy but we managed to optimise this use case. Still, please bear in mind that chaining search with too many filters may cause a timeout if the query is extremely complex.

6. Faster substructure search.


Our API provides the functionality to perform molecule substructure and similarity search. We noticed, that substructure search with the query being a small compound like benzene can lead to timeouts. We decided to enumerate all chemically important small structures and precache the results, which should improve substructure search performance. Please note, that this will have no impact on the speed of substructure search on our main web interface. This is because the interface is not using the API at the moment. We are developing a new API-based interface which should address this problem.

6. New API endpoints


Following new endpoints have been added to the API:

  • compound_record - records an occurrence of a molecule in a document
  • drug - provides information about approved drugs
  • organism - simple organism classification
  • target_prediction - target prediction results for clinical compounds, currently used on chembl user interface

7. Better API documentation


We updated the main API web page to reflect recent changes and we added a section with examples. GitHub repository has a new readme file as well and our PyPi packages point to the GitHub repo.

We also recently published a review paper, titled "Using ChEMBL web services for building applications and data processing workflows relevant to drug discovery". The document should be open and deposited into PubMedCentral (https://www.ncbi.nlm.nih.gov/pubmed/28602100) after six months.

8. Training


Please don't forget that we are organising a webinar on the 12th July about the API. More details will be announced soon.

9. Future plans


Our immediate future plans regarding the API are:
  • providing a Swagger-based documentation that can be used to generate a client code in any language
  • developing a better KNIME node
  • publishing a collection of reusable web components that consume the API





Comments

Popular posts from this blog

SureChEMBL Available Now

Followers of the ChEMBL group's activities and this blog will be aware of our involvement in the migration of the previously commercially available SureChem chemistry patent system, to a new, free-for-all system, known as SureChEMBL. Today we are very pleased to announce that the migration process is complete and the SureChEMBL website is now online. SureChEMBL provides the research community with the ability to search the patent literature using Lucene-based keyword queries and, much more importantly, chemistry-based queries. If you are not familiar with SureChEMBL, we recommend you review the content of these earlier blogposts here and here . SureChEMBL is a live system, which is continuously extracting chemical entities from the patent literature. The time it takes for a new chemical in the patent literature to become searchable in the SureChEMBL system is 1-2 days (WO patents can sometimes take a bit longer due to an additional reprocessing step). At time of writi

New SureChEMBL announcement

(Generated with DALL-E 3 ∙ 30 October 2023 at 1:48 pm) We have some very exciting news to report: the new SureChEMBL is now available! Hooray! What is SureChEMBL, you may ask. Good question! In our portfolio of chemical biology services, alongside our established database of bioactivity data for drug-like molecules ChEMBL , our dictionary of annotated small molecule entities ChEBI , and our compound cross-referencing system UniChem , we also deliver a database of annotated patents! Almost 10 years ago , EMBL-EBI acquired the SureChem system of chemically annotated patents and made this freely accessible in the public domain as SureChEMBL. Since then, our team has continued to maintain and deliver SureChEMBL. However, this has become increasingly challenging due to the complexities of the underlying codebase. We were awarded a Wellcome Trust grant in 2021 to completely overhaul SureChEMBL, with a new UI, backend infrastructure, and new f

ChEMBL & SureChEMBL anniversary symposium

  In 2024 we celebrate the 15th anniversary of the first public release of the ChEMBL database as well as the 10th anniversary of SureChEMBL. To recognise this important landmark we are organising a two-day symposium to celebrate the work achieved by ChEMBL and SureChEMBL, and look forward to its future.   Save the date for the ChEMBL 15 Year Symposium October 1-2, 2024     Day one will consist of four workshops, a basic ChEMBL drug design workshop; an advanced ChEMBL workshop (EUbOPEN community workshop); a ChEMBL data deposition workshop; and a SureChEMBL workshop. Day two will consist of a series of talks from invited speakers, a few poster flash talks, a local nature walk, as well as celebratory cake. During the breaks, the poster session will be a great opportunity to catch up with other users and collaborators of the ChEMBL resources and chat to colleagues, co-workers and others to find out more about how the database is being used. Lunch and refreshments will be pro

ChEMBL 34 is out!

We are delighted to announce the release of ChEMBL 34, which includes a full update to drug and clinical candidate drug data. This version of the database, prepared on 28/03/2024 contains:         2,431,025 compounds (of which 2,409,270 have mol files)         3,106,257 compound records (non-unique compounds)         20,772,701 activities         1,644,390 assays         15,598 targets         89,892 documents Data can be downloaded from the ChEMBL FTP site:  https://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/releases/chembl_34/ Please see ChEMBL_34 release notes for full details of all changes in this release:  https://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/releases/chembl_34/chembl_34_release_notes.txt New Data Sources European Medicines Agency (src_id = 66): European Medicines Agency's data correspond to EMA drugs prior to 20 January 2023 (excluding vaccines). 71 out of the 882 newly added EMA drugs are only authorised by EMA, rather than from other regulatory bodies e.g.

RDKit, C++ and Jupyter Notebook

Fancy playing with RDKit C++ API without needing to set up a C++ project and compile it? But wait... isn't C++ a compiled programming language? How this can be even possible? Thanks to Cling (CERN's C++ interpreter) and xeus-cling jupyter kernel is possible to use C++ as an intepreted language inside a jupyter notebook! We prepared a simple notebook showing few examples of RDKit functionalities and a docker image in case you want to run it. With the single requirement of docker being installed in your computer you'll be able to easily run the examples following the three steps below: docker pull eloyfelix/rdkit_jupyter_cling docker run -d -p 9999:9999 eloyfelix/rdkit_jupyter_cling open  http://localhost:9999/notebooks/rdkit_cling.ipynb  in a browser