Phase computations and phase models for discrete molecular oscillators
 Onder Suvak^{1}Email author and
 Alper Demir^{1}
DOI: 10.1186/1687415320126
© Suvak and Demir; licensee Springer. 2012
Received: 8 January 2012
Accepted: 11 June 2012
Published: 11 June 2012
Abstract
Background
Biochemical oscillators perform crucial functions in cells, e.g., they set up circadian clocks. The dynamical behavior of oscillators is best described and analyzed in terms of the scalar quantity, phase. A rigorous and useful definition for phase is based on the socalled isochrons of oscillators. Phase computation techniques for continuous oscillators that are based on isochrons have been used for characterizing the behavior of various types of oscillators under the influence of perturbations such as noise.
Results
In this article, we extend the applicability of these phase computation methods to biochemical oscillators as discrete molecular systems, upon the information obtained from a continuousstate approximation of such oscillators. In particular, we describe techniques for computing the instantaneous phase of discrete, molecular oscillators for stochastic simulation algorithm generated sample paths. We comment on the accuracies and derive certain measures for assessing the feasibilities of the proposed phase computation methods. Phase computation experiments on the sample paths of wellknown biological oscillators validate our analyses.
Conclusions
The impact of noise that arises from the discrete and random nature of the mechanisms that make up molecular oscillators can be characterized based on the phase computation techniques proposed in this article. The concept of isochrons is the natural choice upon which the phase notion of oscillators can be founded. The isochrontheoretic phase computation methods that we propose can be applied to discrete molecular oscillators of any dimension, provided that the oscillatory behavior observed in discretestate does not vanish in a continuousstate approximation. Analysis of the full versatility of phase noise phenomena in molecular oscillators will be possible if a proper phase model theory is developed, without resorting to such approximations.
Keywords
discrete molecular oscillators oscillator phase noise phase noise numerical methods Monte Carlo methods Stochastic Simulation Algorithm (SSA) isochrons phase equations phase computation schemes phase models1. Introduction
1.1 Oscillators in biological and electronic systems
Oscillatory behavior is encountered in many types of systems including electronic, optical, mechanical, biological, chemical, financial, social and climatological systems. Carefully designed oscillators are intentionally introduced into many engineered systems to provide essential functionality for system operation. In electronic systems, oscillators are used to generate clock signals that are needed in the synchronization of operations in digital circuits and sampleddata systems. The periodic signal generated by an electronic oscillator or monochromatic light from a laser is used as a carrier and for frequency translation of signals in wireless and optical communication systems. Oscillatory behavior in biological systems is seen in population dynamics models (preypredator systems), in neural systems [1], in the motor system, and in circadian rhythms [2]. Intracellular and intercellular oscillators of various types perform crucial functions in biological systems. Due to their essentialness, and intricate and interesting dynamic behavior, biological oscillations have been a research focus for decades. Genetic oscillators that are responsible for setting up the circadian rhythms have received particular attention [3]. Circadian rhythms are crucial for the survival of many species, and there are many health problems associated with the disturbance of these clocks in humans [4, 5]. For instance, working night shifts has been recently listed as a probable cause of cancer by the World Health Organization [6–8]. A milestone in synthetic biology is the work in [9] reporting on a genetic regulatory network called the repressilator, essentially a synthetic genetic oscillator.
Oscillators in electronic and telecommunication systems are adversely affected by the presence of undesired disturbances in the system. Various types of disturbances such as noise affect the spectral and timing properties of the ideally periodic signals generated by oscillators, resulting in power spreading in the spectrum and jitter and phase drift in the time domain [10]. Unlike other systems which contain an implicit or explicit time reference, autonomously oscillating systems respond to noise in a peculiar and somewhat nonintuitive manner. Understanding the behavior of oscillators used in electronic systems in the presence of disturbances and noise has been a preoccupation for researchers for many decades [11]. The behavior of biological oscillators under various types of disturbances has also been the focus of a good deal of research work in the second half of the 20th century [1, 2, 12, 13].
1.2 Phase models for oscillators
The dynamical behavior of oscillators is best described and analyzed in terms of the scalar quantity, phase. Of the pertaining notions in the literature, the most straightforward phase definition is obtained when a planar oscillator is expressed in polar coordinates, with amplitude and polar angle as the state variables. The usefulness of the polar angle as phase does not generalize to higher dimensional oscillators. In the general case, it is our conviction that the most rigorous and precise definition of phase is the one that is based on the socalled isochrons (formed from inphase points in the statespace) of an oscillator [1, 2, 14, 15]. The notion of isochrons was first proposed by Winfree [2, 14] in 1974. It was later revealed that isochrons are intimately related to the notion of asymptotic phase in the theory of differential equations [16, 17]. The isochron theoretic phase of a freerunning, noiseless oscillator is simply time itself. Such an unperturbed oscillator serves as a perfect time keeper if it is in the process of converging to a limit cycle, even when it has not yet settled to a periodic steadystate solution. Perturbations make the actual phase deviate from time, due to the degrading impact of disturbances on the time keeping ability.
Phase is a quantity that compactly describes the dynamical behavior of an oscillator. One is then interested in computing the phase of a perturbed oscillator. If this can be done in a semi or fully analytical manner for a practical oscillator, one can draw conclusions and obtain useful characterizations in assessing the time keeping performance. Indeed, we observe in the literature that, in various disciplines, researchers have derived phase equations that compactly describe the dynamics of weakly perturbed oscillators [1, 11]. It appears that a phase equation for oscillators has first been derived by Malkin [18] in his work on the reduction of weakly perturbed oscillators to their phase models [1], and the same equation has been subsequently reinvented by various other researchers in several disciplines [2, 11, 19]. This phase equation has been used in mathematical biology to study circadian rhythms and coupled oscillators in the models of neurological systems [1, 2, 20], and in electronics for the analysis of phase noise and timing jitter in oscillators [11, 21]. Phase equations have great utility in performing (semi) analytical phase computations. However, simpler and more accurate schemes for numerical phase computations have been recently proposed [15, 22]. In some applications, merely a technique for computing the instantaneous phase of an oscillator for a given perturbation is needed. In this case, not only the machinery of phase equations is not necessary but also one can perform more accurate phase computations in a much simpler and straightforward manner.
1.3 Phase computations for discrete oscillators
We have proposed in [15] a numerical method for the computation of quadratic approximations for the isochrons of oscillators. In [22], we have reviewed the derivation of the firstorder phase equation (which is based on the linear approximations for isochrons [1, 2, 20]), with a formulation based on the isochrontheoretic oscillator phase. On top of this, in [22] we have also made use of again the quadratic isochron approximations of [15] to derive a novel secondorder phase equation that is more accurate than the firstorder. However, the phase equations [22] and phase computation schemes [15] discussed above are founded on continuous oscillators described by differential equations. Therefore, these models and techniques do not directly apply to the analysis of molecular oscillators with discretespace models. In this article, we present a methodology, enabling the application of these continuous phase models [22] and the phase computation schemes [15] on biological oscillators modeled in a discrete manner at the molecular level. Our preliminary results recently appeared in a workshop presentation [23]. This article details and expands on our contributions over this methodology.
We now summarize the workflow followed in the methodology and also give an outline of the article. Section 2 provides background information describing how the discrete model of the oscillator is transformed into a continuous, differential equation model through a limiting process based on the assumption that the concentration of molecular species in the model of the oscillator are large so that discrete effects are negligible [24–30]. It should be particularly noted that the reaction events in an SSA sample path (as generated by Gillespie's Stochastic Simulation Algorithm (SSA) [25]) are the most crucial ingredients in translating the continuousstate formalism on oscillator phase for use on molecular oscillators.
Section 3 actually describes our major contribution, i.e., how discretestate oscillator phase computation is accomplished using the paradigms of phase equations and phase computation schemes. Using the phase modeling techniques mentioned above, a continuous phase model (depending on the model developed in Section 2) is constructed and discretized. The noise sources in this discretized phase model are represented as a cumulation of the events occurring in the discrete model of the oscillator. This twoway continuousdiscrete transformation mechanism enables us to perform phase computations for discrete, molecular oscillators based on the continuous phase model theory [22]. Moreover, the fact that the noise sources in the phase computation are synthesized from the same events in the SSA sample path makes onetoone comparisons with full SSA [25] based simulations possible. The phase model constructed as such from the continuouslimit model of the oscillator is accurate when a large number of molecules exist for every species. However, in many biological molecular oscillators, the number of molecules can be quite small. Large deviations from the continuous limit for such oscillators cause computations via continuous firstorder phase models based on linear isochron approximations to become inaccurate. This was the observation that prompted our work on the quadratic (as opposed to linear) approximation theory and computational techniques for the isochrons of oscillators [15, 22]. With phase computation schemes based on quadratic isochron approximations [15], deviations from the continuousdeterministic limit are much better captured and more accurate phase computations for discrete oscillators even with few molecules can be performed.
In Section 4, we provide a brief literature review of the approaches taken in the phase noise analysis of oscillators. Several seminal articles in the literature [11, 31–36] are categorized according to three classification schemes in particular: the nature of the oscillator model used, the nature of the analysis method, and the phase definition adopted. We also classify in Section 4 the approach proposed in this article within the same framework.
Section 5 provides performance results for the proposed phase computation methods running on intricate molecular oscillators. The results are as expected, i.e., phase equations are quite accurate and fast for oscillators in a larger volume with big molecule numbers for the species, but they lose accuracy when a smaller volume is considered and noise effects become pronounced. Phase computation schemes are always very accurate, even in smaller volumes, but they are not as fast as the equations. Several crucial points in the theory underlying the methods are also emphasized in the discussion throughout this section. Section 6 concludes the article and suggests some future research directions.
The next three sections constitute the detailed explanation of the proposed methods. Sections 7 and 8 are expanded versions of Sections 2 and 3, respectively, with hints and references to derivations. Section 9 explains how and where molecular oscillator models can be obtained to test the proposed algorithms, which types of information are obtained from the models in preparation for oscillator phase analysis, numerical implementation details for the proposed phase computation methods, and in this section are also derived the computational complexities for these methods.
2 Modeling and simulation of discrete molecular oscillators
Above in (1), x represents the state of a molecular oscillator. The solution of this equation yields $\mathbb{P}\left(\mathbf{x},t\right)$, i.e., the probability that the oscillator is visiting a certain state x at time t. Also, in (1), a_{ j }(x) is called the propensity of the j th reaction (note that we have M possible reactions), while the oscillator is again visiting the state x. This propensity function facilitates the quantification of how much of a probability we have of reaction j occuring in the next infinitesimal time. The constant vector s_{ j }defines the changes in the numbers of molecules for the species constituting the oscillatory system, when reaction j occurs. The CME corresponds to a continuoustime Markov chain. Due to the exponential number of state configurations for the system, CME is generally very hard to construct and solve. Therefore, one prefers to generate sample paths for the system using Gillespie's SSA [25], whose ensemble obeys the probability law dictated by the CME.
which is mathematically obtained by crossing out the second term on the righthand side of (2). The RRE model for an oscillator has a solution that is perfectly periodic without noisy fluctuations. On the other hand, the solution of the CLEs produces oscillatory sample paths with fluctuations around the periodic orbit on top of the deterministic solution of the RREs [28].
3 Phase computations based on Langevin models
The perturbation projection vector (PPV) v(t) is defined as the gradient of the phase $\widehat{t}$ of an oscillator [22] on the limit cycle represented by x_{s}(t). The PPV, which is equivalent to the infinitesimal phase response curves (PRCs) [1], is instrumental in forming linear approximations for the isochrons of an oscillator. The matrix H(t) is defined as the Hessian of the phase $\widehat{t}$ (and the Jacobian of the PPV) [22] on the limit cycle. The phase Hessian H(t) is useful in forming quadratic approximations for the isochrons of an oscillator. The PPV v(t) and the Hessian H(t) can be computed using the techniques described in [15].
In summary, we point out the acronyms and some properties of the proposed phase computation methods for convenience. The phase equations are PhEqnLL, PhEqnQL, and PhEqnQQ. The phase computation schemes are PhCompBF (the most accurate but computationally expensive method), PhCompLin, and PhCompQuad. The schemes employ no approximations in orbital deviation, therefore they are expected to be more accurate with respect to the equations. The equations, on the other hand, have low computational complexity and can generate results very fast. We also show in this article that there is a tradeoff between accuracy and computational complexity for these methods.
4 Related work
A classification scheme for categorizing previous work, pertaining to the phase noise analysis of biochemical oscillators, can be described as follows.
First, we note that there are basically two types of models for inherently noisy biochemical oscillators, i.e., discrete and continuousstate. CME describes the probabilistic evolution of the states of an oscillator, and it is referred to as the most accurate characterization for discrete molecular oscillators. Through approximations, one derives from CME the CLE, a continuousstate noisy model. CLE can be used to extract crucial information about the continuousstate system that is an approximate representation of its discretestate ancestor. We note here that, in oscillator phase noise analyses, mostly the continuousstate model has been utilized [11, 31–36].
Second, the nature of the phase noise analyses conducted can be considered in two categories, i.e., semianalytical techniques and sample pathbased approaches. Semianalytical techniques have been developed, in particular, for the stochastic characterization of phase diffusion in oscillators [11, 31–36]. In biology, CLE has been used as a tool in illustrating and quantifying the phase diffusion phenomena [31–34, 36]. Characterization and computations pertaining to phase diffusion in electronic oscillators were carried out through a stochastic phase equation and the probabilistic evolution of its solutions [11], noting that the phase equation used was derived from an SDE (a Stochastic Differential Equation describing a noisy electronic oscillator) that corresponds to the CLE for biochemical oscillators. In all, these semianalytical techniques are based on the continuousstate model of an oscillator. Regarding sample pathbased approaches, one may recall that, in discrete state, SSA is used to generate sample paths, whose ensemble obeys the CME. In continuous state, CLE can in turn be used to generate sample paths. A recent study [35] illustrates derivations of the crucial findings presented in [11, 33, 34] and adopts an approach for phase diffusion constant computation, based on the transient phase computation of CLEgenerated sample paths in an ensemble.
Third, oscillator phase can be defined via two different methods. There are the Hilbert transformbased and the isochronbased definitions. The phase computation based on the Hilbert transform [37] takes the evolution of a single state variable within a sample path to compute the phases of all time points in the whole sample path. The Hilbert transformbased phase computation technique can be used to compute the phase of any oscillatory waveform, without any information as to where this waveform came from. The oscillatory waveform could belong to one of the state variables of an oscillator generated with a simulation. This method has been utilized in [31, 35] for phase computations of sample paths. The isochrontheoretic phase (recall that an isochron portrait belongs to a limit cycle of the deterministic RRE) makes use of all of the state variables and equations for an oscillator. The isochronbased phase definition assigns a phase value to the points in the state space of the oscillator, making phase a property of the whole oscillator, not a property of just a certain state variable or a waveform obtained with a simulation of the oscillator [15, 22]. Note that even though there appears to be empirical evidence [31, 35] that there is a correspondence between the Hilbert transformbased and isochronbased phase definitions, a precise connection has not been worked out in the literature.
The hybrid phase computation techniques proposed in this article apply to discretestate models and particularly the SSA generated sample paths of these models, based on the isochrontheoretic oscillator phase definition. Our approach is hybrid because isochrons are obtained based on the continuous model but the phase traces are computed for the sample paths generated by an SSA simulation that is based on the discrete model for an oscillator. This hybrid approach targets moderately noisy oscillators, within a container of not too large or small volume, consequently with not too high or low molecule numbers for the species in the system, respectively.
5 Results and discussion
We now present results obtained with the proposed methods for oscillator phase computations on several intricate molecular oscillators. Accuracy demonstrations and computational speedup figures will be given with respect to PhCompBF, the bruteforce scheme, which we accept as the golden reference for oscillator phase computations, since this method does not employ any approximations in either isochrons or orbital deviations. Section 5.1 below, in which we analyze the brusselator, contains details pertaining to the general flow of the phase computations and the preparatory procedures for all the methods. Sections 5.2 and 5.3 are brief sections illustrating the performance of the methods for oscillators called the oregonator and the repressilator, respectively. All simulations were run on a computer with an Intel i7 processor at 3.07 GHz and accommodating 6 GB of memory.
5.1 Brusselator
Parameter values in (6) are: k_{1} = 0.025 s^{1}, k_{2} = 1 s^{1} mL, k_{3} = 1 s^{1} (mL)^{2}, and k_{4} = 0.01 s^{1}. Volume is set to 250 mL. Molecule numbers of A, B, R, and S are held, constant.
Note that in deriving (10) and (11) from (9), the variables X and Y (which represent molecule numbers, not concentrations, of the species X and Y, respectively) have become continuous instead of remaining discrete. In preparation for phase analysis, some computational quantities have to be derived from (11).
In Figure 9, we would like to solve eventually for the timeevolving relative phase shift of the SSA sample path, for now with PhCompBF. This means solving for the phase shift for the visited states in the sample path, denoted by circles in the figure, and preferably for all the states in between the circles along the path as well. PhCompBF requires running a particular type of simulation for computing the relative phase shift of each visited state. We will demonstrate the method shortly, but let us comment on how much information can be gained by inspecting only the plot in Figure 9. The SSA simulation suggests that the system continually introduces noise, so that everything about the system appears noisy, the phase, the amplitude, etc. Phase is a particular quantity that helps quantify the effect of noise on an autonomously oscillating system. One may easily guess that the relative phase shift of the SSA sample path is always changing along the interval of simulation. It is not obvious at all how to compute this phase shift at particular points in time in Figure 9. Perhaps, one may argue that the sudden decrease that should take place at about t = 200 s for the unperturbed x_{s}(t), appears about 200s in time later for the SSA path. However, this is only an educated guess and an approximate value. Also, that the stars and circles appear very close to each other for example in between 600 and 1000s does not directly help invoke the isochrontheoretic phase theory to deduce that the phase shift along this interval is close to zero. Recalling that Figure 9 depicts only species Y, one has to inspect also the other species to arrive at such a conclusion. It is also needless to state as a reminder that for two states to have the same relative phase, having the two states equal to each other is a sufficient but not necessary condition, again due to isochron theory. In all, accurately what happens to the phase shift along the interval is still obscure. As a side note, one should also note that without the perfectly periodic x_{s}(t), it is awfully difficult to guess the period T, inspecting only a long SSA sample path. Relevant theory for noisy oscillators suggests that inspecting the zerocrossings of a whole ensemble of long and mildly noisy SSA sample paths yields information related to the period and phase diffusion constant of an oscillator, in a bruteforce manner [11].
For some oscillators (as determined by the dynamics of the RRE again), a state off the limit cycle converges fast to begin tracing quickly an almost periodic curve, as in the case in hand. Almost two periods are enough to deduce the phase shift between the two curves. After RRE simulations, the phase shift can be computed using Fourier transforms [15].
One question that may arise is why we are particularly using the traces belonging to the species Y to compute phase shifts in Figure 11. Indeed, it follows from the theory that phase is a scalarvalued property of the whole system, therefore investigating phase shifts over nonconstant periodic molecule numbers for any species in a system would yield the same phase shift value. In this case, employing Y is only a matter of choice.
Notice that this bruteforce scheme is carried out to compute the relative phase shift of the SSA sample path at only t_{0} = 600 s. The phase shift for each state along the sample path can be computed one by one through the just outlined PhCompBF.
Phase computation schemes are fairly easy to comprehend geometrically. Regarding for example the limit cycle depicted in Figure 10, there are both a hyperplane (accounting for the linear isochron approximation) and a quadric surface (for quadratic approximation) associated with each point on the limit cycle. Equations for these characterizations are given in (40) and (41), respectively. A phase computation scheme aims to solve for that point on the limit cycle whose linear or quadratic isochron approximation passes through a given point, for example the stated point denoted by the circle off the limit cycle in Figure 10, x_{ssa}(t_{0} = 600 s). Notice that PhCompBF is also a variant of these phase computation schemes, but in this case not the isochron approximations but the exact isochrons themselves associated with points on the limit cycle are used.
The geometrical interpretations of phase equations, on the other hand, are not easy to visualize. As stated in previous sections, phase equations are differential equations involving orbital deviation in addition to isochron approximations. Phase computation schemes are expected to be more costly but then more accurate with respect to phase equations. Phase equations, as they are differential equations and need to be discretized, suffer from local truncation errors and global errors, whereas this is not the case for the schemes that are in the form of algebraic equations. An approximate phase computation scheme may deviate from the golden reference (PhCompBF result) at times (particularly if the noisy state is too far off the limit cycle), but the scheme (if carefully designed) does not suffer from the accumulation of truncation errors and its phase results are expected to be almost always very close to that of PhCompBF.
5.2 Oregonator
In (12), the propensity functions, employing also the volume of the container, can easily be derived. Parameter values are: k_{1} = 0.005 s ^{1} mL, k_{2} = k_{3} = k_{4} = 1 s^{1} mL, and k_{5} = 1.25 × 10 ^{4} s^{1} (mL)^{3}. Molecule numbers for the reactants A, B, and R are held constant. For this model, the volume initially is set to 12,000 mL. In this case, noise will not have considerable effect on a sample path. Then, we set the volume to 3,200 mL in order to obtain a moderately noisy oscillator. Later on, we will, halve the value of the volume parameter, resulting in a very noisy oscillator, and the performance of the phase computation methods will be demonstrated for this latter case as well.
5.3 Repressilator
6 Conclusions and future work
The phase computation methods described in this article basically target three classes of discrete molecular oscillators. First, the continuous phase models, based on the information obtained from the oscillator model in the continuousstate limit (i.e., basically the limit cycle and isochron approximations), are acceptably accurate for discrete molecular oscillators with a large number of molecules for each species, in a big volume. Indeed, we have shown in this article that the phase equations serve this purpose well. Second, for oscillators with very few molecules for each species in a small volume, a new phase concept needs to be developed, without resorting to continuous limit approximations. This one is as yet an unsolved problem. Third, there are systems in between the two classes just stated, with moderate number of molecules, for which the continuous phase concept is still useful but requires a hybrid approach with combined use of both discrete and continuous models for acceptable accuracy (note that the phase computation schemes are tailored to concretize this hybrid approach), and this is where the contribution of this article should be placed.
As yet, the described methods benefit extensively from continuous statespace approximations derived from the molecular descriptions of such oscillators, and the assumed most accurate bruteforce scheme shares this aspect. A future direction furthering this study can be described as follows, in line with the necessity of handling the second class of oscillators stated above. A proper phase model theory (not relying on continuous limit approximations) for discretespace oscillators modeled with Markov chains needs to be developed. We believe that such a discrete phase model theory can be developed based on cycle representations for Markov chains [46–48]. We made progress also on this problem. We have developed a theory that precisely characterizes the phase noise of a single cycle in a continuoustime Markov chain. We were able to show that the phase noise theory we have developed for a single cycle in fact reduces to the previously developed continuousspace phase noise theory in the limit. We are currently working on extending this discrete phase noise theory to many cycles, i.e., to a cycle decomposition of a continuoustime Markov chain.
7 Methods  Modeling and simulation of discrete molecular oscillators
In this section we review, after giving preliminary information (Section 7.1), some crucial paradigms in the modeling of discrete molecular oscillators: a model that is the complete probabilistic characterization of a discrete system, known as the CME (Section 7.2), a continuous deterministic approximation to the CME in the form of the Reaction Rate Equation (Section 7.3), and the steps that let us proceed to a continuous stochastic model, the Chemical Langevin Equation, from again the CME (Section 7.4). Also a descriptive review of the SSA algorithm of Gillespie [25] for the simulation of molecular models is provided in Section 7.5.
7.1 Preliminaries
7.2 Chemical master equation
where Q is a constant square matrix with dimension ns × ns, known as the transition rate matrix [28, 29]. The above is a linear system of homogeneous ODEs, but the number of state configurations ns is possibly huge. It is usually not practically feasible to construct and solve (19). CME in (16) and (19) above corresponds to a homogeneous, continuoustime Markov chain model [28–30]. The state transitions of this Markov chain are highly structured and compactly described by the list of the reactions as in the CME. The CME provides the ultimate probabilistic characterization for a discrete molecular oscillator. It was shown that the solution of the CME converges to a unique stationary distribution. For a discrete molecular oscillator with a limit cycle, this stationary probability distribution takes the form of a "probability crater" for a planar system with two species [47].
7.3 From the stochastic CME to the deterministic rate equations
is an M × 1 column vector of reaction propensities evaluated at X(t). The above system of deterministic ODEs in (21) is known as the RRE [24, 27].
7.4 From CME to Langevin model
denotes the diagonal M × M matrix function shown in (25). We note here that if the stochastic, fluctuation term (known as the diffusion term) above is omitted, we obtain the RREs in (21). We note here that, with the Langevin model, the stochastic fluctuations in the oscillator are captured by the second term in the right hand side in (25). This term represents an additive noise in the model. By zeroing this additive noise term, we are able to obtain the mean, deterministic dynamics of the oscillator as the solution of the RREs in (21). On the other hand, in the discrete, Markov chain model of the oscillator, the mean, deterministic behavior of the system and the stochastic fluctuations are not separable from each other [26–28, 30].
7.5 Stochastic simulation algorithm (SSA)
Even though the CME in (16) and (19) provides the ultimate probabilistic characterization for a discrete molecular oscillator, its solution is most often not practical due to the huge number of possible state configurations. As a result, one most often performs a stochastic simulation of the continuoustime Markov chain that models the oscillator and generates a sample path or a realization for the state vector X(t) as a function of time t. This kind of a simulation can be performed with a technique called the SSA, proposed in Gillespie's seminal work [25]. In the original SSA algorithm [25], the computational cost per reaction event (due to the generation of a random variable from a dynamic discrete probability distribution) is $\mathcal{O}\left(M\right)$ in the number of reactions M. The cost per reaction event can be reduced to $\mathcal{O}\left(\text{log}M\right)$ by using a binary tree for random selection of reactions [49], and to $\mathcal{O}\left(1\right)$ under certain conditions [50]. One also has to consider the fact that the time gap between reactions tends to shrink as the number of reactions M, the number of species N, and the number of molecules of every species increases. This means that the total computational cost of SSA for a given time period increases as a result [24]. On the other hand, if the numbers of molecules of all of the species are very large, discrete stochastic simulation of a discrete molecular oscillator in the sense of SSA may be unnecessary [24, 27]. In this case, the fluctuations around the deterministic limit cycle will be small, and the continuous Langevin model in (25) may be adequate. As the number of molecules increase, the reaction propensities a_{ j }(X(t)) become larger, and the fluctuation term in the Langevin model in (25) become less and less pronounced in comparison with the drift term, since the magnitude of the drift term is proportional to the reaction propensities whereas the fluctuation term is proportional to their square root [26–28].
Molecular models, their nature (as discrete or continuous, and as stochastic or deterministic), and the algorithms to solve these models are summarized in Figure 1. The approximation that leads us from the discrete stochastic CME to the continuous stochastic CLE is the Gaussian approximation to Poisson random variables and accordingly the τleap approximation. Similarly, infinite volume approximation takes us from the CLE to the continuous deterministic RRE. Sample paths in line with the CME can be generated through SSA. CLE is a type of stochastic differential equation, so it can be solved via appropriate algorithms. Solution of the RRE requires algorithms designed for ordinary differential equations (ODEs) [26–28].
8 Methods  Phase computations based on Langevin models
There exists a well developed theory and numerical techniques for phase characterizations of oscillators with continuousspace models based on differential and stochastic differential equations [15, 22]. As described in Sections 7.3 and 7.4, continuous models in the form of differential and stochastic differential equations can be constructed in a straightforward manner for discrete molecular oscillators. Thus, one can in principle apply the previously developed phase models and computation techniques [15, 22] to these continuous models.
The outline of this section is as follows: After presenting the preliminaries (Section 8.1), the phase computation problem is introduced (Section 8.2). The methods in Section 8.3 (phase models in the form of ODEs) and in Section 8.4 (phase computation schemes that involve the numerical solution of certain algebraic equations) are designed to numerically solve the phase computation problem of Section 8.2.
8.1 Preliminaries
For a molecular oscillator, we assume that the deterministic RREs in (21) have a stable periodic solution x_{s}(t) (with period T ) that represents a periodic orbit or limit cycle.
An isochron of an oscillator associated with the limit cycle x_{s}(t) is a set of points that have the same phase. For an Ndimensional oscillator, each isochron is an N 1dimensional hypersurface. The union of isochrons covers the neighborhood of its periodic orbit [1, 14]. Isochrons form the basis for phase definition and phase computations for oscillators [22]. In Figure 3, the limit cycle and the isochron portrait of a simple polar oscillator are shown [2, 15].
where u(t) = dx_{s}(t)/dt. The entries of the PPV are the infinitesimal PRCs [1]. The PPV is instrumental in forming linear approximations for the isochrons of an oscillator and in fact is the gradient of the phase of an oscillator [22] on the limit cycle represented by x_{s}(t).
taking into note that actually both v(t) = v(x_{s}(t)) and H(t) = H(x_{s}(t)) are functions of the periodic solution x_{s}(t). The function H(t) is in fact the Hessian of the phase of an oscillator [22] on the limit cycle represented by x_{s}(t). This matrix function is useful in forming quadratic approximations for the isochrons of an oscillator.
8.2 Phase computation problem
The phase computation problem for oscillators can be stated as follows. It is observed in Figure 2 that assuming an SSA sample path and the periodic RRE solution start at the same point on the limit cycle (note that the two are inphase initially), the two trajectories may end up on different isochrons instantaneously at t = t_{0} (i.e., the two traces at this instant are out of phase). However, according to the properties of isochrons, there is always a point on the limit cycle that is inphase with a particular point near the limit cycle. Therefore, the existence of ${\mathbf{x}}_{\text{s}}(\widehat{t})$ inphase with the instantaneous point x_{ssa}(t_{0}) is guaranteed. We call then the time argument $\widehat{t}$ of ${\mathbf{x}}_{\text{s}}(\widehat{t})$ the instantaneous phase of x_{ssa}(t_{0}) [1, 2, 14, 22]. All methods described below in this section are designed to numerically compute this phase value.
8.3 Phase equations based on Langevin models
In this section, oscillator phase models in the form of ODEs are described. In [22], we have reviewed the first order phase equation based on linear isochron approximations, and we have also developed novel and more accurate second order phase equations depending on quadratic approximations for isochrons. We will, furthermore in this section, explain how to apply these models to discrete oscillator phase computation.
8.3.1 Firstorder phase equation based on linear isochron approximations
where $\widehat{t}$ represents the total phase of the oscillator (in units of time) and v(t) is the PPV discussed above. The value ${\mathbf{x}}_{\text{s}}(\widehat{t})$, the periodic solution x_{s}(t) evaluated at the perturbed phase $\widehat{t}$, represents possibly a good approximation for the solution of the Langevin equation in (25) provided that the perturbed oscillator does not wander off too far away from the deterministic limit cycle represented by x_{s}(t).
is an M × 1 column vector of reaction propensities evaluated at ${\mathbf{x}}_{\text{s}}(\widehat{t})$. The form of the update rule above in (33) can be deduced by examining (24) where we have approximated a Poisson random variable with a Gaussian one. With (33) above, the sample paths for the white Gaussian processes ξ(t) in (25) (and hence the Wiener processes as their integral) are being generated as a cumulation of the individual events, i.e., reactions, that occur in the SSA simulation of the oscillator at a discrete, molecular level. In the update rule (33), we subtract $a\phantom{\rule{0.5em}{0ex}}({\mathbf{x}}_{\text{s}}(\widehat{t}(t)))\phantom{\rule{0.5em}{0ex}}\tau $ from e_{ j }that represents an individual reaction event in order to make the synthesized ξ_{ j }(t) zero mean. The mean, deterministic behavior of the oscillator is captured by the first drift term on the right hand side of (25) which is used in the computation of the periodic steadystate solution x_{s}(t) and the PPV v(t). Thus, the mean behavior is already captured, and that is why, it needs to be subtracted in (33). We can now compare ${\mathbf{x}}_{\text{s}}(\widehat{t})$ and the SSA generated sample path in a onetoone manner in order to assess the quality of ${\mathbf{x}}_{\text{s}}(\widehat{t})$. We should note here that the SSA simulation that is run in parallel and synchronous with the solution of the phase equation in (32) is necessary only for a meaningful sample path based comparison. One would normally not run an SSA simulation but simply generate sample paths for the Gaussian processes ξ(t) and numerically solve (32) with an appropriate technique and generate a sample path for the phase $\widehat{t}$. In this case, we would not be synthesizing ξ(t) as a cumulation of reaction events from SSA, but instead directly as white Gaussian processes.
Figure 4 summarizes the phase equations (as opposed to the phase computation schemes, to be introduced later) approach for oscillator phase computations. An SSA sample path is generated. Then, the reaction events in the SSA sample path are recorded. This information, along with limit cycle and isochron approximations computed from the RRE, are fed into phase equations (the firstorder phase equation in (32) has been given as an example in Figure 4), which in turn yield the phase $\widehat{t}$. A highlevel pseudocode description of phase computations using the first order phase equation is given in Algorithm 1.
marking also that the matrix G is indeed a function of explicitly the state variables. Still, the equations in (32) and (35) are both based on linear isochron approximations. Phase and orbital deviation equations based on quadratic approximations for isochrons will provide even better accuracy, which we discuss next.
8.3.2 Secondorder phase equation based on quadratic isochron approximations
where ${\left(\right)close="">\mathbf{X}\left(t\right)={\mathbf{x}}_{\mathsf{\text{s}}}\left(\widehat{t}\right)+\mathbf{Y}\left(t\right),\frac{\partial \mathbf{G}\left(\mathbf{x}\right)}{\partial \mathbf{x}}}_{}\mathbf{x}={\mathbf{x}}_{\mathsf{\text{s}}}\left(t\right)$ represents an N × N^{2}, matrix, and ⊗ denotes the, Kronecker product making Y(t) ⊗ Y(t) an N^{2} × 1 vector.
With quadratic approximations for the isochrons of the oscillator, the phase computations based on (38) and (39) will be more accurate. We can assess the accuracy of the results obtained with these equations again by numerically solving them in synchronous fashion with an SSA simulation while synthesizing the white Gaussian processes ξ(t) as a cumulation of the reaction events in SSA, as described in Section 8.3.1.
8.4 Phase computation schemes based on Langevin models and SSA simulations
With the phase equations based on linear and quadratic isochron approximations described in Section 8.3, we can compute the phase of an oscillator without having to run SSA simulations based on its discrete, molecular model. We note here again that the SSA simulations described in (32) were necessary only when a onetoone comparison between the results of phase computations based on phase equations and SSA simulations was required. On the other hand, more accurate phase computations can be attained if they are based on, i.e., use information, from SSA simulations. In this hybrid scheme, we run an SSA simulation based on the discrete, molecular model of the oscillator. For points (in the statespace) on the sample path generated by the SSA simulation, we compute a corresponding phase by essentially determining the isochron on which the point in question lies. Here, one can either employ no approximations for the isochrons or perform phase computations based on linear or quadratic isochron approximations. In [15], we have established the theory for these types of approximate phase computation schemes based on linear and quadratic isochron approximations.
The bruteforce phase computations without isochron approximations, which we call PhCompBF in short, aims to compute the phase difference between two individual given points, based on the isochrontheoretic phase definition with respect to the periodic solution x_{s}(t) tracing the limit cycle. This method is computationally costly [15, 22], as the following explanation based on Figure 5 will reveal. An SSA sample path is computed and the instantanous phase of x_{ssa}(t_{0}) is desired to be found. Note that t_{0} is a particular value in time. For this purpose, in the transition from Figure 5a to 5b, all noise is switched off and RRE solutions (trajectories in state space) starting from x_{s}(t_{0}) (star on the limit cycle) and x_{ssa}(t_{0}) (circle off the limit cycle) in Figure 5a are computed. We can compute the phase shift between these two traces only when the offcycle solution converges as in Figure 5c, that is we will have to integrate RRE for this solution until it becomes approximately periodic in the time domain. In this plot, the illustration has been prepared such that the convergence to the limit cycle takes one period or so, but this may not always be the case. Indeed, ideally this process takes infinite time. This is why the bruteforce method is costly. Eventually, the phase shift between the two trajectories can be computed and added to instantaneous time t_{0}, to compute the phase $\widehat{t}$[15, 22].
based on quadratic isochron approximations for the phase $\widehat{t}$ that corresponds to x_{ssa}(t) [15, 22]. The above computation needs to be repeated for every time point t of interest. Above, for x_{ssa}(t), we essentially determine the isochron (in fact, a linear or quadratic approximation for it) that passes through both the point ${\mathbf{x}}_{\text{s}}(\widehat{t})$ on the limit cycle and x_{ssa}(t). The phase of ${\mathbf{x}}_{\text{s}}(\widehat{t})$, i.e., $\widehat{t}$, is then the phase of x_{ssa}(t) as well since they reside on the same isochron. An illustration of the scheme founded upon linear isochron approximations is given in Figure 6. In this plot, we are looking for an isochron whose linear approximation goes through x_{ssa}(t_{0}), and this is the isochron of the point ${\mathbf{x}}_{\mathsf{\text{s}}}\left({\widehat{t}}_{\mathsf{\text{lin}}}\right)$. Notice that the linear approximation (the straight line in Figure 6) is tangent to the isochron of ${\mathbf{x}}_{\mathsf{\text{s}}}\left({\widehat{t}}_{\mathsf{\text{lin}}}\right)$ at exactly ${\mathbf{x}}_{\mathsf{\text{s}}}\left({\widehat{t}}_{\mathsf{\text{lin}}}\right)$. The value ${\widehat{t}}_{\mathsf{\text{lin}}}$ then is the phase computed by this scheme. Notice that there is some difference between the exact solution $\widehat{t}$ and the approximate ${\widehat{t}}_{\mathsf{\text{lin}}}$. This difference is certain to shrink if the isochrones are locally closer to being linear. For more accurate but still approximate solutions, the quadratic scheme can be used [15, 22].
We should note here that, even though x_{ssa}(t) above is computed with an SSA simulation based on the discrete model of the oscillator, the steadystate periodic solution ${\mathbf{x}}_{\text{s}}(\widehat{t})$, the phase gradient $\mathbf{v}\left(\widehat{t}\right)$ and the Hessian $\mathbf{H}\left(\widehat{t}\right)$ (i.e., all of the information that is used in constructing the isochron approximations) are computed based on the continuous, RRE model of the oscillator [15, 22]. The phase computation schemes we describe here can be regarded as hybrid techniques that are based both on the continuous, RRE and the discrete, molecular model of the oscillator. On the other hand, the phase computation schemes discussed in Section 8.3 based on phase equations are completely based on the continuous, RRE and Langevin models of the oscillator. Figure 7 explains the ingredients that the phase computation schemes utilize. An SSA sample path is generated (note that alternatively a sample path may be generated through the CLE). From the RRE model, limit cycle information (x_{s}(t)) and isochron approximations (v(t) and H(t)) are computed. All this information is fed into the phase computation schemes (in Figure 7 we have given the expression for the scheme utilizing linear approximations for convenience, as this is the method likely to be preferred due to its lower complexity despite its inferior accuracy as compared to the quadratic scheme) and then finally the phase $\widehat{t}$ is found. A high level pseudocode of phase computations using the scheme depending on linear isochron approximations is given in Algorithm 2.
9 Methods  Oscillator models, numerical methods, and implementation notes
This section briefly describes where suitable oscillator models can be found particularly on the internet and how these models can be modified when possible (Section 9.1), how the obtained ODE models can be handled computationally (Section 9.2), a description of the numerical methods used in the simulations (Section 9.3), and the computational costs that they incur (Section 9.4).
9.1 Biochemical oscillator models
Oscillator models for analysis can be found from multiple resources on the web. Models generally come in two separate forms, described briefly as follows.
Models of the first type are translated directly from actual biochemical reactions. Propensities of the reactions are functions of a reaction rate parameter and appropriate algebraic expressions of molecule numbers associated with the reacting species. As such, the propensities are always positive. Moreover, the volume parameter (associated with the container or the cell accommodating the species) can easily be incorporated into the propensity functions. Volume of the cell implies the level of noisiness in the sample path simulations, i.e., basically, the more voluminous a cell, the more the number of each reacting species, and then the closer the sample path solution to the ensemble average. Therefore, one may rightfully declare that every different value for the volume parameter defines a new oscillator to be analyzed, although the mechanism of the reactions and the pattern for the propensities remain the same for a predetermined setting.
Models of the second type are provided directly as ODE models. In some cases, the propensity functions are difficult to handle, and it is not obvious how the crucial volume parameter can be incorporated into the equations. Then, it happens that analysis of these oscillators is a little restricted, not having the capability to adjust the level of noisiness in a correct and reliable manner. However, in all, the simulations can be carried out for the value of the volume implied by the ODE model.
As to where oscillator models can be found on the web, there are multiple alternatives. http://www.xmds.org/[39] is the website for a simulator, in which particularly models from [38] have been modified in appropriate form to be analyzed. We have benefitted extensively from the models we have obtained from these references, as most of them are models of the first type described above. One of the other alternatives is obtaining ODE models (models of the second type stated above) from online repositories such as [41–43] and manipulate them via appropriate software toolboxes [44, 45].
9.2 Information computed from the ODE model and SSA
Oscillator models are approximated by ODEs in the deterministic sense, through procedures already explained in the previous sections. Our purpose before handling a sample path generated by SSA is to have available in hand some crucial computational quantities that will help compute the phase along the sample path. All these crucial quantities will be computed using the ODE model. A shooting type of formulation [40] is preferred to obtain the periodic solution, more particularly a number of discrete timepoints for x_{s}(t) along a single period. The shooting method solves this boundary value problem efficiently even for large systems of ODEs [40]. A further key benefit is that byproducts of the shooting method can be utilized in solving for v(t), namely the PPV or the phase gradient [11]. On top of x_{s}(t) and v(t) and using again the byproducts of these computations, H(t), the phase Hessian, can be obtained through the algorithm proposed in [15]. Now, SSA simulations for the sample paths of the noisy molecular oscillator can be performed [25], and these sample paths are analyzed in terms of phase with the following numerical methods. It should be recalled, however, that during the SSA simulation, also pieces of information have to be stored at each reaction event, conveying which reaction was chosen randomly to be simulated and what were the propensity function values at that particular instant.
9.3 Phase simulations
In this section, we provide details concerning the numerical aspects of the proposed phase computation methods.
The bruteforce scheme (PhCompBF) (described in Section 8.4) is basically run for all of the timepoints in an SSAgenerated sample path, and it is very costly in terms of computation. If x_{ssa}(t_{0}) is a timepoint in the sample path (naturally at where a state change takes place) the RRE is integrated with this initial condition at t = 0 for a long time so that this deterministic solution settles to the limit cycle in continuous time. The solution of the RRE with the initial condition x_{s}(t_{0}) at t=0 can be readily computed, this is a shifted version of the periodic solution x_{s}(t) that is available. If the phase shift between the two solutions is computed, this shift is the phase shift of the sample path x_{ssa} at t = t_{0} [15]. Since one generally does not know the phase value at the very first timepoint of an SSA sample path, the bruteforce scheme is mandatory in computing this phase value and providing the initial condition, on which all of the other approximate phase computation schemes and equations can operate.
The approximate phase computation schemes [15] (again described in Section 8.4) consist of solving the algebraic equation in (40) or (41), depending on whether linear or quadratic approximations are respectively preferred to be used, and they are also run for all points in the SSA sample path (see Algorithm 2 for the pseudocode of phase computations utilizing the scheme founded upon the linear isochron approximations). Benefitting from the scalar nature of these equations, the bisection method is used extensively in their numerical solution. Details and subtleties involved with these schemes (of considerably less computational load compared to PhCompBF) are provided in [15].
Phase equations [22], described in Section 8.3 are in this context stochastic differential equations, operating on the recorded reaction events of an SSA sample path. The specific discretization scheme applied to the first order phase equation is explained in detail in Section 8.3.1 (see Algorithm 1 for the pseudocode of phase computations with this first order equation). This discretization scheme can be easily extended to the second order phase equation of Section 8.3.2.
We will denote each method analyzed and used in generating results by some abbreviations, for ease of reference. The bruteforce scheme explained above is denoted by PhCompBF, the scheme depending on linear isochron approximations (summarized by (40)) by PhCompLin, and that depending on quadratic in (41) by PhCompQuad. The first order phase equation of (32) is denoted by PhEqnLL (the first L for linear isochron approximations and the second L for linear orbital deviation approximations). The second order phase equation of (38) and (39) is denoted by PhEqnQQ (Q for both type of approximations, isochron and orbital deviation). We prefer to use instead of PhEqnQQ a simpler, but numerically more reliable, version of the second order equation. This simpler version is described by the equations (38) and (35). Equation (35) is the orbital deviation equation belonging to the first order phase equation theory. In turn, we denote this simpler model by PhEqnQL [22].
9.4 Analysis of computational complexities
In this section, we analyze the computational costs of phase computation schemes and phase equations. Let us denote by N the number of states in an oscillator, M the number of reactions, K the number of timepoints along a single period, L the number of total timepoints along the interval where a phase computation method is run.
Preliminary statements on computational complexities are as follows. We assume as wellknown complexities that x_{s}(t), G(t) (assumed to be sparse), u(t) and v(t) are computable along a single period in $\mathcal{O}\left(N\phantom{\rule{2.77695pt}{0ex}}K\right)$ time. The computation of H(t) (which is usually not sparse) upon the stated quantities takes $\mathcal{O}\left({N}^{3}\phantom{\rule{2.77695pt}{0ex}}K\right)$ time [15]. We assume that if a matrix is sparse, then matrix vector multiplications and solving a linear system of equations involving this matrix can be done in linear time.
For PhCompBF (see Section 8.4 and Figure 5 for explanations), in order to compute the phase of a point x_{ssa}(t_{0}), we have to integrate the RRE with initial condition x_{ssa}(t_{0}) for an ideally infinite number, namely n_{per}, of periods, so that the states vector can be assumed more or less to be tracing the limit cycle. If FFT (fast Fourier transform) properties are used to compute the phase shift between periodic waveforms, the overall complexity of PhCompBF can be shown to amount to $\mathcal{O}\left({n}_{\mathsf{\text{per}}}K\phantom{\rule{2.77695pt}{0ex}}N\phantom{\rule{2.77695pt}{0ex}}L+L\phantom{\rule{2.77695pt}{0ex}}K{\text{log}}_{2}K\right)$[22].
based on the explanations above.
Computational complexities for the phase computation schemes
Scheme  Computational complexity 

PhCompBF  $\mathcal{O}\left({n}_{\mathsf{\text{per}}}K\phantom{\rule{2.77695pt}{0ex}}N\phantom{\rule{2.77695pt}{0ex}}L+L\phantom{\rule{2.77695pt}{0ex}}K{\text{log}}_{2}K\right)$ 
PhCompLin  $\mathcal{O}\left(N\phantom{\rule{2.77695pt}{0ex}}L{\text{log}}_{2}\u2308\frac{{d}_{\text{max}}^{2}}{{d}_{\mathsf{\text{to}}1}{d}_{\text{min}}}\u2309\right)$ 
PhCompQuad  $\mathcal{O}\left({N}^{2}\phantom{\rule{2.77695pt}{0ex}}L\phantom{\rule{2.77695pt}{0ex}}{\text{log}}_{2}\u2308\frac{{d}_{\text{max}}^{2}}{{d}_{\mathsf{\text{tol}}}{d}_{\text{min}}}\u2309\right)$ 
Computational complexities for the phase equations
Equation  Complexity (best)  Complexity (worst) 

PhEqnLL  $\mathcal{O}\left(M\phantom{\rule{2.77695pt}{0ex}}L+N\phantom{\rule{2.77695pt}{0ex}}L\right)$  $\mathcal{O}\left(N\phantom{\rule{2.77695pt}{0ex}}M\phantom{\rule{2.77695pt}{0ex}}L\right)$ 
PhEqnQL  $\mathcal{O}\left({N}^{2}\phantom{\rule{2.77695pt}{0ex}}L+\phantom{\rule{2.77695pt}{0ex}}M\phantom{\rule{2.77695pt}{0ex}}L\right)$  $\mathcal{O}\left({N}^{2}\phantom{\rule{2.77695pt}{0ex}}L+\phantom{\rule{2.77695pt}{0ex}}N\phantom{\rule{2.77695pt}{0ex}}M\phantom{\rule{2.77695pt}{0ex}}L\right)$ 
The essence of the above analyses is that there is a tradeoff between accuracy and computational complexity [22]. For mildly noisy oscillators, the phase equations should remain somewhat close to the results of the golden reference PhCompBF and the other approximate phase computation schemes, which imitate PhCompBF very successfully with much less computation times. For more noisy oscillators, we should expect the phase computation schemes to do still well, although the phase equations will compute some inaccurate results very fast. PhCompBF is always very slow [22].
Algorithm 1  PhEqnLL pseudocode
input : oscModel and ssaPath
output: phase and phaseShift of points in ssaPath
//compute limit cycle [40]
1 x_{s}(t) = computeLimitCycle (oscModel);
//compute linear isochron approximations along a single period [11]
2 v(t) = computePhaseGradient (oscModel);
//obtain SSA path data
3 pts = pts in ssaPath;
//compute phase
4 for i ← 1 to size(pts in ssaPath) do
//for the first timepoint, use the bruteforce scheme PhCompBF
//refer to Section 8.4 and Figure 5 for explanations
//refer to Section 9.4 for computational complexity
5 if i is equal to 1 then
//tValue of pts(i) : the time at which pts(i) occurs
//value of pts(i) : state vector for the oscillator at tValue of pts(i)
6 phaseShift(i ) = PhCompBF(oscModel, x_{s}(t), tValue of pts(i), value of pts(i ));
7 phase(i ) = [ tValue of pts(i) ] + phaseShift(i);
8 end
//for the other timepoints, use the first order phase equation
//PhEqnLL update rule is given in (33) of Section 8.3.1
//more implementation details and computational complexity in Section 9.4
//stoichiometric matrix (S) and propensity function (a(X))
//information are embedded in oscModel
9 if i is not equal to 1 then
10 tau = [ tValue of pts(i ) ]  [ tValue of pts(i1 ) ];
//Now apply the update rule in (33)
//reactionNo of pts(i ) : number of the reaction occuring at tValue of pts(i )
//e_{ j }is an Msized vector with its j th entry one
11 phase(i) =
phase(i1 ) + tau + v^{Τ}(phase(i1)) S [e_{reactionNo} _{of pts(i)} a(x_{s}(phase(i1))) tau];
12 phaseShift (i)=phase(i)[tValue of pts(i)];
13 end
14 end
Algorithm 1: PhEqnLL pseudocode
Extended caption for Algorithm 1: Lines 12 compute the limit cycle and the phase gradient. In lines 414, the phase computation is described. Lines 58 describe the use of the bruteforce scheme PhCompBF for the phase computation of the first timepoint. In lines 9 13, the phase computation of the other timepoints is accomplished via PhEqnLL (the phase equation founded upon the linear isochron and the linear orbital deviation approximations).
Algorithm 2  PhCompLin pseudocode
input : oscModel and ssaPath
output: phase and phaseShift of points in ssaPath
//compute limit cycle [40] and linear isochron approximations [11]
1 x_{s}(t) = computeLimitCycle (oscModel); v(t) = computePhaseGradient (oscModel);
//obtain SSA path data
2 pts = pts in ssaPath;
//compute phase
3 for i ← 1 to size(pts in ssaPath) do
//for the first timepoint, use the bruteforce scheme PhCompBF
4 if i is equal to 1 then
5 phaseShift(i) = PhCompBF(oscModel, x_{s}(t), tValue of pts(i), value of pts(i));
6 phase(i ) = [ tValue of pts(i)] + phaseShift(i );
7 end
//for the other timepoints, use PhCompLin, see (40) of Section 8.4
//pictorial description in Figure 6
//algorithm description and computational complexity in Section 9.4
8 if i is not equal to 1 then
//phase(i1 ) used as the midpoint of the interval
9 d = d_{min}/2; interval = [ phase(i1 )  d, phase(i1) + d];
10 while length(interval) < d_{max}/2 do
//Check if the solution $\widehat{t}$ to the following equality (40) is in interval
//${\mathbf{v}}^{\u22ba}(\widehat{t})\left[[\text{valueofpts(}i\text{)]}{\mathbf{x}}_{\text{s}}(\widehat{t})\right]=0$
11 if solution is in interval then break;
12 d = 2* d; interval = [ phase(i1)  d, phase(i1 ) + d];
13 end
//use bisection method to compute the solution to (40)
14 phase(i ) = BisectionMethod(oscModel, x_{s}(t), v(t), interval, value of pts(i));
15 phaseShift(i) = phase(i)  [tValue of pts(i)];
16 end
17 end
Algorithm 2: PhCompLin pseudocode
Extended caption for Algorithm 2: Line 1 computes the limit cycle and the phase gradient. In lines 317, the phase computation is described. Lines 47 describe the use of the bruteforce scheme PhCompBF for the phase computation of the first timepoint. In lines 816, the phase computation of the other timepoints is accomplished via PhCompLin (the phase computation scheme founded upon the linear approximations for isochrons).
Abbreviations
 SSA:

Stochastic Simulation Algorithm
 CME:

Chemical Master Equation
 CLE:

Chemical Langevin Equation
 RRE:

Reaction Rate Equation
 SDE:

Stochastic Differential Equation
 ODE:

Ordinary Differential Equation
 PhCompBF:

bruteforce phase computation scheme
 PhCompLin:

phase computation scheme depending on linear approximations for isochrons
 PhCompQuad:

phase computation scheme depending on quadratic approximations for isochrons
 PhEqnLL:

phase equation depending on linear approximations for isochrons and linear approximations for orbital deviation
 PhEqnQL:

phase equation depending on quadratic approximations for isochrons and linear approximations for orbital deviation
 PhEqnQQ:

phase equation depending on quadratic approximations for isochrons and quadratic approximations for orbital deviation.
Declarations
Acknowledgements
This work was supported by the Scientific and Technological Research Council of Turkey (TUBITAK).
Authors’ Affiliations
References
 Izhikevich EM: Dynamical Systems in Neuroscience: The Geometry of Excitability and Bursting. MIT Press, Cambridge; 2007.Google Scholar
 Winfree AT: The Geometry of Biological Time. Springer, New York; 2001.MATHView ArticleGoogle Scholar
 Goldbeter A: Biochemical Oscillations and Cellular Rythms. Cambridge University Press, Cambridge; 1996.View ArticleGoogle Scholar
 Fu L, Lee CC: The circadian clock: pacemaker and tumour suppressor. Nat Rev Cancer 2003, 3: 350361. 10.1038/nrc1072View ArticleGoogle Scholar
 Fu L, Pelicano H, Liu J, Huang P, Lee C: The circadian gene Period2 plays an important role in tumor suppression and DNA damage response in vivo. Cell 2002, 111: 4150. 10.1016/S00928674(02)009613View ArticleGoogle Scholar
 Davis S, Mirick DK: Circadian disruption, shift work and the risk of cancer: a summary of the evidence and studies in Seattle. Cancer Causes Control 2006, 17: 539545. 10.1007/s1055200590109View ArticleGoogle Scholar
 Schernhammer ES, Laden F, Speizer FE, Willett WC, Hunter DJ, Kawachi I, Fuchs CS, Colditz GA: Nightshift work and risk of colorectal cancer in the nurses' health study. J Natl Cancer Inst 2003, 95: 825828. 10.1093/jnci/95.11.825View ArticleGoogle Scholar
 Straif K, Baan R, Grosse Y, Secretan BE, Ghissassi FE, Bouvard V, Altieri A, BenbrahimTallaa L, Cogliano V: Carcinogenicity of shiftwork, painting, and firefighting. Lancet Oncol 2007, 12(8):10651066.View ArticleGoogle Scholar
 Elowitz MB, Leibler S: A synthetic oscillatory network of transcriptional regulators. Nature 2000, 403(6767):335338. 10.1038/35002125View ArticleGoogle Scholar
 Demir A, SangiovanniVincentelli A: Analysis and Simulation of Noise in Nonlinear Electronic Circuits and Systems. Kluwer Academic Publishers, Boston; 1998.View ArticleGoogle Scholar
 Demir A, Mehrotra A, Roychowdhury J: Phase noise in oscillators: A unifying theory and numerical methods for characterisation. IEEE Trans Circ Syst I Fund Theory Appl 2000, 47(5):655674. 10.1109/81.847872View ArticleGoogle Scholar
 Vilar JMG, Kueh HY, Barkai N, Leibler S: Mechanisms of noiseresistance in genetic oscillators. Proc Natl Acad Sci USA 2002, 99(9):59885992. 10.1073/pnas.092133899View ArticleGoogle Scholar
 Goldbeter A: Computational approaches to cellular rhythms. Nature 2002, 420(6912):238245. 10.1038/nature01259View ArticleGoogle Scholar
 Josic K, SheaBrown ET, Moehlis J: Isochron. Scholarpedia 2006, 1(8):1361. 10.4249/scholarpedia.1361View ArticleGoogle Scholar
 Suvak O, Demir A: Quadratic approximations for the isochrons of oscillators: a general theory, advanced numerical methods and accurate phase computations. IEEE Trans Comput Aided Design Integr Circ Syst 2010, 29(8):12151228.View ArticleGoogle Scholar
 Farkas M: Periodic Motions. SpringerVerlag, New York; 1994.MATHView ArticleGoogle Scholar
 Demir A: Fully nonlinear oscillator noise analysis: an oscillator with no asymptotic phase. Int J Circ Theory and Appl 2007, 35: 175203. 10.1002/cta.387MATHView ArticleGoogle Scholar
 Malkin IG: Methods of Poincare and Liapunov in Theory Of NonLinear Oscillations. Gostexizdat, Moscow; 1949.Google Scholar
 Kuramato Y: Chemical Oscillations, Waves, and Turbulence. SpringerVerlag, New York; 1984.View ArticleGoogle Scholar
 Brown E, Moehlis J, Holmes P: On the phase reduction and response dynamics of neural oscillator populations. Neural Comput 2004, 16(4):673715. 10.1162/089976604322860668MATHView ArticleGoogle Scholar
 Kaertner FX: Analysis of white and f ^{α}noise in oscillators. Int J Circ Theory Appl 1990, 18: 485519. 10.1002/cta.4490180505MATHView ArticleGoogle Scholar
 Suvak O, Demir A: On phase models for oscillators. IEEE Trans Comput Aided Design Integr Circ Syst 2011, 30(7):972985.View ArticleGoogle Scholar
 Suvak O, Demir A: Phase models and computations for molecular oscillators. In Proc 8th Internat. Workshop on Computational Systems Biology (WCSB 2011). ETH Zurich, Switzerland; 2011:173176.Google Scholar
 Gillespie DT: Stochastic simulation of chemical kinetics. Ann Rev Phys Chem 2007, 58: 3555. 10.1146/annurev.physchem.58.032806.104637View ArticleGoogle Scholar
 Gillespie DT: Exact stochastic simulation of coupled chemical reactions. J Phys Chem 1977, 81(25):23402361. 10.1021/j100540a008View ArticleGoogle Scholar
 Gillespie DT: The chemical Langevin equation. J Chem Phys 2000, 113(1):297306. 10.1063/1.481811View ArticleGoogle Scholar
 Higham DJ: Modeling and simulating chemical reactions. SIAM Rev 2008, 50(2):347368. 10.1137/060666457MATHMathSciNetView ArticleGoogle Scholar
 van Kampen NG: Stochastic Processes in Physics and Chemistry. NorthHolland, Amsterdam; 1992.Google Scholar
 Gardiner CW: Handbook of Stochastic Methods for Physics, Chemistry and the Natural Sciences. SpringerVerlag, Berlin; 1983.MATHView ArticleGoogle Scholar
 Wilkinson DJ: Stochastic Modelling for System Biology. 1st edition. CRC Press, New York; 2006.Google Scholar
 Amdaoud M, Vallade M, WeissSchaber C, Mihalcescu I: Cyanobacterial clock, a stable phase oscillator with negligible intercellular coupling. Proc Natl Acad Sci USA 2007, 104: 70517056. 10.1073/pnas.0609315104View ArticleGoogle Scholar
 Morelli LG, Julicher F: Precision of genetic oscillators and clocks. Phys Rev Lett 2007, 98(22):228101.View ArticleGoogle Scholar
 Vance W, Ross J: Fluctuations near limit cycles in chemical reaction systems. J Chem Phys 1996, 105: 479487. 10.1063/1.471901View ArticleGoogle Scholar
 Gaspard P: The correlation time of mesoscopic chemical clocks. J Chem Phys 2002, 117: 89058916. 10.1063/1.1513461View ArticleGoogle Scholar
 Koeppl H, Hafner M, Ganguly A, Mehrotra A: Deterministic characterization of phase noise in biomolecular oscillators. Phys Biol 2011, 8(5):055008. 10.1088/14783975/8/5/055008View ArticleGoogle Scholar
 Tomita T, Ohta T, Tomita H: Irreversible circulation and orbital revolution. Prog Theory Phys 1974, 52: 17441765. 10.1143/PTP.52.1744View ArticleGoogle Scholar
 Gabor D: Theory of communication. J IEE Lond 1946, 93: 429457.Google Scholar
 Cropper WH: Mathematica Computer Programs for Physical Chemistry. SpringerVerlag, New York; 1998.MATHView ArticleGoogle Scholar
 eXtensible MultiDimensional Simulator[http://www.xmds.org/]
 Kundert K, White JK, SangiovanniVincentelli A: SteadyState Methods for Simulating Analog and Microwave Circuits. Kluwer, Norwell; 1990.MATHView ArticleGoogle Scholar
 Cellerator Model Repository[http://www.cellerator.info/nb.html]
 Cellular Models[http://www.cds.caltech.edu/hsauro/models.htm]
 Website ECell[http://www.ecell.org/ecell/]
 Bornstein BJ, Keating SM, Jouraku A, Hucka M: LibSBML: an API library for SBML. Bioinformatics 2008, 24(6):880881. 10.1093/bioinformatics/btn051View ArticleGoogle Scholar
 Keating SM, Bornstein BJ, Finney A, Hucka M: SBMLToolbox: an SBML toolbox for MATLAB users. Bioinformatics 2006, 22(10):12751277. 10.1093/bioinformatics/btl111View ArticleGoogle Scholar
 Kalpazidou SL: Cycle Representations of Markov Processes. SpringerVerlag, Berlin; 2006.MATHGoogle Scholar
 Feistel R, Ebeling W: Deterministic and stochastic theory of sustained oscillations in autocatalytic reaction systems. Phys A Stat Theor Phys 1978, 93(12):114137. 10.1016/03784371(78)902133MathSciNetView ArticleGoogle Scholar
 Hill TL: Free Energy Transduction and Biochemical Cycle Kinetics. SpringerVerlag, New York; 1989.View ArticleGoogle Scholar
 Gibson MA, Bruck J: Exact stochastic simulation of chemical systems with many species and many channels. J Phys Chem A 2000, 104: 18761889. 10.1021/jp993732qView ArticleGoogle Scholar
 Slepoy A, Thompson AP, Plimpton SJ: A constanttime kinetic Monte Carlo algorithm for simulation of large biochemical reaction networks. J Chem Phys 2008, 128: 205101. 10.1063/1.2919546View ArticleGoogle Scholar
Copyright
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.