Skip to main content

CADDForge Data Science Tooling

Install this plugin with python -m pip install caddforge-datascience. It depends directly on caddforge-core>=0.21.0; Python imports and CLI commands still use caddforge. For the complete public toolbox, including user-facing extras, install python -m pip install caddforge. When migrating an existing environment, uninstall the former caddforge core distribution before installing renamed core and updated plugins.

caddforge-datascience hosts lightweight data science utilities as CADDForge plugins. The first tool, CSV Scatter, builds an interactive Bokeh scatter plot from a CSV/TSV file with optional color mapping, molecule hover images from SMILES, and threshold sliders that drive a live confusion matrix. Axis scales can be linear/log independently, and the color map can be inverted.

The confusion matrix treats the x-threshold as the predictor and the y-threshold as the actual outcome; you can control which side of each threshold is considered positive via x_positive_direction and y_positive_direction.

Tool: CSV Scatter

  • Section/Name: datascience / csv-scatter
  • Purpose: Generate an interactive scatter plot from a CSV/TSV file with optional color mapping, hover details (including rendered SMILES depictions), and threshold sliders (confusion matrix).
  • Outputs: HTML plot under the job run directory plus a standard result_record.json.

Config example (YAML)

csv_path: data/metrics.csv
x_column: dG_tr_calc
y_column: pappab
color_column: efflux_ratio          # optional numeric column
smiles_column: smiles               # optional for hover images (requires RDKit)
id_column: idor_no                  # optional identifier shown on hover
hover_columns: [compute_time]       # any extra columns to show in hover
x_scale: linear                     # linear or log
y_scale: log                        # linear or log
invert_color_scale: false           # reverse the colormap if true
palette: viridis                    # viridis|plasma|inferno|magma|cividis|turbo|blues
thresholds_enabled: true            # show sliders + live confusion matrix
x_positive_direction: low           # which side of x threshold is positive: low|high
y_positive_direction: high          # which side of y threshold is positive: low|high
point_size: 10
alpha: 0.8
title: "Transport predictions"
run_directory: runs/demo_plot       # optional override

CLI usage

# Show a template config
caddforge show-config datascience csv-scatter

# Run a plot job
caddforge run datascience csv-scatter --config plot.yaml

# Inspect job artifacts
caddforge status <job-id>
caddforge logs <job-id>
ls runs/<date>/<job-id>/results

Python usage

from cadd_datascience import CsvScatterConfig, CsvScatterWorkflow

config = CsvScatterConfig(
    csv_path="data/metrics.csv",
    x_column="molecular_weight",
    y_column="pIC50",
    color_column="logS",
    x_scale="log",
)
workflow = CsvScatterWorkflow(config)
job = workflow.prepare_job()
result = workflow.run(job)
print(result.paths["plot_png"])

Tool: Distribution Diagnostics

  • Section/Name: datascience / distribution-diagnostics
  • Purpose: Diagnose whether a numeric column looks approximately normal or log-normal using summary stats, normality tests, and saved plots (histograms + Q–Q plots).
  • Outputs: results/results.json report and results/distribution_diagnostics.png plot under the job run directory.

Config example (YAML)

csv_path: data.csv
column: value
bins: 50
clip_std: null
sample_size: 5000
random_seed: 0
include_log: true
plot_filename: distribution_diagnostics.png
results_filename: results.json
run_directory: runs/dist_demo

CLI usage

caddforge show-config datascience distribution-diagnostics
caddforge run datascience distribution-diagnostics --config dist.yaml
ls runs/<date>/<job-id>/results

Python usage

from cadd_datascience import DistributionDiagnosticsConfig, DistributionDiagnosticsWorkflow

cfg = DistributionDiagnosticsConfig(csv_path="data.csv", column="value")
wf = DistributionDiagnosticsWorkflow(cfg)
job = wf.prepare_job()
result = wf.run(job)
print(result.paths["report_json"])
print(result.paths["plot_png"])

Development

  • Plugins are registered via the caddforge.tools entry point group.
  • Tests live under tests/ and can be run with pytest once dependencies are installed.

Compressed inputs

csv-scatter accepts .csv.gz and .tsv.gz, while distribution-diagnostics accepts .csv.gz, through normal CLI, GUI, and pipeline submission. CADDForge expands them only in job-local runtime scratch; configuration files continue to reference the original compressed file.

Continuous integration and releases

.github/workflows/release.yml builds a wheel and source archive, validates metadata, and tests the installed wheel on Linux with Python 3.10 and 3.12. The lightweight test selection is recorded in scripts/ci_tests.json; external scientific engines are validated separately.

Pushing a matching v* release tag publishes the tested artifacts to PyPI. Branch pushes, pull requests and manual runs never publish. Configure a PyPI Trusted Publisher for the idorsia repository, release.yml workflow and pypi environment before pushing release tags. Runtime CADDForge dependencies must already be available publicly; publish core first, and publish docking/descriptors before MD.

Metadata

Release files for caddforge-datascience 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for caddforge-datascience 0.5.0
File Size Uploaded
caddforge_datascience-0.5.0.tar.gz 22.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for caddforge-datascience 0.5.0
File Interpreter ABI Platform
caddforge_datascience-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.5 kB

Release files / caddforge_datascience-0.5.0.tar.gz

Download URL caddforge_datascience-0.5.0.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0f41145008c2ca627114dc022d676c52e16d5d0a227981a6b89b697c3edcb084
BLAKE2b-256 checksum
How to use checksums
ee14170cd4c7385c13dd9122b775e0f19a111d57fdfe1c9ed415e3814f827993
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / caddforge_datascience-0.5.0-py3-none-any.whl

Download URL caddforge_datascience-0.5.0-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b74ac8e8c3635c3bd1d436ecef3dfc16b07236e31acfd93b46389e4c06a98533
BLAKE2b-256 checksum
How to use checksums
7cdc88212a2b0287510b99bec6fa79baab034cb5b3a67e79e0762c2dbbc41fb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page