Back to Search Start Over

PyRates—A code-generation tool for modeling dynamical systems in biology and beyond.

Authors :
Gast, Richard
Knösche, Thomas R.
Kennedy, Ann
Source :
PLoS Computational Biology; 12/27/2023, Vol. 19 Issue 12, p1-24, 24p
Publication Year :
2023

Abstract

The mathematical study of real-world dynamical systems relies on models composed of differential equations. Numerical methods for solving and analyzing differential equation systems are essential when complex biological problems have to be studied, such as the spreading of a virus, the evolution of competing species in an ecosystem, or the dynamics of neurons in the brain. Here we present PyRates, a Python-based software for modeling and analyzing differential equation systems via numerical methods. PyRates is specifically designed to account for the inherent complexity of biological systems. It provides a new language for defining models that mirrors the modular organization of real-world dynamical systems and thus simplifies the implementation of complex networks of interacting dynamic entities. Furthermore, PyRates provides extensive support for the various forms of interaction delays that can be observed in biological systems. The core of PyRates is a versatile code-generation system that translates user-defined models into "backend" implementations in various languages, including Python, Fortran, Matlab, and Julia. This allows users to apply a wide range of analysis methods for dynamical systems, eliminating the need for manual translation between code bases. PyRates may also be used as a model definition interface for the creation of custom dynamical systems tools. To demonstrate this, we developed two extensions of PyRates for common analyses of dynamic models of biological systems: PyCoBi for bifurcation analysis and RectiPy for parameter fitting. We demonstrate in a series of example models how PyRates can be used in combination with PyCoBi and RectiPy for model analysis and fitting. Together, these tools offer a versatile framework for applying computational modeling and numerical analysis methods to dynamical systems in biology and beyond. Author summary: We present PyRates, a code-generation tool for dynamical systems modeling applied to biological systems. Together with its extensions PyCoBi and RectiPy, PyRates provides a framework for modeling and analyzing complex biological systems via methods such as parameter sweeps, bifurcation analysis, and model fitting. We highlight the main features of this framework, with an emphasis on new features that have been introduced since the initial publication of the software, such as the extensive code generation capacities and widespread support for delay-coupled systems. Using a collection of mathematical models taken from various fields of biology, we demonstrate how PyRates enables analysis of the behavior of complex nonlinear systems using a diverse suite of tools. This includes examples where we use PyRates to interface a bifurcation analysis tool written in Fortran, to optimize model parameters via gradient descent in PyTorch, and to serve as a model definition interface for new dynamical systems analysis tools. [ABSTRACT FROM AUTHOR]

Details

Language :
English
ISSN :
1553734X
Volume :
19
Issue :
12
Database :
Complementary Index
Journal :
PLoS Computational Biology
Publication Type :
Academic Journal
Accession number :
174475223
Full Text :
https://doi.org/10.1371/journal.pcbi.1011761