This repository contains all MATLAB codes used to generate the figures in the manuscript, "Toward Single-Cell Control: Noise-Robust Perfect Adaptation in Biomolecular Systems". The codes are written in MATLAB R2024a. Pre-simulated results, named 'noiseRPA.zip', can be found in realease v1.0.
-
Fig1.m- Reproduces panels Fig. 1b, c, e, f, and g.
- By default, it plots the green lines in Fig. 1e, f.
- Setting
mu2 = theta2 = eta2 = d2 = 0produces the blue lines in Fig. 1c, d. - Setting all of
mu1, theta1, eta1, k1, mu2, theta2, eta2, d2 = 0andp1 = 4.5produces the gray lines in Fig. 1c, d, e, f.
-
Fig2a.m- Reproduces Fig. 2a.
-
Fig2b.m- Generates the data for the plot in Fig. 2b.
- Running the script produces a CSV file (e.g.,
Fig2b_fano.csv) with four rows, each corresponding to a different lines in Fig. 2b.
-
Fig2c.m- Produces the heatmap for Fig. 2c.
- Requires the presence of a file named
stochastic_simulation_1000in the same directory. - Running this script saves a heat matrix file named
Fig2c_heatmap_ff.mat.
-
Fig2c_drawing.m- Visualizes the heatmap matrices generated by the
Fig2c.mscripts.
- Visualizes the heatmap matrices generated by the
-
Pre-simulated Result Folders
Fig2c_mn: Results for blue lines in Fig. 2c
-
Fig3a_simulation.m- Simulates data for the heatmap in Fig. 3a.
- Requires the file
stochastic_simulation_1000in the same directory. - Generates 9 files named
heatmap_ff_eta1_{eta1}_eta2_{eta2}.mat, saved in theFig3asubfolder.
-
Fig3b_simulation.m- Simulates data for the heatmap in Fig. 3b.
- Requires the file
stochastic_simulation_1000. - Generates 9 files named
heatmap_ff_k1_{k1}_d2_{d2}.mat, saved in theFig3bsubfolder.
-
Fig3c_simulation.m- Simulates data for the heatmap in Fig. 3c.
- Requires the file
stochastic_simulation_on2. - Saves the matrix as
Fig3c_heatmap_ff.mat.
-
Fig3d_simulation.m- Simulates data for the heatmap in Fig. 3d.
- Requires the file
stochastic_simulation_on3. - Saves the matrix as
Fig3d_heatmap_ff.mat.
-
Fig3_drawing.m- Visualizes the heatmap matrices generated by the
_simulation.mscripts.
- Visualizes the heatmap matrices generated by the
-
Pre-simulated Result Folders
Fig3a_mn: Results for blue lines in Fig. 3aFig3b_mn: Results for blue lines in Fig. 3bFig3c_mn: Results for blue lines in Fig. 3cFig3d_mn: Results for blue lines in Fig. 3d
-
Fig4_telegraph.m- Simulates and draws plots in Fig. 4b-c.
- Generates 3 files named
telegraph.mat,telegraph_MC.mat,telegraph_MC_NC.mat.
-
Fig4_toggle_switch.m- Simulates and draws plots in Fig. 4e-f.
- Generates 3 files named
toggle_switch.mat,toggle_switch_MC.mat,toggle_switch_MC_NC.mat.
-
Pre-simulated Result Folders
telegraph: Simulation results of the telegraph model used in Fig. 4b-ctelegraph_MC: Simulation results of the telegraph model with MC used in Fig. 4b-ctelegraph_MC_NC: Simulation results of the telegraph model with MC and NC used in Fig. 4b-ctoggle_switch: Simulation results of the toggle_switch model used in Fig. 4e-ftoggle_switch_MC: Simulation results of the toggle_switch model with MC used in Fig. 4e-ftoggle_switch_MC_NC: Simulation results of the toggle_switch model with MC and NC used in Fig. 4e-f
-
Fig5bc.m- Plots the histograms shown in Fig. 5b, c.
-
Fig5ef.m- Plots the histograms shown in Fig. 5e, f.
-
FigS1.m- Simulates and draws plots in Fig. S1b.
-
Pre-simulated Result File
FigS1_converged_NC.csv: Converged value for the initial condition of simulation
-
FigS2.m- Simulates and draws plots in Fig. S2.
-
Pre-simulated Result Files
FigS2_noAW_mean.mat: Simulated mean trajectory without anti-windup in Fig. S2a, bFigS2_noAW_variance.mat: Simulated variance trajectory without anti-windup in Fig. S2a, bFigS2_AW_mean.mat: Simulated mean trajectory with anti-windup in Fig. S2c, dFigS2_AW_variance.mat: Simulated variance trajectory with anti-windup in Fig. S2c, d
-
FigS3.m- Simulates and draws plots in Fig. S3.
-
Pre-simulated Result Files
FigS3_mu2_8.7_mean.mat: Simulated mean trajectory where mu = 8.7FigS3_mu2_8.7_sc.mat: Simulated single-cell trajectory where mu = 8.7FigS3_mu2_9.3_mean.mat: Simulated mean trajectory where mu = 9.3FigS3_mu2_9.3_sc.mat: Simulated single-cell trajectory where mu = 9.3FigS3_mu2_9.9_mean.mat: Simulated mean trajectory where mu = 9.9FigS3_mu2_9.9_sc.mat: Simulated single-cell trajectory where mu = 9.9FigS3_mu2_10.5_mean.mat: Simulated mean trajectory where mu = 10.5FigS3_mu2_10.5_sc.mat: Simulated single-cell trajectory where mu = 10.5
-
FigS4.m- Simulates and draws plots in Fig. S4.
-
Pre-simulated Result Files
FigS4_per_20_mean.mat: Simulated mean trajectory with 20-fold perturbationFigS4_per_20_variance.mat: Simulated variance trajectory with 20-fold perturbationFigS4_per_50_mean.mat: Simulated mean trajectory with 50-fold perturbationFigS4_per_50_variance.mat: Simulated variance trajectory with 50-fold perturbationFigS4_per_100_mean.mat: Simulated mean trajectory with 100-fold perturbationFigS4_per_100_variance.mat: Simulated variance trajectory with 100-fold perturbationFigS4_per_10000_mean.mat: Simulated mean trajectory with 10000-fold perturbationFigS4_per_10000_variance.mat: Simulated variance trajectory with 10000-fold perturbation
-
FigS6b_NC.m- Simulates and draws plots of the Fano factor trajectory of the network with MC and NC in Fig. S6b.
-
FigS6b_origin.m- Simulates and draws plots of the Fano factor trajectory of the network with aPI controller in Fig. S6b.
-
FigS6d_NC.m- Simulates and draws plots of the Fano factor trajectory of the network with MC and NC in Fig. S6d.
-
FigS6d_origin.m- Simulates and draws plots of the Fano factor trajectory of the network with negative action in Fig. S6d.
-
FigS6f_NC.m- Simulates and draws plots of the Fano factor trajectory of the network with MC and NC in Fig. S6f.
-
FigS6f_origin.m- Simulates and draws plots of the Fano factor trajectory of the network with sensor-actuated AIF in Fig. S6f.
-
FigS7b.m- Simulates and draws plots of the Fano factor trajectory in Fig. S7.
-
Servers
- Servers are required for faster simulation
Fig2b.m,Fig2c.m,Fig3a_simulation.m,Fig3b_simulation.m,Fig3c_simulation.m,Fig3d_simulation.m,FigS2.m,FigS3.m,FigS4.m,FigS7.m, and all files in theFigure S6folder were simulated on an Intel Xeon Gold 6348 CPU.
-
MATLAB R2024a
- Install time for MATLAB differs by the versions and computing devices, but it typically takes less than 1 hour
-
The following simulation files must be present in the relevant folders:
stochastic_simulation_1000stochastic_simulation_on2stochastic_simulation_on3
-
The estimated simulation time: ("normal" computer here means Intel Core i7-6700 CPU):
Fig1.m: (with normal computer) < 10 minutes for original network and original network with MC; 1 ~ 2 hours for original network with MC and NCFig2a.m: (with normal computer) less than 20 minutesFig2b.m: (with server) 2 hoursFig2c.m: (with server) 7 hoursFig3a_simulation.m: (with server) 3-4 daysFig3b_simulation.m: (with server) 3-4 daysFig3c_simulation.m: (with server) 7 hoursFig3d_simulation.m: (with server) 7 hoursFig4_telegraph.m: (with server) 5 hoursFig4_toggle_switch.m: (with server) 5 hoursFigS1.m: (with normal computer) less than 10 minutesFigS2.m: (with server) 7 hoursFigS3.m: (with server) 2 hoursFigS4.m: (with server) 1-2 days- Files in
Figure S6: (with server) 3 hours for files that end with '_origin', 1 day for files that end with '_NC' FigS7.m: (with server) 1 hour