Introduction

Species differ from each other in many ways, including mating system, ploidy, spatial distribution, life history, size, lifespan, and population size. These differences make the process of purifying selection more efficient in some species than others. Our understanding of both the causes and consequences of these differences is limited in part by a reliable metric with which to measure them. In the long-term, the probability that a gene is fixed for one allele rather than another allele is given by the ratio of fixation and counter-fixation probabilities (Bulmer 1991). In an idealized population of constant population size and no selection at linked sites, a mutation-selection-drift model describes how this ratio of fixation probabilities depends on the census population size N (Kimura 1962), and hence gives the fraction of sites expected to be found in preferred vs. non-preferred states (Figure 1).

The effectiveness of selection, calculated as the long-term ratio of time spent in fixed deleterious: fixed beneficial allele states given symmetric mutation rates, is a function of the product Ns. Assuming a diploid Wright-Fisher population with s ≪1, the probability of fixation of a new mutation , and the y-axis is calculated as π(N, —s)/(π(N, —s) + π(N, s)). s is held constant at a value of 0.001 and N is varied. Results for other small magnitude values of s are superimposable.

This reasoning has been extended to real populations by positing that species have an “effective” population size, Ne (Ohta 1973). Ne is the census population size of an idealized population that reproduces a property of interest in the focal population. Ne is therefore not a single quantity per population, but instead depends on which property is of interest.

The amount of neutral polymorphism is the usual property used to empirically estimate Ne (Charlesworth 2009; Doyle et al. 2015; Lynch et al. 2016). However, the property of most relevance to nearly neutral theory is instead the inflection point s at which non-preferred alleles become common enough to matter (Figure 1), and hence the degree to which highly exquisite adaptation can be maintained in the face of ongoing mutation and genetic drift (Kimura 1962; Ohta 1972; Ohta 1992). While genetic diversity has been found to reflect some aspects of life history strategy (Romiguier et al. 2014), there remain concerns about whether neutral genetic diversity and the limits to weak selection always remain closely coupled. One source of concern is that the classic one-locus models that underpin Ne calculations assume that neutral diversity is shaped by genetic drift, but it can instead be shaped instead by some combination of background selection and hitchhiking (Masel 2011; Kern & Hahn 2018).

As a practical matter, Ne is usually calculated by taking some measure of the amount of putatively neutral (often synonymous) polymorphism segregating in a population, and dividing by that species’ mutation rate (Charlesworth 2009). As a result, Ne values are only available for species that have both polymorphism data and accurate mutation rate estimates, limiting its use. Worse, Ne is not a robust statistic. In the absence of a clear species definition, polymorphism is sometimes calculated across too broad a range of genomes, substantially inflating Ne (Daubin & Moran 2004). Similarly, a recent bottleneck or poor sampling scheme will deflate estimated values of Ne, even if the degree of fine-tuned adaptation remains high. Transient hypermutation (Plotkin et al. 2006), which is common in microbes, causes further short-term inconsistencies in polymorphism levels.

An alternative approach to measure the efficiency of selection exploits codon usage bias, which is influenced by weak selection for factors such as translational speed and accuracy (Hershberg & Petrov 2008; Plotkin & Kudla 2011; Hunt et al. 2014). The degree of bias in synonymous codon usage that is driven by selective preference offers a more direct way to assess how effective selection is at the molecular level in a given species (Li 1987; Bulmer 1991; Akashi 1996; Subramanian 2008). Conveniently, it can be estimated from only a single genome, i.e., without polymorphism or mutation rate data for that species.

One commonly used metric, the Codon Adaptation Index (CAI) (Sharp & Li 1987; Sharp et al. 2010) takes the average of Relative Synonymous Codon Usage (RSCU) scores, which quantify how often a codon is used, relative to the codon that is most frequently used to encode that amino acid in that species. While this works well for comparing genes within the same species, it unfortunately means that the species-wide strength of codon bias appears in the normalizing denominator (see equation 4 below and Supplementary Figure 1A). Paradoxically, this can make more exquisitely adapted species have lower rather than higher species-averaged CAI scores (as we will later find in Figure 3B). A handful of publications (Jansen et al. 2003; Botzman & Margalit 2011; LaBella et al. 2019) have inappropriately used mean CAI as a metric of codon adaptation across species, presumably generating inverse results.

To compare species using CAI, it has been suggested that instead of taking a genome-wide average, one should consider a set of highly expressed reference genes (Sharp et al. 2005; Vicario et al. 2007; dos Reis & Wernisch 2008; Subramanian 2008). This approach assumes that the relative strength of selection on those reference genes (often a function of gene expression) remains approximately constant across the set of species considered (red boxes in Figure 2 indicating same quartiles). Its use also requires careful attention to the length of reference genes (Urrutia & Hurst 2001; Doherty & McInerney 2013).

More highly adapted species (bottom) have a higher proportion of their genes subject to effective selection on codon bias (blue area). The CAI, when used correctly, compares the intensity of selection in comparable regions of the right tail (red boxes). Our new metric captures both this, and differences in the proportion of the genome subject to substantial selection.

CAIS reflects the expected relationship between effectiveness of selection and body size, while CAI, ENC, and CAIS calculated using local GC content do not. Note that a high ENC value means more codons are being used in the genome of the given species, so that the given species is less codon adapted, while a high CAIS value means that a species is more codon adapted. Body size data are from PanTHERIA database, originally in log10(mass) in grams prior to PIC correction. Data are shown for 62 species in common between PanTHERIA and our own dataset of 118 vertebrate species that have both “Complete” genome sequence available for calculating %GC, and TimeTree divergence dates available for use in PIC correction. P-values shown are for Pearson’s correlation. Red line shows unweighted Im(y∼x) with grey region indicated 95% confidence interval.

If more highly adapted species have a higher proportion of their genes subject to effective selection on codon bias (Galtier et al. 2018), this is best detected using a proteome-wide approach (Figure 2). Averaging across the entire proteome provides robustness to shifts in the expression level of or strength of selection on particular genes. The proteome-wide average depends on the fraction of sites whose selection coefficients exceed the “drift barrier” for that particular species (Figure 2, blue threshold).

However, any whole-proteome comparisons must be corrected for differences in GC content among species. Genomic GC content is a major driver of codon usage differences among species. Species differ in their mutational bias with respect to GC and in their frequency of GC-biased gene conversion (Urrutia & Hurst 2001; Duret & Galtier 2009; Doherty & McInerney 2013; Figuet et al. 2014). Here, we control for both by simply replacing RSCU scores with the ratio of how frequently a codon is used to encode a particular amino acid relative to how frequently we expect it to be used given the %GC content. There are also GC-related differences in which codons are preferred (Hershberg & Petrov 2009); we expect our method to be more robust to these than CAI is.

An alternative metric, the Effective Number of Codons (ENC) originally quantified how far the codon usage of a sequence departs from equal usage of synonymous codons (Wright 1990), creating a complex relationship with GC content (Fuglsang 2008). The ENC was later modified to correct for GC content, in a similar manner to the new method we present here (Novembre 2002). However, a remaining issue with this modified ENC is that differences among species in amino acid composition might act as a confounding factor, even after controlling for GC content. Specifically, species that make more use of an amino acid for which there is stronger selection among codons (which is sometimes the case (Vicario et al. 2007)) would have higher codon bias, even if each amino acid, considered on its own, had identical codon bias irrespective of which species it is in. Neither ENC (Fuglsang 2004; Fuglsang 2008) nor the CAI (Sharp & Li 1987) adequately control for differences in amino acid composition when applied across species. Despite early claims to the contrary (Wright 1990), this problem is not easy to fix for ENC (Fuglsang 2004; Fuglsang 2008).

Here, we extend the CAI so that it corrects for both GC and amino acid composition (see Methods) to create a new Codon Adaptation Index of Species (CAIS), and compare its performance to that of the ENC. The availability of complete genomes allows both metrics to be readily calculated without data on polymorphism or mutation rate, without selecting reference genes, and without concerns about demographic history. Our purpose is to find an accessible metric that can quantify the limits to weak selection important to nearly neutral theory; this differs from past evaluations focused on comparing different genes of the same species and recapitulating “ground truth” simulations thereof (Sun et al. 2012; Zhang et al. 2012; Liu et al. 2018). Our first measure of success is to produce the expected correlation with body size (used here as a proxy for census population size and hence the expected exquisiteness of adaptation). We use vertebrates as a challenging test case, given relatively weak selection on codon usage (Doherty & McInerney 2013; Galtier et al. 2018). Correlations between codon adaptation and body size across vertebrates have previously been elusive, which is surprising given that the expected differences in the efficiency of selection between X-chromosomes vs. autosomes and between high-recombination vs. low recombination regions are found (Kessler & Dean 2014). Our second measure of success is a demonstration of how our metric can be used to find novel correlations pointing to what else might be subject to weak selective preferences at the molecular level.

Results

Species with larger body mass have smaller CAIS

CAI scores averaged across the proteome of each species would paradoxically suggest that larger species have more effective selection (Figure 3B; note that we control for phylogenetic non-independence using Phylogenetic Independent Contrasts (PIC) (Felsenstein 1985)). This is because the behavior of the CAI is driven by the normalization term on its denominator, rather than by its numerator (Supplementary Figure 1A). This problem is removed in our improved CAIS measure (Supplementary Figure IB), which yields the expected result that species with more codon adaptation according to the CAIS tend to be smaller (Figure 3A).

In contrast, the ENC is independent of adult vertebrate body mass (Figure 3C), consistent with past reports that ENC does not predict body mass or generation time in mammals (Kessler & Dean 2014) and that genome-wide ENC does not predict generation time in eukaryotes more broadly (Subramanian 2008). This difference between ENC and CAIS is surprising because the two methods are conceptually similar (see Methods). One difference is that CAIS corrects for amino acid composition differences across the dataset while ENC does not (see Methods). However, when we remove the amino acid composition correction from CAIS, we retain the relationship that smaller-bodied species tend to have more codon adaptation (Supplementary Figure 2), ruling this out as the cause of their different behaviors.

Another difference between ENC and CAIS is that CAIS is linear in observed codon frequencies (equation 7), while ENC has a quadratic term (equation 14). The quadratic term in ENC magnifies the differences in more extreme deviations of observed frequencies from the GC-informed expected frequencies than CAIS. We speculate that this might somehow swamp more informative differences. Other ENC-like approaches that use a quadratic term have also struggled to reliably detect selection (Urrutia & Hurst 2001; Kessler & Dean 2014).

Surprisingly, we achieved a successful version of CAIS by using genome-wide GC content to calculate expected codon use. Different parts of the genome have different GC contents (Bernardi 2000; Eyre-Walker & Hurst 2001; Lander et al. 2001), primarily because the extent to which GC-biased gene conversion increases GC content depends on the local rate of recombination (Galtier et al. 2001; Meunier & Duret 2004; Duret et al. 2006; Duret & Galtier 2009). We therefore also calculated a version of CAIS whose codon frequency expectations are based on local intergenic GC content. This performed worse (Fig. 3D) than our simple use of genome-wide GC content (Fig. 3A) with respect to the strength of correlation between CAIS and body size. We therefore use the simpler, genome-wide metric from here on. It is possible that local GC content evolves more rapidly than codon usage, and that genome-wide GC serves as an appropriately time-averaged proxy. It is also possible that the local non-coding sequences we used were too short (at 3OOObp or more), creating excessive noise that obscured the signal. Given the body size results, we advocate for the use of CAIS as a metric of species’ effectiveness of selection.

Proteins in better adapted species evolve more structural disorder

As an example of how correlations with CAIS can be used to identify weak selective preferences, we investigate protein intrinsic structural disorder (ISD). Disordered proteins are more likely to be harmful when overexpressed (Vavouri et al. 2009), and ISD is more abundant in eukaryotic than prokaryotic proteins (Schad et al. 2011; Xue et al. 2012; Basile et al. 2019), suggesting that low ISD might be favored by more effective selection.

However, compositional differences among proteomes might be driven by the recent birth of ISD-rich proteins in animals (James et al. 2021), and/or by differences among sequences in their subsequent tendency to proliferate into many different genes (James et al. 2022), rather than by differences in how a given protein sequence evolves as a function of the effectiveness of selection. To focus only on the latter, we use a linear mixed model, with each species having a fixed effect on ISD, while controlling for Pfam domain identity as a random effect. We note that once GC is controlled for, codon adaptation can be assessed similarly in intrinsically disordered vs. ordered proteins (Gossmann et al. 2012). Controlling for Pfam identity is supported, with standard deviation in ISD among Pfams estimated as 0.178 in comparison to residual standard deviation of 0.058 and a p-value on the significance of the Pfam random effect term of 3×10’13. We then ask whether the fixed species effects on ISD are correlated with CAIS.

Surprisingly, more exquisitely adapted species have more disordered protein domains (Figure 4). Results are similar using ENC instead of CAIS (Supplementary Figure 3), despite the weakness of ENC in predicting body size; the correlation coefficient drops only slightly from 0.54 to 0.5, and the p-value rises by less than 2 orders of magnitude.

Protein domains have higher ISD when found in more exquisitely adapted species. Each datapoint is one of 118 vertebrate species with “complete” intergenic genomic sequence available (allowing for %GC correction) and TimeTree divergence dates (allowing for PIC correction). “Effects” on ISD shown on the y-axis are fixed effects of species identity in our linear mixed model, after PIC correction. Red line shows unweighted Im(y∼x) with grey region as 95% confidence interval.

Younger animal-specific protein domains have higher ISD (James et al. 2021). We therefore hypothesize that selection in favor of high ISD might be strongest in young domains, which might use more primitive methods to avoid aggregation (Foy et al. 2019; Bertram & Masel 2020). To test this, we analyze two subsets of our data: those that emerged prior to the last eukaryotic common ancestor (LECA), here referred to as “old” protein domains, and “young” protein domains that emerged after the divergence of animals and fungi from plants. Young and old domains both show a trend of increasing disorder with species’ adaptedness (Figure 5). Because PIC analysis makes the units incommensurable, we quantitatively compare the slopes of non-PIC-corrected weighted regressions. As predicted, the slope is stronger among young protein domains than among old domains (0.223 +/-0.021 versus 0.161 +/-0.014, respectively; units of proportion ISD/ CAIS), although we are struck by the degree to which even ancient domains prefer higher ISD. We find similar relationships of modestly lower strength and statistical significance using ENC (Supplementary Figure 4).

More exquisitely adapted species have higher ISD in both ancient and recent protein domains. Age assignments are taken from James et al. (2021), with vertebrate protein domains that emerged prior to LECA classified as “old”, and vertebrate protein domains that emerged after the divergence of animals and fungi from plants as “young”. “Effects” on ISD shown on the y-a×is are fixed effects of species identity in our linear mixed model. The same n=H8 datapoints are shown as in Figures 3 and 4. P-values shown are for Pearson’s correlation. Red line shows Im(y∼×), with grey region as 95% confidence interval, using a weighted model for non-PIC-corrected figures and unweighted for PIC-corrected figures. Weighted models make the quantitative estimation of slopes more accurate. Dot size on left indicates weight.

Discussion

Here we propose CAIS as a new metric to quantify how species differ in the effectiveness of selection. CAIS corrects codon bias both for total genomic GC content and for amino acid composition, to extract a measure of codon adaptation. Surprisingly, we obtained better results correcting for total GC content than for local GC content in the vicinity of each coding region. Unlike the ENC, CAIS is sensitive enough to show the expected relationship with adult vertebrate body mass.

CAIS can be used to detect which properties are under selection. To accomplish this, we note that when different properties are each causally affected by a species’ exquisiteness of adaptation, this will create a correlation between the properties. We use codon adaptation as a reference property, such that correlations with codon adaptation indicate selection. We operationalize this using a linear mixed model approach that controls for Pfam identity as a random effect, and then apply phylogenetic correction to the resulting fixed effects of species on ISD. This approach shows that the same Pfam domain tends to be more disordered when found in a well-adapted species (i.e. a species with a higher CAIS). This is true for both ancient and recently emerged protein domains, albeit of slightly larger magnitude for the latter.

It is important that no additional variable such as GC content creates a spurious correlation by affecting both CAIS and our property of interest. For this reason, we control for GC content during the construction of CAIS. GC content is the product of many different processes, most notably the genome-wide forces of mutation bias and gene conversion (Romiguier & Roux 2017), but potentially also selection on individual nucleotide substitutions that is hypothesized to favor higher %GC (Long et al. 2018). By controlling for %GC, we exclude all these forces from influencing CAIS. CAIS thus captures the extent of adaptation in codon bias, including translational speed, accuracy, and any intrinsic preference for GC over AT that is specific to coding regions. These remaining codon-adaptive factors do not create a statistically significant correlation between CAIS and GC (Supplementary Figures 5A, 5B), nor between ENC and GC (Supplementary Figures 5C, 5D), although CAI is correlated with GC (Supplementary Figures 5E, F).

A direct effect of ISD on fitness agrees with studies of random ORFs in Escherichia coli, where fitness was driven more by amino acid composition than %GC content, after controlling for the intrinsic correlation between the two (Kosinski et al. 2022). However, we have not ruled out a role for selection for higher %GC in ways that are general rather than restricted to coding regions, whether in shaping mutational biases (Smith & Eyre-Walker 2001; Hershberg & Petrov 2009; Hildebrand et al. 2010; Novoa et al. 2019; Forcelloni & Giansanti 2020) or the extent of gene conversion, or even at the single nucleotide level in a manner shared between coding regions and intergenic regions (Long et al. 2018).

A more complex metric could control for more than just GC content and amino acid frequencies. First vs. second vs. third codon positions have different nucleotide usage on average, but while correcting for this might be useful for comparing genes (Zhang et al. 2012), the issue in correcting for it while comparing species is that one might be removing the effect of interest. Similarly, while it might be useful to control for dinucleotide and trinucleotide frequencies (Brbić et al. 2015), to avoid circularity these would need to be taken from intergenic sequences, with care needed to avoid influence from unannotated protein-coding genes or even highly decayed pseudogenes.

Note that if a species were to experience a sudden reduction in population size, e.g. due to habitat loss, leading to less effective selection, it would take some time for CAIS to adjust. CAIS thus represents a relatively long-term historical pattern of adaptation. The timescales setting neutral polymorphism based Ne estimates are likely shorter (Gossmann et al. 2012). It is possible that the reason that we obtained better results when we control for genome-wide GC content than when we control for local GC content is also that codon adaptation adjusts slowly relative to the timescale of fluctuations in local GC content.

Here we developed a new metric of species adaptedness at the codon level, capable of quantifying degrees of codon adaptation even among vertebrates. We chose vertebrates partly due to the abundance of suitable data, and partly as a stringent test case, given past studies finding limited evidence for codon adaptation (Kessler & Dean 2014). We restricted our analysis to only the best annotated genomes, in part to ensure the quality of intergenic %GC estimates, and in part limited by the feasibility of running linear mixed models with six million data points. The phylogenetic tree is well resolved for vertebrate species, with an overrepresentation of mammalian species. Despite the focus on vertebrates, we see a remarkably strong signal for a subtle codon adaptation effect across closely related species, to the point where we can comfortably detect the ISD signal across subsets of domains.

An alternative approach to measuring effective population size focuses on dN/ds, the ratio of nonsynonymous to synonymous substitutions (Weber et al. 2014; Lefébure et al. 2017; Payne & Alvarez-Ponce 2018; Lin et al. 2019; Luzuriaga-Neira & Alvarez-Ponce 2022). A potential issue with this approach is that it is assumes that differences among species are driven by differences in dN and not by differences in dS. The success of our codon adaptation metric suggests that this assumption does not hold across animals, because the proportion of synonymous substitutions that is effectively neutral varies across species. This may explain why dN/ds is not consistently related to life history traits across different taxonomic groups (Figuet et al. 2016).

Our finding that weak selection prefers higher ISD was unexpected, given that lower-Ne eukaryotes have more disordered proteins than higher-Ne prokaryotes (Ahrens et al. 2017; Basile et al. 2019). However, this can be reconciled in a model in which highly disordered sequences are less likely to be found in high-Ne species, but the sequences that are present tend to have slightly higher disorder than their low-Ne homologs. High ISD might help mitigate the trade-off between affinity and specificity (Dunker et al. 1998; Huang & Liu 2013; Lazar et al. 2022); non-specific interactions might be short-lived due to the high entropy associated with disorder, which specific interactions are robust to.

Our new CAIS metric more directly quantifies how species vary in their exquisiteness of adaptation than estimates of effective population size that are based on neutral polymorphism. It can also be estimated for far more species because it does not require polymorphism or mutation rate data, but only a single complete genome. We therefore expect CAIS to have many uses as a new tool for exploring nearly neutral theory, of which our worked example of ISD could be just the start.

Methods

Species

Pfam sequences and IUPRED2 estimates of Intrinsic Structural Disorder (ISD) predictions were taken from James et al. (2021), who studied species marked as “Complete” in the GOLD database, with divergence dates available in TimeTree (Kumar et al. 2017). James et al. (2021) applied a variety of quality controls to exclude contaminants from the set of Pfams and assign accurate dates of Pfam emergence. Pfams that emerged prior to LECA are classified here as “old”, and Pfams that emerged after the divergence of animals and fungi from plants are classified as “young”, following annotation by James et al. (2021).

Codon Adaptation Index

Sharp and Li (1987) quantified codon bias through the Codon Adaptation Index (CAI), a normalized geometric mean of synonymous codon usage bias across sites, excluding stop and start codons. We modify this to calculate CAI including stop and start codons, because of documented preferences among stop codons in mammals (Wangen & Green 2020). While usually used to compare genes within a species, among-species comparisons can be made using a reference set of genes that are highly expressed in yeast genome (Sharp & Li 1987). Each codon i is assigned a Relative Synonymous Codon Usage value:

where Ni denotes the number of times that codon i is used, and the denominator sums over all na codons that code for that specific amino acid. RSCU values are normalized to produce a relative adaptiveness values wt for each codon, relative to the best adapted codon for that amino acid:

Let L be the number of codons across all protein-coding sequences considered. Then

To understand the effects of normalization, it is useful to rewrite this as:

where CAIraw is the geometric mean of the “unnormalized” or observed synonymous codon usages, and CAImax is the maximum possible CAI given the observed codon frequencies.

GC Content

We calculated total %GC content (intergenic and genic) during a scan of all six reading frames across genic and intergenic sequences available from NCBI with access dates between May and July 2019 (described in James et al. (2022)). Of the 170 vertebrates meeting the quality criteria of James et al. (2021), 118 had annotated intergenic sequences within NCBI, so we restricted the dataset further to keep only the 118 species for which total GC content was available.

Codon Adaptation Index of Species (CAIS)

Controlling for GC bias in Synonymous Codon Usage

Consider a sequence region r within species s where each nucleotide has an expected probability of being G or C = gr. For our main analysis, we consider just one region r encompassing the entire genome of a species s. In a secondary analysis, we break the genome up and use local values of gr in the non-coding regions within and surrounding a gene or set of overlapping genes. To annotate the boundaries of these local regions, we first selected 1500 base pairs flanking each side of every coding sequence identified by NCBI annotations. Coding sequence annotations are broken up according to exon by NCBI. When coding sequences of the same gene did not fall within 3000 base pairs of each other, they were treated as different regions. When two coding sequences, whether from the same gene or from different genes, had overlapping l5OObp catchment areas, we merged them together. gr was then calculated based on the non-coding sites within each region, including both genic regions such as promoters and non-genic regions such as introns and intergenic sequences.

With no bias between C vs. G, nor between A vs. T, nor patterns beyond the overall composition taken one nucleotide at a time, the expected probability of seeing codon i in a triplet within r is

where kGC + kAT = 3 total positions in codon i. The expected probability that amino acid a in region r is encoded by codon i is

The Relative Synonymous Codon Usage (RSCU) value used by the CAI measures the degree to which a codon’s relative frequency differs from the null expectation that all synonymous codons are used equally. Using equations 5 and 6, we replace this by one or a set of Relative Synonymous Codon Usage of Species (RSCUS) values for each region:

where Oi is the observed frequency with which amino acid a is encoded by codon i within region r of species s.

Controlling for Amino Acid Composition

Some amino acids may be more intrinsically prone to codon bias. We want a metric that quantifies effectiveness of selection (not amino acid frequency), so we re-weight CAIS on the basis of a standardized amino acid composition, to remove the effect of variation among species in amino acid frequencies.

Let Fa be the frequency of amino acid a across the entire dataset of 118 vertebrate genomes, and fi,s the frequency of codon i in given species s. A candidate CAIS that controls for global GC content but not for amino acid composition can be written as

We want to re-weight fi,s on the basis of Fa to ensure that differences in amino acid frequencies among species do not affect CAIS, while preserving relative codon frequencies for the same amino acid. We do this by solving for aa,s so that

We then define to obtain an amino acid frequency adjusted CAIS:

For convenient implementation in code, we used the following form:

The Fa values for our species set are at https://github.com/MaselLab/Codon-Adaptation-lndex-of-Species/blob/main/CAIS_ENC_calculation/Total_amino_acid_frequency_vertebrates.txt. Similarly, CAIS corrected for local intergenic GC content but not species-wide amino acid composition is

where ni,r is the number of times codon i appears in region r of species s, G is the number of regions, and is the total number of codons in the genome. Rewritten for greater computational ease:

Novembre’s Effective Number of Codons (ENC) controlled for total GC Content

Following from equations 5 and 6, the value representing the deviation of the frequencies of the codons for amino acid a from null expectations is

where Na is the total number of times that amino acid a appears. Novembre (2002) defines the corrected “F value” of amino acid a as

and the Effective Number of Codons as

where each is the average of the “F values” for amino acids with na synonymous codons. Past measures of ENC do not contain stop or start codons (Wright 1990; Novembre 2002; Fuglsang 2004), but as we did for CAI and CAIS above, we include stop codons as an “amino acid” and therefore amend (19) to

Statistical Analysis

All statistical modelling was done in R 3.5.1. Scripts for calculating CAI and CAIS were written in Python 3.7.

Phylogenetic Independent Contrasts

Spurious phylogenetically confounded correlations can occur when closely related species share similar values of both metrics. One danger of such pseudoreplication is Simpson’s paradox, where there are negative slopes within taxonomic groups and a positive slope among them might combine to yield an overall positive slope. We avoid pseudoreplication by using Phylogenetic Independent Contrasts (PIC) (Felsenstein 1985) to assess correlation. PIC analysis was done using the R package “ape” (Paradis & Schliep 2019).

Data Availability

All data and code underlying this article are available in the public repository at https://github.com/MaselLab/Codon-Adaptation-lndex-of-Species.

Acknowledgements

This work was supported by the National Institutes of Health (R01 GM104040 and T32 GM132008), the John Templeton Foundation (60814), the Arnold and Mabel Beckman Foundation Scholars Program, the Western Alliance to Expand Student Opportunities (WAESO) Louis Stokes Alliance for Minority Participation (LSAMP) National Science Foundation (NSF) Cooperative Agreement (HRD-1101728), and UA/NASA Space Grant Undergraduate Research Internship program. Wethank Luke Kosinski, Hanon McShea, David Liberies, and Sawsan Wehbi for helpful discussions, Paul Nelson for providing the genome-wide GC contents, and the University of Arizona Undergraduate Biology Research Program for training.

Codon Adaptation Index is not appropriate for species-wide effectiveness of selection measurements. Each CAI value shown is averaged over an entire species’ proteome. A) The value of CAI is driven by its normalizing denominator term, CAImax. B) As a result, CAI is inversely proportional to CAIS. Each datapoint is one of 118 vertebrate species with “Complete” intergenic genomic sequence available (allowing for %GC correction) and TimeTree divergence dates (allowing for PIC correction). P-values shown are for Pearson’s correlation.

CAIS without correction for amino acid composition still reflects the expected relationship between effectiveness of selection and body. Body size data from PanTHERIA database, originally in log10(mass) in grams; data shown for 62 species in common between PANTHERIA and our own dataset of 118 vertebrate species with a “Complete” intergenic genomic sequence and TimeTree divergence dates. P-value is shown for Pearson’s correlation. Red line shows unweighted Im(y∼x) with grey region as 95% confidence interval.

Our Figure 4 finding that more exquisitely adapted species have protein domains with higher ISD is confirmed by ENC. The same n=118 datapoints are shown as in Figure 4. P-values shown are for Pearson’s correlation. Red line shows unweighted Im(y∼x) with grey region as 95% confidence interval.

More exquisitely adapted species have higher ISD in both ancient and recent protein domains, as confirmed by ENC. Protein domains that emerged prior to LECA are identified as “old”, and protein domains that emerged after the divergence of animals and fungi from plants and found in vertebrates are identified as “young”. Age assignments are taken from James et al. (2021). The same n=H8 datapoints are shown as in Figure 3. P-values shown are for Pearson’s correlation. Red line shows Im(y∼x), with grey region as 95% confidence interval, using a weighted model for non-PIC-corrected figures and unweighted for PIC-corrected figures.

Effective Number of Codons (ENC) and Codon Adaptation Index of Species (CAIS) are uncorrelated with total genomic GC Content. Each datapoint is one of 118 vertebrate species with “Complete” intergenic genomic sequence and TimeTree divergence dates. Statistical significance is only supported if it survives controlling for phylogenetic confounding via Phylogenetic Independent Contrasts (PIC). P-values shown are for Pearson’s correlation.