Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Rapid prototyping and design of cybergenetic single-cell controllers

## Abstract

The design and implementation of synthetic circuits that operate robustly in the cellular context is fundamental for the advancement of synthetic biology. However, their practical implementation presents challenges due to low predictability of synthetic circuit design and time-intensive troubleshooting. Here, we present the Cyberloop, a testing framework to accelerate the design process and implementation of biomolecular controllers. Cellular fluorescence measurements are sent in real-time to a computer simulating candidate stochastic controllers, which in turn compute the control inputs and feed them back to the controlled cells via light stimulation. Applying this framework to yeast cells engineered with optogenetic tools, we examine and characterize different biomolecular controllers, test the impact of non-ideal circuit behaviors such as dilution on their operation, and qualitatively demonstrate improvements in controller function with certain network modifications. From this analysis, we derive conditions for desirable biomolecular controller performance, thereby avoiding pitfalls during its biological implementation.

## Introduction

Propelled by advancements in DNA synthesis, laboratory automation, and a growing repository of characterized biological parts, synthetic biology is starting to bear fruit1,2,3,4,5,6,7. Recent years have seen a surge of synthetic circuits applied to biotechnology8 and medicine9. However, synthetic circuit construction still presents serious challenges due to unanticipated cross-talk between parts, loading and burden effects, operation in a cellular environment which is inherently stochastic, and long design-cycle time periods, among other reasons. Furthermore, synthetic circuits are usually developed in a context different to that of their end-application, and the circuit’s transplantation to new environments comes with complications: changes in culture conditions or host can significantly degrade circuit performance10.

There are different strategies to mitigate the effect of host and environment context. Circuit reliability can be improved by means of network architecture11. A more general approach to engineer robustness is to control the circuit’s critical components with feedback regulation, a strategy commonly used in endogenous biological systems12,13,14. The properties of feedback regulation have previously been exploited in synthetic circuits to increase bioprocess yields15,16,17, or circuit robustness18. However, it is worth noting that previous implementations of in vivo feedback regulation were not capable of perfect adaptation, i.e., convergence to a constant activity level regardless of external disturbances. To achieve this feature, integral action is required19.

Theoretical implementations of integral controllers solely employing chemical reactions (biomolecular controllers) have been proposed20,21,22,23,24,25,26, but experimental demonstrations remain challenging, with only a few examples of integral (or quasi-integral) implementations (in vivo implementations in27,28,29,30; in vitro implementation in31). The translation of circuit specifications to biomolecular realizations is non-trivial and depends on component availability, characterization, and cross-talk, among others10,32. Mathematical modeling is usually employed to identify and alleviate these issues. However, when the target system to be controlled is not quantitatively defined, this approach can lead to large discrepancies between predictions and experimental outcomes.

An engineering strategy commonly used to develop complex, real-time embedded controllers is hardware-in-the-loop (HIL), where the controller being designed is interfaced with a realistic simulation of the system it should steer. HIL is widely used in industries where testing and optimizing the embedded controller in its final application setting is infeasible or very expensive, such as in the automotive or aerospace industries. For example, to ensure an airplane rudder functions suitably over the entire flight envelope, the full rudder and its controlling hardware are interfaced in closed-loop with an aerodynamic computer model of the rest of the airplane. In this way, the expected impact of the rudder dynamics on the airplane flight characteristics can be studied easily for a wide-range of flight conditions. In these cases, HIL vastly decreases development time and costs by shortening the design cycle and minimizing the number of test runs with the real system. To fulfill similar functionalities in a biological setting, we envisioned the Cyberloop (Fig. 1a), a hybrid framework to test and optimize synthetic circuits (biomolecular controllers in this work) under realistic conditions. In the Cyberloop, the targeted in vivo biological system is interfaced at the single-cell level with biomolecular controllers implemented in silico, thereby enabling rapid and cost-effective prototyping. Closing the loop with the true biological system instead of simply using simulations has clear advantages in the design process, as no assumptions need to be made regarding the system’s structure or parameters.

The hybrid in vivo/in silico interaction in Cyberloop is achieved via fluorescence measurement and optogenetic activation with light under the microscope33. Investigating/Measuring cellular behavior via fluorescent proteins (FP) is a well-known and well-established method in the synthetic biology research community with thousands of FPs available now34,35 for different cell types. Moreover, optogenetics is a well-known biological technique that uses light to influence biological processes. Most notably, it facilitates a unique capability of controlling gene expression with excellent spatial as well as temporal resolution36. An interface of fluorescence measurement and optogenetic activation thus makes this Cyberloop framework applicable to different cell types, and empowers aiming at hundreds of cells individually in a parallel fashion.

Using the Cyberloop with a genetically engineered strain of Saccharomyces cerevisiae (Fig. 1b), we first show how the behavior of a biomolecular controller (Autocatalytic Integral Control motif21) designed in a deterministic setting drastically changes when put into the stochastic cellular context and provide guidelines to reduce such effects. Secondly, we study the Antithetic Integral Control motif20, which received broad attention due to its robustness and good performance in stochastic settings. One key assumption required for antithetic controllers to show perfect adaptation is the lack of degradation or dilution experienced by the controller molecules, which has been investigated theoretically28,37,38,39. We here show that dilution rates relevant to S. cerevisiae physiology do not significantly degrade the performance of this controller for our target biological network. Further, we analyze two extensions of this control motif, which have been proposed and studied mathematically40,41. We exhibit their qualitative effect on the closed-loop performance and stability of the network. Through these examples, we show how the Cyberloop provides actionable insights for the implementation of biomolecular controllers in the cellular environment.

## Results

### The Cyberloop

Previous strategies for in silico regulation of living cells mostly dealt with population-level feedback, where the readout from all cells (or only one cell) was processed and combined before one common input was given to all the cells42,43,44,45,46,47,48. There are only a handful of studies implementing single-cell level feedback33,49,50. Furthermore, in all of these approaches the control architectures used were deterministic, and followed motifs that are well-established in control engineering, such as proportional control, proportional-integral control, or Model Predictive Control (MPC). While adequate for computer control of bioreactors, these approaches are not typically suitable for bio-molecular control strategies that will be implemented in vivo in the complex and stochastic environment of single cells. To address these challenges, we have expanded a previously published tool for in silico optogenetic control of single cells33 to include biomolecular (stochastic) control motifs. This experimental platform periodically captures microscopy images of cells placed under the microscope and performs automated image analysis for cell segmentation, tracking, and quantification. The quantified readout from each cell is subsequently passed to its own biomolecular controller, updating the propensities of biomolecular reactions dependent on the measured species (Fig. 1a). The reaction network is then simulated with stochastic setting51 until the next measurement time-point, when the controller output is fed back to the cell in the form of an optogenetic input. In this framework (Supplementary Fig. 4), the controller output (computed light intensity for cell stimulation) is applied after a delay of one sampling time interval which was set to be 2 min in our experiments. For the biological target system (Fig. 1b) used in our experiments, this small delay has negligible impact on the controller performance33. The sampling/imaging time period of 2 min was chosen based on the computation time required to run our software routine (executing cell segmentation, tracking, quantification, and stochastic controller simulation for individual segmented cells) between consecutive sampling in our experiments (Supplementary Fig. 8). Approximately 75 to 100 cells were targeted and tracked for the full-duration of each experiment.

We chose a genetically modified strain of S. cerevisiae for our experiments. The biological target variable, placed under control throughout this study, was the nascent RNA counts of tdPCP-PP7 system52 as shown in Fig. 1b. The real-time visualization/measurement of nascent RNAs was achieved by using a live-cell fluorescent reporter (PP7-mRuby3 fusion protein). Gene expression has been shown to occur in bursts33 displaying a high degree of variability both among cells and over time. This makes it an ideal system to test the performance of stochastic biomolecular controllers. To facilitate optogenetic activation we used a light-activated transcription factor (Fig. 1b). And we employed the Digital Micromirror Device (DMD) based custom-built projection hardware and software (developed in33) to direct light to individual cells, placed under the microscope, with high spatio-temporal precision. The reader is referred to Methods section for further technical details.

### Autocatalytic Integral Controller

We first used the Cyberloop to characterize the Autocatalytic Integral Controller topology21, which belongs to a class of biomolecular control architectures implementing integral feedback with one sole controller species24,25. This minimal integral network topology (Fig. 2a) guarantees set-point tracking and robust perfect adaptation in deterministic setting, and it has been shown that its metabolic load on the host cell can be tuned to a minimal level compared to all possible controllers. However, its performance in the presence of stochastic variations remains unexplored to date.

As the first test of this motif’s behavior when implemented through stochastic chemical reactions (Fig. 2a, right), we showed its effectiveness for set-point tracking when the copy-number of controller species V is constrained to be strictly positive. Under this condition, this motif displays the desired set-point tracking performance (Fig. 2b). However, when no constraints are placed on the copy-number of V and its time evolution is modeled stochastically, it will eventually (with probability one) reach an abundance of zero molecules and not change further. This is because V = 0 is an absorbing state for this system. The only source of V is a positive feedback mechanism, requiring the presence of V itself (Fig. 2a). Therefore, the absence of V implies the impossibility of this autocatalytic reaction to fire, and no more molecules of V can further be produced. We recapitulated this behavior in our experiments (Fig. 2c). We also found that by decreasing the value of gain parameter, k, we could extend the average time needed for the network to reach the absorbing state (Fig. 2c, bottom). At steady-state, for XL to track the set-point a certain amount of X1 will be required. This X1 is produced in the actuation reaction (third reaction in Fig. 2a, right) whose propensity is kV. This implies that decreasing the value of k would result in higher abundance of V to maintain the production of the required amount of X1. This can be observed in Fig. 2c (inset). At time t = 100 min, the experiment with lower k value exhibits higher V abundance in cells compared to the one with higher value of k. And this higher abundance of V, in turn, prolongs the time for the system to reach the absorbing state.

In biology, components used to build synthetic networks often present behaviors not necessarily present in the idealized design. The Cyberloop allows incorporation of such non-ideal biological effects in the controller network, as for example promoter “leakiness” (Fig. 2d). The addition of a basal expression rate of our controller species, V, modifies the system behavior and eliminates the robustness and perfect tracking properties of our network (Fig. 2d, right in red; Supplementary Information Section 1.1.1). However, experimental results show that it can also have a positive effect if balanced properly with the rest of the system parameters, as it eliminates the absorbing state (Fig. 2d, left). As can be seen in (Fig. 2d and e, blue), proper tuning of γ, the basal production rate of V, enables long-term set-point tracking without the need for positivity constraint on V, and with minimal steady-state error even in a stochastic setting.

### Antithetic Integral Controller

The Antithetic Integral Controller was the first biomolecular control motif to take into account the stochasticity present in chemical reaction networks, and even draw benefits from it20. This controller is composed of two species, Z1 and Z2, which interact with the controlled system and with each other to robustly regulate XL abundance (Fig. 3a, b). In a similar fashion as the Autocatalytic controller, we implemented the Antithetic controller in the Cyberloop to study its properties when connected to a real biological system.

One key characteristic of integral controllers is their ability for perfect set-point tracking. We first observed that indeed this controller can accurately bring the average nascent RNA count to different desired reference levels (Fig. 3c). In addition to this, we also observed that it can track dynamic references or set-points during the course of the experiment (Supplementary Fig. 6). Next, we tested its ability to precisely regulate gene expression in the presence of strong stochastic fluctuations present at the level of the biomolecular controller, and at the level of the biological system under control, which represents high intrinsic noise due to low copy number of the involved molecules. For this, we operated the controller circuit in parameter regimes where Z1 and Z2 exist in single-digit abundances, and observed no change in the controller’s steady-state tracking performance (Fig. 3f). This supports the theoretical analysis of the control motif, which had shown that stochastic noise was not detrimental to its performance20. Next, we focused on analyzing the role of the sequestration reaction (rate η) between Z1 and Z2 on the closed-loop dynamics of the system. We observed that higher sequestration rates led to improved transient dynamics, e.g. faster settling times. However, we found that values of η of the same order of magnitude as the production rates of Z1 and Z2 achieved reasonable performances, and further increases in η produced only marginal gains (Fig. 3e). Therefore, Z1 and Z2 candidate pairs do not necessarily require an extraordinarily high binding affinity to warrant a good controller performance for the given biological system.

A key assumption required for the Antithetic controller to display perfect disturbance rejection and tracking is that the degradation of controller species Z1 and Z2 is negligible. This assumption is challenged in fast-dividing cells, or when Z1 and Z2 present a short half-life. The consequences of degrading controller species are that the integral term, or the memory in the system, is gradually lost, as explained in37. A theoretical treatment of the issue shows that degradation introduces an error on the steady-state tracking properties of the system (Supplementary Information Section 1.2.1), which is dependent on the controller’s parameters. To test out the practical implications of dilution due to cell growth in S. cerevisiae, the organism where the controllers are supposed to be embedded, we introduced degradation terms in Z1 and Z2 (Fig. 3g, inset) of the order of yeast’s cell cycle period. The cell cycle period or the doubling time of our engineered yeast strain was found to have a distribution closely resembling a Poisson distribution with a mean doubling time of 77 min (Supplementary Fig. 7). During the experiment, doubling times (for computing dilution rates, $$\delta = \frac{\,{{\mbox{log}}}(2)}{{{\mbox{Doubling Time}}}\,}$$) of individual cells used in their in silico controller network were randomly sampled from this distribution. We found that for the given biological system network (Fig. 1b), dilution does not play a significant role in the steady-state tracking properties of the controller resulting in negligible tracking error over a broad range of controller parametrizations (Fig. 3g, right).

### Antithetic Integral Rein Controller

We next implemented the “Rein” extension40 of the Antithetic control motif in the Cyberloop and observed its implications on the closed-loop system behavior. In addition to all biomolecular reactions in the Antithetic controller network, this motif includes an extra direct negative feedback from the controller species Z2 to the control target species XL represented by the reaction highlighted in (Fig. 4a in red). As investigated in40, considering a classical gene-expression model as the system to be controlled, this additional repressing feedback from Z2 and the normal actuating influence from Z1 have an opposing effect on the system output which in turn results in improved system dynamics. In the Cyberloop, we only have two-way communication (output measurement through fluorescence microscopy and actuation though light stimulation) channel between the in silico controller simulation and the real biological system but this extended motif requires one more channel to implement the additional reaction. To circumvent this problem we added an in silico molecule Y, the new symbolic system output to be controlled. This molecule is actuated by the real biological system output XL (nascent RNA count). Thus, the target system network to be controlled was a hybrid network with real biological entities X1, …, XL and in silico species Y (Fig. 4b). This allowed us to implement and carry out experiments with this motif in the Cyberloop with Y as our output variable of interest.

In these experiments, we observed that this controller motif achieves the desired set-point tracking by bringing the output molecule Y count to different set-points (Fig. 4c). Further, we found that this Antithetic Integral Rein Controller indeed improves the system response characteristics, achieving lower overshoot, faster settling time, and lower variance compared to the original Antithetic control motif (Fig. 4d, top and bottom). This observation is in line with the theoretical findings presented in40. We also observed that for the given parameter values, the “rein” extension requires very low abundance of controller species Z2 to achieve set-point tracking when compared to the Antithetic control motif (Fig. 4d, center). Furthermore, we found that when the output degradation rate (δ in Fig. 4b) is high enough, this extended Antithetic motif doesn’t lead to significant qualitative improvement in controller tracking performance over the original Antithetic motif (Fig. 4e). This suggests that under such conditions when the system output has a considerable degradation rate of its own, the addition of this extra negative “rein” feedback to the output within an Antithetic motif may not be warranted. We also briefly studied the favorable performance of this controller motif in the presence of a basal production reaction of the output molecule. The results are shown in Supplementary Fig. 9.

### Antithetic proportional-integral (PI) controller: single-cell trajectories

As mentioned previously, the Antithetic Integral Control motif has been shown to exhibit robust perfect adaptation characteristics in the population (mean) behavior of the target-controlled network20. Applications requiring well-behaved single-cell responses prompt a further investigation on the effect this motif has on single-cell dynamics. A careful stochastic simulation study with simple gene-expression system model in53 reveals that in certain parameter regimes single-cell output responses can follow oscillatory trajectories even when the population mean output is converging and stable.

To probe the single-cell level effect of this motif over a real biological system network, we analyzed the single-cell trajectory data obtained from different Cyberloop experiments. We employed spectrum analysis tools54, which are extensively used in signal processing field to extract frequency response of a given signal (single-cell output trajectory in our case). First, we analyzed the frequency response in open loop and closed loop (Antithetic Integral Control) experiments (Fig. 5a, left). As seen in the average frequency response (amplitude spectrum) of all single-cell trajectories (Fig. 5a, right), a well-defined peak at a non-zero frequency is observed in the closed-loop spectrum. This suggests that for the given experimental parameters in the Antithetic control motif, single-cell trajectories exhibit fluctuations with their amplitude spectrum achieving a maximum at about 0.2 rad./sample frequency. Further, we observed that the frequency response characteristics (peak value and the corresponding frequency) remains relatively unchanged for a range of controller gain parameter, k, values (Fig. 5b). Please refer to Methods section for further details about how the average frequency response of single-cell trajectories was computed in this study.

Next, we investigated the effect of adding a proportional feedback on the performance of the Antithetic Integral Control motif. For our experiments, we included a simple proportional negative feedback (Fig. 5c, d) with a max function which restricts the propensity function to non-negative values. This additional feedback term can represent a local approximation of an implementable repressing reaction41. As expected, this Antithetic Proportional-Integral Control motif shows average output set-point tracking and maintains robust perfect adaptation property (Fig. 5e, left). Here, we also observe that a higher proportional gain, kp, value results in larger overshoot and longer settling times in the average output response41. Remarkably, this additional proportional negative feedback is found to mitigate oscillations observed in single-cell trajectories when employing the Antithetic Integral Control with the given parameters (Fig. 5e, right). This demonstrates a possible strategy to avoid oscillatory single-cell dynamics, which can be immensely useful in the biological implementation of integral controllers.

## Discussion

In this work we introduced the Cyberloop, an experimental framework for the rapid testing and optimization of biomolecular controllers embedded in the cellular environment. Using this tool, we first studied how a controller designed to be used in deterministic settings, the Autocatalytic Integral Controller, performs when implemented as a stochastic chemical reaction network. Through this example, we could observe the large discrepancies in controller behavior between the deterministic and the stochastic implementations of the system; the deterministic variant shows perfect tracking and a knob to tune its metabolic load on the cell21, whereas its stochastic counterpart quickly becomes trapped in an absorbing state, ceasing to be effective. Capitalizing on the rapid design-cycle iterations enabled by implementing the biomolecular controller network in a computer, we could create a set of guidelines to overcome the challenges imposed by stochasticity, as well as parameter regimes that show a good performance. Addition of a low basal expression of the controller species, V, eliminated the absorbing state and led to an improved performance.

In another example, we analyzed the Antithetic control motif and how its performance is influenced by its constituting parameters. In contrast to the Autocatalytic controller, the Antithetic motif had previously been shown to benefit from the stochastic fluctuations and exhibit robust perfect adaptation in stochastic settings20. In our experiments with this motif, we indeed observed robust set-point tracking and demonstrated various ways of improving the performance (output settling time, overshoot, steady-state behavior, and controller species abundance). Most notably, we investigated a key assumption required for this controller to achieve perfect tracking: the lack of degradation reactions on the controller species28,37. This assumption is hard to achieve, particularly in fast dividing cells, where dilution will result in an ‘effective’ degradation of the controller species. In this regard, we analyzed the effect of dilution rates comparable to yeast’s growth rate on the controller performance. We observed that although, according to theoretical analysis, dilution gives rise to steady-state error (Supplementary Information Section 1.2.1), it has a fairly negligible impact on the tracking performance for the target controlled biological process in our experiments, and hence may not warrant an increased complexity of biomolecular schemes that seek to minimize dilution-induced tracking errors28,37. Furthermore, as in the case of the Autocatalytic controller, we extract general guidelines to guide the design process, such as the need for a moderate to high values of the sequestration reaction rate, and a good performance of the controller with very low abundances of the controller species. We could also validate the performance improvement (reduced settling time and variance) with an extension of this controller, Antithetic Integral Rein Controller motif, which had only been analyzed theoretically before40.

Investigating the single-cell dynamics with frequency analysis tools, we demonstrated that for certain parameters, the Antithetic control motif can induce an oscillatory single-cell output response53 in our target biological system. We further demonstrated a possible strategy in suppressing oscillations in the closed loop single-cell dynamics by adding an extra proportional negative feedback action. Although this additional proportional feedback action had been analyzed theoretically and shown to reduce the output variance with improved controlled performance41, we have exhibited its potential in also improving the closed loop single-cell dynamics with dampened oscillations.

With these diverse examples, we have established that the Cyberloop can act as an intermediate step between a design process fully reliant on simulations, and trial-and-error of different biological implementations. We consider this stepping stone between the two approaches valuable, as it enables one to transition from the idealization of biomolecular circuits to their testing in short time-spans. In contrast to fully simulating the system, the Cyberloop needs to make no assumptions regarding the structure or parametrization of the controlled network, as it is embedded in its biological context. However, the required flexibility to specify biomolecular controller architecture and parametrization also implies that these choices are made through the subjective judgement of the experimenter. Because of this, throughout this study we explored the parameter space for production and degradation of controller species in order to gauge the controller’s sensitivity to these variables. The controller species abundance was varied from a few molecules per cell to a few thousands, consistent with physiological observations of regulatory molecules in S. cerevisiae. In addition, rates of production and degradation of these species were kept at biologically meaningful ranges, going from few reactions taking place per minute, to a maximum of approximately a hundred reactions taking place each second.

In conclusion, we would like to remark the potential use of the Cyberloop framework for many wider applications involving optimization and design of other categories of synthetic circuits, beyond biomolecular controller circuit design. The Cyberloop also enables the establishment of virtual cell-to-cell communication which in turn can be used to exhibit pattern formation55 or to engineer emerging behaviors56. It may also prove useful in carrying out tasks requiring division of labor among several sub-populations in order to achieve complex goals57,58.

## Methods

### Growth conditions

Unless otherwise indicated, Escherichia coli were grown in 14 mL tubes (Greiner) in LB (1% tryptone, 0.5% yeast extract, 1% NaCl) and incubated in an environmental shaker (Excella E24, New Brunswick) at 37 °C with shaking at 230 rpm. Saccharomyces cerevisiae were grown in 14 mL tubes (Greiner) in SD dropout medium (2% glucose, low fluorescence yeast nitrogen base (ForMedium), 5 g/L ammonium sulfate, 8 mg/L methionine, pH 5.8) and incubated in an environmental shaker (Innova 42R, New Brunswick) at 30 °C with shaking at 230 rpm unless otherwise indicated. Ampicillin (Sigma-Aldrich Chemie GmbH) was used at a concentration of 100 μg/mL.

### Plasmid and yeast strain construction

No new plasmids or new S. cerevisiae strains were constructed in this study. The yeast strain (Fig. 1b) used in this work has already been constructed and published in33. As mentioned in33, S. cerevisiae strains were derived from BY4741 and BY4742 (Euroscarf, Germany). E. coli TOP10 cells (Invitrogen) were used for plasmid cloning and propagation. Plasmids were constructed by restriction-ligation cloning using enzymes from New England Biolabs (USA). All plasmids, strains and related details are summarized in Tables 1 and 2. Strain DBY96 was used for all the experiments in this study.

### Culture media and initialization

Yeast cell cultures were started from a −80 °C glycerol stock at least 24 hours prior to the experiment, and were grown at 30 °C in SD dropout medium. They were kept at OD60 < 0.2 in an incubator at 30 °C for the last 12 hour leading to the experiment. For each experiment, ~400 μL of cell culture was centrifuged at 3000 RCF for 6 min, and then sufficient volume of supernatant was removed to get a concentrated culture with OD600 ~ 4.

Around 800 μL of 2% agarose (UltraPureTMAgarose, Invitrogen) in SD medium solution was poured on a microscope slide set-up. The set-up consisted of two stacks of microscope slides, each stack having two slides, placed 15 mm apart parallel to each other on another microscope slide, creating a U-shaped flat bottom well. A 25 mm × 25 mm square cover slip was then gently placed on top. It was left at room temperature for one hour. Once the agarose solution solidified, the microscope slide stacks and cover slip were removed, and the pad was cut on the sides with a scalpel to get ~15 mm × 15 mm flat-top pad. 1 μL of concentrated cell culture (as described above) was pipetted at the center of the pad. This pad was then carefully turned over, avoiding air-pockets, into a circular tissue culture dish with cover glass bottom (35 mm FluoroDishTM, World Precision Instruments) lined inside with a strip of damp paper towel to maintain humidity during the experiment. The dish was closed, sealed with a strip of parafilm, then immediately placed onto a custom built sample holder inside the microscope’s environmental box (Life Imaging Services, Switzerland). Cells were allowed to settle for one hour before starting experiments. As cells proliferated in mono-layer under the agarose pad only up to 5–6 hours and our light projection hardware33 can only target cells proliferating in 2D layer, the experiment duration was set to four hours.

### Imaging and light delivery system

All images were taken under a Nikon Ti-Eclipse inverted microscope (Nikon Instruments), equipped with a 40X oil-immersion objective (MRH01401, Nikon AG, Egg, Switzerland) and CMOS camera ORCA-Flash4.0 (Hamamatsu Photonic, Solothurn, Switzerland). Following imaging set-ups were used in the microscope:

• Brightfield imaging - LED 100 (Märzhäuser Wetzlar GmbH & Co. KG) with diffuser and green interference filter placed in the light path

• Fluorescence (mRuby3) imaging - Spectra X Light Engine fluorescence excitation light source (Lumencor, Beaverton, USA), 550/15 nm LED line from the light source, 561/4 nm excitation filter, HC-BS573 beam splitter, 605/40 nm emission filter (filters and beam splitter acquired from AHF Analysetechnik AG, Tubingen, Germany)

In all of the experiments in this study, imaging/sampling was done at an interval of 2 min and the total duration of experiment was four hours. At every sampling time, two brightfield images above and below the focal plane (±5 a.u. Nikon Perfect Focus System) were acquired, with an exposure of 100 ms each, for cell segmentation and tracking. Subsequently, five fluorescence images (Z stacks with step size ~ 0.5 μm) were also captured, with an exposure of 300 ms each, for quantification (nascent RNA count).

The microscope was placed inside an opaque environmental box (Life Imaging Services, Switzerland), which maintained the temperature inside at 30 °C and also shielded the cell sample from external light.

A DMD (Digital Micromirror Device) based custom-built blue light projection set-up, developed in33, was used for single-cell optogenetic stimulation under the microscope. A neutral density filter (ND 1.3, 25 mm absorptive filter from Thorlabs) was placed in the light stimulation pathway to reduce the blue light intensity reaching the cells. An open-source microscope control software YouScope59 was used to operate and control the microscope as well as the light projection system.

### Workflow between consecutive sampling

In a Cyberloop experiment, the workflow between consecutive sampling involved the following automated steps/processes running on a computer system:

1. 1.

Capture brightfield and fluorescence images of the cells placed under the microscope (using YouScope59 microscope control software).

2. 2.

Segment individual cells in the brightfield image using CellX60 cell segmentation tool.

3. 3.

For each segmented cell:

1. i.

Assign the segmented cell to its respective unique tracking index/identifier33,61 in order to track the cell and acquire time trajectory for that cell.

2. ii.

Using captured fluorescence images, quantify the cellular readout spot intensity33, which is proportional to the nascent RNA count of the segmented cell.

3. iii.

Based on the cellular readout (nascent RNA count), run an stochastic simulation51 of the biomolecular controller network for a sampling duration (two minutes), and compute the input blue light intensity for the segmented cell.

4. 4.

Once the input blue light intensities for all segmented cells have been computed, generate a corresponding input mask image for the light projection system33.

5. 5.

Correct the generated input mask image for optical aberrations in the projection optics (using calibration data computed just before the experiment)33.

6. 6.

Project the corrected input mask image onto the cells placed on the sample plane of the microscope such that each segmented cell receives its corresponding blue light intensity computed by its own independent controller simulation in Step 3.iii.

Respective software routines for the above mentioned steps were developed and run in MATLAB (MathWorks) environment.

### Stochastic simulation of biomolecular controllers

All in silico simulations of biomolecular contollers were run in MATLAB (MathWorks) environment. Gillespie’s Stochastic Simulation Algorithm (SSA,51) was used to simulate a given biomolecular controller reaction network for every cell individually. At every sampling time tk, once the cellular readouts (nascent RNA counts) are quantified from acquired fluorescence images, these computational steps were followed for each tracked cell:

1. 1.

The quantified cellular readout (nascent RNA count) was used to compute and update propensities of the biomolecular controller reaction network.

2. 2.

Gillespie’s SSA was applied for the image sampling time interval (two minutes) to obtain the controller species abundance.

3. 3.

This abundance value was then used to determine the blue light intensity I(tk) the corresponding cell should receive in the next cycle.

In this way, the controller output (blue light intensity I(tk)) was updated once a new measurement (microscopy images) became available, and was held constant between measurement times. Due to an upper power limit on the light intensity output from the DMD projector, the applied light intensity at time tk was min(I(tk), 1), where one corresponds to the maximum (scaled) light intensity that DMD projector can provide33.

When selecting a biological system for our study, we sought to use a highly stochastic system that will allow us to explore the impact of our controller in highly noisy environments. Therefore our target biological system network (Fig. 1b) was centered around transcription which occurs in highly random bursts33. As a result the controlled biological molecule “nascent RNA” also displays significant bursting behavior and highly stochastic dynamics (Supplementary Fig. 5) as desired. For such systems it is the expected value of the signal that is guaranteed to track the reference under antithetic integral feedback control20. There are two ways one can check this: by looking at sample averages of multiple traces or (for an ergodic system) by looking at time averages. We chose the former, and that is why we use average attributes in our experimental results. Although we are plotting trace averages, we are still performing control at the single-cell level, which gives dramatically better performance than an alternative scheme that uses the population average for feedback control.

All experiments in this study are 4 hours long, and with a sampling/imaging period of 2 min we get 121 sample-points throughout the duration of the experiment. All time-course mean/average attributes, for example, average nascent RNA count (average output), etc., are computed taking average over all the cells (which were tracked/targeted during the full experimental duration) for each sample-points. Let us consider that a total of N individual cells were tracked/targeted in an experiment. Given the output time trajectory for cell n as {snk, k = 1, 2, …, 121}, the average/mean trajectory is given by:

$$\,{{\mbox{Mean output trajectory}}},{{{{{{{\mathcal{M}}}}}}}}=\left\{\frac{\mathop{\sum }\nolimits_{n = 1}^{N}{s}_{nk}}{N},k=1,2,\ldots ,121\right\}.$$
(1)

We further filter this mean trajectory with five time-point averaging filter. This filtered trajectory has been used to display mean attributes in all the figures, where applicable, presented in this study.

Based on the experimental data, we consider all samples from sample-point 30 (60 min) to sample-point 101 (202 min), if not mentioned otherwise, for the calculation of steady-state attributes such as mean steady-state error. We use the following steady-state calculations in our analysis:

$$\,{{\mbox{Mean steady-state output value for }}}{n}^{th}{{\mbox{ cell}}},{m}_{n}=\frac{\mathop{\sum }\nolimits_{k = i}^{j}{s}_{nk}}{j-i+1},$$
(2)
$$\,{{\mbox{Mean steady-state output value for all cells}}},M=\frac{\mathop{\sum }\nolimits_{n = 1}^{N}{m}_{n}}{N},$$
(3)
$$\,{{\mbox{Mean steady-state output error}}},{E}_{r}=M-ref,$$
(4)
$$\,{{\mbox{Percentage mean steady-state output error}}},{E}_{r} \% =\frac{M-ref}{ref}\times 100,$$
(5)

where (i, j) = (30, 101) defines the steady-state time points, and ref represents the set-point reference value.

For the steady-state distribution of controller species abundance (for example, Fig. 3f, right), we first compute the mean controller species count for each cell at steady state sample-points, and then we use these respective mean counts for all the tracked/targeted cells to get the required distribution.

### Frequency response computation (MATLAB)

Given, single-cell output (nascent RNA count) trajectories $$\{{{{{{{{{\mathcal{S}}}}}}}}}_{n},n=1,\ldots ,N\}$$ at steady-state corresponding to N cells in an experiment

$${{{{{{{{\mathcal{S}}}}}}}}}_{n}=\{{s}_{nk},k=1,2,3,\ldots \},$$
(6)

where snk is the measured nascent RNA count of nth cell at time tk.

For n = 1, …, N, the corresponding Discrete Fourier Transform (DFT) of each trajectory can be computed as

$${{{\mbox{DFT}}}}_{n}={{\mbox{fft}}}\,({{{{{{{{\mathcal{S}}}}}}}}}_{n}),$$
(7)

where fft(  ) is an inbuilt MATLAB function which computes the DFT of a given signal. This DFTn is the frequency response corresponding to nth cell output trajectory.

Next, the average frequency response of all single-cell trajectories in an experiment can be computed by simply taking the mean of the individual DFTs of all tracked cells.

$$\,{{\mbox{Average frequency spectrum}}}={{\mbox{mean}}}({{{\mbox{DFT}}}}_{n},n=1,\ldots ,N)$$
(8)

### Results – analysis and formatting

All the results/data in this study were analyzed and plotted using MATLAB R2018a (academic use) platform. These MATLAB generated plots/graphs were finally structured and formatted together as different figures of this article using Inkscape (v0.92, open source).

### Reporting summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.

## Data availability

Raw data (MATLAB .mat files) for all results/figures presented in this article, including Supplementary figures, are available in the Source Data file. Any additional data are available upon request. Source data are provided with this paper.

## Code availability

The custom code used in this study is run on an integrated experimental set-up and hardware33, and can not be executed without the full associated hardware-software suite. Code and hardware configuration files are available upon request.

## References

1. 1.

Khalil, A. S. & Collins, J. J. Synthetic biology: applications come of age. Nat. Rev. Genet. 11, 367–379 (2010).

2. 2.

Cameron, D. E., Bashor, C. J. & Collins, J. J. A brief history of synthetic biology. Nat. Rev. Microbiol. 12, 381–390 (2014).

3. 3.

Eisenstein, M. Living factories of the future. Nature 531, 401–403 (2016).

4. 4.

Bartoli, V., di Bernardo, M. & Gorochowski, T. E. Self-adaptive biosystems through tunable genetic parts and circuits. Curr. Opin. Syst. Biol. 24, 78–85 (2020).

5. 5.

Verbič, A., Praznik, A. & Jerala, R. A guide to the design of synthetic gene networks in mammalian cells. The FEBS Journal, (2021).

6. 6.

Caliendo, F., Dukhinova, M. & Siciliano, V. Engineered cell-based therapeutics: synthetic biology meets immunology. Front. Bioeng. Biotechnol. 7, 43 (2019).

7. 7.

Amrofell, M. B., Rottinghaus, A. G. & Moon, T. S. Engineering microbial diagnostics and therapeutics with smart control. Curr. Opin. Biotechnol. 66, 11–17 (2020).

8. 8.

Tan, S. Z. & Prather, K. L. Dynamic pathway regulation: recent advances and methods of construction. Curr. Opin. Chem. Biol. 41, 28–35 (2017).

9. 9.

Ruder, W. C., Lu, T. & Collins, J. J. Synthetic biology moving into the clinic. Science 333, 1248–1252 (2011).

10. 10.

Nielsen, A. A. K., Segall-Shapiro, T. H. & Voigt, C. A. Advances in genetic circuit design: novel biochemistries, deep part mining, and precision gene expression. Curr. Opin. Chem. Biol. 17, 878–892 (2013).

11. 11.

Segall-Shapiro, T. H., Sontag, E. D. & Voigt, C. A. Engineered promoters enable constant gene expression at any copy number in bacteria. Nat. Biotechnol. 36, 352–358 (2018).

12. 12.

Alon, U., Surette, M. G., Barkai, N. & Leibler, S. Robustness in bacterial chemotaxis. Nature 397, 168–171 (1999).

13. 13.

Muzzey, D., Gómez-Uribe, C. A., Mettetal, J. T. & van Oudenaarden, A. A systems-level analysis of perfect adaptation in yeast osmoregulation. Cell 138, 160–171 (2009).

14. 14.

Barkai, N. & Leibler, S. Robustness in simple biochemical networks. Nature 387, 913–917 (1997).

15. 15.

Gupta, A., Reizman, I. M. B., Reisch, C. R. & Prather, K. L. J. Dynamic regulation of metabolic flux in engineered bacteria using a pathway-independent quorum-sensing circuit. Nat. Biotechnol. 35, 273–279 (2017).

16. 16.

Brockman, I. M. & Prather, K. L. J. Dynamic metabolic engineering: New strategies for developing responsive cell factories. Biotechnol. J. 10, 1360–1369 (2015).

17. 17.

Zhang, F., Carothers, J. M. & Keasling, J. D. Design of a dynamic sensor-regulator system for production of chemicals and fuels derived from fatty acids. Nat. Biotechnol. 30, 354–359 (2012).

18. 18.

Becskei, A. & Serrano, L. Engineering stability in gene networks by autoregulation. Nature 405, 590–593 (2000).

19. 19.

Yi, T. M., Huang, Y., Simon, M. I. & Doyle, J. Robust perfect adaptation in bacterial chemotaxis through integral feedback control. Proc. Natl Acad. Sci. USA 97, 4649–4653 (2000).

20. 20.

Briat, C., Gupta, A. & Khammash, M. Antithetic integral feedback ensures robust perfect adaptation in noisy biomolecular networks. Cell Syst. 2, 133 (2016a).

21. 21.

Briat, C., Zechner, C. & Khammash, M. Design of a synthetic integral feedback circuit: Dynamic analysis and dna implementation. ACS Synth. Biol. 5, 1108–1116 (2016b).

22. 22.

Ferrell Jr., J. E. Perfect and near-perfect adaptation in cell signaling. Cell Syst. 2, 62–67 (2016).

23. 23.

Ni, X. Y., Drengstig, T. & Ruoff, P. The control of the controller: Molecular mechanisms for robust perfect adaptation and temperature compensation. Biophysical J. 97, 1244–1253 (2009).

24. 24.

Drengstig, T., Ni, X. Y., Thorsen, K., Jolma, I. W. & Ruoff, P. Robust adaptation and homeostasis by autocatalysis. J. Phys. Chem. B 116, 5355–5363 (2012).

25. 25.

Shoval, O., Alon, U. & Sontag, E. Symmetry invariance for adapting biological systems. SIAM J. Appl. Dynamical Syst. 10, 857–886 (2011).

26. 26.

Xiao, F. & Doyle, J. C. Robust perfect adaptation in biomolecular reaction networks. 2018 IEEE Conference on Decision and Control (CDC), 4345–4352, 2018.

27. 27.

Lillacci, G., Aoki, S., Schweingruber, D. & Khammash, M. A synthetic integral feedback controller for robust tunable regulation in bacteria. bioRxiv (2017).

28. 28.

Aoki, S. K. et al. A universal biomolecular integral feedback controller for robust perfect adaptation. Nature 570, 533–537 (2019).

29. 29.

Huang, H.-H., Qian, Y. & Vechhio, D. D. A quasi-integral controller for adaptation of genetic modules to variable ribosome demand. Nat. Commun. 9, 5415 (2018).

30. 30.

Frei, T., Chang, C.-H., Filo, M. & Khammash, M. Genetically engineered integral feedback controllers for robust perfect adaptation in mammalian cells. bioRxiv (2020).

31. 31.

Agrawal, D. K., Marshall, R., Noireaux, V. & Sontag, E. D. In vitro implementation of robust gene regulation in a synthetic biomolecular integral controller. Nat. Commun. 10, 5760 (2019).

32. 32.

Andrianantoandro, E., Basu, S., Karig, D. K. & Weiss, R. Synthetic biology: New engineering rules for an emerging discipline. Mol. Systems Biol. 2, 2006.0028 (2006).

33. 33.

Rullan, M., Benzinger, D., Schmidt, G. W., Milias-Argeitis, A. & Khammash, M. An optogenetic platform for real-time, single-cell interrogation of stochastic transcriptional regulation. Mol. Cell 70, 745–756 (2018).

34. 34.

Rodriguez, E. A. et al. The growing and glowing toolbox of fluorescent and photoactive proteins. Trends in Biochem. Sci. 42, 111–129 (2017).

35. 35.

Lambert, T. J. Fpbase: a community-editable fuorescent protein database. Nat. Methods 16, 277–278 (2019).

36. 36.

Baumschlager, A. & Khammash, M. Synthetic biological approaches for optogenetics and tools for transcriptional light-control in bacteria. Advanced Biol. 5, 2000256 (2021).

37. 37.

Qian, Y. & Vecchio, D. D. Realizing integral control in living cells: how to overcome leaky integration due to dilution. J. R. Soc., Interface 15, 20170902 (2018).

38. 38.

Olsman, N. et al. Hard limits and performance tradeoffs in a class of antithetic integral feedback networks. Cell Syst. 9, 49–63 (2019a).

39. 39.

Baetica, A.-A., Leong, Y. P. & Murray, R. M. Guidelines for designing the antithetic feedback motif. Physical Biology, 17, 055002 (2020).

40. 40.

Gupta, A. & Khammash, M. An antithetic integral rein controller for bio-molecular networks. IEEE 58th Conf. on Decision and Control (CDC), 2808–2813 (2019).

41. 41.

Briat, C., Gupta, A. & Khammash, M. Antithetic proportional-integral feedback for reduced variance and improved control performance of stochastic reaction networks. J. Royal Society Interface, 15, 20180079 (2018).

42. 42.

Milias-Argeitis, A. et al. In silico feedback for in vivo regulation of a gene expression circuit. Nat. Biotechnol. 29, 1114–1116 (2011).

43. 43.

Uhlendorf, J. et al. Long-term model predictive control of gene expression at the population and single-cell levels. Proc. Natl Acad. Sci. 109, 14271–14276 (2012).

44. 44.

Melendez, J. et al. Real-time optogenetic control of intracellular protein concentration in microbial cell cultures. Integr. Biol. 6, 366–372 (2014).

45. 45.

Milias-Argeitis, A., Rullan, M., Aoki, S. K., Buchmann, P. & Khammash, M. Automated optogenetic feedback control for precise and robust regulation of gene expression and cell growth. Nat. Commun. 7, 12546 (2016).

46. 46.

Fracassi, C., Postiglione, L., Fiore, G. & di Bernardo, D. Automatic control of gene expression in mammalian cells. ACS Synth. Biol. 5, 296–302 (2016).

47. 47.

Perrino, G., Wilson, C., Santorelli, M. & di Bernardo, D. Quantitative characterization of α-synuclein aggregation in living cells through automated microfluidics feedback control. Cell Rep. 27, 916–927 (2019).

48. 48.

Soffer, G., Perry, J. M. & Shih, S. C. C. Real-time optogenetics system for controlling gene expression using a model-based design. Anal. Chem. 93, 3181–3188 (2021).

49. 49.

Chait, R., Ruess, J., Bergmiller, T., Tkačik, G. & Guet, C. C. Shaping bacterial population behavior through computer-interfaced control of individual cells. Nat. Commun. 8, 1535 (2017).

50. 50.

Toettcher, J. E., Gong, D., Lim, W. A. & Weiner, O. D. Light-based feedback for controlling intracellular signaling dynamics. Nat. Methods 8, 837–839 (2011).

51. 51.

Gillespie, D. T. Exact stochastic simulation of coupled chemical reactions. J. Phys. Chem. 81, 2340–2361 (1977).

52. 52.

Larson, D. R., Zenklusen, D., Wu, B., Chao, J. A. & Singer, R. H. Real-time observation of transcription initiation and elongation on an endogenous yeast gene. Science 332, 475–478 (2011).

53. 53.

Olsman, N., Xiao, F. & Doyle, J. C. Architectural principles for characterizing the performance of antithetic integral feedback networks. iScience 14, 277–291 (2019b).

54. 54.

Gupta, A. & Khammash, M. Frequency spectra and the color of cellular noise. bioRxiv (2020).

55. 55.

Perkins, M. L., Benzinger, D., Arcak, M. & Khammash, M. Cell-in-the-loop pattern formation with optogenetically emulated cell-to-cell signaling. Nat. Commun. 11, 1355 (2020).

56. 56.

Davies, J. Using synthetic biology to explore principles of development. Development 144, 1146–1158 (2017).

57. 57.

Stephens, K., Pozo, M., Tsao, C.-Y., Hauk, P. & Bentley, W. E. Bacterial co-culture with cell signaling translator and growth controller modules for autonomously regulated culture composition. Nat. Commun. 10, 4129 (2019).

58. 58.

Fedorec, A. J. H., Karkaria, B. D., Sulu, M. & Barnes, C. P. Single strain control of microbial consortia. Nat. Commun. 12, 1977 (2021).

59. 59.

Lang, M., Rudolf, F. & Stelling, J. Use of youscope to implement systematic microscopy protocols. Curr. Protoc. Mol. Biol. 98, 14–21 (2012).

60. 60.

Dimopoulos, S., Mayer, C. E., Rudolf, F. & Stelling, J. Accurate cell segmentation in microscopy images using membrane patterns. Bioinformatics 30, 2644–2651 (2014).

61. 61.

Ricicova, M. et al. Dissecting genealogy and cell cycle as sources of cell-to-cell variability in mapk signaling using high-throughput lineage tracking. Proc. Natl Acad. Sci. USA 110, 11403–11408 (2013).

62. 62.

Benzinger, D. & Khammash, M. Pulsatile inputs achieve tunable attenuation of gene expression variability and graded multi-gene regulation. Nature Communications, 9, 3521 (2018).

## Acknowledgements

The authors would like to thank Dr. Dirk Benzinger for providing yeast strains, Fabian Rudolf (ETH Zurich) for the cell tracking code, and Dr. Stephanie Aoki for proof reading the manuscript. This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (CyberGenetics; grant agreement no. 743269), and from a FET-Open research and innovation actions grant under the European Union’s Horizon 2020 research and innovation programme (CyGenTiG; grant agreement no. 801041).

## Author information

Authors

### Contributions

M.K. conceived the project. S.K. and M.R. developed the automation and control software, and performed the experiments. S.K. and M.R. analyzed the data. M.K. supervised the project and secured funding. S.K., M.R. and M.K wrote the manuscript.

### Corresponding author

Correspondence to Mustafa Khammash.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

Peer review information Nature Communications thanks Filippo Menolascina and Enoch Yeung for their contribution to the peer review of this work. Peer reviewer reports are available.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Kumar, S., Rullan, M. & Khammash, M. Rapid prototyping and design of cybergenetic single-cell controllers. Nat Commun 12, 5651 (2021). https://doi.org/10.1038/s41467-021-25754-6

• Accepted:

• Published: