Many dissimilar protein domains switch between a -helix and b -sheet folds

Summary: Hundreds of millions of structured proteins sustain life through chemical interactions and catalytic reactions 1 . Though dynamic, these proteins are assumed to be built upon fixed 15 scaffolds of secondary structure, a -helices and b -sheets. Experimentally determined structures of over >58,000 non-redundant proteins support this assumption, though it has recently been challenged by ~100 fold-switching proteins 2 . These “metamorphic 3 ” proteins, though ostensibly rare, raise the question of how many uncharacterized proteins have shapeshifting–rather than fixed–secondary structures. To address this question, we developed a comparative sequence-based 20 approach that predicts fold-switching proteins from differences in secondary structure propensity. We applied this approach to the universally conserved NusG transcription factor family of ~15,000 proteins, one of which has a 50-residue regulatory subunit experimentally shown to switch between a -helical and b -sheet folds 4 . Our approach predicted that 25% of the sequences in this family undergo similar a -helix ⇌ b -sheet transitions, a frequency two orders of magnitude larger 25 than previously observed. Our predictions evade state-of-the-art computational methods but were confirmed experimentally by circular dichroism and nuclear magnetic resonance spectroscopy for all 10 assiduously chosen dissimilar variants. These results suggest that fold switching is a pervasive mechanism of transcriptional regulation in all kingdoms of life and imply that


Main Text:
For over 60 years, biological science has been heavily influenced by the protein folding paradigm, which asserts that a protein assumes one fold specified by its amino acid sequence 5 . Fold-switching proteins challenge this paradigm by remodeling their secondary and tertiary 5 structures and changing their functions in response to cellular stimuli 2 . These proteins regulate diverse biological processes 6 and are associated with human diseases such as cancer 7 , malaria 8 , and COVID-19 9 . Nevertheless, the ostensible rarity of fold switching leaves open the question of whether it is a widespread molecular mechanism or a rare exception to the well-established rule. 10 A major barrier to assessing the natural abundance of fold-switching proteins has been a lack of predictive methods to identify more. Whereas computational methods for rapid and accurate prediction of secondary and tertiary structure for single-fold proteins have been established [10][11][12] , methods to simply classify fold switchers have lagged. This comparative lack of progress arises from the small number of experimentally observed fold switchers (<100), 15 hampering the discovery of generalizable characteristics that distinguish them from single folders. As a result, essentially all naturally occurring fold switchers have been discovered by chance 13 .
Here we use a sequence-based approach 14,15 to assess the prevalence of fold switching in the NusG protein superfamily, the only family of transcriptional regulators known to be conserved 20 from bacteria to humans 16 . Housekeeping NusGs (hereafter called NusGs) exist in nearly every known bacterial genome and associate with transcribing RNA polymerase (RNAP) at essentially every operon, where they promote transcription elongation. By contrast, specialized NusGs (NusG SP s), such as UpxY, LoaP, and RfaH, promote transcription elongation at specific operons only 17 . Atomic-level structures of NusG and RfaH have been determined (Fig. 1a). They share a 25 two-domain architecture with an N-terminal NGN domain that binds RNAP, and a C-terminal broll domain. By contrast, the C-terminal domain (CTD) of Escherichia coli RfaH switches between two disparate folds: an a-helical hairpin that inhibits RNAP binding except at operon polarity suppressor (ops) DNA sites and a b-roll that binds the S10 ribosomal subunit, fostering efficient translation 4 . This reversible change in structure and function is triggered by binding to 30 both ops DNA and RNAP 18 .

Pervasive fold switching is predicted in the NusG superfamily
Profile-based methods identify similar conservation patterns in the amino acid sequences of E. coli RfaH and NusG and thus predict that they assume the same folds (Fig. 1b). To circumvent this problem, we developed an approach that compares the secondary structure Profile-based methods fail to identify structural differences between full-length NusG and RfaH because both proteins have similar conservation patterns. Vertical gray bars indicate positions of conserved amino acids. (c). Variable-length secondary structure propensity comparison identifies structural differences between single-folding NusG and fold-switching RfaH. Secondary structure propensities of both the full-length and cropped (CTD) sequences of NusG (above) and RfaH (below) are determined using JPred4. Typically JPred4 is run on full-length sequences only ("standard" in gray box To test the generality of our secondary-structure-based approach, we collected 15,516 nonredundant NusG/NusG SP sequences and tested our approach on each hit with a long enough CTD to make predictions (Methods), totaling 15,195 sequences. In total, 25% of proteins in the NusG superfamily were predicted to switch folds, a considerable subpopulation with over 3500 sequences.
To estimate the false-negative and false-positive rates of these predictions, we exploited known operon structures of NusG and several specialized homologs 17 as an orthogonal method to 10 annotate sequences as NusGs or NusG SP s. We mapped the sequences used for prediction to sequenced bacterial genomes (Methods) and analyzed each sequence's local genomic environment for signatures of co-regulated genes. Of the 15,195 total sequences, 5,435 mapped to contexts consistent with housekeeping NusG function. Only 30 of these were predicted to switch folds, suggesting a false-positive rate of 0.6% for fold-switch predictions. Performing a similar calculation in 1078 previously identified RfaHs 17 (Supplementary Table 1), 31 were predicted single folders. These results suggest that fold switching is widely conserved among RfaHs, which, if correct, indicates a false positive rate of 3% (31/1078). Of the remaining 8,223 sequences with high-confidence predictions (Methods), 30% were predicted to switch folds.

Experimental validation of fold-switch predictions
A representative group of variants with dissimilar sequences was selected for experimental validation. First, all NusG-superfamily sequences were clustered and plotted on a force-directed graph, hereafter called NusG sequence space (Figure 2a Table 1). The map of this space, in which clusters with higher sequence similarity are grouped closer in space, revealed that some putative fold-switching/single-folding nodes cluster together within sequence space (upper/lower groups of interconnected nodes), while other regions had mixed predictions (left/right groups of interconnected nodes). Candidates selected for experimental validation came from distinct nodes, had diverse genomic annotations, and originated Circular dichroism (CD) spectra of 10 full-length variants were collected. We expected the spectra of fold switchers to have more helical content than single folders because their CTDs have completely different structures (RfaH: all a-helix, NusG: all b-sheet), while the secondary 35 structure compositions of their single-folding NTDs are expected to be essentially identical. E. coli RfaH (variant #3) and E. coli NusG (variant #9) were initially compared because their atomiclevel structures have been determined 20,21 . As expected, their CD spectra were quite different (Extended Data Fig. 4a): E. coli RfaH had a substantially higher a-helix:b-strand ratio (1.1) than E. coli NusG (0.54) -consistent with solved structures (Fig. 2b, variants #3 and #9). 40 All remaining predictions were also consistent with their corresponding CD spectra (Figure 2b, Supplementary Table 2). Specifically, five predicted fold switchers had RfaH-like CD spectra, suggesting ground-state helical bundle conformations: two RfaHs (variants #2, #6), a LoaP (variant #1), an annotated NusG (variant #4), and an annotated "NGN domain-containing We then assessed whether putative fold-switching CTDs could assume b-sheet folds in addition to the a-helical conformations suggested by CD. Previous work 4 has shown that the fulllength RfaH CTD folds into an a-helical hairpin while its isolated CTD folds into a stable b-roll. Thus, we determined the CD spectra of five isolated CTDs: three from putative fold switchers and 5 two from putative single folders. All of them had low helical content and high b-sheet content (Extended Data Fig. 4b), strongly suggesting that the CTDs of all three predicted fold switchers can assume both a-helical hairpin and b-roll topologies.
Two variants were then characterized at higher resolution using nuclear magnetic 10 resonance (NMR) spectroscopy. Previous work 4 has shown that the isolated CTD of RfaH has a significantly different 2D 1 H-15 N HSQC spectrum than full-length RfaH, whose CTD folds into an a-helical hairpin. Thus, we conducted similar experiments on one single-folding variant (#8) and one putative fold switcher (variant #5). The backbone amide resonances of the full-length and CTD forms of variant #8 were 98% superimposable, whereas the full-length and CTD forms of 15 variant #5 shared only 7/58 common backbone amide peaks (Fig. 2c). This result demonstrates that, as predicted, variant #8 does not switch folds.
It is also consistent with the prediction that variant #5 switches folds because large backbone amide shifts 20 indicate either refolding or a large change in protein interface. Both occur in foldswitching RfaH but not in single-folding NusG. Subsequently, assigned backbone amide resonances were used to characterize 25 the secondary structures of both CTD variants at higher resolution (Extended Data Fig. 4c, Supplementary Table 3). Both were consistent with the b-roll fold, all nodes with 75 sequences or fewer are the same (smallest) size. Edges connecting the graph represent an average aligned identity between the sequences in two nodes ≥24%. Nodes labeled in teal/red were predicted to be fold switchers/single folders, on average; gray nodes contained only sequences with low-confidence predictions. (b). Fraction of a-helix:b-sheet measured from CD. Dotted line (1.0) represents the minimum ahelix:b-sheet ratio for RfaH-like spectra. All ratios for predicted fold switchers are above the cutoff; all ratios for predicted single folders fall below. Numerical labels shown in (a) correspond to variant numbers. Numbers shown on a log2 scale. (c). The 1 H-15 N HSQCs of fulllength and CTD variants of a putative single-folder (Variant #8) are nearly superimposable (98% overlap), while the HSQCs of full-length and CTD variants of a putative fold switcher (Variant #5) differ significantly (12% overlap).  105 and is also made available for use under a CC0 license.
(which was not certified by peer review) is the author/funder. This article is a US Government work. It is not subject to copyright under 17 USC These results, though a very small proportion of the sequences in this superfamily, support the accuracy of our predictions and indicate that: (1) Some, but not all, NusG SP s besides RfaH probably switch folds. Specifically, full- 5 length LoaP (variant #1), which regulates the expression of antibiotic gene clusters 22 , had an RfaH-like CD spectrum, whereas full-length UpbY, a capsular polysaccharide transcription antiterminator from B. fragilis (variant #7), appears to assume a NusGlike fold.
(2) Some annotated NusGs have RfaH-like CD spectra (variant #4), the result of incorrect 10 annotation. Indeed, the genomic environment of variant #4 (Methods) suggests that is a UpxY, not a NusG.
To benchmark the performance of our secondary-structure-based approach, we assessed whether machine learning and template-based methods could also distinguish between fold 20 switchers and single folders in the NusG superfamily. Specifically, we tested AlphaFold2 11 , Robetta 24 , EVCouplings 25 , and Phyre2 26 on variants #1-6, whose CD spectra were all RfaH-like and were thus presumed to switch folds. All methods predicted only one conformation per variant, (Extended Data Fig. 5), almost all of which were b-sheet except for AlphaFold2's predictions of E. coli RfaH (variant #3), whose experimentally determined structure 20 was in its training set, and 25 variant #6, whose sequence is nearest and best connected with E. coli RfaH in Sequence Space (Figure 2a). All predictions were generated using multiple sequence alignments containing mixtures of RfaH and NusG sequences, and the predicted amino acid contacts from Robetta and EVCouplings corresponded with the NusG-like b-roll fold (Extended Data Fig. 6). These results suggest that b-roll couplings present in both single-folding and fold-switching sequences might 30 overwhelm any a-helical couplings unique to fold-switching sequences.
We then performed coevolutionary analysis on a subset of sequences that our approach predicted to switch folds (Methods). Specifically, we clustered putative fold switchers by their secondary structure predictions and did coevolutionary analysis on the cluster containing the E. 35 coli RfaH sequence using GREMLIN 27 . The residue-residue contacts generated from these sequences differed substantially from the NusG-like couplings generated before (Figure 3). Furthermore, GREMLIN couplings calculated from the alignments used by EVCouplings and Robetta corresponded with the b-roll fold only (Extended Data Fig. 6), demonstrating that the JPred-filtered sequence alignment-not the GREMLIN algorithm-was responsible for the 40 discovery of alternative contacts.
This analysis of putative fold-switching CTDs indicates evolutionary coupling of residue-residue contacts unique to two distinct folds. For the a-helical fold, six intrahelical hydrophobic contacts and one set each of interhelical contacts, strand-helix contacts, and helix-capping contacts were observed (Fig. 3).
Overall, 96% of interhelical contacts were hydrophobic, 94% of helix-capping residues could potentially form an i-4ài or iài backbone-to-sidechain hydrogen bond, 85% of residues in the helix- 5 loop interaction had a charged residue in one position, but not both, and 80% of residues in intrahelical contact a were both hydrophobic. The remaining contacts gave more mixed results, perhaps due to hydrophobic residues 10 contacting the hydrophobic portion of their hydrophilic partners. Contacts from the broll fold, identified by both GREMLIN and EVCouplings/Robetta, were categorized as Coulombic and hydrophobic (Extended 15 Data Fig. 7). Previous work has shown that interdomain interactions also contribute significantly to RfaH fold switching 4 . Unfortunately, these interactions could not be identified by coevolutionary analysis 20 (Extended Data Fig. 8), a likely result of the limited number of JPred-filtered sequences available. Couplings that do not correspond to experimentally observed contacts are shown as light triangles. Categories of amino acid contacts from both folds use the alphabetically labeled contacts in the plot above them.

Fold-switching CTDs are diverse in sequence, function, and taxonomy
It might be reasonable to expect foldswitching CTD sequences to be relatively homogeneous, especially since variants of another fold switcher, human XCL1, lose 5 their ability to switch folds below a relatively high identity threshold (60%) 28 . The opposite is true. Sequences of putative fold-switching CTDs are significantly more heterogeneous (20.4% mean/19.4% median 10 sequence identity) than sequences of predicted single folders (40.5% mean/42.5% median sequence identity, Fig. 4a).
Furthermore, fold-switching CTDs were predicted in most bacterial phyla, and many 20 were predicted in archaea and eukaryotes as well (Fig. 4c, Supplementary Table 4). These results suggest that many highly diverse CTD sequences can switch folds between an a-helical hairpin and a b-roll in 25 organisms from all kingdoms of life.
Why might the sequence diversity of fold-switching CTDs exceed those of single folders? Functional diversity is one 30 likely explanation 29 . Previous work has shown that NusG SP s drive the expression of diverse molecules from antibiotics to toxins 17 . Our approach suggests that many of these switch folds. Furthermore, since 35 helical contacts are conserved among at least some fold-switching CTDs, it may be possible that CTD sequence variation is less constrained in other function-specific positions. The fold-switching mechanism of RfaH allows it to both regulate transcription and expedite translation, presumably quickening the activation of downstream genes. Fold-switching NusG SP s are likely 40 under strong selective pressure to conserve this mechanism when the regulated products control life-or-death events, such as the appearance of rival microbes or desiccation. Supporting this possibility, NusG SP s usually drive operons controlling rapid response to changing environmental conditions such as macrolide antibiotic production 22 , antibiotic-resistance gene expression 17 , virulence activation 30 , and biofilm formation 31 . Numbers next to taxa represent #predicted fold switchers/#total sequences. Gray branches represent unidentified common ancestors, since the evolution of fold-switching NusGs is unknown. Dotted lines represent lower-confidence predictions since fold switching has not been confirmed experimentally in archaea and eukaryota. Fold-switching/single-folding predictions are represented by teal/red colorings; predictions in branches with fewer than 10 sequences are gray. 105 and is also made available for use under a CC0 license.
(which was not certified by peer review) is the author/funder. This article is a US Government work. It is not subject to copyright under 17 USC Our approach was sensitive enough to predict fold-switching proteins, setting it apart from other state-of-the-art methods. These other methods assume that all homologous sequences adopt the same fold, as evidenced by their use of sequence alignments that contained both fold-switching and single-folding sequences. These mixed sequence alignments biased their predictions. While those predictions are partially true since both fold-switching and single-folding CTDs can fold into 5 b-rolls, they miss the alternative helical hairpin conformation and its regulatory function 16 . Computational approaches that account for conformational variability and dynamics, a weakness in even the best predictors of protein structure 11 , could lead to improved predictions. This need is especially acute in light of recent work showing how protein structure is influenced by the cellular environment 32 , and it could inform better design of fold switchers, a field that has seen limited success 33-35 .
Our results indicate that fold switching is a pervasive, evolutionarily conserved mechanism. Specifically, we predicted that 25% of the sequences within a ubiquitous protein family switch folds and observed coevolution of residue-residue contacts unique to both folds.

15
This sequence-diverse dual-fold conservation challenges the protein folding paradigm and indicates that foundational principles of protein structure prediction may need to be revisited.
The success of our method in the NusG superfamily suggests that it may have enough predictive power to identify fold switching in protein families where only single folders have been 20 observed. Such predictions would be particularly useful since many fold switchers are associated with human disease [6][7][8][9] . Given the unexpected abundance of fold switching in the NusG superfamily, there may be many more unrelated fold switchers to discover. (which was not certified by peer review) is the author/funder. This article is a US Government work. It is not subject to copyright under 17 USC Data and materials availability: All data and code can be found at: https://github.com/porterll/sequence_space. Constructs for protein expression are available upon 5 request.

Methods
Identification of NusG-like sequences NusG-like sequences were identified from the October 2019 Uniprot90 36 database using an 10 iterative BLAST 37 approach. Specifically, the E. coli RfaH sequence (Uniprot ID Q0TAL4) was BLASTed against the database. All hits with a maximum e-value of 10 -4 were aligned using Clustal Omega 38 , which generated their sequence identity matrices from the resulting alignment. Sequences were clustered by their identities using the agglomerative clustering algorithm from the python module scikit-learn 39 . Sequence identity between proteins in each cluster was ≥ 78%.

15
Randomly selected sequences from the 25 largest clusters were then individually BLASTed against the Uniprot90 database, and the resulting hits were combined; redundant identical hits from independent searches were removed. This procedure (search-align-cluster) was repeated two additional times to generate the full list of 15,516 sequences in 305 clusters. 20 Determination of CTDs Sequences of annotated RfaHs were aligned to the sequence of E. coli RfaH (Uniprot ID Q0TAL4) using Clustal Omega 38 . CTDs were defined as up to 50 residues, but not shorter than 40 if the CTD region comprised <50 residues, beginning with the positions that aligned to the RfaH sequence KVIIT. Sequences of proteins not annotated as RfaH were aligned to the E. coli NusG 25 sequence (Uniprot ID P0AFG0) using Clustal Omega. CTDs were defined as 50 residues beginning with positions that aligned the NusG sequence EMVRV. Because of their diversity, sequences from each individual cluster were aligned against the NusG sequence separately, each using Clustal Omega. The number of sequences with CTDs long enough to make these predictions totaled 15,195 (Supplementary Table 1), 98% of all NusG-like sequences identified. 30 JPred4 predictions JPred4 19 predictions were carried out as in 14 , sections 2.4 and 2.6. In further detail, they were first performed on all 50-residue CTD sequences using two databases: the JPred database (http://www.compbio.dundee.ac.uk/jpred/about_RETR_JNetv231_details.shtml) from 2014 35 and the Uniprot90 database from January 2021. Sequences of each prediction were aligned against the E. coli NusG sequence (beginning with EMVRV) using Biopython 40 Bio.pairwise2.localxs with gap opening/extension scores of -1.0/-0.5. Secondary structure predictions of the sequence in question and of E. coli NusG were reregistered according to the resulting pairwise alignments and compared as in 14 . Predictions were considered high-confidence if at least 5 sequences were 40 in the MView 41 -generated alignments used by JPred.
We found that the first 10 residues in these 50-residue sequences were similar enough to NusG CTDs that NusG-like sequences overwhelmed sequence alignments informing the predictions, and many likely fold-switching sequences were predicted to be single folders. To circumvent this problem, predictions from both databases were rerun on 40-residue sequences (starting with the first residue that aligned to ADFNG… for NusG sequences and FQAIF… for RfaH sequences). Predictions were made as with 50-residue sequences. All predictions reported in the main text were from 40-residue sequences, except those in Fig. 1b. 5 Force-directed graph The 305 clusters generated from all full-length NusG sequences were plotted on a force-directed graph using the spring_layout function from python NetworkX 42 with a spring constant of 0.3 and 1000 iterations. Nodes with ≥50% of sequences predicted to switch folds were colored teal; nodes 10 with <50% of sequences predicted to switch folds were colored red. Nodes with no predictions were colored gray. Nodes 1 and 7 were colored differently from their average predictions (single folding, Node 1; fold-switching, Node 7) to highlight the prediction of the sequence validated experimentally, which differed from the average. Edges represented average pairwise identities between nodes ≥24%, a threshold taken from 43 for sequences of 162 residues (the length of E. coli RfaH).

Genomic analysis of sequences
The annotated genomes (protein .fasta and .gtf annotation) of 31,554 bacterial species were downloaded from Ensembl Bacteria in April 2021. Genomic annotation of NusG was defined as 20 being within 10 kb of a gene annotated as either "SecE," "RplK," "RplA," or "ribosomal protein L11" by text matching. Most bacterial genomes are incompletely assembled and annotated -the genes were required to be within the same chromosome, contig, or plasmid. Each Uniprot sequence in the database of 15,516 was mapped to an Ensembl locus if the species was consistent, and if sequence identity was greater than 90%. Annotation was fetched from Ensembl, as well -this was 25 usually, but not always, consistent with the Uniprot annotation.
Of the 15,516 Uniprot sequences, 7975 mapped to Ensembl genomes. Cursory analysis of some non-mapping sequences suggested that: 1) some Ensembl genomes had incomplete collation of all ORFs, and 2) there were frame-shifts and other errors in some Uniprot sequences and some Ensembl genomes. This was also the case for some of the sequences predicted to potentially be 30 fold-switching NusGs: for instance, Uniprot entry A0A0T8ANM4 is frame-shifted relative to the Ensembl genome, producing a C-terminal sequence predicted to switch folds.
Of the 5,435 sequences that mapped to Ensembl loci with SecE/RplK/RplA within 10kb, only 22 had a separation of >1kb, and only 59 had a separation of >270bp -this set of 59 includes 4 proteins predicted to be fold-switching, one of which is a verified RfaH from 17 , indicating that 35 a shorter threshold of distance to SecE/RplK/RplA, perhaps coupled with determining distance several other conserved NusG-SecE operon genes, could reduce the false-positive rate caused by mistakenly annotating NusG SP s as housekeeping NusGs.
For a small number of sequences that mapped to qualitatively dissimilar genes (e.g., one genomically consistent as being a NusG, another not), the 2 nd mapping is given in Data S1, 40 beginning in column AH.
Additionally, of the 600 RfaH sequences that mapped to an annotated Ensembl locus, only one fell within a NusG-like operon (~7kb away).
Expression and purification of variants 1-16 All variants were ordered from IDT as gBlocks. Except for variant #8, these variants were digested with HindIII and EcoRI and ligated into the pPAL7 vector (Bio-Rad) with an N-terminal 6-His tag cloned using a Q5 mutagenesis kit (New England Biolabs). Variants were transformed into E. coli BL21-DE3 cells (New England Biolabs), grown in LB at 37° to an OD600 of 0.6-0.8, after which they were incubated at 20°C for 30 minutes, induced with 0.1 mM IPTG, and grown overnight, shaking at 225-250 rpm. Variant #8 was cloned into the same vector as the other variants using In-Fusion and expressed as the other variants but at 18°C instead of 20°C. The cells from all 5 cultures were pelleted at 10,000xg for 10 minutes at 4°C, resuspended in 2 mL lysis buffer (50 mM Tris, 150 mM NaCl, 5% glycerol, 1 mM DTT, 10 mM imidazole, pH 8.7) and frozen at -80°C for later purification. Sequencing of all variants was verified by Psomagen.
Thawed cell pellets were resuspended in 25 mL lysis buffer per 1 L of culture grown. 100 mg of 10 DNAseI, 5 mM CaCl2, 5 mM MgSO4 and 1/2 of a cOmplete EDTA-free protease cocktail inhibitor tablet (Roche) were added per 25 mL of lysis buffer. Cells were lysed by 2 passes through an EmulsiFlex-C3 homogenizer (Avestin). The homogenized lysate was centrifuged for 45 minutes at 40,000xg at 4°C, and its soluble fraction was loaded immediately onto either a 1 mL Ni column (GE HisTrap HP) or an Econo-Pac (Bio-Rad) gravity column with 0.5-1 mL IMAC Ni Resin (Bio- Nickel-purified samples were then loaded onto 1-or 5-mL Profinity eXact 44 columns (Bio-Rad), washed twice with one column-volume of 2M NaOAc, and eluted with 100 mM phosphate, 10 mM azide, pH 7.4 at 0.2 mL/minute. Cleavage kinetics for some variants (1, 4, and 6) were too 25 slow to get adequate tagless protein. In these cases, columns were equilibrated with 100 mM phosphate, 10 mM azide, pH 7.4 overnight at 4°C. Tagless protein was concentrated in 10 kDa MWCO concentrators (Millipore), and the buffer was exchanged to 100 mM phosphate, pH 7.4. A small amount of high-molecular-weight impurity (<10% of the sample) from variants #1 and #4 was removed by running the tagless sample through a 50 kDa MWCO concentrator (Millipore) 30 and keeping the low molecular weight fraction that passed through the filter. Sample purities were assessed by gel electrophoresis (Thermofisher NuPAGE 4-12% Bis-Tris gels, Thermofisher MES buffer, Bulldog Bio Coomassie Stain), and concentrations were measured on a NanoDrop OneC (Thermo Scientific). 35 Circular dichroism (CD) spectroscopy All CD spectra were collected on Chirascan spectrometers (Applied Photophysics) in 1 mm quartz cuvettes in 100 mM phosphate, pH 7.4. Protein concentrations ranged from 8-12 mM, and scan numbers ranged from 5-10. Scans were averaged, and averaged baselines of buffer-blank 1 mm cuvettes were subtracted from the spectra. The resulting spectra were converted to units of Molar 40 Residue Ellipticity [ ]MRE using the following formula: where is the ellipticity measured by the instrument, is the extinction coefficient determined by Expasy Protparam 45 (https://web.expasy.org/protparam/), L is the path length of the cuvette, N is the number of amino acids, and *+, is the absorbance at 280 measured by a Nanodrop One 45 (Thermo Scientific).

CTDs of variants #5 and #8
Full-length variants #5 and #8 were shortened to 64 and 68 residues, respectively, using Q5 mutagenesis (New England Biolabs). Their sequences were confirmed by Sanger sequencing (Psomagen) and are reported in Supplementary Table 2.
Expression and purification of NMR samples Based on the protocols in 47-49 , BL-21 DE3 cells (New England Biolabs) expressing all NMR 10 samples were grown in LB to an OD600 of 0.6 and pelleted at 5000xg for 30 minutes at 4°C. The pellets were resuspended in 1X M9 at half of the initial culture volume and pelleted at 5000xg for 30 minutes at 4°C. Pellets were then resuspended at ¼ initial culture volume in 2X M9, pH 7.0-7.1, 1 mM MgSO4, 0.1 mM CaCl2, with 1 g 15 NH4Cl/L, and 4 g of either unlabeled or 13 C-labeled glucose (Cambridge Isotope Laboratory)/L and equilibrated at 20°C for 30 min, shaking at 225 rpm, then induced with 1 mM IPTG and grown overnight. Cells were pelleted at 10,000xg for 10 minutes at 4°C. All labeled variants were purified by FPLC (ÄKTA Avant 25) using the same methods as variants 1-16 above in 5 mL HisTrap HP columns (Cytiva) and 5 mL Profinity eXact columns (BioRad).
20 1 H-15 N HSQCs of variants #5 and #8 All spectra were collected on Bruker Avance II 600 MHz spectrometers equipped with z-gradient cryoprobes and processed with NMRPipe 50 . Variant #8 (full-length and CTD) and variant #5 CTD HSQCs were collected in 100 mM phosphate, pH 7.4 at 298 K. Under those conditions the spectrum of full-length variant 5 was broad, even with 1 mM DTT added, but peaks narrowed 25 upon changing the buffer conditions to 25 mM HEPES, 50 mM NaCl, 5% glycerol, 1 mM DTT, pH 7.5, and collecting the spectrum at 303K. Protein concentrations ranged from 100-300 µM.
Assignments of KCTD and TCTD 13 C-labeled 5CTD and 8CTD were expressed and purified as above. For each variant, HNCACB, 30 CBCA(CO)NH, and HNCO experiments were collected on Bruker Avance II 600 MHz spectrometers with cryoprobes. Spectra of 8CTD (80 µM) were collected using nonuniform sampling and were processed with SMILE 51 . All NMR spectra were processed using NMRpipe 50 . Resonances were assigned manually with NMRfam Sparky 52 , and secondary structures were determined using TALOS+ 53 .

35
Coevolutionary analysis Structure predictions of the 6 fold-switching variants were calculated by entering their full-length sequences (Supplementary  High-confidence predictions for shorter sequences of 40 or 50 residues could not be obtained from either EVCouplings or Robetta. Predicted residue-residue contacts of E. coli RfaH from 45 EVCouplings/Robetta with probabilities ≥ 99%/92% were plotted in Extended Data Fig. 4a&b, and residue-residue contacts from GREMLIN 27 with probabilities ≥90% were plotted in Fig. 3.
These thresholds were determined by maximizing the ratio of true positives to false positives. True positives were considered to be couplings with heavy atoms within 5.0 Å in either the 2OUG or the 2LCL crystal structures where at least one of the 2 heavy atoms was from a side chain; one additional contact between residues 140 and 151 was added because they were separated by 5.2 Å within the NMR structure and therefore likely within error of 5.0Å. Contacts were considered

20
GREMLIN webserver analyses were run on EVCouplings and Robetta multiple sequence alignments seeded with the sequence of E. coli RfaH. These alignments were taken from EVCouplings align and Robetta .msa.npz files. No additional iterations of HHPred were run on either alignment. Coverage and remove gaps filters were both set to 75.

25
Pairwise sequence identities Pairwise sequence identity matrices of predicted fold-switching/single-folding CTDs were calculated using Geneious. The alignments for these sequences were first manually curated to remove sequences that did not align well with the majority; manually curated alignments retained at least 98% of all sequences. The mean/median sequence identities of these two groups were 30 determined from the upper triangular matrices of each matrix, excluding positions of identity, using numpy 57 . Pairwise sequence identity matrices of the CTDs of the 10 variants were determined with Clustal Omega.
Phylogenetic tree 35 The tree in Figure 4C was generated by downloading the Interactive Tree of Life 58 (https://itol.embl.de/itol.cgi), loading it into FigTree 59 , and collapsing branches at the phyletic level, except for Proteobacteria, which were left at the class level because of recent phylogenetic work on proteobacterial RfaH 17 . 40 Bacterial species from each NusG sequence were obtained from their Uniprot headers. These species were mapped to their respective phyla using TaxonKit 60 and matched with their predictions. Phyla with fold-switching/single-folding predictions were listed using a python script, and branches of the tree were then colored manually in Adobe Illustrator. Experimentally validated variants from two phyla did not show on the dendrogram in Figure 4: Candidatus 45 Kryptonia and Deferribacteres. They were grouped with Bacteroidetes and Deltaproteobacteria, respectively, their nearest neighbors 61,62 shown in the tree.
Eukaryotic and archaeal NusG homologs were obtained by running 3 rounds of PSI-BLAST on the nr database with the following seed sequences: L1IE32, A0A0N95N5M7, UPI0005F5777A, A0A2E6HKN0. Redundant sequences were removed using CD-HIT 63 at a 98% sequence identity threshold (at least 1 amino acid difference). 5 Figures Figures 1C, 2A, 2B, 3A, 3B, 4A, and 4B were generated using Matplotlib 64 . The figures of all protein structures (Figures 1A and 3C) were generated using PyMOL 65 .
(which was not certified by peer review) is the author/funder. This article is a US Government work. It is not subject to copyright under 17 USC Distributions of prediction discrepancies for Uniprot-annotated RfaHs (a) and sequences not annotated as RfaH (b). Black dotted line is the cutoff point for fold-switching and single-folding predictions: predictions with ≥5% discrepancy to the E. coli NusG sequence were predicted to 5 switch folds. This cutoff was taken from Kim, et al. 14 . Because of the low threshold, experiments were performed on constructs just above/below the threshold (Constructs 1, 4, and 7, respectively, Supplementary Table 1, Fig. 2). For comparison, the y-axis of both plots was limited to 410 counts. All bins fell below that threshold except for the first bin of panel B, which had 11,032 counts (and thus is not shown to scale). 105 and is also made available for use under a CC0 license.
(which was not certified by peer review) is the author/funder. This article is a US Government work. It is not subject to copyright under 17 USC  Fig. 3.
All sequence space constructs tested. Constructs 1-10 are labeled as in Figure 2. Constructs 11-16 were tested, but CD spectra could not be obtained because they did not express (Constructs 11-13 and 15-16) or because they were insoluble (Construct 14). With the exceptions of Constructs 5 8-10, all labels are directly below the nodes from which sequences were selected. Teal/red nodes: predicted to/not to switch folds on average; no high-confidence predictions were made for gray nodes. More information about each construct can be found in Supplementary Table 2. Nodes 1 and 7 were colored differently from their average predictions (single folding, Node 1; foldswitching, Node 7) to highlight the prediction of the sequence validated experimentally, which Extended Data Fig. 4. (a) Circular dichroism (CD) spectra of two different E. coli RfaH preps differ significantly from two different E. coli NusG preps. By contrast, CD spectra of the two different preps of both RfaH and NusG are nearly identical to one another. (b-c) TALOS+ secondary structure predictions of 5 the assigned CTDs of Variant 8 (b) and Variant 5 (c). Plots suggest that both CTDs fold into structures with 5 b-sheets, consistent with the NusG b-roll fold. (d) CD spectra of 5 CTDs fold predominantly into b-sheets. All variants were estimated to have 27.3% (2)-36.2% (3) b-strand content, while a-helical content ranged from 0.03% (5)-8.4% (2). Like variants 2 and 3, variant 5 appears to switch folds. Secondary structure content was estimated by the BestSel server 46 . CTDs of the lowest-energy models for 6 proteins with RfaH-like folds (helical hairpin) are predicted assume b-sheet folds, including E. coli RfaH (Construct 3), which has an experimentally validated structure. CTDs are colored burgundy (AlphaFold2), blue (Robetta), orange (EVcouplings), green (Phyre2) GREMLIN couplings calculated from EVCouplings (a) and Robetta (b) sequence alignments largely match contacts from the experimentally determined b-roll fold (red, PDB ID 2LCL) but did not match any contacts unique to the helical hairpin fold (teal, PDB ID 2OUG_A). 105 and is also made available for use under a CC0 license.
(which was not certified by peer review) is the author/funder. This article is a US Government work. It is not subject to copyright under 17 USC  Fig. 7 The single-fold paradigm biases protein structure predictions. EVCouplings and Robetta identify conserved residue-residue contacts (gray circles) corresponding to the b-roll fold of E. coli RfaH (PDB ID: 2LCL, red circles) but not the a-helical hairpin fold (PDB ID: 2OUG, teal 5 circles). By contrast, secondary-structure-based predictions identified contacts from both the broll in common with EVCouplings and/or Robetta (gray circles) and the a-helical hairpin folds (gray stars). Faded triangular couplings do not correspond to either experimentally determined fold. Italicized letters correspond to individual contacts observed in the b-roll fold. Contact categories and their corresponding letters are shown below.

(r,v,x,y) (n-q,s-u,w)
JPred-filtered couplings of putative full-length fold switchers calculated by GREMLIN. No interdomain contacts (found within red boxes) were consistent with the experimentally determined structure of full-length RfaH (PDB ID: 2OUG).
10 105 and is also made available for use under a CC0 license.
(which was not certified by peer review) is the author/funder. This article is a US Government work. It is not subject to copyright under 17 USC