scieee AI-readable full text Open interactive document viewer

A kinetic finite volume discretization of the multidimensional PIDE model for gene regulatory networks

Vághy, Mihály A.,Otero-Muras, Irene,Pájaro, Manuel,Szederkényi, Gábor

Abstract

M.P. acknowledges funds from the Galician Government (grants ED431C 2022/47 and ED431G 2019/01, both including FEDER financial support). I.O.M. acknowledges MCIN/AEI/10.13039/501100011033 funding through grant PID2021-127888NA-I00 (COMPSYNBIO). G.Sz. acknowledges the support of the Hungarian National Research, Development and Innovation Office (NKFIH) through the grant 145934. M.A.V. acknowledges the support of the ÚNKP-22-3-I-PPKE-72 National Excellence Program of the Hungarian Ministry for Innovation and Technology from the source the NFKIH.

Full text

Bulletin of Mathematical Biology (2024) 86:22 https://doi.org/10.1007/s11538-023-01251-3 ORIGINAL ARTICLE A Kinetic Finite Volume Discretization of the Multidimensional PIDE Model for Gene Regulatory Networks Mihály A. Vághy1·Irene Otero-Muras2·Manuel Pájaro3· Gábor Szederkényi1,4 Received: 21 April 2023 / Accepted: 22 December 2023 / Published online: 22 January 2024 © The Author(s) 2024 Abstract In this paper, a finite volume discretization scheme for partial integro-differential equations (PIDEs) describing the temporal evolution of protein distribution in gene regulatory networks is proposed. It is shown that the obtained set of ODEs can be formally represented as a compartmental kinetic system with a strongly connected reaction graph. This allows the application of the theory of nonnegative and compartmental systems for the qualitative analysis of the approximating dynamics. In this framework, it is straightforward to show the existence, uniqueness and stability of equilibria. Moreover, the computation of the stationary probability distribution can be traced back to the solution of linear equations. The discretization scheme is presented for one and multiple dimensional models separately. Illustrative computational examples show the precision of the approach, and good agreement with previous results in the literature. Keywords Gene regulatory networks ·Partial integro-differential equations · Compartmental systems ·Kinetic systems ·Numerical methods ·Finite volume methods BMihály A. Vághy vaghy.mihaly[email protected] 1Faculty of Information Technology and Bionics, Pázmány Péter Catholic University, Práter u. 50/a, Budapest 1083, Hungary 2Institute for Integrative Systems Biology, Spanish Council for Scientific Research, Carrer del Catedràtic Agustín Escardino Benlloch, 46980 Valencia, Spain 3Department of Mathematics, Escola Superior de Enxeñaría Informática, University of Vigo, Campus Ourense, 32004 Ourense, Spain 4Systems and Control Laboratory, ELKH Institute for Computer Science and Control (SZTAKI), Kende u. 13-17, Budapest 1111, Hungary 123 22 Page 2 of 26 M. A. Vághy et al. 1 Introduction Gene expression is a fundamental biological process of actually realizing DNA information in the form of proteins in living organisms. Therefore, the (quantitative) modeling of gene expression has been in the focus of research during the last decades (Smolen et al. 2000; Ay and Arnosti 2011). Gene regulatory networks (GRNs) are complex mechanisms through which cells are able to react to internal and external signals in a controlled way (Peter and Davidson 2015). The set of techniques successfully applied for the modeling of GRNs is really wide (De Jong 2002; Karlebach and Shamir 2008; Barbuti et al. 2020). It was pointed out already in the 1970s that the stochastic nature of gene expression has to be taken into consideration during modeling (Berg 1978). Experimental results and model analysis clearly show that both translational and transcriptional bursting contribute to stochasticity in prokaryote and eukaryote gene expression (Kaern et al. 2005; Dar et al. 2015). It is also known that in many cases, stochasticity in gene expression is functionally advantageous, and it can even result in robust phenotypes (MacNeil and Walhout 2011). In Mackey and Tyran- Kami´nska (2015), the dynamics of a bistable genetic switch was analyzed, and it was shown that the qualitative properties of the stationary distribution are not significantly influenced by stochastic terms describing bursting and degradation. A theoretically sound hybrid modelling and simulation framework was proposed and applied to study the transcriptional dynamics of an autoregulation loop and a toggle switch in Bokes et al. (2013). An interesting computation result is that there exist two qualitatively different scenarios called "fluctuating" and “simultaneous” in the behaviour of the toggle switch in the presence of gene expression noise. The dynamical model studied in this paper is originated in Friedman et al. (2006), where a symbolic approach is proposed for describing the stationary distribution of protein concentration in living cells in the form of partial integro-differential equations (PIDEs). The model is based on the master equation, and considers protein production in random bursts (see, also Elgart et al. 2011;Dar2012) extended by transcription autoregulation. Feasible stationary distributions for this PIDE model with a slightly modified transcription rate were derived and classified in Pájaro et al. (2015). The generalized Friedman (or multidimensional PIDE) model was later introduced in Pájaro et al. (2017) which describes the operation of a genetic circuit of ngenes expressed into ndifferent protein types. Since finding symbolic solutions for the stationary distributions of the generalized Friedman model is not straightforward due to its generality, Pájaroetal.(2017)proposeda numerical procedure for the computation. The approach is based on a semilagrangian method for the discretization of the PIDE, and the computational results show that it is suitable to describe the behaviour of a wide class of GRNs with several different regulatory interactions and protein degradation rates. The generalized Friedman model and the subsequently developed simulation framework SELANSI (Pájaro et al. 2017) has since been widely used for design (Sequeiros et al. 2022), identification (Sequeiros et al. 2022) and control (Bokes and Singh 2019; Fernández et al. 2022) of GRNs. In Pájaro et al. (2019) a truncated version of the master equation corresponding to a special version of the one-dimensional Friedman model was proposed. As we will show later, this can be formally seen as a semi- 123 A Kinetic Finite Volume Discretization of the… Page 3 of 26 22 discretization of the PIDE and can be generalized to both variable degradation rates and multidimensional GRNs. Compartmental models are used to describe the transmission of modeled entities (material, particles, vehicles, people, information, etc.) between physical or abstract storage units, called compartments (Haddad et al. 2010). Accordingly, the application field of compartmental systems is really wide including (bio)chemistry, pharmacokinetics, ecological, epidemiological and transportation modeling (Godfrey 1983). Mathematically, the descriptive power of compartmental models is quite good as they are capable of representing numerous complex dynamical phenomena (Rap 1986; Brown 1980). Additionally, one of their main benefits is the associated directed graph structure (called the compartmental graph) representing possible transitions, and the related strong results on qualitative dynamical properties (Jacquez and Simon 1993; Cobelli and Romanin-Jacur 1976). Naturally, there is a vast literature on the dynamics of linear compartmental systems and the algebraic properties of the corresponding compartmental matrices (see, e.g. Anderson 2013; Berman and Plemmons 1994; Meshkat et al. 2015; Bortner and Meshkat 2022). Another important related family of models is the class of chemical reaction networks (CRNs) or kinetic systems which includes dynamical models that can be formally represented by a set of transformations (reactions) between abstract chemical complexes. The theory of CRNs is an intensively studied area, where deep results have been achieved on the properties of kinetic systems such as the structure and stability of equilibria (Feinberg 2019; Angeli 2009; Chellaboina et al. 2009). Linear kinetic systems with one-species complexes are trivially compartmental, where the compartments correspond to chemical species, and the reaction graph is identical to the compartmental graph (Érdi and Tóth 1989). Many hyperbolic conservation laws are derived in an integral form, which, in the case of sufficiently smooth solutions and fluxes, can be rewritten in their usual differential form (LeVeque 2002). However, many practical problems involve discontinuous solutions, where shocks or singularities can develop quickly even from smooth initial data. We highlight that the (generalized) Friedman model can have this problem too, see Sect. 5for a special single gene example where the symbolic solution is known and has a singularity in the origin. Thus, numerical methods derived from the differential form, such as finite differences, are expected to lose accuracy near discontinuities. This problem can for example be mitigated by an appropriate Finite Volume Method (FVM) based on the integral form of the PDE. Instead of computing possibly unreliable pointwise approximations we define grid cells and approximate the cell averages of the solution. This approach introduces a clear compartmental interpretation of semi-discretized PDEs and can naturally capture the underlying conservation law, too (Eymard and Gallouët 2000). As a consequence, in many applications the result of an FVM is guaranteed to be nonnegative and conservative, thus it is bounded; that is, FVM can be robust to the singularities of the solution. Motivated by the above mentioned preliminary results, the aim of this paper is to propose an efficient novel computational approach based on compartmental discretization for the numerical solution of the multidimensional PIDE model introduced in Pájaro et al. (2017). It is shown that the dynamics of the approximating model can be written as a nonnegative linear time-invariant ODE. Therefore, the stationary distribution can be computed by solving a set of linear equations. The structure of 123 22 Page 4 of 26 M. A. Vághy et al. the paper is the following. In the next section we introduce the PIDE model and the compartmental and kinetic systems. Next, in Sect. 3, we describe the kinetic finite volume discretization proposed to solve the PIDE model. A qualitative analysis of the proposed method is addressed in Sect. 4and several illustrative numerical examples are shown in Sect. 5. Finally, in Sect. 6, we end up with a summary of the work. 2 Notations and Background In this section we give a brief introduction of multidimensional GRNs and (linear) compartmental and kinetic systems. 2.1 Multidimensional Gene Regulatory Networks The following short introduction is based on Friedman et al. (2006), Pájaro et al. (2017). We consider a gene regulatory network consisting of ngenes G= {DNA1,DNA2,...,DNAn}that express nproteins X={X1,X2,...,Xn}via the corresponding messenger RNAs M={mRNA1,mRNA2,...,mRNAn}.Wefollow the still relevant central dogma of molecular biology, which asserts that the gene instructions are transcribed into messenger RNAs, that are translated into proteins. The continuous number of mRNA molecules and proteins are denoted by m,x∈Rn, respectively. The promoters corresponding to each gene are assumed to switch between active and inactive states, denoted by DNAi,on and DNAi,off, respectively. The transition is controlled by the binding of proteins. Note that in general, the feedback mechanism may require the binding of multiple types of proteins besides the one expressed by the givengene.Forthesakeofgenerality,weassumethatanyproteincanrepressoractivate any gene in the network. This mechanism is typically modelled by multivariate Hill functions. We define the matrix H∈Zn×n, where Hij represents the Hill coefficient of the cross-regulation. If Hij is positive (respectively, negative), then Xjinhibits (respectively, promotes) the expression of Xi. The transcription of DNAiinto mRNAiis assumed to be a first order process occurring with rate ki mper unit time and with transcriptional leakage εi∈(0,1). Then the transcription can be written as Ri T(x)=ki mci(x), where ci:Rn +→[εi,1]depend on the feedback regulation mechanism. In a single gene setting we could consider c1(x1)=KH+ε1xH KH+xH, for some appropriate Kand Hconstants; see Sect. 5for more examples of ciHill functions. We emphasize that the transcriptional leakage directly affects the range of these coefficient functions. Finally, the translation rate of protein Xiis defined as 123 A Kinetic Finite Volume Discretization of the… Page 5 of 26 22 Ri X(mi)=ki xmi. The messenger RNA and protein degradation is assumed to take the form Gi m(mi)=−γi mmiGi X(x)=−γi x(x)xi, where γi m>0 and γi x:Rn +−→ R+. Following Pájaro et al. (2017) it is assumed that γi m γi x(x)1 in order to ensure the validity of the subsequent model. We use the standard exponential distribution to model protein bursting; that is, the conditional probability of the protein level jumping from yi>0toxi>yiis ωi(xi−yi)=1 bi exp −xi−yi bi, where bi=ki x γi m . With the above assumptions the probability density function (PDF) of the protein level, p(t,x), can be modelled with the following PIDE: ∂p(t,x) ∂t= n  i=1 ∂ ∂xiγi x(x)xip(t,x)]+ n  i=1 ki mxi 0 βi(xi−yi)ci(yi)p(t,yi)dyi, (1) where yi=x+(yi−xi)eiand the βifunctions have the following form: βi(x)=ωi(x)−δ(x). In Cañizo et al. (2019) the authors show the well-posedness of (1) in the generalized (mild) sense; that is, for p0∈L1(Rn)there exists a unique mild solution p∈CR+;L1(Rn)with the following properties: (i) nonnegativity: if p0is nonnegative, then so is the solution p(t,.)for all t≥0, (ii) mass conservation: Rn + p(t,x)dx=Rn + p0(x)dx,∀t≥0. In fact, if the initial data is in the space C1,b(Rn +)of Hölder-continuous functions for some appropriate b>0 (e.g., in one dimension b=b1), then there exists a unique classical solution p∈C1R+;L1(Rn +). Note, that in the probabilistic setting in applications we usually assume that p0is nonnegative and its integral is one. 2.2 Compartmental and Kinetic Systems We briefly introduce compartmental systems based on Jacquez and Simon (1993). Compartmental differential equations are often used to model physical phenomena 123 22 Page 6 of 26 M. A. Vághy et al. governed by a conservation law such as conservation of mass. A compartment can represent a certain amount of a material that is kinetically homogeneous; that is, the entering material is instantly mixed with that of the compartment. As long as we can interpret the conservation law, a compartment can even describe abstract quantities, such as probabilities in our case. Despite this, we will usually refer to the amount of the modeled quantity in the compartment as the mass in the compartment, and to the conservation law as conservation of mass. Let us consider a system with mcompartments and let qirepresent the mass of the ith compartment. In general, any compartment can be connected to any other compartment and to the environment in both directions. We denote with Fij the flow from the compartment qjto the compartment qi, with Iithe material inflow from the environment to compartment qiand with F0ithe material outflow from compartment qito the environment. Loop flows are not allowed, i.e. i= jin Fij. Then the timeevolution of the system is given by the following system of differential equations: ˙qi= j=i (−Fji +Fij)+Ii−F0i.(2) We impose the following physical assumptions to the system: 1. for any i,j,t≥0, i= jwe have that Fij(q(t)) ≥0, Ii(t)≥0 and F0i(q(t)) ≥0, 2. for any i,t≥0ifqi(t)=0, then F0i(q(t)) =Fji(q(t)) =0 for each j. These properties ensure the invariance of the nonnegative orthant; that is, assuming a nonnegative initial condition, our solution is guaranteed to be nonnegative. In general, the above functions can depend on the mass of any compartment and possibly on tas well. Then it can be shown that if each Fij and F0ibelong to the class Ck, then we can rewrite (2)as ˙qi=−⎛ ⎝f0i+ j=i fji⎞ ⎠qi+ j=i fijqj+Ii,(3) where Fij =fijqjand the fractional transfer coefficients fij belong to the class Ck−1, for k≥1. We can then naturally rewrite (3)inmatrixformas ˙q=fq+I, where {f}ij =fij for i=0,1,... and j=1,2,.... If each fractional transfer coefficient fij only depends on qj, then the system is called a donor controlled system. Ifeachcoefficientisconstant,thenthesystemiscalledalineardonorcontrolledsystem. Linear donor controlled systems can naturally be represented as chemical reaction networks, or kinetic systems. For a brief introduction, we refer to Angeli (2009). For each compartment with index i,qirepresents the mass (or alternatively, the concentration) of the one-species complex Qi, and for each transition from compartment ito j, we assign the reaction Qi→Qj. Using this construction, we can not only rely on 123 A Kinetic Finite Volume Discretization of the… Page 7 of 26 22 the comprehensive theory of compartmental models but on that of kinetic systems as well. While most qualitative properties of linear donor controlled systems we consider can be derived from both modeling approaches, a notable piece of additional information in chemical reaction network theory is the stability analysis using a logarithmic Lyapunov function, discussed in more detail in 4.2. 3 Kinetic Finite Volume Discretization In this section we formulate a finite volume discretization of (1), the result of which is a mass conservative kinetic system. We also note that since (1) is linear (that is, if p and qare solutions, then so is p+q), the result of the semi-discretization is anticipated to also be linear. 3.1 One-Dimensional Case Let us first consider the one-dimensional Friedman model describing the temporal evolution of protein distribution given by ∂p(t,x) ∂t=∂ ∂xγ1 x(x)xp(t,x)+k1 mx 0 β1(x−y)c1(y)p(t,y)dy,(4) with initial condition p(0,x)=p0(x)that has integral one. The mass conservation of (4) is well-known but the subsequent informal investigation provides further insight thatcanbetransferredtothedesignofthenumericalscheme.Sinceω1istheprobability density function of an exponential distribution its integral is one, and thus ∞ 0 β1(x)dx=0. Integrating over R+shows after a change of variables that ∞ 0 ∂p(t,x) ∂tdx=∂ ∂t∞ 0 p(t,x)dx=∞ 0 ∂ ∂xγ1 x(x)xp(t,x)dx +k1 m∞ 0x 0 β1(x−y)c1(y)p(t,y)dydx=lim x→∞ γ1 x(x)xp(t,x)   =0 −γ1 x·0·p(t,0) +k1 m∞ 0∞ y β1(x−y)c1(y)p(t,y)dxdy =k1 m∞ 0 c1(y)p(t,y)∞ y β1(x−y)dxdy=0, (5) so that the equality ∞ 0 p(t,x)dx=∞ 0 p0(x)dx=1 123 22 Page 8 of 26 M. A. Vághy et al. holds for any t≥0. Inafinitevolumesettingthecoefficientsarecalculatedasaverages(thatis,integrals) over appropriate subdomains. Hence, as an intuition we should note that the mass conservation property of the novel scheme should be the result of a calculation very similar to (5). Our main goal is to perform a spatial discretization (with resolution h) to obtain an infinite dimensional dynamical system describing the temporal evolution of the functions pi(t)i∈Nwith the usual properties of a PDF; that is, we should have that: 1. 0 ≤pi(t)for all i∈Nand t≥0, 2. ∞ i=1hpi(t)=1 for all t≥0. In order to do so, consider the set of intervals Ki=xi−1 2,xi+1 2=[(i−1)h,ih],i=1,2,... for some h>0 and introduce the set of variables pi(t), where pi(t)≈1 |Ki|Ki p(t,y)dy=1 hKi p(t,y)dy; that is, the value pi(t)is assumed to approximate the average in the cell Kiand we set the initial values accordingly. Further introduce the cell averages of the functions γ1 xand c1given as γ1 i=1 |Ki|Ki γ1 x(y)dy,c1 i=1 |Ki|Ki c1(y)dy. Let xibe the midpoint of Kifor i=1,2,... and define b1 i,i=1 h/2[(i−1)h,(i−1/2)h] β1(xi−y)dy=1 h/2[xi−h/2,xi] β1(xi−y)dy, b1 i,j=1 |Kj|Kj β1(xi−y)dy,j=1,2,...,i−1. As the b1 i,jcoefficients come from a discretization of an exponential function, the series is geometric (apart from b1 i,ithat takes the Dirac delta into account), see Berg (1978), Bokes et al. (2011), McAdams and Arkin (1997). As the derivative on the right-hand side of (4) describes protein degradation (that is, a vector field pointing towards the origin) we will approximate it with a difference quotient of the form ∂ ∂xγ1 x(x)xp(t,x)Ki ≈1 hγ1 i+1xi+1 2pi+1(t)−γ1 ixi−1 2pi(t). 123 A Kinetic Finite Volume Discretization of the… Page 9 of 26 22 Then approximating the integral in (4) with a sum yields the system ˙pi(t)=1 hγ1 i+1xi+1 2pi+1(t)−γ1 ixi−1 2pi(t)+k1 m i  j=1 h1 i,jb1 i,jc1 jpj(t); pi(0)=1 |Ki|Ki p0(y)dy, (6) where h1 i,j=h/2,i=j, h,i= j. Observe, that the resulting infinite dimensional system (6) is clearly a linear donor controlled compartmental system of the form ˙p(t)=p(t), where the infinite matrix defined element-wise as ij =⎧ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎩ k1 mh1 i,jb1 i,jc1 j,j<i, −1 hγ1 ixi−1 2+k1 mh1 i,ib1 i,ic1 i,j=i, 1 hγ1 i+1xi+1 2,j=i+1, 0,j>i+1 is an infinite Kirchhoff matrix; that is, it is a Metzler matrix with zero column-sums. While the superdiagonal elements of can be arbitrarily large, its sign structure guarantees the well-posedness, in the 1space of absolutely summable sequences, of the underlying continuous-time infinite Markov chain of (6), see Sects. 4 and 6 of Reuter (1957). This further implies the well-posedness of (6), and thus relying on the fact that β1integrates to zero we have that ∞  i=1 ˙pi(t)= ∞  i=1 1 hγ1 i+1xi+1 2pi+1(t)−γ1 ixi−1 2pi(t)+k1 m ∞  i=1 i  j=1 h1 i,jb1 i,jc1 jpj(t) =lim l→∞ 1 hγ1 l+1xl+1 2pl+1(t)−1 hγ1 1·0·p1(t)+k1 m ∞  j=1 ∞  i=j h1 i,jb1 i,jc1 jpj(t) =k1 m ∞  j=1 c1 jpj(t) ∞  i=j h1 i,jb1 i,j =k1 m ∞  j=1 c1 jpj(t)⎛ ⎝[xj−h/2,xj] β1(xj−y)dy+ ∞  i=j+1Kj β1(xi−y)dy⎞ ⎠ 123 22 Page 16 of 26 M. A. Vághy et al. (ii) the semilagrangian method is not conservative, thus SELANSI has to manually renormalize in each iteration. Compared to this, our kinetic FVM is nonnegative and conservative and, as noted in Sect. 4, the equilibrium is strictly positive. Thus it can capturethequalitativebehaviourofthePIDEevenifthedomainisnotknownprecisely, which might be the case for previously untested gene regulatory network structures or parameter sets, see Fig.2b. Table 1shows the relative error (in the L2norm) of the different methods compared to the symbolic solution, computed as follows: E(p,pref )=p−pref L2 pref L2 =(N i=1p(xi)−pref (xi)2 (N i=1p2 ref (xi) . The computational times of both methods are depicted in Table 2, from where we can observe that the FVM has also better computational efficiency compared to that of SELANSI. Example 2: Mutual Activation of Two Genes In this example we consider Hill functions in the form of c1(x)=KH12 12 +ε1xH12 2 KH12 12 +xH12 2 , c2(x)=KH21 21 +ε2xH21 1 KH21 21 +xH21 1 , where H12 <0 and H21 <0, corresponding to positive cross-regulation or activation. Figure3a, b respectively show the stationary joint PDF, while Fig.3c, d respectively show the stationary marginal PDF on various domains, for FVM and SELANSI. Note, that the GRN is symmetric w.r.t. the proteins, thus we only plot one set of marginal PDFs. We can observe the sensitivity of SELANSI to the domain, while the finite volume discretization is quite robust to it. In this example we can see that the solution computed by SELANSI deteriorates not just for too small, but even for too large domains. Since for multidimensional GRNs the symbolic solution of (1) cannot be computed in a straightforward manner, we cannot compute the empirical error as in the case of the one-dimensional example. Instead, we only compare the running times of the two methods, the results of which are collected in Table 3. Example 3: Mutual Repression of Two Genes In this example we consider Hill functions in the form of c1(x)=KH12 12 +ε1xH12 2 KH12 12 +xH12 2 ,c2(x)=KH21 21 +ε2xH21 1 KH21 21 +xH21 1 , 123 A Kinetic Finite Volume Discretization of the… Page 17 of 26 22 Fig. 2 Self-regulated single gene network with parameters H11 =−4, K1=45, ε1=0.15, k1 m= 3.2×10−3,b1=16andγ1 x(x)=4×10−4.Thesimulationsareperformedwith N1=2000,τ=tγ1 x=50 and t=0.002 (color figure online) Table 1 Relative error of the simulation of a one-dimensional GRN on various domains Mesh FVM (×10−3) SELANSI (×10−3) L1=300 L1=350 L1=400 L1=300 L1=350 L1=400 2.5×104×800 7.4358 8.6799 9.9106 29.6010 5.4881 9.2314 2.5×104×1200 4.9886 5.8169 6.6366 28.6252 4.3113 8.3388 2.5×104×1600 3.7665 4.3870 5.0013 29.5308 3.4255 8.0746 2.5×104×2000 3.0335 3.5298 4.0209 29.9408 2.8899 7.2511 2.5×104×5000 1.4271 1.4761 1.6675 31.0859 2.5960 6.0042 123 22 Page 18 of 26 M. A. Vághy et al. Table 2 Average runtime of 100 simulations of a one-dimensional GRN with various mesh sizes Mesh FVM SELANSI 2.5×104×800 0.0335 s1.8208 s 2.5×104×1200 0.0899 s2.1993 s 2.5×104×1600 0.1460 s2.5510 s 2.5×104×2000 0.3561 s2.8866 s 2.5×104×5000 3.8066 s7.9131 s Fig. 3 Mutual activation with parameters H12 =H21 =−4, K12 =K21 =70, ε1=ε2=0.2, k1 m=k2 m=3.4×10−3,b1=b2=18, γ1 x(x)=γ2 x(x)=4×10−4,N1=N2=400, τ=tγ1 x=50 and t=0.005 (color figure online) where H12 >0and H21 >0,correspondingto negativecross-regulationor repression. Figure4shows the stationary joint PDF and the marginal stationary PDF on multiple domains. Again, the GRN is symmetric w.r.t. the proteins and the same dependence on the domain can be observed in the case of SELANSI. The running time of both methods with various mesh sizes are presented in Table 3. 123 A Kinetic Finite Volume Discretization of the… Page 19 of 26 22 Table 3 Average runtime of 100 simulations of several two-dimensional GRNs with various mesh sizes GRN FVM SELANSI 10022002300240021002200230024002 Ex. 2 0.2223 s1.6485 s5.2159 s11.5707 s9.0423 s21.5449 s40.6726 s71.1792 s Ex. 3 0.2128 s1.3679 s4.5709 s10.3817 s9.0443 s21.3982 s40.7456 s72.3397 s Ex. 4 0.3241 s1.8639 s5.7925 s12.3953 s9.1355 s22.0259 s41.9351 s73.4001 s Ex. 5 0.7064 s4.9921 s17.0973 s45.0809 s−− − − Example 4: Self and Mutual Regulation In this example we consider two genes, one of which is activated by both, the other is repressed by both. The corresponding Hill functions can be given as follows: c1(x)=ε11xH11 1xH12 2+ε12KH11 11 xH12 2+ε13xH11 1KH12 12 +KH11 11 KH12 12 xH11 1xH12 2+KH11 11 xH12 2+xH11 1KH12 12 +KH11 11 KH12 12 , c2(x)=ε21xH21 1xH22 2+ε23KH21 21 xH22 2+ε12xH21 2KH22 22 +KH21 21 KH22 22 xH21 1xH22 2+KH21 21 xH22 2+xH21 2KH22 22 +KH21 21 KH22 22 , where H11 <0, H21 <0, H12 >0 and H22 >0. We note that the above functions are generalized Hill functions, and thus have to be defined in a separate file for the SELANSI simulation. Figure5shows the stationary joint PDF and the marginal stationary PDF on multiple domains. This example is not symmetric w.r.t. the different kind of proteins, thus we plot both marginal density functions. The running time of both methods with various mesh sizes are presented in Table 3. Example 5: Bacterial Competence InBacillus subtilis,competenceis a probabilistic andtransientlydifferentiated state. In this physiological state bacteria has the capability of DNA uptake from their environment. The phenomena is modelled with a two-dimensional gene regulatory network, consisting of the master regulator self-activated ComK which represses the transcription factor ComS (Süel et al. 2007). Protein degradation is mediated by the MecA complex. After ComK (ComS) binds to the complex an intermediate complex MecA- ComK (MecA-ComS) complex is formed, in which the ComK (ComS) protein is degraded by the ClpP-ClpC proteases (Süel et al. 2006). Instead of explicitly modelling the effects of the MecA complex, the authors consider a variable degradation rate. Using this reduced order stochastic differential equation developed in Süel et al. (2006) a discrete stochastic CME model is presented in Dandach and Khammash (2010), simulated using a Monte-Carlo based Stochastic Simulation Algorithm. A corresponding PIDE is presented in Pájaro et al. (2017) with parameters adapted from the CME model of Dandach and Khammash (2010)asfollows:αk=0.0028, βk=0.049, βs=0.057, Kk=100, Ks=110, δk=δs=0.0014, k=500, 123 22 Page 20 of 26 M. A. Vághy et al. Fig. 4 Mutual repression with parameters H12 =H21 =4, K12 =K21 =45, ε1=ε2=0.15, k1 m=k2 m=3.2×10−3,b1=b2=16, γ1 x(x)=γ2 x(x)=4×10−4,N1=N2=400, τ=tγ1 x=50 and t=0.005 (color figure online) s=50, b1=2, b2=5, k1 m=αk+βk b1,k2 m=βs b2,ε1=αk αk+βk,ε2=0, H11 =−2, H21 =5. The coefficient functions are set as: c1(x)=KH11 k+ε1xH11 1 KH11 k+xH11 1 ,γ 1 x(x)=δkks ks+sx1+kx2, c2(x)=KH21 s+ε2xH21 1 KH21 s+xH21 1 ,γ 2 x(x)=δsks ks+sx1+kx2. We note that the currently publicly available SELANSI version cannot handle variable degradationrates, thus wecouldnotreproducethe plots of Pájaro et al. (2017).Figure6 shows the stationary PDFs and its contour plot, both of which are in accordance with the plots of Pájaro et al. (2017). The running times of the kinetic FVM for various mesh sizes are shown in Table 3. 123 A Kinetic Finite Volume Discretization of the… Page 21 of 26 22 Fig. 5 Mutual repression with parameters H11 =−4, H21 =−6, H12 =H22 =2, K11 =K12 =45, K21 =K22 =70, ε11 =ε21 =0.002, ε12 =0.02, ε22 =0.1, ε13 =ε23 =0.2, k1 m=4×10−3, k2 m=8×10−3,b1=10, b2=20, γ1 x(x)=γ2 x(x)=4×10−4,N1=N2=400, τ=tγ1 x=50 (color figure online) 123 22 Page 22 of 26 M. A. Vághy et al. Fig. 6 Kinetic FVM of Example 5 with N1=N2=400 (color figure online) 5.2 Memory Requirement of the Kinetic FVM A notable technical challenge in our method is the efficient assembly and storage of the coefficient matrix (N).Forn≥2 one should store (N)in a sparse representation, but even then the memory requirement can grow quickly. However, we can explicitly calculate the number of nonzero elements of the matrix to aid the design of the simulation. To be precise, the number of nonzero elements of the coefficient matrix corresponding to an n-dimensional PIDE discretized on a grid of size n i=1Ni is as follows: n  i=1⎛ ⎝ Ni  k=1 (Ni−k)⎞ ⎠ n ! j=1 j=i Nj   bursting of protein Xi + n  i=1 (Ni−1) n ! j=1 j=i Nj   degradation of Xi + n ! i=1 Ni  diagonal = n  i=1 1 2N2 i−Nin ! j=1 j=i Nj+n n ! i=1 Ni− n  i=1 n ! j=1 j=i Nj+ n ! i=1 Ni =− 1 2n n ! i=1 Ni+1 2)n  i=1 Ni*)n ! i=1 Ni*+(n+1) n ! i=1 Ni−)n  i=1 1 Ni*)n ! i=1 Ni* =1 2)n+2+ n  i=1 Ni− n  i=1 2 Ni*)n ! i=1 Ni*. Figure7shows the number of nonzero elements on an equidistant grid for a matrix corresponding to a mesh of size N=1010 (that is, the matrix has 1020 total elements) as a function of n. The logarithmic scaling suggests that as the dimension of the PIDE is increased, we can increase the number of finite volume cells on the grid even without exceeding the memory limits. 123 A Kinetic Finite Volume Discretization of the… Page 23 of 26 22 Fig. 7 Memory requirement of an n-dimensional GRN with N=1010 total number of cells 6 Conclusions A novel discretization scheme was proposed in this paper for the simulation and analysis of multidimensional PIDE models used in the stochastic dynamical description of gene regulatory networks. It was shown that using an appropriate finite volume scheme, a fully conservative linear compartmental dynamics is obtained in ODE form. This representation can be particularly useful for studying the dynamics of the process from a systems biology perspective, since the interpretation of the system of ODEs of a process is usually more intuitive than the original PIDE. In particular, the proposed compartmental description can serve as a basis for designing experiments and solving various analysis and control problems of stochastic gene regulatory networks, since the theoretical properties of the model class are well-known regardless of the dimension of the state variable (van Kampen 2007). The interconnection structure of the discretized system was studied in detail, and it was shown that the associated directed graph is always strongly connected. Therefore, the theory of kinetic and compartmental systems can be used to conclude that the equilibrium of the discretized dynamics representing the stationary distribution of molecules is unique and globally stable for any biologically meaningful parameter values in the PIDE model. Moreover, the stationary distribution can be obtained by solving a set of linear equations without performing the time-domain simulation. The memory requirement of the method can be precisely pre-computed based on which the applicable resolution can be determined. Fiveillustrative exampleswere presented toshow the operationandperformanceof the method. Whenever possible, the obtained solutions and running times were compared with those given by the SELANSI toolbox, and these comparisons clearly justified the advantageous properties of the proposed approach both in terms of precision and performance. Further work will be focused on feedback control design based on the semidiscretized models. 123 22 Page 24 of 26 M. A. Vághy et al. Acknowledgements The authors acknowledge the helpful discussions with M. Kovács. M.P. acknowledges funds from the Galician Government (grants ED431C 2022/47 and ED431G 2019/01, both including FEDER financial support). I.O.M. acknowledges MCIN/AEI/10.13039/501100011033 funding through grant PID2021-127888NA-I00 (COMPSYNBIO). G.Sz. acknowledges the support of the Hungarian National Research, Development and Innovation Office (NKFIH) through the grant 145934. M.A.V. acknowledges the support of the ÚNKP-22-3-I-PPKE-72 National Excellence Program of the Hungarian Ministry for Innovation and Technology from the source the NFKIH. Funding Open access funding provided by Pázmány Péter Catholic University. Data Availability All data generated or analysed during this study are included in this published article. Our implementation along with the examples found in this manuscript can be found at the following GitHub repository: mihalyvaghy/PIDE. Open Access ThisarticleislicensedunderaCreativeCommonsAttribution4.0InternationalLicense,which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. References Anderson DF (2011) A proof of the global attractor conjecture in the single linkage class case. SIAM J Appl Math 71:1487–1508 Anderson DH (2013) Compartmental modeling and tracer kinetics, vol 50. Springer, Berlin Angeli D (2009) A tutorial on chemical reaction network dynamics. Eur J Control 15:398–406 Ay A, Arnosti DN (2011) Mathematical modeling of gene expression: a guide for the perplexed biologist. Crit Rev Biochem Mol Biol 46:137–151 Barbuti R, Gori R, Milazzo P, Nasti L (2020) A survey of gene regulatory networks modelling methods: from differential equations, to Boolean and qualitative bioinspired models. J Membr Comput 2:207–226 Berg OG (1978) A model for the statistical fluctuations of protein numbers in a microbial population. J Theor Biol 71:587–603 Berg OG (1978) A model for the statistical fluctuations of protein numbers in a microbial population. J Theor Biol 71:587–603 Berman A, Plemmons RJ (1994) Nonnegative matrices in the mathematical sciences. SIAM, Philadelphia BokesP,Singh A (2019) Controlling noisyexpressionthrough auto regulationofburstfrequencyand protein stability. In: ˇ Ceška M, Paoletti N (eds) Hybrid systems biology. Springer, Cham, pp 80–97 Bokes P, King JR, Wood ATA, Loose M (2011) Multiscale stochastic modelling of gene expression. J Math Biol 65:493–520 Bokes P, King JR, Wood ATA, Loose M (2013) Transcriptional bursting diversifies the behaviour of a toggle switch: hybrid simulation of stochastic gene expression. Bull Math Biol 75:351–371 Bortner C, Meshkat N (2022) Identifiable paths and cycles in linear compartmental models. Bull Math Biol 84:53 Brown RF (1980) Compartmental system analysis: state of the art. IEEE Trans Biomed Eng BME–27:1–11 CañizoJA, CarrilloJA,PájaroM(2019) Exponential equilibrationof genetic circuits usingentropymethods. J Math Biol 78:373–411 Chellaboina V, Bhat SP, Haddad WM, Bernstein DS (2009) Modeling and analysis of mass-action kinetics. IEEE Control Syst 29:60–78 Cobelli C, Romanin-Jacur G (1976) Controllability, observability and structural identifiability of multi input and multi output biological compartmental systems. IEEE Trans Biomed Eng BME–23:93–100 Dandach SH, Khammash M (2010) Analysis of stochastic strategies in bacterial competence: a master equation approach. PLoS Comput Biol 6:e1000985 123 A Kinetic Finite Volume Discretization of the… Page 25 of 26 22 Dar RD et al (2012) Transcriptional burst frequency and burst size are equally modulated across the human genome. Proc Natl Acad Sci 109:17454–17459 Dar RD, Razooky BS, Weinberger LS, Cox CD, Simpson ML (2015) The low noise limit in gene expression. PLoS ONE 10:e0140969 De Jong H (2002) Modeling and simulation of genetic regulatory systems: a literature review. J Comput Biol 9:67–103 Elgart V, Jia T, Fenley AT, Kulkarni R (2011) Connecting protein and mRNA Burst distributions for stochastic models of gene expression. Phys Biol 8:046001 Érdi P, Tóth J (1989) Mathematical models of chemical reactions: theory and applications of deterministic and stochastic models. Manchester University Press, Manchester Eymard R, Gallouët T, Herbin R (2000) Finite methods. Elsevier Feinberg M (2019) Foundations of Chemical Reaction Network Theory. Springer, Cham Fernández C, Faquir H, Pájaro M, Otero-Muras I (2022) Feedback control of stochastic gene switches using PIDE models. IFAC-PapersOnLine 55:62–67 Foster DM, Jacquez JA (1975) Multiple zeros for eigenvalues and the multiplicity of traps of a linear compartmental system. Math Biosci 26:89–97 Friedman N, Cai L, Xie XS (2006) Linking stochastic dynamics to population distribution: an analytical framework of gene expression. Phys Rev Lett 97:168302 Godfrey K (1983) Compartmental models and their application. Academic Press, London Haddad WM, Chellaboina V, Hui Q (2010) Nonnegative and compartmental dynamical systems. Princeton University Press, Princeton Jacquez JA, Simon CP (1993) Qualitative theory of compartmental systems. SIAM Rev 35:43–79 Kaern M, Elston TC, Blake WJ, Collins JJ (2005) Stochasticity in gene expression: from theories to phenotypes. Nat Rev Genet 6:451–464 Karlebach G, Shamir R (2008) Modelling and analysis of gene regulatory networks. Nat Rev Mol Cell Biol 9:770–780 LeVeque RJ (2002) Finite volume methods for hyperbolic problems. Cambridge University Press, Cambridge Mackey MC, Tyran-Kami´nska M (2015) The limiting dynamics of a bistable molecular switch with and without noise. J Math Biol 73:367–395 MacNeil LT, Walhout AJ (2011) Gene regulatory networks and the role of robustness and stochasticity in the control of gene expression. Genome Res 21:645–657 Maeda H, Kodama S (1979) Some results on nonlinear compartmental systems. IEEE Trans Circuits Syst 26:203–204 Maeda H, Kodama S, Ohta Y (1978) Asymptotic behavior of nonlinear compartmental systems: nonoscillation and stability. IEEE Trans Circuits Syst 25:372–378 McAdams H, Arkin A (1997) Stochastic mechanisms in gene expression. Proc Natl Acad Sci 94:814–819 Meshkat N, Sullivant S, Eisenberg M (2015) Identifiability results for several classes of linear compartment models. Bull Math Biol 77:1620–1651 Pájaro M, Alonso AA, Vázquez C (2015) Shaping protein distributions in stochastic self-regulated gene expression networks. Phys Rev E 92:032712 Pájaro M, Alonso AA, Otero-Muras I, Vázquez C (2017) Stochastic modeling and numerical simulation of gene regulatory networks with protein bursting. J Theor Biol 421:51–70 Pájaro M, Otero-Muras I, Vázquez C, Alonso AA (2017) SELANSI: a toolbox for simulation of stochastic gene regulatory networks. Bioinformatics 34:893–895 Pájaro M, Otero-Muras I, Vázquez C, Alonso AA (2019) Transient hysteresis and inherent stochasticity in gene regulatory networks. Nat Commun 10:4581 Peter IS, Davidson EH (2015) Genomic control process: development and evolution. Academic Press, London Rap PE (1986) In oscillations and chaos in cellular metabolism and physiological systems. In: Holden AV (ed) Chaos, vol 9. Princeton University Press, London, pp 179–208 Reuter GEH (1957) Denumerable Markov processes and the associated contraction semigroups on l. Acta Math 97:1–46 Sequeiros C, Vázquez C, Banga JR, Otero-Muras I (2022) Automated design of synthetic biocircuits in the stochastic regime. IFAC-PapersOnLine 55:630–634 123