Versatile detection of diverse selective sweeps with Flex-sweep
Abstract
Understanding the impacts of selection pressures influencing modern-day genomic diversity is a major goal of evolutionary genomics. In particular, the contribution of selective sweeps to adaptation remains an open question, with persistent statistical limitations on the power and specificity of sweep detection methods. Sweeps with subtle genomic signals have been particularly challenging to detect. While many existing methods powerfully detect specific types of sweeps and/or those with strong signals, their power comes at the expense of versatility. We present Flex-sweep, a machine learning-based tool designed to detect sweeps with a variety of subtle signals, including those thousands of generations old. It is especially valuable for non-model organisms, for which we have neither expectations about the overall characteristics of sweeps nor outgroups with population-level sequencing to otherwise facilitate detecting very old sweeps. We show that Flex-sweep has the power to detect sweeps with subtle signals, even in the face of demographic model misspecification, recombination rate heterogeneity, and background selection. Flex-sweep detects sweeps up to 0.125 * 4Ne generations old, including those that are weak, soft, and/or incomplete; it can also detect strong, complete sweeps up to 0.25 * 4Ne generations old. We apply Flex-sweep to the 1000 Genomes Yoruba data set and, in addition to recovering previously identified sweeps, show that sweeps disproportionately occur within genic regions and close to regulatory regions. In addition, we show that virus-interacting proteins (VIPs) are strongly enriched for selective sweeps, recapitulating previous results that demonstrate the importance of viruses as a driver of adaptive evolution in humans.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 28
- FWCI
- 4.64
- Field percentile
- top 4%
- Organism
- Assay
- Research Focus
- Approach
In-depth summary
Claude Opus 5.5 · xhigh effort · 7 Nov 2026 · from the full text of version 2 (24 Apr 2023) · CC BY 4.0
Flex-sweep, a convolutional neural network over 11 summary statistics (five new), detects weak, soft, incomplete and old selective sweeps up to 0.125 * 4Ne generations using one sequenced population.
Old, soft, weak or incomplete sweeps leave faint signals; the authors describe existing detectors as specialised for particular sweep types or, for old sweeps, as relying on outgroup or admixed populations or ancient DNA. Flex-sweep gives up classifying sweep type in exchange for versatility, needs only one sequenced population, and by the authors' account doubles reliable detection age from 0.05-0.075 * 4Ne to 0.125 * 4Ne generations.
Key results
ShownIn simulations, most sweeps aged up to 0.125 * 4Ne generations are detected, including soft, weak and incomplete ones, as are some strong complete sweeps up to 0.25 * 4Ne; power falls with sweep age, starting allele frequency and incompleteness.
Equilibrium-trained model (Ne = 10,000; sweeps 0-5,000 generations old) detects 83.7% of sweeps at a 2.3% false positive rate (FPR) on equilibrium data. At 0.1% FPR it struggles with 20-40% complete sweeps, sweeps 4001-5000 generations old, starting frequency 7.5-10% and 0.001 <= s <= 0.0028, yet detects most at 1% or 2% FPR. FPR rises on decline, expansion and Yoruba histories. · Performance; Abstract; DISCUSSION; Figure legends
SuggestedClassification is fairly robust to demographic misspecification, background selection and allele mispolarization. Extended low-recombination regions inflate false positives, and training on the correct demography lowers error rates.
Low recombination raised false positives (t-test, p < 0.001), reduced by a higher confidence threshold or low-recombination training; background selection barely changed FPR (SLiM 3; 100 neutral, 100 sweep simulations) but caused false negatives; 0.1% and 1% mispolarization had little effect, 5% and 10% lowered FPR and raised power; training and testing on Yoruba demography lowered both error rates. · Performance; DISCUSSION; Simulations
SuggestedApplied to 1000 Genomes Yoruba genomes with a Yoruba-demography model, sweep calls are over-represented inside genes, and their peaks sit closer to transcription start sites than random placement predicts.
54% of sweeps lie within genes vs a randomization-expected mean of 28% at the default 0.5 threshold (one-tailed randomization test, p < 0.01 at every threshold tested); sweep peaks are nearer transcription start sites (p = 0.02). Estimated false discovery rate (FDR) averages 1.9% over 100 sets of windows 1 Mb apart; about 0.8 confidence is needed for FDR below 1%. · Application; Application; Figure legends
SuggestedSweep calls are strongly enriched at virus-interacting proteins (VIPs) relative to matched non-VIP controls, and the known sweep at DARC (Duffy Antigen Receptor for Chemokines) is recovered. The authors take this as evidence that many calls are true positives.
Enrichment exceeds three-fold for sweeps with a confidence score of one; FDR of the observed enrichment estimated at 0.0006. A 430 kbp region covering DARC and promoter SNP rs2814778 is called at threshold 0.5, narrowing to 370 kbp at 0.99, with edges at recombination hotspots. Calls also include TLR5, ITGAE and APOL1. · Application; DISCUSSION; Application; Figure legends
ShownFlex-sweep outperforms diploS/HIC run as a binary sweep-vs-neutral classifier. Its accuracy depends on combining all 11 statistics, and adding sweep-type classification costs power.
Higher power and lower FPR than the modified diploS/HIC when both are trained and tested on equilibrium and human-demography sets of complete sweeps, with a larger gap once incomplete sweeps are included (values only in figures). All 11 statistics beat new-only or published-only sets; Deep SHAP (SHapley Additive exPlanations) ranks highfreq and hapDAF-s highest. · Performance; DISCUSSION; Validation; Figure legends
Methods, data and reproducibility
Eleven statistics (six published; five new, hapDAF-o, hapDAF-s, Sratio, lowfreq and highfreq, contrasting derived vs ancestral backgrounds) are computed at 21 centre points over five nested windows and fed to a convolutional neural network (CNN) trained on neutral and sweep simulations (discoal, SLiM 3) of 1.2 Mb loci. It then scans 1000 Genomes Yoruba autosomes in 1.2 Mb windows at 10 kb steps.
- Simulated neutral and sweep 1.2 Mb loci (discoal, SLiM 3), 100 chromosomes each, under equilibrium, decline, expansion, bottleneck-recovery and inferred Yoruba demographies · n = 10,000 neutral + 10,000 sweep training; 1,000 + 1,000 test, per data set
- SLiM 3 simulations with deCODE-like recombination heterogeneity and background selection (gamma distribution of fitness effects, mean -0.030, shape 0.206) · n = 100 neutral + 100 sweep
- 1000 Genomes Project Yoruba in Ibadan, Nigeria (YRI), autosomes · human (1000 Genomes)
- Virus-interacting proteins (VIPs) and matched control non-VIP gene sets · human (genes in the Yoruba scan)
- Singularity container and pre-trained equilibrium and Yoruba Flex-sweep models (Zenodo) · 10.5281/zenodo.7860595
- Methods & tools
- Flex-sweep, discoal, SLiM 3, Python 3.6, TensorFlow 2.4, Keras 2.1.3, Deep SHAP, diploS/HIC, Singularity, deCODE recombination map
- Software & environment
- Python 3.6, TensorFlow 2.4, Keras 2.1.3; Singularity container with all dependencies plus pre-trained equilibrium and Yoruba models on Zenodo (DOI 10.5281/zenodo.7860595). Simulation and analysis code is in the GitHub repository.
- Reproducibility gaps
- Zenodo deposit cited by DOI only, and one Methods passage says it 'will be available'. Yoruba data cited without accession or URL. No hardware, runtime or training cost reported.
Limitations (6)
- Severe demographic misspecification hurts performance (an expansion-trained model classifying a declining population), and population declines generally reduce power; the authors advise inferring population history first. · stated by the authors
- Power is low at 0.1% FPR for the subtlest sweeps (very old, weak, highly incomplete or high starting frequency). Background selection causes false negatives, and extended low-recombination regions raise false positives. · stated by the authors
- Requires good genome assemblies, phased haplotypes and ancestral/derived allele polarization, which currently limits use in non-model species. · stated by the authors
- Real-data FDR may be much higher than the simulation-based 1.9%. About 28% of genomic windows are classified as sweeps (1.9% at a score of one), partly attributed to hitchhiking far from selected variants. · stated by the authors
- Non-model species are the stated target, yet the only empirical application is one human population (Yoruba), where performance is supported by enrichment tests rather than ground truth. · noted in this summary
- Only one competing method is benchmarked: diploS/HIC modified to binary output and run on the authors' own simulations. Robustness to background selection and recombination heterogeneity rests on 100 neutral and 100 sweep simulations. · noted in this summary
Who should read:Read this if you scan genomes for selective sweeps, particularly old, soft or incomplete ones, in a species lacking population-level outgroup data, and want a retrainable CNN with documented robustness checks.
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- S/HIC: Robust identification of soft and hard sweeps using machine learning
Daniel R Schrider, Andrew D Kern·bioRxiv·Feb 4, 2016
- Flex-sweep 2.0: more flexible and faster selective sweeps detection
Jesús Murga-Moreno, David Enard·bioRxiv·Aug 7, 2026
- WINDEX: A hierarchical integration of site- and window-based statistics for characterizing the footprint of positive selection in genome-wide population genetic data
Hannah Snell, Scott McCallum, … Lauren A. Sugden·bioRxiv·Mar 26, 2026
- Localization of adaptive variants in human genomes using averaged one-dependence estimation
L. A. Sugden, E. G. Atkinson, … S. Ramachandran·bioRxiv·Dec 4, 2017
- Detection and classification of hard and soft sweeps from unphased genotypes by multilocus genotype identity
A. M. Harris, N. R. Garud, M. DeGiorgio·bioRxiv·Aug 15, 2018
- Soft sweeps are the dominant mode of adaptation in the human genome
D. R. Schrider, A. D. Kern·bioRxiv·Apr 27, 2017