Data Science Plugin¶
Package: caddforge-datascience
Public source tag
This page describes caddforge-datascience 0.5.0, tagged as v0.5.0.
Published on PyPI; see the version matrix.
The data-science plugin provides generic data utilities as CADDForge tools.
Requirements and example status¶
The example library provides downloadable configuration templates for every workflow on this page, plus a shared Python runner. File paths refer to inputs you must prepare; these are not bundled research datasets. Schema validation does not establish scientific validity or engine availability. See the version matrix for release tags and publication status.
csv-scatter¶
Generates an interactive Bokeh scatter plot from a CSV/TSV file with optional color mapping, molecule hover images, and threshold sliders.
CLI:
caddforge show-config datascience csv-scatter
caddforge run datascience csv-scatter --config csv_scatter.yaml
YAML:
csv_path: data/metrics.csv
x_column: feature_x
y_column: feature_y
color_column: feature_group
smiles_column: smiles
id_column: compound_id
hover_columns: [compute_time]
x_scale: linear
y_scale: log
palette: viridis
thresholds_enabled: true
x_positive_direction: low
y_positive_direction: high
point_size: 10
alpha: 0.8
title: Synthetic metrics
Python:
from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool
spec = get_tool("datascience", "csv-scatter")
cfg = spec.config_cls(
csv_path="data/metrics.csv",
x_column="feature_x",
y_column="feature_y",
color_column="feature_group",
backend="local",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
workflow, cfg, backend_name=cfg.backend,
input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
print(result.paths)
Outputs to inspect:
results/<plot html>: interactive plotresults/result_record.json: canonical result
distribution-diagnostics¶
Diagnoses whether a numeric column looks approximately normal or log-normal using summary statistics, normality tests, histograms, and Q-Q plots.
CLI:
caddforge show-config datascience distribution-diagnostics
caddforge run datascience distribution-diagnostics --config distribution_diagnostics.yaml
YAML:
csv_path: data/assay_values.csv
column: pIC50
bins: 50
clip_std: null
sample_size: 5000
random_seed: 0
include_log: true
plot_filename: distribution_diagnostics.png
results_filename: distribution_report.json
Python:
from caddforge.core.execution import load_result_for_job, submit_workflow
from caddforge.plugins import get_tool
spec = get_tool("datascience", "distribution-diagnostics")
cfg = spec.config_cls(
csv_path="data/assay_values.csv", column="pIC50",
results_filename="distribution_report.json",
)
workflow = spec.workflow_cls(cfg)
job = submit_workflow(
workflow, cfg, backend_name=cfg.backend,
input_ports=tuple(getattr(spec.plugin, "input_ports", ())),
)
result = load_result_for_job(job)
if result is not None:
print(result.paths["report_json"])
Outputs to inspect:
results/distribution_report.json: statistics and diagnosticsresults/distribution_diagnostics.png: diagnostic plotresults/result_record.json: canonical result
Compressed inputs¶
csv-scatter accepts .csv.gz and .tsv.gz; distribution-diagnostics accepts .csv.gz.
CADDForge expands these inputs only at workflow runtime and preserves the configured compressed
path in provenance.