Abstract
Affinity maturation produces antibodies that bind antigens with high specificity by accumulating mutations in the antibody sequence. Mapping out the antibody-antigen affinity landscape can give us insight into the accessible paths during this rapid evolutionary process. By developing a carefully controlled null model for noninteracting mutations, we characterized epistasis in affinity measurements of a large library of antibody variants obtained by Tite-Seq, a recently introduced Deep Mutational Scan method yielding physical values of the binding constant. We show that representing affinity as the binding free energy minimizes epistasis. Yet, we find that epistatically interacting sites contribute substantially to binding. In addition to negative epistasis, we report a large amount of beneficial epistasis, enlarging the space of high-affinity antibodies as well as their mutational accessibility. These properties suggest that the degeneracy of antibody sequences that can bind a given antigen is enhanced by epistasis — an important property for vaccine design.
To ensure a reliable response and to neutralize foreign pathogens, the adaptive immune system relies on affinity maturation. In this process, antibody receptors expressed by B cells undergo an accelerated Darwinian evolution through random mutations and selection for affinity against foreign epitopes [1]. Mature antibodies can accumulate up to 20% hypermutations, leading to up to a 10,000 fold improvement in binding affinity [2]. Affinity maturation also produces broadly neutralizing antibodies that target conserved regions of the pathogen, of particular importance for vaccine design against fast evolving viruses [3]. Despite extensive experimental and theoretical work, the key determinants of antibody specificity and evolvability are still poorly understood, mainly because the sequence-to-affinity relationship is difficult to measure comprehensively or to predict computationally [4].
A major confounding factor in characterizing the sequence dependence of any protein function, including affinity, is the pervasiveness of epistasis, the phenomenon by which different mutations interact with each other [5]. Theory [6-8] and genomic data [9] suggest that inter- and intragenic epistasis plays a major role in molecular evolution, by constraining the set of accessible evolutionary trajectories towards adapted phenotypes [1014], enhancing evolvability through stabilizing mutations [15, 16], or slowing down adaptation by the law of diminishing returns [17, 18]. Evidence for epistasis in antibody affinity include direct observations of cooperativity between mutations [19, 20], the dependence of mutational effects on sequence background [21], and statistical covariation of residues in large sequence datasets [22, 23].
Intragenic epistasis has mostly been studied either by measuring the fitness of all possible mutational intermediates between two variants [10, 24-27], or by comparing the effect of mutations in different backgrounds [21, 28, 29]. Many such studies rely on a particular measure of fitness rather than a well-defined physical phenotype. Deep mutational scans (DMS) [30] can compre-hensively map out the epistatic landscape of many genetic variants [14, 31, 32]. However, most DMS methods rely on noisy selection and do not measure the biophysical quantity of interest directly [33], introducing both nonlinearities and noise that could be misinterpreted as epistasis.
Here we analyze the detailed epistatic landscape of an antibody’s binding free energy to its cognate antigen (the 4-4-20 antibody fragment against fluorescein), using data previously obtained by Tite-Seq, a recently introduced DMS variant that accurately measures protein binding affinity in physical units of molarity [34]. By comparing to a simple additive model of mutations on the binding free energy, and carefully controling for measurement noise and nonlinearities, we find that epis- tasis significantly contributes to the antibody’s affinity. This epistasis is not uniformly distributed, but instead favors certain residue pairs across the protein. We use our results to analyze how epistasis both constrains and enlarges the set of possible evolutionary paths leading to high-affinity sequences.
RESULTS
Position Weight Matrix model of affinity
We analyzed data from [34] (https://github.com/jbkinney/16_titeseq), where Tite-Seq was applied to measure the binding affinities of variants of the 4-4-20 fluorescein-binding scFv antibody, henceforth called ‘wildtype’. Libraries were generated by introducing mu-tations to either the CDR1H or CDR3H domains re-stricted to 10 amino acid stretches called 1H and 3H (Fig. 1A). All single amino acid mutants, 1100 random double amino acid mutants, and 150 triple amino acid mutants were generated in multiple synonymous variants and measured, (Fig. 1B). Using a combination of yeast display and high-throughput sequencing at various antigen concentrations, Tite-Seq yielded the binding dissociation constant KD (in M or mol/L) of each variant with the fluorescein antigen.
We first tried to predict the KD of double and triple mutants from single mutant measurements. Mutations are expected to act on the binding free energy in an approximately additive way [32, 35]. One may thus write the free energy of binding, F = ln(KD/c0) (defined up to constant in units of kBT), as a sum over mutations in the mutagenized region, s = (s1,…, sl: where FWT is the wildtype sequence energy, and hj(sj) is the effect of a mutation at position i to residue Si. The elements of the Position-Weight Matrix (PWM) hi(s) are obtained from the KD of single mutants shown in Fig. 1C. Since Tite-Seq measurements are limited to values of KD ranging from 10−95 to 10−5, for consistency PWM predictions outside this range were set to the boundary values. The PWM was a fair predictor of double and triple mutants (Fig 1D), accounting for 62% (p < 10−61, F-test) of the variance for 1H mutants and 58% (p < 10−48, F-test) of the variance of 3H mutants.
The unexplained variance missed by the PWM model may have three origins: measurement noise, epistasis, or nonlinear effects. The last case corresponds to the hypothesis of additivity not being valid for F = ln(KD/c0), but for some other nonlinear transformation of F. Such a nonlinearity, also called “scale,” can lead to spurious epistasis [5, 36]. We first checked that additivity did not apply to the untransformed dissociation constant, KD: a PWM model learned from KD instead of F could only explain 34% of the variance of all 1H and 3H multiple mutants, down from 62% when learning from F (Fig. S1). We then looked for the non-linear transformation E(F) that would give the PWM model with the best predictive power (Methods and Fig. S2). This optimization yielded only a modest improvement to 65% of the explained variance. In addition, the optimal function E was very close to the logarithm (R2 = 97%, Fig. S3). Since nonlinear effects do not play a significant role, henceforth we only consider the PWM model defined on the free energy.
Epistasis affects affinity
To identify epistasis, we estimated the difference between the measured binding free energies of double and triple mutants, F(s), and the PWM prediction, FPWM(s). However, these small differences can be confounded by measurement noise, which can be mistaken for epistasis. To control for this noise, we defined Z-scores between two estimates of the free energy, Fa and Fb, as , where and are their estimates of uncertainty. We first computed Z-scores between independent estimates of the same free energy using synonymous variants (Zerror, Methods). We found that the distribution of Zerror was normal with variance ≈ 1 (Fig. 2A, orange line), as expected from Gaussian measurement noise.
We then estimated the effect of epistasis by calculating Z-scores (Zepi) from the difference between the PWM prediction, FPWM (Eq. 1), and the measured F. The resulting distributions of Z-scores (Fig. 2A, blue and red lines) had much larger variances than expected from measurement noise (standard deviation 3.34 for 1H, and 5.44 for 3H), indicating strong epistasis. These epistatic effects were on average slightly beneficial (positive Z): 25% of double mutants inside the reliable readout boundaries (10−9.5M ≤ KD ≤ 10−5M) showed significant beneficial epistasis (Zepi > 1.64, p = 0.05), and 20% significant deleterious epistasis (Zepi > −1.64). Comparing the variance of Zepi with that of Zerror gives a large fraction of the unexplained variance that is attributable to epistasis, 1 — Var(Zerror)/Var(Zepi) = 89% for 1H, and 96% for 3H.
To determine whether certain positions along the sequence concentrated epistatic effects, we computed the mean squared Z-score for all double mutations at each pair of positions (excluding median boundary values), revealing a complex and heterogeneous landscape of epista-sis (Fig. 2B and Fig. S5 for the epistasis magnitude superimposed on the wildtype’s crystal structure). CDR3H, which interacts directly with the antigen, is observed to have more epistatically interacting sites than CDR1H. Interestingly, the three most epistatic pairs in 3H — between positions 101, 106 and 108 — are mutated in the previously described super-optimized 4m5.3 antibody [37] (mutations shown in green in Fig. 1B), consistent with previous suggestions that positions 101 and 106 interact together and with position 108 via hydrogen bonds [19, 34]. Epistasis is usually expected between residues that are in contact in the protein structure [38-42], as for instance between positions 101 and 106. However, the mean squared Z-score weakly correlated with residue distance (r = –0.13, p = 0.21 for 1H, r = –0.34, p = 0.003 for 3H, Fig. S6).
We next looked for evidence of “sign epistasis,” where one mutation reverses the sign of the effect of another mutation (Fig. 2C). We defined a Z-score for a single mutation A quantifying the beneficial effect of that mutation relative to the noise, ZA = (FWT — FA)σA, where FWT and FA are the wildtype and mutant free energies, and σ is the measurement error estimated as before. Since we are only interested in the sign of the effect, we keep single mutants at the reliable readout boundary. An equivalent Z-score was defined for a mutation A in the background of an existing mutation B: , where FAB is the free energy of the double mutant AB. Significant sign epistasis was defined by ZA|BZA < 0 and |ZA|B|, |ZA| > 1.64, and reciprocal sign epistasis by the additional symmetric condition A ↔ B.
We found 44 cases of significant epistasis, listed in S1_table_sign_epistasis.csv and summarized in Tables S1 and S2. Deleterious sign epistasis was exceptional, with just one instance in 1H and 4 in 3H (Fig. S4). The four most significant cases of beneficial sign epistatis for each domain are depicted in Fig. 2D. Among cases where both single mutations were deleterious, we found 3% of mutants in 1H and 0.7% in 3H with significant beneficial epistasis, versus 0.06% expected by chance (the null expectation, which takes into account the constraint that ZA+ZB|A = ZB+ZA|B, is defined in the Methods); 0.7% were reciprocal in 1H, and 0.3% in 3H, versus 0.01% expected by chance. To evaluate how these epistatic in-teractions may affect affinity maturation, we estimated how often “viable” double mutants were separated from the wildtype by nonviable single mutants, where viability is defined by KD < 10−6M [43-45], forming possible roadblocks to affinity maturation. This strong instance of “rescue” epistasis occured in roughly half of the mu-tants with beneficial sign epistasis (Table S1 and Table S2).
Modeling epistasis and its impact on affinity maturation
To integrate the observed epistatic interactions into a predictive model of affinity, we introduced a model of binding free energy as: where J is the interaction strength between residues. To avoid overfitting and allow for independent validation (in the absence of a sufficient number of triple mutants), we grouped residues into 4 biochemical categories [46] (polar, nonpolar, acidic, basic, see Methods) and let the entries of J only depend on that category.
We trained the model on the 1208 1H or 1216 3H double and triple mutants, using a Lasso penalty to control for overfitting. The optimal penalty was set by 10 fold cross-validation, i.e. by maximizing the explained variance of a subset comprising 1/10 of the mutants by using a model trained on the remaining 9/10, averaged over the 10 subsets (Fig. S7A and Methods). Interacting pairs with posterior probabilities > 0.95 as determined by Bayesian Lasso [47] are shown in Fig. 3A and Fig. 3B.
Out of the 720 possible terms, 52 1H and 45 3H interaction terms were identified by this method. Although these interactions, whose number is limited by the number of measured variants, only modestly improved the explained variance relative to the PWM in all multiple mutants (from 62% to 64% for 1H and from 58% to 60% for 3H), it substantially improved the affinity prediction of the mutants with significant epistasis (R2 from 27% to 50% in 1H, from 13% to 44% for 3H, Fig. S7B-Fig. S7C). Notably, two mutations of the super-optimized 4m5.3 antibody are predicted by the model to have epistatic interactions: a slightly deleterious effect between A101 and L108, and a strongly beneficial one between S102 and L108.
Next we used our models to estimate the diversity, or “degeneracy”, of antibodies with good binding affinity. Specifically, we evaluated the degeneracy volume V of high-affinity sequences as the number of sequences with KD < B, using either the PWM (Eq. 1) or pairwise (Eq. 2) models, using a combination of exhaustive and Monte-Carlo sampling (Methods). Compared to the coarse-grained pairwise model trained previously, the interaction strength J was learned directly for each residue pair, without grouping by biochemical category and with no Lasso penalty. The volume of 1H mutants was larger than that of 3H mutants (Fig. 3C), in agreement with the fact that CDR3H plays a more important role in binding affinity. Epistasis increased the recognition volume for both domains, consistent with the previous observation that epistatic effects are, on average, more beneficial than deleterious. To explore the diversity of evolutionary paths leading to recognition, we computed the mutational flux A in and out of the high-affinity region as the probability that a random mutation in a high-affinity sequence (KD < B) causes loss of recognition (KD > B), summed over all high-affinity sequences (Methods). Again we found that epistasis increased the mutational flux, even after normalizing by volume, A/V (Fig. 3D). We checked that these differences were robust to sampling noise and overfitting by performing a jack- knife analysis (p < 10−5 for the difference in A and V between the PWM and pairwise models, see Methods).
DISCUSSION
By analyzing massively parallel affinity measurements obtained by Tite-Seq, we painted a detailed picture of epistasis in a well-defined physical phenotype — the binding free energy of an antibody to an antigen. We showed that antibody sequences contain many epistatic interactions contributing to the binding energy, and that many of them have beneficial effects. Our approach involves first training an additive (PWM) model as a baseline, and identifying departures from that model as epistasis. In this comparison, a crucial step was to correct for the two issues of scale and measurement noise.
The first issue, identified by Fisher [36] and also called unidimensional epistasis [25], is the idea that an epistatic trait becomes additive upon a different parametrization. For instance, protein stability, which often determines fitness, is a nonlinear function of the folding free energy difference, which is expected to be roughly additive [12, 27-29, 48-50]. This leads to both a law of dimin-ishing returns [29] and robustness to mutations when the protein is very stable [48]. To disentangle these potential artifacts, we defined our PWM on the binding free energy, which we expect to be additive in sequence content, and we checked that this parametrization was close to minimizing epistasis.
To tackle the second and perhaps more important issue of noise, especially in the context of deep mutational scans where many variants are tested [31], we developed a robust methodology based on Z-scores to identify epistatic interactions as significant outliers. This analysis showed that almost all of the variance unexplained by additivity (∽ 40%) could be attributed to epistasis, making its contribution to the phenotype comparable to that of single mutations. A large fraction of that epis- tasis was beneficial, in contrast with previous reports of mostly negative epistasis owing to the concavity of the scale [24, 29, 49], which we here circumvent by directly considering the free energy.
Epistasis is key to understanding the predictability and reproducibility of evolutionary paths [18, 51]. Our results show how it could constrain the space of possible hypermutation trajectories during affinity maturation, with important consequences for antibody and vaccine design, as the importance of eliciting responses of antibodies that are not just strongly binding but also evolvable is being increasingly recognized [52]. Targeting epistatic interactions may provide an alternative strategy for optimizing antibody affinity: among the 12 epistatic hotspots in CDR1H and 20 in CDR3H that we identified , 4 involved positions mutated in the super-optimized 4m5.3 antibody sequence, with a higher epistatic contribution than expected by chance. We also identified 3 cases of beneficial sign epistasis, in which the double mutant was fit despite the single mutant being deleterious. For instance, the D108E mutations in 4m5.3 is deleterious by itself but is rescued beyond the wildtype value by the S101A mutation [19], which occurred first in the directed evolution process [37]. We report 10 extreme cases of viable double mutants whose single-mutant intermediates are nonviable, possibly blocking affinity maturation. However, our analysis of the volume and mutational flux of the region of low binding free energies in sequence space suggests that epistasis facilitates the evolution of high-affinity antibodies. Additionally interactions with the non-mutated parts of the sequence and evolution of the antigen binding partner can either add further constraints or open up additional paths.
Taken together, our results show the importance of taking into account epistasis when predicting antibody evolution and guiding vaccine design. Our systematic approach for identifying and quantifying epistasis, with the implementation of important controls for scale and noise, could be used by other investigators to analyze deep-mutational scans of protein function.
METHODS
Values of KD as measured by Tite-Seq for variants of the 4-4-20 fluorescein-binding antibody [34] can be found at https://github.com/jbkinney/16_titeseq. The scripts used for the analyses presented here are available at https://github.com/rhys-m-adams/epistasis_4_4_20.
Position Weight Matrix
The amino-acid sequence of the 10 amino acid stretches of the CDR1H or CDR3H domains are denoted by s = (s1,…,s10). The corresponding 30-long nucleotide sequences are denoted by v. The binding free energy F(s) of an amino-acid variant is obtained as the mean over 3 replicate experiments, and over all its synonymous variants: where Sa(s) is the set of measured nucleotide sequences that translate to s in replicate a, and N(s) = Σa|Sa(s)| a normalization constant.
The elements of the PWM are defined as hi(q) = F(s(i,q)) − FWT, where s(i,q) is the single mutant mutated at position i to residue q, and hi(q) = 0 when q is the wildtype residue at position i.
Optimal nonlinear transformation of the free energy
To test whether transforming F through a nonlinear function E(F) before learning the PWM could improve its predictive power, we defined the nonlinear additive model: where f = E−1 is the inverse function of E, = E(s(i,q)) – EWT, and E(s) is evaluated similarly to Eq. 3: E(s) = (1/N(s)) ΣaΣv∊Sa(s) E[ln(KD(v)/c0)].
To find the transformation E that gives the highest explained variance while avoiding overfitting, we aimed to minimize the following objective function: where the sum in s runs over double and triple mutants, and α is a tunable parameter.
Numerically, we parametrize the function E(F) as piecewise linear: E(F) = Ei × (Fi+1 – F)/δF + Ei+1 × (F – Fi)/δF for Fi ≤ F ≤ Fi, where Fi are equally spaced grid point along F, δF = Fi+1 – Fi, and Ei the value of E at these points. The smoothing penalty is approximated by a sum over the squared discretized second derivative: .
We minimize O[E] ≈ O[E1,…, EN] as a quadratic function of its arguments (Ei), while imposing boundary constraints on the PWM prediction and the requirement that E is a increasing function of F (i.e. Ei+1 > Ei), using the python package cvxopt [53].
The hyper-parameter α is evaluated by maximizing the generalized cross-validation of the coefficient of determination where are learned through optimizing Eq. 5, but after removing from the dataset a subset S of the multiple mutants comprising one tenth of the total. The average is over ten non-overlapping subsets S.
This method was first tested on simulated data. Each PWM element was drawn from a normal distribution of zero mean and variance 1, and then EPWM(S) was computed for each of the antibody sequences present in our data. Our simulated “measurement” was defined as a function of a noisy realization of E = EPWM + ∊ (where ∊ is some Gaussian noise) in three different ways: linear F = E, exponential F = exp(E), high-frequency F = 2E + sin(2E), and logistic F = 1/[1 + exp(−E)]. ∊ was drawn from a centered normal distribution with 1/2 the standard deviation of EPWM. F was then truncated to the 200th lowest and 200th highest values, to mimick the boundary cutoff in our measurements. Comparing our original EPWM to our fit Ê shows that our method is able to infer the true PWM model and a smooth nonlinearity from noisy data (Fig. S2).
We then applied the method to the experimental data. The cross-validation R2 is represented as a function of the smoothing parameter α in Fig. S3A, and the corresponding optimal function E(F) in Fig. S3B. The comparison between measurement and the PWM model is shown in Fig. S3C.
Z-scores
We used synonymous mutants to estimate our measurement error. The mean free energy of a nucleotide sequence is defined as the mean over replicate measurements: F(v) = 〈ln(KD(v,a))a, and the standard error σ(v) is defined accordingly as the pooled error over replicates. Antibodies with KD having median values at the boundary values of 10−9.5 or 10−5 were excluded from the analysis since these values artificially cluster at the boundary, leading to underestimates of error.
The error Z-score was calculated between pairs of nucleotide sequences with the same amino acid translation: .
Epistatic Z-scores were estimated by calculating the measurement error over both replicates and synonymous variants, as in Eq. 3: and the pooled standard error for a PWM prediction, calculated as the sum of measurement errors from single mutations: where σi(q) = σ(s(i,q)), and σi(q) = 0 when q is the wildtype residue at i. The epistatic Z-score is defined as:
Null model for sign epistasis
To calculate p-values for sign epistasis, we used the following null model for sets of four Z-scores satisfying ZA + ZB|A = ZB + ZA|B. Calling x1 = ZA, x2 = ZB|A, x3 = – ZA|B, x4 = – ZA, the condition becomes that each xi has zero mean and variance one, with the constraint . The distribution with maximum entropy satisfying these requirements is a centered multi-variate Gaussian uniquely defined by its covariance matrix . The p-value for sign epistasis, ZA > 1.64 and ZA|B < 1.64, was estimated by Monte Carlo sampling under that Gaussian distribution as Pr(x1 > 1.64 & x2 > 1.64) + Pr(x3 > 1.64 & x4 > 1.64) − Pr(x1 > 1.64 & x2 < −1.64 & x3 > 1.64 & x4 < –1.64) = 6.2 · 10−4, and the probability for reciprocal sign epistasis as Pr(x1 > 1.64 & x2 < – 1.64 & x3 > 1.64 & x4 < –1.64) = 10−4.
Epistatic model
The epistatic terms of the pairwise model were made to depend on the biochemical categories of the interacting residues, , with b(s) = nonpolar for s = AFGILMPVW, b(s) = polar for s = CNQSTY, b(s) = acidic for s = DE, and b(s) = basic for s = HKR. A fifth category was added to correspond to the wildtype residue, so that (wildtype, b) = The model was trained by minimizing the mean squared error with a regularization penalty over all matrices :
The Lasso penalty λ was learned by 10-fold crossvalidation, and energy terms found in less than 2 sequences were excluded from the fit. Posterior values for terms were calculated using Bayesian Lasso [47].
The volume and mutational flux were defined as: where Θ(x) is the Heaviside function, i.e. Θ(x) = 1 if x ≥ 0 and 0 otherwise; d(s, s′) is the Hamming distance between two sequences; and l = 10 is the sequence length. The normalization 19 × l corresponds to the number of mutants s′ at Hamming distance 1 from s. The sums over s in Eqs. 11-12 have 2010 elements and are computationally intractable. To overcome this, we approximated the sum using a mixture of Monte-Carlo and complete enumeration, depending on the distance of s from the wildtype. Calling Cd the set of sequences s at Hamming distance d from wildtype, we used: where g(s) is a function of s to be summed such as in V or A in Eqs. 11-12, and is a random subset of Cd of size min(|Cd|, Pd), with , where P is the maximum number of sequences one is willing to sample completely aa each d to perform the estimation, and where . For small d, when |Cd| ≤ Pd, the enumeration is complete, while for large d and |Cd| > Pd, the sum is estimated from a uniformly distributed Monte Carlo sample of Cd.
ACKNOWLEDGMENTS
We would like to thank Yuanzhe Guan and Carlos Ta- laveira for their suggestions. The authors declare no conflicts of interest. R.M.A., T.M. and A.M.W. were supported by grant ERCStG n. 306312.
References
- [1].↵
- [2].↵
- [3].↵
- [4].↵
- [5].↵
- [6].↵
- [7].
- [8].↵
- [9].↵
- [10].↵
- [11].
- [12].↵
- [13].
- [14].↵
- [15].↵
- [16].↵
- [17].↵
- [18].↵
- [19].↵
- [20].↵
- [21].↵
- [22].↵
- [23].↵
- [24].↵
- [25].↵
- [26].
- [27].↵
- [28].↵
- [29].↵
- [30].↵
- [31].↵
- [32].↵
- [33].↵
- [34].↵
- [35].↵
- [36].↵
- [37].↵
- [38].↵
- [39].
- [40].
- [41].
- [42].↵
- [43].↵
- [44].
- [45].↵
- [46].↵
- [47].↵
- [48].↵
- [49].↵
- [50].↵
- [51].↵
- [52].↵
- [53].↵