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
Release files for chaff-tools 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chaff_tools-0.0.1.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chaff_tools-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.4 kB
Release files / chaff_tools-0.0.1.tar.gz
| Download URL | chaff_tools-0.0.1.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c336cd9fcf4d4a6f97360d4f8ab5c88b8c8da64a13dd87581bc67614b29641f0
|
|
BLAKE2b-256 checksum How to use checksums |
fbd957641f689d9edd230f3a081242b623833e291f40eabbac66ab32fe666771
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / chaff_tools-0.0.1-py3-none-any.whl
| Download URL | chaff_tools-0.0.1-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62942883be3eaff5a217a12ed1ab1d1e4849701068441e7a8f9ec7a7cbce192f
|
|
BLAKE2b-256 checksum How to use checksums |
69d3086058236155fbdc66305b657682ab75ef00e56969d463d7c33aac0b7fec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|