TITLE: DIMPLE library generation and assembly protocol v1.1
AUTHORS: Christian Macdonald, David Nedrud, Patrick Rockefeller Grimes, Donovan Trinidad, James Fraser, Willow Coyote-Maestas

[DESCRIPTION]
This is a protocol for generating and QCing mutagenic libraries using the DIMPLE protocol. This version is updated to include expanded descriptions of QC and to clarify certain steps.

[STEPS]
SECTION: Preparation
1. Use DIMPLE to generate mutagenic oligos and primers.

    
SECTION: Preparation
2. Important notes: DIMPLE breaks a gene up into sub-library fragments and generates mutagenic insert oligo pools, where each oligo contains barcodes, Type IIS restriction cutsites, and a sub-region of the gene. Be sure to review your library generation vector and gene sequences and look for pre-existing Type IIS restriction sites. Use site-directed mutagenesis to remove unwanted off-target sites. Also note that, by default, DIMPLE expects restriction enzymes with 6 bp recognition sites and 4 bp overhang lengths (as with BsaI and BsmBI).
SECTION: Preparation
3. Input wild type gene sequence: Input your gene sequence, including backbone, in fasta format. Place all genes to be mutagenized in the same fasta file. You can define which positions your genes start and end in the fasta header. Note that this uses 0 indexing: for example, if your first nucleotide is 884 on snapgene, use 883 in the fasta header). 
For example: >geneA start:35 end:250

  
*If you do not define your start & end position, the software will analyze different ORFs and ask you to define these positions.
  
It is important to include the plasmid backbone so that the software can avoid making primers that nonspecifically recognize a region outside of your gene.

  
SECTION: Preparation
4. Using the DIMPLE GUI
SECTION: Preparation
4.1. Working Directory: When you open the DIMPLE GUI, first designate your working directory. This is the folder you wish your mutagenic oligo & primer outputs to be saved in.
SECTION: Preparation
4.2. Target Gene File: Upload your gene fasta text file with the Target Gene File button.
SECTION: Preparation
4.3. Oligo length: Designate the length of your oligo. This will include the barcodes, Type IIS restriction cutsite, and a region of your target gene that will be mutagenized. So, target gene +50bp.
SECTION: Preparation
4.4. Fragment length: You can adjust the length of your fragments, we recommend leaving the fragment length set to auto.

DIMPLE will automatically break up your gene into roughly the same fragment sizes, and will determine which lengths work best to avoid matching overhangs.
SECTION: Preparation
4.5. Fragment overlap: The number of base pairs shared between sub-regions. We have seen that setting overlap to 0 base pairs leads to errors. The overlap is set to 4 base pairs by default.
SECTION: Preparation
4.6. Barcode start position: The software selects from a set pool of barcodes when designing oligos. You can define which number barcode in the list this starts from.
SECTION: Preparation
4.7. Type IIS restriction sequence: You can select which Type IIS restriction cutsite you'd like to append to your inserts and backbone. You can choose between the BsmBI (CGTCTC) or BsaI (GGTCTC) sequences.

SECTION: Preparation
4.8. Sequences to avoid: This will allow the code to design fragments without the cutsite you selected in the Type IIS restriction sequence section. If there is an error when running, this implies you have a cutsite in your gene or vector that needs to be removed.
 

SECTION: Preparation
4.9. Codon usage: Your oligos can be codon optimized to your organism of choice. The default options are E. coli or Human, but you can also upload a codon usage table for any organism by pressing "Custom codon usage."
SECTION: Preparation
4.10. Select mutations:

Deletions: If you'd like to generate a library with deletions across your gene, select "List of deletions". Enter how many base pairs you'd like to be deleted across your library.
For example, if you'd like deletions that are one codon long, enter "3" for 3 nucleotides.
For example, If you'd like to include both deletions that are one codon long AND two codons long in the same pool, enter "3,6" for both 3, and 6 nucleotide long deletions.

Insertions: If you'd like to generate a library with different amino acids inserted across your gene, select "List of Insertions".
For example, If you'd like to insert glycines across your gene, include "GGG" in the box.
For example, If you'd like to insert glycine-serine across your gene, include "GGGTGC" in the box.
For example, if you'd like to insert glycine AND glycine-serine across your gene, include "GGG,GGGTGC" in the box.

Substitutions: If you'd like to generate a library where an amino acid at each position is swapped with every other possible amino acid, select "Include Substitutions."

SECTION: Preparation
4.11. Run DIMPLE: Hit "Run DIMPLE" when you are ready to generate your pool.
SECTION: Preparation
5. Examples of what the running code and outputs look like:

The code will first iterate the ideal fragment length sizes across each gene of interest.

  
SECTION: Preparation
5.1. Next, barcodes are assigned to each fragment. The code will update how many barcodes it attempted to use to generate each fragment pool, and will remove these from the remaining barcode pool.

This will continue for each gene included in your fasta file.

   
SECTION: Preparation
5.2. There is a final QC check for each primer set generated.

  
SECTION: Preparation
5.3. All outputs are saved in your working directory.

If you are using DIMPLE to mutagenize several genes, there will be separate files for the primers and mutagenic inserts for each gene, as well as a master list of all oligos and primers. 

    

For each gene, DIMPLE generates a list of:

EXAMPLE_DMS_Oligos. This is the list of sub-library oligo pools, where each oligo contains barcodes, Type IIS restriction cutsites, and a sub-region of the gene.

   

EXAMPLE_DMS_Gene_Primers. These are primers used to add cutsites to and amplify the backbone each mutagenic insert will be ligated into.

 
 
   

EXAMPLE_DMS_Oligo_Primers. These are primers used to amplify the mutagenic inserts from your oligo pool.

  
EXAMPLE_mutations. This is the list of mutations that will be present in your final library.

  


SECTION: Library assembly
7. PCR amplification of oligos, backbone

Thaw all components beforehand and follow general directions provided by manufacturer.

Amplification of mutagenic inserts and backbones should ideally be performed in parallel, assuming one has two thermocyclers. Alternatively, the backbone amplification can be performed first, then the the insert amplification can be done during the gel purification of the backbone.
SECTION: Library assembly
8. PCR amplification of backbone.

Prepare a master mix with PrimeSTAR GXL polymerase:
 
 

 Mix by vortexing and spin down.
SECTION: Library assembly
8.1. Transfer  48 µL of master mix into separate tubes for each reaction.

SECTION: Library assembly
8.2. Add reaction-specific primers to each tube: 2 µL . Mix and spin down.
SECTION: Library assembly
8.3. Place on thermocycler and amplify:

 

Note: the number of cycles should be optimized to minimize PCR cycles. Increasing cycles introduces the possibility of error. An initial comparison of 16, 18, and 22 total cycles can be used to find a minimum number of cycles which yields sufficient DNA for the assembly reaction (see step 11 below) and no more. Increasing the template concentration (to 50 or 100 ng) could be preferable to increasing PCR cycles if large numbers are required for amplification. 
SECTION: Library assembly
8.4. Purify amplified product by gel extraction.

Prepare an agarose gel for gel purification (0.5% - 0.75%). Ideally, it should be of sufficient size to load all samples.
SECTION: Library assembly
8.5. Load and run backbone products.
SECTION: Library assembly
8.6. Use a scalpel or razor blade to (carefully!) cut out each product. Using a gel extraction kit, purify the product and elute in 10 µL.

SECTION: Library assembly
9. PCR amplification of mutagenic inserts.

Prepare a master mix with PrimeSTAR GXL polymerase:

 

Mix by vortexing.
SECTION: Library assembly
9.1. Transfer  48 µL into separate tubes for each reaction.
SECTION: Library assembly
9.2. Add reaction-specific primers to each tube: 2 µL . Mix and spin down.
SECTION: Library assembly
9.3. Place on thermocycler and amplify:
 
 
Note: the number of cycles should be optimized to minimize PCR cycles. Increasing cycles introduces both PCR bias and error. An initial comparison of 16, 18, and 22 total cycles can be used to find a minimum number of cycles which yields sufficient DNA for assembly step and no more. For the example libraries here, this is ~100 ng per oligo pool, and 
SECTION: Library assembly
9.4. Use a PCR cleanup kit to purify each product. Elute in 10 µL.

SECTION: Library assembly
10. Important QC step - run a gel with each PCR product and visualize it. Ideally, each reaction should ideally give a single strong band at the expected size. Failure to do so may require changing PCR conditions.

SECTION: Library assembly
11. Golden gate assembly

Prepare a master mix for the assembly. Use the table below to calculate: adjust number of regions and amount of necessary backbone and insert for desired amounts per reaction. We have found 3 µL backbone and 1 µL oligo (insert) are usually good.


 
Vortex to mix.
SECTION: Library assembly
11.1. Transfer appropriate master mix into separate tubes for each reaction.

Example: if each reaction has 3 µL backbone and 1 µL insert, then transfer 36 µL to each tube.
SECTION: Library assembly
11.2. To each tube, add the appropriate vector/insert pair:

For this example:

 3 µL 
1 µL 
 
Mix well and spin down.
SECTION: Library assembly
11.3. Place on thermocycler and run the following program:

 

Important: This assumes the assembly is performed with BsaI. If using a different enzyme (such as BsmBI), check the recommended temperatures from the vendor.
SECTION: Library assembly
11.4. Use a PCR cleanup kit to purify each product. Elute in 10 µL.

Important: using elution buffer or TE may cause electroporation to fail!
SECTION: Library assembly
11.5. Important QC step: before electroporating libraries, transform 1 µL of each library into chemically competent cells and plate. If no or very few colonies are observed the next day, this could suggest a failure during assembly. Further check the assembly by running a small portion on a gel.
SECTION: Transformation and recovery of sublibraries
12. Using a high-efficiency electrocompetent strain of E. coli, such as MegaX DH10B, prepare a transformation for each assembly: 3 µL with 20 µL  in a 0.1 cm cuvette. Follow the specific instructions for voltage and outgrowth media corresponding to your cells and electroporator. Outgrow cells for 1 hour before proceeding.

SECTION: Transformation and recovery of sublibraries
13. Essential QC step: Count total number of transformants to ensure adequate coverage.

Prepare 5 10-fold serial dilutions: for each reaction, add 900 µL H2O to six 1.5 mL microcentrifuge tubes. Add 100 µL of the outgrowth mixture to the first, then mix well and add 100 µL of this to the second tube. Repeat for the rest of the tubes.
SECTION: Transformation and recovery of sublibraries
13.1. Plate  100 µL of the last three dilutions (1:1000, 1:10000, 1:100000) on LB-agar with appropriate antibiotic. Grow overnight and count colonies the next day. Calculate the total number of transformants and determine the variant coverage per reaction. At least 50-fold coverage is essential.
SECTION: Transformation and recovery of sublibraries
13.3. Important QC step: pick single colonies from the QC plates and use clonal sequencing to check for mutations (e.g., Sanger sequencing or whole-plasmid sequencing). We typically pick 5 colonies per subpool and expect the majority to contain a desired mutation. Too much WT could indicate problems during the backbone amplification, and too many off-target mutations could suggest a failure to amplify or purify properly. In both cases, these would be extremely deleterious to the quality of the final library.
SECTION: Transformation and recovery of sublibraries
14. Add the remaining outgrowth culture to 30 mL LB supplemented with appropriate antibiotic for further outgrowth in either a Falcon tube or glass culture tube. Shake until the culture reaches OD 0.6-0.7.

Note: it is important to harvest the cells in the exponential phase. This takes 4-6 hours in our experience, but may vary (including between samples in the same day). 
SECTION: Transformation and recovery of sublibraries
15. Harvest DNA from cultures using a miniprep kit, splitting each reaction across 3 columns. Elute each column in 40 µL elution buffer and combine elutions corresponding to a single sublibrary.

SECTION: Sublibrary pooling and subcloning
16. Measure each sublibrary concentration with a fluorometric method, such as Qubit. With the lowest concentration as the target concentration, prepare a dilution of each sublibrary in H2O. Mix 2 µL of this dilution from each sublibrary to create an equimolar library pool.

SECTION: Sublibrary pooling and subcloning
17. Subclone library to transfer from library vector to selection vector. Depending on construct design, this may require digestion/ligation or a Golden Gate reaction.
SECTION: Sublibrary pooling and subcloning
18. Use PCR cleanup kit to purify reaction, and elute in 10 µL H2O.

SECTION: Sublibrary pooling and subcloning
19. Using a high-efficiency electrocompetent strain of E. coli, such as MegaX DH10B, transform 3 µL  with 50 µL  cells in a 0.1 cm cuvette. Follow the specific instructions for voltage and outgrowth media corresponding to your cells and electroporator. Outgrow cells for 1 hour before proceeding.

SECTION: Sublibrary pooling and subcloning
20. Repeat transformation and isolation following steps for subpool cloning and quantification as above, except perform 6 serial dilutions and plate samples at 1:10000, 1:100000, and 1:1000000 dilutions and use variant counts for the total library. Again, at least 200-fold coverage is essential for maintaining unbiased libraries. Pick colonies and submit for clonal sequencing as well: we typically submit ~10 samples for our final pooled library.
SECTION: Library assembly
8.7. Important QC step - evaluate the quality of the amplification with the gel. Each lane should have a single, crisp band at the expected size. Multiple bands, or no bands, might indicate improper annealing and may require Tm or extension time optimization. Blurry and smeary bands might indicate problems with the electrophoresis or amplification conditions. It is essential to get specific, clean amplification of the backbone, and libraries should not be generated with messy reactions.

 
SECTION: Library assembly
6. Prepare oligo pool stock

Follow any recommendations for oligo pool resuspension: typically, this results in a 10 ng/µL solution, which the following steps assume. Lower or higher concentrations may require alterations.
SECTION: Transformation and recovery of sublibraries
13.2. Example calculations

For two oligo subpool reactions, the following plate counts were observed.
 
The total number of implied transformants in the starting outgrowth media was calculated with the following formula:

  

where   is the total number of colonies on a particular plate,   accounts for the serial dilutions, and 100 accounts for the fact that only 100 µL out of the 1 mL outgrowth media is being sampled, and only 1/10 of each dilution is being plated. If a large number of colonies are seen on a lower dilution, we typically ignore that one, but a lack of colonies is counted as a zero. Here, we would calculate the following implied transformants:

 
Next, the total transformants per variants in each pool is calculated, using the average number of transformants.

 
Both these subpools would be good to proceed with.