Abstract
A diverse array of bacteria species naturally self-organize into durable macroscale patterns on solid surfaces via swarming motility—a highly coordinated and rapid movement of bacteria powered by flagella. Engineering swarming is an untapped opportunity to increase the scale and robustness of coordinated synthetic microbial systems. Here we engineer Proteus mirabilis, which natively forms centimeter-scale bullseye swarm patterns, to ‘write’ external inputs into visible spatial records. Specifically, we engineer tunable expression of swarming-related genes that modify pattern features, and we develop quantitative approaches to decoding. Next, we develop a dual-input system that modulates two swarming-related genes simultaneously, and we separately show that growing colonies can record dynamic environmental changes. We decode the resulting multicondition patterns with deep classification and segmentation models. Finally, we engineer a strain that records the presence of aqueous copper. This work creates an approach for building macroscale bacterial recorders, expanding the framework for engineering emergent microbial behaviors.

This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$32.99 / 30 days
cancel any time
Subscribe to this journal
Receive 12 print issues and online access
$259.00 per year
only $21.58 per issue
Buy this article
- Purchase on SpringerLink
- Instant access to full article PDF
Prices may be subject to local taxes which are calculated during checkout




Similar content being viewed by others
Data availability
Compressed folders of lower-resolution versions of the images generated and analyzed during this study are uploaded on GitHub and publicly available at https://github.com/daninolab/proteus-mirabilis-engineered, DOI: 10.5281/zenodo.7637609; the time-lapses are uploaded as videos. The full, several-hundred-gigabyte dataset of the original high-resolution images is not publicly available due to large file sizes preventing them from being stored on GitHub. The high-resolution images are available for sharing upon request from the corresponding author (T.D.).
Code availability
The codes used in this study are deposited at GitHub at https://github.com/daninolab/proteus-mirabilis-engineered, https://doi.org/10.5281/zenodo.7637609.
References
Schuerle, S. et al. Synthetic and living micropropellers for convection-enhanced nanoparticle transport. Sci. Adv. 5, eaav4803 (2019).
Rubenstein, M., Cornejo, A. & Nagpal, R. Programmable self-assembly in a thousand-robot swarm. Science 345, 795–799 (2014).
Kearns, D. B. A field guide to bacterial swarming motility. Nat. Rev. Microbiol. 8, 634–644 (2010).
Ingham, C. J. & Jacob, E. B. Swarming and complex pattern formation in Paenibacillus vortex studied by imaging and tracking cells. BMC Microbiol. 8, 36–36 (2008).
Rauprich, O. et al. Periodic phenomena in Proteus mirabilis swarm colony development. J. Bacteriol. 178, 6525 (1996).
Kohler, T., Curty, L. K., Barja, F., van Delden, C. & Pechere, J. C. Swarming of Pseudomonas aeruginosa is dependent on cell-to-cell signaling and requires flagella and pili. J. Bacteriol. 182, 5990–5996 (2000).
Fujikawa, H. & Matsushita, M. Fractal growth of Bacillus subtilis on agar plates. J. Phys. Soc. Jpn. 58, 3875–3878 (1989).
Prindle, A. et al. A sensing array of radically coupled genetic ‘biopixels’. Nature 481, 39–44 (2012).
Barbier, I., Kusumawardhani, H. & Schaerli, Y. Engineering synthetic spatial patterns in microbial populations and communities. Curr. Opin. Microbiol. 67, 102149 (2022).
Lu, J., Şimşek, E., Silver, A. & You, L. Advances and challenges in programming pattern formation using living cells. Curr. Opin. Chem. Biol. 68, 102147 (2022).
Basu, S., Gerchman, Y., Collins, C. H., Arnold, F. H. & Weiss, R. A synthetic multicellular system for programmed pattern formation. Nature 434, 1130–1134 (2005).
Liu, C. et al. Sequential establishment of stripe patterns in an expanding cell population. Science 334, 238–241 (2011).
Curatolo, A. et al. Cooperative pattern formation in multi-component bacterial systems through reciprocal motility regulation. Nat. Phys. 16, 1152–1157 (2020).
Kim, H. et al. 4-bit adhesion logic enables universal multicellular interface patterning. Nature 608, 324–329 (2022).
Sheth, R. U., Yim, S. S., Wu, F. L. & Wang, H. H. Multiplex recording of cellular events over time on CRISPR biological tape. Science 358, 1457–1461 (2017).
Frieda, K. L. et al. Synthetic recording and in situ readout of lineage information in single cells. Nature 541, 107–111 (2017).
Shipman, S. L., Nivala, J., Macklis, J. D. & Church, G. M. CRISPR–Cas encoding of a digital movie into the genomes of a population of living bacteria. Nature 547, 345–349 (2017).
Riglar, D. T. et al. Bacterial variability in the mammalian gut captured by a single-cell synthetic oscillator. Nat. Commun. 10, 4665 (2019).
Lu, J. et al. Distributed information encoding and decoding using self-organized spatial patterns. Patterns 3, 100590 (2022).
Schaffer, J. N. & Pearson, M. M. Proteus mirabilis and urinary tract infections. Microbiol. Spectr. 3, (2015).
Cook, E. R. & Pederson, N. Dendroclimatology, pp. 77–112 (Springer, 2011).
Hauser, G., Uber Faulnisbakterien und deren Beziehung zur Septicamie (FCW Vogel, 1885).
Saak, C. C., Gibbs, K. A. & DiRita, V. J. The self-identity protein IdsD is communicated between cells in swarming Proteus mirabilis colonies. J. Bacteriol. 198, 3278–3286 (2016).
Fraser, G. M. & Hughes, C. Swarming motility. Curr. Opin. Microbiol. 2, 630–635 (1999).
Howery, K. E., Simsek, E., Kim, M. & Rather, P. N. Positive autoregulation of the flhDC operon in Proteus mirabilis. Res. Microbiol. 169, 199–204 (2018).
Pearson, M. M., Rasko, D. A., Smith, S. N. & Mobley, H. L. Transcriptome of swarming Proteus mirabilis. Infect. Immun. 78, 2834–2845 (2010).
Şimşek, E., Dawson, E., Rather, P. N. & Kim, M. Spatial regulation of cell motility and its fitness effect in a surface-attached bacterial community. ISME J. 16, 1004–1011 (2022).
Armbruster, C. E., Hodges, S. A. & Mobley, H. L. Initiation of swarming motility by Proteus mirabilis occurs in response to specific cues present in urine and requires excess L-glutamine. J. Bacteriol. 195, 1305–1319 (2013).
Little, K., Austerman, J., Zheng, J. & Gibbs, K. A. Cell shape and population migration are distinct steps of Proteus mirabilis swarming that are decoupled on high-percentage agar. J. Bacteriol. 201, e00726-18 (2019).
Burall, L. S. et al. Proteus mirabilis genes that contribute to pathogenesis of urinary tract infection: identification of 25 signature-tagged mutants attenuated at least 100-fold. Infect. Immun. 72, 2922–2938 (2004).
Huang, Z., Pan, X., Xu, N. & Guo, M. Bacterial chemotaxis coupling protein: structure, function and diversity. Microbiol. Res. 219, 40–48 (2019).
Dufour, A., Furness, R. B. & Hughes, C. Novel genes that upregulate the Proteus mirabilis flhDC master operon controlling flagellar biogenesis and swarming. Mol. Microbiol. 29, 741–751 (1998).
Hay, N. A., Tipper, D. J., Gygi, D. & Hughes, C. A nonswarming mutant of Proteus mirabilis lacks the Lrp global transcriptional regulator. J. Bacteriol. 179, 4741–4746 (1997).
Clemmer, K. M. & Rather, P. N. The Lon protease regulates swarming motility and virulence gene expression in Proteus mirabilis. J. Med. Microbiol. 57, 931–937 (2008).
Gygi, D., Fraser, G., Dufour, A. & Hughes, C. A motile but non-swarming mutant of Proteus mirabilis lacks FlgN, a facilitator of flagella filament assembly. Mol. Microbiol. 25, 597–604 (1997).
Morgenstein, R. M. & Rather, P. N. Role of the Umo proteins and the Rcs phosphorelay in the swarming motility of the wild type and an O-antigen (waaL) mutant of Proteus mirabilis. J. Bacteriol. 194, 669–676 (2012).
Russakovsky, O. et al. Imagenet large scale visual recognition challenge. Int. J. Comput. Vis. 115, 211–252 (2015).
Navab, N., Hornegger, J., Wells, W., Frangi, A. (eds). U-net: convolutional networks for biomedical image segmentation. International Conference on Medical Image Computing and Computer-Assisted Intervention, Vol. 9351 (Springer, 2015).
Liu, C. et al. Engineering whole-cell microbial biosensors: design principles and applications in monitoring and treatment of heavy metals and organic pollutants. Biotechnol. Adv. 60, 108019 (2022).
Hicks, M., Bachmann, T. T. & Wang, B. Synthetic biology enables programmable cell‐based biosensors. ChemPhysChem 21, 132–144 (2020).
EPA. National primary drinking water regulations. https://www.epa.gov/ground-water-and-drinking-water/national-primary-drinking-water-regulations#Inorganic (2023).
Kang, Y. et al. Enhancing the copper-sensing capability of Escherichia coli-based whole-cell bioreporters by genetic engineering. Appl. Microbiol. Biotechnol. 102, 1513–1521 (2018).
Casado-García, Á. et al. MotilityJ: an open-source tool for the classification and segmentation of bacteria on motility images. Comput. Biol. Med. 136, 104673 (2021).
Kim, H. J., Jeong, H. & Lee, S. J. Synthetic biology for microbial heavy metal biosensors. Anal. Bioanal. Chem. 410, 1191–1203 (2018).
Chen, J. X. et al. Redesign of ultrasensitive and robust RecA gene circuit to sense DNA damage. Microb. Biotechnol. 14, 2481–2496 (2021).
Chen, X. J., Wang, B., Thompson, I. P. & Huang, W. E. Rational design and characterization of nitric oxide biosensors in E. coli Nissle 1917 and Mini SimCells. ACS Synth. Biol. 10, 2566–2578 (2021).
Kearns, D. B. & Losick, R. Swarming motility in undomesticated Bacillus subtilis. Mol. Microbiol. 49, 581–590 (2003).
Dietrich, L. E., Teal, T. K., Price-Whelan, A. & Newman, D. K. Redox-active antibiotics control gene expression and community behavior in divergent bacteria. Science 321, 1203–1206 (2008).
Rodrigo-Navarro, A., Sankaran, S., Dalby, M. J., del Campo, A. & Salmeron-Sanchez, M. Engineered living biomaterials. Nat. Rev. Mater. 6, 1175–1190 (2021).
Cubillos-Ruiz, A. et al. Engineering living therapeutics with synthetic biology. Nat. Rev. Drug Discov. 20, 941–960 (2021).
Minogue, T. et al. Draft genome assemblies of Proteus mirabilis ATCC 7002 and Proteus vulgaris ATCC 49132. Genome Announc. 2, e01064-14 (2014).
Pearson, M. M. (ed.), Proteus mirabilis: Methods and Protocols, pp. 15–25 (Springer, 2019).
Doshi, A. et al. A deep learning pipeline for segmentation of Proteus mirabilis colony patterns. Proceedings of the IEEE 19th International Symposium on Biomedical Imaging (ISBI), pp. 1–5 (IEEE, 2022).
Hand, D. J. & Till, R. J. A simple generalisation of the area under the ROC curve for multiple class classification problems. Mach. Learn. 45, 171–186 (2001).
Baumberg, S. & Roberts, M. Anomalous expression of the E. coli lac operon in Proteus mirabilis. Mol. Gen. Genet. 198, 166–171 (1984).
Acknowledgements
We thank M. Pavlicova (Columbia University) for the helpful discussion of the statistical methods used. We thank the members of the Danino laboratory for review of the manuscript. We thank S. Li (Columbia University) for assisting in metal-sensing experiments and image processing. This work was supported by an NSF CAREER Award (1847356 to T.D.), Blavatnik Fund for Innovations in Health (T.D.), and NSF Graduate Research Fellowship (DGE-2036197 to A.D., Fellow ID 2018264757).
Author information
Authors and Affiliations
Contributions
A.D. and T.D. conceived and designed the study. A.D., M.S., R.T., R.M. and S.M. conducted the experiments as follows: A.D. constructed the engineered strains with assistance from M.S. and R.T.; A.D., M.S. and S.M. established the initial swarm assay protocols; A.D., M.S., R.T., R.M. and S.M. performed swarm assays and time-lapses with single- and dual-input strains; A.D., M.S. and R.T. performed the condition-switching experiments and A.D. and M.S. performed the metal-sensing experiments. A.D. and M.S. performed the image-processing-based computational analysis, with assistance in preprocessing (image flattening) from R.T. and R.M. M.S. performed the deep segmentation work with U-Nets and temperature experiment classification work with Transformer models along with the power analysis, A.D. performed the dual-input strain regression work and AUC work and A.D. (Berkeley) performed the dual-input strain classification and attribution visualization, all with input from J.G. and A.L. A.D. and T.D. wrote the original manuscript draft, and A.D., M.S. and T.D. edited the manuscript with input from all authors.
Corresponding author
Ethics declarations
Competing interests
A.D., M.S., J.G., A.L. and T.D. are named as inventors on a provisional patent application that has been filed by Columbia University with the US Patent and Trademark Office related to all aspects of this work. The remaining authors declare no competing interests.
Peer review
Peer review information
Nature Chemical Biology thanks Mark Isalan and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended data
Extended Data Fig. 1 Selection of conditions.
a. Representative colony images for different P. mirabilis strains, temperatures, and agar hardness after 24 hours of growth. b. Heatmaps of radially averaged profiles of PM7002 colonies at a range of IPTG concentrations (each profile represents an individual colony). Light green represents lowest pixel intensity (highest colony density), arbitrary units. c. PM7002 with pTac-gfp plasmid was grown at a range of kanamycin concentrations for 24 hours. Representative images of fluorescence taken under blue-light transilluminator are shown.
Extended Data Fig. 2 Induction of pLac promoter in P. mirabilis.
a. Fresh overnight cultures of PM7002 with pLac-gfp plasmid were subcultured with 50 μg/ml kanamycin, grown for 0–8 hours, and induced with a range of IPTG concentrations. The mean GFP intensity (arbitrary units, shown as the line plot) after subtracting background fluorescence and normalizing to OD600 is plotted for each group; error bars indicate standard deviation (n = 3 for each). Bottom right panel: Peak fold change in fluorescence from uninduced (0 mM IPTG) groups is plotted for each group induced at a different time after subculturing (symbols represent mean of three replicate wells, individual data shown in (a). Maximal expression of around 3-fold was consistent with literature55. b. Images of PM7002 pLac-gfp strain plates grown with either 0 or 1 mM IPTG, imaged after 24 hours under blue-light transilluminator. c. 24-hour colony radii of pLac-gfp strain at various concentrations of IPTG; each dot represents a plate. Plate images are from different days.
Extended Data Fig. 3 Image processing.
a. Petri dishes were scanned at high resolution. The Petri rim was identified and cropped out using MATLAB functions. Images were thresholded to show only the colony inoculum, and the center point was identified using MATLAB functions. Images were converted from Cartesian to polar coordinates with interpolation, and the flattened images were used for subsequent analysis. See Supplementary Note on Computational Methods for details. b. A representative raw image and enhanced-contrast version showing the adjustment which was made for images shown in figures.
Extended Data Fig. 4 Range of patterns formed.
a. PM7002 strains with indicated inducible swarm plasmids were grown for 24 hours at a range of IPTG concentrations. Representative images of three replicates are shown. b. Closeups of patterns formed at 0 mM IPTG.
Extended Data Fig. 5 Quantification of engineered colony patterns.
a. Quantification of aspects of colony patterns of engineered strains at increasing IPTG concentrations, measured as in Fig. 2e-g and as shown in the schematics below each graph. All strains had at least n = 3 plates measured at each IPTG concentration. Error bars represent standard error of the mean (s.e.m). b. Confusion matrices of the fitted models’ performance on each dataset; matrices are labeled with numbers of plate sectors (see Supplementary Note on Methods for details). Classes 1–3 represent 0 up to but not including 1 mM IPTG, 1 up to but not including 5 mM IPTG, and 5 up to and including 10 mM IPTG.
Extended Data Fig. 6 Dynamics of pattern formation.
Plots of dynamic characteristics of engineered strains vs IPTG concentration, measured from one to two time-lapses per condition, per strain. Individual dots represent individual time-lapses (lag times) or individual phases in all time-lapses (consolidation and swarm phase lengths, swarm speeds). Lines represent the mean of these individual measurements. Middle swarm and consolidation phase lengths were determined by discarding the measurements of the first and last of these phases for each time-lapse, or discarding the last phase if the time-lapse had only two of the given phase.
Extended Data Fig. 7 Performance of CNNs on classification and regression tasks.
a. Training and validation accuracy and loss for a CNN model which had three convolutional/max pooling blocks, trained on the dataset of images of the dual-input strain at various IPTG and arabinose conditions (same dataset as in Fig. 4f). b. Fine-tuning of three architectures pretrained on ImageNet; righthand panels represent models’ ability to identify the correct image class within its top three predicted classes. c. Learning curves of EfficientNet model trained on the dual-input pattern images with regression output. Loss = mean squared error; mean absolute error shown for further detail. d. Predictions of the trained model evaluated on images not seen in the original training dataset. Dotted lines represent location where predictions would match the true values. Error bars represent root mean squared error on the predictions for each given concentration.
Extended Data Fig. 8 Visual IPTG readout is robust to natural water samples.
a. Proposed controls for natural samples. b. Representative images of colonies grown with either river water only or river water with 5 mM IPTG throughout the plate. c. Representative images of colonies grown with natural water sample spots with and without IPTG (1 M) as indicated. Schematic indicates location of natural water droplets on plate relative to colony inoculum.
Extended Data Fig. 9 Qualitative and quantitative IPTG readouts are robust to growth at different temperatures.
a. Representative images of colonies grown at the indicated temperature. Each pair of 0 and 10 mM IPTG colonies of a given strain were collected on the same day. b. Width of the first colony ring of the pLac-flgM strain grown at the indicated conditions. n = 10 plates (37 °C, 0 IPTG); 9 plates (37 °C, 10 mM IPTG); 4 plates (36 °C, 0 IPTG); and 5 plates each at (36 °C, 10 mM IPTG), (34 °C, 0 mM IPTG), and (34 °C, 10 mM IPTG). Error bars represent s.e.m. P = 2.42e-06 (37 °C), 3.59e-03 (36 °C), and 0.001 (34 °C) for the comparison between 0 vs 10 mM IPTG, calculated with a two-tailed t-test. c. Learning processes of the SwinTransformer model variants for classifying pLac-cheW images acquired at 37 °C into low vs high IPTG (curves legend: ‘PM’ = P. mirabilis-pretrained, ‘IM’ = ImageNet-pretrained; ‘FFT’ = fully fine-tuned, ‘PFT’ = partially fine-tuned; ‘Aug’ = trained with augmentations). Confusion matrix shows absolute, pooled accuracy of the highest-performing model (PM PFT) evaluated on the held-out test set of 37 °C, 36 °C, and 34 °C pLac-cheW images. Numbers on the matrix indicate number of images in the given category.
Extended Data Fig. 10 Engineering metal-sensing strains of P. mirabilis.
a. Maximum fold change of GFP, expressed from either pCopA or pCadA, achieved over the course of 17 hours at the indicated concentration normalized to uninduced wells, in plate reader. b. GFP fluorescence at 17 hours (end of experiment) for each concentration of each metal by strain. GFP fluorescence was calculated by subtracting background fluorescence value and dividing the raw fluorescence value by the media-background-subtracted OD600 value for the same well. In (a) and (b) dots represent individual wells. c. Colony radius of the copper-induced side of the plates, as shown in Fig. 4k. d. Lefthand plot: mean of the middle ring widths (that is, neither innermost nor outermost) of the colonies on the sides with copper. Each open circle represents a separate plate. Righthand plot: the same measurements normalized to the same day gfp strain’s measured mean widths at the given concentration. (c) and (d) show alternative representations of the data plotted in Fig. 4l; as in that figure, n = 9, 9, 6, and 9 plates for each of the two strains at 0, 10, 25, and 50 mM copper, respectively. Data are presented as mean values +/− standard deviation.
Supplementary information
Supplementary Information
Supplementary Figs. 1–6, Supplementary Video, Supplementary Tables 1–6, Supplementary Note on Computational Methods and Supplementary References.
Supplementary Video
Time-lapse video of engineered strains and gfp control, with images captured every 10 min as described in Methods. All plates contained 10 mM IPTG. Images were downsampled x0.25 in video to reduce file size but used at full size during analysis.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Doshi, A., Shaw, M., Tonea, R. et al. Engineered bacterial swarm patterns as spatial records of environmental inputs. Nat Chem Biol 19, 878–886 (2023). https://doi.org/10.1038/s41589-023-01325-2
Received:
Accepted:
Published:
Issue date:
DOI: https://doi.org/10.1038/s41589-023-01325-2