Skip to content

Commit

Permalink
caffeine-effects
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Nov 21, 2024
1 parent 830ebaf commit 20a0841
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ chapters:
- file: effects-bcl
- file: iso-effects
- file: ros-effects
- file: caffeine-effects
25 changes: 17 additions & 8 deletions docs/caffeine-effects.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# # Caffeine Effects
# Caffeine increase RyR opening sensitivity to luminal and subspace calcium
# In this model, we decrease the mid saturation sub-SR calcium concentration for the opeing rate
# In this model, we decrease the mid saturation sub-SR calcium concentration for the opening rate
using ModelingToolkit
using OrdinaryDiffEq
using DiffEqCallbacks
Expand All @@ -20,25 +20,34 @@ function add_coffee_affect!(integrator)
end

@unpack Istim = sys
callback = CallbackSet(build_stim_callbacks(Istim, stimend; period=1, starttime=stimstart), PresetTimeCallback(200.0, add_coffee_affect!))
callback = build_stim_callbacks(Istim, stimend; period=1, starttime=stimstart)
# Add caffeine at t = 200
callback_caf = CallbackSet(build_stim_callbacks(Istim, stimend; period=1, starttime=stimstart), PresetTimeCallback(200.0, add_coffee_affect!))

#---
sol = solve(prob, alg; callback, abstol=1e-6, reltol=1e-6)
sol_caf = solve(prob, alg; callback = callback_caf, abstol=1e-6, reltol=1e-6)

#---
plot(sol, idxs=sys.vm*1000, tspan=(199, 210), title="Action potential", lab=false)
plot(sol, idxs=sys.vm*1000, title="Action potential", lab="Ctl")
plot!(sol_caf, idxs=sys.vm*1000, lab="Caf", tspan=(199, 210), ylabel="Voltage (mV)")

#---
plot(sol, idxs=sys.Cai_sub_SR*1E6, tspan=(195, 210), title="Calcium transient", lab=false, ylabel="Subspace calcium (nM)")
plot(sol, idxs=sys.Cai_sub_SR*1E6, title="Calcium transient (During caffeine addition)", lab="Ctl")
plot!(sol_caf, idxs=sys.Cai_sub_SR*1E6, tspan=(195, 210), lab="Caf", ylabel="Subspace calcium (nM)")

#---
plot(sol, idxs=sys.Cai_sub_SR*1E6, tspan=(295, 300), title="Calcium transient", lab=false, ylabel="Subspace calcium (nM)")
plot(sol, idxs=sys.Cai_sub_SR*1E6, title="Calcium transient (After caffeine addition)", lab="Ctl", ylabel="Subspace calcium (nM)")
plot!(sol_caf, idxs=sys.Cai_sub_SR*1E6, tspan=(295, 300), lab="Caf")

#---
plot(sol, idxs=[sys.CaNSR*1E3, sys.CaJSR*1E3], tspan=(195, 210), title="SR Calcium", lab=["NSR" "JSR"], ylabel="SR calcium (μM)")
plot(sol, idxs=sys.CaJSR*1E3, title="SR Calcium (During caffeine addition)", lab="Ctl", ylabel="SR calcium (μM)")
plot!(sol_caf, idxs=sys.CaJSR*1E3, tspan=(195, 210), lab="Caf", ylims=(200, 850))

#---
plot(sol, idxs=sys.CaMKAct, title="Active CaMKII")
plot(sol, idxs=sys.Jrel, title="RyR Ca flux", lab="Ctl")
plot!(sol_caf, idxs=sys.Jrel, tspan=(195, 210), lab="Caf", ylabel="μM/ms")

#---
plot(sol, idxs=sys.CaMKAct, tspan=(195, 210), title="Active CaMKII")
plot(sol, idxs=sys.CaMKAct, title="Active CaMKII", lab="Ctl")
plot!(sol_caf, idxs=sys.CaMKAct, lab="Caf")

0 comments on commit 20a0841

Please sign in to comment.