{'fraction_non_alphanumeric': 0.017595307917888565, 'fraction_numerical': 0.00469208211143695, 'mean_word_length': 5.486692015209125, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Coalescent tree recording with selection for fast forward-in-time simulations

Forward simulations are increasingly important in evolutionary genetics to simulate selection with realistic demography, mating systems and ecology. To reach the performance needed for genome-wide simulations a number of new simulation techniques have been developed recently. Kelleher et al. (2018) introduced a technique consisting in recording the entire genetic history of the population and placing mutations on the coalescent tree. This method cannot model selection. I recently introduced a simulation technique that speed up fitness calculation by assuming that fitness effects among haplotypes are multiplicative (Matthey-Doret, 2021). More precisely, fitness measures are stored for subsets of the genome and, at time of reproduction, if no recombination happen within a given subset, then the fitness for this subset for the offspring haplotype is directly inferred from the parental haplotype. Here, I present and benchmark a hybrid of the above two techniques. The algorithm records the genetic history of a species, directly places the mutations on the tree and infers fitness of subsets of the genome from parental haplotypes. At recombinant sites, the algorithm explores the tree to reconstruct the genetic data at the recombining segment. I benchmarked this new technique implemented in SimBit and report an important improvement of performance compared to previous techniques to simulate selection. This improvement is particularly drastic at low recombination rate. Such developments of new simulation techniques are pushing the horizon of the realism with which we can simulate species molecular evolution.