N. Caitlin and . Spaulding, Formal analysis, Investigation, Visualization, Methodology, Writing-original draft, Writing-review and editing

H. L. Schreiber, I. V. , and D. Curation, Formal analysis, Investigation, Visualization, Methodology, Writing-original draft, Writing-review and editing; Weili Zheng, Data curation, Formal analysis, Investigation, Visualization, Writing-original draft, Writingreview and editing

W. Karen and . Dodson, Conceptualization, Formal analysis, Supervision, Investigation, Visualization, Methodology, Writing-original draft, Project administration, Writing-review and editing

J. E. Hazen-;-matt, S. Conover, and F. Wang, Investigation, Visualization, Writing-review and editing

P. Svenmarker, Data curation, Investigation, Visualization, Writing-review and editing

A. Luna-rico, Writing-review and editing; Olivera Francetic, Resources, Supervision, Investigation, Methodology, Writing-review and editing, Resources, Investigation

, Magnus Andersson, Resources, Supervision, Funding acquisition, Investigation, Visualization, Methodology, Writing-review and editing

S. Hultgren, Conceptualization, Resources, Formal analysis, Supervision, Funding acquisition, Methodology, Writing-original draft, Project administration, Writing-review and editing

. Edward-h-egelman, Formal analysis, Supervision, Funding acquisition, Visualization, Methodology, Writing-original draft, Project administration, Writing-review and editing Author ORCIDs Caitlin N Spaulding, Conceptualization, Resources

H. Schreiber,

, Pontus Svenmarker

A. Luna-rico,

, Olivera Francetic

, Magnus Andersson

. Spaulding, , vol.7, p.31662, 2018.

R. Abraham, S. N. Land, M. Ponniah, S. Endres, R. Hasty et al., Glycerol-induced unraveling of the tight helical conformation of Escherichia coli type 1 fimbriae, Journal of Bacteriology, vol.174, pp.5145-5148, 1992.

P. D. Adams, P. V. Afonine, G. Bunkó-czi, V. B. Chen, I. W. Davis et al., PHENIX: a comprehensive Python-based system for macromolecular structure solution, Acta Crystallographica Section D Biological Crystallography, vol.66, pp.213-221, 2010.

E. Amann, B. Ochs, and K. J. Abel, Tightly regulated tac promoter vectors useful for the expression of unfused and fused proteins in Escherichia coli, Gene, vol.69, pp.301-315, 1988.

E. Andersen-nissen, K. D. Smith, K. L. Strobe, S. L. Barrett, B. T. Cookson et al., Evasion of Tolllike receptor 5 by flagellated bacteria, PNAS, vol.102, pp.9247-9252, 2005.

G. G. Anderson, J. J. Palermo, J. D. Schilling, R. Roth, J. Heuser et al., Intracellular bacterial biofilm-like pods in urinary tract infections, Science, vol.301, pp.105-107, 2003.

M. Andersson, F. Czerwinski, and L. B. Oddershede, Optimizing active and passive calibration of optical tweezers, Journal of Optics, vol.13, p.44020, 2011.

M. Andersson, B. E. Uhlin, and E. Fä-llman, The biomechanical properties of E. coli pili for urinary tract attachment reflect the host environment, Biophysical Journal, vol.93, pp.3008-3014, 2007.

M. Andersson, , 2018.

M. Anisimova, R. Nielsen, and Z. Yang, Effect of recombination on the accuracy of the likelihood method for detecting positive selection at amino acid sites, Genetics, vol.164, pp.1229-1236, 2003.

P. Aprikian, G. Interlandi, B. A. Kidd, L. Trong, V. Tchesnokova et al., The bacterial fimbrial tip acts as a mechanical force sensor, PLoS Biology, vol.9, 2011.

N. Biais, D. L. Higashi, J. Brujic, M. So, and M. P. Sheetz, Force-dependent polymorphism in type IV pili reveals hidden epitopes, PNAS, vol.107, pp.11358-11363, 2010.

C. Camacho, G. Coulouris, V. Avagyan, N. Ma, J. Papadopoulos et al., BLAST+: architecture and applications, BMC Bioinformatics, vol.10, p.421, 2009.

V. B. Chen, W. B. Arendall, J. J. Headd, D. A. Keedy, R. M. Immormino et al., MolProbity: all-atom structure validation for macromolecular crystallography, Acta Crystallographica Section D Biological Crystallography, vol.66, pp.12-21, 2010.

M. D. Crespo, C. Puorger, M. A. Schä-rer, O. Eidam, M. G. Grü-tter et al., Quality control of disulfide bond formation in pilus subunits by the chaperone FimC, Nature Chemical Biology, vol.8, pp.707-713, 2012.

C. K. Cusumano, J. S. Pinkner, Z. Han, S. E. Greene, B. A. Ford et al., Treatment and prevention of urinary tract infection with orally active FimH inhibitors, Science Translational Medicine, vol.3, pp.109-115, 2011.

K. A. Datsenko and B. L. Wanner, One-step inactivation of chromosomal genes in Escherichia coli K-12 using PCR products, PNAS, vol.97, pp.6640-6645, 2000.

W. Delport, A. F. Poon, S. D. Frost, K. Pond, and S. L. , Datamonkey 2010: a suite of phylogenetic analysis tools for evolutionary biology, Bioinformatics, vol.26, pp.2455-2457, 2010.

F. Dimaio, Y. Song, X. Li, M. J. Brunner, C. Xu et al., Atomic-accuracy models from 4.5-Å cryo-electron microscopy data with density-guided iterative local refinement, Nature Methods, vol.12, pp.361-365, 2015.

Y. Dong, Y. Liu, W. Jiang, T. J. Smith, Z. Xu et al., Antibody-induced uncoating of human rhinovirus B14, PNAS, vol.114, pp.8017-8022, 2017.

R. C. Edgar, MUSCLE: multiple sequence alignment with high accuracy and high throughput, Nucleic Acids Research, vol.32, pp.1792-1797, 2004.

E. H. Egelman, A robust algorithm for the reconstruction of helical filaments using single-particle methods, Ultramicroscopy, vol.85, pp.225-234, 2000.

E. H. Egelman, The current revolution in cryo-EM, Biophysical Journal, vol.110, pp.1008-1012, 2016.

P. Emsley, B. Lohkamp, W. G. Scott, and K. Cowtan, Features and development of coot, Acta Crystallographica Section D Biological Crystallography, vol.66, pp.486-501, 2010.

S. A. Ferry, S. E. Holm, H. Stenlund, R. Lundholm, and T. J. Monsen, The natural course of uncomplicated lower urinary tract infection in women illustrated by a randomized placebo controlled study, Scandinavian Journal of Infectious Diseases, vol.36, pp.296-301, 2004.

R. D. Finn, J. Clements, W. Arndt, B. L. Miller, T. J. Wheeler et al., HMMER web server: 2015 update, Nucleic Acids Research, vol.43, pp.30-38, 2015.

B. Foxman, Urinary tract infection syndromes: occurrence, recurrence, bacteriology, risk factors, and disease burden, Infectious disease clinics of North America, vol.28, pp.1-13, 2014.

J. Frank, M. Radermacher, P. Penczek, J. Zhu, Y. Li et al., SPIDER and WEB: processing and visualization of images in 3D electron microscopy and related fields, Journal of Structural Biology, vol.116, pp.190-199, 1996.

V. E. Galkin, X. Yu, J. Bielnicki, J. Heuser, C. P. Ewing et al., Divergence of quaternary structures among bacterial flagellar filaments, Science, vol.320, pp.382-385, 2008.

S. E. Greene, M. E. Hibbing, J. Janetka, S. L. Chen, and S. J. Hultgren, Human urine decreases function and expression of type 1 Pili in uropathogenic Escherichia coli, vol.6, p.820, 2015.

M. Gui, W. Song, H. Zhou, J. Xu, S. Chen et al., Cryo-electron microscopy structures of the SARS-CoV spike glycoprotein reveal a prerequisite conformational state for receptor binding, Cell Research, vol.27, pp.119-129, 2017.

B. Habenstein, A. Loquet, S. Hwang, K. Giller, S. K. Vasa et al., Hybrid structure of the type 1 Pilus of uropathogenic Escherichia coli, Angewandte Chemie International Edition, vol.54, pp.11691-11695, 2015.

T. J. Hannan, I. U. Mysorekar, C. S. Hung, . Isaacson-schmid, . Ml et al., Early severe inflammatory responses to uropathogenic E. coli predispose to chronic and recurrent urinary tract infection, PLoS Pathogens, vol.6, p.1001042, 2010.

M. K. Hospenthal, A. Redzej, K. Dodson, M. Ukleja, B. Frenz et al., Structure of a chaperone-usher pilus reveals the molecular basis of rod uncoiling, Cell, vol.164, pp.269-278, 2016.

M. K. Hospenthal, D. Zyla, T. Costa, A. Redzej, C. Giese et al., The Cryoelectron microscopy structure of the type 1 chaperone-usher pilus Rod, Structure, vol.25, pp.1829-1838, 2017.

C. S. Hung, K. W. Dodson, and S. J. Hultgren, A murine model of urinary tract infection, Nature Protocols, vol.4, pp.1230-1243, 2009.

C. H. Jones, F. Jacob-dubuisson, K. Dodson, M. Kuehn, L. Slonim et al., Adhesin presentation in bacteria requires molecular chaperones and ushers, Infection and Immunity, vol.60, pp.4445-4451, 1992.

C. H. Jones, J. S. Pinkner, R. Roth, J. Heuser, A. V. Nicholes et al., FimH adhesin of type 1 pili is assembled into a fibrillar tip structure in the Enterobacteriaceae, PNAS, vol.92, pp.2081-2085, 1995.

S. S. Justice, C. Hung, J. A. Theriot, D. A. Fletcher, G. G. Anderson et al., Differentiation and developmental pathways of uropathogenic Escherichia coli in urinary tract pathogenesis, PNAS, vol.101, pp.1333-1338, 2004.

S. S. Justice, S. R. Lauer, S. J. Hultgren, and D. A. Hunstad, Maturation of intracellular Escherichia coli communities requires SurA, Infection and Immunity, vol.74, pp.4793-4800, 2006.

K. Katoh and D. M. Standley, MAFFT multiple sequence alignment software version 7: improvements in performance and usability, Molecular Biology and Evolution, vol.30, pp.772-780, 2013.

M. Kearse, R. Moir, A. Wilson, S. Stones-havas, M. Cheung et al., Geneious basic: an integrated and extendable desktop software platform for the organization and analysis of sequence data, Bioinformatics, vol.28, pp.1647-1649, 2012.

P. J. Kersey, J. E. Allen, I. Armean, S. Boddu, B. J. Bolt et al., Ensembl genomes 2016: more genomes, more complexity, Nucleic Acids Research, vol.44, pp.574-580, 2016.

V. Khetrapal, K. S. Mehershahi, S. Chen, and S. L. Chen, Application and optimization of relE as a negative selection marker for making definitive genetic constructs in uropathogenic escherichia coli, Pathogens, vol.5, p.9, 2016.

K. Pond, S. L. Frost, and S. D. , Not so different after all: a comparison of methods for detecting amino acid sites under selection, Molecular Biology and Evolution, vol.22, pp.1208-1222, 2005.

K. Pond, S. L. Murrell, B. Fourment, M. Frost, S. D. Delport et al., A random effects branchsite model for detecting episodic diversifying selection, Molecular Biology and Evolution, vol.28, pp.3033-3043, 2011.

K. Pond, S. L. Posada, D. Gravenor, M. B. Woelk, C. H. Frost et al., Automated phylogenetic detection of recombination using a genetic algorithm, Molecular Biology and Evolution, vol.23, pp.1891-1901, 2006.

M. Kostakioti, M. Hadjifrangiskou, C. K. Cusumano, T. J. Hannan, J. W. Janetka et al., Distinguishing the contribution of type 1 pili from that of other QseB-misregulated factors when QseC is absent during urinary tract infection, Infection and Immunity, vol.80, pp.2826-2834, 2012.

H. Lee, E. Popodi, H. Tang, and P. L. Foster, Rate and molecular spectrum of spontaneous mutations in the bacterium Escherichia coli as determined by whole-genome sequencing, PNAS, vol.109, pp.2774-2783, 2012.

J. Li, K. Nelson, A. C. Mcwhorter, T. S. Whittam, and R. K. Selander, Recombinational basis of serovar diversity in Salmonella enterica, PNAS, vol.91, pp.2552-2556, 1994.

X. Li, P. Mooney, S. Zheng, C. R. Booth, M. B. Braunfeld et al., Electron counting and beam-induced motion correction enable near-atomic-resolution single-particle cryo-EM, Nature Methods, vol.10, pp.584-590, 2013.

C. E. Mabeck, Treatment of uncomplicated urinary tract infection in non-pregnant women, Postgraduate Medical Journal, vol.48, pp.69-75, 1972.

J. J. Martinez, M. A. Mulvey, J. D. Schilling, J. S. Pinkner, and S. J. Hultgren, Type 1 pilus-mediated bacterial invasion of bladder epithelial cells, The EMBO Journal, vol.19, pp.2803-2812, 2000.

J. A. Mindell and N. Grigorieff, Accurate determination of local defocus and specimen tilt in electron microscopy, Journal of Structural Biology, vol.142, pp.334-347, 2003.

N. Mortezaei, B. Singh, E. Bullitt, B. E. Uhlin, and M. Andersson, P-fimbriae in the presence of anti-PapA antibodies: new insight of antibodies action against pathogens, Scientific Reports, vol.3, p.3393, 2013.

M. A. Mulvey, Y. S. Lopez-boado, C. L. Wilson, R. Roth, W. C. Parks et al., Induction and evasion of host defenses by type 1-piliated uropathogenic Escherichia coli, Science, vol.282, pp.1494-1497, 1998.

S. P. Nuccio and A. J. Bä-umler, Evolution of the chaperone/usher assembly pathway: fimbrial classification goes Greek, Microbiology and Molecular Biology Reviews, vol.71, pp.551-575, 2007.

E. F. Pettersen, T. D. Goddard, C. C. Huang, G. S. Couch, D. M. Greenblatt et al., UCSF Chimera-a visualization system for exploratory research and analysis, Journal of Computational Chemistry, vol.25, pp.1605-1612, 2004.

S. L. Pond and S. D. Frost, Datamonkey: rapid detection of selective pressure on individual sites of codon alignments, Bioinformatics, vol.21, pp.2531-2533, 2005.

. R-core-team, R: A language and environment for statistical computing, R Foundation for Statistical Computing, 2017.

S. H. Roh, C. F. Hryc, H. H. Jeong, X. Fei, J. Jakana et al., Subunit conformational variation within individual GroEL oligomers resolved by Cryo-EM, PNAS, vol.114, pp.8259-8264, 2017.

F. G. Sauer, K. Fü-tterer, J. S. Pinkner, K. W. Dodson, S. J. Hultgren et al., Structural basis of chaperone function and pilus biogenesis, Science, vol.285, pp.1058-1061, 1999.

F. G. Sauer, J. S. Pinkner, G. Waksman, and S. J. Hultgren, Chaperone priming of pilus subunits facilitates a topological transition that drives fiber formation, Cell, vol.111, issue.02, pp.1050-1054, 2002.

E. T. Saulino, E. Bullitt, and S. J. Hultgren, Snapshots of usher-mediated protein secretion and ordered pilus assembly, PNAS, vol.97, pp.9240-9245, 2000.

D. Scholes, T. M. Hooton, P. L. Roberts, A. E. Stapleton, K. Gupta et al., Risk factors for recurrent urinary tract infection in young women, The Journal of Infectious Diseases, vol.182, pp.1177-1182, 2000.

H. L. Schreiber, M. S. Conover, W. C. Chou, M. E. Hibbing, A. L. Manson et al., Bacterial virulence phenotypes of Escherichia coli and host susceptibility determine risk for urinary tract infections, Science Translational Medicine, vol.9, p.1283, 2017.

K. D. Smith and A. Ozinsky, Toll-like receptor-5 and the innate immune response to bacterial flagellin, Current Topics Microbiology and Immunology, vol.270, pp.93-108, 2002.

C. N. Spaulding and S. J. Hultgren, Adhesive Pili in UTI pathogenesis and drug development. Pathogens 5:30, 2016.

C. N. Spaulding, R. D. Klein, S. Ruer, A. L. Kau, H. L. Schreiber et al., Selective depletion of uropathogenic E. coli from the gut by a FimH antagonist, Nature, vol.546, pp.528-532, 2017.

A. Stamatakis, P. Hoover, and J. Rougemont, A rapid bootstrap algorithm for the RAxML Web servers, Systematic Biology, vol.57, pp.758-771, 2008.

A. Stamatakis, RAxML-VI-HPC: maximum likelihood-based phylogenetic analyses with thousands of taxa and mixed models, Bioinformatics, vol.22, pp.2688-2690, 2006.

S. Subramaniam, L. A. Earl, V. Falconieri, J. L. Milne, and E. H. Egelman, Resolution advances in cryo-EM enable application to drug discovery, Current Opinion in Structural Biology, vol.41, pp.194-202, 2016.

G. Tang, L. Peng, P. R. Baldwin, D. S. Mann, W. Jiang et al., EMAN2: an extensible image processing suite for electron microscopy, Journal of Structural Biology, vol.157, pp.38-46, 2007.

R. Team, . ;-r.-rstudio, . Inc, and M. A. Boston, RStudio: Integrated Development for, 2015.

O. Tenaillon, D. Skurnik, B. Picard, and E. Denamur, The population genetics of commensal Escherichia coli, Nature Reviews Microbiology, vol.8, pp.207-217, 2010.

S. F. Toli?--nørrelykke, E. Schä-ffer, J. Howard, F. S. Pavone, . Jü-licher-f et al., Calibration of optical tweezers with positional detection in the back focal plane, Review of Scientific Instruments, vol.77, p.103101, 2006.

J. Vonck and D. J. Mills, Advances in high-resolution cryo-EM of oligomeric enzymes, Current Opinion in Structural Biology, vol.46, pp.48-54, 2017.

M. J. Walczak, C. Puorger, R. Glockshuber, and G. Wider, Intramolecular donor strand complementation in the e. coli type 1 pilus subunit fima explains the existence of fima monomers as off-pathway products of pilus assembly that inhibit host cell apoptosis, Journal of Molecular Biology, vol.426, pp.542-549, 2014.

R. Y. Wang, M. Kudryashev, X. Li, E. H. Egelman, M. Basler et al., De novo protein structure determination from near-atomic-resolution cryo-EM maps, Nature Methods, vol.12, pp.335-338, 2015.

H. Wildschutte, D. M. Wolfe, A. Tamewitz, and J. G. Lawrence, Protozoan predation, diversifying selection, and the evolution of antigenic diversity in Salmonella, PNAS, vol.101, pp.10644-10649, 2004.

K. J. Wright, P. C. Seed, and S. J. Hultgren, Uropathogenic Escherichia coli flagella aid in efficient urinary tract colonization, Infection and Immunity, vol.73, pp.7657-7668, 2005.

K. J. Wright, P. C. Seed, and S. J. Hultgren, Development of intracellular bacterial communities of uropathogenic Escherichia coli depends on type 1 pili, Cellular Microbiology, vol.9, pp.2230-2241, 2007.

D. J. Wurpel, S. A. Beatson, M. Totsika, N. K. Petty, and M. A. Schembri, Chaperone-usher fimbriae of Escherichia coli, PLoS One, vol.8, p.52835, 2013.

J. Zakrisson, K. Wiklund, O. Axner, and M. Andersson, Helix-like biopolymers can act as dampers of force for bacteria in flows, European Biophysics Journal, vol.41, pp.551-560, 2012.

H. M. Zowawi, P. N. Harris, M. J. Roberts, P. A. Tambyah, M. A. Schembri et al., The emerging threat of multidrug-resistant Gram-negative bacteria in urology, Nature Reviews Urology, vol.12, pp.570-584, 2015.