Introduction

Cell-cell interactions are crucial in shaping the intricate structures of microbiomes and facilitating essential functions, including genetic exchange, metabolite transfer, and cellular stress responses. The ability to engineer and manipulate such multicellular arrangements not only enhances our understanding of microbial communities but also serves as a basis for developing synthetic platforms, which can enable the development of functional microbial consortia with diverse biotechnological applications1,2. For example, multicellular bioconversion represents an area of significant scientific interest, whereby spatially organized microbial communities efficiently convert complex substrates into valuable products3,4. Moreover, drawing inspiration from natural biofilms, self-repairing living biomaterials with cell-cell adhesion properties show regenerative capabilities and display improved resilience3,5. Furthermore, engineered intercellular adhesion could have profound impacts on targeted manipulations within complex microbial populations, enabling precise and efficient interventions against specific bacteria6,7,8.

Recent progress in the field of directed cell-cell adhesion has involved the use of bacteria displaying synthetic cell adhesion molecules (CAMs), such as nanobody-antigen or coiled-coil peptide pairs, to facilitate intercellular binding9,10,11. These strategies are a rational approach for programming multi-microbial materials. However, despite their potential, certain limitations persist due to restrictions in the number of effective binding pairs that can be deployed for cell-cell adhesion purposes. The current development bottleneck arises from using conventional methods to identify potential binders, such as phage- or yeast-display selection, which were not originally designed to identify functional CAMs for bacteria. These methods often present challenges, including 1) poor expression or insufficient display of selected molecules on bacterial surfaces; and 2) reduced binding affinity due to interference from bacterial surface components, such as other membrane proteins or extracellular polysaccharides6,7. Consequently, the laborious process of testing functional CAMs for suitable display on bacterial surfaces is a primary obstacle in the design of engineered microbial communities9,10.

To address this challenge, we sought to develop a high-throughput screening platform for the identification of functional CAMs with the following properties: i) stable display on the bacterial surface; ii) targeting of surface antigens in their native conformations; and iii) the ability to mediate intercellular adhesions between bacteria. A whole-cell-based platform has the potential to meet these requirements by screening surface-displayed CAMs against bacterial cells harboring target membrane protein antigens. Similar strategies have been implemented to isolate binders against mammalian membrane proteins in their native forms12,13. However, analogous platforms for targeting bacterial membrane proteins are limited.

In this study, we have developed a directed evolution workflow based on a whole-cell screening approach, aimed at enriching for CAM-displaying cells by using antigen-expressing bacteria as bait. To avoid spontaneous cell aggregates derived from non-specific intercellular binding, our workflow incorporates a positive feedback mechanism at each panning stage, exploiting the contact-dependent DNA delivery nanomachine that operates between interacting bacteria, i.e., the type IV secretion system (T4SS) (Fig. 1a). T4SS is a widespread pathway that naturally conjugates genetic material from donor to recipient cells through direct cell-cell interactions. This secretion system is known to target cells with low specificity unless a strong and stable mating junction forms between bacteria14. Elegant works by Robledo et al. and Li et al. demonstrated that such mating pairs could be achieved by synthetic cell-cell adhesions, promoting target bacterial conjugation even under fluid conditions when cell-cell contacts are transient7,8. Therefore, we posited that the selective properties of T4SS, mediated by synthetic CAMs, could effectively facilitate conjugative transfer of desired genes, such as antibiotic-resistance markers, allowing transconjugants to survive on selective media during the selection process. We anticipated that this approach would result in a positive enrichment for bacteria displaying cognate CAMs from synthetic nanobody libraries (Fig. 1b).

Fig. 1: Establishment of the whole-cell-based CAM discovery platform in liquid medium.
figure 1

a Schematic of the strategy for facilitating precise DNA conjugation between specific cells through synthetic cell-cell adhesion. Bacteria expressing diverse nanobodies (Nb) and conjugative cells with surface antigens (Ag) are involved. b The whole-cell-based selection platform is designed to identify nanobody CAMs targeting specific antigens of interest. Conjugative cells expressing the target antigen and cells displaying the nanobody library are employed. Within a liquid culture, contact-dependent DNA conjugation is enhanced through strong binding between cognate nanobodies and antigen pairs (both labeled in blue). After conjugation, antibiotics are used to eliminate conjugative cells and recipients expressing non-nanobody binders. After a single round of selection, transconjugants carrying nanobodies with a relatively strong binding affinity toward the target antigens are enriched. c Conjugation frequencies (transconjugants/total recipients) of conjugative plasmids (pGenR, pAmpR, and pTmpR) were assessed under both solid and liquid growth conditions for a 6 h duration. E. coli S17-1 serves as the conjugative donor strain, and MG1655 serves as the recipient strain. d Conjugation frequency of pGenR under the liquid growth condition. Recipient cells expressing nanobodies were co-cultured with donor cells displaying cognate or orthogonal antigens. Data are presented as means ± SD. n = 3 biological replicates with three technical replicates each. Asterisks indicate statistically significant differences between the indicated mean values (p < 0.05, two-tailed t-test). See also Supplementary Fig. 1. Source data are provided as a Source Data file.

Here, we demonstrate the application of our whole-cell screening platform to identify functional CAMs that recognize three distinct surface-localized proteins—TraN, OmpA, and OmpC—in their native conformations. We show that mounting these nanobody CAMs on bacterial surfaces not only induces pronounced bacterial cell-cell adhesion but also directs the antibacterial activity of the T6SS of programmed inhibitor cells (PICs) toward target bacteria in mixed populations6. By providing a means to engineer tailored interactions between bacteria, our platform opens up possibilities for the development of advanced synthetic applications in basic research, biotechnology, and clinical settings.

Results

Facilitating selective gene transfer in mixed populations through synthetic cell-cell adhesion

We began by establishing a selection platform aimed at achieving targeted gene transfers within mixed bacterial populations. This platform relied on the utilization of conjugative donor cells equipped with surface exposed antigens that could distinguish recipient cells displaying cognate binders from those displaying non-cognate controls. This discerning recognition enabled selective gene transfer events within the mixed population, as depicted in Fig. 1a. For proof-of-concept experiments, we employed characterized antigen (Ag)—nanobody (Nb) pairs in conjunction with a previously developed intimin display system9,15 (Supplementary Fig. 1a).

Our initial assessments involved testing the feasibility of this strategy using Escherichia coli S17-1 strain (ATCC 47055), a genetically manipulable bacterium with active conjugation ability under standard laboratory conditions. Consistent with previous findings, S17-1 with rigid pili inefficiently transferred antibiotic-resistance markers on mobilizable genetic elements to susceptible recipients in liquid media (Fig. 1c), where cell-cell interactions are transient16,17. However, the conjugation frequency was significantly enhanced (100–1000-fold) when intercellular contacts were enforced by bacterial growth on solid agar plates. The enhancement in conjugation frequency was not observed for an S17-1 strain with a dysfunctional T4SS (∆trbE) for both liquid and solid conditions18 (Supplementary Fig. 1b).

Next, we introduced antigen and nanobody expression systems into the conjugative donor and recipient strains, respectively. To enable comparative analyses, we incorporated two distinct characterized cell adhesion binding pairs, namely Ag1-Nb1 and AgInt-NbIB109,19. Conjugation frequencies of S17-1 were markedly increased in liquid cultures when recipient cells displayed cognate nanobodies, whereas only mild effects were detected for non-cognate nanobodies (Fig. 1d). Importantly, this selective gene transfer phenomenon was contingent on T4SS being functional within the S17-1 strain (Supplementary Fig. 1c). These results support the notion that Ag-Nb-mediated cell-cell adhesion plays an important role in directing the T4SS toward recipient cells when cell-cell interactions are unstable in liquid culture.

Iterative selection enables discriminative enrichment for low-abundance bacteria displaying cognate nanobodies

A hallmark of our devised workflow is its capacity to differentially interact with target and non-target cells. To explore this feature further, we subjected antigen (Ag1)-displaying conjugative bacteria to recipient cells expressing matched nanobodies (Nb1) across varying degrees of dilution in the presence of cells expressing a non-matched control. Under these conditions, we detected an enhanced conjugation frequency to recipients when control cells outnumbered target cells by factors of 10-, 100-, and 1000-fold (Fig. 2a). The enrichment for cells expressing matched nanobodies (Nb1) was further verified by diagnostic PCR and sequencing (Supplementary Fig. 2a, b). However, we noted that when the target cells were diluted 10,000-fold in the initial pool, no statistically significant difference in conjugation frequency was observed, indicating an upper limit for this discriminant capability (Fig. 2a).

Fig. 2: Iterative rounds of bio-panning enhance the discriminant capacity of the CAM selection platform.
figure 2

a Conjugation frequency of pGenR in conjugation assays within liquid culture between recipient and donor displaying Ag1 or Control (without antigen displayed). The recipient culture expressing Nb1 was 10-, 100-, 1000-, and 10,000-fold diluted with the culture expressing non-matched null cells. b Schematic of three-round selection. For each round, donors (yellow) carry plasmids containing antibiotic-resistance genes against gentamicin (GenR), ampicillin (AmpR), or trimethoprim (TmpR) as distinct selection markers. The cartoon illustration on the right represents the progressive increase in the abundance of recipient cells displaying Nb1 (blue) in a mixed population with non-matched null cells (grey) during the selection process. c Conjugation frequency in two rounds of bio-panning. The initial population of recipient cells expressing Nb1 and null cells were mixed at a ratio of 1:105. d Conjugation frequency in three rounds of bio-panning. The initial population of recipient cells expressing Nb1 and null cells were mixed at a ratio of 1:107. Data are presented as means ± SD. n = 3 biological replicates with three technical replicates each. Asterisks indicate statistically significant differences between the indicated mean values (p < 0.05, two-tailed t-test). See also Supplementary Fig. 2. Source data are provided as a Source Data file.

Central to our selection strategy is the screening of a library comprising a minimum of 107 distinct nanobody clones. Given this objective, we postulated that iterative rounds of bio-panning could overcome the dilution threshold. Therefore, we harvested transconjugants from the first round of selection and introduced them to a new round of conjugation and selection, using distinct mobilizable antibiotic-resistance markers (Fig. 2b). After two rounds of selection, transconjugants having matched nanobody (Nb1) were enriched from a pool of cells initially mixed at a ratio of 1:105 (Nb1:null) (Fig. 2c, Supplementary Fig. 2c), and three rounds of bio-panning resulted in successful isolation from a population of cells initially mixed at a ratio of 1:107 (Nb1:null) (Fig. 2d, Supplementary Fig. 2d). These outcomes demonstrate the capacity of our designed workflow to exhibit notable specificity towards low-abundance target cells within mixed bacterial populations.

Discovery of a nanobody targeting the natural adhesin TraN

Building on the success of our selection workflow, next, we sought to determine if our approach could yield nanobody clones capable of targeting protein antigens naturally present on bacterial cell surfaces. We were particularly interested in TraN, a bacterial outer-membrane protein with accessible epitopes on the cell surface that is involved in stabilizing mating pairs and facilitating horizontal gene transfers14,20. Most relevant to our study, TraN functions as a natural adhesin, promoting cell-cell adhesion upon binding to its specific receptor. This property renders it an ideal module for enabling programmable cell-cell adhesion and represents an appropriate choice for our proof-of-principle experiments.

Accordingly, we assessed the feasibility of isolating bacteria expressing cognate nanobodies from a mixed population by displaying the TraN antigen on S17-1 conjugative cells. Our experimental workflow involved incubating of S17-1 cells with a bacteria-displayed nanobody library derived from a synthetic pool comprising approximately 107 clones of distinct nanobodies21. Following each round of selection, we harvested colonies and conducted high-throughput sequencing to confirm enrichment. Our analyses revealed a progressive increase in the abundance of specific nanobody clones within the library pool across successive rounds of selection (Fig. 3a, Supplementary Data 13). To validate TraN-dependent cell-cell adhesion, we selected the top three unique sequences from the final round of panning, introduced them to model E. coli, and conducted a macroscopic cell aggregation assay using optical density (OD600) measurements to quantify the binding strength and specificity between cells9 (Supplementary Fig. 3a). If the nanobodies possessed CAM capacity, we expected to observe rapid precipitation in a cell mixture of the corresponding nanobody- and antigen-displaying strains. Consistent with our screening results, OD600 values of supernatant were reduced to varying degrees for mixtures of cells expressing these nanobodies and cells displaying TraN (Fig. 3b, Supplementary Fig. 3b, c), one of which (hereafter denoted NbtraN) exhibited pronounced precipitation, prompting us to pursue in-depth characterization (Fig. 3c).

Fig. 3: Identification of nanobody recognizing TraN via the CAM discovery platform.
figure 3

a Stacked bar plot illustrating the changes in the relative abundance of individual nanobodies within the population across three rounds of bio-panning to enrich for bacteria displaying TraN-binding nanobodies. Sequences were discerned through the CDR regions of the nanobody gene. The relative abundances of all unique nanobodies identified are shown, and the respective counts are detailed in Supplementary Data 13. Colors denote the ranking of nanobody abundance from the highest to lowest. b Macroscopic aggregation analysis to assess cell-cell adhesion. Cultures of E. coli strains displaying TraN or NbtraN were incubated either individually or in combination. The OD600 of the supernatant after the settling period is shown below the image. c) The amino acid sequence of NbtraN, shows CDR1, CDR2, and CDR3 in green, blue, and orange, respectively. d, e The ITC binding profiles of NbtraN with TraNsurf at 25 °C. f Crystal structure of NbtraN (yellow) in complex with TraNsurf (blue) (PDB: 8X7N). CDR1, CDR2, and CDR3 are presented in green, blue, and orange, respectively. g A magnified view of the interacting residues is indicated between NbtraN and TraNsurf. See also Supplementary Table 1. Source data are provided as a Source Data file.

First, we conducted comparative conjugation experiments to validate the cell adhesion capability of NbtraN. As expected, recipient cells displaying NbtraN exhibited an ~4-log increase in conjugation frequencies when incubated with S17-1 donor cells expressing TraN (Supplementary Fig. 4a), representing an increased frequency comparable to previously identified Ag-Nb pairs (Ag1-Nb1, AgInt-NbIB10)9,19. Next, using size-exclusion chromatography, we detected a stable interaction between purified NbtraN and the surface-exposed domain of TraN (TraNsurf) (Supplementary Fig. 4b, c). Further analysis revealed a binding affinity (KD) of 4.45 μM between NbtraN and TraNsurf (Fig. 3d, e), confirming the specificity of the interaction.

To gain insights into the interaction between NbtraN and TraN, as well as how it promotes cell-cell adhesion in bacterial mixtures, we determined a 3.67 Å X-ray crystal structure of NbtraN in complex with TraNsurf (PDB: 8X7N) (Fig. 3f, g, Supplementary Table 1). The NbtraN/TraNsurf complex structure was determined by molecular replacement using nanobody homolog, Nb.b201, as a search model, which has an identical fixed framework region to that of NbtraN (PDB: 5VNV)21. In our structure, NbtraN and TraNsurf share an extensive interaction surface consisting of two contact regions that are primarily formed by the complementarity-determining regions 2 and 3 of NbtraN (CDR2, CDR3) (Fig. 3f). In contrast, CDR1, the other variable loop in NbtraN, did not present any direct interaction with TraNsurf in our structure. Importantly, the contact interface between NbtraN and TraNsurf is rich in non-polar amino acids, suggesting their potential contribution to stable complex formation (Fig. 3g). To test this hypothesis, we introduced alanine substitutions into the interacting residues of CDR2 and CDR3 to disrupt the specific interaction. Subsequently, we conducted macroscopic aggregation assays, comparative conjugation assays, and isothermal titration calorimetry (ITC) to evaluate the impact of these alanine substitutions on NbtraN/TraN binding. In line with our structural data, we did not observe any cell aggregates for either the CDR2 (F47A/Y58A) or CDR3 (Y98A/L100A) mutants when mixed with cells displaying TraN (Supplementary Fig. 5a). Furthermore, mutations in NbtraN strongly affected conjugation when incubated with S17-1 donor cells expressing TraN (Supplementary Fig. 4a). These mutants also displayed significantly reduced binding affinities for TraN (Supplementary Fig. 5b–e). Immunoblotting analyses and cell surface accessibility assays ruled out the possibility that these mutations interfered with nanobody expression and surface display (Supplementary Fig. 5f, g). Together, these data indicate that the hydrophobic residues within two of the CDRs of NbtraN interact with the surface-exposed domain of TraN, facilitating cell-cell adhesion when NbtraN is mounted on bacterial surfaces.

Deep mutational nanobody engineering enhances the binding affinity of NbtraN for TraN

Although we successfully identified a functional CAM targeting TraN from our nanobody pool, the binding affinity of NbtraN was relatively modest (Fig. 3d, e). We postulate that nanobodies of higher affinity may not be present in the original library since the number of unique nanobody sequences was not saturated. This limitation in pool diversity could have impeded the discovery of high-affinity CAMs. Therefore, we set out to directly engineer NbtraN by means of deep mutational scanning in conjunction with our whole-cell screening platform to obtain nanobody variants displaying an improved affinity for TraN (Fig. 4a). Our rationale was that if cells expressing the NbtraN variants exhibited an enhanced affinity for TraN, they would acquire selective markers in a higher frequency, resulting in their enrichment within the population during the selection process. As an initial step, we focused on the nanobody’s CDR3 sequence, given that it is longer than other CDRs and is an important loop for antigen recognition22. Accordingly, we generated a focused library by single-site saturation mutagenesis of each residue in the CDR3 of NbtraN using commercially available chip oligonucleotides (14 residues × 19 alternative amino acids/residues = 266 variants in the nanobody pool, as illustrated in Fig. 4a). The newly constructed nanobody library was then introduced into a display system to be expressed by E. coli and incubated with S17-1 cells expressing TraN for selection. After a single round of panning, we harvested surviving transconjugants on selective media and subjected them to high-throughput sequencing. We quantified the number of transconjugants by analyzing unique nanobody sequences in the pre-and post-selection populations.

Fig. 4: Discovery of optimized NbtraN variants through deep mutational scanning.
figure 4

a Selection workflow of the deep mutational scanning. Plasmids carrying NbtraN genes with single-site mutations in CDR3 were utilized for library construction. The mutant library underwent a single round of selection with donor cells displaying TraN to enrich for bacteria expressing potent NbtraN variants displaying stronger binding capacity. b The conjugative scores of individual NbtraN CDR3 mutations are depicted in a heatmap. The X-axis represents individual amino acid mutation, and the Y-axis represents the residue position of CDR3 in wild-type NbtraN. Mutations not identified after selection were excluded from the analysis and are shown in black (N/A). See also Supplementary Data 4 and 5. c Macroscopic aggregation analysis to assess cell-cell adhesion between E. coli strains displaying TraN and the indicated NbtraN variants. The OD600 of the culture supernatant is shown below the image. The cells expressing TraN or wild-type NbtraN were used as controls. d Immunoblotting analysis of E. coli expressing the myc-tagged intimin-NbtraN variants (wild-type, S105C, and H106C) after a 16 h incubation. E. coli without expressing nanobody was used as a control (−). The loading control is E. coli RNA Polymerase β protein (RpoB). Migrations of a size standard, in kDa, are indicated (left). The experiment was repeated three times independently with similar results. e Immunofluorescence and flow cytometry analysis of E. coli expressing surface-displayed NbtraN variants carrying a C-terminal myc tag. Cells were treated with anti-myc antibodies followed by Alexa fluor 488-conjugated secondary antibody. The X-axis represents the fluorescence intensity at 525/40 nm and the Y-axis indicates the cell counts normalized by unit area. f Conjugation frequency of pGenR under the liquid growth condition. Recipient cells expressing indicated nanobodies were co-cultured with donor cells expressing TraN. Data are presented as means ± SD. n = 3 biological replicates with three technical replicates each. Asterisks indicate statistically significant differences between the indicated mean values (p < 0.05, two-tailed t-test). g, h The ITC binding profiles of the indicated NbtraN variants with TraNsurf at 25 °C. See also Supplementary Fig. 6. Source data are provided as a Source Data file.

To gain a comprehensive understanding of the amino acid variants within the CDR3 of NbtraN that affect conjugation in our screening process, we generated a sequence-function map illustrating variant conjugative scores (Fig. 4b, Supplementary Fig. 6a). Compared to wild-type NbtraN, 69% of the variants showed a decrease in conjugation ability following screening, whereas 31% showed an increase. Notably, substitutions of residue Y98 in CDR3 with other amino acids resulted in a reduced number of transconjugants in the pool, aligning with our above-described findings regarding its role in mediating the interaction between NbtraN and TraN (Supplementary Fig. 5). Several NbtraN variants significantly outperformed wild-type NbtraN in the whole-cell screening platform. We were particularly interested in the cysteine variants located sequentially from residues 101–107, all of which elicited a substantial increase in the transconjugant population. These residues are positioned in close proximity to the NbtraN/TraNsurf interface in our complex structure (PDB: 8X7N) and have the potential to interact more effectively with TraN upon mutating to cysteine during cell-cell contacts (Supplementary Fig. 6b). Again, using macroscopic cell aggregation assays, we confirmed that cells displaying the CDR3 cysteine variants with the highest conjugative score (S105C and H106C) precipitated upon being mixed with TraN-expressing cells (Fig. 4c, Supplementary Fig. 7a). Immunoblotting and cell surface accessibility analyses on these cysteine mutants ruled out indirect effects related to increased protein levels or enhanced surface display (Fig. 4d, e). We assessed if cells displaying the NbtraN cysteine variants could promote cell-cell adhesion through comparative conjugation in liquid culture. Consistent with the results from our deep-mutational screening, recipients displaying the NbtraN cysteine variants exhibited a more than 5-fold increase in conjugation frequencies when incubated with S17-1 donor cells expressing TraN (Fig. 4f). Finally, we purified NbtraNS105C and NbtraNH106C and used ITC to measure their binding affinities for TraNsurf. Compared to wild-type NbtraN, on average the cysteine variants presented a 3-fold increase in binding to TraNsurf in vitro (Fig. 4g, h, Supplementary Fig. 7b, c). Notably, these experimental results align well with molecular dynamics (MD) simulations (Supplementary Fig. 7d, e), indicating that introducing cysteine residues into CDR3 of NbtraN enhances its binding affinity for TraN. In summary, we have demonstrated that our whole-cell screening platform not only identifies functional CAMs from a synthetic library, but this method is feasible for enhancing the cell adhesion capabilities of those identified CAMs by deploying strategic deep mutational engineering.

Discovery of nanobodies targeting the embedded membrane proteins OmpA and OmpC

Encouraged by the success of our selection method, we set out to identify functional CAMs capable of recognizing embedded membrane proteins. These proteins possess few surface-exposed epitopes and pose challenges for antibody acquisition through conventional screening methods or large-animal immunization (Supplementary Fig. 8). We selected two target antigens, OmpA and OmpC, representing two bacterial proteins naturally localized on the outer membrane that exert important roles in maintaining bacterial surface integrity and regulating membrane permeability23,24. To our knowledge, no CAMs targeting the extracellular epitopes of OmpA or OmpC have been reported previously, making nanobodies targeting them especially unique and relevant. It is worth noting that although endogenous OmpA and OmpC are present in the S17-1 conjugative cells, we overexpressed these proteins by introducing an additional gene copy by plasmids, thereby enhancing the likelihood of isolating synthetic binders against these target antigens. Next, we incubated the S17-1 strains (OmpA+ or OmpC+) with the bacteria-displayed nanobody library, with the objective of identifying functional CAMs specifically tailored to these embedded membrane proteins.

Following three rounds of bio-panning along with sequencing analyses, we successfully identified nanobodies targeting both of these membrane proteins, which we have designated NbompA and NbompC (Fig. 5a). We found that E. coli harboring OmpA and OmpC underwent self-aggregation when they expressed these nanobodies on their surfaces, indicating their potential utility as CAMs (Fig. 5b, Supplementary Fig. 9a, b). A comparative conjugation assay in liquid culture supported this notion, as the recipient cells displaying either NbompA or NbompC on their surfaces presented greatly enhanced conjugation frequencies upon incubation with S17-1 donor cells having OmpA and OmpC antigens (Fig. 5c, d). Finally, to validate the binding capacity of NbompA and NbompC to their corresponding surface antigens, we explored their potential utility as reagents for immunofluorescence labeling. We fused these nanobodies in-frame with a green fluorescent protein, referred to as Nb-GFP, purified them, and then performed a standard cell labeling procedure for visualization by fluorescence microscopy (Fig. 5e, f, Supplementary Fig. 9c, d). We observed distinct fluorescence signals colocalized with wild-type E. coli hosting endogenous OmpA and OmpC when bound with NbompA-GFP and NbompC-GFP, respectively. These signals diminished when the Nb-GFPs were incubated with mutant E. coli strains (∆ompA, ∆ompC). These results not only evidence the binding capacity of the Nb-GFPs toward their cognate membrane antigens but also highlight the potential utility of CAMs for detecting bacteria expressing desired surface proteins.

Fig. 5: Nanobody CAM targeting of E. coli integral membrane proteins OmpA and OmpC.
figure 5

a The amino acid sequence of NbompA and NbompC. CDR1 (green), CDR2 (red), and CDR3 (blue) are indicated. b Self-aggregation of E. coli expressing NbompA and NbompC. Cultures underwent 24 h aTc induction before settling. Cultures that did not undergo induction (i.e., not expressing nanobodies) are presented as controls. c, d Conjugation frequency of pGenR under the liquid growth condition. Recipient cells expressing indicated nanobodies were co-cultured with S17-1 donor cells expressing (c) or not expressing (d) the indicated antigens. Data are presented as means ± SD. n = 3 biological replicates with three technical replicates each. Asterisks indicate statistically significant differences between the indicated mean values (p < 0.05, two-tailed t-test). Fluorescence micrographs showing the antigen-binding specificity of NbompA-GFP (e) and NbompC-GFP (f). NbompA-GFP and NbompC-GFP were incubated with wild-type E. coli and the antigen-deleted strains (∆ompA or ∆ompC) for 1 h before observation. Scale bar = 1  μm. Full-size images are available in Supplementary Fig. 9. The experiments were repeated three times independently with similar results. Source data are provided as a Source Data file.

Nanobody-programmed inhibitor cells antagonize target bacteria in mixed populations

One emerging application of synthetic CAMs is targeted antimicrobial interventions6,8. We recently developed PICs displaying surface nanobodies that can kill target E. coli with cognate surface antigens within mixed population in vitro, leveraging the potent antibacterial activity of the type VI secretion system (T6SS) in Enterobacter cloacae25,26 (Fig. 6a). Despite representing an important proof-of-concept study, the nanobody employed in our prior studies that recognize the embedded membrane protein BamA can be hindered by bacterial surface structures such as lipopolysaccharides (LPS)6,27. Taking advantage of our newly identified CAMs, we endeavored to determine if NbompA and NbompC are compatible with PICs for targeted cell killing in a mixed bacterial culture. More importantly, we wanted to determine if PICs equipped with these nanobodies could antagonize target E. coli without altering native surface structures.

Fig. 6: Mounting NbompA and NbompC on PICs directs antibacterial activity toward target E. coli in bacterial mixtures.
figure 6

a Schematic of target killing of bacteria (navy) in a complex bacterial population by PICs (pink). Survival rate of E. coli strains (wild-type, ΔompA, ΔompC, and ΔrfaD) upon incubation with PICs displaying NbompA (b), NbompC (c), non-matched control (Ctrl) (d), or NbBamA (e) in liquid medium. Survival rate of wild-type E. coli when incubated with PICs expressing either NbompA (f) or NbompC (g). Various starting ratios of PICs to E. coli were tested: 1:10; 1:5; 1:2.5; 2.5:1; 5:1; 10:1; and 100:1. E. coli target (wild-type) and non-target (ΔompA or ΔompC) survival rates following treatment with PICs producing NbompA (h) or NbompC (i). Prior to incubation, target and non-target E. coli were mixed in ratios of 1:1, 1:10, and 1:100. j Survival rate of wild-type E. coli within a mouse fecal bacterial population before and after incubation with PICs displaying NbompA, NbompC, or NbBamA. Data are presented as means ± SD. n = 3 biological replicates with three technical replicates each. Asterisks indicate statistically significant differences between the indicated mean values (p < 0.05, two-tailed t-test). See also Supplementary Fig. 1012. Source data are provided as a Source Data file.

Accordingly, we generated PICs displaying the newly identified nanobody CAMs that recognize OmpA and OmpC, denoted PICNb-OmpA and PICNb-OmpC, respectively. We performed bacterial survival assays to examine their capacity to direct the antibacterial activity of PICs against target E. coli. As expected, we found that both PICNb-OmpA and PICNb-OmpC effectively reduced the cell viability of E. coli within 1 h by more than an order of magnitude (PICNb-OmpA, 21-fold; PICNb-OmpC, 207-fold), in a manner dependent on the presence of respective nanobodies, the T6SS, and the corresponding antigens on target cells (Fig. 6b–d, Supplementary Fig. 10a–f). In contrast, PICs equipped with nanobody targeting BamA (PICNb-BamA) exerted a minimal impact on wild-type E. coli survival rates unless LPS were truncated6 (Fig. 6e, Supplementary Fig. 10g, h). These results provide preliminary evidence for the compatibility of both NbompA and NbompC on PICs to achieve targeted cell killing in vitro.

To further evaluate the killing potency of PICNb-OmpA and PICNb-OmpC, we conducted bacterial survival assays across varying ratios of PICs to E. coli. We observed significantly reduced E. coli survival rates (by more than an order of magnitude) within a 2 h incubation period when PICs (as predators) outnumbered E. coli (as prey). This result is consistent with a previous study showing that T6SS-dependent killing is more efficient when competitor bacteria outnumber the prey to facilitate invasion28. Remarkably, although the killing efficacy decreased, we observed robust reductions in E. coli survival rates at later time points (more than 4 h incubation) when E. coli outnumbered PICs by 2.5- and 5-fold. When E. coli outnumbered PICs by 10-fold, we found no significant difference in E. coli survival compared to controls using PICs without T6SS or lacking surface nanobodies, implying a limitation of the current PIC system (Fig. 6f, g, Supplementary Fig. 11). Next, to assess the specificity of the PIC system, we challenged PICNb-OmpA and PICNb-OmpC to distinguish target from non-target cells. We exposed PICs to target E. coli cells (with endogenous antigens) that were diluted to varying degrees within non-target E. coli recipients (ΔompA or ΔompC). Consistent with our previous report6, we found no evidence of off-target activity, even when non-target E. coli outnumbered target E. coli by 100-fold (Fig. 6h, i). Moreover, the killing efficiency of PICs remained unaffected by the degree of target cell dilution. These results support that PICs displaying newly identified nanobody CAMs exhibit specificity for target cells within mixed populations.

Lastly, to assess the feasibility of PICNb-OmpA- and PICNb-OmpC-mediated targeting within complex bacterial mixtures, we isolated total fecal bacteria from conventionally reared mice, which hosted wild-type E. coli targets. We measured the killing capacity of PICNb-OmpA and PICNb-OmpC to target E. coli from this diverse and undefined microbiome. Within 60 min post-PIC addition, E. coli survival rates dropped significantly by 87% (PICNb-OmpA) or 74% (PICNb-OmpC), whereas PICs displaying NbBamA (PICNb-BamA) had no observable impact on survival of the target cells (Fig. 6j, Supplementary Fig. 12). This outcome reveals the potential of PIC-mediated targeting as a feasible approach for antagonizing target bacteria in complex microbial communities.

Discussion

CAMs are important in the study of fundamental biology and represent promising biotechnological tools. However, a key issue is how to identify functional CAMs that effectively mediate intercellular assemblies for desired outcomes. In this study, we report our development of a whole-cell screening platform designed to discover CAMs that facilitate programmable bacteria-bacteria adhesion. The success of this platform relies on a strategic combination of functional and positive selection, leveraging the T4SS for contact-dependent DNA delivery. The T4SS serves as a discriminatory enrichment tool, selectively favoring bacteria displaying functional CAMs, thereby addressing limitations associated with conventional methods. One notable advantage of our selection approach is its ability to circumvent the technical challenges associated with recombinant protein purification in conventional screening platforms13,21. In particular, bacterial surface proteins, which often comprise multiple transmembrane domains, pose significant challenges for production as soluble recombinant molecules. To assess the potential of our approach, we selected CAMs targeting different types of antigens: outer membrane protein with surface exposed domain, and embedded membrane proteins. In each case, our platform enabled the discovery of CAMs capable of binding to the target antigen in its natural form and promoting cell-cell adhesion. The results attest to the effectiveness of our approach for isolating specific binders targeting the class of antigen.

Our study primarily serves to demonstrate the platform design and provide proof-of-concept applications, yet we recognize the potential for further optimization with a view toward specific targets. For example, we detected basal DNA conjugation frequencies in the absence of CAMs (10−4 to 10−5, as shown in Figs. 1 and 2), indicating avenues for improvement. Our future efforts will concentrate on identifying or engineering alternative conjugative cells to maximize specific gene transfer efficiency while minimizing non-specific cell-cell adhesion. In addition, the flexibility of our whole-cell screening platform, as exemplified through deep mutational engineering (Fig. 4), establishes a foundation for future endeavors aimed at expanding CAM diversity. Incorporating a more extensive and diverse pool of CAMs promises broader applicability and functionalities. Lastly, to extend the scope for identifying functional CAMs, future studies could explore alternative screening platforms utilizing Gram-positive bacteria, enabling the targeting of membrane antigens beyond the Gram-negatives examined herein. Despite divergences in DNA transfer mechanisms, the presence of conjugation machinery in Gram-positive bacteria supports the feasibility of extending contact-dependent DNA transfer via synthetic cell-cell adhesion29.

The nanobodies isolated in this study exhibit stable and specific interactions with their cognate target antigens, showcasing their potential compatibility with existing technology relying on cell-cell adhesion. By installing isolated CAMs targeting embedded membrane proteins, OmpA or OmpC, onto the surface of PICs, our results represent progress towards harnessing the antibacterial activity of the T6SS to antagonize target cells (Fig. 6). It is important to note that a unique surface antigen is a key requirement for PIC targeting. Thus, we anticipate that the PIC system, once further refined and customized for more specific targets (e.g., virulence factors on pathogens), will elicit interest across diverse scientific domains. In addition to functional CAMs, we anticipate our ongoing efforts will result in improvements to the PIC system, including by i) expanding the effector repertoires of PICs; ii) achieving tunable expression of T6SS within PICs; iii) engineering PICs to acquire immunity determinants that provide protection from target cell counterattacks; and iv) designing bio-confinement systems to regulate PIC activity. Unlike bacteriophages, which are currently undergoing active therapeutic exploration and occupy a distinct application niche from PICs, the PIC system offers an alternative strategy that holds promise in various models of interest. These include animal models, environmental models, or models that facilitate investigation of the consequences of removing individual community members from a consortium. We believe that the adaptability and versatility of our system present opportunities for innovative solutions, enabling complexities inherent in biology to be addressed and allowing diverse potential applications to be explored.

In summary, through our screening approach, we have successfully identified functional CAMs targeting bacterial membrane proteins. These CAMs present their potential as versatile tools for engineering bacteria-bacteria adhesions, showing the opportunities for future applications, such as engineering complex multi-component metabolic pathways and biomaterials3,4,5. Furthermore, we anticipate our method will prove compatible with existing cell-cell adhesion platforms, enabling the design and fine-tuning of multicellular assemblies, patterns, and morphologies, thereby positioning CAMs as key components in the synthetic microbiology toolkit9,10. Our study reveals the transformative potential of CAMs in the realms of microbiology and synthetic biology.

Methods

Bacteria, yeast, and culture conditions

The strains utilized in this study are detailed in Supplementary Table 2. We used the following Escherichia coli strains: S17-1 ATCC 47055 to display antigens of interest and transfer plasmids containing distinct antibiotic-resistance markers for the selection method; MG1655 to display nanobodies and validate nanobody-binding specificity; DH5α and PIR1 in cloning and plasmid maintenance; S17-1 λ pir for conjugal transfer of pRE118 plasmid into E. coli; and BL21 (DE3) pRIL for overproduction and purification of protein samples. Enterobacter cloacae ATCC-13047 was utilized for bacterial survival assays6. All bacteria were routinely cultured at 37 °C in Luria Bertani (LB) medium unless noted otherwise. The yeast-display nanobody library was recovered by growing it in Yglc4.5—Trp medium at 30 °C in a shaker21. Antibiotics and chemicals were used at the following concentrations: 50 μg/mL streptomycin; 150 μg/mL carbenicillin; 50 μg/mL kanamycin; 25 μg/mL chloramphenicol; 15 μg/mL gentamicin; 100 μg/mL trimethoprim; 500 ng/mL anhydrotetracycline (aTc); 100 μM isopropyl β-D-1-thiogalactopyranoside (IPTG); 1% (w/v) L-(+)-arabinose; and 200 mM sucrose.

Mice

Fecal samples from three male wild-type C57BL/6J mice were utilized in this study. Care and maintenance of these mice were conducted according to the protocol of the Institutional Animal Care and Use Committee (IACUC) of the Institute of Molecular Biology (Academia Sinica, Taiwan) and approved by its Animal Center, where the mice were bred and housed. All mice were maintained under controlled light conditions (12 h light-dark cycle) with access to standard food and water. Prior to oral gavage with wild-type E. coli MG1655 targets, the mice underwent a 4 h fasting period.

Plasmid construction

The plasmids and primers utilized in our study are listed in Supplementary Table 2. Tet expression plasmids, which were used for nanobody display on the surface of both E. coli and E. cloacae, were derived from pDSG323-based expression plasmids as described previously6,9. The TraN antigen expression plasmid (pDSG-TraN) was constructed by polymerase chain reaction (PCR) amplification and subsequent cloning of the traN gene (AAL23498.1) from the pSLT plasmid of Salmonella Typhimurium LT2 strain into pDSG323 at the NotI and PstI restriction sites. The OmpA and OmpC arabinose-inducible plasmids (pBAD18-OmpA, pBAD18-OmpC) were generated by PCR amplification and subsequent cloning of the respective genes (NP_415477.1, NP_416719.1) from the genomic DNA of E. coli MG1655 strain into the SacI and XbaI restriction sites of pBAD18. A Myc-tag sequence (EQKLISEEDL) was introduced at the C-terminus of NbtraN and its variants by means of site-directed mutagenesis30.

For the TraNsurf/NbtraN complex purification constructs, the sequences were amplified and cloned into multiple cloning site (MCS)−1 (BamH1 and NotI sites) and MCS-2 (NdeI and XhoI sites) of pETDuet-1, respectively, resulting in fusion of an N-terminal hexa-histidine to TraNsurf. Purification of NbtraN, NbompA, and NbompC involved amplifying their sequences and cloning them into the MCS (NdeI and XhoI sites) of pET22b, fused with a C-terminal hexa-histidine tag. NbtraN nanobody variants were introduced into the expression plasmids using site-directed mutagenesis30. The NbompA-GFP and NbompC-GFP constructs were generated by PCR amplification of the GFP sequence from pET11a-GFP-avi and inserting it between the nanobody sequences and the hexa-histidine tag at the C-terminus of pET22b plasmids via Gibson assembly31. To purify TraNsurf alone, the sequence was amplified and cloned into MCS-1 (BamH1 and NotI sites) of pETDuet-1, generating a fusion construct with an N-terminal hexa-histidine tag. The E. coli ompW in-frame deletion plasmid (pRE118_Ecoli∆ompW) was generated by utilizing the suicide vector pRE11832. We amplified 750 bp regions flanking the deletion, joined them by means of splicing by overlap extension (SOE) PCR, and subsequently cloned them into pRE118 at the SacI and XbaI restriction sites. For mobilizable plasmids with distinct antibiotic-resistance genes, the pGenR was created from plasmid pPSV37 by deleting the T7-expression system and re-ligating the vector by means of Gibson assembly33, whereas pTmpR was created from plasmid pSCrhaB2 by deleting the rhamnose-expression system34. The pUC18T-mini-Tn7T plasmid consists of an ampicillin-resistance gene and its oriT was renamed as pAmpR for the purposes of our study35.

Genetic manipulation

We used the lambda red recombinase system to generate E. coli strains in which ompA, ompC, or trbE had been deleted36. In brief, PCR products comprising a kanamycin resistance cassette from pKD4, flanked by 50–100 bp homologous to the 5′ and 3′ termini of these genes, were electroporated into E. coli strains (MG1655 or S17-1) carrying pKD46 and induced by arabinose for 5 h at 30 °C to express the recombinase. Subsequently, E. coli was incubated in LB for 1 h, plated on chloramphenicol-containing LB agar, and incubated overnight at 37 °C. To remove the kanamycin resistance cassette from E. coli, pCP20 plasmid hosting the FLP recombinase gene was transformed into the deletion strains, which were then grown at 30 °C on carbenicillin-containing LB agar. A single colony was picked and inoculated into LB media at 43 °C to select for loss of pCP20.

To delete ompW from E. coli MG1655, pRE118_Ecoli∆ompW was transformed into E. coli S17-1 λ pir. The donor cells carrying the deletion construct and E. coli MG1655 were grown overnight on LB plates containing antibiotics, as appropriate. The cells were then scraped together to create a 2:1 donor-recipient mixture, which was spread out on an LB agar plate and incubated at 37 °C for 6 h to facilitate plasmid transfer via conjugation. Cell mixtures were then scraped into LB and plated onto LB medium agar plates supplemented with kanamycin and chloramphenicol to select for E. coli containing the chromosomally inserted deletion construct. The E. coli merodiploid strains were grown overnight in a non-selective LB medium at 37 °C, followed by counter-selection on LB low salt plates containing sucrose. Kanamycin-sensitive colonies were screened for allelic replacement by colony PCR and mutations were confirmed by Sanger sequencing of the PCR products.

Bacterial conjugation assays

For conjugation assays, the conjugative strain E. coli S17-1 ATCC 47055 was employed as the donor carrying transferable plasmids with selection markers, whereas E. coli MG1655 served as the recipient. Overnight bacterial cultures were centrifuged at 21,100 x g for 1 min to pellet the cells, followed by the removal of the culture supernatant. The cells then underwent a single wash in LB broth and were subsequently resuspended in LB broth. The donor and recipient cells were adjusted to OD600 = 0.005 and 0.0025, respectively. Liquid conjugation assays involved incubating cell mixtures at 37 °C with continuous agitation at 200 rpm for 6 h. For conjugation assays on solid media, cell mixtures were spotted onto LB agar plates and incubated at 37 °C for 6 h. Following incubation, the cells were collected, serially diluted, and plated on selective media to quantify colony-forming units (CFUs). Three transferable plasmids contained gentamicin-, ampicillin-, or trimethoprim-resistance genes, respectively. The recipient strain was marked by chromosomal insertion of a chloramphenicol-resistance gene, whereas the donor strains remained unmarked. The total recipient population was assessed by enumerating CFUs on LB plates containing chloramphenicol. The count of transconjugant populations was determined by enumerating CFUs on LB plates with chloramphenicol, which also contained the relevant resistance markers (gentamicin, ampicillin, or trimethoprim), depending on the specific conjugative plasmid employed in the selection process.

Ag/Nb mismatch conjugation experiment

We used four different mixed cell cultures in the mismatch conjugation assay. Conjugative E. coli S17-1 strains displaying either Ag1 or AgInt from Tet expression plasmids were co-cultured with recipient strains displaying Nb1 or NbIB10 from Tet expression plasmids. Initial cell concentrations for donor and recipient strains were set to OD600 = 0.005 and 0.0025, respectively. Following 6 h incubation in a liquid medium containing kanamycin and aTc with continuous shaking at 37 °C, the cells were subjected to serial dilution and plated on selective media to quantify CFUs as described above.

To assess if the whole-cell screening approach exhibits specificity toward low-abundance target cells within mixed bacterial populations, overnight cell cultures were centrifuged at 21,100 x g for 1 min. The culture supernatant was discarded, and the cell pellet was collected. After a single wash, cells were resuspended in LB broth, and their concentration was adjusted to OD600 = 1.0. Recipient cells expressing Nb1 and Null were mixed at varying ratios (101- to 107-fold dilutions as specified). The recipient mixture and donor cells displaying Ag1 were diluted to OD600 = 0.0025 and 0.005, respectively. The assay comprised three rounds of bio-panning. In the initial round, the donor strain carrying a transferable gentamicin resistance gene was utilized. Following 6 h incubation at 37 °C with shaking at 200 rpm, cultures were diluted and plated on selective media to quantify CFUs. The remaining culture was plated on selective media to initiate the next panning round. After 16 h of incubation at 37 °C, recipient colonies that grew on selective plates were harvested and resuspended in LB broth for the second panning round. The recipient culture and the donor carrying a transferable ampicillin-resistance gene were diluted to OD600 = 0.0025 and 0.005, respectively. After incubation again at 37 °C with agitation at 200 rpm for 6 h, cultures were diluted and plated on selective media to quantify CFUs. The remainder of the culture was plated on selective media for the subsequent panning round. Following another 16 h of incubation at 37 °C, recipient colonies that grew on the selective plates were harvested and resuspended in LB broth for the third panning round. The recipient culture and the donor carrying a transferable trimethoprim-resistance gene were diluted to OD600 = 0.0025 and 0.005, respectively. After incubation at 37 °C with agitation at 200 rpm for 6 h, cultures were diluted and plated on selective media to quantify CFUs.

Bacterial nanobody display library construction

The bacterial display library used in this study was derived from a yeast nanobody library established in a previous study21. Plasmids containing nanobody genes were first extracted from the yeast library, and the nanobody sequences were subsequently amplified via PCR. These fragments were then subcloned into pDSG323 backbone vectors using the Gibson assembly method and chemically transformed into E. coli DH5α for plasmid enrichment. A total of fifty separate Gibson assembly reaction products were transformed, resulting in the collection of >107 colonies, after which plasmids were extracted and pooled. The bacteria nanobody display library (100 ng) was then transformed into the E. coli MG1655 ∆ompW strain via electroporation. We selected the ∆ompW strain to minimize the interactions between OmpW and TraN, as suggested by Low et al. 20,37. The cells were harvested and resuspended in LB with 10% glycerol for storage at −80 °C.

To construct the NbtraN CDR3 library for deep mutational engineering, 14 sites on CDR3 sequences (AYPLDEIGSHDPHS) underwent mutagenesis, with each site mutated into all desired amino acids using optimal E. coli codons. GenScript performed DNA oligonucleotide library synthesis on a programmable column. The pooled mutagenesis library was subsequently cloned into the pDSG323 backbone and transformed into E. coli DH5α competent cells. Sanger sequencing was conducted to determine library capacity before colonies were collected, and the plasmids were then extracted. The pool of plasmids was then transformed into the E. coli MG1655 ∆ompW strain via electroporation, resulting in a collection of >30,000 colonies stored in LB broth with 10% glycerol at −80 °C.

Nanobody CAM isolation using the whole-cell screening platform

Conjugative E. coli S17-1 expressing indicated antigens (TraN, OmpA, or OmpC) along with transferring plasmids containing distinct antibiotic-resistance markers served as the donor strain, whereas the bacterial nanobody library acted as the recipient. In the initial bio-panning round, the donor with a mobilized gentamycin resistance plasmid and the recipient nanobody display library were both diluted to OD600 = 0.05 in LB broth and incubated at 37 °C with shaking at 200 rpm until log phase was attained. The donor cells and the library culture were then diluted to OD600 = 0.0025 and 0.005, respectively, and co-cultured in LB broth with aTc. After 6 h incubation at 37 °C with shaking at 200 rpm, the culture was plated on selective media containing gentamycin and chloramphenicol and incubated at 37 °C for 16 h. All colonies (>106 clones) were harvested and resuspended in LB broth. In the second round of panning, recipient cells from the first round and donor cells carrying a transferrable ampicillin-resistance plasmid were mixed at OD600 = 0.0025 and 0.005, respectively. Following the same panning conditions as in the initial round, the culture was plated on selective media containing carbenicillin and chloramphenicol. After 16 h incubation at 37 °C, all colonies were collected and resuspended in LB broth for the third round of panning. The culture harvested after the second panning round was co-cultured with donor cells carrying a transferrable trimethoprim-resistance plasmid at a ratio of OD600 = 0.0025 and 0.005, respectively. After 6 h co-culture under the same conditions as the previous round, the culture was plated on selective media containing trimethoprim and chloramphenicol. All grown colonies were harvested. Cells obtained after each panning round were collected to analyze nanobody diversity at each time point. For NbtraN deep mutational engineering, conjugative E. coli S17-1 expressing TraN served as the donor strain, and the bacterial NbtraN mutant library served as the recipient. The selection process comprised a single round of bio-panning, as described above.

Macroscopic cell aggregation assays

E. coli displaying nanobodies or antigens were initially inoculated in LB broth with aTc inducer. Following a 24 h incubation at 37 °C, the cultures were vortexed and mixed in a 1:1 ratio with the indicated testing combination. The cell mixtures were then placed in cuvettes with a 1 cm light path at room temperature. After 24 h of settling, cultures from the top 25% of the wells were collected, and their OD600 was measured using a Nano300 microspectrophotometer.

Protein purification

His-tagged TraNsurf and NbtraN proteins were co-expressed from pET-Duet-1 in E. coli BL21 (DE3) pRIL. Stationary phase cultures of expression strains were used to inoculate 1 L of LB broth containing carbenicillin and chloramphenicol. Cells were cultured in a shaking incubator at 37 °C and 220 rpm until they reached log phase (OD600 = 0.6–0.8), induced by IPTG, and then incubated at 30 °C and 220 rpm for 18 h. Cells were harvested by centrifugation at 4 °C and 4000 x g for 20 min and then resuspended in 40 mL lysis buffer (20 mM Tris-Cl pH = 7.5, 300 mM NaCl, 10 mM imidazole pH = 7.0, 1 mM DTT, protease inhibitor cocktail). Resuspended cells were disrupted with a microfluidizer and the cell debris was removed at 20,000 x g for 30 min at 4 °C. The NbtraN/TraNsurf protein complex was then purified from the supernatant individually by gravity flow through a 2 mL Ni-NTA agarose column. Bound proteins were then eluted using a linear imidazole gradient to a final concentration of 300 mM. The purity of each protein sample was assessed by 15% SDS-PAGE followed by Coomassie Brilliant Blue staining. Protein samples were further purified by fast protein liquid chromatography (FPLC) using gel filtration on a HiLoad 16/600 Superdex 200 pg column (Supplementary Fig. 4c).

For protein binding experiments requiring free TraNsurf and nanobodies, proteins were overproduced in E. coli strain BL21 (DE3) pRIL transformed with the IPTG expression vectors containing the desired genes. Cultures were grown in LB medium at 37 °C to log phase (OD600 = 0.6–0.8) and induced by IPTG. After induction at 30 °C, the cells were precipitated and resuspended in lysis buffer as described above. Resuspended cells were disrupted using a microfluidizer. The cellular debris was removed by centrifugation at 20,000 x g for 30 min at 4 °C. The histidine-tagged proteins were purified from the supernatant by gravity flow through a 2 ml Ni-NTA agarose column. Bound proteins were then eluted using a linear imidazole gradient to a final concentration of 300 mM. All protein samples were further purified by FPLC using gel filtration on a HiLoad 16/600 Superdex 200 pg column. Fractions with high purity were concentrated and used in binding assays.

Crystallization and structure determination

For crystallization of the NbtraN/TraNsurf complex, the Ni-NTA-purified protein was dialyzed in low salt buffer (5 mM Tris-HCl pH = 7.0, 150 mM NaCl, 0.5 mM TCEP) and concentrated to ~20 mg/mL by spin filtration (10 kDa cutoff, Millipore). The concentrated sample was subsequently screened against commercially available crystallization screens from Hampton Research. Diffraction-quality crystals were successfully generated at 20 °C via hanging drop vapor diffusion in three weeks, maintaining a buffer-to-protein ratio of 1:2. The crystallization solution, conducive to crystal formation, consisted of 1 M ammonium sulfate and 0.1 M sodium acetate at pH = 4.6.

Cryo-protection of NbtraN/TraNsurf complex crystals was performed in 20% (v/v) glycerol in the crystallization solution described above. The X-ray diffraction datasets were collected on beamline TPS-07A at the National Synchrotron Radiation Research Center (Taiwan). X-ray diffraction intensities were processed using HKL 200038. Phase determination of the NbtraN/TraNsurf complex was carried out using molecular replacement by Phaser in PHENIX, with poly-alanine nanobody (PDB: 5VNV) as a search model39. The NbtraN/TraNsurf complex model was built into the electron density map and further refined by Coot and PHENIX, respectively39,40. Crystals were cubic (space group P212121), with five complexes per asymmetric unit. There are no residues in the unfavored region of the Ramachandran plots. Data collection and refinement statistics are shown in Supplementary Table 1.

Fluorescence microscopy

Bacterial cultures were grown overnight in M9 minimal medium at 37 °C with 200 rpm shaking. The cells were harvested by centrifugation at 8000 x g for 1 min. The culture supernatant was removed and washed with Phosphate-buffered saline (PBS) by spinning at 8000 x g for 1 min. The washed cells were resuspended in PBS containing 1% paraformaldehyde (PFA) for 1 h cell fixation at room temperature. The fixed cells were subjected to three PBS washes. The cell suspensions were then adjusted to OD600 = 1.0 using PBS. The addition of 2 µM of Nb-GFPs to the cell suspensions preceded a 1 h incubation at 37 °C with shaking at 200 rpm for nanobody binding. The cells were then washed four times with PBS at 6000 x g for 1 min. Cell suspensions were spotted on a 1.5% agarose pad settled on a microscope slide. Images were captured using a DeltaVision Core Deconvolution Microscopy system with an Olympus IX71 microscope and a 60 × 1.42 NA oil-immersion objective.

Determination of nanobody library genetic diversity

To analyze the diversity of the nanobody population within each round of the selection process, cells were harvested and total plasmids were extracted for targeted amplicon sequencing41. Nanobody genes were amplified through 20 cycles of PCR using specific primers (Supplementary Table 2). Eight unique molecular identifiers (UMI) were incorporated before the 5′ primers to eliminate duplicate molecules resulting from PCR amplification. The PCR amplicons with a gel size of around 400 bp were selected and extracted using a QIAquick Gel Extraction Kit. The purified amplicons were then quantified using Qubit DNA HS reagent, and the 400 bp size amplicons were verified using a Bioanalyzer 2100 system (Agilent Technologies).

Next, Index 1 (i7) and Index 2 (i5) sequences were added to the cleanup samples to generate uniquely tagged libraries by employing the Illumina DNA/RNA UD Indexes Set B, followed by eight cycles of PCR using the Index primers and KAPA HiFi HotStart Ready Mix. The indexed amplicons were subsequently cleaned up by Ampure XP reagent and quantified. The final library was quantified to confirm the expected size of around 489 bp, and the concentration was calculated using an Illumina pooling calculator. The library samples were then diluted to 2 nM and submitted for Illumina MiSeq sequencing, which was performed by the Genomics Core of the Institute of Molecular Biology (Academia Sinica, Taiwan).

Raw data analysis was conducted as follows. Initially, nanobody sequences were identified through the 5′ and 3′ primers, as detailed in Supplementary Table 2. Reads with the same UMI sequences were considered to have originated from the same original molecule, enabling the removal of duplicate reads that arise during library amplification steps and ensuring more accurate quantification of the diversity and abundance of unique molecules in the samples. The variable region was subsequently determined by scrutinizing the 25 bp segments upstream and downstream of conserved sequences. Alignment of each conserved sequence with the nanobody was achieved using the Smith-Waterman algorithm for local sequence alignment42. The variable region was delineated based on the alignments of conserved sequences at both ends. In cases where the number of mismatches exceeded five, the variable region was deemed absent. Lastly, all variable regions underwent clustering, and their frequencies were tallied (Supplementary Data 13).

Conjugative scores measurement

To analyze the deep mutational scanning data, log2 enrichment ratios of mutations (Mut) were normalized by subtracting the enrichment ratios of the wild-type (Wt) sequence according to the following formula (Supplementary Fig. 6a, Supplementary Data 4 and 5):

$${Conjugative\; score} \,=\, {\log }_{2}\left[\frac{{{Mut}}_{P1}\left(\%\right)}{{{Mut}}_{P0}\left(\%\right)}\right]-{\log }_{2}\left[\frac{{{Wt}}_{P1}\left(\%\right)}{{{Wt}}_{P0}\left(\%\right)}\right]$$

Bacterial survival assay between two bacterial strains

The bacterial survival assay between two bacterial strains was carried out as described previously6. In brief, overnight PIC cultures were diluted to OD600 = 0.05 and grown at 37 °C for 4 h in LB broth with aTc to induce surface-exposed nanobodies (NbompA, NbompC, or NbBamA). The cells were pelleted, washed, and resuspended in LB, and then normalized to OD600 = 2. Mixtures of PICs and the indicated E. coli strains were then established at varying ratios (100:1, 10:1, 5:1, 2.5:1, 1:2.5, 1:5, 1:10) in LB broth with aTc. Bacterial mixtures were incubated at 37 °C with shaking at 200 rpm, and samples were collected at indicated time points, followed by serial dilution and plating on selective media to quantify CFUs. PICs were distinguished by plating on LB containing streptomycin (intrinsic resistance), whereas E. coli (with chromosomal insertion of the chloramphenicol acetyltransferase gene) was plated on LB containing chloramphenicol. E. coli survival rates were calculated as surviving CFUs over CFUs at the initial time point.

Bacterial survival assay between three bacterial strains

Overnight PIC cultures were diluted to OD600 = 0.05 and grown at 37 °C for 4 h in LB broth with aTc to induce surface-exposed nanobodies (NbompA or NbompC). The cells were pelleted, washed, resuspended in LB, normalized to OD600 = 2, and then incubated with a mixture of E. coli strains (wild-type and mutant) at the indicated ratio (1:1, 1:10, 1:100). The two E. coli populations were distinguished by chromosomal insertion at the Tn7 site encoding chloramphenicol resistance (ΔompA and ΔompC mutant) or gentamycin resistance (wild-type). aTc was supplemented as described above. Bacterial mixtures were incubated at 37 °C with shaking at 200 rpm for 8 h, followed by serial dilution and plating on selective media to quantify CFUs. PICs were distinguished by plating on LB containing streptomycin (intrinsic resistance), whereas E. coli was plated on LB containing chloramphenicol or gentamycin. E. coli survival rates were calculated as surviving CFUs over CFUs at the initial time point.

Bacterial survival assay in a complex undefined community

For survival experiments in undefined bacterial communities, three reared C57BL/6 J mice were fed by 200 μL oral gavage of 20% (w/v) sucrose solution containing 109 CFUs of log-phase wild-type E. coli MG1655. Following ingestion of the bacterial suspension, the mice were provided with both standard rodent food and sterilized water. Fecal samples were collected 24 h post-feeding suspended in 6 mL of PBS, and then homogenized using a tissue tearor with a probe diameter of 7 mm (BioSpec). The samples were then gently added to the top of 2 mL of 80% (w/v) Nycodenz, followed by ultra-centrifugation at 10,000 x g for 40 min. The top layer of the PBS solution was carefully removed, and the high-density fecal bacterial community from the middle layer was collected and normalized to OD600 = 3 in PBS. The resulting fecal bacterial community was mixed with an equal volume of PICs (OD600 = 2.0) expressing NbompA, NbompC, or NbBamA as described above. The bacterial mixtures were incubated at 37 °C with shaking at 200 rpm for 1 h. Pre- and post-incubation samples were plated on LB with chloramphenicol or streptomycin to selectively quantify E. coli or PIC populations, respectively. E. coli survival rates were calculated as surviving CFUs over CFUs at the initial time point.

Analysis of protein expression levels

To analyze the expression level of nanobodies, E. coli expressing NbtraN (wild-type and variants) were grown in LB medium supplemented with or without aTc at 37 °C for 6 h and harvested at an OD600 of 1.0. For each quantification assay, cell pellets were resuspended in SDS-PAGE sample loading buffer. Samples were boiled at 100 °C for 10 min and equal volumes were loaded for SDS-PAGE, before being transferred to nitrocellulose membranes. Membranes were blocked in TBST (10 mM Tris-HCl pH 7.5, 150 mM NaCl, 0.1% (w/v) Tween-20) with 5% (w/v) non-fat milk for 30 min at room temperature, followed by incubation for 1 h at room temperature with primary antibodies (anti-c-myc or anti-RNA Polymerase β) diluted 1:1000 in TBST. Blots were then washed by TBST, followed by incubation for 30 min at room temperature with the secondary antibody (anti-mouse IgG HRP conjugated) diluted 1:5000 in TBST. Finally, blots were washed again by TBST, developed, and visualized using a UVP Biospectrum 815 system.

Cell surface accessibility assay (flow cytometry and immunofluorescence assay)

After overnight culture, cells were diluted to an OD600 of 0.03 in LB and incubated at 37 °C for 6 h, either with or without aTc. Cells were then harvested, and the concentration of the culture was adjusted to 108 cells/mL with filtered PBS. Each cell culture (200 μL) underwent centrifugation at 4000 x g for 2 min, and the supernatants were removed. The cells were then resuspended in PBS containing anti-myc antibodies (diluted 1:500) and 10% goat serum (v/v), reaching a final volume of 500 μL. After 1 h incubation on ice, cells were washed once with filtered PBS and resuspended in 500 μL of filtered PBS containing 10% (v/v) goat serum and goat Alexa fluor 488-conjugated anti-mouse IgG (1:250; ThermoFisher Scientific). The bacterial suspension was incubated for 30 min at 4 °C in the dark, followed by another wash with filtered PBS. Finally, cells were adjusted to a concentration of 2 × 106 cells/mL in a final volume of 1 mL of filtered PBS. Fluorescence, excited at 488 nm with emission at 525/40 nm, was measured using a CytoFLEX S Flow Cytometer (Beckman Coulter). A total of 30,000 events were recorded. The E. coli population was distinguished using FSC-A/SSC-A profiles, and the doublets were excluded using FSC-A/FSC-H profiles. The data were analyzed using FlowJo software (FlowJo LLC; Ashland, OR, USA).

Isothermal titration calorimetry (ITC)

Titration experiments were performed using a Microcal PEAQ-ITC automated system (Malvern) at 25 °C. The ITC sample cell contained 390 μL of 40 μM TraNsurf in Tris buffer (20 mM Tris-Cl pH = 7.5, 150 mM NaCl, 0.5 mM TCEP). A syringe containing 125 μL of 500 μM NbtraN or nanobody variants (NbtraN_F47A/Y58A, NbtraN_Y98A/L100A, NbtraN_S105C, and NbtraN_H106C) in the same Tris buffer was used to inject into the sample cell using 20× injections. The raw experimental data were analyzed using the MicroCal PEAQ-ITC Analysis software package provided with the instrument. The fitting function in the software was generated by clicking the iteration button until an excellent fit to the experimental data points of the isotherms had been obtained. The final parameters, including KD, changes in enthalpy (ΔH), Gibb’s free energy (ΔG), and entropy (ΔS), were generated by the same software.

Molecular dynamics (MD) simulations

To elucidate how cysteine mutants in CDR3 of NbtraN promote binding to TraN, we prepared structural models of the complex with S105C and H106C using PyMol 2.4.1. Protein complexes, as well as their constituent proteins, were then simulated for 200 ns at 300 K and 1 atm in a solvation box with padding distance of 3 nm. The solvent was maintained at a physiological ionic strength of 0.15 M using Na+ and Cl ions. Waters are modeled as TIP3P43. MD simulations were conducted using OpenMM44 and employing the CHARMM3645 force field with an integration time step of 2 fs; the initial 10 ns were excluded from the analysis. Protonation states for the structures were assigned using H++46. Long-range electrostatic forces were handled using the particle mesh Ewald method with a cutoff of 12 Å.

To determine if MD simulations offer evidence that cysteine substitutions enhance binding, we employ ΔASA, as previous research has demonstrated a strong correlation between ΔASA and the experimental binding free energy of protein-protein complexes47. ΔASA is the average difference between the solvent-accessible surface area (ASA) of the complex and its constituent proteins simulated independently. To compute ASA, we applied the Shrake and Rupley algorithm48 to the states of the MD trajectory at every 2 pcs using MDtraj Python package49. We use bootstrapping to obtain 95% confidence intervals for ΔASA values. To analyze hydrogen bond formation, we employed the Baker–Hubbard method50, as implemented in MDtraj. To detect disulfide bond formation, a geometric criterion of <2.9 Å distance between the sulfur atoms of cysteines was applied.

Quantification and statistical analysis

Statistical significance in bacterial conjugation and survival assays was assessed by unpaired two-tailed t-tests between relevant samples. Details of statistical significance are provided in the figure legends.

Reporting summary

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