Skip to content

Commit

Permalink
PNG output
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Mar 4, 2025
1 parent a8b2bdb commit fe934f6
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions docs/dox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using ProgressLogging
using OrdinaryDiffEq
using ModelingToolkit
using Plots
using DisplayAs
using DisplayAs: PNG
using ECMEDox
using ECMEDox: second, mM, Hz, μM
Plots.default(lw=2, size=(600, 600))
Expand Down Expand Up @@ -42,42 +42,46 @@ prob2 = ODEProblem(sys, u0, tend, [DOX => 250μM, ρC3 => 500μM])
idxs = (sys.t/1000, sys.vm)

#---
plot(sol0, idxs=idxs, lab="DOX=250", title="PM potential")
plot(sol0, idxs=idxs, lab="DOX=250", title="PM potential") |> PNG

#---
plot(sol1, idxs=idxs, lab="DOX=250, ρC4=500", title="PM potential")
plot(sol1, idxs=idxs, lab="DOX=250, ρC4=500", title="PM potential") |> PNG

#---
plot(sol2, idxs=idxs, lab="DOX=250, ρC3=500", title="PM potential")
plot(sol2, idxs=idxs, lab="DOX=250, ρC3=500", title="PM potential") |> PNG

#---
idxs = (sys.t/1000, [sys.atp_i / sys.adp_i])
plot(sol0, idxs=idxs, label="DOX=250", title="ATP:ADP")
plot!(sol1, idxs=idxs, label="C4 500uM")
plot!(sol2, idxs=idxs, label="C3 500uM")
fig = plot(sol0, idxs=idxs, label="DOX=250", title="ATP:ADP")
plot!(fig, sol1, idxs=idxs, label="C4 500uM")
plot!(fig, sol2, idxs=idxs, label="C3 500uM")
fig |> PNG

#---
@unpack Q_n, Qdot_n, QH2_n, QH2_p, Qdot_p, Q_p, fes_ox, fes_rd, cytc_ox, cytc_rd = sys
plot(sol0, idxs=[Q_n, Qdot_n, QH2_n, QH2_p, Qdot_p, Q_p], title="Q cycle", legend=:right)
plot(sol0, idxs=[Q_n, Qdot_n, QH2_n, QH2_p, Qdot_p, Q_p], title="Q cycle", legend=:right) |> PNG

#---
idxs = (sys.t/1000, sys.vO2 + sys.vROS)
plot(sol0, idxs=idxs, label="DOX=250", title="Oxygen consumption")
plot!(sol1, idxs=idxs, label="C4 500")
plot!(sol2, idxs=idxs, label="C3 500", xlabel="Time (s)", ylabel="vO2 (μM/ms)")
fig = plot(sol0, idxs=idxs, label="DOX=250", title="Oxygen consumption")
plot!(fig, sol1, idxs=idxs, label="C4 500")
plot!(fig, sol2, idxs=idxs, label="C3 500", xlabel="Time (s)", ylabel="vO2 (μM/ms)")
fig |> PNG

#---
idxs = (sys.t/1000, sys.vROS / (sys.vO2 + sys.vROS))
plot(sol0, idxs=idxs, label="DOX=250", title="ROS vO2 shunt fraction")
plot!(sol1, idxs=idxs, label="C4 500")
plot!(sol2, idxs=idxs, label="C3 500", xlabel="Time (s)")
fig = plot(sol0, idxs=idxs, label="DOX=250", title="ROS vO2 shunt fraction")
plot!(fig, sol1, idxs=idxs, label="C4 500")
plot!(fig, sol2, idxs=idxs, label="C3 500", xlabel="Time (s)")
fig |> PNG

# Succinate accumulation adn CAC slowed down.
@unpack cit, isoc, oaa, akg, scoa, suc, fum, mal= sys
plot(sol0, idxs=[cit, isoc, oaa, akg, scoa, suc, fum, mal], leg=:right, title="CAC metabolites")
plot(sol0, idxs=[cit, isoc, oaa, akg, scoa, suc, fum, mal], leg=:right, title="CAC metabolites") |> PNG

# NADH production from CAC decreased
idxs = (sys.t/1000, sys.nadh_m)
plot(sol0, idxs=idxs, label="DOX=250", title="NADH (mito)")
plot!(sol1, idxs=idxs, label="C4 500")
plot!(sol2, idxs=idxs, label="C3 500", xlabel="Time (s)")
fig = plot(sol0, idxs=idxs, label="DOX=250", title="NADH (mito)")
plot!(fig, sol1, idxs=idxs, label="C4 500")
plot!(fig, sol2, idxs=idxs, label="C3 500", xlabel="Time (s)")
fig |> PNG

0 comments on commit fe934f6

Please sign in to comment.