R/model-michaelis_menten-generate.R

Defines functions michaelis_menten

Documented in michaelis_menten

#' Generate Data from the Michaelis Menten Enzyme Kinetics
#'
#' @description Generate data from the Michaelis Menten enzyme kinetics ordinary
#' differential equation described in (Choi, et al., 2017, DOI:
#' 10.1038/s41598-017-17072-z). Consider the kinetic rate equation
#' \preformatted{
#'                   kf
#'                  --->    kcat
#'           E + S  <---  C --->  E + P
#'                   kb}
#'
#' where the free enzyme (E) reversibly binds to the substrate (S) to
#' form a complex (C) with forward and backward rate constants of kf
#' and kb, which is irreversibly catalyzed into the product (P), with
#' rate constant of kcat, releasing the enzyme to catalyze additional
#' substrate. The total enzyme concentration is defined to be the
#' `ET := E + C`. The total substrate and product concentration
#' is defined to be `ST := S + C + P`. The Michaelis constant is
#' the defined to be the `kM := (kb + kcat) / kf`. The kcat rate
#' constant determines the maximum turn over at saturating substrate
#' concentrations, `Vmax := kcat * ET`. The rate constants `kcat`
#' and `kM` can be estimated by monitoring the product accumulation
#' over time (enzyme progress curves), by varying the enzyme and
#' substrate concentrations.
#'
#' From (Choi, et al, 2017, equation 2, the Michaelis Menten differential
#' equation is defined by
#' \preformatted{
#'   Observed data:
#'      M     = number of measurements        # number of measurements
#'      t[M]  = time                          # measured in seconds
#'      Pt[M] = product                       # product produced at time t
#'      ST    = substrate total concentration # specified for each experiment
#'      ET    = enzyme total concentration    # specified for each experiment
#'
#'   Model parameters:
#'     kcat    # catalytic constant (min^-1)
#'     kM      # Michaelis constant ()
#'
#'   ODE formulation:
#'     dPdt = kcat * (
#'              ET + kM + ST - Pt +
#'              -sqrt((ET + kM + ST - Pt)^2 - 2 * ET * (ST - Pt))) / 2
#'
#'   initial condition:
#'      P := 0}
#'
#' In (Choi, et al. 2017) they prove, that the tQ model is valid when
#' \preformatted{
#'     K/(2*ST) * (ET+kM+ST) / sqrt((ET+kM+ST+P)^2 - 4*ET(ST-P)) << 1,}
#'
#' where K = kb/kf is the dissociation constant.
#'
#' @param time `numeric` vector. Increasing time points
#' @param kcat `numeric` value catalytic rate constant
#' @param kM `numeric` value Michaelis rate constant
#' @param ET `numeric` value total enzyme concentration
#' @param ST `numeric` value total substrate concentration
#' @param ... additional arguments to [deSolve::ode()]
#'
#' @returns run the Michaelis Menten ordinary differential equation forwards
#'   starting with initial product concentration of `0` and specified `kcat` and
#'   `kM` parameters for the specified time steps.
#'
#' @seealso [michaelis_menten_model]
#'
#' @references
#' Choi, B., Rempala, G.A. & Kim, J.K. Beyond the Michaelis-Menten equation:
#' Accurate and efficient estimation of enzyme kinetic parameters. Sci Rep 7,
#' 17018 (2017). https://doi.org/10.1038/s41598-017-17072-z
#'
#' @export
michaelis_menten <- function(time, kcat, kM, ET, ST, ...) {

  assertthat::assert_that(
    all(time == cummax(time)),
    msg = "Time is monotonic increasing")

  ode_michaelis_menten <- function(time, Pt, theta) {
    list(c(theta[1] * (ET * (ST - Pt) / (theta[2] + ST - Pt))))
  }
  deSolve::ode(
    y = c(P = 0),
    times = time,
    func = ode_michaelis_menten,
    parms = c(kcat, kM),
    ...)
}
maomlab/BayesPharma documentation built on Aug. 24, 2024, 8:45 a.m.