Figure 6: Calcium oscillation

Figure 6: Calcium oscillation#

using OrdinaryDiffEq
using ModelingToolkit
using MitochondrialDynamics
using MitochondrialDynamics: second, μM, mV, mM, Hz, minute, hil
import PythonPlot as plt
plt.matplotlib.rcParams["font.size"] = 14
14
@named sys = make_model()
@unpack Ca_c, GlcConst, kATPCa, kATP = sys
alg = TRBDF2()
TRBDF2(; linsolve = nothing, nlsolve = OrdinaryDiffEqNonlinearSolve.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}}(1//100, 10, 1//5, 1//5, false, true, 0//1), precs = DEFAULT_PRECS, smooth_est = true, extrapolant = linear, controller = PI, step_limiter! = trivial_limiter!, autodiff = ADTypes.AutoForwardDiff(),)

Calcium oscillation function

function cac_wave(; ca_base = 0.09μM, ca_act = 0.25μM, n=4, katp=25, amplitude=0.5, period=2minute)
    @variables t Ca_c(t) ATP_c(t) ADP_c(t)
    @parameters (RestingCa=ca_base, ActivatedCa=ca_act, NCac=n, KatpCac=katp)
    x = 5 * ((t / period) % 1.0) ## An oscillating function
    w = (x * exp(1 - x))^4  ## Scale from 0 to 1
    caceq = Ca_c ~ RestingCa + ActivatedCa * hil(ATP_c, KatpCac * ADP_c, NCac) * (1 + amplitude * (2w-1))
    return caceq
end

@named sysosci = make_model(; caceq=cac_wave(amplitude=0.8))
\[\begin{split} \begin{align} \frac{\mathrm{d} \mathtt{NADH\_m}\left( t \right)}{\mathrm{d}t} &= \frac{\mathtt{J\_DH}\left( t \right) + \mathtt{J\_NADHT}\left( t \right) - \mathtt{J\_O2}\left( t \right)}{\mathtt{V\_MTX}} - \mathtt{kNADHm} \mathtt{NADH\_m}\left( t \right) \\ \frac{\mathrm{d} \mathtt{NADH\_c}\left( t \right)}{\mathrm{d}t} &= \frac{ - \mathtt{J\_LDH}\left( t \right) - \mathtt{J\_NADHT}\left( t \right) + \mathtt{J\_GPD}\left( t \right)}{\mathtt{V\_I}} - \mathtt{kNADHc} \mathtt{NADH\_c}\left( t \right) \\ \frac{\mathrm{d} \mathtt{Ca\_m}\left( t \right)}{\mathrm{d}t} &= \frac{\mathtt{F\_M} \left( \mathtt{J\_MCU}\left( t \right) - \mathtt{J\_NCLX}\left( t \right) \right)}{\mathtt{V\_MTX}} \\ \frac{\mathrm{d} \mathtt{\Delta{\Psi}m}\left( t \right)}{\mathrm{d}t} &= \frac{ - 2 \mathtt{J\_MCU}\left( t \right) + \mathtt{J\_HR}\left( t \right) - \mathtt{J\_HL}\left( t \right) - \mathtt{J\_HF}\left( t \right) - \mathtt{J\_ANT}\left( t \right)}{\mathtt{C\_MIT}} \\ \frac{\mathrm{d} \mathtt{G3P}\left( t \right)}{\mathrm{d}t} &= \frac{ - \mathtt{J\_GPD}\left( t \right) + 2 \mathtt{J\_GK}\left( t \right)}{\mathtt{V\_I}} - \mathtt{kG3P} \mathtt{G3P}\left( t \right) \\ \frac{\mathrm{d} \mathtt{Pyr}\left( t \right)}{\mathrm{d}t} &= \frac{ - \mathtt{J\_LDH}\left( t \right) - \mathtt{J\_PDH}\left( t \right) + \mathtt{J\_GPD}\left( t \right)}{\mathtt{V\_I} + \mathtt{V\_MTX}} - \mathtt{kPyr} \mathtt{Pyr}\left( t \right) \\ \frac{\mathrm{d} \mathtt{AEC}\left( t \right)}{\mathrm{d}t} &= \frac{\frac{\mathtt{J\_ANT}\left( t \right) + 2 \mathtt{J\_GPD}\left( t \right) - \mathtt{ATPstiochGK} \mathtt{J\_GK}\left( t \right)}{\mathtt{V\_I}} + \left( - \mathtt{kATP} - \mathtt{kATPCa} \mathtt{Ca\_c}\left( t \right) \right) \mathtt{ATP\_c}\left( t \right)}{\mathtt{{\Sigma}Ac}} \\ \frac{\mathrm{d} \mathtt{x2}\left( t \right)}{\mathrm{d}t} &= - \mathtt{tipside}\left( t \right) + \mathtt{tiptip}\left( t \right) \\ \frac{\mathrm{d} \mathtt{x3}\left( t \right)}{\mathrm{d}t} &= \mathtt{tipside}\left( t \right) \end{align} \end{split}\]
tend = 4000.0
ts = range(tend-480, tend; length=201)
prob = ODEProblem(sysosci, [], tend, [GlcConst => 10mM])
sol = solve(prob, alg, saveat=ts)
retcode: Success
Interpolation: 1st order linear
t: 201-element Vector{Float64}:
 3520.0
 3522.4
 3524.8
 3527.2
 3529.6
 3532.0
 3534.4
 3536.8
 3539.2
 3541.6
    ⋮
 3980.8
 3983.2
 3985.6
 3988.0
 3990.4
 3992.8
 3995.2
 3997.6
 4000.0
u: 201-element Vector{Vector{Float64}}:
 [0.10663942067028662, 0.0031096638436575196, 0.0008341286004603667, 0.12217066557734434, 0.005308713478308379, 0.0347420208374892, 0.9825587512862737, 0.21294788872795603, 0.030897035253773325]
 [0.10714841004423994, 0.003120687712885487, 0.0008281675403223046, 0.12422889837596414, 0.005313918705401645, 0.034921238826028385, 0.9835892532965919, 0.21323625524936005, 0.03098306707878187]
 [0.10776360374232034, 0.0031338299855568383, 0.0008189947938813866, 0.1265407557130925, 0.005319558528096713, 0.035143327552254, 0.98458794987544, 0.21344721505835126, 0.0310475470831511]
 [0.10847369630390168, 0.0031488482628467514, 0.000806556274246091, 0.12901679993659, 0.005325394741882014, 0.03540680089118072, 0.9855080223616834, 0.21358169800015936, 0.03109046039375044]
 [0.10926117651063201, 0.0031653922502123924, 0.0007908814552254434, 0.1315728070225459, 0.005331240509843115, 0.03570854026720898, 0.986332850076165, 0.2136427041532038, 0.031112560581763198]
 [0.11010818397362396, 0.00318310457725459, 0.0007720033421564158, 0.13412333947934205, 0.005336906558618745, 0.03604534231963337, 0.9870456911843116, 0.21363329011888832, 0.031114616907014104]
 [0.11093622465365856, 0.0032003853546438018, 0.0007506711021660663, 0.13639111527473666, 0.005341825242054367, 0.0363976633094013, 0.987615752889272, 0.21356720057314935, 0.03110038928243605]
 [0.11169214980741834, 0.0032161011017722216, 0.0007277297840293536, 0.1382515363081439, 0.005345758821128557, 0.03674657801433997, 0.9880449533140506, 0.21345706473458584, 0.03107341032042545]
 [0.11237167813508671, 0.0032300985901936585, 0.000703605060077327, 0.13976356502428092, 0.0053488430785311215, 0.037083850413154866, 0.9883572505046251, 0.21330823628188642, 0.031035210714797295]
 [0.11296715670289904, 0.0032422418318505974, 0.0006792783096881231, 0.1410047757503271, 0.005351291414868305, 0.0373963515239888, 0.9885931678276655, 0.21313090025279008, 0.03098870458801088]
 ⋮
 [0.10601310280321745, 0.003093174913448829, 0.00075806482901094, 0.11688688566724727, 0.005294452440267086, 0.035033180913123206, 0.9791150636664795, 0.20864871577238317, 0.029702690763188884]
 [0.10568018457194021, 0.0030865628941414915, 0.0007838687378637778, 0.1163087391890749, 0.005292869574679015, 0.03473562556609317, 0.9787232393311082, 0.20928757169226997, 0.029872781672770153]
 [0.10550542329856145, 0.003083320879637519, 0.0008034756023364339, 0.1161679343927652, 0.005292523332716906, 0.03455037672727766, 0.9786618691711318, 0.20992438608762595, 0.030044672336875085]
 [0.10546686447906667, 0.003082918012205451, 0.0008176535533854398, 0.11642747177000187, 0.005293283708986368, 0.03445657561902015, 0.9788894536855056, 0.21054657521974254, 0.03021489662464479]
 [0.10552520972450968, 0.003084576451804134, 0.0008276673307120769, 0.11698358255596737, 0.005294867167324792, 0.03442353329147199, 0.9793271613315738, 0.21113474102056554, 0.030377931170473958]
 [0.10567329679284374, 0.0030881268608006886, 0.0008339070155469256, 0.11783447266523896, 0.005297245506715368, 0.03444248321540955, 0.9799545679260234, 0.21168137726739886, 0.03053151994454243]
 [0.10590664890125058, 0.0030934648307902033, 0.000836957910315346, 0.11897979988976469, 0.00530036228761857, 0.0345031128883315, 0.9807205453698068, 0.2121723891343283, 0.0306712161546039]
 [0.10622669980853508, 0.0031006107444890327, 0.0008370004891491377, 0.1204226907653777, 0.005304192932148311, 0.03460287449460454, 0.9815984081448502, 0.21260088039900854, 0.03079476544333945]
 [0.10663628175046654, 0.003109610724429953, 0.0008340721185626885, 0.1221689523820627, 0.0053087306727170845, 0.03474161699283518, 0.9825739970835731, 0.2129630387064513, 0.030900883108718705]
function plot_fig5(sol, figsize=(10, 10))
    ts = sol.t
    tsm = ts ./ 60
    @unpack Ca_c, Ca_m, ATP_c, ADP_c, ΔΨm, degavg, J_ANT, J_HL = sys
    fig, ax = plt.subplots(5, 1; figsize)

    ax[0].plot(tsm, sol[Ca_c * 1000], label="Cyto")
    ax[0].plot(tsm, sol[Ca_m * 1000], label="Mito")
    ax[0].set_title("a", loc="left")
    ax[0].set_ylabel("Calcium (μM)", fontsize=12)
    ax[0].legend(loc="center left")

    ax[1].plot(tsm, sol[ATP_c / ADP_c])
    ax[1].set_title("b", loc="left")
    ax[1].set_ylabel("ATP:ADP (ratio)", fontsize=12)

    ax[2].plot(tsm, sol[ΔΨm * 1000])
    ax[2].set_title("c", loc="left")
    ax[2].set_ylabel("ΔΨm (mV)", fontsize=12)

    ax[3].plot(tsm, sol[degavg], label="Average node degree")
    ax[3].set_title("d", loc="left")
    ax[3].set_ylabel("a.u.")
    ax[3].legend(loc="center left")

    ax[4].plot(tsm, sol[J_ANT], label="ATP export")
    ax[4].plot(tsm, sol[J_HL], label="H leak")
    ax[4].set_title("e", loc="left")
    ax[4].set_ylabel("Rate (mM/s)")
    ax[4].set(xlabel="Time (minute)")
    ax[4].legend(loc="center left")

    for i in 0:4
        ax[i].grid()
        ax[i].set_xlim(tsm[begin], tsm[end])
    end

    plt.tight_layout()
    return fig
end
plot_fig5 (generic function with 2 methods)
fig5 = plot_fig5(sol)
_images/4ba0eeaa3b080fd4b9eb21ebbfa5c8827608a7a752c9723c930658851aa9c77d.png

Export figure

exportTIF(fig5, "Fig6-ca-oscillation.tif")
Python: None

Tuning ca-dependent ATP consumption rate (kATPCa) kATPCa : 90 -> 10

prob2 = ODEProblem(sysosci, [], tend, [GlcConst => 10mM, kATPCa=>10Hz/mM, kATP=>0.055Hz])
sol2 = solve(prob2, alg, saveat=ts)
plot_fig5(sol2)
_images/75a77db7196a20942d608f62955cf820f72ba59f18396f7279fed4ead2081a79.png

kATPCa : 90 -> 0.1

prob4 = ODEProblem(sysosci, [], tend, [GlcConst => 10mM, kATPCa=>0.1Hz/mM, kATP=>0.06Hz])
sol4 = solve(prob4, alg, saveat=ts)
plot_fig5(sol4)
_images/2eeb7b396376b97b7a9c09897ff4a72e29745848180de02824aaedef6c46a931.png

This notebook was generated using Literate.jl.