Bioactivity data in ChEMBL originates from two main sources: biomedical literature and data entering ChEMBL via data deposition. Over the years, we have seen an increase in deposited data sets (as shown in the Figure above).
To make data deposition easier, we recently did some major updates to our deposition guide and supplemented it with a deposition video, and a brief checklist for depositors.
Compound structural data must be supplied to the ChEMBL team in CTAB format / as MOL file. If a whole set of structures is supplied, then an SDF file is required. There are several ways to convert a list of SMILES to SDF. One way is to use our public ChEMBL Beaker API. Its functionalities are explained in more detail here and they can be tested interactively here. Just a few lines of code are needed to convert a list of SMILES strings into SD format.
from chembl_webresource_client.utils import utils smiles = ["CCO", "CC(=O)C1=CC=CC=C1C(=O)O", "CCN(CC)C(=O)C(C)(C)C"] mols = [utils.smiles2ctab(smile) for smile in smiles] sdf = ''.join(mols) sdf
However, for data deposition to ChEMBL you need to provide an SDF file that also includes the CIDX. A CIDX is a compound identifier linked to every compound, respectively. The respective output file should look like this:
RDKit 2D
12 12 0 0 0 0 0 0 0 0999 V2000
3.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.7500 1.2990 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.7500 -1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.5000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.7500 1.2990 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.5000 2.5981 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.0000 2.5981 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
0.7500 3.8971 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
2 3 2 0
2 4 1 0
4 5 2 0
5 6 1 0
6 7 2 0
7 8 1 0
8 9 2 0
9 10 1 0
10 11 2 0
10 12 1 0
9 4 1 0
M END
> <CIDX> (1)
MMV161996
$$$$
Below you find a few quick ways to generate the required SDF with CIDX included. You can use the rdkit.Chem package in several ways:
from rdkit import Chem smiles_list = ["CCO", "CC(=O)C1=CC=CC=C1C(=O)O", "CCN(CC)C(=O)C(C)(C)C"] cidx_list = [1, 2, 3] with Chem.SDWriter("out.sdf") as writer: for smiles, cidx in zip(smiles_list, cidx_list): mol = Chem.MolFromSmiles(smiles) mol.SetProp("CIDX", str(cidx)) writer.write(mol)
Using the rdkit.Chem.PandasTools module allows for using RDKit molecules as columns of a
Pandas dataframe. In this example the input data is a excel spreadsheet, which will come in handy for data depositors:
import pandas as pd from rdkit.Chem import PandasTools df = pd.read_excel("CIDX_smiles.xlsx", names=["CIDX", "smiles"]) PandasTools.AddMoleculeColumnToFrame(df, "smile","Molecule") PandasTools.WriteSDF(df, "out.sdf", molColName='Molecule",
properties=list(df.columns))
Should you want to avoid code, here is an alternative solution:
The KNIME workflow reads in a Excel file containing SMILES and CIDX in two separate columns.
It then transforms SMILES strings into the SMILES format (Molecule Type Cast Node), removes rows with missing structure, converts SMILES into RDKit canonical SMILES (RDKit Canon Smiles Node), and finally transforms it into SD format (RDKit to Molecule) and writes out the SDF to the indicated path (SDF Writer).
Happy structure conversion!
Comments