All clonal E. coli plasmid DNA was purified from 5 mL cultures as described above using miniprep reagents from Qiagen, or from 1 L cultures using maxiprep reagents from Qiagen. Plasmid libraries recovered in E. coli were maxiprepped from 1 L cultures or from cells scraped off plates. Liquid cultures were generally pelleted by centrifugation at 4000 x g for 5–15 min when prepping DNA. Scraped cells were resuspended in 2xYT broth and centrifuged for 15 min at 4500 × g, then aliquoted for maxiprepping (≤1.0 g of pellet mass per maxiprep). To extract DNA from co-transformant pools for deep sequencing, cells were similarly scraped and harvested but aliquoted for miniprepping (≤0.2 g of pellet mass per miniprep). Most PCR fragments used for cloning were generated with Phusion polymerase (Thermo). Taq (NEB) or GoTaq Green (Promega) were used to generate amplicons ≤1.5 kb for colony PCR and deep sequencing, or when a cloning fragment could not be obtained with Phusion. The round 1 PID library and randomized PAM library inserts were generated with Expand (Roche). Manufacturers’ recommended cycling conditions were generally followed for PCRs, except as noted for library inserts obtained with degenerate oligos, or for yeast colony PCRs where 90 s annealing times were used with GoTaq. Yeast colony lysates were generated by resuspending cells in 40 µl NaOH (20 mM), boiling for 7 min, and then centrifuging to pellet the cell debris; 2 µl of the resulting supernatants were used to seed GoTaq PCR reactions. To screen the round 1 PID library in yeast, inserts were re-amplified from the unselected plasmid library and pooled from 24 parallel reactions carried out with Phusion and 12 standard cycles. The round 3 VRKG library insert for screening in yeast was generated by equimolar pooling of two error-prone PCR reactions templated on the pGG403 plasmid at different concentrations (either 6 ng or 30 ng), using the GeneMorph II (Agilent) kit. All restriction-digested plasmid backbones, as well as insert pools used for library ligations in bacteria or assemblies in yeast, were purified from gel-excised bands using either Zymoclean Large Fragment kits (Zymo) or MinElute kits (Qiagen). All other DNA extracted from gels or PCR reactions was purified using Qiagen reagents and MinElute (Qiagen), SpinSmart (Denville), or EconoSpin (Epoch) columns.

Except during library building procedures or as otherwise noted, chemically competent XL1-Blue or TOP10 cells were used for plasmid cloning throughout this work. Occasionally, clones were obtained from electrocompetent XL1-Blue cells by dialyzing Gibson-assembled DNA samples on 0.025 µm membrane filters (Millipore) prior to electroporation. All electroporations were carried out using an Eppendorf Electroporator 2510 configured for 1800 V and 0.1 cm cuvettes (USA Scientific) containing 80 µl of cells pre-mixed with ≤3 µl DNA.

Plasmids used for expression of ω-dCas9 or Cas9 variants in E. coli are all originally derived from the pB1H2_UV2-ω-dCas9_UV5-sgRNA plasmid with a sgRNA targeting the heterologous human codon-optimized EGFP (hEGFP) cassette of U2OS cells49. Expression of ω-dCas9 fusions is driven by an IPTG-inducible lacUV2 promoter, which is a variant of the lacUV5 promoter with two ‘down’ mutations in the −10 element (previously referred to as lacUV5m63); expression of sgRNAs is driven by a strong constitutive core promoter derived from lacUV5, but with a different spacer sequence between the −10 and −35 elements. This plasmid was built in multiple restriction/ligation steps from synthesized DNA originally bearing EcoRI/NheI restriction sites compatible with an EcoRI- and XbaI-digested backbone derived from pB1H2w2-zif268 (ref. 63 and Addgene #18045). The expected sequence of the final plasmid is provided with others in Supplementary Data 4. Unless noted otherwise, construction of each clonal plasmid was verified by Sanger sequencing across all recombinant junctions and all non-backbone regions derived from PCR products or commercially synthesized DNA fragments. The pB1H2_UV2-ω-dCas9::Kan_UV5-sgRNA derivative has an AgeI- and XbaI-flanked kanamycin resistance (KanR) cassette in place of ω-dCas9’s PID, and this plasmid was used as an acceptor vector for scarless ligation of the round 1 PID library insert saturated at positions 1332–1336. The library insert was generated by PCR using oligonucleotide sequences provided in Supplementary Data 5. All commercially synthesized ssDNA oligos and dsDNA fragments were purchased from Integrated DNA Technologies (IDT). Acceptor vector DNA was prepared from a dam-/dcm- host strain, C2925, to allow standard restriction digestion at the Dam-sensitive XbaI site. The round 2 random mutagenesis libraries were built from the pB1H2_UV2-ω-dCas9::K2re_UV5-sgRNA (K2re) plasmid, a re-designed acceptor vector with BsaI sites flanking the KanR cassette. Its BsaI sites produce custom backbone overhangs for scarless ligation with BsaI-digested library inserts generated by error-prone-PCR with oligos oGG732 and oGG738 (effectively mutagenizing residues 1101–1342 and part of the codon for 1100). The BsaI-based insert design ensured that parental plasmids used as PCR templates were not a source of unmutated insert fragments in the subsequent ligation step. The K2re plasmid is a derivative of the pB1H2_UV2-ω-dCas9::K2_UV5-sgRNA (K2) plasmid that was generated by Gibson-assembling DNA fragments with a BsaI-digested K2 backbone; in addition to the features described above, K2re harbors a synonymous substitution in the ampicillin resistance cassette of K2 that eliminates a BsaI site. The K2 plasmid was derived from pB1H2_UV2-ω-dCas9::Kan_UV5-sgRNA and harbors a Dam-insensitive XbaI site to allow preparation from XL1-Blue, but was not used for any libraries in this work. The mKG-d4 reversion series plasmids (pGG393-397) and VRKG equivalent (pGG403) were constructed by Gibson-assembling PCR fragments with a BsaI-digested K2re backbone. To purify ω-dCas9 plasmids directly from library isolates, which also contain reporter plasmids, plasmid DNA was miniprepped from the library isolates and used for transformation of chemically competent XL1-Blue cells. After plating on rich media supplemented with carbenicillin, 5 single colonies were patched on plates with carbenicillin and kanamycin or carbenicillin alone, and a CarbRKanS isolate was chosen for downstream miniprepping. Vectors for expression of catalytically active Cas9 variants in E. coli are derived from pGG399, which was initially constructed by Gibson assembling PCR fragments with a ~3.4 kb plasmid backbone liberated from K2re via MluI/XhoI digestion. pGG399 harbors BsaI sites for scarless cloning of spacers into the sgRNA scaffold; both PAM-depletion spacers were initially ligated as annealed oligos into a BsaI-digested pGG399 backbone. In E. coli, all catalytically active Cas9 variants were expressed as 1368-residue proteins lacking the N- and C-terminal fusions present in ω-dCas9 plasmids. In the final designs, Cas9 expression was enhanced by replacing the lacUV2 promoter with the lacUV5 promoter.

The E. coli reporter plasmids employed in this work have one or two hEGFP targets installed at the HIS3/GFP promoter as depicted in Fig. 1a and Supplementary Fig. 1b; the GFP cassette is a yeast codon-optimized version of EGFP that is not targeted by the hEGFP sgRNA. All constructs tested in Supplementary Fig. 1a, including the R25 plasmid and ‘No Target’ control, were cloned using EcoRI/AgeI-digested inserts and EcoRI/AgeI-digested backbones of the pGHUC plasmid described previously34; oligos used for generation of the single-target inserts are listed in Supplementary Data 5. All other reporter plasmids are derived from the R25 plasmid or its derivatives by ligating or Gibson-assembling DNA fragments with backbone DNA that included at least the sequences external to AgeI and NheI in pGHUC. The randomized PAM library was generated by ligating an AgeI/EcoRI-digested library insert with an AgeI/EcoRI-digested backbone of the pH3U3::Amp acceptor vector; this acceptor vector was derived from a pH3U3-based plasmid67 by replacement of AgeI/EcoRI-internal sequences with an AmpR cassette. The expected sequence of this library (with Ns representing randomized bases) is presented in Supplementary Fig. 7. The reverse primer employed for insert generation included a 20 bp randomized barcode that was utilized in PAM-depletion analyses. Clonal target plasmids for initial testing of the PAM-depletion spacers were generated with Gibson assembly using AgeI/EcoRI-digested backbone DNA from a random library clone isolated on rich media. This isolate was also used as a template for amplification of fragments from the AgeI/EcoRI insert region, with variable-PAM primers at the EcoRI junction.

S. cerevisiae vectors employed for constitutive expression of sgRNA and Cas9 components were all initially derived from two plasmids described previously68. The hEGFP sgRNA plasmid used for selection experiments, as well as the LYS2- or CAN1-targeting sgRNA plasmids used for knock-in of the SSA reporters, were each generated by Gibson-assembling a single bridging oligo with NotI-digested pNA0304 acceptor vector backbone. The pNA0306 Cas9 plasmid was used as a PCR template for amplification of backbone and human-codon-optimized Wt Cas9 fragments to generate the PID acceptor vector for round 1 selection experiments. This acceptor vector, pGG211, harbors a NheI/PspOMI-flanked KanR cassette in place of Cas9’s PID and was Gibson-assembled from gel-purified PCR products. Relative to the pNA0306 reference, a single synonymous mutation in the Cas9 ORF was identified at S145, but disregarded. Non-junction backbone sequences outside of the Cas9 region were not re-sequenced after this assembly. For yeast selection attempts in round 3, the Cas9-Zif268 acceptor vector (pGG442) was generated in two steps by Gibson-assembling fragments with restriction-digested backbone DNA that included at least the sequences external to NheI and XhoI sites in pGG211.

Vectors for expression of Cas9 and sgRNA components in human cells are derived, respectively, from the MSP469 and BPK1520 plasmids described previously7. Both plasmids were obtained through Addgene. The MSP469 plasmid encodes the VQR variant; to generate isogenic Wt, KG, VRKG, and VRVRFRR plasmids for testing with VQR, commercially synthesized and PCR-amplified linear DNA fragments were Gibson-assembled with an EcoRV/XhoI-digested backbone fragment from MSP469. Construction of the SpCas9-NRRH, SpRY, and ScCas9 plasmids was carried out similarly, but using a NotI/XhoI-digested backbone from MSP469. For SpCas9 plasmids, non-synonymous substitutions relative to MSP469 were designed to avoid rare codons (<10% frequency) based on human codon usage. For ScCas9, which contains >100 substitutions relative to SpCas9, a mosaic coding scheme was generated with the MSP469 background by transplanting codons present in the ScCas9 sequence available on Addgene (plasmid #117700, associated with ref. 13). To clone the sgRNA plasmids, annealed oligos were ligated into an Esp3I-digested BPK1520 backbone.