Skip to main content

Pipeline for contamination, calcuating raco-score, and assessing sensitivty of both physic-based and machine-learning models.

Project description

What is it?

TBD

Installation

Installation made easy. chaff-tools is pip installable. Please make sure you have Python 3.6 installed.

$ pip install chaff-tools

Usage

Miscallenous tools are used

# Extract a ZIP file and flatten contents
$ chaff-physics extract-zip
# Extract a .db2.gz file
$ chaff-physics extract-db2
# Extract all .db2.gz files from a folder
$ chaff-physics extract-db2-folder
# Download and process TLDR batch jobs from a CSV
$ extract-db2-folder
# Extract all .db2.gz files from a folder
$ extract-db2-folder

Random split

The cp-random-split tool allows you to perform a realistic, clustering-based train/test split on a dataset of molecular SMILES, as described in the Martin et al. paper. This helps preserve chemical diversity between sets, unlike purely random splits.

Command

cp-random-split \
  --input-file compounds.csv \
  --smiles-col 0 \
  --frac-train 0.8 \
  --exact \
  --method Auto \
  --output results/some_split
Flag Description
-i, --input-file Path to the input CSV/TSV file containing SMILES.
-s, --smiles-col Index of the column containing SMILES (default: 0).
-f, --frac-train Fraction of the dataset to use for training (e.g. 0.8).
--exact If set, may split a cluster to achieve the exact fraction.
-m, --method Clustering method: Auto, TB (Butina), or Hierarchy (default: Auto).
-o, --output Base path for output files; _train.csv and _test.csv will be created.

Co-existence with tldr-tools

tldr-tools can be synergistically used with chaff-tools to run larger-scale pipelines.

tldr-batch

$ chaff-contaminate --actives_dir path/to/actives --contaminants_dir path/to/contaminants --frac_contaminate 0.2 --output path/to/output.yaml --seed 42

Arguments:

--actives_dir: Directory containing .db2 files for actives.
--contaminants_dir: Directory containing .db2 files for contaminants.
--frac_contaminate: Fraction of actives that should be contaminated (value between 0 and 1).
--output: Path where the YAML file with results will be saved.
--seed: (Optional) Random seed for reproducibility.

For example, if running decoy generation is desired:

tldr-submit --module decoys --activesism input_files/actives.ism --decoygenin input_files/decoy_generation.in --memo "Decoy generation for ADA, replicate 1"

Or, you can build a ligand using DOCK3.8:

tldr-submit --module build --input chaff_tools/aggregator_advisor_hf_test.txt --memo "aa_hf_test"

Documenting runs with the optional memo parameter is encouraged.

Pass in a job number to check on a status of a run:

tldr-status --job-number 14886

Once a run is successful, you can download the output to a local directory:

tldr-download --job-number 14886 --output some_folder

Does tldr-tools work in Colab and Jupyter Notebook?

Yep, you use chaff-tools as follow:

TBD

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chaff_tools-0.0.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chaff_tools-0.0.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file chaff_tools-0.0.1.tar.gz.

File metadata

  • Download URL: chaff_tools-0.0.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for chaff_tools-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c336cd9fcf4d4a6f97360d4f8ab5c88b8c8da64a13dd87581bc67614b29641f0
MD5 ed1513a053482356dc6dc1cfd00ece85
BLAKE2b-256 fbd957641f689d9edd230f3a081242b623833e291f40eabbac66ab32fe666771

See more details on using hashes here.

File details

Details for the file chaff_tools-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: chaff_tools-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for chaff_tools-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62942883be3eaff5a217a12ed1ab1d1e4849701068441e7a8f9ec7a7cbce192f
MD5 1c3ea958fde4a6c7e7f0d9129e72de75
BLAKE2b-256 69d3086058236155fbdc66305b657682ab75ef00e56969d463d7c33aac0b7fec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page