OlivierBeq / Papyrus-scripts

MIT License
18 stars 9 forks source link

Papyrus-scripts

Collection of scripts to interact with the Papyrus bioactivity dataset.

alt text


Associated Article: 10.1186/s13321-022-00672-x

Béquignon OJM, Bongers BJ, Jespers W, IJzerman AP, van de Water B, van Westen GJP.
Papyrus - A large scale curated dataset aimed at bioactivity predictions.
J Cheminform 15, 3 (2023). https://doi.org/10.1186/s13321-022-00672-x

Associated Preprint: 10.33774/chemrxiv-2021-1rxhk

Béquignon OJM, Bongers BJ, Jespers W, IJzerman AP, van de Water B, van Westen GJP.
Papyrus - A large scale curated dataset aimed at bioactivity predictions.
ChemRxiv. Cambridge: Cambridge Open Engage; 2021;
This content is a preprint and has not been peer-reviewed.

Installation

pip install papyrus-scripts

:warning: If pip gives the following error and resolves in import errors

Defaulting to user installation because normal site-packages is not writeable

Then uninstall and reinstalling the library with the following commands:

pip uninstall -y papyrus-scripts
python -m pip install papyrus-scripts

Additional dependencies can be installed to allow:

Donwload the dataset

The Papyrus data can be donwload in three different ways.
The use of the command line interface is strongly recommended to download the data.

- Using the command line interface (CLI)

Once the library is installed (see Installation), one can easily download the data.

More options can be found using

papyrus download --help 

By default, the data is downloaded to pystow's default directory.
One can override the folder path by specifying the -o switch in the above commands.

- Using the application programming interface (API)


from papyrus_scripts import download_papyrus

# Donwload the latest version of the entire dataset with all precomputed descriptors
download_papyrus(version='latest', only_pp=False, structures=True, descriptors='all')

- Directly from online archives

Different online servers host the Papyrus data based on release and ChEMBL version (table below).

Papyrus version ChEMBL version Zenodo 4TU Google Drive
05.4 29 :x: :heavy_check_mark: :heavy_check_mark:
05.5 30 :heavy_check_mark: :x: :heavy_check_mark:
05.6 31 :heavy_check_mark: :x: :x:

Precomputed molecular and protein descriptors along with molecular structures (2D for default set and 3D for low quality set with stereochemistry) are not available for version 05.4 from 4TU but are from Google Drive.

As stated in the pre-print we strongly encourage the use of the dataset in which stereochemistry was not considered. This corresponds to files containing the mention "2D" and/or "without_stereochemistry".

Interconversion of the compressed files

The available LZMA-compressed files (.xz) may not be supported by some software (e.g. Pipeline Pilot).
Decompressing the data is strongly discouraged!
Though Gzip files were made available at 4TU for version 05.4, we now provide a CLI option to locally interconvert from LZMA to Gzip and vice-versa.

To convert from LZMA to Gzip (or vice-versa) use the following command:

papyrus convert -v latest 

Removal of the data

One can remove the Papyrus data using either the CLI or the API.

The following exerts exemplify the removal of all Papyrus data files, including all versions utility files.

papyrus clean --remove_root
from papyrus_scripts import remove_papyrus

remove_papyrus(papyrus_root=True)

Easy handling of the dataset

Once installed the Papyrus-scripts allow for the easy filtering of the data.

The scripts used to extract subsets, generate models and obtain visualizations can be found here.

Features to come

Examples to come

Logos

Logos can be found under figures/logo Two version exist depending on the background used.

:warning: GitHub does not render the white logo properly in the table below but should not deter you from using it!

| On white background | On colored background | |:---------------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------:| | | |