Fig 1.
Catalyst connects an intuitive domain-specific language with a well-supported intermediate representation.
The extracellular signal-regulated kinase (ERK) network is important to the regulation of many cellular functions, and its disruption has been implicated in cancer [35]. (a) A CRN representation of the ERK network. (b) A model of the ERK CRN can be implemented in Julia through the Catalyst DSL, using code very similar to the actual CRN representation. (c) From this code, the DSL generates a ReactionSystem intermediate representation (IR) that is the target structure for a range of supported simulation and analysis methods.
Fig 2.
Catalyst models can be simulated using both deterministic and stochastic interpretations.
(a) The Brusselator network contains two species (X and Y) and two parameters (A and B, in practical implementation these are species present in excess, but they can in practice be considered parameters) [39, 40]. Here, we show the four reactions of the Brusselator CRN, and its implementation using the Catalyst DSL. (b-d) Simulations of models for the Brusselator at the three physical scales supported by Catalyst (RRE, CLE, SSA). Post-processing has been carried out on the plots to improve their visualization in this article’s format. (b) While B > 1 + A2, the deterministic model exhibits a limit cycle. This is confirmed using ODE RRE simulations. (c) The model can also be simulated using the stochastic CLE interpretation. (d) Finally, the discrete, stochastic, jump process interpretation is simulated via Gillespie’s direct method. The system displays a limit cycle even though B < 1 + A2, confirming the well known phenomenon of noise induced oscillations [41].
Fig 3.
Simulations of Catalyst models outperform those of other modeling packages.
Benchmarks of simulation runtimes for Catalyst and four other modeling packages (BioNetGen, COPASI, GillesPy2, and Matlab SimBiology). The benchmarks were run on the multi-state (Multistate, 9 species and 18 reactions [47]), multi-site (Multisite 2, 66 species and 288 reactions [48]), epidermal growth factor receptor signalling (Egfr_net, 356 species and 3749 reactions [49]), B-cell receptor (1122 species and 24388 reactions [50]), and high-affinity human IgE receptor signalling (Fceri_gamma2, 3744 species and 58276 reactions [51]) models. (a-e) Benchmarks of deterministic RRE ODE simulations of the five models. Each bar shows, for a given method, the runtime to simulate the model (to steady-state for those that approach a steady-state). For Catalyst, we show the three best-performing native Julia methods, as well as the performance of lsoda and CVODE. For each of the other tools, we show its best-performing method. Identical values for absolute and relative tolerance are used across all packages and methods. For each benchmark, the method options used can be found in Section 4.1, the exact benchmark times in Table A in S1 Text, and further details on the solver options for each tool in Section B in S1 Text. While this figure only contains the most performant methods, a full list of methods investigated can be found in Section B in S1 Text, with their results described in Figs A and B in S1 Text. (f-j) Benchmarks of stochastic chemical kinetics SSA simulations of the five models. Via JumpProcesses.jl, Catalyst can use several different algorithms (e.g. Direct, Sorting Direct, RSSA, and RSSACR above) for exact Gillespie simulations. Here, the simulation runtime is plotted against the (physical) final time of the simulation. Due to their long runtimes, some tools were not benchmarked for the largest models. We note that, in [52], it was remarked that BioNetGen (dashed orange lines) use a pseudo-random number generator in SSAs that, while fast, is of lower quality than many (slower) modern generators such as Mersenne Twister. For full details on benchmarks, see Section 4.1.
Fig 4.
The simulation pipeline of a Catalyst model, with internal intermediates displayed.
Code as written by the user (yellow background), and as generated internally by Catalyst and ModelingToolkit (blue and grey backgrounds respectively) are shown, in addition to the generated structures and their fields (blue background, some of the internal fields are omitted in all displayed structures). (a) A symbolic ReactionSystem for a reversible dimerisation reaction is created using either the DSL, or programmatically using the Symbolics computer algebraic system. (b) The ReactionSystem can be converted into a ModelingToolkit ODESystem structure, corresponding to a symbolic RRE ODE model. (c) By providing initial conditions, parameter values, and a time span, the ODESystem can be simulated, generating an output solution. The generated (internal) Julia code for evaluating the derivatives defining the ODEs, which gets compiled and is input to the ODE solver, is displayed in grey. At each step, the user has the ability to investigate and manipulate the generated structures.
Fig 5.
A wide range of features are available for Catalyst model analysis.
A CRN model can be created either through the DSL, by manually declaring the reaction events, or by loading it from a file. The model is stored in the ReactionSystem IR, which can be used as input to a wide range of methods. Purple boxes indicate code written by the user, and green boxes the corresponding output. For some methods, either one, or both, boxes are omitted.
Table 1.
Number of simulations used to calculate median simulation times.
Table 2.
Final (physical) time for model steady states in ODE benchmarks.
Table 3.
Options used for the benchmarked ODE methods displayed in the main text figure.