Step 3 – ODE Modelling of Derepression and Repression¶
Scripts:
step_2_simulate_derepression.pystep_3_simulate_repression.py
Biological question¶
Can a simple ODE model explain the observed dynamics of derepression and repression, and what delays and decay rates does it imply?
We want a mechanistic description of:
- how target gene expression responds over time to changes in repressor,
- using parameters already measured (half-times, Hill K and n).
Inputs¶
parameters/half_times_upregulation.csvparameters/half_times_downregulation.csvparameters/Hill_parameters.csv- Time-course
.fcsdata for:- derepression (repressor going down),
- repression (repressor going up),
- Configuration of which construct/experiment to treat as “reference” for α.
Model¶
We model:
R(t)– repressor level (e.g. BFP proxy),Y(t)– mCherry output (target gene).
1. Repressor dynamics¶
From Step 1, we have effective half-times t₁/₂↑ and t₁/₂↓. We approximate:
- For upregulation: [ \frac{dR}{dt} = k_\text{up} (R_\text{max} - R) ]
- For downregulation: [ \frac{dR}{dt} = -k_\text{down} R ]
with k = ln(2) / t₁/₂.
In practice, R(t) is often reconstructed directly from data or parameterised implicitly.
2. Target dynamics¶
We assume:
- mCherry production is a Hill function of repressor: [ f(R) = \frac{1}{1 + (R/K)^n} ]
- mCherry decays with rate α.
Basic ODE:
\[
\frac{dY}{dt} = \beta f(R(t - \Delta t)) - \alpha Y
\]
where:
Δt– delay between repressor change and effect on target,β– effective production rate.
α is shared across constructs and estimated from a reference time course.
Derepression (Step 2)¶
- Use derepression time-course:
- repressor drops after dTAG addition,
- target recovers.
Procedure:
- Fix Hill K and n from the dose–response fit.
- Choose a reference construct/time course to fit α (mCherry degradation rate).
- For each construct:
- integrate ODE for candidate delays Δt over a time grid,
- compare simulated Y(t) to measured fold-change curve,
- pick Δt that minimises MAE.
- Save per-construct delays for derepression.
Outputs:
parameters/alphamcherry.csvparameters/delays_derepression.csv
Repression (Step 3)¶
Similar logic, but now:
- repressor rises after dTAG withdrawal,
- target decays.
Procedure:
- Fix α and Hill parameters.
- For each construct, scan Δt to best match mCherry time course under repression.
- Save per-construct delays.
Outputs:
parameters/delays_repression.csv- ODE fit plots (obs vs simulated) in
plots/ode/.
How to interpret¶
- α (mCherry degradation rate) sets the baseline turnover of the reporter.
- Larger
Δtvalues indicate:- additional layers between repressor and reporter (e.g. chromatin or network delays),
- or slower establishment of the effective repression state.
Comparing Δt for derepression vs repression helps distinguish:
- immediate mechanisms (e.g. CasRx RNA degradation),
- slower chromatin rewiring (e.g. hHDAC4 vs KRAB),
- and potential short-term epigenetic memory.