Codon usage bias is the nonrandom use of synonymous codons for the same amino acid. Most population genetic models of codon usage evolution assume that the population is at mutation-selection-drift equilibrium. Natural populations, however, frequently deviate from equilibrium, often because of recent demographic changes. Here, we construct a matrix model that includes the effects of a recent change in population size on estimates of selection on preferred vs. unpreferred codons. Our results suggest that patterns of synonymous polymorphisms affecting codon usage can be quite erratic after such a change; statistical methods that fail to take demographic effects into account can then give incorrect estimates of important parameters. We propose a new method that can accurately estimate both demographic and codon usage parameters. The method also provides a simple way of testing for the effects of covariates such as gene length and level of gene expression on the intensity of selection, which we apply to a large Drosophila melanogaster polymorphism data set. Our analyses of twofold degenerate codons reveal that (i) selection acts in favor of preferred codons, (ii) there is mutational bias in favor of unpreferred codons, (iii) shorter genes and genes with higher expression levels are under stronger selection, and (iv) there is little evidence for a recent change in population size in the Zimbabwe population of D. melanogaster.
CODONS specifying the same amino acid are called synonymous codons. These are often used nonrandomly, with some codons appearing more frequently than others. This biased usage of synonymous codons has been found in many organisms such as Drosophila, yeast, and bacteria (Ikemura 1985;Duret and Mouchiroud 1999;Hershberg and Petrov 2008). Conventionally, synonymous codons for a given amino acid are divided into two classes: preferred and unpreferred codons (Ikemura 1985;Akashi 1994;Duret and Mouchiroud 1999). Several observations indicate that codon usage is affected by natural selection. First, in species with codon usage bias, preferred codons generally correspond to the most abundant tRNA species (Ikemura 1981). Second, highly expressed genes usually have higher codon usage bias than genes with low expression (Sharp and Li 1986;Duret and Mouchiroud 1999;Hey and Kliman 2002). Third, the synonymous substitution rate of a gene has been shown to be negatively correlated with its degree of codon usage bias (Sharp and Li 1986;Bierne and Eyre-Walker 2006). The most commonly cited explanations of the apparent fitness differences between preferred and unpreferred codons are selection for translation efficiency, translational accuracy, and mRNA stability (Ikemura 1985;Eyre-Walker and Bulmer 1993;Akashi 1994;Drummond et al. 2005). Recently, it has been proposed that exon splicing also affects codon usage bias (Warnecke and Hurst 2007).From a population genetics perspective, the extent of codon usage bias is ultimately a product of the joint effects of mutation, selection, genetic drift, recombinati...