Main

In multicellular organisms, stem cells undergo asymmetric cell divisions, giving rise to progeny with distinct phenotypes7,8. By orchestrating complex gene-regulatory networks, eukaryotic stem cells differentiate into specialized cell lineages that form functional tissues or organs. This differentiation process reflects the genetic intricacy of multicellular eukaryotes, contributing to their evolutionary success8. Parallel phenomena in microorganisms include asymmetric division in Caulobacter crescentus, which produces motile cells that lack reproductive capabilities and sessile cells that are capable of division but not motility9. Similarly, under nitrogen-limiting conditions, the central cells in Anabaena filaments divide asymmetrically, generating progeny specialized in nitrogen fixation or photosynthesis, and ensuring colony survival10. These cellular communities accomplish sophisticated tasks that are unattainable by a single cell type11.

By mimicking the differentiation and cooperative division of labour that characterize natural selection, synthetic biology is unlocking the reprogramming of cellular functions, facilitating the emergence of diverse artificial cell states2,3,4,5,6,12,13. A foundational milestone was the genetic toggle switch, which allowed reversible switching between two distinct states in Escherichia coli14. Other genetic tools for engineering bacterial ‘stem cells’ include partitioning the bacterial chromosome (Par), inducing asymmetric cell division and generating progeny with distinct genetic content3. Epigenetic tools, including phase-separated and scaffolding proteins such as PopZ, have advanced the control of microbial cell differentiation2,6. Multicellular eukaryotic systems have also been engineered; for example, the MultiFate circuit produces multiple stable phenotypes in Chinese hamster ovary (CHO) cells1. Although genetic circuits can potentially program and rewrite cell fates, challenges remain—in particular, scaling genetic toggle switches and DNA partitioning systems with increasing numbers of cell states and quantitatively controlling the ratio of specific cell types in offspring populations. Most artificial systems do not autonomously differentiate and so do not generate complex multicellular systems from a single founder cell type. These limitations constrain the potential applications of synthetic communities to biomanufacturing, regenerative medicine and therapeutic development.

Recombinases—enzymes that catalyse recombination between specific DNA sequences—offer a promising solution. These enzymes target attB (bacterial) and attP (phage) sites, and the recombination outcome (excision or inversion) is determined by the number and orientation of these sites15. Serine recombinases are widely used in constructing Boolean logic gates16, amplification circuits17 and information storage systems18, and multiple att sites can be strategically positioned to expand the toolbox for cell-state programming18,19.

Here we present a suite of recombinase-based cell-fate branching devices that generate diverse progeny cell types with user-defined ratios and enable quantitative control over multicellular morphology. By tuning DNA sequences between att sites and exploiting mutated att variants, we achieve precise control of binary population ratios spanning 0.1% to 99.9% from a single founder. These branching devices can be implemented in parallel or series configurations with transcription factors, secreted enzymes and biosynthesis pathways. We further combined cell-surface display20 with synthetic adhesion molecules21,22,23 to program self-organizing multicellular architectures with highly defined geometries, all derived from a single progenitor cell type. Unlike conventional co-culture strategies, which rely on manually mixing multiple cell types, our platform enables autonomous, programmable diversification across bacteria, yeast, and mammalian cells, laying the groundwork for the bottom-up construction of synthetic consortia and the rational design of coordinated, complex multicellular systems.

Design of cell-fate branching devices

Binary cell-fate branching devices were developed by using a Bxb1 recombinase-based framework. The device contained a single Bxb1 attP site flanked by two identical Bxb1 attB sites in the configuration attBattPattB (Fig. 1a). The recombinase triggered recombination between the attP site and one of the attB sites, excising either the left or the right DNA segment and generating two distinct recombination products (Supplementary Figs. 1 and 2). To ensure that each parental cell differentiated into only one progeny type, the system was restricted to a single genomic copy per cell, which was confirmed by droplet digital PCR (Supplementary Fig. 3). Because this mechanism relies solely on site-specific recombination, we anticipated host independence and therefore tested the devices in representative bacterial (E. coli), yeast (Saccharomyces cerevisiae) and mammalian (HEK293FT) systems.

Fig. 1: Design and validation of genetic devices for cell differentiation.
Fig. 1: Design and validation of genetic devices for cell differentiation.
Full size image

a, Schematic of a probabilistic branching device that generates two fluorescent progeny cell types. bd, Schematics and fluorescence measurements demonstrating differentiation in engineered E. coli (b), S. cerevisiae (c) and HEK293FT cells (d). Progeny ratios were quantified by flow cytometry and are reported as mean ± s.d., n = 8 biological replicates. Scale bars, 10 μm (b), 20 μm (c) and 100 μm (d). e, Factors influencing yeast differentiation driven by branching devices, quantified by flow cytometry (mean ± s.d., n = 8 biological replicates). f, Growth curves of four representative yeast strains, with growth rates summarized in the inset (mean ± s.d., n = 4 biological replicates). Statistical analysis was performed using unpaired two-tailed Student’s t-tests; P ≥ 0.05, not significant.

Source data

To enable differentiation tracking, we incorporated two constitutive promoters with comparable transcriptional strengths into the branching device. The promoters were oriented divergently and separated by att sites, maintaining the attB–attP–attB order (Fig. 1a). Using identical promoters on both arms caused instability owing to homologous recombination in E. coli (Supplementary Fig. 4), necessitating distinct promoter sequences. To minimize transcriptional read-through, terminators were placed between promoters and downstream coding regions. Reporter genes encoding Venus (green) and mScarlet (red) were positioned on opposite arms. After induction with small molecules such as anhydrotetracycline (aTc) or β-oestradiol (Supplementary Fig. 5), Bxb1-mediated excision activated the expression of either Venus or mScarlet. This recombination-driven differentiation yielded two clearly separable cell populations in E. coli, S. cerevisiae and HEK293FT cells, as confirmed by flow cytometry and confocal microscopy (Fig. 1b–d and Extended Data Fig. 1). Despite robust performance, basal recombinase activity resulted in detectable spontaneous recombination in the absence of induction (Extended Data Fig. 2). Using yeast as a test case, we fused degradation tags (UbiM, UbiY and UbiR)24 to Bxb1 and found that all reduced leakiness. Notably, the UbiY tag limited spontaneous recombination to less than 1% over 15 passages without compromising inducibility (Extended Data Fig. 2), demonstrating that controlled protein destabilization effectively suppresses background activity.

To dissect the determinants of branching behaviour, we selected S. cerevisiae for detailed characterization, owing to its genetic tractability and efficient homologous recombination, which facilitates rapid, iterative genome engineering. We swapped the two fluorescent reporters and promoters in the genetic circuit to probe the observed constant progeny cell ratios. Notably, in S. cerevisiae, when fluorescent proteins were used as reporters, terminators between the att sites were not required to prevent leaky expression of the output (Supplementary Figs. 6 and 7). Therefore, to simplify the design, our branching devices only separate the promoter and coding sequence of fluorescent proteins from another promoter in the reverse complement strand, to inhibit output gene expression.

As depicted in Fig. 1e, swapping the two fluorescent reporters did not appreciably change the outcome of the recombination event. Progeny with the reporter on the left side consistently represented 36.1 ± 0.9% and 37.3 ± 0.8% of the population in both designs (Fig. 1e). However, swapping the promoter positions led to altered ratios: green cells increased from 37.3 ± 0.8% to 44.3 ± 0.8%, and red cells decreased from 62.0 ± 0.7% to 54.9 ± 0.8% (Fig. 1e). The growth rates were indistinguishable for the four yeast progenies, labelled pTEF1-mScarlet, pTEF2-mScarlet, pTEF1-Venus and pTEF2-Venus, according to their promoter–reporter pairings (optical density at 600 nm (OD600 nm) per hour: about 0.22–0.23; Fig. 1f). Competition assays based on passaging every 24 h at 1,000-fold dilution for 7 days showed that the red-to-green ratio remained essentially constant (Supplementary Fig. 8). Therefore, the observed variation in progeny ratio is likely to result not from differential growth caused by the metabolic burden associated with reporter overexpression, but rather, from recombinase action on different device topologies.

Factors affecting cell differentiation

Hypothesizing that promoter sequence influences differential excision, we systematically varied promoters positioned between att sites. Ten promoters of identical length (700 bp each), ranging from the strongest (pTDH3) to the weakest (pREV1), were incorporated into the left and right arms of our branching device design (Fig. 2a and Extended Data Fig. 3a). A library of 90 unique promoter combinations revealed distinct progeny cell ratios after recombinase induction (Fig. 2b, Extended Data Fig. 3a and Supplementary Figs. 9–19). For example, a device with pTDH3 on the left arm and pREV1 on the right arm yielded 84.5 ± 1.0% red fluorescent cells (Supplementary Fig. 16a), whereas a device with pTEF2 and pRPL18B yielded only 15.0 ± 1.3% red fluorescent cells (Supplementary Fig. 18d). Growth assays indicated that no significant metabolic burden resulted from expressing fluorescent proteins driven by strong or weak promoters for a week (Supplementary Figs. 20 and 21). Instead, detailed analysis revealed that strong promoters, such as pTDH3, reduced Bxb1 recombination efficiency when located between att sites (Fig. 2b): devices with pTDH3 on the left arm and pREV1 on the right arm showed only 14.9 ± 0.9% green fluorescent cells, suggesting a bias toward right-arm excision (Supplementary Fig. 16a). Substituting pTDH3 with the weaker pSAC6 promoter increased the proportion of green cells to 60.9 ± 3.4%, favouring left-arm excision (Supplementary Fig. 15a). We propose that steric hindrance from transcription machinery recruited by strong promoters might obstruct recombinase binding and DNA bending, reducing recombination efficiency.

Fig. 2: Determinants of recombinase-based differentiation performance.
Fig. 2: Determinants of recombinase-based differentiation performance.
Full size image

a, Branching device architecture with different yeast promoters placed on the left or right arm. b, Heat map summarizing differentiation outcomes for 90 strains containing all pairwise combinations of constitutive promoters, ranked from strongest (pTDH3) to weakest (pREV1). Red intensity denotes the fraction of red fluorescent cells; pie charts show representative progeny distributions (black outlines). c, Branching device design incorporating nonsense (NS) DNA (random DNA sequence with no specific structure) to modulate arm length. d, Flow-cytometry analysis of differentiated populations for arm-length ratios from 1:10 to 10:1 (mean ± s.d., n = 8 biological replicates). e, Device design using attP mutants with distinct recombination efficiencies; mutated bases are highlighted in red. f, Differentiation outcomes for seven attP mutant circuits (mean ± s.d., n = 8 biological replicates). g, Summary of five factors (1–5) affecting differentiation output. h, Comparison of progeny ratios for circuits incorporating each factor in g, showing that the first three (starred) significantly expand output distributions (mean ± s.d., n = 8 biological replicates). i, Nine representative circuit designs used to validate the predictive model. The NS DNA was 1,546 bp in length. j, Comparison of model-predicted Venus fractions (lines) with experimental data (dots) from i (mean ± s.d., n = 8 biological replicates).

Source data

To investigate steric hindrance, we inserted Tet operator (TetO) sequences—specific binding sites for the tetracycline repressor (TetR)—between att sites in attBattP or attPattB configurations (Supplementary Fig. 22a,b). TetR binding decreased the recombination efficiency, with the rate for attBattP sites dropping from 61.0 ± 4.3% in the absence of TetR to 39.1% in its presence (Supplementary Fig. 22a), as did placing dCas9 and guide RNA targeting sequences between att sites (Supplementary Fig. 22c). Therefore, steric constraints imposed by sequences between att sites affect recombination efficiency differently across various yeast promoters (Fig. 2a). Replacing promoters with 100-bp nonfunctional random DNA sequences produced substantial variations in recombination frequencies, independent of GC content (Supplementary Fig. 23). These results suggest that other unknown factors influence Bxb1 recombination. Because functional promoters are necessary for gene expression, subsequent investigations focused on branching devices with one promoter on each arm.

We next evaluated how the length of the promoter-containing DNA sequence between att sites affects the recombination efficiency (Fig. 2c). We hypothesized that increased DNA length would decrease the likelihood of recombinase tetramerization, influencing branching outcomes. Progeny cell proportions were affected by varying the length of DNA on one arm while maintaining a fixed length of DNA on the other (Fig. 2d). Elongating the right arm relative to the left (1:1 to 1:10) reduced the proportion of red fluorescent cells from 62.0 ± 0.7% to 17.0 ± 0.9% (Fig. 2d and Supplementary Fig. 24). Conversely, elongating the left arm (1:1 to 10:1) increased red fluorescent cells to 96.2 ± 0.2% (Fig. 2d and Supplementary Fig. 25). Fixed-length, nonfunctional DNA sequences showed milder effects than DNA length differences did (Supplementary Fig. 26), confirming that the length of DNA sequences flanked by att sites modulates recombinase efficiency and progeny cell distribution.

Variants of Bxb1 att sites can directly affect the recognition and binding of the Bxb1 recombinase to the DNA molecule25. By exploiting the differential affinities of recombinases for distinct att sites with varying recombination kinetics, we hoped to selectively modulate the enzyme’s catalytic preference, to tune subpopulation ratios (as depicted in Fig. 2e). Our study used an attPslow variant, which contains a C14A mutation, and an attPfast variant, which contains several substitutions (5A, 8T, 12C, 14T and 17A) (Fig. 2e). Because attPslow shows a lower recombination efficiency than attPfast, we designed six distinct branching device configurations by enlisting wild-type and variant att sites to modulate recombination preferences (Fig. 2f and Supplementary Fig. 27). The configuration of attP variants effectively influenced progeny cell fluorescence ratios. For instance, the attPfastattBattPslow arrangement yielded 68.3 ± 1.6% green fluorescent cells, compared with 44.3 ± 1.6% for attPfastattBattP and 13.4 ± 0.9% for attPslowattBattPfast. These findings demonstrate the potential use of att site variants to selectively program recombinase-based cell differentiation.

The architecture of our branching devices included three att sites, resulting in 16 possible permutations of att type (attB or attP) and orientation (Extended Data Fig. 3b). When tested in yeast (Supplementary Figs. 28 and 29), all designs—including the prototype in Fig. 1a—consistently generated two distinct progeny cell types with minor variations in ratios, generally not exceeding 10% (Extended Data Fig. 3b). The proportion of green fluorescent cells fluctuated between 32.1 ± 1.1% and 42.9 ± 0.7% across all configurations, suggesting that the specific arrangement and orientation of att sites only mildly affect recombination and differentiation outcomes. Notably, when inversion and excision were both possible, Bxb1 preferentially catalysed DNA inversion (Extended Data Fig. 3b).

The central dinucleotide of att sites generates a 2-bp overhang that mediates ligation between cleaved attB and attP sites with complementary sequences26. Although all devices in this study used the GA dinucleotide27, six alternative dinucleotides (GT, TT, CA, CC, CT and TC as controls) were also tested (Extended Data Fig. 3c). Each variant recombined exclusively with att sites containing complementary dinucleotides, allowing up to six independent recombination events with a single recombinase. However, when these dinucleotides were applied in the attB–attP–attB branching device, the distribution of red and green fluorescent cell populations remained consistent. For instance, the green fluorescent cell fraction ranged from 34.9 ± 0.5% to 37.3 ± 0.8% (Extended Data Fig. 3c and Supplementary Fig. 30). These findings indicate that orthogonal att variants do not appreciably alter cell-state ratios and that multiple orthogonal devices can be integrated within a single genome.

To examine the effects of protein payloads and differential cell growth rates on progeny cell ratios, the Venus reporter was replaced with recombinases (for example, No67 (ref. 28), Si74 (ref. 28), TP901 (ref. 29), R4 (ref. 29) and PhiC31 (ref. 29); Extended Data Fig. 3d and Supplementary Fig. 31) incorporated into branching devices designed to produce a 1:1 ratio of Venus- to mScarlet-expressing cells, which fully differentiated after eight hours (Extended Data Fig. 3d and Supplementary Fig. 32). After an 18-h induction period, limited variation in progeny cell-type distribution was observed with R4 recombinase, resulting in 51.8 ± 0.6% R4-expressing and 48.2 ± 0.6% mScarlet-expressing progeny cells (Supplementary Fig. 33). Conversely, devices containing No67 and mScarlet exhibited an increase in red fluorescent cells from 52.3 ± 0.5% at 8 h to 57.6 ± 0.5% at 18 h, suggesting that the No67 recombinase has a minor toxic effect (Supplementary Fig. 34). This effect was more pronounced with PhiC31 recombinase, which increased red fluorescent cells from 57.9 ± 1.5% at 8 h to 94.3 ± 0.6% at 18 h (Supplementary Fig. 35). Differential growth rates can, therefore, be used to dynamically modulate progeny cell ratios over time (Supplementary Fig. 36).

To evaluate the generality of these observations with Bxb1-based devices, additional serine recombinases (for example, TP901, R4 and A118) were tested (Extended Data Fig. 3e). Flow-cytometry analysis confirmed that all serine recombinases tested induced differentiation, generating progeny cells in two distinct states (Extended Data Fig. 3e). However, disparities in progeny cell distributions varied significantly. The TP901-based system produced approximately 16.5 ± 0.2% green fluorescent cells and 79.4 ± 0.6% red fluorescent cells, with the remainder showing no fluorescence, whereas the A118-based system yielded approximately 38% green, 39% red and 23% undifferentiated cells (Supplementary Fig. 37). When undifferentiated cells sorted from the A118-based system were re-induced in fresh yeast extract–peptone–dextrose (YPD) medium, the differentiation pattern was similar: 38% green, 39% red and 23% undifferentiated cells. Partially induced Bxb1-based systems also exhibited reproducible differentiation patterns (Supplementary Fig. 38). These results indicate that specific founder cell ratios retain pluripotency and that prolonged system stemness leads to asymmetric differentiation.

Predicting cell differentiation outcomes

Our experimental measurements revealed the complexity of cell differentiation outcomes (Fig. 2g–h). To predict cell differentiation ratios, we developed a white-box model comprising five ordinary differential equations that capture the essential dynamics of Bxb1-mediated computation25,30,31. This model incorporates the differential cleavage of DNA fragments by recombinases, transcription machinery recruitment and steric constraints (Supplementary Fig. 39). Key parameters include: functional DNA elements flanked by att sites; the length of DNA sequences flanked by att sites; and the recombination efficiencies of att site variants. We parameterized the model by fitting simulation results with experimental measurements (Supplementary Fig. 40 and Supplementary Tables 1–3). The model showed strong predictive accuracy for novel experimental configurations (Fig. 2i and Supplementary Fig. 41), as evidenced by the agreement between predicted and actual differentiation outcomes (R2 = 0.887; Fig. 2j), suggesting that recombinase circuits can be designed to quantitatively program cellular differentiation.

Multiplying precise ratios

Having established that our branching devices can control the ratio between two progeny cell types, we next asked whether combining multiple devices would lead to complex, multi-lineage differentiation. Creating insulated recombination units required incorporating dinucleotide variants into the Bxb1 att sites of parallel branching circuits that are functionally orthogonal within the same genome27 (Supplementary Fig. 30). Each device undergoes independent Bxb1-mediated recombination, producing progeny cells with distinct traits. The probability of generating each cell type is determined by multiplying the probabilities of individual states in the branching devices, yielding, for n devices, 2n unique cell types, each defined by specific trait combinations (Supplementary Fig. 42). For example, with two devices producing outputs for green and red fluorescence, the probability of a progeny cell being yellow (expressing both green and red fluorescence) is calculated as

$$P({\rm{g}}{\rm{r}}{\rm{e}}{\rm{e}}{\rm{n}}\cap {\rm{r}}{\rm{e}}{\rm{d}})=P({\rm{g}}{\rm{r}}{\rm{e}}{\rm{e}}{\rm{n}})\times P({\rm{r}}{\rm{e}}{\rm{d}})$$

To validate the rule of multiplication, we integrated two orthogonal branching circuits into the yeast genomes: one using ShadowG and Venus, and another using ShadowG and mScarlet (Fig. 3a). After Bxb1 induction, four progeny cell types emerged, with distinct fluorescence states: dark (no fluorescence), green, red and yellow (both green and red fluorescence; Fig. 3b). Using the probabilities measured from strains hosting only one of the two branching devices (Supplementary Figs. 43–45), we computed the theoretical distribution of the four progeny cell types in the final population (Fig. 3b). Flow cytometry confirmed a strong correlation between the predicted probabilities and the observed cell-type proportions (Fig. 3c). Colonies with four-colour stripes (observed with fluorescence microscopy) grew from around 1,000 founder cells on inducer-supplemented medium (Fig. 3d).

Fig. 3: Parallel orthogonal circuits for quantitative cell-state control.
Fig. 3: Parallel orthogonal circuits for quantitative cell-state control.
Full size image

a, Design of a 2× orthogonal branching circuit using CA and GA att sites, distinct promoters and fluorescent reporters. b, Theoretical progeny states and probabilities: DD (ShadowG only), GD (Venus), RG (Venus + mScarlet) and RD (mScarlet). c, Agreement between calculated and measured progeny distributions by flow cytometry (mean ± s.d., n = 8 biological replicates). d, Fluorescence images showing four cell states in liquid culture and colonies; representative images from three independent experiments. Scale bars, 10 μm (left); 1 mm (right). e, Design of a 3× orthogonal branching circuit. f, Theoretical progeny states and probabilities. g, Comparison of predicted and observed distributions by flow cytometry (mean ± s.d., n = 8 biological replicates). h, Fluorescence images showing eight cell states in liquid culture and colonies; representative images from three independent experiments. Scale bars, 10 μm (left); 1 mm (right). i–k, Schematic designs, predicted distributions and flow-cytometry data for 1× (i), 2× (j) and 3× (k) parallel branching circuits (mean ± s.d., n = 8 biological replicates).

Source data

Varying the designs of individual branching devices yielded results reflecting the modified ratios, with the calculated progeny cell distribution closely resembling the experimental outcomes, highlighting the robustness of the rule of multiplication (Supplementary Figs. 46–57). We implemented a similar dual-branching logic in mammalian cells and observed consistent patterns in progeny cell-type distribution (Supplementary Fig. 58), confirming the portability and versatility of the rule of multiplication across species.

Expanding the system to three orthogonal branching devices (Fig. 3e) yielded eight progeny types. For instance, the probability of generating white cells expressing green, red and blue fluorescent proteins was computed as

$$P({\rm{g}}{\rm{r}}{\rm{e}}{\rm{e}}{\rm{n}}\cap {\rm{r}}{\rm{e}}{\rm{d}}\cap {\rm{b}}{\rm{l}}{\rm{u}}{\rm{e}})=P({\rm{g}}{\rm{r}}{\rm{e}}{\rm{e}}{\rm{n}})\times P({\rm{r}}{\rm{e}}{\rm{d}})\times P({\rm{b}}{\rm{l}}{\rm{u}}{\rm{e}})$$

Fluorescence microscopy and flow cytometry confirmed that the experimental distributions of eight progeny cell types matched theoretical predictions (Fig. 3f,g and Supplementary Fig. 59). All eight fluorescent states were present in both liquid and solid medium (Fig. 3h). Modifying the parameters of branching devices resulted in various predicted cell-type distribution ratios (Supplementary Figs. 60–63). In all configurations, calculated distributions aligned closely with experimental findings, confirming the broad applicability of the rule of multiplication.

Exponential function for extreme ratios

Given that parallel branching devices enable robust multiplication computation, we hypothesized that one can achieve less than 3.6% (the lowest ratio achieved with a single branching device, modulated by arm length; Fig. 2d) during cell differentiation using the rule of multiplication. By deploying analogous branching devices in parallel within a single founder strain, we implemented exponential functions to generate progeny populations with extremely low ratios.

We designed a branching device using the transcriptional repressor LacI. In this system, LacI expression occurs around 91.6% of the time after differentiation. When mScarlet was placed under the control of the pLac promoter (activated only in the absence of the LacI repressor), the probability of progeny cells expressing red fluorescence was calculated as

$$P({\rm{r}}{\rm{e}}{\rm{d}})=1-P({\rm{L}}{\rm{a}}{\rm{c}}{\rm{I}})$$

Experimentally, this yielded about 8–9% red fluorescent progeny, validating the model (Fig. 3i and Supplementary Fig. 64a–c).

When two orthogonal repressor-based branching devices were integrated into the same genome, the probability of progeny cells with no inhibiting mScarlet expression was

$$P({\rm{r}}{\rm{e}}{\rm{d}})={(1-P({\rm{L}}{\rm{a}}{\rm{c}}{\rm{I}}))}^{2}$$

This computation predicted a 1% red fluorescent progeny ratio, which was confirmed experimentally (Fig. 3j and Supplementary Fig. 64d). Adding a third analogous device further reduced the likelihood of red fluorescent progeny to

$$P({\rm{red}})={(1-P({\rm{LacI}}))}^{3}=0.1{\rm{ \% }}$$

Experimental results matched this prediction (Fig. 3k and Supplementary Fig. 64e).

We predict that this ‘exponential function’ could be expanded by installing up to six analogous, orthogonal Bxb1-based branching devices with different dinucleotides across various chromosomes to achieve ratios in the 10−6 range without homology-induced looping out. Notably, replacing the LacI repressor with the reverse tetracycline transactivator rtTA (ref. 32) enables comparable multiplicative operations (Supplementary Fig. 65). In cell populations with a very small subpopulation that initiates multicellular programs, tight regulation of initiation frequency is essential. Conventional genetic circuits, which depend on a few layers of gene-expression events or protein–protein interactions, often lack the precision needed to trigger program onset at rates of one-thousandth or one-millionth (ref. 33). Our approach thus enables robust control over rare events such as pattern formation or morphogen gradient initiation, or fail-safe population control34.

Programming sequential differentiation

Multicellular organisms develop hierarchically: stem cells undergo sequential differentiation into specialized progeny, guided by external cues that enable adaptation to environmental conditions. To emulate this process, we engineered branching devices that allow cells to differentiate sequentially into predefined populations in response to specific signals. These devices use cascading recombinase-based circuits, each inducible by small molecules, to program sequential cellular functions.

Figure 4a,b illustrates our design, featuring two branching devices in series activated by distinct recombinases, Bxb1 and TP901. To minimize leaky expression of sensitive regulatory proteins (for example, recombinases, transcription factors), which even at low levels can perturb branching circuits (Supplementary Fig. 66), terminators were placed between att sites. The first branching device used β-oestradiol-inducible Bxb1 to direct founder cells into two progeny types: those constitutively expressing mTurquoise2 (blue) and those retaining an inducible TP901 cassette (dark). TP901 subsequently governs the differentiation of dark cells into green or red fluorescent cells after aTc induction.

Fig. 4: Sequential branching circuits for stepwise differentiation.
Fig. 4: Sequential branching circuits for stepwise differentiation.
Full size image

a, Two-layer branching circuit using two recombinases to generate three terminal cell types; experimentally measured ratios were used to estimate circuit outputs. b, Circuit states during two-step differentiation. c, Fluorescence images showing population transitions at each step; representative images from three independent experiments. Main panels show fluorescence images acquired from liquid cultures, whereas insets show images of colonies on agar plates. Scale bars, 20 μm (main images); 1 mm (insets). d, Comparison of predicted and measured progeny distributions (mean ± s.d., n = 8 biological replicates). e, Two-layer branching circuit using three recombinases to produce four progeny types. f, Circuit states during differentiation. g, Fluorescence images of population changes; representative images from three independent experiments. Scale bars, 20 μm (main images); 1 mm (insets). h, Predicted versus observed distributions (mean ± s.d., n = 8 biological replicates). i, Three-layer branching circuit using three recombinases to generate four progeny types. j, Circuit states during three-step differentiation. k, Fluorescence images showing population transitions; representative images from three independent experiments. Scale bars, 20 μm (main images); 1 mm (insets). l, Comparison of predicted and measured distributions (mean ± s.d., n = 8 biological replicates).

Source data

With β-oestradiol alone, 52.7% of the progeny remained dark, and 47.3% differentiated into blue cells (Fig. 4c, left). Dark progenitors retained multipotency, differentiating into green and red cells only after aTc induction (Fig. 4c, right). Final proportions of green and red cells were determined by multiplying the ratio of dark cells at the first layer by their respective differentiation ratios at the second layer:

$${P({\rm{green}})}_{{\rm{terminal}}}={P({\rm{TP}}901)}_{{\rm{layer}}1}\times {P({\rm{green}})}_{{\rm{layer}}2}$$
$${P({\rm{r}}{\rm{e}}{\rm{d}})}_{{\rm{t}}{\rm{e}}{\rm{r}}{\rm{m}}{\rm{i}}{\rm{n}}{\rm{a}}{\rm{l}}}=P{({\rm{T}}{\rm{P}}901)}_{{\rm{l}}{\rm{a}}{\rm{y}}{\rm{e}}{\rm{r}}1}\times {P({\rm{r}}{\rm{e}}{\rm{d}})}_{{\rm{l}}{\rm{a}}{\rm{y}}{\rm{e}}{\rm{r}}2}$$

Experimental results closely matched the calculated ratios: 16.9% green and 34.8% red (Fig. 4d and Supplementary Figs. 67 and 68). Residual stem-like cells (that is, the dark cell population) were attributed to incomplete differentiation (Supplementary Fig. 37). This validated system enabled the engineering of a founder strain that could differentiate stepwise into three cell types, secreting laccase, Mel1 or lipase, forming a yeast consortium to degrade water contaminants (Supplementary Fig. 69). Transcription factors functioning with these devices facilitated sequential genetic programs with multiple transcriptional units (Supplementary Fig. 70).

We evaluated the scalability of these designs in both horizontal (output diversity) and vertical (circuit depth) expansions. A two-layer binary branching circuit was constructed, resulting in four cell types after full differentiation (Fig. 4e). The first branching device, activated by β-oestradiol-inducible Bxb1, generated one intermediate progenitor type expressing A118, directing differentiation into dark (ShadowG) or blue (mTurquoise2) cells through second branching devices; and another type expressing TP901 in the presence of aTc, driving differentiation into green (Venus) and red (mScarlet) cells (Fig. 4f–h). Although recombination inefficiencies in TP901 and A118 increased the number of dark cells (Supplementary Fig. 37), the observed distributions aligned with predictions (Fig. 4h and Supplementary Fig. 71).

For greater efficiency, we incorporated Cre recombinase into a three-layer series design (Fig. 4i). Each layer contained one branching device responsive to sequential inputs (β-oestradiol → aTc → β-oestradiol), producing four terminal cell types (Fig. 4j and Supplementary Fig. 72). The ratio of red cells in the final cell population was defined as

$${P({\rm{r}}{\rm{e}}{\rm{d}})}_{{\rm{t}}{\rm{e}}{\rm{r}}{\rm{m}}{\rm{i}}{\rm{n}}{\rm{a}}{\rm{l}}}\,=\,{P({\rm{B}}{\rm{x}}{\rm{b}}1)}_{{\rm{l}}{\rm{a}}{\rm{y}}{\rm{e}}{\rm{r}}1}\times {P({\rm{T}}{\rm{P}}901)}_{{\rm{l}}{\rm{a}}{\rm{y}}{\rm{e}}{\rm{r}}2}\times {P({\rm{r}}{\rm{e}}{\rm{d}})}_{{\rm{l}}{\rm{a}}{\rm{y}}{\rm{e}}{\rm{r}}3}$$

Replacing A118 with Cre greatly reduced recombination inefficiencies (Fig. 4k,l). No leakiness was observed across layers. Reusing β-oestradiol as an input greatly expanded the versatility of this series design.

Because sequential differentiation through branching devices arranged in series provides high programmability and control, akin to natural morphogen-driven processes, this platform offers a robust framework for implementing complex genetic circuits.

From a single strain to a functional consortium

Time-lapse imaging data support our finding that inducible cellular differentiation programs can generate multiple cell types at defined ratios from a single founder strain (Supplementary Figs. 73–76 and Supplementary Videos 1–3). Our in situ differentiation approach eliminates the personnel and equipment that are needed to manually grow and combine multiple strains into artificial co-cultures, streamlining workflows35. To demonstrate this capability, two multi-gene biosynthetic pathways were selected to produce pigments: violacein and β-carotene. Violacein, a purple bis-indole pigment, is synthesized by five enzymes: VioA, VioB, VioC, VioD and VioE; β-carotene, a vibrant orange pigment, is produced by four: CrtI, CrtE, CrtYB and tHGM1 (ref. 36) (Extended Data Fig. 4a). By fine-tuning the ratios of the two cell types synthesizing these pigments, a spectrum of colours was produced.

To control these pathways, violacein and β-carotene biosynthesis were regulated by synthetic transcription factors, Z3EV and PhIF-VP16, respectively (Extended Data Fig. 4b and Supplementary Fig. 77a). A single branching device differentiated the founder strain into one strain using Z3EV to drive violacein production and another using PhlF-VP16 to trigger β-carotene biosynthesis. Adjusting the proportions of these two ‘pixel’ cell types yielded cultures displaying colours ranging from pure purple to pure orange, with four intermediate colours (Extended Data Fig. 4c and Supplementary Fig. 78). Extracted dyes showed absorbance profiles that matched their genetically encoded pigments (Extended Data Fig. 4d and Supplementary Fig. 77b). This ‘genetic colour palette’ approach reduces metabolic stress on individual cells through a division of labour (Supplementary Fig. 79), and can potentially be used to design self-pigmenting living materials37. To scale this concept, we rapidly constructed a library of 25 synthetic differentiation circuits, each containing a distinct engineered attP variant that modulates the recombination efficiency of Bxb1 recombinase, using one-pot Golden Gate assembly24 (Supplementary Fig. 80). Next, we induced the differentiation of 96 randomly selected yeast colonies, and observed varied ratios of violacein- and β-carotene-producing cells, with visibly different pigmentation. We determined population composition by high-throughput analysis of the RGB values of colony images, indicating that pooled branching circuits can be used to determine the best population ratio for user-defined functions.

Branching devices were also applied to cooperative enzymatic reactions relevant to industry. In our model, each cellulase—EG2, CBH2 and BGL1 (ref. 38)—performed a step in degrading cellulose into glucose (Extended Data Fig. 4e). These enzymes were integrated into a two-layer sequential genetic circuit controlled by recombinases Bxb1 and TP901, directing the founder strain to differentiate into three cellulase-secreting progeny cell types (Extended Data Fig. 4f). The engineered consortia were evaluated by measuring glucose production from yeast supernatants degrading Avicel PH-101 using the dinitrosalicylic acid (DNS) method39 (Supplementary Fig. 81). Two population ratios were tested: consortium A (BGL1:EG2:CBH2 = 5:3:2) and consortium B (2:3:5). Both significantly outperformed wild-type BY4741 (Extended Data Fig. 4g). Notably, consortium B matched the cellulose-degrading efficiency of a strain constitutively co-expressing all three enzymes, but avoided the associated growth penalty (Extended Data Fig. 4g and Supplementary Fig. 82). These results show that rational tuning of cell-type ratios enhances consortium performance. The generality of branching devices across genetic contexts underscores their utility for engineering diverse, high-functionality consortia from a single founder strain.

Programming morphogenesis

Differentiation and cell–cell interactions affect the ratios and spatial arrangement of cell types in multicellular structures22,23,40. Hypothesizing that branching devices could be used to program multicellular morphologies, we combined yeast surface display systems (for example, SED1 and GPI-anchored proteins)20,41 and customized cell adhesion molecules (CAMs; for example, antigen–antibody complexes21) as final outputs for our branching devices.

The synthetic transcription factors Z3EV and PhlF-VP16 were used to drive the expression of seven highly specific, orthogonal CAM pairs (Fig. 5a,b). After induction, engineered yeast differentiated into two unique cell types, each displaying one CAM pair, facilitating the self-assembly of cell aggregates. To visualize these structures, green and red fluorescent proteins were co-expressed with the CAMs (Extended Data Fig. 5).

Fig. 5: Programmable self-organization through branching devices.
Fig. 5: Programmable self-organization through branching devices.
Full size image

a, Schematic of founder yeast differentiating into two CAM-displaying progeny that drive pattern formation. b, CAM screening and fluorescence images of yeast aggregates formed by Nb3–Ag3, Nb1–Ag1, SpyTag–SpyCatcher and dockerin–cohesin pairs; fluorescent BY4741 lacking CAMs serves as a negative control. Scale bars, 100 μm. c, Aggregate size as a function of Nb3:Ag3 cell ratios (mean ± s.d., n = 10 independent images from 3 independent experiments); box plots show median, interquartile range and full data range. d, Phase-separated morphologies in snowflake yeast; heat maps quantify red–green cell contacts (mean ± s.d., n = 8 biological replicates). e, Snowflake yeast expressing Ag3 (red) and Nb3 (green) forms heterotypic aggregates through Ag3–Nb3 interactions, increasing red–green associations (mean ± s.d., n = 9 biological replicates). f, Tri-lineage assemblies formed when blue progeny (Nb1 + Nb3) adhere to both red (Ag3) and green (Ag1) cells; interaction frequencies are quantified (mean ± s.d., n = 6 biological replicates). NaN, not a number. Scale bars, 100 μm (df). g, Schematic of the differentiation of CHO-K1 cells into two progeny types driving pattern formation; TM, PDGFRβ transmembrane domain. h, In situ differentiation and patterning from around 100 founder CHO-K1 cells after doxycycline (Dox) and TMP induction, with mCherry localized to cell–cell interfaces. Scale bars, 50 μm (2 h, 24 h and 48 h); 100 μm (96 h). i, CD19–anti-CD19–synNotch-mediated patterning in CHO-K1 cells. j–l, Self-organization of differentiated progeny via heterophilic EGFP–LaG16 (j), mCherry–LaM4 (k) or homophilic cadherin (Cdh6 or Cdh1) adhesion (l). Scale bars, 100 μm (il). Panels hl show representative images from three independent experiments. Statistical significance was assessed by unpaired two-tailed Student’s t-tests; *P < 0.05.

Source data

Four of the CAM pairs displayed on yeast cell surfaces strongly promoted aggregation: Nb3–Ag3, Nb1–Ag1, SpyTag–SpyCatcher and dockerin–cohesin (Fig. 5b and Extended Data Fig. 5). Flow cytometry revealed increased doublet ratios (exceeding 5%) for these four pairs, indicating that there was more aggregation when cells were in solution (Extended Data Fig. 5). Taking Nb3–Ag3 as a model, we used time-lapse microscopy to investigate the aggregation dynamics of engineered yeast (Supplementary Fig. 83 and Supplementary Video 4) and the effect of altering cell-type ratios on aggregate size. Adjusting the ratio of Nb3-expressing to Ag3-expressing cells (1:4 to 4:1) influenced aggregate size; specifically, balanced ratios (for example, 1:1) produced larger aggregates than did imbalanced ones (for example, 1:4 or 4:1) (Fig. 5c and Supplementary Fig. 84) and had higher sedimentation rates (Supplementary Fig. 85).

To further examine spatial self-organization, we exploited snowflake yeast, which naturally forms multicellular clusters by homo-adhesion42. Differentiation from a single founder produced red and green lineages that self-sorted with minimal mixing (Fig. 5d). Introducing heterotypic adhesion by expressing Ag3 or Nb3 increased cross-lineage associations from 6.6 ± 4.2% to 19.5 ± 3.6%, quantified using a custom image-analysis pipeline (Fig. 5e, Supplementary Figs. 86–88 and Supplementary Video 5). We next implemented a two-layer branching circuit in S. cerevisiae BY4741 to generate three progeny types: red (Ag3), green (Ag1) and blue (Nb1 + Nb3) (Fig. 5f and Supplementary Fig. 87). The blue cells functioned as molecular ‘double-sided tape’, binding both red and green cells through Ag–Nb interactions. This design markedly increased heterotypic clustering, with red–blue interactions reaching 38.7 ± 5.8% and green–blue interactions 27.4 ± 5.9% (Fig. 5f and Supplementary Fig. 87), validating the programmed adhesion logic.

To extend the recombinase-based differentiation system beyond yeast, we engineered analogous branching devices in mammalian CHO-K1 cells using PhiC31-assisted landing-pad integration, digital PCR-based copy-number validation and lentiviral delivery of doxycycline-inducible recombinase cassettes (Extended Data Fig. 6). Fusing Bxb1 to a dihydrofolate reductase (DHFR) degron43 reduced background recombination to less than 1% after 5 passages spanning 15 days (Supplementary Fig. 89). We next imported the synNotch signalling system for programmable, contact-dependent multicellular patterning22,44 (Fig. 5g and Extended Data Fig. 7). Bxb1-mediated in situ differentiation produced ‘sender’ cells expressing membrane-tethered EGFP (EGFP-TM) via the PDGFRβ transmembrane domain (TM)22,44, and ‘receiver’ cells expressing the cognate LaG17–SynNotch receptor fused to a Gal4–VP64 transcriptional activator. These cell types contained a Gal4-responsive cassette driving the co-expression of cadherin-1 (Cdh1:E-cadherin) and mCherry (Fig. 5g and Extended Data Fig. 7a). Without induction, there was no detectable fluorescence (Extended Data Fig. 7b). After induction with doxycycline and trimethoprim (TMP), which stabilizes the DHFR degron, preventing Bxb1 degradation, EGFP-positive sender cells began to emerge. Upon direct contact with sender cells, receiver cells selectively expressed mCherry, resulting in localized cell aggregation over 96 h (Fig. 5h and Extended Data Fig. 7b). Control sender cells expressing cytoplasmic EGFP did not activate synNotch signalling, confirming that membrane localization and direct cell–cell contact were necessary and sufficient to trigger this circuit44 (Extended Data Fig. 7c–f). An alternative synNotch pair (CD19–anti-CD19)22, which also mediated contact-dependent activation and multicellular assembly, validated this approach (Fig. 5i and Extended Data Fig. 7g–j). We also validated other adhesion-based morphogenetic circuits, which produced tightly integrated cell aggregates by generating complementary progeny expressing matched adhesion pairs, such as LaG16–EGFP (Fig. 5j, Extended Data Fig. 8 and Supplementary Fig. 90) and LaM4-mCherry (ref. 45) (Fig. 5k, Extended Data Fig. 9 and Supplementary Fig. 90). Another branching device, driving the expression of cadherins Cdh6 and Cdh1 (ref. 46), caused self-sorting cell clusters to organize into distinct spatial patterns (Fig. 5l, Extended Data Fig. 10 and Supplementary Fig. 90). Together, these results show that branching devices can be integrated with CAM-based programs to autonomously generate tunable multicellular morphologies from a single founder population, providing a powerful foundation for tissue engineering and organoid development.

Discussion

Synthetic genetic tools designed to guide cellular behaviours and build intricate functional networks offer greater flexibility and predictability in controlling cell fate than do natural systems. Existing genetic circuits emulate the asymmetric division of stem cells, guiding cellular differentiation2,3,5,6,12,47. Recombinase-based systems have prominent roles: one study applied recombinase logic to record the identity and temporal order of input signals, driving irreversible transitions to terminal cell states18. Such systems, used for lineage tracing or memory storage, function mainly at the single-cell level. By exploiting the differential efficiencies of recombinases on user-defined DNA sequences, we achieved precise quantitative control over binary cell-fate branching and population composition. We integrated orthogonal branching devices into various circuit topologies to craft an expandable platform for parallel and series gene circuits, enabling precise ratio manipulation and effective management of progenitor and progeny diversity. Our data-driven computational model can guide the differentiation of a single founder strain into multiple cell types in user-defined ratios.

We applied branching device outputs to scenarios requiring specific consortia ratios (self-pigmentation, cellulose degradation and autonomous cell assemblies). Whereas previous applications relied on manual mixing of cell types21,35,38, we condensed multiple genetic programs into a single founder strain that differentiates, autonomously or conditionally, in response to external cues (Supplementary Videos 1–5). With our modular, expandable platform, a single founder strain could differentiate into eight progeny types, each expressing a unique combination of three fluorescent proteins (Fig. 3f,g). By replacing these proteins with transcription factors and using them to activate genetic programs controlled by three-input AND gates48, eight progeny cell types could be created, each performing pathway-level tasks. The exponential scalability (2n) of our parallel branching framework (Fig. 3), combined with synthetic promoters, suggests that systems with 16 or more cell types are achievable.

Dependencies between progenitor and progeny cell types could be engineered to create functionally and morphologically diverse cell assemblies49,50. Direct-contact signalling (for example, synNotch)44 can trigger conditional differentiation. Additional signalling modalities, such as soluble communication51, could enable sequential, context-dependent differentiation for engineering organoids, tissues and metabolic systems. Our framework could complement strategies that use asymmetric cell division3,6 or quorum sensing52, to enhance consortium stability. Notably, the incomplete recombination of our system leaves a reserved subpopulation of undifferentiated or partially differentiated progenitors that can be re-exposed to inducers to restore differentiation potential. Programmed asymmetric division could optimize this feature, as demonstrated in bacterial systems2,3,6.

In conclusion, our branching device offers a modular, expandable approach to programmable ratio-specific cell differentiation and pattern formation. Incorporating feedback mechanisms or quorum-sensing-based devices could help to maintain ratios of progeny cell types to counteract the effects of growth rate variations. Less toxic recombinases and control over leakage could boost the robustness of these devices. The universality of our branching devices and their independence from pre-established morphogen or quorum presence make this a versatile tool for applications ranging from metabolic engineering and environmental remediation to engineered living materials and tissue development, in both liquid and solid environments.

Methods

Bacterial strains and culture conditions

All cloning was performed in E. coli Trans1-T1 chemically competent cells (TransGen Biotech). Genetic circuit validation used E. coli DH10B (TSC-C09, Tsingke). Cultures were grown in lysogeny broth (LB) at 37 °C with shaking at 220 rpm. Plasmid maintenance was ensured by supplementing LB with chloramphenicol (34 μg ml−1), carbenicillin (100 μg ml−1), kanamycin (50 μg ml−1), spectinomycin (100 μg ml−1) or zeocin (100 μg ml−1), as appropriate.

Yeast strains and media

All yeast experiments used S. cerevisiae BY4741 (MATa his3Δ1 leu2Δ0 met17Δ0 ura3Δ0 sed1Δ; Horizon Discovery) as the standard chassis. Cells were cultured in YPD medium containing 1.5% (w/v) yeast extract (Angel Yeast), 2.0% (w/v) peptone (Angel Yeast) and 2% (w/v) glucose (Sangon). YPD was also used for circuit induction and growth curve measurements. Auxotrophic selection used SD minimal media (SD-Ura, SD-Leu, SD-His or SD-Ura-Leu-His) solidified with 2% agar (Coolaber). Antibiotic selection used SD supplemented with hygromycin (500 μg ml−1) or zeocin (300 μg ml−1). Snowflake yeast was generated by CRISPR–Cas9-mediated deletion of ACE2, as previously described42.

Mammalian cell culture

HEK293FT cells (Invitrogen, R70007) were maintained in high-glucose Dulbecco’s modified Eagle’s medium (DMEM) (Gibco) supplemented with 10% fetal bovine serum (FBS; Gibco) and 1% (v/v) penicillin–streptomycin (10,000 U ml−1 penicillin, 10 mg ml−1 streptomycin; Gibco) at 37 °C and 5% CO2. Cells were passaged at a 1:3 ratio every two days in 10-cm dishes. CHO-K1 cells (NICR) were cultured in F-12K medium (Kaighn’s modification; M&C Gene Technology) with 10% FBS and 2% (v/v) penicillin–streptomycin under identical conditions and passaged at a 1:6 ratio every three days. For selection, media were supplemented with hygromycin (800 μg ml−1), zeocin (400–1,000 μg ml−1), blasticidin S (20 μg ml−1) or puromycin (4 μg ml−1), as required.

Plasmid construction and single-copy maintenance in E. coli

To maintain the branching device at a single copy in E. coli, we used a bacterial artificial chromosome (BAC) backbone18. The intrinsically low copy number of BAC vectors minimizes copy-number-dependent variability and stabilizes circuit behaviour. All genetic components, including fluorescent reporters, promoters, terminators and insulators, were amplified via 2 × Phanta UniFi Master Mix (P526-02, Vazyme Biotech) and assembled into the BAC backbone using one-pot Gibson assembly (CU201-02, TransGen Biotech). Recombinase expression was controlled using a tightly regulated aTc-inducible system to drive the expression of Bxb1 recombinase53. Plasmids were verified by Sanger sequencing (Tsingke) and whole-plasmid sequencing (KBSeq, Sangon Biotech). Detailed genetic parts, protein sequences, plasmid backbones and representative constructs are provided in Supplementary Tables 4–7.

Plasmid construction and genomic integration in S. cerevisiae

To ensure single-copy circuit presence in S. cerevisiae BY4741, all devices were integrated into the genome. Plasmids were assembled using the Yeast Toolkit (YTK)24 and MYT system54, both based on Golden Gate cloning. Assembly reactions contained 6.5 μl DNA inserts, 1.0 μl backbone, 1.0 μl T4 ligase buffer (B0202S, NEB), 0.5 μl T4 DNA ligase (M0202L, NEB) and 1.0 μl restriction enzyme, adjusted to a total volume of 10 μl. BsaI-HF v2 (R3733L, NEB) or BsmBI v2 (R0739L, NEB) were used. Thermocycling comprised 80 cycles of digestion (BsaI at 37 °C or BsmBI at 42 °C for 5 min) and ligation (16 °C for 5 min), followed by final digestion at 55 °C for one hour and heat inactivation at 80 °C for 10 min. Assembled plasmids were transformed into E. coli, selected on antibiotic plates and verified by Sanger and whole-plasmid sequencing. Genetic parts and protein sequences are listed in Supplementary Tables 4 and 5, and plasmid backbones and representative constructs in Supplementary Tables 6 and 7.

Plasmid construction and genomic integration in HEK293FT cells

For site-specific genomic integration in HEK293FT cells, we first generated a landing-pad plasmid containing a single PhiC31 attB site (CGCGCCCGGGGAGCCCAAGGGCACGCCCTGGCAC), flanked by Rogi1 homology arms and a puromycin resistance cassette. A sgRNA targeting the Rogi1 locus (TTAGTCCTAGTGCCATGAAG) was cloned into pSpCas9-(BB)-2A-GFP under the human U6 promoter to enable CRISPR–Cas9-mediated targeting55. Cells were co-transfected with the Cas9–sgRNA and landing-pad plasmids, selected with puromycin and subjected to single-cell dilution in 96-well plates (Extended Data Fig. 6). Clones were expanded and screened by digital PCR (Tsingke, China) to identify lines carrying a single-copy attB insertion, which were then used for downstream circuit integration.

For integration of the branching circuit, a donor plasmid (synthesized by GenScript Corporation) containing the full device, a PhiC31 attP site (CCCCCAACTGAGAGAACTCAAAGGTTACCCCAGTTGGGG) and a bleomycin resistance gene (BleoR) was co-transfected with a PhiC31 integrase expression vector. Stable integrants were selected by culturing cells in zeocin-containing DMEM for two to four weeks to eliminate episomal plasmids through dilution during cell division. Single-cell isolation and digital PCR were then repeated to identify clones with single-copy integration. This step was essential, because PhiC31-mediated recombination in mammalian cells frequently generates off-target or multicopy insertions, which would confound quantitative differentiation analyses.

To enable doxycycline-inducible Bxb1 expression, Bxb1 or DHFR–Bxb1 was cloned into a Tet-On lentiviral vector (LV-Tet-Bxb1) containing blasticidin resistance and an iRFP reporter. Transduced cells were enriched by antibiotic selection and flow cytometry and used for subsequent differentiation experiments. All plasmids were validated by antibiotic selection, Sanger sequencing and full-plasmid sequencing. Detailed component descriptions, protein sequences and plasmid information are provided in Supplementary Tables 4–8.

Plasmid integration in CHO-K1 cells

As shown in Extended Data Fig. 6, a PhiC31 attB–containing landing pad was first introduced into the CHO-K1 genome using CRISPR–Cas9. Single-cell cloning followed by digital PCR screening was used to isolate clones with a single-copy insertion. These cells were then co-transfected with a plasmid carrying the branching circuit, a BleoR cassette, a TagBFP reporter and a PhiC31 attP site, together with a PhiC31 integrase expression vector. This strategy enabled site-specific recombination between the genomic attB and plasmid-borne attP sites, resulting in precise genomic integration of the circuit. After transfection, cells were serially passaged in zeocin-containing F-12K medium for approximately one month to enrich stable integrants and dilute residual episomal plasmids. TagBFP-positive cells (405-nm excitation) were subsequently isolated by fluorescence-activated cell sorting, followed by single-cell dilution and digital PCR to identify clones containing a single-copy circuit insertion.

For doxycycline-inducible recombinase expression, Bxb1 or DHFR–Bxb1 was cloned into a Tet-On lentiviral vector (LV-Tet-Bxb1) containing a blasticidin resistance cassette and an iRFP reporter. Transduced cells were selected with blasticidin, sorted by flow cytometry based on iRFP fluorescence (640-nm excitation) and used for downstream differentiation assays. All plasmids were validated by antibiotic selection, Sanger sequencing (Tsingke) and full-plasmid next-generation sequencing (NGS) (Cwbio). Detailed genetic components, protein sequences and plasmid maps are provided in Supplementary Tables 4–8.

Transformation of E. coli

Plasmid DNA (1–10 μL) was mixed with 200 μl freshly thawed chemically competent E. coli and incubated on ice for 30 min. Cells were heat-shocked at 42 °C for 45 s, cooled on ice for 2 min and recovered in 500 μl antibiotic-free LB medium at 37 °C for one hour before plating on selective LB agar.

Yeast transformation

Plasmids were linearized with NotI in a reaction containing CutSmart buffer, NotI-HF (R3189L, NEB) and plasmid DNA, followed by incubation at 37 °C for one hour. Five microlitres of digested DNA was mixed with boiled salmon sperm ssDNA (CS9672, Coolaber) to a final volume of 10 μl. S. cerevisiae cells were cultured in YPD at 30 °C for one to two days, collected by centrifugation and washed three times with 0.1 M lithium acetate (LiOAc; ref. 56). Cells were resuspended in 0.1 M LiOAc, and 2-μl aliquots were used as competent cells. For transformation, plasmid–ssDNA was combined with competent cells, 50% PEG-3350 and 1 M LiOAc, mixed gently and incubated sequentially at 42 °C and 30 °C for 40 min each. Cells were then pelleted, resuspended in sterile water and plated on SD agar for auxotrophic or antibiotic selection.

Lentivirus production and transduction

Lentiviral particles (LV-Tet-Bxb1) were produced in HEK293FT cells using a three-plasmid system57. The transfer plasmid encoding Bxb1 or DHFR–Bxb1 was co-transfected with psPAX2 and pMD2.G using Lipofectamine 3000 (L3000008, Thermo Fisher Scientific) according to the manufacturer’s instructions. Viral supernatants were collected at 48 h and 72 h, filtered through 0.45-μm PES membranes and concentrated by ultracentrifugation.

For transduction, 1 × 106 HEK293FT cells or 8 × 105 CHO-K1 cells were seeded per well in 6-well plates and cultured for 24 h. The medium was replaced with 1 ml viral suspension for 18 h, followed by the addition of fresh medium and incubation for another 24 h. Cells were then transferred to 10-cm dishes, dissociated with 0.25% trypsin and cultured in selection medium. Fresh antibiotic-containing medium was replaced every four days until confluence was reached.

Digital PCR for copy-number analysis

Gene copy numbers in engineered E. coli, S. cerevisiae BY4741 and mammalian cells were determined using ratio-based digital PCR. Genomic DNA was extracted and analysed by Beijing Tsingke Biotech Co., Ltd (China). Absolute copy numbers were calculated by normalizing target concentrations to endogenous reference genes with known copy numbers in each chassis.

Digital PCR enables absolute nucleic acid quantification with high sensitivity and accuracy58 by partitioning reactions into thousands of nanolitre-scale droplets, each acting as an independent PCR microreactor. After amplification, fluorescence was measured to classify droplets as positive or negative, and target concentrations were calculated using Poisson statistics. TaqMan probes were used, with FAM–BHQ1 for target detection and VIC–MGB for reference detection. Reactions were performed using 2× T5 Fast qPCR Mix (probe-based, Tsingke) according to the manufacturer’s protocol.

Copy number (N) was calculated as

$$N=C({\rm{t}}{\rm{a}}{\rm{r}}{\rm{g}}{\rm{e}}{\rm{t}}{\rm{e}}{\rm{d}}\,{\rm{g}}{\rm{e}}{\rm{n}}{\rm{e}})/C({\rm{r}}{\rm{e}}{\rm{f}}{\rm{e}}{\rm{r}}{\rm{e}}{\rm{n}}{\rm{c}}{\rm{e}}\,{\rm{g}}{\rm{e}}{\rm{n}}{\rm{e}})$$

where C denotes absolute concentration (copies per μl). Concentrations were derived using

$$C=-\frac{1}{v}{\rm{l}}{\rm{n}}\,\left(1-\frac{k}{n}\right)$$

where n is the total number of partitions, k is the number of positive partitions and v is the partition volume. For the SinoGene DQ24 digital PCR system (Tsingke Biotechnology), v = 0.6 × 10−3 μl. The resulting copy-number data are shown in Supplementary Fig. 3.

Flow cytometry

For most yeast analyses, strains were inoculated into 1 ml YPD supplemented with inducers (1 mM aTc or 1 μM β-oestradiol) and cultured overnight at 30 °C with shaking at 800 rpm in 2.2 ml deep-well plates. The following day, cultures were diluted 1:50 in 200 μl ddH2O in 96-well flat-bottom plates and analysed on an Attune NxT flow cytometer (Thermo Fisher Scientific). For each sample, 10,000 events were collected and analysed using CytExpert 2.4. For doublet analysis, cultures were diluted 1:5 in ddH2O before acquisition.

For mammalian cell sorting, confluent cells from 10-cm dishes were dissociated with 0.25% trypsin, centrifuged and resuspended in 2 ml F-12K medium containing 4% penicillin–streptomycin. Cell suspensions were filtered through a 75-μm strainer and sorted on a FACSAria Fusion (BD Biosciences). Approximately 2 × 105 sorted cells were collected into 6-well plates for downstream culture.

Growth curves

Single yeast colonies were grown overnight in 1 ml YPD at 30 °C with shaking at 800 rpm in 2.2 ml deep-well plates. Cultures were diluted the next day to an OD600 nm of around 0.06 in 200 μl fresh YPD in clear, flat-bottom 96-well plates. OD600 nm was measured every 5 or 10 min for 30 h at 30 °C using a microplate reader (Synergy H1, BioTek) with a 10-s shake before each read. Maximum exponential growth rates were calculated as: LN (OD600 nm(t + 5)/OD600 nm(t))/5, where t is time in hours.

Consortium passaging

To assess the long-term stability of differentiated yeast consortia, cells were mixed at defined ratios and cultured in 5 ml YPD at 30 °C for 24 h. Population composition was quantified by flow cytometry, after which cultures were diluted 1:1,000 into fresh YPD and grown for another 24 h. This cycle was repeated for seven rounds to track compositional drift.

To evaluate circuit stability without induction, yeast cultures were serially passaged at a 1:1,000 dilution for 15 rounds (around 15 days) and monitored for spontaneous differentiation due to recombinase leakiness by flow cytometry. In CHO-K1 cells, stability was similarly assessed over 5 passages (around 15 days) at a 1:6 dilution by monitoring unintended differentiation events.

NGS analysis

Amplicon-based NGS was performed on yeast containing differentiation circuits. Cultures were grown in 5 ml YPD and induced with 1 mM aTc or 1 μM β-oestradiol. Genomic DNA was extracted using a TIANamp Yeast DNA Kit (DP307, TIANGEN). A 300-bp region spanning the recombinase-mediated rearrangement was amplified by PCR using the following primers: forward 5′-CGACGGCGATCACAGACATTAA-3′ and reverse 5′-CTCACACTGACGAATCATGT-3′. PCR products were purified and submitted to Tsingke for sequencing and analysis.

Confocal microscopy

For liquid cultures, 5 μl yeast suspension was placed on a microscope slide and covered with a 1 cm × 1 cm coverslip. Samples were imaged using a Nikon AX confocal microscope. For colony imaging, SD medium containing 0.7% agar and appropriate inducers or antibiotics was prepared, and 2 μl of yeast diluted to an OD600 nm of around 0.06 was spotted onto plates. After incubation at 30 °C for three to five days, colonies were imaged by confocal microscopy.

For time-lapse imaging of differentiation (Supplementary Videos 13), uninduced yeast were diluted 1:1,000 (OD600 nm ≈ 0.01) and seeded into glass-bottom dishes containing induced YPD. Cultures were maintained at 30 °C on a temperature-controlled stage, and fluorescence images were acquired every 10 min to capture aggregate formation.

For pattern-formation imaging (Supplementary Videos 4 and 5), engineered progenitors were diluted to around 100 cells and seeded into 96-well round-bottom ultra-low-attachment plates (Corning, 7007) containing induced YPD. Plates were centrifuged at 100g for 10 min to promote cell contact and incubated at 30 °C. Time-lapse imaging was performed every 10 min using a Nikon AX microscope.

For CHO-K1 time-lapse imaging, 100–1,000 cells were seeded into ultra-low-attachment 96-well plates with F-12K medium, with doxycycline and TMP added as required. Plates were incubated at 37 °C with 5% CO2, and confocal images were acquired every 24 h.

Aggregate area analysis

Ten confocal images of each engineered yeast aggregate shown in Supplementary Fig. 84 were acquired. Aggregate areas were quantified using ImageJ (v1.54g). Objects smaller than 400 μm2 were excluded, and the remaining measurements were used to generate aggregate size distributions.

Sedimentation assay

Yeast containing genetic circuits were cultured overnight in 1.5 ml induced YPD at 30 °C and 800 rpm in deep-well plates, then adjusted to an OD600 nm of 1.7. One millilitre of culture was transferred to a cuvette, and OD600 nm was recorded every 30 min for 210 min using a UV spectrophotometer to determine sedimentation rates.

Protein secretion assay

Protein secretion was assessed using the Nano-Glo HiBiT Extracellular Detection System (Promega), which detects complementation between the 11-amino-acid HiBiT tag (VSGWRLFKKIS) and LgBiT to generate bioluminescence59. HiBiT was fused to target proteins, and 100 μl culture supernatant was mixed with 1 μl LgBiT, 97 μl reaction buffer and 2 μl substrate. After 5 min of incubation at room temperature, luminescence was measured with a BioTek plate reader. Non-secreting BY4741 cells served as a negative control.

α-Galactosidase activity

X-α-Gal stock (40 mg ml−1; Sigma-Aldrich, 16555) was prepared in dimethyl sulfoxide (DMSO). For activity assays, 100 μl stock was added to 3 ml of YPD inoculated with yeast at a 1:1,000 dilution. Cultures were incubated for 24 h at 30 °C, then collected and imaged to assess α-galactosidase activity.

Secreted laccase activity

Laccases are copper-dependent enzymes and therefore require copper supplementation60. Stock solutions of 2,2′-azino-bis(3-ethylbenzothiazoline-6-sulfonic acid) (ABTS; Sigma-Aldrich, A1888) and copper sulfate were prepared at final concentrations of 0.1 M and 1 M, respectively. To assay secreted laccase activity, 125 µl ABTS and 25 µl CuSO4 were added to 3 ml YPD medium inoculated with yeast cells (1:1,000). Cultures were incubated at 30 °C for 24 h and subsequently imaged.

Secreted lipase activity

Yeast strains were cultured in YPD medium supplemented with 1% soybean oil for 48 h. Fermentation broth (5 ml) was collected by centrifugation (12,000 rpm, 15 min). Lipids in the supernatant were extracted by sequential mixing with 500 µl acetic acid, 500 µl 12% (w/v) NaCl and 2 mL ethyl acetate. After vortexing for 15 min and centrifugation (12,000 rpm, 15 min), the organic phase was recovered, dried under nitrogen and resuspended in chloroform. Lipids were separated by thin-layer chromatography using hexane: diethyl ether: acetic acid (70:30:1) and visualized with iodine vapour.

Violacein and β-carotene extraction

Violacein and β-carotene were extracted from cultured yeast by collecting cells (1 ml, OD600 nm = 2.0) via centrifugation (4,000 rpm, 1 min). Cell pellets were resuspended in 500 µl DMSO and incubated at 37 °C for 30–60 min with grinding to enhance lysis and extraction efficiency. After centrifugation (4,000 rpm, 1 min), supernatants containing the pigments were analysed by full-spectrum scanning (400–650 nm, 5-nm intervals) using a BioTek microplate reader.

Quantifying pigment-producing cell ratios

Yeast strains containing pZ-driven violacein and pPhlF-regulated β-carotene pathways were transformed with a branching circuit using Z3EV and PhlF-VP16 as reporters. Colonies were grown on agar plates for three days, inoculated into 5 ml YPD supplemented with 1 mM aTc and 1 nM β-oestradiol and cultured at 30 °C with shaking (1,000 rpm) for eight hours. Notably, 1 nM β-oestradiol was sufficient for robust induction, substantially lower than the commonly used 1 µM. Cultures were diluted 10,000-fold, plated onto YPD agar containing 1 nM β-oestradiol and incubated for three days. Plates were imaged, and colonies producing orange (β-carotene) or purple (violacein) pigments were counted.

Recombinase-guided pigment library

A library of 25 synthetic differentiation circuits was constructed by Golden Gate assembly24. Each construct contained a unique engineered attP variant with specific point mutations that tune recombination efficiency with Bxb1 recombinase, spanning a continuum from fast to slow recombination rates (Supplementary Fig. 80). These differences modulate the activation of downstream modules (Z3EV or PhlF-VP16), generating variable proportions of violacein- and β-carotene-producing subpopulations. The plasmid library was transformed into S. cerevisiae BY4741 engineered with both pigment pathways under distinct synthetic transcriptional control. Ninety-six colonies were randomly selected and cultured in 2.2 ml deep-well plates at 30 °C and 800 rpm in the presence of inducers (1 mM aTc and 1 nM β-oestradiol) to initiate differentiation.

DNS assay for cellulase activity

Glucose concentrations were measured using a modified DNS method61. Samples (50 µl) were mixed with 100 µl DNS buffer (Macklin), heated at 100 °C for 5 min and cooled on ice for 1 min. After adding 150 µl ddH2O, 200 µl of each sample was transferred to a microplate, and absorbance at 540 nm was measured. Glucose concentrations were calculated from a standard curve (0.125–5 g l−1) (Supplementary Fig. 81). Cellulase activity was assessed using 1 ml culture supernatant (OD600 nm = 2.0) incubated with 2% Avicel PH-101 (Sigma) in sealed deep-well plates at 35 °C with shaking (around 300 rpm) for 24 h, followed by glucose quantification using the DNS assay.

Snowflake yeast construction

Snowflake yeast strains were generated by deleting ACE2 using CRISPR–Cas9, as previously described42. The plasmid pMYT095, containing Cas9 and gRNA expression cassettes, was used for genome editing54. The guide RNA (TTATTCAAAATATAATTGTCGGG) was designed using the Yeastriction online tool. Plasmids for ACE2 deletion were constructed and validated by Sanger sequencing (Sangon Biotech). Donor DNA fragments were synthesized, purified (Vazyme DNA Extraction Mini Kit) and co-transformed with plasmids into yeast using the lithium acetate method. Transformants were confirmed by PCR and Sanger sequencing.

Image-based cell–cell interaction analysis

Cell–cell interactions in engineered yeast populations were quantified using a five-step image-processing workflow based on fluorescence microscopy (Supplementary Fig. 86). Raw images were first manually enhanced in Adobe Photoshop to improve contrast and delineate cell boundaries. Enhanced images were then segmented in CellProfiler (v.4.2.1) by splitting RGB channels and identifying primary objects with diameters of 10–160 pixels using adaptive Otsu thresholding in three-class mode. Segmented data were imported into MATLAB (v.2024b) for downstream analysis. Individual cells were classified by dominant RGB fluorescence intensity, corresponding to specific engineered cell types. Interactions were defined by spatial proximity, with cell pairs within 35 pixels considered interacting. Interaction networks were visualized by connecting adjacent cells, and normalized contact-frequency heat maps were generated to quantify self- and heterotypic interaction preferences across the population.

In vitro morphogenesis of engineered mammalian cells

To engineer and analyse cellular morphologies in CHO-K1 cells, two complementary in vitro culture strategies were used. In the first, CHO-K1 cells pre-differentiated by doxycycline and TMP induction were collected and diluted to around 100–1,000 cells per well, then seeded into 96-well ultra-low attachment plates containing 100 μl F-12K medium supplemented with 10% FBS, 2% penicillin–streptomycin, 4 μg ml−1 puromycin, 20 μg ml−1 BSD and 400 μg ml−1 zeocin. Cells were maintained at 37 °C with 5% CO2, and morphological evolution was monitored by confocal fluorescence microscopy at 2, 12, 24, 48, 72 and 96 h after seeding.

In the second strategy, around 100–1,000 CHO-K1 cells containing a single-copy differentiation circuit and an inducible Bxb1 recombinase system were seeded under identical culture conditions. In situ differentiation was initiated by adding 1 μg ml−1 doxycycline and 0.1 mM TMP at seeding. Morphogenesis and structure formation were tracked by confocal microscopy at the same time points. Together, these time-course analyses enabled controlled observation of genetically programmed, inducer-driven morphological dynamics in the culture environment.

Predictive modelling of circuit-driven differentiation

To enable predictive design of differentiation patterns, we developed a simplified mathematical model describing Bxb1-mediated excision of the engineered circuit, accounting for conditions with and without steric hindrance from transcription machinery. We hypothesized that strong promoters recruit more transcription factors, thereby reducing Bxb1 cleavage efficiency relative to weak promoters. In the absence of steric effects, the left and right arms are cleaved at rates kA and kB, respectively, which depend on arm length. This dependence was modelled using power laws: \({k}_{{\rm{A}}}={k}_{A}^{0}{h}_{{\rm{A}}}^{-\beta },\) \({k}_{{\rm{B}}}={k}_{{\rm{B}}}^{0}{h}_{{\rm{B}}}^{-\beta },\) where hA and hB denote arm lengths, and β is a positive constant.

Promoter-driven recruitment of transcription machinery introduces steric hindrance that reduces recombination efficiency. Binding on the left arm decreases the cleavage rate from kA to vA, whereas binding on the right arm decreases kB to vB. We assumed that steric hindrance on one arm does not influence recombination on the other. Hindrance strength was quantified by α, defined as: \(\alpha =\frac{{v}_{{\rm{A}}}}{{k}_{{\rm{A}}}}=\frac{{v}_{{\rm{B}}}}{{k}_{{\rm{B}}}}.\) Under these assumptions, circuit-mediated differentiation dynamics were described by the following ordinary differential equation system:

$$\frac{{\rm{d}}[D]}{{\rm{d}}t}=-{(k}_{{\rm{A}}}+{k}_{{\rm{B}}}+{r}_{{\rm{A}}}+{r}_{{\rm{B}}})[D]$$
$$\frac{{\rm{d}}[{L}_{{\rm{A}}}]}{{\rm{d}}t}={k}_{{\rm{A}}}[D]+{v}_{{\rm{A}}}[{M}_{{\rm{A}}}]+{k}_{{\rm{A}}}[{M}_{{\rm{B}}}],$$
$$\frac{{\rm{d}}[{L}_{{\rm{B}}}]}{{\rm{d}}t}={k}_{{\rm{B}}}[D]+{v}_{{\rm{B}}}[{M}_{{\rm{B}}}]+{k}_{{\rm{B}}}[{M}_{{\rm{A}}}]$$
$$\frac{{\rm{d}}[{M}_{{\rm{A}}}]}{{\rm{d}}t}={r}_{{\rm{A}}}[D]-{v}_{{\rm{A}}}[{M}_{{\rm{A}}}]-{k}_{{\rm{B}}}[{M}_{{\rm{A}}}]$$
$$\frac{{\rm{d}}[{M}_{{\rm{B}}}]}{{\rm{d}}t}={r}_{{\rm{B}}}[D]-{v}_{{\rm{B}}}[{M}_{{\rm{B}}}]-{k}_{{\rm{A}}}[{M}_{{\rm{B}}}]$$

Here, [D] denotes the population-level concentration of the ‘naked’ circuit; [LA] and [LB] represent recombination products generated by left- or right-arm excision, respectively; MA and MB denote circuit states bound by transcription machinery; and rA and rB are binding rates.

Although full parameterization would allow direct prediction of excision ratios, many parameters are experimentally inaccessible. We therefore estimated parameters by fitting the model to experimental data, minimizing the discrepancy between predicted and observed ratios. The objective function was defined as \(\phi ={\sum }_{i=1}^{m}{({y}_{i}-{x}_{i})}^{2},\) where xi is the measured ratio, yi the predicted value and i indexes the data points. Optimal parameters were obtained by minimizing ϕ over the defined parameter space.

Experimentally, we varied left and right arm lengths and quantified Venus-to-mScarlet cell ratios across combinations (Fig. 2d), which were used for model fitting (Supplementary Figs. 39 and 40). Parameters were screened over the ranges \(0 < {k}_{{\rm{A}}}^{0} < 0.3\,{{\rm{h}}}^{-1},\) \(0 < {k}_{{\rm{B}}}^{0} < 0.3\,{{\rm{h}}}^{-1},\) 0 < rA < 0.3 h−1, 0 < rB < 0.3 h−1, 0 < α < 0.1, 0 < β < 2. The optimal fit yielded \({k}_{{\rm{A}}}^{0}=0.38\,{{\rm{h}}}^{-1},\) \({k}_{{\rm{B}}}^{0}=0.14\,{{\rm{h}}}^{-1},\) rA = 0.56 h−1, rB = 0.01 h−1, α = 0.01, β = 1.3.

These parameters were subsequently used to infer \({k}_{{\rm{A}}}^{0}\) or \({k}_{{\rm{B}}}^{0}\) values for specific attP variants by fitting new measurements while holding other parameters constant. Corresponding estimates for left- or right-arm variants are summarized in Supplementary Table 1. The same framework was applied to estimate rA and rB for different promoters (Supplementary Table 2). Once condition-specific parameters (arm length, attP variant and promoter type) were determined, the model enabled prediction of Venus-to-mScarlet cell ratios across diverse configurations (Supplementary Table 3). All simulations were performed in Python (v.3.8.5).

Statistics and reproducibility

All experiments included at least three independent biological replicates (n ≥ 3). Data processing was performed using Excel (Microsoft Office 2019) and Origin 2019b (OriginLab). Error bars denote s.d., as specified in the figure legends, which also report replicate numbers. Two-group comparisons were done using the unpaired two-tailed Student’s t-test. P < 0.05 represents statistical significance (*P < 0.05, **P < 0.01, ***P < 0.001 and ****P < 0.0001; P ≥ 0.05, not significant).

Reporting summary

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