mutations and substitutions are fundamental changes in nucleotide sequence over evolutionary time ( 1 ) . among the well - established methods for studying the evolution of protein - coding genes , the ratio of non - synonymous substitution rate ( ka , amino acid replacing ) to synonymous substitution rate ( ks , silent ) is the most powerful measure of selective pressure on a protein ( 28 ) . since non - synonymous and synonymous substitution sites are interspersed within a gene segment , this approach literally compares the amino acid replacement rate against the silent substitution rate . traditionally , if ka / ks < 1 , the gene is inferred to be under negative ( purifying ) selection ; if ka / ks = 1 , the gene is probably neutrally evolving ; if ka / ks > 1 , the gene is probably under positive ( adaptive ) selection , since mutations in the gene have higher probabilities of being fixed in the population than expected from the predictions of neutrality . however , this approach , in effect , averages substitution rates over all amino acid sites in the sequence . because most amino acids are expected to be under purifying selection , with positive selection most likely affecting only a few sites , this approach often loses the power to detect positive selection . to increase its sensitivity , a sliding window analysis along the primary sequence was introduced ( 9,10 ) . recent studies further indicate that when a three - dimensional ( 3d ) protein structure is available , one can detect positive selection much more sensitively by using windows in 3d space instead ( 1113 ) . for example , hughes and nei ( 14 ) detected positive selection at the antigen recognition sites ( ars ) in major histocompatibility complex ( mhc ) alleles but not the whole gene . we developed a bioinformatic web server ( swakk ) whose primary purpose is to detect regions under positive selection using a sliding window ka / ks analysis ( figure 1 ) . with the input of two protein - coding dna sequences , one reference protein 3d structure and other user - defined parameters , the web server will automatically align the sequences , calculate ka / ks in each 3d window , and display the results on the 3d structure . the server also can perform the analysis on the primary sequence , either for comparison or when a structure is unavailable . in addition , if two inferred ancestral gene sequences are used as an input , the server can examine natural selection in an ancestral branch of a phylogenetic tree ( 15 ) . we note that two important features distinguish our swakk server from other available web servers ( 1618 ) that can identify functionally important sites in proteins . the first difference is that these other web servers focus on each single amino acid site or codon in the multiple sequence alignment , which essentially averages the overall time interval . instead , our server considers a group of codons within a small window for each pairwise comparison . second , unlike other web servers where protein 3d structures are only used to display the results , our swakk server takes full advantage of the information intrinsically stored in a 3d structure to define neighboring codon groups . without requiring an explicit evolutionary model or expensive computation , swakk thus provides a useful tool to complement the existing arsenal of methods for detecting positive selection . swakk accepts input as a pair of coding dna sequences and a reference protein structure ( pdb file ) . the dna sequences are translated into amino acids and aligned with the amino acid sequence parsed from the pdb file using clustalw ( 19 ) . swakk constructs 3d windows by placing each amino acid at the center and including all amino acids within a pre - specified distance ( in ngstrms ) from the center . all the corresponding codons within a window are extracted to form a sub - alignment , and the ka / ks score ( also the standard error ) is calculated using the paml package ( 20 ) . finally , according to the ka / ks scores and a user - defined cut - off , the sites ( regions ) can be classified as positive , negative or neutral , and these are displayed in different colors on the 3d structure using the chime plug - in component . if a reference structure is not available , the server can also perform the analysis on the primary sequence . in this situation , the window size is defined as the distance in 1d sequence rather than in 3d space , and the results are displayed in the graph drawn by the gnuplot software . with more and more protein structures available , we expect this web server to become a valuable bioinformatic tool for detecting functionally important sites . the server facilitates the identification of regions of a protein sequence or structure that may be under positive selection and is easily accessible to the broad biological community . the upper part is a snapshot of the 3d analyzer web page . on the bottom are sample output files : left , 3d provided by the 3d analyzer ( when the structure is available ) , with amino acids colored based on inferred level of selection . right , 2d graph ( [ ka  ks ] versus window location ) provided by the 1d analyzer . the example shown is the mhc glycoprotein gene ( 14,21 ) and , consistent with the previous studies , most of the sites identified under positive selection are clustered in the ars domain .