bioRxivEvolutionary BiologyPreprint
A Sense of Direction: Detecting Natural Selection Across Non-Stationary Genomes
Abstract
Codon substitution models detect natural selection by comparing non-synonymous (dN) and synonymous (dS) rates at each site. Standard methods assume stationary nucleotide composition across the phylogeny. In many genomes, however, GC-biased gene conversion (gBGC), codon usage bias, strand asymmetry, and host deaminases drive directional shifts in base composition along lineages. Under a stationary Muse-Gaut model with site-to-site synonymous rate variation (FEL), position-specific base frequencies and site-specific dS absorb most tree-wide drift. As a result, selection calls remain unchanged at 96%-99% of codons. At the remaining boundary sites, however, directional shifts bias dS in opposite directions depending on the ancestral codon. Rapid silent turnover at codons shifting toward the favored base inflates dS, producing apparent purifying selection and increasing across-site synonymous rate variance. Conversely, when amino acid replacements oppose the compositional tide, stationary models miss diversifying selection. Branch-specific models can accommodate shifting base frequencies, but diagonalizing a separate non-reversible codon rate matrix on every branch is too slow for large trees. Here we introduce Directional Fixed Effects Likelihood (dFEL). The method first tests whether base composition varies across taxa and runs standard FEL when frequencies are uniform. When composition shifts across lineages, dFEL roots the tree by maximum likelihood without an outgroup and models each branch as a smooth weighted average of three regime-specific transition probability matrices representing AT-enriching, neutral, and GC-enriching evolution. Sharing these matrices across the tree requires only three matrix diagonalizations per site. We validate dFEL across 1,800 simulated alignments and 87 unique empirical alignments (93 benchmark analyses) spanning up to 869 vertebrate species. It maintains calibrated false-positive rates, improves power, cuts whole-gene synonymous rate variance by up to 63%, and recovers established roots from coding sequences alone (https://github.com/veg/hyphy-3).
- organism: multiple species
- assay: DNA methylation
- research focus: phylogenetics / evolution
- research focus: software / tool
- research focus: differential expression
- research focus: gene regulatory network inference
- approach: statistical model
- approach: simulation
In-depth summary
Claude Opus 5.5 · xhigh effort · 8 Nov 2026 · from the full text of version 1 (16 Oct 2026) · CC BY 4.0
dFEL extends FEL to model lineage-specific GC/AT drift as per-branch mixtures of three shared regime matrices, correcting selection calls at 1%–4% of boundary codons.
Lineage-specific composition shifts (GC-biased gene conversion, strand asymmetry, host deaminases) break the stationarity that site-level codon selection tests assume, yet branch-nonstationary models need a non-reversible matrix diagonalization per branch and CpG-weighted counting tests lose power on short alignments. dFEL matches FEL on homogeneous data and needs just three diagonalizations per site, independent of tree size.
Key results
SuggestedAcross three simulation suites totaling 1,800 alignments, dFEL keeps neutral false-positive rates near the nominal level under drift and detects more diversifying sites than FEL when selection acts under directional compositional drift.
ω = 1.0 (nominal α = 0.05): false-positive rate FEL 5.1%–6.4%, dFEL 5.4%–5.6% across ψ ∈ {0, 1, 2}; with 6% of codons selected at ψ = 1.5, dFEL vs FEL sensitivity 13.0% vs 8.7% (ω = 2), 30.7% vs 23.4% (ω = 4), 50.2% vs 42.1% (ω = 8); 200 replicates per condition, 17 taxa, 150 codons. · Results; Figure legends
ShownStationary FEL and dFEL classify the vast majority of codons identically. The homogeneity gate gives output identical to FEL whenever base composition is uniform across taxa.
All 32 homogeneous (K = 1) empirical alignments gave 100% identical calls; in 24 VGP/TOGA2 alignments (464–869 species, 5,923 codons, p ≤ 0.10), agreement was 99.56%, with all 26 discordant sites in the 10 heterogeneous genes; authors report 96%–99% codon agreement in heterogeneous genes overall. · Empirical Applications; Discussion
SuggestedAt boundary codons, rapid GC-ward silent turnover that stationary models ignore inflates their synonymous rate estimates. This produces spurious purifying calls and excess synonymous rate variation, which dFEL corrects.
Among 176 discordant avian and asymmetry-suite sites, FEL gave higher dS at 95.7% (111/116) of FEL-only purifying sites; dFEL cut across-site dS variance 88.5% there (12.53 → 1.44) and 12.5%–62.6% gene-wide (RBP3 62.6%, AAR2 41.8%); mammalian ND4 codon 249 dS fell 13.89 → 0.78 (p 0.013 → 0.110). · Results; Empirical Applications; Figure legends
SuggesteddFEL uncovers diversifying selection that is hidden when replacements oppose the compositional trend. Both likelihood methods also did better than the CpG-weighted SGK09 parsimony counting test.
Avian microchromosome diversifying calls rose from 15 to 19 (ACKR1 codon 232: p 0.069 → 0.047); deep-vertebrate MYOC codon 15 p 0.102 → 0.085 (MEME p = 0.048). SGK09 found no PRM1 sites (FEL/dFEL: codons 20 and 45, p ≤ 0.05), missed Adh codon 197 (p = 0.569; dFEL p = 0.015), and made three and eight excess calls in avian ABHD14A and AAR2. · Results; Empirical Applications
ShownA likelihood scan over all branches roots the tree from coding sequences without an outgroup. Accuracy rises with tree divergence, and the scan recovers established basal lineages for mammalian mtDNA (platypus) and bacterial rpoB.
Simulated exact root recovery: 10.5% (0.8×), 47.0% (1.5×), 100% (3.0×, mean root weight 98.4%); empirical scans rooted Drosophila Adh on D. picticornis, mammalian mtDNA on platypus, Borrelia rpoB on Candidatus Borrelia tachyglossi, and ADORA3/WDR83OS on Afrotheria; --root auto and --root keep gave identical calls on six deep trees. · Results; Empirical Applications; Figure legends
Methods, data and reproducibility
A Pearson chi-square test checks base composition across taxa. If composition is uniform, dFEL runs standard FEL; otherwise each branch's transition matrix is a softmax-weighted mix of AT-enriching, neutral and GC-enriching Muse–Gaut codon regimes, set by branch GC3 deviation. dFEL roots the tree by likelihood scan, then tests per-site dN vs dS with likelihood ratios.
- Simulated codon alignments in three suites (neutral drift, positive selection under drift, root recovery); 150 codons, 17 taxa, 31 branches · n = 1,800 alignments (200 replicates per condition)
- Drosophila Adh coding alignment (254 codons); third-position GC ranges from 58.7% to 85.4% across species · Drosophila · n = 23 species
- Primate Protamine 1 (PRM1) alignment (48 codons), used for the SGK09 comparison · primates · n = 24 taxa
- Avian gene alignments from macrochromosomes (5,031 codons) and microchromosomes (5,060 codons) · birds · n = 20 genes (10 per chromosome class)
- Mutational-skew suite: mammalian mtDNA, Borrelia replication-strand, mammalian gBGC hotspot, and viral APOBEC3/ADAR target genes plus controls (14,194 codons) · mammals, Borrelia, viruses (including SARS-CoV-2) · n = 33 alignments
- Deep vertebrate gene alignments from the Vertebrate Genomes Project (VGP) and TOGA2; 5,923 codons, up to 1,521 branches · vertebrates · n = 24 alignments (464–869 species)
- Full empirical benchmark collection across the classic, avian, asymmetry and deep vertebrate suites · multiple species · n = 87 unique alignments (93 benchmark analyses)
- Methods & tools
- dFEL (Directional Fixed Effects Likelihood), FEL (Fixed Effects Likelihood), HyPhy 3, MEME (episodic selection test), SGK09 CpG-adjusted counting method (Suzuki et al. 2009), Muse–Gaut codon rate matrix, GTR nucleotide substitution model, Pearson chi-square composition homogeneity test, HyPhy Vision
- Data & accessions
- https://github.com/veg/hyphy-3
- Software & environment
- C++20 implementation in HyPhy 3; run from the command line (hyphy3 dfel or hyphy3-dfel) or Python (import hyphy3 as hp); JSON output readable by HyPhy Vision; MIT license.
- Experimental conditions
- No hardware is stated. Fixing a known root (--root keep) is reported to cut runtime three- to five-fold compared with the --root auto scan.
- Reproducibility gaps
- The text names VGP and TOGA2 as sources for the deep vertebrate set but gives no accessions for any empirical alignment; per-gene results sit in Supplementary Tables S1–S4, which are not included here.
Limitations (4)
- Composition is tilted along a single AT-versus-GC axis. In replicons with strong G/T strand skew (Borrelia chromosomes, vertebrate mitochondria), only the net GC3 shift is modeled; a second tilt axis would be needed for within-class skews. · stated by the authors
- Root codon frequencies are fixed at the alignment average to limit parameters during the root scan. As a result, basal branches absorb the mismatch when taxon sampling is strongly skewed, as seen for D. picticornis in Adh. · stated by the authors
- Simulations generate drift with the same exponential GC/AT tilt (ψ) that dFEL fits, so the calibration and power gains may be optimistic for other compositional processes. Empirical discordant calls have no ground truth beyond a few MEME spot checks. · noted in this summary
- Outgroup-free rooting is weakly identified on shallow trees (exact root recovery 10.5% at 0.8× divergence), and the deep vertebrate comparison uses an exploratory p ≤ 0.10 threshold. · noted in this summary
Read this if you run FEL-style site-level dN/dS tests on taxa with GC-biased gene conversion, strand skew, or deaminase-driven composition shifts, or need outgroup-free rooting of coding alignments.
- Citations
- 0
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
- Evaluation of methods to detect shifts in directional selection at the genome scale
L. Duchemin, P. Veber, B. Boussau·Molecular Biology and EvolutionPeer-reviewed·Dec 13, 2022
- Large-Scale Comparative Analysis of Codon Models Accounting for Protein and Nucleotide Selection
Iakov I. Davydov, Nicolas Salamin, Marc Robinson‐Rechavi·Molecular Biology and EvolutionPeer-reviewed·Mar 4, 2019
- Unbiased Estimate Of Synonymous And Non-Synonymous Substitution Rates With Non-Stationary Base Composition
Laurent Guéguen, Laurent Duret·Molecular Biology and EvolutionPeer-reviewed·Dec 5, 2017
- Detecting consistent patterns of directional adaptation using differential selection codon models
Sahar Parto, Nicolas Lartillot·BMC Evolutionary BiologyPeer-reviewed·Jun 23, 2017
- Contrast-FEL: a test for differences in selective pressures at individual sites among clades and sets of branches.
Sergei L. Kosakovsky Pond, Sadie R Wisotsky, … Steven Weaver·Molecular Biology and EvolutionPeer-reviewed·Oct 7, 2020
- OmegaSwitch: Bayesian Markov-Modulated Codon Models for Estimating dN/dS
Wesley C. DeMontigny, Charles F. Delwiche·bioRxiv·Sep 15, 2026