Skip to content

Fix forward phosphosite ODE panel#68

Merged
bibymaths merged 1 commit into
globalfrom
codex/fix-phosphosite-state-dynamics-panel
Jun 12, 2026
Merged

Fix forward phosphosite ODE panel#68
bibymaths merged 1 commit into
globalfrom
codex/fix-phosphosite-state-dynamics-panel

Conversation

@bibymaths

Copy link
Copy Markdown
Owner

Motivation

  • The forward-simulation phosphosite panel was plotting inflated FC-like values instead of the raw ODE phosphosite state, so the panel must read directly from the ODE state vector rather than using pred_fc/simulate_and_measure()/pipeline exports.
  • The forward simulations themselves should continue to be generated via simulate_until_steady() for both WT and KO.

Description

  • Added extract_phosphosite_states_from_Y to read phosphosite state trajectories directly from the ODE state arrays Y_wt/Y_ko using idx.offset_y, idx.n_sites, and idx.sites, with optional safe t0 normalization.
  • Added _safe_min_max helper used by a small debug expander to report raw WT/KO and plotted WT/KO min/max values for the selected protein.
  • Plumbed a dedicated checkbox Normalize forward phosphosite states to t0 that controls only the 4th panel and sets the y-axis label to either Raw phosphosite ODE state or Phosphosite ODE state normalized to t0.
  • Reworked the 4th (phosphosite state) panel to plot the values from extract_phosphosite_states_from_Y and explicitly avoid using wt_pho, ko_pho, pred_phospho_picked.csv, pred_fc, or simulate_and_measure() for this panel, while keeping the first three forward panels (mRNA, protein, signaling S) and the Data Fit Inspector unchanged.
  • Only scripts/compare_mechanisms.py was modified; no networkmodel/ modules were changed.

Testing

  • Ran python -m py_compile scripts/compare_mechanisms.py which succeeded.
  • Ran git diff --check / basic repository checks which showed no whitespace or diff errors.

Codex Task

@bibymaths bibymaths self-assigned this Jun 12, 2026
@bibymaths bibymaths merged commit 98769f7 into global Jun 12, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant