- Selection scans and selective sweeps are important concepts in population genetics, evolutionary biology, and bioinformatics. They are used to investigate how natural selection influences genetic variation and to identify genomic regions that may have contributed to adaptation. Natural selection occurs when individuals carrying particular genetic variants differ in reproductive success, causing the frequencies of those variants to change across generations. Selection scans use genetic data and statistical methods to detect patterns consistent with selection, while a selective sweep describes the reduction of genetic variation around a beneficial allele as it increases in frequency within a population.
- Natural selection can act on genetic variants that influence survival, reproduction, disease resistance, environmental tolerance, metabolism, behaviour, and other biological characteristics. A beneficial mutation may increase an individual’s reproductive success under particular environmental conditions. If the mutation is inherited by descendants, its frequency may rise over generations. When selection strongly favours a new beneficial mutation, the allele can increase rapidly and may eventually become fixed in the population. Its rise can also change the frequencies of nearby variants because alleles located close together on a chromosome may be inherited together.
- A selective sweep occurs when a beneficial allele increases in frequency and carries neighbouring linked genetic variants with it. Because recombination does not always separate nearby alleles during reproduction, surrounding DNA may increase in frequency along with the selected allele. As the beneficial allele becomes common, genetic variation in the surrounding region may decline. A strong sweep can therefore leave a detectable genomic signature, including reduced nucleotide diversity, extended haplotypes, unusual allele-frequency patterns, and increased differentiation between populations.
- Selective sweeps are commonly classified into three main categories: hard sweeps, soft sweeps, and partial sweeps. A hard sweep occurs when a new beneficial mutation arises once and rapidly increases in frequency, carrying the surrounding haplotype with it. Because the mutation initially occurs on a single chromosome background, a strong hard sweep may produce a pronounced reduction in genetic variation around the selected site. A soft sweep occurs when selection increases the frequency of a beneficial allele that is already present in the population on multiple genetic backgrounds, or when the same beneficial change arises independently more than once. Soft sweeps may preserve more haplotype diversity than hard sweeps. A partial sweep occurs when a beneficial allele increases in frequency but has not reached fixation, leaving a detectable selection signal while genetic variation remains at the locus.
- The distinction between hard and soft sweeps is important because beneficial alleles do not always originate as new mutations. A favourable allele may already exist at low frequency as standing genetic variation before environmental conditions change. When the environment changes, natural selection can rapidly increase its frequency. Because the allele may already occur on several haplotypes, the resulting pattern can differ from a classical hard sweep. Recurrent mutation and gene flow can also introduce the same or functionally similar beneficial variants onto different genetic backgrounds.
- The strength and duration of a selective sweep depend on several factors, including the selection coefficient, initial allele frequency, dominance, recombination rate, population size, and demographic history. A strongly beneficial allele may increase rapidly, while a weakly beneficial allele may rise slowly and be more affected by genetic drift. Recombination can break down associations between the selected allele and neighbouring variants, reducing the size of the genomic region affected by selection. Consequently, selection signals often extend farther around selected loci in regions with low recombination than in regions with high recombination.
- A selective sweep can reduce genetic variation through genetic hitchhiking. Hitchhiking occurs when neutral or nearly neutral variants linked to a beneficial allele increase in frequency because they are carried on the same chromosome. As selection raises the frequency of the beneficial allele, linked variants may also become more common, even though they do not directly affect fitness. This process can cause a reduction in genetic diversity and create long haplotypes around the selected locus. The extent of hitchhiking depends partly on the distance between markers and the selected site, the recombination rate, and the strength of selection.
- Selective sweeps can influence several population-genetic statistics. Nucleotide diversity may decrease around a selected allele because linked genetic variation is removed or reduced. Tajima’s D may become negative after a recent completed sweep because the genomic region can contain an excess of rare variants relative to intermediate-frequency variants. Linkage disequilibrium may increase because long haplotypes become more common. The site-frequency spectrum may also show unusual patterns compared with neutral expectations. These signatures are not unique to selection, however, and can also arise through demographic events such as population expansion, bottlenecks, and population structure.
- Selection scans are analytical approaches that search genome-wide genetic data for regions showing statistical patterns consistent with natural or artificial selection. They compare observed genomic patterns with neutral expectations or with patterns in other populations. A selection scan does not directly prove that a genomic region has undergone selection. Instead, it identifies candidate regions that may have experienced selection and require further investigation. Evidence from several complementary statistics, functional annotation, comparative analysis, and biological experiments can strengthen the interpretation.
- One widely used group of selection-scan methods is based on within-population genetic diversity. These methods identify genomic regions with unusually low variation or unusual allele-frequency distributions. Nucleotide diversity (π) measures the average number of nucleotide differences per site between pairs of sequences. A recent selective sweep may reduce π around the selected site because linked variants are lost or become less diverse. Researchers may compare nucleotide diversity across genomic windows to identify regions with unusually low values. However, low diversity may also result from low mutation rates, low recombination, background selection, or demographic history.
- Tajima’s D is another statistic used in selection scans. It compares two estimates of genetic variation: nucleotide diversity and the number of segregating sites. Under a neutral model with constant population size, its expected value is approximately zero. A negative Tajima’s D indicates an excess of rare variants, which may be consistent with a recent selective sweep or population expansion. A positive value indicates an excess of intermediate-frequency variants, which may be associated with balancing selection, population structure, or a recent bottleneck under some conditions. Tajima’s D is not a direct test of a particular selected mutation and must be interpreted in the context of demographic history.
- Haplotype-based selection scans examine the length and frequency of haplotypes. A haplotype is a combination of alleles inherited together on the same chromosome. When a beneficial allele rises rapidly in frequency, recombination may not have had enough time to break down the surrounding haplotype. This can result in unusually long haplotypes at intermediate or high frequencies. Extended haplotype homozygosity (EHH) measures the probability that two chromosomes carrying a particular allele are identical across a region extending from that allele. A high EHH value over a long genomic distance may indicate a recent increase in the frequency of a haplotype.
- The integrated haplotype score (iHS) is a commonly used statistic for detecting incomplete selective sweeps within a population. It compares the decay of extended haplotype homozygosity around the ancestral and derived alleles at a SNP. An unusual difference between the two haplotype patterns can indicate that one allele has increased in frequency more rapidly than expected under a neutral model. iHS is generally most informative when the selected allele is at an intermediate frequency rather than nearly fixed. Its interpretation depends on accurate phasing, allele-frequency information, recombination patterns, and suitable standardization.
- The cross-population extended haplotype homozygosity statistic (XP-EHH) compares haplotype homozygosity between two populations. It can help detect selection that has proceeded further toward fixation in one population than in another. For example, if a beneficial allele has become nearly fixed in one population but remains at a lower frequency in a comparison population, the selected population may retain an unusually long haplotype around the selected region. XP-EHH is therefore useful for investigating population-specific adaptation, although population history and differences in sample composition can influence its results.
- Other haplotype-based statistics include nSL, which measures the number of segregating sites over which haplotype homozygosity is maintained, and related approaches that examine haplotype length or homozygosity. These methods can complement iHS and XP-EHH by identifying different patterns of recent selection. Each statistic has its own assumptions and sensitivity to allele frequency, recombination, phasing accuracy, and demographic history. Using several complementary statistics can provide a more informative picture than relying on a single measure.
- Population differentiation methods provide another approach to selection scans. The fixation index (FST) measures genetic differentiation among populations and can identify loci with unusually large differences in allele frequencies. If different environments favour different alleles, natural selection may cause allele frequencies to diverge between populations. A genomic region with unusually high FST relative to the background distribution may therefore be a candidate for local adaptation. However, high differentiation can also result from genetic drift, bottlenecks, population structure, or sampling differences. FST outliers should not automatically be considered selected loci.
- Environmental association methods investigate whether genetic variation is correlated with environmental variables such as temperature, rainfall, altitude, salinity, pathogen exposure, or other ecological conditions. These methods can help identify candidate loci involved in local adaptation. They include approaches based on allele-frequency associations, genotype–environment correlations, and multivariate environmental models. Population structure must be accounted for because geographical separation can create correlations between allele frequencies and environmental variables even when selection is not responsible.
- Selection scans can also use comparisons between populations, species, or groups with different environmental conditions or breeding histories. For example, researchers may compare high-altitude and low-altitude populations to identify genomic regions associated with adaptation to low oxygen availability. Similarly, comparisons between heat-tolerant and heat-sensitive livestock populations may identify candidate regions related to thermoregulation. Such comparisons require appropriate control populations and careful consideration of ancestry, migration, demographic history, and relatedness.
- The ratio of nonsynonymous to synonymous substitutions is another approach used to investigate selection, particularly in protein-coding genes. Nonsynonymous substitutions change the encoded amino acid, while synonymous substitutions do not alter the amino acid under the standard genetic code. The ratio dN/dS compares the rate of nonsynonymous substitutions per nonsynonymous site with the rate of synonymous substitutions per synonymous site. A ratio greater than one may indicate positive selection under suitable models, while a ratio below one commonly indicates purifying selection. A ratio near one may be consistent with neutral evolution, although interpretation depends on the model and evolutionary context. Codon-based models can test whether particular genes, codons, or evolutionary branches show evidence of positive selection.
- Selection scans are also used to investigate artificial selection. In domesticated animals and crops, humans have selected individuals for traits such as growth rate, milk production, meat quality, egg production, fertility, disease resistance, grain yield, and environmental tolerance. Artificial selection can produce genomic signatures similar to those of natural selection, including reduced diversity, increased haplotype frequency, and changes in allele frequencies. Researchers use genomic scans to identify candidate regions associated with domestication, breed formation, and improvement. However, demographic events, population structure, and linkage can complicate the identification of causal genes.
- Several genomic statistics are commonly combined in selection studies. These include nucleotide diversity (π), Tajima’s D, Fay and Wu’s H, FST, iHS, XP-EHH, nSL, and composite likelihood ratio (CLR) statistics. CLR-based methods compare the observed site-frequency spectrum with expectations under a model of selective sweeps. Methods such as SweepFinder2 use patterns in the frequency spectrum to identify candidate sweep regions. SweeD is another method for detecting selective sweeps using composite likelihood approaches. Combining frequency-spectrum, haplotype-based, and differentiation statistics can help identify regions supported by multiple types of evidence.
- A typical selection-scan workflow begins with the collection of suitable genomic data, such as whole-genome sequences or high-density SNP genotypes. The data are subjected to quality control, including checks for sample identity, missing genotypes, sequencing quality, variant quality, relatedness, and population structure. Variants are filtered according to the requirements of the selected methods. Researchers may then phase haplotypes, estimate allele frequencies, calculate genetic diversity and differentiation statistics, and run selection-detection algorithms. Candidate regions are identified using statistical thresholds, empirical distributions, or model-based significance tests.
- The following Python example illustrates how nucleotide diversity can be calculated from a simple biallelic SNP dataset. It uses allele frequencies to calculate expected heterozygosity at each site and averages the values across the included SNPs. This is a simplified illustration rather than a complete sequence-based nucleotide-diversity estimator.
import numpy as np
# Alternate allele frequencies at five SNPs
allele_frequencies = np.array([0.10, 0.25, 0.50, 0.40, 0.15])
# Expected heterozygosity at each biallelic SNP
site_diversity = 2 * allele_frequencies * (1 – allele_frequencies)
# Mean diversity across the included SNPs
mean_diversity = site_diversity.mean()
print(“Diversity at each SNP:”, site_diversity)
print(“Mean expected heterozygosity:”, mean_diversity)
- For real genomic analyses, nucleotide diversity should be calculated using an appropriate estimator that accounts for sample size, missing data, invariant sites where required, and the genomic regions being compared. A selection scan often evaluates diversity in consecutive genomic windows and compares the resulting values across the genome or with a neutral demographic model.
- PLINK can be used for genotype processing, population structure analysis, allele-frequency calculations, and relatedness assessment before selection scans. VCFtools and BCFtools support variant filtering and population-genetic statistics, while tools such as selscan calculate haplotype-based statistics including iHS and XP-EHH. SweepFinder2 and SweeD are used for detecting candidate sweeps from site-frequency-spectrum patterns. R packages such as pegas, PopGenome, and related population-genetic tools can calculate diversity and differentiation statistics. The choice of software depends on the input format, species, sample design, and selection statistic being investigated.
- A simplified example of calculating allele-frequency differentiation between two populations can help illustrate the basis of FST-based scans. If an allele is common in one population and uncommon in another, the populations show genetic differentiation at that locus. A region with unusually high differentiation compared with the genomic background may be a candidate for local adaptation. However, the comparison must account for population history, sample size, and genome-wide structure before attributing the difference to selection.
- After candidate regions have been identified, functional annotation is used to investigate their biological significance. Researchers may examine whether candidate regions contain protein-coding genes, regulatory elements, conserved sequences, quantitative trait loci, or known disease-associated variants. Gene Ontology enrichment and pathway analysis can help identify biological processes represented among candidate genes. Tools and databases such as Ensembl, NCBI, UniProt, InterPro, Gene Ontology, and KEGG can support functional interpretation. Nevertheless, a candidate gene located within a selected region is not necessarily the target of selection. The selected variant may be regulatory, may influence a neighbouring gene, or may be located in a region with complex linkage patterns.
- Selection scans have many applications in evolutionary biology. They help investigate adaptation to climate, altitude, pathogens, diet, habitat, and other environmental conditions. They can also identify genomic regions associated with domestication, species divergence, and local adaptation. In human population genetics, selection scans have been used to investigate adaptations involving diet, immunity, skin pigmentation, metabolism, and high-altitude physiology. In animal and plant breeding, they help identify candidate regions associated with economically important traits and historical selection during domestication and improvement.
- In disease research, selection scans can help identify genes and pathways involved in host–pathogen interactions, immune responses, and resistance to infectious diseases. Pathogens themselves may also experience strong selection under host immunity, antimicrobial treatment, or changing environmental conditions. Genome-wide comparisons can reveal candidate regions associated with adaptation, drug resistance, and changes in pathogen populations. These findings can support further experimental and epidemiological investigations, but genomic selection signals alone do not establish the mechanism or clinical significance of a variant.
- A major challenge in selection scans is distinguishing natural selection from demographic history. Population bottlenecks, founder effects, population expansion, admixture, and migration can produce genetic patterns that resemble selective sweeps. For example, a bottleneck can reduce genetic diversity and increase linkage disequilibrium, while population expansion can produce an excess of rare variants. Population structure can also create unusually high differentiation between groups. A reliable selection study should therefore consider demographic models and compare candidate regions with appropriate neutral expectations.
- Background selection is another important factor. It occurs when purifying selection removes deleterious variants and reduces genetic variation at nearby linked neutral sites. This can create regions of reduced diversity that resemble the effects of positive selection. The impact of background selection is often stronger in regions with low recombination because linked sites are less frequently separated by recombination. Recombination-rate variation should therefore be considered when interpreting diversity-based and haplotype-based selection signals.
- Soft sweeps and incomplete sweeps can also be difficult to detect. A beneficial allele that was already present on multiple haplotypes may not produce the long, uniform haplotype pattern expected under a hard sweep. Selection acting on standing variation may leave a weaker or more complex signature. In addition, selection may act on polygenic traits through small frequency changes at many loci rather than producing a strong sweep at one genomic region. Traditional sweep scans may have limited power to detect such polygenic adaptation.
- Other limitations include genotyping errors, missing data, inaccurate phasing, poor reference panels, uneven marker density, and incorrect recombination maps. Selection scans may also suffer from multiple-testing problems because millions of genomic positions or windows are evaluated. Researchers should use suitable statistical thresholds, empirical calibration, simulation-based testing, or false-discovery-rate procedures where appropriate. Candidate regions should be validated using independent datasets, comparative evidence, functional studies, or experimental approaches whenever possible.
- For reproducible selection analysis, researchers should report the reference genome assembly, sequencing or genotyping platform, sample size, population definitions, quality-control procedures, variant filters, phasing method, recombination map, software versions, and all analysis parameters. The selection statistics used, window sizes, significance thresholds, and demographic assumptions should also be described. Candidate regions should be reported with genomic coordinates and supporting evidence, and researchers should distinguish statistically unusual regions from experimentally confirmed targets of selection.
- Selection scans and selective sweeps provide valuable approaches for studying the genomic consequences of natural and artificial selection. Selective sweeps describe the rise of beneficial alleles and the associated changes in linked genetic variation, while selection scans use statistical methods to identify genomic regions showing patterns consistent with selection. By combining allele-frequency statistics, haplotype analysis, population differentiation, demographic modelling, and functional annotation, researchers can investigate adaptation and evolutionary history across species and populations. Careful interpretation is essential because demographic processes and other forms of selection can produce similar genomic signals, and a statistical candidate region does not by itself prove the presence of a causal beneficial mutation.