Run bundle (schema 1.0)
Every KinOpt run writes a run bundle: one self-contained folder or zip with the results, the inputs, the resolved configuration and the provenance of the run. It is the single input of kinopt-vis and follows the bundle conventions of phoskintime-vis. This page is the reference for developers of readers such as kinopt-vis.
- Written by every run:
kinopt run,kinopt-local,kinopt.api.runand the GUI write<results>/<results folder name>.kinopt.zip(RunConfig(bundle=False)orkinopt run --no-bundleskip it). - From any results folder of KinOpt 0.11 or later:
kinopt bundle <results_dir> [--out DIR] [--zip](library:kinopt.bundle.make_bundle). The results folder is not changed. - Checked with
kinopt bundle --check <bundle folder or zip>(library:kinopt.bundle.check_bundle): the manifest against the schema, every file's sha256 and size, unlisted or missing files, the core tables, and every table's columns, dtypes and nullability againsttables.json. Plain Python, no extra dependency. - The contract is published in the repository as
contracts/kinopt/1.0/manifest.schema.json(JSON Schema 2020-12) andcontracts/kinopt/1.0/tables.json, in the same format as phoskintime-vis's contracts.
!!! warning "Inputs travel with the bundle"
Inputs up to 50 MB are copied into provenance/inputs/; larger ones are recorded by sha256 only
(kinopt bundle --max-input-mb). Do not share a bundle made from data that must stay private.
Layout
<run>.kinopt/ (or <run>.kinopt.zip: the same folder, zipped)
├── manifest.json what is in the bundle, with sha256 of every file
├── provenance/
│ ├── kinopt_results.xlsx the results workbook of the run
│ ├── run_config.json resolved config, seeds, versions, git commit, input sha256, KKT verdicts
│ ├── config_resolved.json the resolved configuration alone
│ ├── logs/*.log the run's log
│ └── inputs/input1.csv, input2.csv (copied up to the size limit)
├── tables/<table>.parquet the tables below
├── arrays/multistart_params.npy parameter vectors of all starts
└── resim/ what a viewer needs to recompute predictions (what-if)
├── kinase_series.parquet
└── model.json
A reader finds the bundle root by manifest.json (a folder, or the shortest path ending in manifest.json inside the
zip).
manifest.json
| Field | Type | Meaning |
|---|---|---|
bundle_schema |
string | "1.0": the version of this contract (a string, never a number) |
bundle_id |
string | kopt- and 16 hex digits, from the configuration and the run's time |
created_utc |
string | when the bundle was written (YYYY-MM-DDTHH:MM:SSZ); run_created_utc: when the run finished |
producer |
object | kinopt_version, git_commit, git_branch, git_dirty (null outside a git clone), repository, doi (the concept DOI), bundle_writer_version |
workflows |
array | ["local"] |
model |
object | model_id (kinopt-local), variant (the prediction transform), description |
config |
object | the full resolved RunConfig (every setting, paths as strings) |
config_sha256, parameter_order_sha256 |
string | sha256 of the configuration and of the parameter order (α then β) |
seeds |
object | start_seed (starting values), base_seed, starts (the seed of every start: base_seed + i) |
selected_start |
integer | the start written to the workbook |
inputs |
array | per input: name, sha256, bytes, copied, path (if copied), description |
files |
array | every file except the manifest: path, sha256, bytes, kind (provenance, table, array, resim); tables also table, rows, columns (name, dtype, nullable); arrays array (dtype, shape, axes) |
missing, skipped |
array | {item, reason}: what is absent and why (e.g. the analysis tables when input1 is no longer available) |
warnings |
array | {code, message}, e.g. input_not_copied |
Rules and versioning
- Null means missing. A missing value is null, never 0 and never an empty string. For example, a kinase's protein
row has
componentnull. - Dtypes are
string,int64,float64andbool(Parquet: string, int64, double, bool). - Within a minor version (1.x) columns and tables may be added; readers must ignore what they do not know. Removing, renaming or retyping a column, or changing its meaning, needs a new major version.
- Core tables are always present; any other table may be absent only if
manifest.missinglists it. - Every file is listed in the manifest; an unlisted file makes the bundle invalid.
Former app figures and script outputs → bundle tables
KinOpt 0.10 drew these figures in its Streamlit app (app/kinopt.py) and wrote these CSV files with its scripts;
0.11.0 removed both. The data of each one is now a bundle table (computed by kinopt.analysis; kinopt readout
writes the same tables as CSV). A viewer redraws them from the tables.
| Former figure or output | Bundle table | How to redraw |
|---|---|---|
| Kinase control load (bar) | kinase_load |
bar of total_load_auc_abs per kinase, top 25 |
| Kinase breadth vs control load | kinase_load |
x n_targets, y total_load_auc_abs |
| Constraint pressure vs control load | kinase_load (or bound_pressure) |
x frac_beta_at_bound, y total_load_auc_abs |
| Target control dominance distribution | target_fragility |
histogram of fragility |
| Most fragile targets | target_fragility |
bar of fragility per site, top 25 |
| Observed vs reconstructed target magnitude | observed_vs_reconstructed |
x obs_auc_abs, y pred_auc_abs, lines y = x ± band_offset, labels where labelled |
| Distribution of knockout effects (ΔAUC) | knockouts |
histogram of delta_auc_abs |
| Strongest activating / suppressing edges | knockouts |
20 largest / smallest delta_auc_abs |
| Kinase × target knockout heatmap | knockout_matrix |
rows by kinase_order, columns by target_order, value effect (null: no edge) |
| Latent kinase activity A(t) | kinase_activity |
activity vs time per kinase |
| Target reconstruction and contributions | observed, estimated, contributions, edge_load |
series vs time; contributions of the kinases with rank_in_target <= 8 |
| β-site detail of a kinase | kinase_site_detail |
filter on kinase |
| Alpha network (kinase → target), activating / suppressing edges | network_edges, network_nodes |
edge width from weight, colour from sign; node size from degree |
| EGFR control logic DAG | control_dag |
edges source → target, width weight, solid / dashed by sign |
| Latent kinase activity summary (CSV) | kinase_activity_summary |
table |
| Target dominant kinases (CSV) | target_dominance + target_fragility |
table (dominance per time window, long format) |
| Kinase load (CSV) | kinase_load |
table |
| Knockout effects (CSV) | knockouts |
table |
Curve similarity (frechet_kinopt.csv) |
curve_similarity |
table |
| What-if (changed α or β) | edge_weights, regulator_weights, resim/kinase_series, resim/model.json |
recompute transform(Σ_k α Σ_j β X(t)) |
!!! note "Sign of ΔAUC"
knockouts.delta_auc_abs is baseline − knockout of the site's |AUC|, as the former app and script computed it:
positive means removing the kinase lowers the site (an activating edge). delta_auc is knockout − baseline.
The former figures labelled the positive side "activating"; keep that convention when redrawing.
Tables
The reference below is generated from tables.json (pixi run build-contract).
tables/edge_weights.parquet (core)
Fitted kinase weights α: one row per (site, kinase) edge. α ∈ [0, 1] and Σ_k α = 1 per site.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
kinase |
string | no | ||
alpha |
float64 | no | α of the edge |
tables/regulator_weights.parquet (core)
Fitted kinase-component weights β: one row per input1 row of each kinase (component null = the protein row). Σ β = 1 per kinase.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
component |
string | yes | phosphosite of the kinase; null = protein row | |
beta |
float64 | no | ||
lower |
float64 | no | lower bound of β | |
upper |
float64 | no | upper bound of β |
tables/observed.parquet (core)
Observed site series (the input1 rows of the input2 sites, as fitted), tidy.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
entity |
string | no | protein | |
site |
string | yes | phosphosite | |
time |
float64 | no | min | |
value |
float64 | yes |
tables/estimated.parquet (core)
Estimated site series of the selected start (prediction with the run's prediction_transform), tidy.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
entity |
string | no | protein | |
site |
string | yes | phosphosite | |
time |
float64 | no | min | |
value |
float64 | yes |
tables/multistart.parquet (core)
One row per start of the multistart.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
start |
int64 | no | ||
seed |
int64 | no | ||
objective |
float64 | yes | ||
success |
bool | no | the solver converged | |
residual |
float64 | yes | largest |Σα−1|, |Σβ−1| or bound violation | |
kkt_stationarity |
float64 | yes | relative KKT stationarity residual (SLSQP's multipliers) | |
kkt_passed |
bool | no | the KKT conditions pass (default tolerances) | |
accepted |
bool | no | success, residual <= 1e-10 and kkt_passed | |
selected |
bool | no | the start written to the workbook |
tables/metrics.parquet (core)
The workbook's Summary sheet: one row per metric (numeric value or text).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
metric |
string | no | ||
value |
float64 | yes | ||
text |
string | yes |
tables/multistart_parameters.parquet
Every start's α and β (long format).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
start |
int64 | no | ||
parameter |
string | no | alpha or beta | |
protein |
string | yes | ||
psite |
string | yes | ||
kinase |
string | no | ||
component |
string | yes | β component; null for α and for a kinase's protein row | |
value |
float64 | no |
tables/convergence.parquet
Convergence of each start (from the multistart summary).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
start |
int64 | no | ||
rank |
int64 | no | ||
objective |
float64 | yes | ||
delta_from_best |
float64 | yes | ||
success |
bool | no | ||
constr_violation |
float64 | yes | ||
runtime_s |
float64 | yes | s | |
param_l2_norm |
float64 | yes |
tables/constraint_checks.parquet
Constraint check of the selected start: |Σα−1| per site, |Σβ−1| per kinase, and bound violations.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
check |
string | no | alpha_sum, beta_sum, alpha_bound, beta_bound | |
label |
string | no | ||
residual |
float64 | no | ||
tolerance |
float64 | no | ||
passed |
bool | no |
tables/kkt_conditions.parquet
KKT diagnostics of the selected start: one row per condition (stationarity, primal feasibility, dual feasibility, complementary slackness).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
condition |
string | no | ||
residual |
float64 | no | ||
tolerance |
float64 | no | ||
passed |
bool | no | ||
source |
string | yes | multipliers from the solver or estimated |
tables/kkt_multipliers.parquet
Lagrange multipliers: equality (one per sum-to-one constraint) and active lower/upper bounds.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kind |
string | no | equality, lower or upper | |
index |
int64 | no | ||
label |
string | no | ||
value |
float64 | no |
tables/prediction_check.parquet
Per site: the smallest summed prediction (before the prediction transform; the fitted prediction itself with the default "none") and the time points where it is negative. A negative phosphorylation level is not meaningful, so a flagged site should be inspected.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
min_prediction |
float64 | yes | ||
negative_points |
int64 | no | ||
negative |
bool | no | negative at any time point |
tables/reconstruction.parquet
Check that Estimated is reproduced from input1, α, β and the prediction transform (each kinase's own series).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
max_abs_error |
float64 | yes | ||
tolerance |
float64 | no | ||
reproduced |
bool | no |
tables/kinase_activity.parquet
Kinase activity a_k(t) = Σ_j β_kj X_kj(t).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
time |
float64 | no | min | |
activity |
float64 | yes |
tables/kinase_activity_summary.parquet
Per kinase: β sites, β at bounds, top component, |AUC| and peak of the activity.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
n_beta_sites |
int64 | no | ||
n_beta_at_bound |
int64 | no | ||
frac_beta_at_bound |
float64 | yes | ||
n_sites_missing |
int64 | no | ||
top_kinase_site |
string | yes | ||
top_kinase_site_share |
float64 | yes | ||
latent_auc_abs |
float64 | yes | ||
latent_peak_abs |
float64 | yes |
tables/kinase_site_detail.parquet
Per kinase component: β, at bound, importance (share of the activity's |AUC|).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
psite |
string | yes | ||
beta |
float64 | yes | ||
beta_at_bound |
bool | yes | ||
has_timeseries |
bool | no | ||
site_auc_abs |
float64 | yes | ||
importance |
float64 | yes | ||
importance_share |
float64 | yes |
tables/contributions.parquet
Contribution α_ik a_k(t) of each kinase to each site.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
kinase |
string | no | ||
time |
float64 | no | min | |
contribution |
float64 | yes |
tables/knockouts.parquet
In-silico knockouts: one kinase removed from one site (α renormalised over the remaining kinases if renormalize_alpha). delta_auc_abs = baseline − knockout (positive: an activating edge, as in the former app); delta_auc = knockout − baseline.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
kinase |
string | no | ||
renormalize_alpha |
bool | no | ||
baseline_auc_abs |
float64 | yes | ||
baseline_peak_abs |
float64 | yes | ||
knockout_auc_abs |
float64 | yes | ||
knockout_peak_abs |
float64 | yes | ||
delta_auc |
float64 | yes | ||
delta_peak |
float64 | yes | ||
delta_auc_abs |
float64 | yes | ||
delta_peak_abs |
float64 | yes | ||
ko_rank_site |
float64 | yes |
tables/knockout_matrix.parquet
Kinase × site knockout effect grid (the former heatmap), with display order and selection.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
protein |
string | no | ||
psite |
string | yes | ||
kinase_order |
int64 | no | ||
target_order |
int64 | no | ||
metric |
string | no | ||
effect |
float64 | yes | ||
selected |
bool | no |
tables/target_dominance.parquet
Dominant kinase per site and time window (overall, early, mid, late) and its share.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
window |
string | no | ||
dominant_kinase |
string | yes | ||
share |
float64 | yes | ||
n_kinases |
int64 | no | ||
n_missing_kinases |
int64 | no |
tables/target_fragility.parquet
Per site: dominant kinase, fragility (dominant share), predicted and observed |AUC| and peak.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
n_kinases |
int64 | no | ||
n_missing_kinases |
int64 | no | ||
dominant_kinase |
string | yes | ||
fragility |
float64 | yes | ||
pred_auc_abs |
float64 | yes | ||
pred_peak_abs |
float64 | yes | ||
obs_auc_abs |
float64 | yes | ||
obs_peak_abs |
float64 | yes |
tables/observed_vs_reconstructed.parquet
Observed vs reconstructed |AUC| per site, with the band and the labelled points of the former figure.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
obs_auc_abs |
float64 | yes | ||
pred_auc_abs |
float64 | yes | ||
perp_dist |
float64 | yes | ||
in_band |
bool | yes | ||
labelled |
bool | no | ||
band_threshold |
float64 | yes | ||
band_offset |
float64 | yes |
tables/edge_load.parquet
Per edge: α and the |AUC| of its contribution, and its rank within the site.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
alpha |
float64 | yes | ||
edge_load_auc_abs |
float64 | yes | ||
rank_in_target |
float64 | yes |
tables/kinase_load.parquet
Per kinase: number of targets, total load, β at bounds, activity |AUC| and peak.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
n_targets |
int64 | no | ||
total_load_auc_abs |
float64 | yes | ||
frac_beta_at_bound |
float64 | yes | ||
n_beta_at_bound |
int64 | no | ||
latent_auc_abs |
float64 | yes | ||
latent_peak_abs |
float64 | yes |
tables/bound_pressure.parquet
Per kinase: β components at the lower or upper bound.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
n_beta_sites |
int64 | no | ||
n_beta_at_bound |
int64 | no | ||
frac_beta_at_bound |
float64 | yes | ||
n_beta_at_lower |
int64 | no | ||
n_beta_at_upper |
int64 | no |
tables/network_edges.parquet
Kinase → site network edges with α, knockout effect, sign and drawing weight (the former network views).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
target |
string | no | ||
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
alpha |
float64 | yes | ||
delta_auc_abs |
float64 | yes | ||
sign |
float64 | yes | ||
weight |
float64 | yes | ||
kinase_is_dominant |
bool | yes |
tables/network_nodes.parquet
Network nodes (kinases and sites) with degree.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
node |
string | no | ||
kind |
string | no | ||
protein |
string | yes | ||
psite |
string | yes | ||
is_dominant |
bool | yes | ||
degree |
int64 | no |
tables/control_dag.parquet
Protein → site → kinase control graph from the knockouts (the former EGFR DAG); empty if the protein has no knockout effects.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
source |
string | no | ||
target |
string | no | ||
source_kind |
string | no | ||
target_kind |
string | no | ||
psite |
string | yes | ||
kinase |
string | yes | ||
weight |
float64 | yes | ||
sign |
float64 | yes | ||
delta_auc_abs |
float64 | yes |
tables/curve_similarity.parquet
Discrete Fréchet distance between observed and estimated series per site.
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
protein |
string | no | protein of the phosphosite (input2 GeneID) | |
psite |
string | yes | phosphosite (input2 Psite) | |
row_index |
int64 | no | ||
frechet |
float64 | yes | ||
has_nan |
bool | no | ||
frechet_rank |
int64 | yes | ||
frechet_bucket |
string | yes |
resim/kinase_series.parquet
The input1 series of every kinase (scaled as in the run): X_kj(t).
| Column | dtype | Nullable | Unit | Description |
|---|---|---|---|---|
kinase |
string | no | ||
component |
string | yes | null = protein row | |
time |
float64 | no | min | |
value |
float64 | yes |
arrays/multistart_params.npy
Parameter vectors of all starts, shape (start, parameter); parameter order as in edge_weights then regulator_weights. dtype float64, axes start, parameter.