Skip to content

PEtab-aligned config redesign: explicit experiments/conditions/data (retire filename→suffix linkage) #423

@wshlavacek

Description

@wshlavacek

Design captured in ADR-0028 (docs/adr/0028-petab-aligned-config-explicit-experiments.md, Status: Proposed, commit c1279e3). This is the config-language sibling of the PEtab exporter work (#407 umbrella, #422 exporter chunk, #420 BnglModel oracle).

Problem

PyBNF links a dataset to the simulation it scores against implicitly, through filenames: every .exp stem must equal a BNGL action's Suffix or PyBNF errors (config.py:764, "Action not specified for X.exp"). Consequences:

Proposed design (1:1 with PEtab v2)

Four explicit label: concepts in the .conf, each mapping to a PEtab v2 object, with links stated rather than filename-derived:

conf keyword meaning PEtab v2
model: one or more model files (multi-model OK) Model(s)
condition: (+ perturbations:) a named set of parameter overrides (= today's Mutant) Condition
experiment: a named simulation; applies a condition: (default wildtype); carries its data: Experiment
the experiment's data: files measured points; multiple files = replicates Measurements

Example:

model: egfr.bngl
condition: dimer_dead, perturbations: kdimer = 0
experiment: egf_high,    data: high_wt_r1.exp, high_wt_r2.exp
experiment: egf_high_dd, condition: dimer_dead, data: high_dd.exp

Key decisions

  • Simulation times/doses are derived from the data (PEtab-style). A consequence: the BNGL begin actions block is no longer needed for fitting — PyBNF synthesizes the simulate/parameter_scan/bifurcate from the experiment options + the data's independent-variable values; the experiment name replaces the Suffix as the simulation's identity.
  • Observables still inferred from .exp column headers, with an optional observable: x, column: y override.
  • Omissions allowed wherever unambiguous (model: on a condition/experiment when there's one model; condition: on a wildtype experiment; type: when inferable from the indep-var header).
  • Backward compatible: the legacy syntax (model = … : …, mutant = …, filename→suffix) is syntactically distinct and keeps its current meaning; a job uses one style or the other.

Implementation outline

  1. Parser grammar for the new label: lines (pyparsing), alongside the legacy grammar.
  2. Config loading: build conditions/experiments/data from the new keys.
  3. Action synthesis: generate the BNG action from experiment options + data-derived times/doses.
  4. Teach the exporter (PEtab v2 exporter: conditions/experiments chunk (mutants→conditions, suffix→experiments, dose-response) #422) the new syntax (turns export into transcription).

Loose ends to settle (parked in the ADR)

See ADR-0028 for full detail and the considered/rejected alternatives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions