A spatio-temporal model to reveal oscillator phenotypes in molecular clocks: Parameter estimation elucidates circadian gene transcription dynamics in single-cells

We propose a stochastic distributed delay model together with a Markov random field prior and a measurement model for bioluminescence-reporting to analyse spatio-temporal gene expression in intact networks of cells. The model describes the oscillating time evolution of molecular mRNA counts through a negative transcriptional-translational feedback loop encoded in a chemical Langevin equation with a probabilistic delay distribution. The model is extended spatially by means of a multiplicative random effects model with a first order Markov random field prior distribution. Our methodology effectively separates intrinsic molecular noise, measurement noise, and extrinsic noise and phenotypic variation driving cell heterogeneity, while being amenable to parameter identification and inference. Based on the single-cell model we propose a novel computational stability analysis that allows us to infer two key characteristics, namely the robustness of the oscillations, i.e. whether the reaction network exhibits sustained or damped oscillations, and the profile of the regulation, i.e. whether the inhibition occurs over time in a more distributed versus a more direct manner, which affects the cells’ ability to phase-shift to new schedules. We show how insight into the spatio-temporal characteristics of the circadian feedback loop in the suprachiasmatic nucleus (SCN) can be gained by applying the methodology to bioluminescence-reported expression of the circadian core clock gene Cry1 across mouse SCN tissue. We find that while (almost) all SCN neurons exhibit robust cell-autonomous oscillations, the parameters that are associated with the regulatory transcription profile give rise to a spatial division of the tissue between the central region whose oscillations are resilient to perturbation in the sense that they maintain a high degree of synchronicity, and the dorsal region which appears to phase shift in a more diversified way as a response to large perturbations and thus could be more amenable to entrainment.


Introduction
Single-cell models typically fall into one of two categories: damped oscillators where rhythms arise through noise perturbation, so-called noise-induced oscillators, or limit cycle oscillators where the dynamics are subject to stable oscillations irrespective of the presence of noise [1]. In practice, and in the presence of multiple sources of noise, it is a difficult problem to differentiate empirically between noise-induced and robust limit cycle oscillators. As such, characterizing the spatial distribution of oscillatory phenotypes in dynamic gene expression processes remains an open problem. In the present paper we propose a novel spatially extended statistical methodology to perform parameter estimation and to assess the stability and empirical robustness of self-sustained oscillations at the single-cell level and hence to characterize oscillatory phenotypes of molecular clocks in a spatially distributed population of cells. The stability of oscillations arising in a sequence of biochemical reactions has been studied by [2] who proved that local stability is, amongst others, affected by the number of components in the sequence and the degree of cooperativity. Biochemical reaction networks such as transcriptional and translational feedback loops (TTFLs) that give rise to oscillatory behaviour in gene expression and molecular clocks are complex, involving many chemical species and reactions. While the time evolution of molecular counts of chemical species in a reaction network can be described exactly by a Markov jump process (MJP), its complexity is in stark contrast to the availability of data as rarely can more than one species be observed at a time, and observations are typically obtained at discrete time-intervals as a result of experimental processes involving fluorescent reporter protein imaging. Model reductions of the full reaction network towards less parameter-intensive approaches that can feasibly be estimated from the experimental data are of considerable importance. The introduction of time-delays can approximate reaction events which are not of primary interest and thus tremendously reduce model complexity [3][4][5][6]. Calderazzo et al. [7] propose the stochastic differential equation model with a distributed delay, where the natural variability in the delay time between reaction events is modelled by a probability distribution. The resulting stochastic representation provides a significantly reduced model which can realistically account for the intrinsic noise and rhythm generation inherent in the single-cell TTFL yet may feasibly be estimated from univariate experimental data. Despite model reduction, inference remains challenging due to the intractability of the transition densities of the MJP. Approximations in continuous statespace have been developed and are available when suitable assumptions on the system size hold, such as the chemical Langevin equation (CLE) [4,8,9] which aims at matching the infinitesimal mean and variance of the original MJP. Extensions to inference from observed data have been considered for the linear noise approximation (LNA) [10][11][12] which performs a linearisation leading to tractable Gaussian transition densities. The LNA has been extended to models with distributed delays [13], and a filtering algorithm which exploits the LNA was derived by [7] for likelihood-based inference, including Bayesian inference, for chemical reaction networks. In this study we extend the approach of [7] spatially through Bayesian hierarchical modelling of the parameters associated with the TTFL with a first order Markov random field prior distribution. This allows us to infer the parameters characterizing the TTFL across the tissue from existing experimental spatio-temporal gene expression data. We introduce the use of the robustness measure V to explore whether cells exhibit sustained or damped oscillations, and the inhibition profile (IP) to measure the relative impact of time-specific perturbations which also allows us to quantify entrainment characteristics of single-cell oscillators.
Recent interest has arisen in understanding the entrainment ability of the individual noisy neuronal circadian oscillators to form a precise biological clock [14] within the suprachiasmatic nucleus (SCN), the master clock of mammals, located in the hypothalamus of the brain. The circadian rhythms generated by the TTFL in SCN neurons are essential to coordinate daily patterns of physiology and enable entrainment of behavioural rhythms to environmental cues [15]. Accurate timekeeping is an emergent property of the SCN, relying on the synchronization of the circadian oscillations of approximately 20,000 neurons. At the single-cell level, these constitute stochastic clocks which synchronize through a combination of firing and rhythmic neurotransmitter release to form a biological clock which is precise overall [16]. Intrinsic noise arising from the low copy numbers of molecules [17] plays a significant role in the heterogeneity of neuronal rhythms and possibly in the generation of stable circadian rhythms [1]. An application to bioluminescence-reported expression of the core clock gene Cry1 across organotypic mouse SCN provides an ideal test-bed of our methodology to study the emergent spatiotemporal circadian oscillatory dynamics of gene expression in SCN neurons.

Results
We will first introduce a stochastic formulation of a negative feedback loop that can be fitted to spatio-temporal expression data of a single gene. An inference framework, described in Materials and Methods, is developed for such a model. We further introduce two concepts that are based on our model, namely a measure of robustness, V s a;y , to study the stability of oscillations, and the Inhibition Profile (IP) denoting a type of response curve to quantify the responsiveness of transcriptional regulation to the inhibiting species. We will illustrate the use of the proposed methodology to observed CRY1-LUC measured across organotypic mouse SCN tissue over 5-6 days. To ensure reproducibility we studied three experimental replicates, labelled Rep. 1-3.

A spatially extended distributed delay model with measurement equation
The model integrates three stochastic components (i) the intrinsic molecular noise of the dynamic TTFL processes at single-cell level, (ii) a measurement model to incorporate both measurement noise and signal aggregation over time of camera exposure, and (iii) a spatial model that captures heterogeneity in the spatial distribution of the transcriptional dynamics.
(i) The TTFL with distributed delay. To describe the stochastic dynamic TTFL transcription processes at the single-cell level we assume that mRNA abundance at time t and location i, X i (t), is the result of a stochastic birth and death processes that can be approximated by a CLE of the form [4,7] where W i (t) are standard Wiener processes. Gene transcription is classically modelled by a Hill-type transcription function [18] with maximum transcription rate R i , Hill coefficient n i , dissociation coefficient K i , while mRNA degradation is assumed to occur linearly with rate μ i . The term R t À 1 X i ðsÞg p i ;a i ðt À sÞds, i.e. the expected mRNA available at t over a distribution of delay times, serves as a transcription factor proxy where we approximate the delay distribution, g p i ;a i , by a Gamma density with shape and rate parameters p i and a i , respectively, which in practice is truncated at τ max for computational tractability. For our data we set τ max = 24h.
(ii) Measurement model for bioluminescence reported gene expression. The following form for the measurement model is assumed for light intensity of bioluminescence-reported gene expression data at location i at time point t 0 where κ i is a scaling factor between the recorded light signal emitted by a reporter protein and mRNA, which may be assumed to vary spatially, for instance due to an irregular geometry of the biological sample. The limits of integration are determined by the exposure time interval setting of the camera, e.g. Δt = 0.5h for our data, and η i,t 0 is a Gaussian zero-mean random variable that represents measurement noise which may have a location specific variance.
(iii) A spatial model. Our assumed spatial extension is phenomenological in that it incorporates a form of dependence of the processes between nearby cells by means of a Markov random field prior between parameters. In contrast to performing independent inference for a single time series, which each only are subject to a relatively small sample of 5 oscillations, this approach will allow us to gain strength from essentially pooling all data across the spatial population of cells by exploiting the local dependence between nearby cells. At the same time it is also able to address the spatial variation of the processes across a network of cells. We assume a simple but general multiplicative random effects model where a parameter value at location i is given by the overall spatial mean, θ, perturbed by a location-specific random effect described by exp � i such that This model is assumed for each of the parameters R i , K i , n i , as well as the mean and standard deviation of the delay distribution. The assumed neighbourhood structure implies a first-order Markov random field, specifically that the random effect for a given parameter at location i is a priori dependent on the random effects of the same parameter associated with the 8 surrounding locations. The spatial model is a form of Bayesian hierarchical model which is able to exploit dependence between neighbouring locations by shrinking the parameter estimates of the TTFL towards a common mean. Such a model is phenomenological in nature with no assumptions made about the mechanistic nature of cell communication the introduction of which would have led to non-identifiable parameters. It is important to note that in the absence of a specific model for cell communication the parameters of the TTFL will yield estimates that incorporate the influence of these processes.

Parameter estimation and model fit
As the posterior distribution resulting from components (i)-(iii) is intractable, we design a Markov chain Monte Carlo (MCMC) algorithm to draw a large number of samples from it (see Materials and methods). Pilot simulation studies are an essential tool not only to develop the estimation algorithm but also to study parameter identifiability. The posterior means of the five parameters of the Hill-function are shown in Fig 1. We find a pronounced spatial structure with regards to Hill-coefficient, n, and dispersion of the delay distribution, for all three replicates. Central locations of the tissue samples exhibit higher estimates of both parameters while edges exhibit lower estimates. These two parameters are important in determining the dynamics of the oscillator model in Eq (1) [19] and can be linked to earlier work by [2], who studied the stability of oscillations arising in a sequence of biochemical reactions. Their relationship is investigated further in Figs 2 and 3. We note that the delay dispersion can be equivalently summarized by the entropy of the delay distribution which provides a measure of the information contained in the delay distribution. The maximum transcription rate R (molecules/h) and dissociation coefficient K, which both relate to the scale of molecular population sizes, exhibit low systematic spatial variation across the three replicates. The posterior means are overall similar in scale for replicates 1 and 2, while somewhat higher in replicate 3, suggesting that the degree of molecular noise, which informs the population size estimates via the Gaussian approximation, is homogeneous across the organ and consistent across replicates. The estimated mean delay times for the Cry1 molecular oscillators are around 8-10 hours with a delay dispersion (SD) of 2-5 hours. The mean of the delay distribution tunes the period of oscillations produced by the model in Eq (1), and while exploratory spectral analysis of data suggest close to 24h periodicity across all tissue for all three replicates, the estimates of the model parameter exhibit some spatial variability. A presumptive cause of variability in the estimates is that the period of oscillations is not fully captured by the delay mean due to the fact that the asymmetry of the gamma distribution varies with the dispersion parameter (see Fig 3), hence the implied period of oscillations may have a lower variability than the mean estimates in Fig 1 as opposed to in a fixed delay model, which is a limiting case of Eq (1) as p=a 2 ¼ s 2 G ! 0. To evaluate model fit, location-specific residual time series are obtained by computing the differences between the observed data and predictions produced by the estimated local model filter output. The outcome of the Kolmogorov-Smirnov test (with Bonferroni correction) at each of the 840, 1152, and 1125 locations of the three replicates accepted the null of Gaussianity of the residuals for all except a mere 5 locations (i.e. 0.16% of those considered). Residual time series were evaluated for further periodicity by means of a spectral bootstrap analysis [20]. Fig A in S1 Text shows the mean period at locations which have at least one period in the range 1-30h. We note that since all residual series are free of 24-hour periodicity the fitted model successfully explains the stochastic circadian dynamics observed at single-cell level. It appears that SCN tissue locations tend to exhibit an additional, albeit small, 12-hour residual periodicity. Evidence of gene expression with 12-hour periodicity has previously been found in hundreds of genes, e.g. in mouse liver tissue [21,22].

Estimating robustness of oscillations and regulatory responsiveness
Using a general definition of robustness V of system s with regard to property a evaluated by function D s a against a set of perturbations P with distribution π P by [23]

PLOS COMPUTATIONAL BIOLOGY
we propose an estimator of robustness where π P is taken to be the Bayesian posterior distribution of parameters. With this choice of π P , empirical robustness captures parameter uncertainty along with its implications on some objective characteristic of interest of the system. This coincides with the Bayesian posterior probability of property a as measured by function D. Hence the evaluation function D(θ) takes the value 1 if θ implies limit cycle oscillations of the deterministic mean of the model in Eq (1) and 0 if the oscillations are damped (see S1 Text for further details on the stability criteria of the macroscopic rate equation). Noting that Eq (5) is an expectation of D s a , a posterior mean estimate of V s a;y can be computed by evaluating D s a ðy ðtÞ Þ at each iteration t of the MCMC algorithm and averaging the resulting chain. Furthermore, to quantify the responsiveness of transcriptional regulation to the inhibiting species, we introduce the Inhibition Profile (IP) as the (negative) gradient of the transcription rate with respect to the past levels of mRNA. The result is evaluated at and divided by the equilibrium solution, x � , to obtain the effect at an average population size and a function that does not scale with population size. The IP is thus closely related to the phase-response curve, typically used to study entrainment of circadian oscillators to external stimuli [24], where instead of relating extraneous perturbations at different times of the cycle to phase shifts, here the IP gives the delayed marginal change in transcription rate induced by perturbations across the cycle. Due to the intrinsic noise-term of the model in Eq (1), the associated phase shifts are stochastic and we explore their distributions further in a simulation study (see Fig 4). The marginal inhibition due to a perturbation at k 2 [0 τ max ) time ago is given by

Results for Cry1 oscillatory phenotypes in mice SCN
The estimated oscillator robustness allows us to identify distinct regions (see Fig 5) of Cry1 oscillatory phenotypes, firstly between the SCN tissue, which exclusively exhibits a high degree of robustness associated with strong limit cycle dynamics, and the immediately surrounding tissue exhibiting low empirical robustness or 'noisy oscillators'. This result is very important as it confirms that the proposed modelling approach manages to correctly distinguish the robustness of the Cry1 oscillations within the SCN from the non-robust or noisy oscillatory behaviour outside or at the edge of the tissue. In Figs B and C in S1 Text we examine time series from a subset of locations from the SCN proper and surrounding tissues and find that while the average amplitude is lower in surrounding tissues, there is substantial 'overlap' between the signal from the two tissues. Additionally, we do not find any differences in period and phase between the tissues, making a classification based on exploratory analysis non-trivial.
Within the SCN a small number of locations in some central and ventral clusters of replicates 1 and 2 appear to exhibit weak oscillations or substantial uncertainty. This finding may be related to spatial variation of neuropeptide expression profiles as additional analyses of Per2: luc expression from VIP-null SCN tissue made available by [25] using our methodology produces robustness estimates that are consistent with noise-induced oscillations across almost all imaged tissue, i.e.V y � 0 (Fig D in S1 Text). A multivariate analysis of all estimated TTFL parameters indicates that robustness of oscillations within the SCN is predominantly determined by three parameters, namely the Hill-coefficient, n, the dispersion or entropy of the delay distribution, s 2 G , and the degradation rate, μ. Fig 2 shows that locations with high empirical robustness are found along a line of positive trade-off between the two parameters that are associated with the transcriptional regulation within the TTFL, i.e. the Hill-coefficient, with estimated values between 3 and 8, and delay dispersion whose estimated values are between 2 PLOS COMPUTATIONAL BIOLOGY and 5 hours. With all other parameters held constant, we can see that an increase in the delay dispersion or entropy reduces the robustness or propensity for limit cycle dynamics. Under the assumed model this implies that a higher Hill-coefficient can compensate for a higher delay dispersion to obtain a robust oscillator phenotype.

Differential responsiveness of circadian oscillators in the SCN
It appears that the IPs are more concentrated around a larger maximum for oscillators with a lower delay dispersion (see Fig 3), suggesting that, given some mean delay time, the inhibition happens more directly over a shorter time span than for an oscillator associated with a wider IP. This is tuned by the entropy of the delay distribution where oscillators with a low delay entropy, are subject to inhibitory dynamics that resemble a step function, or a fast transcriptional 'on-off' switch, whereas the inhibitory effect is spread over a longer time scale in oscillators associated with a larger entropy.
Furthermore, the total inhibition, defined as the integral of the inhibition profile IP with respect to k, is typically greater for the wider IP profiles due to the higher Hill coefficient. To visualize their spatial distribution, the IPs are summarized by their location-specific entropy for the three experimental replicates in Fig 6. The data show that oscillators with higher entropy are located in the central SCN, while low-entropy IPs are predominantly found in the dorsal tissues.

Differential entrainability of circadian oscillators in SCN
We hypothesize that the spatial localization of the IPs is indicative of spatially different entrainment characteristics. To investigate this hypothesis we conduct a simulation study to compare the phase distributions of two prototypical oscillator types associated with two points located on the trade-off 'ridge'. Both types exhibit robust limit cycle dynamics but are at opposite ends of the spectrum regarding their entropy. For simplicity, we shall refer to the oscillator corresponding to the lower point, characterized by a smaller n and delay entropy, as 'Type I', and to the other point as 'Type II', noting that Type I oscillators have IPs corresponding to dorsal SCN while Type II are representative of central SCN neurons. Since our model describes a set of many autonomous TTFLs with no explicit synchronizing mechanism we focus on studying

PLOS COMPUTATIONAL BIOLOGY
whether an ensemble of synchronized trajectories of robust oscillators may be perturbed so as to lose synchrony which we define as the degree by which the phases of the oscillations drift apart from each other. Analyzing entrainment and synchronization by studying ensembles of oscillators is discussed in [26]. We place an implicit assumption on the network topology that each individual oscillator has identical exposure to a given perturbation, while the response is driven by the cell-autonomous stochastic mechanisms (see [27]). Ensembles of gene expression trajectories from the two types of oscillators are forward simulated from the stochastic delayed differential equation model in (1) using an Euler-Maruyama approximation and we examine the effect of perturbations on the phase distribution for each ensemble. The effect of perturbations of four increasing sizes on the ensemble's synchrony is shown in Fig 4 along with polar histograms of the resulting phase distribution relative to the unperturbed trajectories, estimated from the subsequent five cycles. The perturbations are specified as positive shocks in the concentration of mRNA with an amplitude consistent with a typical estimated peak concentration (150-200 molecules) and varying duration (1-4 hours) thus controlling the overall size of the shock. While such sudden increases in mRNA are inconsistent with intrinsic noise in the single negative feedback loop in (1) where transcriptional regulation by Rev-erb/RORA loops is assumed constant and captured by R i , there is evidence that exogenous shocks, e.g. light, may dissociate interacting intracellular feedback loops [28]. Hence, the perturbations are considered deviations of varying magnitude from the single-cell's unperturbed oscillation. For unperturbed trajectories it is verified that we reconstruct the reference case, namely that both oscillator types maintain synchronized ensembles during the whole simulation period of 6 days. The smallest perturbation duration (1 hour) induces a similar increase in the phase dispersion for both types but does not produce a phase shift in either oscillator type. As the perturbation duration increases to 3 hours the synchronization ability of both types starts to differentiate in that it deteriorates for Type I oscillators, while Type II oscillators remain relatively synchronised and perform a smaller phase-shift. In the largest perturbation case, Type I oscillators regain synchrony to a new circadian regime and are subject to a phase shift that is significantly larger than that of the Type II oscillators. These findings suggest that ensembles of oscillators of Type II, found in the central SCN neurons, remain relatively synchronised when subjected to large perturbations of varying duration, and phase-shift jointly to a new circadian regime in a predictable fashion. On the other hand, Type I dorsal oscillators may exhibit the same degree of synchronisation when unperturbed, but we have demonstrated that the ensemble's time-keeping was disrupted by a sufficiently large perturbation. To verify the validity of the findings, the simulations were repeated with different timings and forms of perturbations which resulted in the same phase shift distributions (see Fig E in S1 Text).
The difference in response of the two oscillator types to the largest perturbation highlights a trade-off between synchrony and entrainability: while ensembles from Type II central SCN oscillators phase-shift in unison, their shift is smaller compared to the dorsal Type I oscillators. The total inhibition, i.e. the magnitude of the integral of the inhibition profile, is typically greater for the central neurons due to the higher value of the Hill coefficient, suggesting that they experience a higher degree of inhibitory pressure. While not modelled explicitly here, this may be indicative of inter-cellular processes where inhibition mechanisms are in part shared between neighbouring cells. Slight phase differences between connected neurons combined with shared inhibition may lengthen the time scale at which small increases in TTFL species contribute to transcriptional repression, consistent with our findings. Dorsal cells are less densely connected and as such, single-cell mechanisms that act under a shorter time scale may play a greater role in their rhythm generation.
From a modelling point of view, ensemble synchronization of centrally located oscillators can be understood by the delay distribution acting as a regulator of delayed Cry1 mRNA. The higher delay dispersion of the Type-II oscillators represents a larger spread in the timing, thereby distributing the repressive input over a wider time interval thus decreasing the sensitivity of the oscillator to perturbations. Assuming that the entrainment ability of an oscillator can be broadly characterized by its IP, our results suggest that while individual SCN neurons are all capable of generating robust sustained oscillations of the circadian TTFL, their ability to adjust to new circadian schedules varies along a ridge in the parameter space formed by the Hill coefficient and delay dispersion. Moreover, the ridge translates to a spatial structure that essentially distinguishes between the synchronized central and the more entrainable dorsal oscillator phenotypes in the SCN.

Discussion
The time evolution of biochemical reaction networks arises from complex stochastic processes involving many species and reaction events. Inference for such systems is invariably challenged by the relative sparseness of experimental data as measurements can often only be observed for one of the participating species and at discrete time points. If collected for many cells over time the resulting data sets are of considerable size. A reduction of the full system to a model with a more modest number of parameters that can feasibly be identified from data and which retains biological interpretability is of significant importance. This can be achieved for oscillatory dynamics resulting from TTFLs by the introduction of distributed delay times which account for the natural variability in timing of unobserved processes in the larger and more complex biochemical reaction network while maintaining a mechanistic form for the transcription function. Inference for the resulting stochastic differential equation is subject to ongoing research. Here the single-time series filtering approach developed by [7] is extended with a spatial hierarchical model that is phenomenological in nature and whose role it is to facilitate joint estimation of the parameters for data at many more spatial locations across the SCN which substantially aids the inferential process. In the framework of analysing multiple time series Bayesian hierarchical modelling provides a useful and principled approach to study and quantify the cell-to-cell variability between parameters [11] which may overcome the problem of data sparsity at single sites. The spatial extension allows us to estimate variation across the tissue and, as is commonly the case in Bayesian hierarchical modelling, to 'borrow strength' [29] through exploiting the dependence structure between nearby locations as each location's parameter estimate is shrunk back towards a common neighbourhood mean. This approach thus makes use of the many thousands of oscillations observed across the organ and has the benefit of gaining precision and a better estimation of the parameters characterizing the oscillation. In contrast, it has been found that the availability of 6-15 days of oscillations is in insufficient to allow statistically sound conclusions about whether the circadian clock is a damped or self-sustained oscillator in the absence of such a model [1,30].
Model complexity and parameter identifiability are a concern even in this simplified model. We have fitted the model to the reporter protein following [7] who noted that their approach did not specifically take into account the fact that we observe reporter protein rather than the protein of interest, 'which is possibly a strong but necessary simplification'. It is reasonable to assume that the reporter protein exhibits the same transcriptional dynamics as the protein of interest and as in [7] we specify prior information on the degradation rate using the reporter protein half-life as provided by [31]. The elimination of the intermediate species by means of the distributed delay and the use of a Hill type transcription function leads to a reduced reaction network that is at best approximative. One can expect there to be a roughly constant delay between the expression of the reporter protein and the expression of the native protein of interest and thus the mean delay of the transcription may not be substantially affected. This is speculative but may be supported by the fact that our estimates of mean delay times of around 8-9 hours, also found in [7], are highly consistent with theoretical, albeit non-stochastic, modelling results of [5] and do not vary much across the tissue. We propose a novel measure of oscillatory robustness that allows us to estimate the posterior probability that an oscillator is inherently subject to limit cycle dynamics in contrast to noise-driven. The approach is of particular interest for modelling spatially distributed oscillators such as molecular clocks in SCN neurons. The idea that noisy systems are more easily entrained to an external input has been investigated both theoretically [32] and experimentally [33]. In particular, the latter studied the role of intrinsic noise in the SCN, and provided experimental evidence from a Bmal1-null mutant mice that noise and extracellular signalling are sufficient to produce oscillations when the TTFL is disrupted. Our approach extends over existing work in that it provides a framework to perform inference on the spatial distribution of the model parameters and thus to gain insight into such stochastic biochemical oscillators and their synchronisation on the basis of real experimental data. As it has been found that the ventral SCN has a higher density of intercellular connectivity compared to the dorsal [34], and re-entrainment characteristics of SCN neurons following light-induced jet lag suggests higher proportions of fast and slow-shifting cells in the dorsal and ventral SCN, respectively [35], we hypothesize that the spatial localization is indicative of different entrainment characteristics. We find spatial differences across the SCN tissue, primarily in the Hill coefficient and entropy of the delay distribution and additional credibility arises from the fact that the results are also consistent across three independent biological replicates. We identify higher values for both Hill coefficient and delay dispersion in centrally located tissues and lower values in dorsal tissues. We show how simultaneously varying the two parameters gives rise to differences in the transcriptional dynamics in cell-autonomous oscillators, represented by the IP. We thus find that the distributed delay TTFL model can separately capture both robustness and entrainability of circadian oscillations and thus has dynamics rich enough to investigate fundamental aspects of the mammalian clock, while being amenable to statistical parameter inference.
A limitation of our modelling approach is the lack of a modelling ingredient that explicitly describes intercellular communication. Instead, we model organ-wide rhythm generation resulting from an ensemble of uncoupled TTFLs in individual SCN cells. While such a simplification was needed to obtain a parsimonious model that could be identified from imaging data of a single gene, the uncoupled model is a generic oscillator in the sense that its estimated parameters are able to reproduce robustness and periodicity of the transcriptional oscillations that are consistent with the reality of the data generating process. The fact that our analysis reveals evidence for sustained robust rhythm generation in gene transcription for data from intact SCN tissue which we cannot conclude when fitting the same model to data from tissue where VIP-mediated signalling was abolished (see Fig S4 of the Supplementary Information) provides further evidence of the importance of the intercellular communication as a contributor to the stability of the oscillations in the SCN and gives rise to the hypothesis that the spatial differential in the characteristics of the transcription function we have found here is more likely to be connected to the intercellular communication than the TTFL inherent in the circadian clock.
Future research will address coupling by adding a distributed delay transcription function that can be used to link observed PER2 transcription to observed calcium. This is a considerably more complex model the parameters of which are currently non-identifiable. However, by applying the approach proposed here to PER2::luc in VIP-null tissue (Fig D in S1 Text) to obtain informed priors on the autoregulatory TTFL parameters of PER2 inference for such a model will in future be feasible. We refer to chapter 7 of [36], which covers a preliminary analysis on modelling and inference of simultaneous measurements of Per2:luc and calcium where we find evidence that the Per2:luc feedback loop is not 'robust' in SCN tissue given absence of calcium oscillations.

Ethics statement
All mouse-based work was conducted under the UK Animals (Scientific Procedures) Act 1986, with UK Home Office Licence PPL 70.8090, and local ethical approval by the LMB Animal Welfare and Ethical Review Body.

Bioluminescense recording and preprocessing
Luciferase-reported Cry1 expression was recorded over 5 to 6 days in three biological replicates of organotypic bilateral SCN slices using an EM-CCD camera with exposure time 0.5h resulting in ca. 250 frames of 400 by 240 pixels [37]. To achieve a signal-to-noise ratio that approximates that of the single cell level and noting that the size of a neuron corresponds to approximately 8 by 8 pixels, we aggregate the raw data into 4 by 4 pixel blocks, which we refer to as locations. As the proposed methodology is computationally costly we analyze a sub-sample consisting of alternate rows and columns of locations. A further de-trending is often required in the analysis of circadian bioimaging data due to consumption of luciferin substrate and is implemented in standard software for analysis of circadian data, e.g. Biodare2 (https:// biodare2.ed.ac.uk/) [38]. In our analysis, at each location a (decreasing) linear trend fitted by least squares is subtracted. Further remarks on studying explant SCN are provided in S1 Text.

MCMC algorithm and prior distributions
This modelling framework is extended to a spatially distributed population of oscillators by placing the single-cell model in a Bayesian hierarchical structure wherein a random effects parameter model accounts for cell heterogeneity driven by extrinsic noise and phenotypic variation. Considerable statistical strength for inference can be gained generally by modelling the dependence between parameters of spatially nearby locations and we find the hierarchical model structure enables joint inference for large spatio-temporal gene expression data sets. Such data consist of indirect and noisy measurements of population sizes of chemical species through measurement processes involving, for example, bioluminescent or fluorescent reporter protein. A third layer of our hierarchical model explicitly models both measurement noise and temporal smoothing associated with such measurements. To infer parameters of the hierarchical model from spatio-temporal experimental data we design a MCMC algorithm which uses efficient parallelism facilitated by the imposed spatial dependency structure. Parameter estimation is achieved through the development of a MCMC algorithm which enables joint inference for entire neuronal circuits.
While other distributional assumptions can be made regarding the delay distribution, the Gamma density possesses an asymmetric shape which generalises the exponential density arising exactly under restrictive modelling assumptions, and in our experience is simple and flexible enough to account for the distribution of time of intermediate unobserved processes such as translation, dimerization and nuclear export/import with spatially varying parameters.
The assumption of Gaussianity for the measurement error leads to computational advantages in the form of being able to invoke efficient filtering procedures. A residual analysis was performed as an a posteriori means of assessing the validity of this assumption.
The likelihood of the state space model model given in Eqs (1) and (2) is intractable, but can be approximated with the filtering procedure for distributed delay CLEs of Calderazzo et al. [7]. In essence, filtering is accomplished via a Kalman update, following a first order linearisation of the nonlinear functions involved in the mean and variance equations of the process, which are analogous to the extended Kalman-Bucy filter (EKBF) algorithm for nondelayed systems [39,40].
The prior distribution of the multiplicative random effects is given by a Gaussian conditional autoregressive model [41]. The assumed neighbourhood structure implies a first-order Markov random field, specifically that the random effect for a given parameter at location i is a priori dependent on the random effects of the same parameter associated with the 8 surrounding locations. This structure is encoded by an adjacency matrix W with element w i,j taking the value 1 if i and j are neighbouring locations and 0 otherwise. Let w i,+ denote the i th column sum W, i.e. the number of neighbours associated with location i and let � −i denote the full set of random effects except � i . The conditional prior distribution of a random effect at location i is given by which implies an improper (non-integrable) joint prior distribution over all random effects of a given parameter. For identifiability a sum-to-zero constraint is imposed on each set of random effects. The posterior distribution resulting from components (i)-(iii) is intractable, hence we design a MCMC algorithm to draw a large number of samples from it. The dependence structure induced by the Markov random field essentially determines the feasibility of the computational approach to inference as the distributions involved can be evaluated in parallel over sets of non-neighbouring locations.
Prior distributions for the hyper-variances of the random effects τ are taken to be (moderately vague) zero-mean Gaussian with variance 25. Prior distributions for the spatial means and light scaling, κ, also are vague, zero-mean Gaussian with variance 100 for logarithms of R, K and n and uniform on [0, 24] and [0, 20] for the mean and standard deviation of the delay distribution respectively. The informative prior for the log degradation rate is Gaussian and informative with mean −0.55 and variance 0.25 2 , as elicited from estimates of functional halflife of luciferase [31]. We are able to obtain maximum likelihood estimates of the measurement error dispersion at each location under the assumption that it is dominated by Gaussian serially uncorrelated noise. The variance of the read noise, arising in the digitization of recorded photoelectrons, of a specific CCD camera setup can generally be estimated using a reference dark recording [42]. In the absence of such a recording it is still possible to estimate the noise variance under assumptions that two separate recordings are available, that read noise dominates other sources of noise, and that the noise process is stationary. Consider RGB video data where Y ðredÞ i;t and Y ðblueÞ i;t are the recorded signals in the red and blue channel at time t and location i, respectively. Under the assumption that they contain the same underlying signal and are corrupted with independent realizations of a Gaussian noise process with variance s 2 Z i then is the maximum likelihood (ML) estimator of s 2 Z i . To obtain an informative prior distribution we apply this estimator to all locations and take logarithms and hence obtain an empirical distribution to which a Gaussian is fitted with mean −5.3 and standard deviation 0.17. This provides a lognormal prior distribution for the noise variance.
As the posterior distribution of the parameters is intractable we resort to designing a blocked random walk Metropolis algorithm to sample the posterior distribution. The algorithm is implemented in Matlab 2019a [43]. While computationally expensive, it is executable on a standard modern desktop PC, in large part due to two design features: the locationspecific likelihoods are computed in parallel which we found to speed up computation linearly with the number of available processor cores. In addition, we make use of adaptive MCMC [44], i.e. a scheme to optimize the variances of the proposal distribution which substantially improves mixing and reduces the number of iterations required to achieve convergence. Parameter blocks are updated in a fixed scan Gibbs fashion. The blocking strategy is utilized in order to make use of the empirical covariance structure of the posterior wherever computationally feasible. The blocks are (with corresponding dimension) hyper-variances τ (5), global means θ (5), five blocks of random effects associated with each of the global means � (L), degradation rate μ (1), light scaling κ (1) and measurement error standard deviation σ η (1). For the 5-dimensional block proposals we use the estimated posterior covariances, scaled by an adaptive coefficient to obtain acceptance rates close to 0.234 and for the 1-dimensional a rate of 0.45 [45]. For each of the random effect blocks, proposals are spherical Gaussian with variances scaled using another adaptive coefficient to obtain the an acceptance rate of 0.234. While there is covariance structure in the posterior distribution of random effects that could in principle be exploited, it is prohibitively expensive in practice due to the dimension of the these parameter blocks. The adaptive coefficient γ (k) for each block at iteration k is tuned by examining the empirical acceptance rate of the chain and taking γ (k+1) = γ (k) � c k if the observed acceptance rate is above the target value and γ (k+1) = γ (k) � (1 − c k ) if below. Furthermore, diminishing adaption is implemented by taking c 1 = 0.02 and c k = c k−1 − c k−1 /10 4 . The resulting chains have acceptance rates close to optimal.
As the output of an algorithm with random walk proposals typically suffers from positive autocorrelation we evaluate the output using lugsail batch means effective sample sizes [46] which calculates the equivalent sample size free of serial correlation. The algorithm is run for 6 × 10 4 iterations for each experimental replicate on an 3.40 GHz Intel Core i7-6700 processor utilizing four cores for parallel evaluation of the likelihood approximation. The first half of the output is treated as burn-in and discarded and the remaining chains are used for further analysis. The computational cost is approximately 500 hours per replicate and the univariate effective sample size is > 100 for all parameters and locations.