Mechanically resolved imaging of bacteria using expansion microscopy

Imaging dense and diverse microbial communities has broad applications in basic microbiology and medicine, but remains a grand challenge due to the fact that many species adopt similar morphologies. While prior studies have relied on techniques involving spectral labeling, we have developed an expansion microscopy method (μExM) in which bacterial cells are physically expanded prior to imaging. We find that expansion patterns depend on the structural and mechanical properties of the cell wall, which vary across species and conditions. We use this phenomenon as a quantitative and sensitive phenotypic imaging contrast orthogonal to spectral separation to resolve bacterial cells of different species or in distinct physiological states. Focusing on host–microbe interactions that are difficult to quantify through fluorescence alone, we demonstrate the ability of μExM to distinguish species through an in vitro defined community of human gut commensals and in vivo imaging of a model gut microbiota, and to sensitively detect cell-envelope damage caused by antibiotics or previously unrecognized cell-to-cell phenotypic heterogeneity among pathogenic bacteria as they infect macrophages.


Introduction
Imaging of heterogeneous bacterial populations has broad applications in understanding the complex microbiota that exist on and within our bodies, as well as complex host-microbial interfaces, yet remains a significant challenge due to the lack of suitable tools for distinguishing species and identifying altered physiological states [1][2][3]. Analyses to date have mostly relied on spectral separation using fluorescence in situ hybridization (FISH) with probes designed to target 16S RNA sequences specific to certain taxa [4], or genetically engineered microbes that express distinct fluorescent proteins [5]. However, these methods are generally insensitive to physiological changes in bacterial cells that are often modulated by host environments and believed to be critical for the growth and spatial organizations of microbes [6,7].
The bacterial cell wall is a macromolecule responsible for shape determination in virtually all bacteria. Although little is known about the molecular architecture of the cell wall in most non-model organisms, its dimensions can vary widely, with the wall typically thick (tens of nanometers [8,9]) in gram-positive species and thin (approximately 2 to 4 nm [10]) in gramnegative species, and wall rigidity can vary across Young's moduli of between 10 and 100 MPa [11,12]. The cell wall also has various biochemical compositions [13] and exhibits distinct spatial patterns of cross-linking density [14], molecular organization [15,16], thickness [8,9], and stiffness [11,12], all of which depend on species and cell physiology. Thus, cell wall mechanics can potentially provide a contrast that is orthogonal to spectral separation in distinguishing species and even cellular physiological states. However, while cell wall structure and mechanics have been measured by electron microscopy and atomic force microscopy [8,10,17], these methods are low-throughput and incompatible with dense bacterial populations or in vivo applications.
To address this challenge, we develop a new method that extends the application of expansion microscopy (ExM) to bacteria, particularly in the contexts of multispecies communities and infection. ExM is a recently developed optical imaging method that was designed to provide superior resolution to traditional fluorescence imaging, but its applications to bacteria have so far been limited [18,19]. ExM relies on simple chemistry, in which biomolecules are anchored to a swellable polyelectrolyte hydrogel network, and then cell membranes are permeabilized by detergents while proteins are digested by proteases to produce homogenous mechanical properties across the sample. The hydrogel networks are then expanded in pure water through osmotic forces and electrostatic repulsion between polyelectrolyte chains. The expanded sample can be imaged using conventional optical microscopy and digitally compressed to gain resolution. While prior studies have focused on achieving uniform expansion of samples, primarily in mammalian cell and animal tissues [19][20][21], we posited that differences in the expandability of the bacterial cell wall, which would not be digested through typical ExM protocols, could provide imaging contrast that reflects its molecular structure and distinct mechanical properties.
In this study, we show that the peptidoglycan cell wall requires additional treatments to be broken down for expansion. We demonstrate, with both in vitro and in vivo applications, that the contrast in cell wall expandability is sufficient to resolve different bacterial species within complex and dense communities. In addition, this method is sensitive enough to detect cell wall damages caused by antibiotics or host defensive responses that are otherwise difficult to capture using traditional imaging methods. We anticipate that this method will enable future research in three major areas: (1) super-resolution imaging of bacterial subcellular components [22] without the need for expensive optics or special fluorophores, (2) high-content imaging that integrates both spectral and mechanical contrasts to dissect complex microbial communities, and (3) in vivo phenotyping of cell wall mechanics and integrity [23].

Expansion provides quantitative imaging contrast to distinguish bacterial species
To test whether the cell wall indeed restricts expansion in ExM, we imaged a mixture of two common symbiotic bacteria isolated from the gut of the fruit fly Drosophila melanogaster, Acetobacter tropicalis (green fluorescent protein [GFP] labeled), and Lactobacillus plantarum (mCherry labeled) [24] using a standard ExM protocol (Fig 1A, top) [25]. We quantified the expansion ratio of individual cells based on cell width, because width can be measured precisely regardless of cellular orientation in three dimensions. We found that A. tropicalis and L. plantarum cells only expanded approximately 1.9-and 1.2-fold, respectively (Fig 1B, top), both of which were smaller than the 4-fold expansion expected from previous characterizations of ExM [19,25].
We then digested the wall using lysozyme from chicken egg white or mutanolysin from Streptomyces globisporus, after permeabilizing the cell membrane with methanol. Both enzymes are muramidases that cleave 1,4-beta-linkages between N-acetylmuramic acid and Nacetyl-D-glucosamine residues in the cell wall but differ in mechanism of action and activity [28]. Overnight lysozyme treatment enhanced the contrast in expansion ratios between species (Fig 1A and 1B, bottom left): A. tropicalis cells were fully expanded approximately 4-fold, whereas L. plantarum cells were largely unaffected. By contrast, mutanolysin treatment led to 4-fold expansion of both species (Fig 1A and 1B, bottom right). The uniform expansion enabled us to resolve individual cells in densely packed mixed colonies of the two species while preserving their relative positions (Fig 1C-1E). plantarum and GFP-A. tropicalis. Top: untreated cells pre-and post-expansion using the original ExM protocol; bottom left: cells treated with lysozyme to partially digest the bacterial cell wall before expansion; bottom right: cells treated with mutanolysin to fully digest the cell wall before expansion. Dark area at the center of the cells is occupied by condensed chromosome [26,27]. Insets: magnified views to show cell size differences. (B) Quantification of cell width distributions before and after expansion for representative microbial species. Lysozyme treatment maximizes the contrast in expansion between species, while mutanolysin treatment expands all species approximately 4-fold. When fluorescently labeled strains were not available, we measured the expansion ratio using DNA staining. Plus sign (+) and minus sign (−) denote gram-positive and gram-negative, respectively. All histograms were generated using data collected from at least five maximum intensity projection images from at least two independent experiments. The data underlying this figure are included in S1 Data. (C) Pre-expansion image of a microcolony of mCherry-L. plantarum and GFP-A. tropicalis. (D) Magnified view of the region highlighted by the dashed box in (C) before expansion (left) and after mutanolysin treatment and expansion (right). The scale bar in the post-expansion image has been rescaled to match the pre-expansion dimensions. (E) Cross-sectional normalized fluorescence intensity profiles of the regions highlighted by the boxes in (D), showing that μExM preserves the relative positions of cells (peaks in the orange and red curves overlap). The data underlying this figure are included in S2 Data. All images are maximum intensity projections. Scale bars, 10 μm in (A), 5 μm in (C) and (D). ExM, expansion microscopy; GFP, green fluorescent protein; μExM, expansion microscopy of microbes; norm., normalized.
Next, we tested whether these findings could be extended to other commensal species from the human gut. We applied the method to nine species, including Acidaminococcus intestini, Bacteroides finegoldii, Bacteroides ovatus, Bifidobacterium breve, Citrobacter sp., Clostridium innocuum, Escherichia coli, Parabacteroides distasonis, and Salmonella enterica. These species were chosen to include gram-positives and gram-negatives. For all species, the expansion ratios were approximately 4-fold after mutanolysin treatment, whereas the ratios after lysozyme treatment varied widely (Fig 1B, bottom left), particularly among gram-negatives. They were generally larger for all gram-negative species than for gram-positives ( Table 1 and S1 Fig). Together, these results indicate that the extent of breakdown of the cell wall determines the expansion of bacterial cells, and the expansion ratio provides quantitative and fine resolution in distinguishing species beyond the traditional classification of gram-negatives and gram-positives. Henceforth, we refer to this method involving lysozyme or mutanolysin digestion as μExM, expansion microscopy of microbes.
Our findings suggest that μExM both improves imaging resolution, as shown in previous studies [19][20][21]25], and provides an additional imaging contrast associated with cell wall mechanical properties that is orthogonal to spectral separation commonly used in fluorescence microscopy. Moreover, this contrast can be amplified by partial wall digestion using lysozyme. We posited that in some cases, the contrast in expansion should be sufficient to distinguish between microbial species with differing cell wall properties (Fig 2A). For example, the postlysozyme expansion ratio distributions of four species, L. plantarum, E. coli, A. tropicalis, and A. intestini, were clearly distinct, despite the variation across cells of the same genotype ( Fig  1B, bottom left). To further test our hypothesis, we chose three human commensal species (B. breve, B. ovatus, and Citrobacter sp.), as they are of similar pre-expansion size and morphology and thus difficult to distinguish by traditional methods. Importantly, all these strains are currently not amenable to genetic transformation, and therefore species-specific fluorescent-protein labeling has not been possible. Following lysozyme treatment and expansion, the three species can be easily separated based on post-expansion size using DNA staining ( Table 1 and Fig 2B). This size-dependent expansion allowed us to quantify precisely their abundance in both mixed populations (Fig 2C) and cocultured communities (Fig 2D), as validated through colony-forming unit (CFU) measurements. These results demonstrate the utility of μExM for studying the assembly and growth of mixed bacterial populations.

Expansion detects cell wall damage induced by antibiotics with high sensitivity
Given that expansion is dependent upon cell wall properties, we reasoned that μExM should also reveal different expansion phenotypes in cells grown under conditions that generate cell wall damage. Vancomycin is an antibiotic that binds to peptidoglycan precursors and prevents their cross-linking to the existing cell wall. While E. coli and most gram-negative bacteria are typically resistant to vancomycin, the imp4213 allele in the lptD gene disrupts synthesis of the lipopolysaccharide component of the outer membrane, leading to a permeable outer membrane and increased sensitivity to vancomycin [29]. Our previous results showed that vancomycin treatment of imp4213 cells leads to the formation of pores in the cell wall, from which the inner membrane and cytoplasm eventually escape when the pore size increases sufficiently [15]. Before the point of this blebbing, it is difficult to detect the level of damage using existing light microscopy techniques. We first treated imp4213 cells for 10 min with 1 μg mL −1 vancomycin; at this early time point, cells did not exhibit any morphological changes due to drug treatment. Unlike untreated controls that remained unexpanded (Fig 3A), expansion of vancomycin-treated imp4213 cells showed a striking pattern: surrounding the unexpanded cytoplasm (GFP labeled) was a halo of DNA (TO-PRO-3 labeled) that occupied a space with a width approximately 4 times that of an unexpanded cell (Fig 3B and 3C). We interpret this pattern as the translocation of DNA through pores in the cell wall during expansion (Fig 3D). As the hydrogel network contained within the cell wall is unable to expand with the surrounding network, an extracellular cavity with low-density networks is created that lowers the effective chemical potential and drives the DNA to spread into this cavity (Fig 3E). We estimate the minimum chemical potential difference required for the spontaneous translocation of E. coli DNA to be approximately 0.5 k B T (Materials, Methods, and Models), which is comparable to the thermal energy. This calculation indicates that DNA translocation is a sensitive measure of cell wall damage, as the DNA chain should always escape the confinement of the cell wall as long as the pore size grows to approximately 100 nm (the Kuhn length of DNA). The size of these pores would be below the diffraction limit and thus invisible using conventional optical approaches.
Using DNA translocation as the readout, we quantified the fraction of cells with damaged cell wall as a function of both vancomycin treatment time and concentration. Our results suggest that vancomycin-induced cell wall damage occurs more rapidly than previously appreciated [15]: the fraction of imp4213 cells undergoing DNA translocation after expansion increased in the first 5 min of treatment and was approximately constant thereafter (Fig 3F). The level of cell wall damage detected by μExM was also concentration dependent, supporting the conclusion that the DNA translocation is a direct result of vancomycin treatment (Fig 3H). Interestingly, the fraction of cells showing DNA translocation plateaued at approximately 30%, indicating a heterogeneous response to vancomycin even at high concentrations. Overall, our results suggest that μExM can be used as a sensitive and quantitative assay to detect cell wall damage.

μExM resolves bacterial species within a model animal gut microbiota
To demonstrate the utility of expansion as an imaging contrast, we focused on two applications: (1) in vivo imaging to resolve bacterial species in an animal gut, particularly when strain-specific fluorescent tags may not be available or are limited by host tissue autofluorescence (Fig 4), and (2) detection of cell wall disruption in situ when pathogenic bacteria are under attack from host defense mechanisms (Fig 5). In both cases, traditional spectral contrast in fluorescence microscopy would be insufficient, while μExM reveals new biological insights.
First, we colonized the gut of a model organism, the planarian flatworm Schmidtea mediterranea [30,31], with E. coli and L. plantarum, both expressing mCherry (S2 Fig). Use of mCherry was prudent as planarian tissues have strong autofluorescence below 560 nm, limiting the utility of other fluorescent proteins such as GFP or YFP that spectrally overlap with the autofluorescence (S3 Fig). The bacteria were introduced by feeding the planarian with a calf liver-bacteria mixture (Materials, Methods, and Models), after which colonization was allowed to stabilize for 3 d (Fig 4A). The planarians were then fixed and imaged using the μExM protocol optimized for planarian tissues (S4 Fig). Before expansion, bacterial cells in the planarian gut were barely resolvable (Fig 4B and  4C). Expansion clearly revealed the borders of individual cells, as distances between cells increased (Fig 4D and S4 Fig) and the optical clearing of planarian tissues improved the signal-to-noise ratio (S4 Fig). Moreover, the two species became distinguishable after lysozyme treatment and expansion (Fig 4E); individual cell widths split into two populations corresponding to E. coli (approximately 2-fold expanded) and L. plantarum (mostly unexpanded) (Fig 4F, left). Single-species in vivo controls verified that there is little to no overlap between the two populations (Fig 4F, right). While expansion ratios were robust across replicate experiments, we noted secondary but statistically significant (p < 0.0001) differences in expansion ratios of E. coli cells between our in vitro (mean ± SEM, 2.21 ± 0.04) and in vivo (2.06 ± 0.01) measurements, supporting the idea that the environmental factors (e.g., pH, temperature, oxygen level, etc.) in the planarian gut may induce changes in cell wall structure during bacterial colonization. Nonetheless, this difference is small relative to the interspecies comparisons. We quantified the relative abundances of the two species early during colonization and found that they correlated well with those of the initial mixture fed to the planarians (Fig 4G). Together, this application demonstrates that μExM can provide quantitative measures of the species composition of defined gut microbiotas, a critical step toward resolving the key factors that determine compositional dynamics [24,32]. μExM reveals previously unrecognized cell-to-cell phenotypic heterogeneity among pathogenic bacteria during infection Next, we investigated Salmonella cells during macrophage infection. The fate of Salmonella after entering macrophages is known to be heterogeneous: some cells survive and proliferate, whereas others lyse in the harsh intracellular environment [33][34][35]. Previous studies have suggested that variations in Salmonella cell wall structure may play an important role in heterogeneous infection outcomes [36], but it has been challenging to measure such phenotypic variations in situ.
We used μExM to image GFP-Salmonella cells engulfed by RAW264.7 macrophages, costaining DNA with DAPI. We observed two types of heterogeneity. First, expansion of individual Salmonella cells exhibited two distinct states (Fig 5A and 5B): some cells remained whereas others exhibited an expansion pattern similar to E. coli imp4213 cells after vancomycin treatment (Fig 3), suggesting the presence of submicrometer pores in the cell wall, through which DNA escaped during expansion to form a halo around the unexpanded cytoplasm ( Fig  5C). Second, the fraction of DNA-expanded Salmonella cells varied drastically between individual macrophages (Fig 5D). The observed heterogeneity was consistent across time points postinfection. These observations reveal stochasticity in the fate of Salmonella cells during macrophage infection.

Discussion
Here, we develop an ExM method (μExM) for bacteria and demonstrate that expansion patterns are determined by cell wall structural properties. We use this phenomenon as a nonconventional imaging contrast and demonstrate the utility of μExM via in vivo imaging of gut microbial communities and detection of cell-to-cell heterogeneity among pathogenic bacteria as they infect macrophages. We expect this method to spur new research in three major areas.
First, we have shown that in order to be applicable to microbiology, ExM must be modified to predigest the bacterial cell wall with specific enzymes such as mutanolysin to achieve full, uniform expansion. It has been demonstrated that ExM is compatible with conventional antibodies [21,25,37] and RNA FISH [20]; therefore, μExM is readily adaptable to image nanometer-scale ultrastructures in bacterial cells that are under the diffraction limit of optical imaging. Subcellular organization in bacterial cells is a field of active discovery [38], but super-resolution information has thus far been accessible only through specialized equipment [22,39,40]. μExM should open up new applications and provide technical convenience in this burgeoning research area. Moreover, recent progress [41,42] has integrated ExM with other super-resolution imaging techniques (e.g., stimulated emission depletion microscopy [STED], structured illumination microscopy [SIM]) for further improved "ultra" resolution, suggesting μExM may have the opportunity to overcome current resolution limits in imaging bacterial ultrastructures.
More importantly, beyond the established strengths of ExM (i.e., improved spatial resolution and high signal-to-noise ratio), the differential expansion between cells with partially digested cell walls offers a new imaging contrast that is orthogonal to spectral separation in standard fluorescence microscopy using FISH probes, chemical modification, antibodies, or fluorescent proteins. Currently, many bacterial species are considered genetically intractable and hence cannot be transformed for strain-specific labeling, while FISH experiments are often technically challenging. With three relevant applications (in vitro communities of human commensal bacteria, in vivo gut imaging, and macrophage infection), we have demonstrated that the contrast in expansion is quantitative and sensitive enough to resolve cells of different species in a mixed population or in distinct physiological states, which are otherwise difficult to capture using traditional imaging methods. As μExM does not require any special microscopy instrumentation, it can be easily integrated with other optical methods for highcontent multimodal imaging. For example, combining expansion and spectral labeling may enable concurrent tracking of dozens of microbial species in a complex community or detecting intermediate states as cells undergo physiological changes. We thus anticipate μExM will have broad applications in studies of complex bacterial communities in microbiota, biofilms, and at host-microbe interfaces.
Finally, while cell wall stiffness can be measured using direct mechanical methods (e.g., atomic force microscopy [43] or Brillouin microscopy [44]), these methods are not applicable to cells in dense populations and in vivo conditions. μExM can quantitatively evaluate cellular phenotypes in vivo and in situ under various genetic, chemical, or physical perturbations. These perturbations can include, for instance, genetic disruption of cell wall synthesis or chemical stresses such as antibiotic treatment [15,45], pH changes, and osmotic shock. μExM phenotypes depend on the rupture point of the cell envelope, which is highly relevant to perturbations meant to disrupt the mechanical integrity of bacterial cells such as antibiotics. Future investigations should highlight the power of μExM for comparing cell wall phenotypes both in isolated cells and within a dense, complex community. With the recent discovery of microscale spatial organization in the human microbiota [4,23], μExM will be a powerful tool for revealing how spatial neighborhoods modulate cellular phenotypes.

Bacterial sample preparation
Bacterial strains and culture conditions used in this study are summarized in Table 1. For in vitro samples, cells were collected from overnight cultures via centrifugation at 2,000g for 5 min, washed twice in PBS, and fixed in PBS containing 4% formaldehyde and 1% NP-40 for 10 min. After fixation, cells were washed in PBS and then resuspended in PBST (PBS supplemented with 0.3% Triton X-100) for 30 min at room temperature. As optical density (OD) is unreliable in determining bacterial number densities across species, we quantified relative cell number densities through spreading 10 μL of DAPI-stained suspension between a coverslip and a glass slide and counting cells in 5 images (field of view = 440 μm × 330 μm) using epifluorescence microscopy. The resuspended bacteria were sequentially dehydrated in 50:50% methanol:PBST and then pure methanol to remove lipids. Dehydrated cells can be kept at −20˚C for several months.
For vancomycin treatment, E. coli imp4213 cells were grown to early stationary phase (OD 600 = 0.8) and incubated in media containing vancomycin (Sigma-Aldrich, St. Louis, MO) at 37˚C before fixation. We focused on cells during the early stationary phase because we noticed large cell-to-cell variations in expansion between dividing cells during exponential growth.

CFU measurements of bacterial cocultures
To quantify relative bacterial abundances, serial dilutions of cocultures were plated on two different media to count the CFUs of individual species in the mixture. Citrobacter sp. and B. ovatus were enumerated by plating on GAM supplemented with menadione and hemin and growing for 2 d at 37˚C anaerobically. B. ovatus was differentiated from Citrobacter sp. on GAM by its formation of small pinprick colonies. B. breve was counted by plating the coculture on MRS media and growing for 2 d at 37˚C anaerobically. B. breve was distinguished from Citrobacter sp. on MRS by its formation of opaque white colonies.

Planarian sample preparation
Asexual S. mediterranea planarians were maintained at 20˚C in ultrapure water supplemented with 0.5 g L −1 Instant Ocean salts and 0.1 g L −1 NaHCO 3 and were fed calf liver paste once or twice weekly. To colonize the planarian gut with bacteria, planarians were starved for at least 7 d, then fed with 250 μL calf liver paste mixed with 50 μL of a mixture of L. plantarum and E. coli cells, which were collected from 5-mL cultures in early stationary phase (OD 600 = 0.8-1.0) and concentrated in 1 mL of PBS. After 3 d, individual planarians were collected into separate tubes and fixed individually (to avoid clumping) in PBST containing 4% formaldehyde and 1% NP-40 for 2 h at room temperature. The fixed planarians were washed in PBST, dehydrated in 50:50% methanol:PBST followed by pure methanol, and stored at −20˚C.
To label muscle fibers using immunofluorescence, planarians were killed by 2% HCl for 5 min and then fixed in 4% formaldehyde with 1% NP-40 for 2 h at room temperature. Samples were rinsed briefly in PBST and bleached overnight at room temperature with 6% H 2 O 2 in PBST under bright light. The planarians were rinsed with PBST, blocked in PBST supplemented with 1% (w/v) BSA (PBSTB) for 4 h at room temperature, and then incubated with the antibody 6G10 (DSHB, 1:1,000 dilutions in PBSTB) for 12-15 h at 4˚C [46]. At least 6 washes of 20 min each with PBST were carried out prior to adding the peroxidase-conjugated secondary anti-mouse antibody (Jackson ImmunoResearch, West Grove, PA) at a 1:1,000 dilution in PBSTB. After overnight incubation at 4˚C, samples were extensively washed in PBSTB. Tyramide signal amplification was performed by incubating planarians for 10 min in homemade TAMRA-conjugated tyramide in 100 mM borate buffer (pH = 8.5) supplemented with 2 M NaCl, 0.003% H 2 O 2 , and 20 μg mL −1 4-iodophenylboronic acid.

Macrophage sample preparation
To infect macrophages with Salmonella, RAW264.7 cells were plated at 500,000 cells/well on coverslips coated with fibronectin (10 μg mL −1 for 30 min) in 6-well plates and allowed to attach overnight. Cells were rinsed three times with Fluorobrite DMEM media (ThermoFisher Scientific, Waltham, MA) supplemented with 10 mM HEPES, 1% FBS, and 2 mM L-glutamine. Overnight cultures of Salmonella were diluted in Fluorobrite DMEM media and added to wells at a 1,250:1 multiplicity of infection (MOI). The plate was centrifuged (200g) for 15 min at 34˚C. Infected macrophages were washed twice to remove extra bacteria, and 1 mL of medium containing 10 μg mL −1 gentamicin was added to each well. Cells were cultured at 37˚C under 5% CO 2 for 3-9 h, then fixed in PBS containing 4% formaldehyde and 1% NP-40 for 10 min. After fixation, cells were dehydrated in methanol and stored at −20˚C.
After cell wall digestion, the μExM protocol follows a sequence of gelation, proteinase K digestion, and expansion, as previously described [25]. Briefly, samples were rinsed three times with PBS, then incubated for 1 h in a PBS solution of 1 mM methacrylic acid N-hydroxysuccinimide ester (MA-NHS; Sigma-Aldrich, St. Louis, MO), freshly diluted from a 1 M MA-NHS stock in DMSO. After rigorous washes with PBS, bacterial cells were collected through centrifugation and resuspended in monomer solution (1× PBS, 2 M NaCl, 8.625% [w/w] sodium acrylate, 2.5% [w/w] acrylamide, 0.15% [w/w] N,N 0 -methylenebisacrylamide) for 1 min before gelation. Similarly, macrophages on coverslips and planarian tissue were incubated in the monomer solution for 1 min and 45 min at 4˚C before gelation, respectively.
Gelation was performed in chambers that were assembled using #1.5 coverslips as spacers placed between microscope slides. Gelation was initiated by adding ammonium persulfate stock (10% [w/w] in monomer solution, ThermoFisher Scientific, Waltham, MA) and tetramethylethylenediamine (10% [w/w] in monomer solution, ThermoFisher Scientific, Waltham, MA) to the final concentration of 0.2% (w/w). For planarian tissues and macrophage samples, 4-hydroxy-2,2,6,6-tetramethylpiperidin-1-oxyl (4-hydroxy-TEMPO, Sigma-Aldrich, St. Louis, MO) was added from a 0.5% (w/w) stock solution to a final concentration of 0.01% (w/w) to inhibit gelation during the diffusion of monomers into tissues. Gelation was completed by incubation at 37˚C for 1-2 h. During this process, bacterial cells typically sedimented to the bottom of the gel.
After gelation, excess gel around tissue samples was removed, and then gelled samples were gently removed from the chamber and digested overnight at 37˚C in 8 U mL −1 proteinase K (NEB, Ipswich, MA) diluted in digestion buffer (1× TAE buffer, 0.5% Triton X-100, 0.8 M guanidine HCl). Gels were then removed from digestion buffer and placed in excess Milli-Q water to expand. Water was exchanged every 15 min 3-5 times until the size of the expanded gels plateaued. To stain DNA, expanded samples were incubated with 100 μM DAPI or 1 μM TO-PRO-3 for 30 min.
Fluorescence confocal imaging was performed on a Zeiss LSM 800 using either a 20× (N.A. = 1.0, working distance = 1.8 mm) water-immersion objective (W Plan-Apochromat) or a 40× (N.A. = 1.1, working distance = 0.62 mm) water-immersion objective (LD C-Apochromat Corr M27). Expanded samples were mounted in imaging chambers assembled from iSpacer (3.0-mm deep, Sunjin lab, Hsinchu City, Taiwan) sandwiched between two coverslips. To avoid lateral drift during image acquisition, the expanded gels were immobilized on the coverslip using a small amount of epoxy adhesive (3 M, Maplewood, MN) applied around the gel. To image a large area, tiled images were stitched using either Zen (Zeiss, Oberkochen, Germany) or FIJI software. Maximum intensity projection images were generated using built-in functions. The FIJI plugin "MorphoLibJ" was used for the morphological segmentation of bacterial cells [48]. After segmentation, a custom MATLAB script was used to measure aspect ratio and cell width. Cell width was computed along the short axis and averaged at five locations evenly spaced along the long axis.

Estimate of chemical potential for spontaneous translocation of DNA from cell wall confinement
We model the translocation of a DNA chain through a pore in the cell wall to consist of two primary steps. First, we assume that one end of the DNA is anchored near the pore. The anchoring energy and the loss of conformational entropy due to the localization of the chain end give rise to a free energy barrier of the form [49] where ε is the anchoring energy, R is the confinement radius (essentially equivalent to the radius of the cell), a is the range of anchoring near the pore, and v is the volume of the anchored segment. This free energy barrier must be overcome to initialize translocation. Because the anchoring energy depends on the details of the pore and the way it interacts with the anchored segment, it is impractical to evaluate exactly the numerical value of this barrier. Nonetheless, it is apparent that stronger confinement (smaller R) lowers the barrier height. Moreover, the presence of multiple pores in the cell wall that are sufficiently large for translocation increases the probability that the DNA is anchored at such a pore. The second step concerns the actual translocation. After anchoring, the DNA chain diffuses along its backbone, outwards or inwards, across the pore. At any instant, one particular segment (labeled m) is anchored at the pore, reducing the conformational entropy of the DNA chain (Fig 2D). By treating the chain as a Gaussian random walk, the free energy associated with this entropy loss can be obtained in terms of a series summation [50]. In the limit of strong confinement (i.e., when R is smaller than the radius of gyration of the DNA, R g ), the ground-state dominance approximation [49] leads to the following expression for the free energy as a function of m: where N is the total number of segments and Δμ is the difference in chemical potential of each segment outside and inside the cell. The first and second terms come from the conformational entropies of the two half-chains outside and inside the cell, respectively. Note that the free energy depends on the confinement through the ratio R/R g . We evaluated the free energy difference ΔF(m) � F(m)−F(1) (Fig 2E) for the nucleoid confined inside a bacterial cell. We set the radius of the cell to be R = 1 μm and the length of DNA to be that of the E. coli genome, which is 4.7 Mbp giving a contour length L of 1.596 mm. Using 1 nm as the radius of the cross section, we estimate that the DNA fills approximately 0.1% of the intracellular volume, and hence crowding should not substantially hinder segmental motions. Estimating the Kuhn length of DNA at l K = 100 nm, we find the number of Kuhn segments N = L/l K = 15,980 and the radius of gyration R g = N 1/2 l k = 5.2 μm. As a result, the DNA is strongly confined, with R/R g = 0.19.
The salient feature of our model across chemical potential differences Δμ is the existence of a single, entropic barrier for molecular translocation (Fig 2E). This barrier originates from the entropy loss associated with translocating the first few segments outside the pore, in addition to those originally anchored inside. Once this entropic barrier is overcome, the free energy decays monotonically with m, and DNA translocation proceeds spontaneously. Differentiating the free energy leads to a cubic equation for the location of the barrier, m � , which shows that m � depends on the confinement size R/l K and on the chemical potential difference Δμ, but not on the DNA length N. In particular, for Δμ = 0, m � = 0.23(R/l k ) 2 ; in this case, for R = 1 μm, m � = 23, indicating that 23 Kuhn segments (equivalent to approximately 6.7 kbp) need to be successfully translocated via diffusive motion along the chain contour before the whole chain spontaneously escapes the confinement.
Lowering the segmental chemical potential outside the cell reduces m � and lowers the height of the barrier (Fig 2E). As external localization becomes sufficiently friendly (lower Δμ), the entropic barrier may disappear altogether. By setting m � = 1, we identified that such a transition occurs when where z c ¼ ffi ffi