I would like to model a biological compartment with sysBio R package. It is fine but I'm having a difficult time with modeling the change in pH due to acidosis. I tried several things like:
addMAreaction(glu, "pH = null", "acidosis", "base excess")
addMAreactRate(glu, "acidosis", "assigned", "ka*pH")
addMAreactRate(glu, "base excess", "assigned", "ka*pH*-1")
which caused continuously decreasing pH levels. I'll leave out the intermediate steps but the simplified version of the last code looks like this:
library("sysBio")
glu <- newModel("glu")
addSpecies(glu, "Lactate", 0)
addSpecies(glu, "Glucose", 1000)
addSpecies(glu, "pH", 7.4)
addSpecies(glu, "Acid", 0)
addMAreaction(glu, "Glucose = Lactate + 0.01*Acid", "forwardL",
"backwardL", name = "glycolysis, sort of")
addMAreactRate(glu, "forwardL", "assigned", "kgl*Glucose")
addMAreactRate(glu, "backwardL", "assigned", "ka*pH+klg*Lactate")
addParameters(glu, "kgl", 0.01)
addParameters(glu, "klg", 0.01)
addParameters(glu, "ka", 0.05)
addParameters(glu, "a", 0.001)
addRule(glu, "pH rule", "ODEs", "pH=7.4-a*Acid")
makeModel(glu)
simResults <- simulateModel(glu, times = seq(0,10,0.1))
plotResults(simResults, title="glu")
And the resulting plot is this where pH is increasing forever despite Acid
is at a steady state concentration.
Please note that the abovementioned code is just a simplification. It doesn't even look like aerobic glycolysis where 1 glucose produces lactate and 2 hydrogen atoms etc.
I intend to include several acid- and base-creating reactions and evaluate the resulting pH. So could someone point me in the right direction about how to model the relationship between pH and acids or bases?
The answer does not need to be explicit code. I'll appreciate any solid comment on my design errors.
A
reversibly converts to2*B + 2+H
, andH
reversibly causesP
to sink to 0. At least this was how I modeled it. For example I tried to add rules to limit pH within 0 and 14 as well but these are not included in the example. Apparently some familiarity with either SBML, ordinary differential equations, or maybe sysBio is needed. I couldn't reach the original author of the package so I'm trying to see if I'm missing sth fundamental. $\endgroup$