  The fitness contribution of an allele at one genetic site may depend on
alleles at other sites, a phenomenon known as epistasis. Epistasis can
profoundly influence the process of evolution in populations under selection,
and can shape the course of protein evolution across divergent species. Whereas
epistasis between adaptive substitutions has been the subject of extensive
study, relatively little is known about epistasis under purifying selection.
Here we use mechanistic models of thermodynamic stability in a ligand-binding
protein to explore the structure of epistatic interactions between
substitutions that fix in protein sequences under purifying selection. We find
that the selection coefficients of mutations that are nearly-neutral when they
fix are highly contingent on the presence of preceding mutations. Conversely,
mutations that are nearly-neutral when they fix are subsequently entrenched due
to epistasis with later substitutions. Our evolutionary model includes
insertions and deletions, as well as point mutations, and so it allows us to
quantify epistasis within each of these classes of mutations, and also to study
the evolution of protein length. We find that protein length remains largely
constant over time, because indels are more deleterious than point mutations.
Our results imply that, even under purifying selection, protein sequence
evolution is highly contingent on history and so it cannot be predicted by the
phenotypic effects of mutations assayed in the wild-type sequence.
