Positive and Negative Selection in Molecular Evolution

By Dr. Zubair Khalid, DVM, MS, PhD ·

Positive and Negative Selection in Molecular Evolution

Introduction to Positive and Negative Selection

Molecular evolution is governed by the interplay between mutation, genetic drift, and natural selection operating on heritable variation. At the sequence level, selection manifests in two principal forms: positive selection, which drives the fixation of advantageous alleles, and negative selection, which removes deleterious variants from populations. These opposing forces shape the evolutionary trajectory of every gene, regulatory element, and genomic region, leaving distinct signatures that molecular evolutionary biologists can detect and quantify.

The conceptual foundation for understanding selection at the molecular level rests on the neutral theory of molecular evolution, which posits that the majority of fixed differences between species are selectively neutral or nearly so. Under this framework, positive and negative selection represent departures from neutrality—deviations that carry important functional information. Negative selection, also called purifying selection, is overwhelmingly the more common form of selection acting on functional sequences. It maintains the integrity of proteins, RNAs, and regulatory elements by eliminating mutations that disrupt function. Positive selection, by contrast, is rarer but arguably more interesting from an adaptive standpoint, as it identifies the genetic changes underlying organismal diversification and environmental adaptation.

What Is Negative Selection?

Negative selection operates when a mutation reduces organismal fitness, causing carriers of that allele to leave fewer offspring than non-carriers. At the molecular level, this translates to a reduced probability of the mutation being transmitted to subsequent generations. The strength of negative selection scales with the magnitude of the fitness effect: strongly deleterious mutations are eliminated almost immediately, while mildly deleterious mutations may persist for some time before being purged, particularly in small populations where genetic drift can overwhelm selection.

The genomic prevalence of negative selection is substantial. In protein-coding genes, most nonsynonymous mutations—those that alter the amino acid sequence—are deleterious to some degree. This is because proteins have evolved over billions of years to perform specific biochemical functions, and most random amino acid changes disrupt folding, catalysis, binding interfaces, or structural stability. The result is that the rate of nonsynonymous substitution between species is typically much lower than the rate of synonymous substitution, which does not alter the protein sequence.

What Is Positive Selection?

Positive selection occurs when a mutation confers a fitness advantage, increasing the probability that carriers survive and reproduce. Such mutations are said to be under positive selection pressure. Over time, advantageous alleles rise in frequency and may eventually become fixed in the population. The signature of positive selection at the sequence level is an elevated rate of nonsynonymous substitution relative to synonymous substitution, reflecting the accelerated fixation of amino acid-altering changes that improve function.

Positive selection is often associated with adaptation to new environments, host-pathogen arms races, and the evolution of novel functions following gene duplication. Classic examples include the evolution of antifreeze proteins in Antarctic fish, the diversification of immune system genes in response to pathogen pressure, and the emergence of new enzymatic activities after gene duplication events. Importantly, positive selection can act on individual codons within a gene rather than on the entire gene uniformly, which requires methods capable of detecting selection at fine resolution.

Mechanisms of Selection at the Molecular Level

Synonymous vs. Nonsynonymous Substitutions

The genetic code is degenerate: most amino acids are encoded by multiple codons. A synonymous substitution changes the codon but not the encoded amino acid, while a nonsynonymous substitution changes the amino acid. This distinction is fundamental to molecular evolution because synonymous substitutions are largely invisible to selection at the protein level, whereas nonsynonymous substitutions are the primary substrate for both positive and negative selection.

Synonymous substitutions are not entirely neutral, however. Codon usage bias can arise from selection for translational efficiency or accuracy, particularly in highly expressed genes. In organisms such as Escherichia coli and Saccharomyces cerevisiae, preferred codons correspond to the most abundant tRNA species, and synonymous mutations that shift toward unpreferred codons can reduce fitness. Similarly, synonymous mutations can affect mRNA stability, splicing, and protein folding kinetics. Nevertheless, the selective constraints on synonymous sites are generally far weaker than those on nonsynonymous sites, making synonymous substitutions a useful baseline for estimating the neutral mutation rate.

Fitness Effects and Fixation Probability

The fate of a new mutation depends on its fitness effect, denoted by the selection coefficient s. For a diploid population, a mutation with fitness effect s has a fixation probability of approximately 2*s* for beneficial mutations (when s > 0) and near zero for strongly deleterious mutations. Neutral mutations (s = 0) fix at a rate equal to their mutation rate, regardless of population size. The population-genetic parameter Nₑs—the product of effective population size and selection coefficient—determines whether selection or drift dominates. When |Nₑs| >> 1, selection is effective; when |Nₑs| << 1, mutations behave as effectively neutral.

This population-genetic reality has important implications for detecting selection. In species with large effective population sizes, such as Drosophila melanogaster or bacteria, even weakly deleterious mutations are efficiently purged by negative selection. In species with small effective population sizes, such as humans or many vertebrates, slightly deleterious mutations can drift to fixation, reducing the power to detect negative selection and potentially generating false signals of positive selection if not properly accounted for.

Detecting Selection: The dN/dS Ratio

The ratio of nonsynonymous substitution rate (dN) to synonymous substitution rate (dS), denoted dN/dS (also written as Ka/Ks or ω), is the most widely used metric for detecting selection in protein-coding sequences. The logic is straightforward: synonymous substitutions serve as a proxy for the neutral mutation rate, and deviations of dN/dS from 1 indicate departures from neutrality.

Calculating dN/dS

Computing dN/dS requires an alignment of homologous coding sequences and a model of codon evolution. The most commonly used methods include the Nei-Gojobori method, which counts synonymous and nonsynonymous sites and differences using the genetic code, and maximum-likelihood approaches implemented in programs such as PAML (Phylogenetic Analysis by Maximum Likelihood) and HyPhy. Maximum-likelihood methods model codon substitution as a Markov process with parameters for transition/transversion bias, codon frequency bias, and the dN/dS ratio, allowing for statistical comparison of models with different selective regimes.

The calculation involves three steps: first, align the coding sequences at the nucleotide level, ensuring that codons are correctly aligned; second, estimate the number of synonymous and nonsynonymous sites in each sequence; and third, estimate the number of synonymous and nonsynonymous substitutions per site. Sophisticated methods account for multiple hits at the same site, unequal codon frequencies, and variation in the dN/dS ratio across sites or lineages.

Interpreting dN/dS Values

The interpretation of dN/dS is conceptually simple:

dN/dS ValueInterpretation
ω = 1Neutral evolution; amino acid changes fix at the same rate as synonymous changes
ω < 1Negative selection; nonsynonymous changes are deleterious and are purged
ω > 1Positive selection; nonsynonymous changes are advantageous and fix at an accelerated rate

In practice, however, the interpretation requires caution. A dN/dS ratio averaged over an entire gene will almost always be less than 1, because most codons in a functional gene are under purifying selection, and the signal from a few positively selected sites is diluted. Even genes with well-documented positive selection, such as the MHC (major histocompatibility complex) genes in vertebrates, typically have whole-gene dN/dS values below 1. The power of the dN/dS framework lies in its ability to detect heterogeneity—across sites, across lineages, or both—rather than in the whole-gene average.

Advanced Methods for Detecting Selection

Site Models and Branch Models

Maximum-likelihood codon models in PAML allow the dN/dS ratio to vary across sites or across branches of a phylogeny. Site models assign each codon to a category with a distinct ω value, drawn from a discrete distribution. The null model (M7) assumes a beta distribution of ω values constrained between 0 and 1, reflecting only neutral and negatively selected sites. The alternative model (M8) adds a category of sites with ω > 1, allowing for positive selection. A likelihood ratio test compares the fit of M7 and M8; a significant result indicates the presence of sites under positive selection. The Bayes empirical Bayes (BEB) procedure then identifies the specific codons with high posterior probability of belonging to the positively selected category.

Branch models allow ω to vary among lineages in a phylogeny, testing whether a particular lineage—such as the lineage leading to a new species or the lineage following a gene duplication—experienced accelerated protein evolution. The free-ratio model estimates ω independently for every branch, while more constrained models designate foreground and background branches. Branch models are useful for detecting episodic shifts in selective pressure but cannot localize selection to specific codons.

Branch-Site Models and Episodic Selection

Branch-site models combine the features of site and branch models, allowing ω to vary both across sites and across branches. These models are designed to detect episodic positive selection: sites that experienced positive selection only on specific lineages. The branch-site model implemented in PAML (model A) specifies four site classes: sites conserved throughout the phylogeny (ω₀ < 1), sites evolving neutrally (ω₁ = 1), sites under positive selection on foreground branches only (ω₂ > 1), and sites under positive selection on both foreground and background branches (ω₂ > 1). A likelihood ratio test compares this model against a null model with ω₂ = 1, and the BEB procedure identifies sites under episodic selection.

HyPhy offers complementary approaches, including the mixed effects model of evolution (MEME), which allows the distribution of ω to vary independently at each site, and the branch-site unrestricted statistical test for episodic diversification (BUSTED), which tests whether a set of foreground branches experienced positive selection at any site. These methods are particularly valuable for detecting selection that acts on a small number of codons in a subset of lineages—a common pattern in host-pathogen coevolution and adaptive radiation.

Other Approaches: MK Test, McDonald-Kreitman

The McDonald-Kreitman (MK) test takes a population-genetic approach, comparing polymorphism within a species to divergence between species. The test uses a 2×2 contingency table: synonymous and nonsynonymous changes that are polymorphic within a species versus those that are fixed between species. Under neutrality, the ratio of nonsynonymous to synonymous polymorphism should equal the ratio of nonsynonymous to synonymous divergence. A significant excess of nonsynonymous divergence indicates positive selection, while an excess of nonsynonymous polymorphism suggests segregating deleterious mutations (negative selection) or, in some cases, balancing selection.

The MK test has the advantage of not requiring a phylogeny and being robust to certain model misspecifications. However, it is sensitive to demographic history: population expansions or contractions can distort the site frequency spectrum and produce spurious signals. Extensions such as the asymptotic MK test and methods that incorporate the site frequency spectrum (e.g., the Poisson random field model) provide more robust inference.

Genomic Signatures of Selection

Selective Sweeps and Background Selection

Positive selection leaves characteristic signatures in patterns of genetic variation across the genome. When an advantageous allele rises to fixation, it carries with it linked neutral variation through a process called genetic hitchhiking. The resulting selective sweep reduces genetic diversity in the genomic region surrounding the selected site, creates an excess of low-frequency derived alleles, and generates a distinctive pattern of linkage disequilibrium (LD). The size of the swept region depends on the strength of selection and the recombination rate: strong selection and low recombination produce broad sweeps, while weak selection or high recombination narrows the footprint.

Negative selection also shapes genomic variation, but in a different manner. Background selection refers to the reduction in effective population size at linked neutral sites caused by the constant removal of deleterious mutations. Regions with low recombination rates are particularly affected, because deleterious alleles are eliminated along with large linked blocks of neutral variation. Background selection reduces diversity but does not produce the skewed site frequency spectrum characteristic of selective sweeps.

Using Population Data to Infer Selection

Population-genomic methods exploit these signatures to detect selection without requiring a known phenotype. The site frequency spectrum (SFS)—the distribution of allele frequencies across segregating sites—is a powerful summary statistic. Negative selection skews the SFS toward rare variants, while positive selection during a sweep produces an excess of both very rare and very common variants. The Tajima's D statistic compares two estimators of the population mutation rate θ; negative values indicate an excess of rare variants, consistent with purifying selection or population expansion, while positive values indicate an excess of intermediate-frequency variants, consistent with balancing selection or population contraction.

Composite likelihood methods such as SweepFinder and SweeD scan genomes for regions with SFS and LD patterns consistent with selective sweeps. Cross-population tests such as XP-CLR and Fst-based approaches identify regions where allele frequencies differ dramatically between populations, potentially reflecting local adaptation. These methods are computationally intensive but have successfully identified hundreds of candidate selected regions in human, plant, and animal genomes.

Positive Selection in Real Genomes

Examples from Immune Genes

The genes of the immune system are among the best-documented targets of positive selection. Host-pathogen arms races create persistent selective pressure for diversity at antigen recognition sites. The MHC genes in vertebrates are the canonical example: the peptide-binding groove that presents antigens to T cells shows elevated dN/dS ratios at the codons that contact the peptide. In humans, the HLA (human leukocyte antigen) genes exhibit extraordinary polymorphism, with hundreds of alleles at some loci, maintained by balancing selection that favors heterozygotes and frequency-dependent selection that favors rare alleles.

Similar patterns are observed in other immune genes. The immunoglobulin genes diversify through somatic hypermutation, but the germline variable regions also show evidence of positive selection. Antiviral genes such as APOBEC3G, TRIM5α, and OAS1 in primates show elevated dN/dS ratios, reflecting ongoing conflict with retroviruses and other pathogens. The rapid evolution of these genes is driven by the need to recognize and neutralize rapidly evolving viral proteins.

Positive Selection in Humans and Other Species

Genome-wide scans have identified numerous genes under positive selection in the human lineage. The FOXP2 gene, involved in speech and language, shows evidence of positive selection in the human lineage, with two amino acid changes that occurred after the split from chimpanzees. The LCT gene, encoding lactase, shows strong signatures of positive selection in populations with a history of dairy farming, where the ability to digest lactose into adulthood conferred a substantial fitness advantage. The EDAR gene, involved in hair and tooth development, shows evidence of positive selection in East Asian populations, where a derived allele affecting hair thickness and tooth shape reached high frequency.

In other species, positive selection has been documented in genes underlying adaptation to extreme environments. High-altitude adaptations in Tibetan humans and Himalayan wolves involve the EPAS1 and EGLN1 genes, which regulate the hypoxia response. In Antarctic icefish, the loss of hemoglobin and myoglobin genes is associated with adaptation to cold, oxygen-rich waters. Following gene duplication, the new copies often experience a period of relaxed constraint followed by positive selection as they acquire new functions—a process known as neofunctionalization.

Negative Selection and Purifying Selection

Conservation and Functional Constraint

Negative selection is the dominant force acting on functional genomic elements. The vast majority of the human genome—approximately 90%—shows evidence of purifying selection, including protein-coding exons, untranslated regions, splice sites, and regulatory elements. The intensity of negative selection varies across the genome, with the strongest constraint observed in protein-coding regions, particularly in genes essential for development and basic cellular functions.

The concept of a conserved sequence is a direct manifestation of negative selection. When a sequence is conserved across deep evolutionary time—for example, the homeobox genes conserved between flies and humans—it indicates that most mutations in that sequence are deleterious and have been eliminated. The rate of substitution in conserved regions is far lower than the neutral rate, providing a quantitative measure of functional constraint. Genomic conservation is now used as a primary criterion for identifying functional elements, as in the phyloP and phastCons scores used in comparative genomics.

Detecting Negative Selection

Negative selection can be detected through several complementary approaches. The dN/dS ratio provides a direct measure: values significantly less than 1 indicate purifying selection. However, because most genes have dN/dS values well below 1, the more informative question is often the relative intensity of constraint across genes or regions. The ratio of substitution rate in a focal region to the neutral rate, often estimated from synonymous sites or ancestral repeat elements, provides a measure of constraint.

Population-genetic approaches detect negative selection from the site frequency spectrum. Deleterious mutations segregate at lower frequencies than neutral mutations because they are continually purged. The proportion of nonsynonymous polymorphism that is at low frequency, relative to synonymous polymorphism, provides an estimate of the strength of negative selection. Methods such as the site frequency spectrum-based inference implemented in software like ∂a∂i and dadi can estimate the distribution of fitness effects of new mutations, revealing the proportion that are strongly deleterious, mildly deleterious, and effectively neutral.

Common Pitfalls and Misinterpretations

Overinterpreting dN/dS Values

The most common error in molecular evolution is interpreting a whole-gene dN/dS ratio greater than 1 as definitive evidence of positive selection. In reality, such values are rare and typically arise only when the majority of sites in a gene are under positive selection—a situation that is uncommon. More frequently, positive selection acts on a small number of codons, and the whole-gene average remains below 1. Conversely, a dN/dS ratio below 1 does not rule out positive selection at specific sites. The appropriate approach is to use site-specific or branch-site models that can detect localized positive selection.

Another frequent error is failing to account for the effects of recombination. The standard dN/dS models assume no recombination, and recombination can inflate the apparent dN/dS ratio by breaking down linkage between sites. In datasets with substantial recombination, methods that account for recombination or that analyze smaller, non-recombining blocks are preferable.

Ignoring Demographic Effects

Population demographic history can mimic or mask the signatures of selection. Population bottlenecks reduce genetic diversity and skew the site frequency spectrum toward rare variants, mimicking the effects of negative selection or a recent selective sweep. Population expansions produce an excess of rare variants, which can be mistaken for purifying selection. Conversely, population structure can generate allele frequency differences between populations that resemble local adaptation.

The MK test is particularly sensitive to demographic effects because it relies on the equilibrium site frequency spectrum. Methods that jointly infer demography and selection, such as the composite likelihood approaches implemented in ∂a∂i, provide more robust inference by explicitly modeling the demographic history.

Misusing the Term 'Positive Selection'

The term "positive selection" is sometimes used loosely to describe any increase in allele frequency, including neutral drift or demographic effects. In molecular evolution, positive selection specifically refers to the process by which advantageous alleles increase in frequency due to their fitness effects. A gene that shows high divergence between species but no evidence of elevated dN/dS is not necessarily under positive selection—it may simply be evolving neutrally or under relaxed constraint.

Similarly, the distinction between positive selection and purifying selection vs positive selection is often conflated. Purifying selection maintains the status quo by removing deleterious mutations, while positive selection drives change by fixing advantageous mutations. A gene can be under both forces simultaneously: most sites are under purifying selection, while a few sites are under positive selection.

Practical Summary and Best Practices

When designing a study to detect selection, the following considerations are essential:

  1. Define the biological question clearly. Are you interested in positive selection on a specific lineage, at specific sites, or across a gene family? The choice of method depends on the question.
  1. Assemble a high-quality alignment. Codon alignment requires care: misaligned codons create false nonsynonymous differences. Use codon-aware aligners such as MACSE or PRANK, and manually inspect alignments for genes with indels.
  1. Select appropriate models and test statistics. For a single gene with a known phylogeny, use PAML site models (M7 vs. M8) and branch-site models. For genome-wide scans, use a combination of dN/dS-based methods and population-genetic statistics.
  1. Account for recombination and demography. If recombination is present, consider using methods robust to recombination or analyze smaller blocks. If demographic history is known, incorporate it into the null model.
  1. Validate with independent evidence. A statistical signal of positive selection should be corroborated by functional evidence, such as the location of selected sites in known functional domains, experimental assays of protein function, or population-genetic signatures of recent selection.
  1. Report results with appropriate caveats. Clearly state the model assumptions, the statistical power of the test, and the limitations of the data.

Frequently Asked Questions

What is the difference between positive and negative selection?

Positive selection increases the frequency of advantageous alleles, driving adaptive change. Negative selection removes deleterious alleles, maintaining functional integrity. In molecular terms, positive selection accelerates nonsynonymous substitution (dN/dS > 1), while negative selection suppresses it (dN/dS < 1). Negative selection is far more common, acting on most sites in functional genes, while positive selection is rarer and typically confined to specific codons or lineages.

How do you detect positive selection in a gene?

The standard approach is to estimate the dN/dS ratio using maximum-likelihood codon models. Site models (e.g., M7 vs. M8 in PAML) test whether any codons have dN/dS > 1. Branch-site models test whether positive selection occurred on specific lineages. Population-genetic tests such as the McDonald-Kreitman test and scans for selective sweeps provide complementary evidence. A robust study uses multiple methods and validates findings with functional data.

What does dN/dS ratio tell you?

The dN/dS ratio compares the rate of nonsynonymous substitution (amino acid changes) to the rate of synonymous substitution (silent changes). A ratio of 1 indicates neutral evolution, less than 1 indicates negative selection, and greater than 1 indicates positive selection. The ratio is most informative when estimated at individual sites or on specific lineages, rather than averaged over an entire gene.

Can negative selection be detected in genome sequences?

Yes. Negative selection is detected through reduced substitution rates (dN/dS < 1), sequence conservation across species, and skewed site frequency spectra in population data. Comparative genomics identifies conserved elements that evolve slower than the neutral rate, while population genetics detects an excess of rare nonsynonymous variants. The distribution of fitness effects can be estimated from the site frequency spectrum using methods such as ∂a∂i.

What is the McDonald-Kreitman test?

The McDonald-Kreitman test compares polymorphism within a species to divergence between species at synonymous and nonsynonymous sites. Under neutrality, the ratio of nonsynonymous to synonymous polymorphism equals the ratio of nonsynonymous to synonymous divergence. An excess of nonsynonymous divergence indicates positive selection, while an excess of nonsynonymous polymorphism suggests segregating deleterious mutations. The test is simple but sensitive to demographic history.

Why is dN/dS often less than 1?

Most nonsynonymous mutations are deleterious because they disrupt protein structure or function. Negative selection removes these mutations, so they rarely reach fixation. Synonymous mutations are largely neutral and fix at the mutation rate. Consequently, the rate of nonsynonymous substitution is typically much lower than the rate of synonymous substitution, producing dN/dS values well below 1 for most genes.

What are the limitations of dN/dS methods?

dN/dS methods assume that synonymous substitutions are neutral, which may not hold for genes under translational selection. They also assume no recombination, which can inflate dN/dS estimates. The methods have limited power to detect positive selection when it acts on a small number of sites or when the divergence between sequences is low. Demographic history can confound population-genetic extensions of the dN/dS framework.

What is a selective sweep?

A selective sweep is the reduction or elimination of genetic variation in the genomic region surrounding a positively selected allele as it rises to fixation. Linked neutral variants are carried along with the selected allele through genetic hitchhiking, reducing diversity and creating distinctive patterns of linkage disequilibrium and site frequency spectrum. Sweeps can be detected using statistics such as Tajima's D, composite likelihood methods, and cross-population comparisons.

Key Takeaways

  • Negative selection is the dominant force in molecular evolution, maintaining functional integrity by purging deleterious mutations, while positive selection drives adaptive change by fixing advantageous alleles.
  • The dN/dS ratio is the primary metric for detecting selection in coding sequences, but it must be estimated at site or branch resolution to have power to detect positive selection.
  • Maximum-likelihood codon models in PAML and HyPhy provide rigorous statistical frameworks for detecting positive selection, including episodic selection on specific lineages.
  • Population-genetic signatures—reduced diversity, skewed site frequency spectra, and linkage disequilibrium—provide complementary evidence for recent or ongoing selection.
  • The McDonald-Kreitman test offers a simple, powerful approach for detecting selection by comparing polymorphism and divergence, but it is sensitive to demographic effects.
  • Common pitfalls include overinterpreting whole-gene dN/dS values, ignoring recombination and demography, and conflating positive selection with neutral processes.
  • Robust inference requires multiple complementary methods, careful attention to model assumptions, and validation with functional or independent population-genetic evidence.

Further Reading

  • Klein L et al. Positive and negative selection of the T cell repertoire: what thymocytes see (and don't see). Nature reviews. Immunology. 2014. PubMed 24830344
  • Jameson SC, Hogquist KA, Bevan MJ. Positive selection of thymocytes. Annual review of immunology. 1995. PubMed 7612239
  • Chen JW et al. Positive and negative selection shape the human naive B cell repertoire. The Journal of clinical investigation. 2022. PubMed 34813502
  • von Boehmer H. Positive and negative selection of the alpha beta T-cell repertoire in vivo. Current opinion in immunology. 1991. PubMed 182989790052-3)
  • Marusić-Galesić S, Pavelić K. Dynamics of positive and negative selection in the thymus: review and hypothesis. Immunology letters. 1990. PubMed 220075090040-w)
  • Izquierdo SS, Izquierdo LR, Hauert C. Positive and negative selective assortment. Journal of theoretical biology. 2025. PubMed 40287007

Related Topics

Related Clinical & Scientific Guides