Section: Mathematical & Computational Biology
Topic:
Evolution,
Genetics/genomics,
Population biology
SelNeTime: a python package inferring effective population size and selection intensity from genomic time series data
Corresponding author(s): Bunel, Paul (paul.bunel@inrae.fr)
10.24072/pcjournal.708 - Peer Community Journal, Volume 6 (2026), article no. e46
Get full text PDF Peer reviewed and recommended by PCIGenomic samples collected from a single population over several generations provide direct access to the genetic diversity changes occurring within a specific time period. This provides information about both demographic and adaptive processes acting on the population during that period. A common approach to analyze such data is to model observed allele counts in finite samples using a Hidden Markov Model (HMM) where hidden states are true allele frequencies over time (i.e. a trajectory). The HMM framework allows one to compute the full likelihood of the data, while accounting both for the stochastic evolution of population allele frequencies along time and for the noise arising from sampling a limited number of individuals at possibly spread out generations. Several such HMM methods have been proposed so far, differing mainly in the way they model the transition probabilities of the Markov chain. Following Paris et al. (2019a), we consider here the Beta with Spikes approximation, which avoids the computational issues associated to the Wright-Fisher model while still including fixation probabilities, in contrast to other standard approximations of this model like the Gaussian or Beta distributions. To facilitate the analysis and exploitation of genomic time series data, we present an improved version of Paris et al. (2019a) ‘s approach, denoted SelNeTime, whose computation time is drastically reduced and which accurately estimates effective population size (assuming no selection) or the selection intensity at each locus (given a previously estimated value of N). We also evaluate the performance of this method in realistic situations where selection is present and both demography and selection need to be inferred. SelNeTime is implemented in a user friendly python package, which can also easily simulate genomic time series data under a user-defined evolutionary model and sampling design.
Type: Research article
Keywords: population genomics, effective population size, selection intensity, hidden Markov models
Uhl, Mathieu  1 , 2 ; Bunel, Paul  1 , 3 ; de Navascués, Miguel  1 ; Boitard, Simon  1 ; Servin, Bertrand  3
CC-BY 4.0
Uhl, M.; Bunel, P.; de Navascués, M.; Boitard, S.; Servin, B. SelNeTime: a python package inferring effective population size and selection intensity from genomic time series data. Peer Community Journal, Volume 6 (2026), article no. e46. https://doi.org/10.24072/pcjournal.708
@article{10_24072_pcjournal_708,
author = {Uhl, Mathieu and Bunel, Paul and de Navascu\'es, Miguel and Boitard, Simon and Servin, Bertrand},
title = {SelNeTime: a python package inferring effective population size and selection intensity from genomic time series data
},
journal = {Peer Community Journal},
eid = {e46},
year = {2026},
publisher = {Peer Community In},
volume = {6},
doi = {10.24072/pcjournal.708},
language = {en},
url = {https://peercommunityjournal.org/articles/10.24072/pcjournal.708/}
}
TY - JOUR AU - Uhl, Mathieu AU - Bunel, Paul AU - de Navascués, Miguel AU - Boitard, Simon AU - Servin, Bertrand TI - SelNeTime: a python package inferring effective population size and selection intensity from genomic time series data JO - Peer Community Journal PY - 2026 VL - 6 PB - Peer Community In UR - https://peercommunityjournal.org/articles/10.24072/pcjournal.708/ DO - 10.24072/pcjournal.708 LA - en ID - 10_24072_pcjournal_708 ER -
%0 Journal Article %A Uhl, Mathieu %A Bunel, Paul %A de Navascués, Miguel %A Boitard, Simon %A Servin, Bertrand %T SelNeTime: a python package inferring effective population size and selection intensity from genomic time series data %J Peer Community Journal %] e46 %D 2026 %V 6 %I Peer Community In %U https://peercommunityjournal.org/articles/10.24072/pcjournal.708/ %R 10.24072/pcjournal.708 %G en %F 10_24072_pcjournal_708
PCI peer reviews and recommendation, and links to data, scripts, code and supplementary information: 10.24072/pci.mcb.100406
Conflict of interest of the recommender and peer reviewers:
The recommender in charge of the evaluation of the article and the reviewers declared that they have no conflict of interest (as defined in the code of conduct of PCI) with the authors or with the content of the article.
[1] Whole-genome sequencing of cryopreserved resources from French Large White pigs at two distinct sampling times reveals strong signatures of convergent and divergent selection between the dam and sire lines, Genetics Selection Evolution, Volume 55 (2023) no. 1, p. 13 | DOI
[2] Gene banks as reservoirs to detect recent selection: the example of the Asturiana de los Valles bovine breed, Frontiers in genetics, Volume 12 (2021) | DOI
[3] Estimation of 2Nes From Temporal Allele Frequency Data, Genetics, Volume 179 (2008) no. 1, pp. 497-502 | DOI
[4] Estimating the genome-wide contribution of selection to temporal allele frequency change, Proceedings of the National Academy of Sciences, Volume 117 (2020) no. 34, pp. 20672-20680 | DOI
[5] The effect of selection on genetic variability, The American Naturalist, Volume 105 (1971) no. 943, pp. 201-211 | DOI
[6] SelNeTime simulation pipeline, Software Heritage, 2025 (https://archive.softwareheritage.org/swh:1:dir:0f2a3050f613874716ecef0ea444e63dfefe2d89)
[7] A genomic map of the effects of linked selection in Drosophila, PLoS genetics, Volume 12 (2016) no. 8, p. e1006130 | DOI
[8] Tracking Five Millennia of Horse Management with Extensive Ancient Genome Time Series, Cell, Volume 177 (2019) no. 6 | DOI
[9] Array programming with NumPy, Nature, Volume 585 (2020) no. 7825, pp. 357-362 | DOI
[10] NB: Maximum Likelihood method in estimating effective population size from genetic data, R package Version Number: 0.9, 2014 (https://cran.r-project.org/package=NB)
[11] Estimating Effective Population Size from Temporally Spaced Samples with a Novel, Efficient Maximum-Likelihood Algorithm, Genetics, Volume 200 (2015) no. 1, pp. 285-293 | DOI
[12] Population genetics inference for longitudinally-sampled mutants under strong selection, Genetics, Volume 198 (2014), pp. 1237-1250 | DOI
[13] Elucidating the molecular architecture of adaptation via evolve and resequence experiments, Nature Reviews Genetics, Volume 16 (2015) no. 10, pp. 567-582 | DOI
[14] Direct detection of natural selection in Bronze Age Britain, Genome Research, Volume 32 (2022) no. 11-12, pp. 2057-2067 | DOI
[15] compareHMM, Software Heritage, 2019 (https://archive.softwareheritage.org/swh:1:dir:f4bec73f3346ef42239a740a30b73656108103b8)
[16] Inference of selection from genetic time series using various parametric approximations to the Wright-Fisher model, G3: Genes, Genomes, Genetics, Volume 9 (2019) no. 12, pp. 4073-4086 | DOI
[17] Background selection and biased gene conversion affect more than 95% of the human genome and bias demographic inferences, Elife, Volume 7 (2018), p. e36317 | DOI
[18] Inferring Selection from Genetic Time Series, Peer Community in Mathematical and Computational Biology (2025) | DOI
[19] The contribution of gene flow, selection, and genetic drift to five thousand years of human allele frequency change, Proceedings of the National Academy of Sciences, Volume 121 (2024) no. 9 | DOI
[20] Inference under a wright-fisher model using an accurate beta approximation, Genetics, Volume 201 (2015) no. 3, pp. 1133-1141 | DOI
[21] SelNeTime, Software Heritage, 2025 (https://archive.softwareheritage.org/swh:1:dir:2c62ce23109ebe09b0fb4507a50f9560d7c6937a)
[22] Timesweeper: accurately identifying selective sweeps using population genomic time series, Genetics, Volume 224 (2023) no. 3 | DOI
[23] Consistency of estimators of population scaled parameters using composite likelihood, Journal of mathematical biology, Volume 53 (2006) no. 5, pp. 821-841 | DOI
Cited by Sources: