Skip to main content

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:

Comments

Popular posts from this blog

Identifying relevant compounds in patents

  As you may know, patents can be inherently noisy documents which can make it challenging to extract drug discovery information from them, such as the key targets or compounds being claimed. There are many reasons for this, ranging from deliberate obfuscation through to the long and detailed nature of the documents. For example, a typical small molecule patent may contain extensive background information relating to the target biology and disease area, chemical synthesis information, biological assay protocols and pharmacological measurements (which may refer to endogenous substances, existing therapies, reaction intermediates, reagents and reference compounds), in addition to description of the claimed compounds themselves.  The SureChEMBL system extracts this chemical information from patent documents through recognition of chemical names, conversion of images and extraction of attached files, and allows patents to be searched for chemical structures of interest. However, the curren

ようこそ、ケンブルへ! - Welcome to 剣舞瑠 ! -

The following is written in Japanese.... ケンブルチーム(ChEMBL Team)は、欧州バイオインフォマティクス研究所( EMBL-EBI )にあり、創薬研究に有用な化合物やターゲット情報を提供するデータベースを開発しています。 ChEMBLdb は、創薬研究に有用な医薬品化合物の情報を提供するデータベースです。現在、約50万個の化合物情報、約190万件の活性情報及びそれらのターゲット情報が登録されています。ユーザーは、生物活性化合物の情報を部分構造検索や類似性検索で調査したり、また、ターゲットのアミノ酸配列からBLAST検索でアッセイ情報を収集することができます。 ケンブルチームでは、キナーゼに特化したカイネースサファリ( Kinase SARfari )のサービスも開始しました。 日本語でのご質問、ご要望は kaz(at)ebi.ac.uk までどうぞ。チームメンバー一同、皆さんのご利用をお待ちしています!

Target predictions in the browser with RDKit MinimalLib (JS) and ONNX.js

Some time ago we showed an example of how a model trained in Python's PyTorch could be run in a C++ backend by exporting it to the ONNX format.  Greg also showed us in his blogpost how our multitask neural network model could be used in a very nice KNIME workflow by exporting it to ONNX. That was possible thanks to RDKit's Java bindings and the ONNX Java runtime. As a refresher, most of the most popular machine learning frameworks can export their models to this format and many programming languages can load them to run the predictions. This certainly is a beautiful example of interoperability! In November 2019 RDKit introduced a reduced functionality Javascript library which is able to do all we need in order to use our multitask model in the browser. So, the only thing that was left to do was to combine these two awesome tools... and we did it! Here is our demo with its available source code . Start typing a smiles into the box and enjoy! Updated code to generate the m

ChEMBL 28 Released!

  We are pleased to announce the release of ChEMBL_28. This version of the database, prepared on 15/01/2021 contains: * 2,680,904 compound records * 2,086,898 compounds (of which 2,066,376 have mol files) * 17,276,334 activities * 1,358,549 assays * 14,347 targets * 80,480 documents Data can be downloaded from the ChEMBL FTP site:   https://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/releases/chembl_28 . Please see ChEMBL_26 release notes for full details of all changes in this release:  https://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/releases/chembl_28/chembl_28_release_notes.txt DATA CHANGES SINCE THE LAST RELEASE This release includes several new deposited data sets: Donated Chemical Probes data from SGC Frankfurt (src_id = 54) SARS-CoV-2 screening data from the Fraunhofer Institute (src_id = 52) Antimicrobial screening data sets from CO-ADD (src_id = 40) Plasmodium screening data from the UCSD Winzeler lab (src_id = 51) MMV pathogen box screening data (src_id = 34) Curated data