ChEMBL Downloader 0.4.6-dev Documentation

Installation

The most recent release can be installed from PyPI with:

$ pip install chembl_downloader

The most recent code and data can be installed directly from GitHub with:

$ pip install git+https://github.com/cthoyt/chembl-downloader.git

To install in development mode, use the following:

$ git clone git+https://github.com/cthoyt/chembl-downloader.git
$ cd chembl-downloader
$ pip install -e .

Usage

chembl_downloader.api Module

API for chembl_downloader.

Functions

latest()

Get the latest version of ChEMBL as a string.

versions()

Get all versions of ChEMBL.

download_readme([version, prefix, ...])

Ensure the latest ChEMBL README.

get_date(version, **kwargs)

Get the date of a given version.

download_sqlite([version, prefix, ...])

Ensure the latest ChEMBL SQLite dump is downloaded.

download_extract_sqlite([version, prefix, ...])

Ensure the latest ChEMBL SQLite dump is downloaded and extracted.

connect([version, prefix])

Ensure and connect to the database.

cursor([version, prefix])

Ensure, connect, and get a cursor from the database to the database.

query(sql[, version, prefix])

Ensure the data is available, run the query, then put the results in a dataframe.

download_sdf([version, prefix, return_version])

Ensure the latest ChEMBL SDF dump is downloaded.

supplier([version, prefix])

Get a rdkit.Chem.ForwardSDMolSupplier for the given version of ChEMBL.

iterate_smiles([version, prefix])

Iterate over SMILES via RDKit.

get_substructure_library([version, ...])

Get the ChEMBL substructure library.

download_chemreps([version, prefix, ...])

Ensure the latest ChEMBL chemical representations file is downloaded.

get_chemreps_df([version, prefix])

Download and parse the latest ChEMBL chemical representations file.

download_fps([version, prefix, return_version])

Ensure the latest ChEMBL fingerprints file is downloaded.

chemfp_load_fps([version, prefix])

Ensure the ChEMBL fingerprints file is downloaded and open with chemfp.load_fingerprints().

download_monomer_library([version, prefix, ...])

Ensure the latest ChEMBL monomer library is downloaded.

get_monomer_library_root([version, prefix])

Ensure the latest ChEMBL monomer library is downloaded and parse its root with xml.

download_uniprot_mapping([version, prefix, ...])

Ensure the latest ChEMBL-UniProt target mapping TSV file.

get_uniprot_mapping_df([version, prefix])

Download and parse the latest ChEMBL-UniProt target mapping TSV file.

Queries

chembl_downloader.queries Module

A collection of query strings for ChEMBL.

Functions

get_assay_sql(assay_chembl_id)

Get the SQL for the given assay.

get_target_sql(target_id[, target_type, ...])

Get the SQL for all chemicals inhibiting the target.

get_document_molecule_sql(document_chembl_id)

Get all molecules mentioned in a document.

Indices and Tables