Introduction

In systems biology, dynamic mathematical modelling of biological processes is used for detailed characterization of phenotypically diseased conditions, with the goal of using this knowledge in personalized medicine.1 Modelling in systems biology is typically done using high-level programming languages like Matlab or Python, but both have their drawbacks such as limited parallel computing capabilities and interpreted code, leading to increased computation time and resource requirements. Julia is a ‘Just-In-Time’-compiled programming language offering code optimizations during translation from written code to machine code, resulting in higher efficiency and lower runtime. It also natively supports parallel computing and vectorized mathematics, making it a great open-source alternative for scientific computing in the big-data era.2

For systems biology, the choice of programming language can be largely influenced by the availability of specific tools for key components of the modelling pipeline. This work illustrates Julia’s functionality for differential equation modelling, parameter estimation, sensitivity analysis, and parameter identifiability analysis using a published model of metabolic meal response.

Approach

The Mixed Meal model, developed by O’Donovan et al., models the human postprandial glucose, insulin, triglyceride, and non-esterified fatty acids response to a mixed meal using 13 ordinary differential equations.3 The model was originally implemented in Matlab, involving simulation of the system of equations, local parameter sensitivity analysis, parameter estimation from plasma data, and parameter identifiability analysis. To compare performance, the model was reimplemented in Julia using the DifferentialEquations.jl package4 for simulation and sensitivity analysis. Parameter estimation was performed by implementing a loss function in concordance with the SciML ecosystem. Additionally, the stepwise profile likelihood approach used in the original model was added to Julia for identifiability analysis. The custom Julia implementation was compared to an existing Julia implementation for profile likelihood analysis, which used constrained optimization, as well as the existing Matlab approach. Each step of the pipeline was evaluated for runtime using benchmarking tools in the respective programming languages.

Results

The benchmarking results demonstrate a large performance improvement of the Julia implementations compared to the original Matlab implementation. Moreover, the use of automatic differentiation in Julia’s ODE solvers resulted in faster and more accurate parameter estimation, contributing to the overall speedup.5 Although compilation times were considered, the decrease in runtime of the lengthiest pipeline components heavily outweighed the additional time required for compilation of Julia code.

Discussion

The results demonstrate that Julia offers a significant performance improvement over Matlab for dynamic modelling in systems biology. Furthermore, the implementation of a published model of metabolic meal response illustrates the availability of adequate tools for systems biology research. While the larger number of available options in Julia, for example, considering ODE solvers, may be overwhelming for new users, it can actually be beneficial for experienced modellers who require more flexibility and customization ability, without compromising on program efficiency.

Overall, the improved performance of Julia has the potential to open new doors for combining dynamic modelling with new artificial intelligence applications.

References


  1. van Riel, N. A. W. Dynamic modelling and analysis of biochemical networks: mechanism-based models and model-based experiments. Brief Bioinform 7, 364–374 (2006). ↩︎

  2. Bezanson, J., Edelman, A., Karpinski, S. & Shah, V. B. Julia: A Fresh Approach to Numerical Computing. https://doi.org/10.1137/141000671 59, 65–98 (2017). ↩︎

  3. O’Donovan, S. D. et al. Quantifying the contribution of triglycerides to metabolic resilience through the mixed meal model. iScience 25, 105206 (2022). ↩︎

  4. Rackauckas, C. & Nie, Q. DifferentialEquations.jl – A Performant and Feature-Rich Ecosystem for Solving Differential Equations in Julia. J Open Res Softw 5, 15 (2017). ↩︎

  5. Ma, Y., Dixit, V., Innes, M. J., Guo, X. & Rackauckas, C. A Comparison of Automatic Differentiation and Continuous Sensitivity Analysis for Derivatives of Differential Equation Solutions. 2021 IEEE High Performance Extreme Computing Conference, HPEC 2021 (2018) doi:10.1109/HPEC49654.2021.9622796. ↩︎