Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Influence of parameters on the average degree of mitochondrial node

using DifferentialEquations
using OrdinaryDiffEqSDIRK
using SteadyStateDiffEq
using ModelingToolkit
using MitochondrialDynamics
using Tables
using MarkdownTables

Setup the ODE system

@time "Build system" @named sys = make_model()
@time "Build problem" prob = SteadyStateProblem(sys, [])

params = parameters(sys)
sol0 = solve(prob, DynamicSS(FBDF()); reltol=1e-8, abstol=1e-8)
# Average degree of mitochondrial node
@unpack degavg = sys
d0 = sol0[degavg]

println("The default average degree of mitochondrial node is: ", d0)

function _calc_sens(k)
    original_value = prob.ps[k]
    _prob = remake(prob, p=[k => original_value * 1.01]) ## Increase 1% of the parameter value
    sol = solve(_prob, DynamicSS(FBDF()); reltol = 1e-8, abstol = 1e-8)
    return (sol[degavg] / d0 - 1) * 100
end
Build system: 0.044025 seconds (93.92 k allocations: 19.642 MiB)
Build problem: 5.888595 seconds (8.29 M allocations: 421.907 MiB, 1.02% gc time, 99.10% compilation time)
The default average degree of mitochondrial node is: 1.563773465956938
_calc_sens (generic function with 1 method)

Sensitivity analysis of the solution at t=300 sec against parameters.

@time sensitivities = Dict(k => _calc_sens(k) for k in params)
 15.522613 seconds (19.16 M allocations: 964.904 MiB, 1.69% gc time, 90.39% compilation time)
Dict{SymbolicUtils.BasicSymbolicImpl.var"typeof(BasicSymbolicImpl)"{SymbolicUtils.SymReal}, Float64} with 68 entries: KnadhLDH => 0.000669056 ATPstiochGK => 0.00369046 V_MTX => -0.000155114 KvF1 => -0.40975 KadpGPD => -3.75005e-7 KnaNCLX => 0.0176436 KadpF1 => -0.0187778 kATPCa => 0.00815121 V_I => 0.0449948 rHL => -0.154314 pHleak => -0.154314 rETC => 0.00114121 F_M => 4.98543e-8 kATP => 0.0383119 KglcGK => -0.0585603 KbETC => 0.000781999 kNADHc => -6.69336e-5 Σn_c => -9.86499e-5 kfiss2 => -0.0573986 ⋮ => ⋮
println("Relative sensitivity of average degree of mitochondrial node to parameters:")

ks = keys(sensitivities) |> collect
vs = values(sensitivities) |> collect

t = Tables.table([ks vs]; header=["Parameter", "Relative Sensitivity"])
MarkdownTables.markdown_table(t)
Relative sensitivity of average degree of mitochondrial node to parameters:
Loading...

This notebook was generated using Literate.jl.