Stem cell-derived synthetic embryos self-assemble by exploiting cadherin codes and cortical tension

Mammalian embryos sequentially differentiate into trophectoderm and an inner cell mass, the latter of which differentiates into primitive endoderm and epiblast. Trophoblast stem (TS), extraembryonic endoderm (XEN) and embryonic stem (ES) cells derived from these three lineages can self-assemble into synthetic embryos, but the mechanisms remain unknown. Here, we show that a stem cell-specific cadherin code drives synthetic embryogenesis. The XEN cell cadherin code enables XEN cell sorting into a layer below ES cells, recapitulating the sorting of epiblast and primitive endoderm before implantation. The TS cell cadherin code enables TS cell sorting above ES cells, resembling extraembryonic ectoderm clustering above epiblast following implantation. Whereas differential cadherin expression drives initial cell sorting, cortical tension consolidates tissue organization. By optimizing cadherin code expression in different stem cell lines, we tripled the frequency of correctly formed synthetic embryos. Thus, by exploiting cadherin codes from different stages of development, lineage-specific stem cells bypass the preimplantation structure to directly assemble a postimplantation embryo.

endoderm lineages were defined by the expression of their respective markers and showed similar dynamics of cadherin expression in ETX and natural embryos ( Fig. 1d and Extended Data Fig. 1a). In natural embryos, E-cadherin was expressed in all lineages from E4.5 to E6.5; P-cadherin expression was elevated only in trophectoderm after implantation (E5.5 and E6.5); and K-cadherin expression was elevated only in primitive endoderm before implantation (E4.5) when it sorts below the epiblast ( Fig. 1d and Extended Data Fig. 1b). We verified that the corresponding proteins, similar to mRNA, were differentially expressed in ES or TS colonies (Extended Data Fig. 1c), day 4 ETX embryos and E5.5 natural embryos (Extended Data Fig. 1d). Therefore, XEN cells most resemble E4.5 primitive endoderm cells of the preimplantation embryo, whereas TS cells resemble extraembryonic ectoderm cells of the postimplantation embryo.
ES cells readily form chimeras with eight-cell-stage embryos and sort to the epiblast lineage. Given that E-and K-cadherin were differentially expressed in the epiblast and primitive endoderm of natural preimplantation embryos, we examined whether overexpression (OE) of these cadherins in ES cells would affect their subsequent sorting in the blastocysts of chimeras (Fig. 1e). We found that wild-type ES cells (n = 32 embryos) and ES cells overexpressing E-cadherin (Cdh1 OE) contributed exclusively to the epiblast of the chimeras (n = 16 embryos) (Fig. 1f,g). In contrast, ES cells overexpressing K-cadherin (Cdh6 OE) frequently contributed to the primitive endoderm (n = 16 embryos) (Fig. 1f,g and Extended Data Fig. 1e). These data are consistent with K-cadherin promoting primitive endoderm localization and E-cadherin promoting epiblast localization.
We noted that ES cells overexpressing P-cadherin (Cdh3 OE) were excluded from the preimplantation embryo (n = 13 embryos) and sorted outside the trophectoderm (Fig. 1f,g and Extended Data Fig. 1f), consistent with low P-cadherin expression in all lineages of the blastocyst and elevated P-cadherin expression in the trophectoderm only in the postimplantation natural embryo.
To evaluate whether differential adhesion plays a role in ETX embryo self-assembly, we used atomic force microscopy (AFM) to determine the cell-cell adhesion of ES, TS and XEN cells in vitro (Fig. 2a,b). We found that the mean adhesion forces between ES-ES cell couples (1.94 ± 0.54 nN) and TS-TS cell couples (2.20 ± 0.85 nN) were significantly higher than those between Stem cell-derived synthetic embryos self-assemble by exploiting cadherin codes and cortical tension Min Bao 1,2 , Jake Cornwall-Scoones 1,3 , Estefania Sanchez-Vasquez 1 , Andy L. Cox 1 , Dong-Yuan Chen 1    Letters NaTurE CEll Biology XEN-XEN cell couples (0.55 ± 0.11 nN) or between ES-TS cell couples (0.57 ± 0.36 nN), thus indicating a tendency for ES cells and TS cells to form homotypic associations. In addition, the adhesion forces between XEN-ES cell couples (0.83 ± 0.96 nN) were greater than those between XEN-XEN cell couples (0.55 ± 0.11 nN) or XEN-TS (0.46 ± 0.24 nN) cell couples, suggesting that XEN cells have the highest affinity for ES cells (Fig. 2c). We also inferred adhesion forces from the contact angles between cells 12 (Fig. 2d). The contact angles at ES-ES, TS-TS and XEN-ES junctions were greater than the contact angles between ES-TS, XEN-XEN and TS-XEN cells ( Fig. 2e and Extended Data Fig. 2a), in agreement with the AFM measurements.
To compare cell-cell contact angles in ETX and natural embryos, we employed the imaging surface analysis environment (ImSAnE) algorithm 13,14 to extract focal planes from three-dimensional (3D) stacks of E-cadherin-stained day 4 ETX and E5.5 natural embryos and unrolled these into 2D projections (Extended Data Fig. 2b). In agreement with cell contact angle measurements in stem cell doublets, we found that the homotypic contact angles were larger than the heterotypic contact angles in ETX and natural embryos (Extended Data Fig. 2c). We also noted that the contact angle between XEN-XEN and VE-VE cells at the surface of ETX embryos and natural embryos was close to 180° (Extended Data Fig. 2c,d), indicating a smooth boundary interface and reflecting the high relative tension along the interface after self-organization. Together, these measurements indicate differential cadherin expression and differential adhesion between stem cells that build-and lineages that comprise-ETX embryos.
To examine the potential relationship between differential cadherin expression and differential adhesion, we measured adhesion forces between ES and TS cells and immobilized E-cadherin (Cdh1) or P-cadherin (Cdh3) substrate (Fig. 2f). ES cells exhibited higher adhesion with immobilized E-cadherin (2.13 ± 0.83 nN) than with P-cadherin (1.07 ± 0.54 nN), whereas TS cells displayed comparable adhesion forces with both E-cadherin (2.02 ± 0.89 nN) and P-cadherin (2.41 ± 0.86 nN). We then used RNA interference to knockdown (KD) cadherins in stem cells. E-cadherin KD reduced ES-ES adhesion fourfold. P-or E-cadherin KD similarly reduced TS-TS adhesion, suggesting that downregulation of one cadherin was sufficient to decrease the TS-TS adhesion force below a critical threshold ( Fig. 2g and Extended Data Fig. 2e). Depletion of either E-or P-cadherin from XEN cells did not affect their homotypic adhesion (Fig. 2g). Thus, E-cadherin is required for the homotypic adhesion of ES cells, whereas both E-and P-cadherin are required for the homotypic adhesion of TS cells.
To assess whether the measured adhesion forces are sufficient to generate ETX embryos, we simulated assembly using the cellular Potts model (CPM) 15 , re-sampling our AFM adhesion force measurements to provide parameters (Fig. 2h). This analysis showed that, among the many sorted configurations possible with three cell types, ETX-like structures were the most favoured ( Fig. 2i)  In b and c, cadherin-and protocadherin-related transcripts are highlighted in orange. d, Violin plots showing Cdh1 (top), Cdh3 (middle) and Cdh6 gene expression (bottom) from scrNA-seq in natural and ETX embryos at different stages. NE45, NE55 and NE65 represent natural embryos collected at day 4.5, 5.5 and 6.5. ETX4, ETX5 and ETX6 represent ETX embryos collected at day 4, 5 and 6. e, Schematic of chimera aggregation. Cadherin OE ES cells expressing H2B-rFP were aggregated with eight-cell-stage wild-type embryos. Their contribution to either EPI (red), PE (green), TE (blue) or excluded cells was assessed at E4.5. Orange, chimeric contribution. f, Chimeras stained for rFP (magenta), Sox17 (green) and DNA (DAPI; grey). Scale bars, 50 μm. The magnified images show the regions indicated by dashed boxes to the left (scale bars, 10 μm). The experiments were repeated three times. WT, wild type. g, Percentage of cells contributing to EPI, PE, TE or excluded cells in chimeras, as in e. The data are presented as violin plots. Each dot corresponds to an embryo. n = 32 embryos for wild-type ES chimeras (3365 cells in total), n = 16 embryos for Cdh1 OE ES chimeras (1787 cells in total), n = 13 embryos for Cdh3 OE ES chimeras (1574 cells in total) and n = 16 embryos for Cdh6 OE ES chimeras (1894 cells in total). Statistical significance was determined by one-way ANOVA with a multiple comparison test. Numerical data are available as source data.

NaTurE CEll Biology
Next, we determined how the observed cadherin code affects the efficiency of ETX embryogenesis. Single-cell suspensions of ES, TS and XEN cells seeded into microwell plates assembled into multiple structures, of which 15.4% formed ETX structures recapitulating postimplantation embryo morphogenesis ( Fig. 3a and Supplementary Video 1). In contrast, 38.2% of structures had more than one ES compartment, 30.8% had more than one TS compartment and 12.8% had mislocalized XEN cells or lacked an outside XEN layer; we termed these missorted ETX structures ( Fig. 3b-d). The proportion of correctly sorted ETX embryos  Letters NaTurE CEll Biology plateaued at 15% after the first day of culture (Extended Data Fig. 3a). Thus, the three cell types undergo a sorting phase within the first 24 h of seeding before becoming consolidated into compartments. We hypothesized that cells can no longer sort during the consolidation phase due to their low mobility. To test this, we filmed ETX embryo formation by time-lapse microscopy and tracked cell mobility (Extended Data Fig. 3b). This revealed all cell types to be mobile during the cell sorting stage, becoming relatively immobile during the tissue consolidation stage (Extended Data Fig. 3c,d). XEN cell sorting fell into a particular two-phase pattern. XEN cells sorted efficiently; over 90% of XEN cells formed a monolayer, first enveloping ES cells and then spreading to cover TS cells. KD of E-cadherin (Cdh1) or K-cadherin (Cdh6), which are co-expressed in XEN cells, reduced the frequency of ETX embryos having a continuous XEN layer (Fig. 3e,f). However, XEN cells with OE of Cdh1 or Cdh6 often missorted within these compartments (Fig. 3e,f). Thus, an optimal balance of E-cadherin and K-cadherin contributes to the proper sorting of XEN cells in ETX embryos.
Differential adhesion cannot fully account for the ability of XEN cells to envelop the TS layer because the adhesion force between ES and XEN cells is larger than that between ES and TS cells, and XEN cells were found between the ES and TS compartments in approximately 10% of CPM simulations that sampled these data (Fig. 2i). The discrepancy between the predicted interfacial hierarchy for the sorted configuration in the ETX embryo and the measured differential adhesion force led us to hypothesize that the low number of XEN cells we used for making ETX embryos was insufficient to cover all ES cells during the sorting stage. To test this, we seeded ES and TS cells with between five and ten XEN cells and fixed the nascent structures at days 1 and 3. We found that low numbers of XEN cells first covered the ES cells only; subsequently, the TS cells enveloped the entire structure (Extended Data Fig. 3e,f). When we seeded approximately ten ES cells per structure, the XEN cells completely covered the ES cells, thereby excluding TS cells (Extended Data Fig. 3e,f), consistent with our measurements of differential adhesion.
Previous studies have reported a role for cortical stiffness in cell sorting, particularly in cell externalization [16][17][18] , prompting us to consider whether cortical tension may influence the capacity of XEN cells to form their external monolayer. Indeed, our AFM 17 measurements indicated that cortical stiffness is lower in XEN cells than in either TS or ES cells (Extended Data Fig. 3g). To determine whether differences in cortical stiffness between the different stem cell types of ETX embryos were due to differential actomyosin activity, as in other systems 17,19,20 , we measured cortical stiffness in the presence of blebbistatin (a myosin inhibitor 21 ). Blebbistatin reduced the cortical stiffness of both ES and TS cells to the same level as in XEN cells (Extended Data Fig. 3h). We also found that well-sorted ETX embryos treated with either blebbistatin or cytochalasin D (an actin depolymerizer 22 ) at day 3 for 24 h-once the primary sorting phase was completed-failed to maintain efficient sorting compared with control ETX embryos (Extended Data Fig. 3h). Moreover, when we treated well-sorted ETX embryos with either blebbistatin or cytochalasin D for 24 h at day 3, once the primary cell sorting phase was complete, more than 80 and 85% of blebbistatin-and cytochalasin D-treated structures, respectively, failed to maintain sorting compared with 18% of control ETX embryos (Extended Data Fig. 3h).
To further test the role of cortical stiffness on XEN cell externalization, we used a CPM in which cortical stiffness can be tuned independently. We found that lower stiffness increased both the sorting efficiency and speed of XEN cell externalization (Extended Data Fig. 3i), suggesting that the softness of XEN cells is important for this event. Together, these data suggest that, in addition to the differential expression of distinct cadherins, cortical stiffness plays a role in the self-assembly of stem cells into ETX embryos.
Next, we examined the function of the cadherin code in ES and TS cells during ETX embryo assembly. KD of P-cadherin (Cdh3) in TS cells, but not in ES cells, resulted in TS mislocalization and disrupted ETX embryogenesis. Similarly, KD of E-cadherin (Cdh1) in ES cells, but not TS cells, disrupted ETX embryogenesis. ETX embryo formation still occurred following E-cadherin depletion from TS cells ( Fig. 3g and Extended Data Fig. 4a), suggesting that differential expression of P-cadherin between ES cells and TS cells is sufficient to drive their sorting. We noticed that E-cadherin and P-cadherin showed different levels of expression in individual wild-type ES and TS cells, respectively (Extended Data Fig. 4b-d).
We considered that subsets of wild-type stem cells with low cadherin expression compromise ETX embryo formation. Indeed, when we combined wild-type ES and XEN cells with either a P-cadherin OE subset or a P-cadherin KD subset of TS cells, P-cadherin KD TS cells mislocalized to the ES compartment. Similarly, when combining wild-type XEN and TS cells with either an E-cadherin OE subset or an E-cadherin KD subset of ES cells, we observed mislocalization of E-cadherin KD ES cells in the TS compartment (Extended Data Fig. 5a,b). Thus, populations of ES and TS cells with low E-cadherin and low P-cadherin expression, respectively, compromise sorting in ETX embryos. Strikingly, mixing E-cadherin OE ES cells and P-cadherin OE TS cells with wild-type XEN cells increased ETX embryogenesis efficiency by almost threefold from approximately 15% with wild-type stem cells to approximately 42% with the OE cells (Fig. 3h). The time course of the sorting of E-cadherin OE ES cells, P-cadherin OE TS cells and XEN cells revealed that around 30% of these structures were well-sorted 12 h after cell seeding compared with 6.8% of wild-type structures (Extended Data Fig. 5c,d).

NaTurE CEll Biology
Thus, the sorting rate is increased following cadherin OE, as suggested in simulations 23 . Together, these results indicate that variable E-cadherin expression in ES cells and P-cadherin expression in TS cells limits the efficiency of ETX embryo formation. As implantation-stage embryo morphogenesis requires both lumenogenesis and basement membrane formation, we wanted to determine whether cadherin-enhanced ETX embryo self-organization also improved these events. ETX embryos generated from wild-type stem cells formed a central lumen-corresponding to the lumen of the epiblast rosette at implantation 24,25 -within the ES compartment by day 2. By day 3, multiple lumens developed in the TS compartment, corresponding to the multiple lumens of the E5.5 extraembryonic ectoderm, and these unified into a single cavity between days 4 and 5, as in natural development by E6.0 (Fig. 4a). Such a single unified cavity formed in over 90% of properly sorted ETX embryos but in fewer than 5% of ETX structures with missorted ES and TS cells (Extended Data Fig. 6a). Moreover, ETX structures with missorted XEN cells lacked cavities entirely (Extended Data Fig. 6b). Importantly, proper sorting and amniotic cavity-like formation were observed in only 9% of structures built from wild-type cells but in 40% of structures built from E-cadherin OE ES cells, P-cadherin OE TS cells and wild-type XEN cells (Fig. 4b,c). Moreover, the structures formed from cadherin OE cells, and the cavities within them, were longer than in ETX embryos built from wild-type cells (Extended Data Fig. 6c,d) after 3 d in culture. Together, this indicates that E-and P-cadherin OE in ES and TS cells, respectively, promotes cavity formation in ETX embryos.
Lumenogenesis requires signalling from the basement membrane, produced by the visceral endoderm 24,26 . Accordingly, we found that ETX structures with missorted XEN cells, which lacked a cavity, also failed to establish a basement membrane (Extended Data Fig. 6e). A continuous laminin-containing basement membrane was detected in 78% of structures built from E-cadherin OE ES cells, P-cadherin OE TS cells and XEN cells (Fig. 4d) but in only 45% of structures made from wild-type ES, TS and XEN cells (Fig. 4e). Thus, elevated expression of E-and P-cadherin in ES and TS cells, respectively, increases the successful formation of basement membrane, lumen and correctly sorted ETX embryos (Fig. 4f).
Our findings shed light on the remarkable self-assembly of stem cells into synthetic embryos 10,11,[27][28][29][30][31][32] . We show that this requires a cadherin code that, through strong homotypic interactions, sorts ES and TS cells into distinct compartments. In contrast, heterotypic interactions enable XEN cells to first surround ES and then TS cells. Although XEN cells have a cadherin code resembling preimplantation primitive endoderm, they nevertheless attain the ability to support synthetic postimplantation morphogenesis (Extended Data Fig. 6f). These differences between natural and ETX embryos highlight the distinct use of common rules between biological development and bioengineering. Synthetic embryo assembly utilizes these codes in a distinct way: XEN cells use the preimplantation code of primitive endoderm to sort in a layer below ES cells, whereas TS cells use the postimplantation code of extraembryonic ectoderm to sort as a cluster above ES cells.
The outcome of cell sorting has been modelled previously by considering cell-specific differences in interfacial energies maximizing the most energetically favourable cell interfaces 15,[33][34][35][36] . Disparity in interfacial energy was considered to reflect adhesion differences, with cadherins being the best-characterized effectors 1,37 , as espoused in the differential adhesion hypothesis (DAH) 33,38 . In accord, we now show that cell sorting is driven in ETX embryos by increased cadherin-mediated homotypic interactions in relation to heterotypic interactions. The later development of the differential interfacial tension hypothesis (DITH) 16,17,[39][40][41] invoking the role of differential cortical tension in sorting resonates with our findings on XEN cell externalization in self-assembly. Together, our observations support the balance between adhesion and tension (DAH versus DITH) as in biophysical models of cell sorting. However, incomplete ES-TS sorting still results in local order, emphasizing a need for global-scale sorting to fully recapitulate natural morphogenesis. DAH and DITH only account for local sorting to form homotypic clusters of ES and TS cells, as seen even in missorted structures. For complete sorting, ETX embryos must escape from locally correct neighbourhoods within globally incorrect patterns to explore alternative conformations. If cells remain in local minima before cell sorting is complete, structures will remain missorted.
The importance of the cell type-specific cadherin code is illustrated by our finding that established wild-type stem cell lines show heterogeneous cadherin expression, with some subsets below the threshold required to support proper sorting. Elevating E-cadherin in ES cells and P-cadherin in TS cells substantially improves ETX embryogenesis efficiency (Fig. 4f). This identifies a broader challenge in synthetic biology; namely, characterizing and ameliorating the impacts of heterogeneity in stem cell lines-factors that remain for the most part undefined but reported 35,[42][43][44] . Such heterogeneity might affect the distribution of cell-cell cohesive properties within the same cell population 45 , confounding the hierarchy of interactions necessary to drive self-organization of other organoid structures 46,47 . Thus, the principles of self-organization that we now describe can provide a means for increasing the efficiency of formation of different types of organoids by modulating interactions and the physical properties of cells.

online content
Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of

green), E-cadherin (monochrome) and DAPI (grey) staining in day 4 cadherin OE ETX structures formed by combining E-cadherin OE ES cells with P-cadherin OE TS cells and wild-type XEN cells. ETX structures formed by combining
wild-type cells were used as a control. Scale bars, 100 μm. c, Comparison and quantification of joined cavity formation in cadherin OE and control ETX structures. n = 361 (control group) and n = 253 (cadherin OE group). N = 5 for each condition. The data are presented as means ± s.d. Statistical significance was determined by unpaired two-tailed Student's t-test. d, representative image showing Oct4 (red), Gata4 (green), laminin (monochrome) and DAPI (blue) staining in day 4 cadherin OE ETX structures formed by combining E-cadherin OE ES cells with P-cadherin OE TS cells and wild-type XEN cells. ETX structures formed by combining wild-type cells were used as a control. Scale bars, 100 μm. e, Quantification of the structures that contained continuous or discontinuous laminin. n = 40 ETX structures per condition. N = 3. The data are presented as means ± s.d. Statistical significance was determined by unpaired two-tailed Student's t-test. f, Self-organization principles in stem cell-derived ETX embryos. Differential expression of E-, K-and P-cadherins enables the sorting of ES (epiblast-like), XEN (VE-like) and TS (TE-like) stem cells. Wild-type ES cells with low E-cadherin expression and wild-type TS cells with low P-cadherin expression exhibited detrimental global sorting efficiency. This could be overcome by overexpressing E-cadherin in ES cells and P-cadherin in TS cells to increase the efficiency of ETX embryo formation. Proper morphogenesis, including cavity formation, basement membrane formation (purple) and symmetry breaking can only be observed in well-sorted structures. Numerical data are available as source data.
TS cells (Cdh3 OE) were cultured on 10 μg ml −1 laminin-coated plates in TX medium, with 50 ng ml −1 IL11 (50117-MNCE; Sino Biological), 50 ng ml −1 activin (Qk001-ActA-100; Qkine), 25 ng ml −1 Bmp7 (PeproTech; 120-03P-10μg), Mouse embryos. Mice were maintained according to national and international guidelines. All experiments were regulated by the Animals (Scientific Procedures) Act 1986 Amendment Regulations 2012 following ethical review by the University of Cambridge Animal Welfare and Ethical Review Body. Experiments were approved by the Home Office. Animals were inspected daily and those that showed health concerns were culled by cervical dislocation. Six-week-old female CD-1 mice were used in all of the animal experiments. All experimental mice were free of pathogens and were on a 12 h light/12 h dark cycle, with unlimited access to water and food. The temperature in the facility was controlled and maintained at 21 °C.
Generation of cell lines. The experiments were performed using mouse E14 wild-type ES cells 48 (derived in the laboratory of M.Z.-G.). The H2B-CFP ES cells were a gift from M. Elowitz, the wild-type TS cells were a gift from J. Nichols, the EGFP TS cells were a gift from J. Rossant, the wild-type XEN cells were a gift from E. Na and the H2B-RFP XEN cells were derived from wild-type XEN cells. Cdh1 and Cdh6 OE ES cells were generated from E14 wild-type ES cells, the Cdh3 OE TS cells were generated from wild-type TS cells and the Cdh1 and Cdh6 OE XEN cells were generated from wild-type XEN cells (see below).
To generate cadherin OE ES, TS or XEN cell lines, 0.5 μg of a super piggyBac transposase expression vector (PB210PA-1; System Biosciences) and 2 μg Cdh1-pHygro, Cdh3-pHygro or Cdh6-pHygro plasmid were co-transfected into cells using Lipofectamine. Cells were passaged for 24 h after transfection and subjected to selection in medium containing 50 μg ml −1 hygromycin (10687010; Thermo Fisher Scientific) for 1 week. A similar approach was used to generate the stable nuclear reporter H2B-RFP XEN cell line.
Cloning. Cloning procedures were performed using Gateway technology (Thermo Fisher Scientific). The fragment of interest (Cdh1, Cdh3 or Cdh6) was amplified by PCR to introduce attB sites. These fragments were cloned into the pDONR221 vector (a gift from J. Silva) using BP clonase II (11789020; Thermo Fisher Scientific). The fragment of interest (Cdh1, Cdh3 or Cdh6) was subcloned into a pHygro vector containing a hygromycin resistance cassette for expression in stem cells. The recombination reaction was carried out using LR Clonase II (11791100; Thermo Fisher Scientific).

Cell doublets experiment.
To measure cell-cell contact angles, 1200 dissociated ES, TS or XEN cells were mixed in pairs and seeded onto AggreWell plates (34411; STEMCELL Technologies) pretreated with rinsing solution (07010; STEMCELL Technologies). Cells were centrifuged at 100g for 3 min. After 1 h incubation at 37 °C, cells were collected and fixed for immunostaining.

Cadherin-coated surface preparation.
To measure the adhesion forces between cells and cadherin-coated surfaces, we followed a previous study 49 . Briefly, gold-coated glass cover slips (AU.0100; Platypus) were cleaned in argon plasma for 30 s and subsequently functionalized by immersion in thiol solution (P50757; Sigma-Aldrich) for 16 h, then rinsed with EDTA-buffer (15575-020; Thermo Fisher Scientific) to remove excess thiol. The cover slips were subsequently incubated with 10 μg ml −1 recombinant E-cadherin (8875-EC-050; R&D Systems) or P-cadherin (761-MP-050; R&D Systems) for 12 h at 4 °C. Before making force measurements, the cadherin-coated surfaces were washed with HEPES (15630106; Thermo Fisher Scientific) and activated by incubation in the same buffer for 30 min.
Adhesion force measurement. Cell-cell or cell-cadherin adhesion forces were measured using an atomic force microscope (Bruker NanoScope) coupled to a confocal microscope (TCS SP5II; Leica). Tipless silicon nitride cantilevers were V shaped, with nominal spring constants (60 pN nm −1 ; NP-0; Veeco Instruments). The atomic force microscope cantilevers were plasma cleaned before functionalization with concanavalin A, as described previously 17,49 . The system was calibrated in cell-free medium at 37 °C before each experiment by measuring the deflection sensitivity on a glass surface, allowing the cantilever spring constant to be determined in situ. Before loading the sample, the sample stage movement was calibrated using NanoScope software (version 6.13). Before measurements, cells were dissociated with TrypLE (12604013; Thermo Fisher Scientific) and resuspended in HEPES-buffered cell culture medium (15630056; Thermo Fisher Scientific). Cell suspensions were loaded into the atomic force microscope sample chamber and a single cell was captured by pressing the cantilever onto the cell with a contact force of 500 pN for 1 min. The cell was lifted from the surface and allowed to establish firm adhesion on the cantilever for 5 min. To measure the cell-cell adhesion force, the captured cell was lowered to contact with another single cell cultured on a gelatin-coated glass-bottom Petri dish (FD35; WPI). To measure the cell-cadherin adhesion force, the captured cell was lowered to contact cadherin-coated cover slips. The approach and retraction speeds were kept constant at 10 μm s −1 with a contact force of 2 nN. Three force curves were acquired for each cell. The captured cell was left to recover for 3 min between different adhesion force measurement cycles before it was adhered to the surface in a different position. Before and after every single measurement, we checked that our probing cell remained on the cantilever by direct observation. Maximal cell adhesion forces as well as the single rupture force step height were extracted from retrace curves using JPK IP software.
Cell cortical stiffness measurements. The stiffness of cells was measured using an atomic force microscope (Bruker NanoScope) coupled to a confocal microscope (TCS SP5II; Leica), as described previously 50,51 . The point-and-shoot procedure (NanoScope software; Bruker) was used to measure cell stiffness. All cells were kept in CO 2 -independent cell culture medium during the measurement.
A fluorescent 10 μm polystyrene bead (Invitrogen) was glued to silicon nitride cantilevers with nominal spring constants of 0.06 N m −1 (NP-S type D; Bruker). Indentations were performed using the single force option with a total indentation depth of 50-100 nm. To obtain cell stiffness values from force curves, PUNIAS software was used as described previously 50,51 . Multiple force displacement curves (at five different locations) were fitted to the Hertz model to calculate cell cortical stiffness (Young's modulus).
Stem cell-derived ETX embryo generation. ETX embryos were generated as described previously 10 . Approximately 6000-7000 ES cells, 15,000-19,000 TS cells and 5000-6000 XEN cells were added dropwise into AggreWell plates having 1200 microwells in one well (34411; STEMCELL Technologies). The microwells were treated with rinsing solution (07010; STEMCELL Technologies). Cells were centrifuged at 100g for 3 min. 1.5 ml c-IDG medium containing 7.5 nM ROCK inhibitor (72304; STEMCELL Technologies) was added dropwise to each well. On the following day (day 1), 1 ml medium was removed gently from each well and replaced with 1 ml fresh c-IDG medium without ROCK inhibitor. This step was repeated once to fully remove the ROCK inhibitor. On day 2, 1 ml c-IDG medium was replaced with 1 ml fresh medium. On day 3, the media was replaced with IVC1 medium 10,24,52 Table 1.

RNA extraction and real-time qPCR.
Total RNA was extracted from cells using TRIzol Reagent (15596-026; Invitrogen). Real-time qPCR was performed with SYBR Green PCR Master Mix (4368708; Applied Biosystems) and StepOnePlus Real-Time PCR System (Applied Biosystems). The fold change in mRNA expression was determined using the ΔΔCt method with Gapdh as an endogenous control. For the qPCR primers used, see Supplementary Table 1.
scRNA-seq sample preparation and dissociation. Natural and ETX embryos were transferred to Falcon tubes, washed with PBS and incubated in TrypLE Express (12604013; Gibco) for 15 min at 37 °C to dissociate them into single cells. If clumps remained, the incubation was extended for an additional 5 min at 37 °C and the sample pipetted further. Samples were filtered to remove large clumps, centrifuged at 200g for 5 min and resuspended in PBST (containing 0.02% Tween 20) and then processed for encapsulation, as previously reported 29,53 . For E5.5 embryos, one litter of 12 embryos was dissociated together. A total of 15 ETX embryos were dissociated for sequencing. Cells in culture were dissociated into a single-cell suspension using TrypLE Express (12604013; Gibco) and multiplexed using MULTI-seq lipid-modified oligos before running on two 10X Genomics lanes using single-cell 3′ version 3 reagents as reported 54 .
scRNA-seq analysis. A previously submitted and filtered scRNA-seq dataset comprising the ETX and natural embryos was downloaded from the Gene Expression Omnibus repository (GSE161947) 29 . The count matrix was loaded into Seurat version 3 (ref. 55 ), the fraction of counts mapping to mitochondrial genes was computed and the object was then log-normalized to a scale factor of 10,000. The 2,000 most variable genes were computed, the object was scaled and the percentage of mitochondrial counts was regressed out. Dimensional reduction was performed with principal component analysis and the data were projected on a uniform manifold approximation and projection low-dimensional space using 20 principal components. The embryonic, endoderm and trophectoderm lineage identity was pooled from previous annotations 29 , corresponding to clusters with high Dnmt3b, Gata4 and Lamb1 and Cdx2 and Gata2 expression levels, respectively. The average expression was computed using the average expression function and the latter was log 2 normalized. The expression levels of cadherins and protocadherins were subsequently plotted on a heatmap. The uniform manifold approximation and projection plots were directly plotted using the methodology described recently 29 after keeping the ETX and natural embryo samples only and re-computing the neighbourhood graph (five neighbours and 30 principal components; code at https://github.com/fhlab/ scRNAseq_inducedETX).

Time-lapse imaging.
To perform time-lapse imaging, cells were seeded on Gri3D PEG-hydrogel dishes with glass bottoms (SUN Bioscience) and imaged under a spinning-disc microscope (3i) with a Zeiss EC Plan-NEOFLUAR 20×/0.5 objective in a humidified chamber at 37 °C with 5% CO 2 . The structures were imaged every 5-10 min by collecting image stacks of 10 μm z-planes. Images were processed using SlideBook 5.0 (3i). Raw data were processed using the open-source image analysis software Fiji. For single-cell tracking, Imaris image analysis software (Bitplane) was used.
Quantification and statistical analysis. Criteria for selecting ETX embryos. Egg cylinder structures with one TS-derived compartment and one ES-derived compartment, covered by an outside XEN-derived visceral endoderm-like monolayer were considered to be well-sorted ETX embryos for analysis. Structures that did not fulfil these criteria were considered to be missorted ETX structures. Structures containing all three types of cells were collected and counted for quantification.
Image data acquisition, processing and quantification. Fluorescence images were acquired using an inverted Leica SP8 confocal microscope (LEICA software LAS X; Leica Microsystems) with a Leica FLUOTAR VISIR 25× or 40× objective. Images were acquired with 0.5-3.0 μm z-separation. To screen entire structures, the tile-scan imaging mode with automatic image stitching of the SP8 confocal microscope was used. All images were analysed and processed using Fiji software (http://fiji.sc). For digital quantifications and immunofluorescence signal intensity graphs, laser power and detector gain were maintained constant to permit quantitative comparisons of different experimental conditions within a single experiment.
To evaluate cell-cell contact angles in 3D ETX and natural embryos, ImSAnE 13,14 was employed to extract planes of the embryos from 3D stacks of E-cadherin and unroll them into a two-dimensional projection. Different lineages were indicated by different nuclear markers during analysis. Geometric observables as well as general distortions in projections can be correctly quantified using built-in correction methods in MATLAB 14 .
Numerical simulations. CPM. A CPM 15 was used to infer the predicted distributions of conformations given measurements of cell adhesion from AFM, as well as to determine the roles of cortical stiffness on the self-organization of ETX embryos. We parameterized adhesion strengths using cohesion forces between pairs of cell types, which were directly measured by AFM (Supplementary Table 2). For each simulation, we sampled this distribution to build the adhesion (J) matrix. Specifically, for a given element in this matrix, we sampled (with replacement) the set of AFM cohesion forces measured between pairs of cell types (for example, ES-ES, ES-TS and so on), performed around 500 times to establish an ensemble of J matrix samples. Each J matrix sample was used to perform a CPM simulation, generating an ensemble distribution of conformations over time. Simulations evolve via a stochastic minimization of an energy function (see equation (1) in the Supplementary Information) that accounts for both differential affinity and other physical properties of cells. Simulations were scored at each time point for being one of the 16 possible sorted configurations (Fig. 2i) by determining whether each cell type was enveloping and/or contiguous (see Supplementary Information for details). To test for the importance of softness in XEN cell externalization, we varied the cortical stiffness parameter for XEN cells ( λ XEN P ) and repeated the above simulation procedure.
Statistics and reproducibility. Statistical tests were performed using GraphPad Prism (versions 8.0 and 7.0a) software (with the exception of the analysis of sequencing data). Data with a Gaussian distribution were analysed using a two-tailed unpaired Student's t-test (two groups) or one-way analysis of variance (ANOVA) (multiple groups) with Tukey's multiple comparison test. Significant differences in the variance were taken into account using Welch's correction. Data that did not have a Gaussian distribution were analysed using a Mann-Whitney U-test (two groups) or Kruskal-Wallis test (multiple groups) with Dunn's multiple comparison test. For all quantifications, a minimum of three independent experiments were performed. The in vitro cell experiments were not randomized as it was not necessary. For experiments with chemical inhibitors, samples were randomly allocated to control and experimental groups. Embryos were randomly allocated to control and experimental groups for the in vivo experiments. Data collection and analysis were not performed blind to the conditions of the experiments. No statistical method was used to predetermine sample sizes. Sample sizes were determined based on previous experimental experience. The sample sizes used to derive statistics are provided in each figure caption. No data Extended Data Fig. 2 | Differential adhesion force in ETX embryos. (a) representative images of cell doublets for homotypic and heterotypic cell pairs (green, Gata4; cyan, Tfap2c; gray, Oct4; red, F-actin). Experiments were repeated 3 times. Scale bar is 10 μm. (b) Use of ImSAnE 'Unrolling' algorithm to project 3D E-cadherin staining stacks onto a 2D plane. Cell contact angles were quantified using built-in correction methods. Geometric observables as well as generally distortions in projections can be correctly quantified. Scale bar is 100 μm. (c) Cell-cell contact angle measurements based on ImSAnE method in day 4 ETX and E5.5 natural embryos. Total measured cell pairs in ETX embryos: ES-ES: n = 24; TS-TS: n = 15; XEN-XEN: n = 16; ES-TS: n = 24; XEN-TS: n = 19; XEN-ES: n = 16; XENi-XENi: n = 16. Total measured cell pairs in natural embryos: EPI-EPI: n = 20; TE-TE: n = 17; VE-VE: n = 22; EPI-TE: n = 24; EPI-VE: n = 16; TE-VE: n = 19; VEi-VEi: n = 24. Data are presented as box-whisker plots, black line inside the box indicates the median value and the error bar shows min to max value. Statistics calculated by one-way ANOVA with a multiple comparison test. (d) Enlargement of the boundary area in a day4 ETX embryo stained with E-cadherin, with homotypic contacts highlighted in blue (TS-TS), red (ES-ES) and purple (XEN-XEN), and the heterophilic boundary interface in yellow. Angles formed at tricellular junctions between different types are indicated: EX, TX and ET, angles between heterotypic contacts (ES-XEN, TS-XEN and ES-TS); EE, TT and XX, angles between homotypic contacts (ES-ES, TS-TS and XEN-XEN). XXi indicates contact angles of XEN cells at cell-medium interface. Experiments were repeated 6 times. Scale bar represents 20 μm. (e) E-cadherin and P-cadherin mrNA expression in cells after downregulation of E-or P-cadherin by rNAi, scrambled sirNA was used as a control. P-cadherin mrNA expression in ES cells after overexpression of P-cadherin. N = 4 for all conditions. Data are presented as mean ± SD. Statistics calculated by unpaired two-tailed Student's t test. Source numerical data are available in source data.

NaTurE CEll Biology
Extended Data Fig. 3 | Differential cadherin code and cortical tension regulate self-organization in ETX embryos. (a) Time course of formation of correctly-sorted ETX embryos following seeding. 0.5-h: 0/515 structures; 12-h: 79/1292 structures; 24-h: 160/1074 structures; 48-h: 134/888; 72-h: 93/702 structures. N = 3 for each condition. Data are presented as Mean ± SD. Statistics calculated by unpaired two-tailed Student's t test. (b) Live cell imaging and tracking. H2B-rFP-XEN (green), H2B-CFP-ES (red) and EGFP-TS (blue) were overlaid with Imaris cell-tracking spheres. (c) Quantification of mobility for different types of cells during self-organization. Data are presented as Mean ± SD at different time points. (d) The bar graph shows the average mobility for different cell types during self-organization at different time ranges after cell seeding. Data are presented as Mean ± SEM. 12 structures from 3 independent experiments were imaged for quantification. Statistics calculated by unpaired two-tailed Student's t test. (e) Examples of structures made from low (control) and high number of XEN cells, stained at day-1 and day-3. Experiments were repeated 3 times. Scale bar, 10 μm. (f) Schematic of morphological transitions when using low and high number of XEN cells. (g) Cortical stiffness measurements for indicated cell types before and after treatment with Blebbistatin (Bleb). Total measured cell numbers for each condition: ES: n = 58; ES + Bleb: n = 34; TS: n = 68; TS + Bleb: n = 31; XEN: n = 68; XEN + Bleb: n = 35. Data are presented as Mean ± SD. Statistics calculated by ANOVA with a multiple comparison test. (h) Day 3 wellsorted ETX embryos were cultured with either blebbistatin, cytochalasin D or DMSO (control) during consolidation stage for 24 hrs and immuno-stained to reveal the indicated markers. Quantification shows the percentage of disorganized ETX structures. n = 84 (Bleb treated), n = 83 (Cyto D treated) and n = 75 (control), N = 3 for each condition. Data are presented as Mean ± SD. Statistics calculated by unpaired two-tailed Student's t test. Scale bar, 100 μm.
(i) CPM modelling shows the effect of XEN cell stiffness (λ P ) on externalization efficiency (N = 474). The sorting efficiency calculated for each time-point is plotted as a heat-map, overlayed with contours (white dotted lines). Source numerical data are available in source data.