in the past 15 years , directed evolution has developed into a broadly applicable strategy for generating new biomolecules with desirable properties , for probing protein structure and function , and for addressing fundamental questions in molecular evolution . in this approach ,
random mutagenesis is used to produce a large and diverse library of nucleic acid sequences , which is subsequently interrogated for rare , improved variants .
myriad protocols have been developed to produce the necessary molecular diversity ( 13 ) . however , our ability to generate and screen randomized libraries is dwarfed by the amount of molecular diversity contained in protein sequence space
. even for a small , 100-residue protein , there are more potential amino acid sequences than there are atoms in the observable universe ( 4 ) .
increasingly , it is recognized that high - quality libraries are critical to the success of directed evolution experiments ( 5,6 ) .
previously , we argued that the likelihood of finding a variant with a desired function in a randomized library is maximized when the library is maximally diverse ( 7 ) . to the experimentalist , this corresponds to a library containing as few redundant sequences ( including copies of the unmutated parental gene ) and as many full - length sequences ( lacking premature termination codons ) as possible . to aid in the design of maximally diverse libraries
, we developed a suite of user - friendly programmes for estimating the completeness and diversity that they contain ( 4,8 ) .
these programmes were limited to estimating library diversity at the nucleic acid level , and provided no explicit information regarding the translated products of the randomized genes . in this article , we describe an expanded web server , which enables the analysis of protein diversity in randomized libraries that have been generated by site - saturation mutagenesis and error - prone pcr ( eppcr ) .
the nucleotide programmes glue ( for randomization techniques where all dna sequence variants are equally likely ) , pedel ( programme for estimating diversity in error - prone pcr libraries ) and driver ( diversity resulting from in vitro recombination ) are still maintained on the website , and have been described previously ( 4,8 ) .
one of our previous programmes , glue , is broadly applicable to any protocol where all gene variants have an equal probability of occurring in a library .
the most commonly used example is site - saturation mutagenesis ( also referred to as oligonucleotide - directed randomization ) , in which randomized bases are incorporated into one or more of the primers in a pcr , allowing the generation of diversity at specific sites in an amplified gene .
other techniques that result in equally probable daughter variants ( at the dna level ) include max randomization ( 9 ) and versions of dna shuffling that utilize designed oligonucleotides ( 1012 ) .
glue is also a useful estimator of the diversity in libraries generated by incremental truncation strategies , such as expression of soluble proteins by random incremental truncation ( esprit ) ( 13 ) , in which variants are close to being equally probable ( 14 ) .
we now introduce glue - including translation ( glue - it ) , which outputs the expected amino acid level diversity in any site - saturation mutagenesis library with up to six variable codons . the user specifies the fully or partly randomized scheme used for each of the variable codons , and the size of the library that they have constructed ( or , more often , the number of clones that they plan to screen ) .
we provide two tools ( codoncalculator and aa - calculator ) to assist in choosing an appropriate randomization scheme for library construction . on specifying a fully or partly randomized codon , xyz
, codoncalculator will output the possible amino acid variants and the number of times that each is encoded .
aa - calculator performs the opposite function : the user can specify a desired set of amino acids , and aa - calculator will find the degenerate codon(s ) that are optimal for encoding them . up
to 50 degenerate codons are listed , ranked according to the fraction of the xyz - specified codons that code for the desired amino acids .
aa - calculator therefore offers a user - friendly alternative to downloading and executing the libdesign algorithm ( 15 ) , and provides users with a replacement for the combinatorial codons programme ( 16 ) , which ( as far as we are aware ) is no longer available online . on entering the randomization scheme and library size , glue - it will output a summary of statistics , including the number of possible dna and amino acid variants that are encoded by each randomized codon and the total number of possible amino acid variants in the library .
the probability of a particular variant vi being present in the library is 1  ( 1  pi ) , where pi is the probability of any particular variant in the library being vi , and l is the library size . in the case of six fully randomized ( nnn ) codons , there are 20 = 6.4  10 possible variants . to quickly calculate the expected number of distinct variants in the library , , variants are grouped according to the number of ways in which they can be encoded .
each individual amino acid can be encoded by between one and six equiprobable codons , so for six randomized codons there are at most just 6 = 46 656 different pi values to calculate . for convenience , variants that encode
stop codons are assumed to be non - functional and are omitted from the final total , c. consider an example in which two libraries are constructed , each containing two codons that have been targeted for randomization .
this is the starting point for the combinatorial active site saturation test ( casting ) , in which small , focussed libraries are produced by randomizing several sets of 23 amino acid positions around an enzyme active site ( 5,1720 ) . in our example , suppose that the first library contains one codon randomized according to the nnk scheme ( n = g /
a / t / c ; k = g / t ) , while we use ndt ( d = g / a / t ) in the second position .
codoncalculator tells us that all 20 amino acids ( plus one stop codon , tag ) are encoded in the nnk scheme .
ndt specifies a more limited set of 12 amino acids ( c , d , f , g , h , i , l , n , r , s , v and y ; one codon each ) .
there are 32  12 = 384 possible codon variants in the resulting library , encoding 20  12 = 240 possible amino acid variants ( the output of glue - it includes these calculations ) .
suppose that the second library is constructed using an nnb codon ( b = g / t / c ) and an nay codon ( y = t / c ) .
this library is equally diverse at the dna level ( 48  8 = 384 variants ) , but less diverse when it is translated ( 20  4 = 80 amino acid variants ) .
because the number of dna variants is the same in each of the two libraries , glue treats each library identically .
the output suggests that approximately 1500 clones from each library should be screened , to ensure 98% coverage ( table 1 ) . by considering amino acid diversity ,
now it becomes clear that a much smaller screening effort would be justified for the nnb + nay library : sampling just 500 clones would ensure that 98% of the translated library had been interrogated . 

table 1.completeness and diversity statistics for two hypothetical site - saturation mutagenesis libraries , in which two codons have been randomized according to different schemes ( nnk + ndt or nnb + nay)libraryno . of clones sampledglueglue - itno . of distinct dna variantsdna completenessno . of distinct amino acid variantsamino acid completenessnnk + ndt100880.23770.325002800.731960.8210003560.932290.9515003760.982370.99nnb + nay100880.23530.665002800.73780.9810003560.93801.0015003760.98801.00the
fraction of all possible dna sequence variants ( 384 for each library ) that are represented in the sample.not including variants with stop codons.the fraction of all possible amino acid variants ( 240 for library 1 ; 80 for library 2 ) that are sampled .
completeness and diversity statistics for two hypothetical site - saturation mutagenesis libraries , in which two codons have been randomized according to different schemes ( nnk + ndt or nnb + nay ) the fraction of all possible dna sequence variants ( 384 for each library ) that are represented in the sample .
the fraction of all possible amino acid variants ( 240 for library 1 ; 80 for library 2 ) that are sampled .
glue - it also calculates the probability that a given library contains all possible amino acid variants , which is a related but distinct statistic ( 4 ) . using this , it is possible to determine empirically the number of clones to screen in order to achieve a fixed probability of sampling all variants .
for example , approximately 1150 clones from the nnb + nay library should be screened to give a 95% chance that every possible sequence variant is sampled at least once .
while there is a growing emphasis on targeting diversity in well - sampled , focussed libraries ( 5,6 ) , eppcr remains a common means of generating random diversity at any position in a gene .
indeed , a number of commercial vendors now sell eppcr kits , usually designed to overcome the well - documented biases in nucleotide misincorporation by taq polymerase ( 21 ) . in eppcr ,
the potential for generating mutations at any position in a gene ensures that the number of possible variants is usually much larger than that which can be screened experimentally .
therefore , it becomes more informative to assess the number of distinct sequences that are present in the library .
this is in contrast to site - saturation mutagenesis , where glue - it can inform strategies for sampling all or most of the possible sequence variants .
previously , we described pedel , which calculates the expected number of distinct dna variants in an eppcr library , given the library size , the mean mutation rate and the length of the template sequence ( 4,8 ) .
the underlying algorithm divides the library into sub - libraries , each of which contains variants with exactly x mutations .
the original implementation of pedel assumed that the number of mutations per daughter sequence ( estimated by sequencing a handful of library members ) follows a poisson distribution .
the web server now also includes the option to use the  pcr distribution ( 22 ) , which is the preferred option provided the appropriate data from the eppcr are known .
in addition to the mean mutation rate , calculations using the pcr distribution require the user to input the number of pcr thermal cycles , n , and also the pcr efficiency ( i.e. the probability that any particular sequence is duplicated in a given pcr cycle ; eff ) . in turn , estimating eff requires the experimentalist to note the initial amount of template dna and the final yield of pcr product , so that the number of doublings in the pcr , d , can be calculated : 

 the pcr efficiency is then given by : 

 for convenience , we have included a tool for calculating eff , given d and n.
as with site - saturation mutagenesis , it is ultimately more useful to estimate the protein sequence diversity in an eppcr library , rather than the dna sequence diversity . addressing this problem is not trivial , as the degeneracy of the genetic code ensures that amino acid sequence variants are not equiprobable .
many substitutions are translationally silent , and > 1 substitution in a single codon is rare in eppcr , reducing the number of accessible amino acid variants . assessing the protein - level diversity in an eppcr library
therefore requires consideration of the template sequence , the overall ( dna ) mutation rate , the total size of the library and the nucleotide mutation matrix .
this final parameter is an estimate of the relative frequencies of all 12 possible point mutations .
it can be estimated from previous libraries [ such as the one described by shafikhani et al .
( 21 ) ] or , for greater accuracy , it can be obtained by sequencing randomly chosen members of one 's own library .
volles and lansbury ( 23 ) previously described a monte carlo simulation programme that uses these inputs to randomly simulate every individual sequence in a library , and also produce some analytic statistics . while this powerful approach allows a variety of library statistics to be estimated , it is cpu - intensive .
therefore , we have developed and added to our web server an amino acid version of pedel ( pedel - aa ) that combines the sub - library analyses of pedel with these new inputs to determine protein sequence diversity .
a very brief description of the pedel - aa algorithm follows ; further details are given in the notes on the website .
the number of nucleotide substitutions per variant is assumed to follow the pcr distribution p(xnt ) .
the distribution of truncated variants is then calculated and subtracted from p(xnt ) . next , p(xnt ) is converted to the amino acid distribution , p(xaa ) , by assuming that , for each xnt , the number of non - synonymous amino acid substitutions resulting from exactly xnt nucleotide substitutions follows a binomial distribution , b(xnt , f ) , where f is the mean number of non - synonymous amino acid substitutions per nucleotide substitution .
the input library is conceptually divided into sub - libraries lx ( x = 0 , 1 , 2 ,  ) where the sub - library lx comprises all variants in the library with exactly x amino acid substitutions .
the total number of possible variants with exactly x amino acid substitutions is represented by vx .
vx1 is an estimate of the number of  easy - to - reach variants ; that is , those variants where each substituted amino acid is accessible by just a single nucleotide substitution in the respective codon .
although most variants in a sub - library will be of type vx1 , variants of type vx2 may contribute significantly to the total number of distinct variants , cx , when the sub - library size lx is large compared with the number of variants vx1 .
when lx < < vx then cx  lx ( i.e. nearly all variants in lx are distinct ) . for pedel - aa , we use this approximation when lx < 0.1  vx1 .
this is usually the case for x  3 and almost always the case for x  4 .
for x = 0 , 1 and 2 , we calculate the expected number of distinct variants , cx , analytically . in the rare cases where
the cx  lx approximation can not be used for all x  3 , a rough approximation is used for the remaining cx values .
the approximations used in pedel - aa have minimal effect for ordinary mutations rates , library sizes and eppcr template lengths .
table 2 provides an illustrative example , in which the characteristics of an -synuclein eppcr library , as estimated by pedel - aa and by the monte carlo simulations of volles and lansbury ( 23 ) , are compared .
table 2.characteristics of an -synuclein eppcr library , estimated by pedel - aa and by a previously - described monte carlo library diversity algorithm ( 23)propertypedel - aaref .
( 23)prematurely truncated variants ( proportion of total library)16%15%number of full - length clones3.2  103.1  10protein mutation frequency per amino acid0.0160.016mean number of mutations per protein2.12.1unmutated ( wild - type ) sequences ( proportion of total library)14%14%number of unique proteins in the library1.3  101.3  10number of different point mutations in the library19891990number of unique single - mutation variants in the library16181566the eppcr library was constructed by volles and lansbury ( 23 ) , and consisted of 3.77  10 clones with an average of 3.2 nucleotide mutations per clone .
the template for randomization was 399 bp in length ( coding for amino acids 8140 of the -synuclein protein ) .
table 1 of volles and lansbury ( 23 ) was used for the nucleotide mutation matrix .
characteristics of an -synuclein eppcr library , estimated by pedel - aa and by a previously - described monte carlo library diversity algorithm ( 23 ) the eppcr library was constructed by volles and lansbury ( 23 ) , and consisted of 3.77  10 clones with an average of 3.2 nucleotide mutations per clone .
the template for randomization was 399 bp in length ( coding for amino acids 8140 of the -synuclein protein ) .
table 1 of volles and lansbury ( 23 ) was used for the nucleotide mutation matrix .
perhaps the most useful feature of pedel - aa is its ability to quickly estimate the total number of unique proteins in an eppcr library . unlike pedel
, pedel - aa is able to calculate and subtract indel - containing sequences , prematurely truncated variants and dna sequences with synonymous substitutions from the overall estimate of useful diversity .
for example , we recently performed eppcr on the 1515 bp purf gene from escherichia coli ( 24 ) .
the resulting library contained 6.4  10 transformants and the mean mutation rate was 15.5 mutations per ( dna ) sequence .
pedel suggested that this high mutation rate was optimal ; that is , at the dna level , almost every sequence variant was unique .
reanalyzing the data with pedel - aa demonstrates that the very high mutation rate has produced a large number of variants with premature stop codons . in this example
, the library of 6.4  10 unique dna sequences only encodes 3.9  10 full - length , non - wild - type proteins .
comparing the pedel and pedel - aa outputs for a range of mutation rates suggests that lowering the mutation rate to approximately eight mutations per sequence would have yielded a maximally diverse library , containing 4.3  10 useful sequence variants ( figure 1 ) .
this could have been achieved by lowering the concentration of mn ions and/or by decreasing the number of cycles in the eppcr . 

figure 1.the estimated numbers of unique dna sequence variants ( cdna , dashed line ) and protein sequence variants ( cprotein , solid line ) in a purf eppcr library ( 24 ) , plotted as a function of the dna mutation rate , . the eppcr comprised 30 thermal cycles , with eff = 0.41 .
a total of 7549 bp of dna sequence was obtained from randomly chosen library members , and 77 substitutions plus one single - nucleotide deletion were observed .
the library used for genetic selection experiments contained  = 15.5 mutations per sequence ; the estimated sequence diversity it contains is indicated by the vertical arrow on the right .
note that , after peaking , the number of unique amino acid ( but not nucleotide ) variants decreases with increasing  , due to an increasing number of truncated sequences .
the estimated numbers of unique dna sequence variants ( cdna , dashed line ) and protein sequence variants ( cprotein , solid line ) in a purf eppcr library ( 24 ) , plotted as a function of the dna mutation rate , . the eppcr comprised 30 thermal cycles , with eff = 0.41 .
a total of 7549 bp of dna sequence was obtained from randomly chosen library members , and 77 substitutions plus one single - nucleotide deletion were observed .
the library used for genetic selection experiments contained  = 15.5 mutations per sequence ; the estimated sequence diversity it contains is indicated by the vertical arrow on the right .
note that , after peaking , the number of unique amino acid ( but not nucleotide ) variants decreases with increasing  , due to an increasing number of truncated sequences .
in addition to a variety of overall library characteristics , a link from the pedel - aa output screen provides the user with an estimate of the amino acid sequence diversity contained in each sub - library ( i.e. all of those variants containing exactly x mutations ; 0  x  20 ) .
this data includes the fraction of the library containing no mutations ( the x = 0 sub - library ) , and also offers an overview of the range of mutations that the experimentalist should expect to observe in their library variants .
the first plots the cumulative probability that a given variant is free of stop codons , up to amino acid x. the second plots the length distribution of variants with premature stop codons .
these give an instant graphical overview of regions of the template that are particularly prone to yielding truncated variants .
previously , we developed glue , pedel and driver to aid in designing and analyzing randomized libraries of nucleic acid sequences ( 4,8 ) . here ,
we have introduced glue - it and pedel - aa . by estimating protein - level statistics , these programmes offer new insights into the usable diversity of translated site - saturation and eppcr libraries .
our algorithms make use of some simplifying assumptions that can be avoided by using monte carlo simulation approaches ( 23 )
. however , these assumptions have only minor effects under experimental conditions that are usually encountered in library construction .
our analytic approach is much quicker than the monte carlo simulation approach ( especially for large library sizes ) , making it more amenable for use via a web server and enabling experimentalists to obtain rapid estimates of library statistics .
 there are many methods for introducing random mutations into nucleic acid sequences . 
 previously , we described a suite of programmes for estimating the completeness and diversity of randomized dna libraries generated by a number of these protocols . 
 our programmes suggested some empirical guidelines for library design ; however , no information was provided regarding library diversity at the protein ( rather than dna ) level . 
 we have now updated our web server , enabling analysis of translated libraries constructed by site - saturation mutagenesis and error - prone pcr ( eppcr ) . 
 we introduce glue - including translation ( glue - it ) , which finds the expected amino acid completeness of libraries in which up to six codons have been independently varied ( according to any user - specified randomization scheme ) . 
 we provide two tools for assisting with experimental design : codoncalculator , for assessing amino acids corresponding to given randomized codons ; and aa - calculator , for finding degenerate codons that encode user - specified sets of amino acids . 
 we also present pedel - aa , which calculates amino acid statistics for libraries generated by eppcr . 
 input includes the parent sequence , overall mutation rate , library size , indel rates and a nucleotide mutation matrix . 
 output includes amino acid completeness and diversity statistics , and the number and length distribution of sequences truncated by premature termination codons . 
 the web interfaces are available at http://guinevere.otago.ac.nz/stats.html . 
INTRODUCTION
GLUE-IT
PEDEL AND THE PCR DISTRIBUTION
PEDEL-AA
CONCLUSIONS