scieee AI-readable full text Open interactive document viewer

Benchmarking the performance of Pool-seq SNP callers using simulated and real sequencing data

Guirao-Rico, Sara,González Pérez, Josefa

Abstract

This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (H2020-ERC-2014-CoG-647900).

Full text

1216 | Mol Ecol Resour. 2021;21:1216–1229.wileyonlinelibrary.com/journal/men Received: 24 May 2020 | Revised: 21 December 2020 | Accepted: 27 January 2021 DOI: 10.1111/1755-0998.13343 RESOURCE ARTICLE Benchmarking the performance of Poolseq SNP callers using simulated and real sequencing data Sara Guirao- Rico | Josefa González This is an open access article under the terms of the Creative Commons Attribution- NonCommercial License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited and is not used for commercial purposes. © 2021 The Authors. Molecular Ecology Resources published by John Wiley & Sons Ltd. Institute of Evolutionary Biology, CSIC- Universitat Pompeu Fabra, Barcelona, Spain Correspondence Sara Guirao- Rico, Institute of Evolutionary Biology, CSIC- Universitat Pompeu Fabra, Barcelona, Spain. Email: [email protected] Funding information H2020 European Research Council, Grant/Award Number: 2014- CoG- 647900 Abstract Population genomics is a fastdeveloping discipline with promising applications in a growing number of life sciences fields. Advances in sequencing technologies and bioinformatics tools allow population genomics to exploit genomewide information to identify the molecular variants underlying traits of interest and the evolutionary forces that modulate these variants through space and time. However, the cost of genomic analyses of multiple populations is still too high to address them through individual genome sequencing. Pooling individuals for sequencing can be a more effective strategy in Single Nucleotide Polymorphism (SNP) detection and allele frequency estimation because of a higher total coverage. However, compared to individual sequencing, SNP calling from pools has the additional difficulty of distinguishing rare variants from sequencing errors, which is often avoided by establishing a minimum threshold allele frequency for the analysis. Finding an optimal balance between minimizing information loss and reducing sequencing costs is essential to ensure the success of population genomics studies. Here, we have benchmarked the performance of SNP callers for Poolseq data, based on different approaches, under different conditions, and using computer simulations and real data. We found that SNP callers performance varied for allele frequencies up to 0.35. We also found that SNP callers based on Bayesian (SNAPE- pooled) or maximum likelihood (MAPGD) approaches outperform the two heuristic callers tested (VarScan and PoolSNP), in terms of the balance between sensitivity and FDR both in simulated and sequencing data. Our results will help inform the selection of the most appropriate SNP caller not only for largescale population studies but also in cases where the Poolseq strategy is the only option, such as in metagenomic or polyploid studies. KEYWORDS Bayesian, high throughput sequencing, lowfrequency variants, maximum likelihood, population genomics, site frequency spectrum | 1217 GUIRAORICO And GOnZÁLEZ 1 | INTRODUCTION Population genomic studies compare wholegenome sequences from several individuals to address evolutionary longstanding questions such as the relative contribution of the different evolutionary forces (i.e., natural selection, genetic drift, mutation and gene flow) that drive the changes in the frequencies of alleles and phenotypes in populations over space and time. However, wholegenome resequencing of many individuals to coverages that allow us to control the sequencing error is still prohibited especially for species with mediumsize to large genomes. In the last years, Poolseq data is increasingly being used for population genomic studies since among other benefits, it bypasses the most expensive step in the sequencing process: library preparation for each individual in the sample (Healy & Burton, 2020; Jónás et al., 2016; Micheletti & Narum, 2018; Neethiraj et al., 2017; Schlötterer et al., 2014; Tilk et al., 2019). Consequently, at equal sequencing effort and cost, Poolseq allows us to sequence larger samples of individuals and hence, to decrease the variance in the estimates of population allele frequencies (Ferretti et al., 2013; Futschik & Schlötterer, 2010). One of the main drawbacks of Poolseq data is that sequencing errors are difficult to discern from lowfrequency variants, especially when pool sizes and sequencing depths are low (Anderson et al., 2014; Cutler & Jensen, 2010; Futschik & Schlötterer, 2010). Some studies have proposed to remove the lowfrequency mutations to avoid having a high rate of false positive variants (Anand et al., 2016). However, the choice of the frequency cutoff value is not trivial and besides, removing lowfrequency mutations may results in a biased site frequency spectrum (SFS) since lowfrequency variants are underrepresented. The SFS is one of the most relevant summary statistics describing sequence variation. Obtaining a robust estimate of the SFS is crucial in population genomics because from its shape, both past demographic processes and selection events can be inferred, among others (Bustamante et al., 2001; Excoffier et al., 2013; Gutenkunst et al., 2009; Koropoulis et al., 2020; Ronen et al., 2013). In addition, lowfrequency variants are abundant in populations and have been widely used not only to infer demography (Gravel et al., 2011; Keinan & Clark, 2012; Linck & Battey, 2019; Lohmueller, 2014) or to detect the hallmarks of selection (Kim & Stephan, 2002; Martin et al., 2016; Peischl et al., 2018; Tennessen et al., 2010; Vy & Kim, 2015) but also to pinpoint which are the loci associated to traits of interest in QTL and GWAS analysis (Bloom et al., 2019; Bomba et al., 2017; Fischer et al., 2013; Fournier et al., 2019; Wojcik et al., 2019). For instance, GWAS analysis that have tried to decipher which are the genetic basis of human disease have shown that common variants associated with complex traits only explain a small portion of heritability. In some studies, it has been found that ~70% of all nonsynonymous singletons are sufficiently deleterious that they will never reach frequencies >5% suggesting that lowfrequency variants are enriched for damaging variants (Nelson et al., 2012). To date, none of the available variant callers for Poolseq data can completely solve the problem of the correct identification of lowfrequency variants (Bansal, 2010; Druley et al., 2009; Koboldt et al., 2009; Lynch et al., 2014; Raineri et al., 2012; Wei et al., 2011; Wilm et al., 2012). However, Single Nucleotide Polymorphism (SNP) callers based on different approaches might differ in their performance in lowfrequency variants. In this work, we have carried out a benchmarking study comparing the performance of four SNP callers for Poolseq data based on different approaches, Bayesian (SNAPE- pooled), Frequentist (MAPGD), and Heuristic (PoolSNP), and combination of Frequentist and Heuristic approaches (VarScan; Table 1). These callers have been used in previous studies in a wide range of species, such as nematodes, fruit flies, ladybirds, pigs, humans and plants (Adams et al., 2019; Bansal, 2010; Esteve- Codina et al., 2013; Frachon et al., 2018; Gautier et al., 2018; Kapun et al., 2020). We used both computer simulations (under the standard neutral model and under a complex demographic history) and Drosophila melanogaster sequencing data (the same samples sequenced separately for each individual and as a pool) to compare their performance using different caller conditions, TABLE 1 Poolseq SNP callers and conditions benchmarked in this study Caller approach Caller Condition Parameters References Bayesian SNAPE- pooled Flat prior distribution of SFS sn1 Raineri et al. (2012) Informative (SNM) prior distribution of SFS sn2 Frequentist: Maximum likelihood MAPGD pvalue for the distribution of the loglikelihood ratio test of polymorphisms m22: 0.00001 Lynch et al. (2014) m11: 0.0001 m6: 0.01 Frequentist: Fisher's exact test VarScan Crosssample pvalue for calling variants v1: 0.00001 Koboldt et al. (2009) v2: 0.0001 v3: 0.01 v4: 0.05 Heuristic PoolSNP Maximum allowed fraction of samples not fulfilling all parameters psnp1: 0.1 Kapun et al. (2020) psnp2: 0.8 Abbreviations: SFS, site frequency spectrum; SNM, standard neutral model. 1218 | GUIRAORICO And GOnZÁLEZ coverage and sample size. Overall, similar trends in the performance of the four callers were observed in computer simulations and sequencing data. As expected, the main difference in performance between callers was found at low frequencies. However, for some specific sample sizes, coverages and underlying demographic scenarios, our analysis uncovered important differences between methods in allele frequencies up to 0.35, which could be very relevant when planning to design population genomics studies based on pools, metagenomic data, or polyploids. Moreover, we found that SNP callers also differ in terms of the balance between sensitivity and FDR both in simulated and in sequencing data. 2 | MATERIALS AND METHODS 2.1 | Coalescent simulations We performed coalescent simulations under the standard neutral model (SNM) and under a demographic scenario based on Duchen et al. (2013). The demographic scenario corresponds to the most accepted joint demographic history estimated for Drosophila melanogaster in three continents: Africa, North America and Europe (Figure 1). However, we have increased the severity of the bottleneck in Africa to obtain an increasing degree of bias towards lowfrequency variants in the three populations (hereafter ΨAfrica, ΨNorth America and ΨEurope) in order to assess the performance of the different callers in increasingly challenging conditions. For each population scenario, we used the ms program (Hudson, 2002) to simulate 100 replicates of a 100- kb long DNA sequence and setting the per site populationscaled mutation rate and populationscaled recombination parameters to 0.01. For each replicate and population, we run the simulations with different sample sizes: 100, 50 and 20 individuals. To obtain the ancestral sequence of each simulated population that will also be used as the reference genome for the mapping process, we simulated 100- kb long DNA sequence by randomly sampling nucleotides for each position, using the pipeliner version 0.2.0 (Nevado & Perez- Enciso, 2015). pipeliner was additionally used to convert the ms output files to fasta format. Each simulated replica of each model with different number of individuals was used to simulate Poolseq data. Poolseq data was generated using the art _illu- mina version 2.5.8 (Huang et al., 2012) that simulates next generation sequencing (NGS) pairend reads with the builtin profile for Illumina pairedend technology of 100 bplong reads and mean size of DNA fragments of 350 bp. For each population and sample size, the average read depth (coverage) per chromosome was set to 1.2×, 0.50×, and 0.20×. Reads were mapped against the simulated reference sequence using bwa 0.7.16a- r1181 (Li & Durbin, 2009), removing reads with mapping quality below 20. Finally, we used picardtools version 2.8.3 (http://broad insti tute.github.io/picard) and samtools version FIGURE 1 Site frequency spectrum of the different simulated samples. (a) Demographic model modified from Duchen et al. (2013) used to perform coalescent simulations. The duration of the bottleneck in African population was modified in other to simulate populations with an increasing degree of bias of the SFS toward lowfrequency variants. ΨAfrica, simulated pseudo African population; ΨNorth America, simulated pseudo North American populations, ΨEurope, simulated pseudo European population. NAa, ancient population size of ΨAfrica (4,975,360 individuals); NAc, current population size of ΨAfrica (5,224,100 individuals); NNa, starting population size of ΨNorth America (2,500 individuals); NNc, current population size of ΨNorth America (15,984,500 individuals); NEa, ancient population size of ΨEurope (17,000 individuals); NEc, current population size of ΨEurope (3,122,470 individuals); T1, time of admixture between ΨAfrica and ΨEurope (144 years ago); T2, time of split between ΨAfrica and ΨEurope (19,000 years ago); T3, time of bottleneck in ΨAfrica (237,227 years ago); s, Severity of the bottleneck (~3,400); f, proportion of admixture (0.85). (b) Proportion of SNPs across the SFS simulated under the SNM and the joint demographic model depicted in (a) AfricaNorth America Europe NNa NNc NEc NEa NAa NAc T3 T2 T1 s f PRESENT Proportion of SNPs 0.0 0.2 0.4 0.6 0.8 1.0 SNM Alelle Frequency 0.05 0.25 0.45 0.65 0.85 1.00 Africa 0.0 0.2 0.4 0.6 0.8 1.0 0.05 0.25 0.45 0.65 0.85 1.00 Europe 0.05 0.25 0.45 0.65 0.85 1.00 0.0 0.2 0.4 0.6 0.8 1.0 North America 0.05 0.25 0.45 0.65 0.85 1.00 0.0 0.2 0.4 0.6 0.8 1.0 N=100 N=50 N=20 (a) (b) s NAc NAa ΨΨ Ψ Ψ Ψ Ψ | 1219 GUIRAORICO And GOnZÁLEZ 1.6 (Li, 2011) to assign the reads to each readgroup and to generate pileup or mpileup outputs from BAM files, respectively. The program mstatspop (https://github.com/crage nomic a/mstat spop) was used to compute the number of SNPs and the SNP frequency for simulated sequences from each of the 12 simulated scenarios (four populations with three different number of individuals each). Note that this software has been previously used in several organisms and has also been included in the pipeliner tool (Álvarez- Presas et al., 2014; Bianco et al., 2015; Guirao- Rico et al., 2018; Nevado & Perez- Enciso, 2015). 2.2 | Drosophila melanogaster sequenced data We downloaded the FASTQ files corresponding to 30 inbred strains from the Drosophila Genetic Reference Panel (DGRP; Mackay et al., 2012) that were individually sequenced at 21× (Table S1). To test how the different callers perform, we need to compare the same data sequenced individually and pooled. Thus, we generated two wholegenome sequencing replicates of a pool of individuals made by using the same 30 DGRP strains described above and with 10 females per strain. The two replicates of the same resequencing library were used to evaluate the performance of VarScan and PoolSNP with the option of joint variant calling for multiple samples. DNA was extracted using the Blood and Cell Culture DNA Mini Kit (Qiagen) according to the manufacturer's protocol and sequenced on a single lane of Illumina NovaSeq with a mean depth around 2.4× (1.2× for noninbred positions) with 151 bp pairedend reads. Library preparation and sequencing was carried out at Macrogen Inc. Raw sequenced data is publicly available under NCBI Bioproject accession PRJNA632498. The mapping and filtering process were the same for the individual and the Poolseq data. For each strain and pool, we filtered the raw FASTQ reads to remove lowquality bases (minimum base PHRED quality = 18 as in Kapun et al., 2020) using cutadapt version 1.8.3 (Martin, 2011). Trimmed reads were mapped against the D. melanogaster reference genome version 6.12 using bwa version 0.7.16a- r1181 (Li & Durbin, 2009) and reads with mapping quality below 20 and secondary alignments were removed using samtools version 1.6 (Li et al., 2009). Then, we used picardtools version 2.8.3 (http://broad insti tute.github.io/picard) to remove duplicate reads, and gatk version 3.7- 0- gcfedb67 (McKenna et al., 2010) to realigned sequences flanking insertionsdeletions (indels). samtools version 1.6 (Li et al., 2009) was used to retrieve only autosomal information and to generate pileup or mpileup outputs from BAM files. 2.3 | SNP calling 2.3.1 | Individual sequencing data We used the program angsd version 0.925 (Korneliussen et al., 2014) to estimate the genotype likelihoods for each site of each DGRP strain in order to calculate the inbreeding coefficient of each strain. The program was run twice with the following common settings for each run: - nInd 30 - GL 2 - doGlf 3 - doMajorMinor 4 - doMaf, 1 and with two different pvalues: 1e−4 and 1e−6. For each site, the major and minor alleles were specified according to the D. melanogaster v. 6.12 reference allele. The program ngsf version 1.2.0 (Vieira et al., 2013) was used to estimate the inbreeding coefficient of each DGRP strain under a probabilistic framework using as input the genotype likelihood files resulting from running the angsd program. The program was run with the following settings: - - n_ind 30 - - glf - - - min_epsilon 1e−9. Then, we called biallelic SNPs taking into account the inbreeding coefficients of each strain with the following parameter settings: - nInd 30 - GL 2 - doGeno 2 - doMajorMinor 4 - doMaf 1 - C 50 - baq 1 - doPost 1 - indF - doVcf 1 and with two different pvalues: 1e−4 and 1e−6. As the number of SNPs called using the two different pvalues did not vary substantially (2,303,817 and 2,249,247, respectively), we only report the results obtained when using the pvalue 1e−4. We filtered out those SNPs that were in interspersed repeats and lowcomplexity regions using RepeatMasker version 4.0.7 (Smit et al., 2013– 2015) and gatk version 3.7- 0- gcfedb67 (McKenna et al., 2010). 2.3.2 | Poolseq data SNPs were called using four different software based on different approaches: one based on a Bayesian approach, SNAPE- pooled; (Raineri et al., 2012), two frequentists: one based on a maximum likelihood approach, MAPGD (Lynch et al., 2014) and the other combining some heuristic steps with the Fisher's exact test, VarScan (Koboldt et al., 2009); and one relaying in heuristic method, PoolSNP (Kapun et al., 2020). Each caller was run with different parameter settings (hereafter conditions; Table 1). SNAPE- pooled calls SNPs based on the posterior probability for each site of being polymorphic. This software takes into account sequencing errors, and allows the user to specify two different priors for the expected frequency spectrum (- priortype). SNAPE- pooled was run specifying two different priors for the site frequency spectrum: flat and informative (the site frequency spectrum under the SNM): sn1 and sn2, respectively. The other parameters were: - nchr P - theta 0.01 - D 0.10 - fold unfolded, where P was the number of chromosomes for each condition (p = 30 or p = 60, for full or no inbreeding Poolseq data sets, respectively). We then filtered out those SNPs with a posterior probability <.90, as suggested by the authors (Raineri et al., 2012). MAPGD is a series of related programs that among others, estimate allele frequency from population genomic pooled data using a statistically rigorous maximum likelihood approach that takes into account errors associated with sequencing and also a likelihoodratio test statistic (- a) for evaluating the null hypothesis of monomorphism. MAPGD version 0.4.26 was run using three different thresholds for the loglikelihood ratio (LLR) test of polymorphism 1220 | GUIRAORICO And GOnZÁLEZ versus no polymorphism (- a flag) 22, 11, and 6, which roughly corresponds to a significant level for the distribution of the loglikelihood ratio test of polymorphisms of ~0.00001, ~0.0001 and ~0.01 (hereafter m22, m11 and m6, respectively). VarScan combines a heuristic algorithm with a pvalue computed using a Fisher's exact test on the read counts supporting each type of allele to call SNPs. The reads can be count on single or multiple samples simultaneously based on userdefined parameters such as minimum thresholds for coverage (- - mincoverage), variant allele frequency (- - minvar- freq), and statistical significance (- - pvalue). The Fisher's exact test is computed comparing the read counts supporting each allele (reference and alternative) with the expected distribution based on sequencing error alone. varscan version 2.4.2 was run using mpileup2snp command and the following userdefined parameters: - - mincoverage 8 - - minreads2 2 - - minvar- freq 0.50/N; where N corresponds to 100, 50 and 20 for the simulated Poolseq, and to 30 or 60 (full or no inbreeding) for the DGRP Poolseq data. We filtered out those SNPs with the crosssample pvalues for calling variants >0.00001, >0.0001 and >0.01 and >0.05 (v1, v2, v3 and v4, respectively). PoolSNP is also based on a heuristic approach, and like VarScan, can call SNPs on single or multiple samples simultaneously. Several userdefined parameters such as minimum and maximum coverage, minimum allele count, allele frequency of a minor allele and maximum percentage of sample that are allowed to not fullfill the above criteria, can be specified. PoolSNP was run specifying two different missfraction parameters (i.e., the maximum allowed fraction of samples not fulfilling all parameters): 0.1 and 0.8 (psnp1 and psnp2, respectively). The common userdefined parameters for the two conditions were: minimum coverage = 8, maximum coverage = 0.95 (i.e., the maximum coverage percentile to be computed); minimum count = 2, minimum frequency = 0.50/N, where N corresponds to 100, 50, and 20 for the simulated Poolseq, and to 30 or 60 (full or no inbreeding) for the DGRP Poolseq, base quality = 15. For D. melanogaster Poolseq data, the called SNPs that were in interspersed repeats and lowcomplexity regions were filtered out as in individual sequencing data (see above). 2.4 | Benchmarking statistics In order to evaluate the performance of each caller, we computed four different statistics for each caller and condition, population, sample size, and coverage. Because we were interested in comparing only segregating variants, we did not consider fixed variants in any of the callers (frequency = 1). As nearly all the SNPs called by SNAPE- pooled in the range of frequency between 0.95 and 1 have posterior probabilities of being fixed >0.95, we also filtered them out. When comparing the performance of the callers using D. melanogaster sequencing data and for those callers that use only one sample (MAPGD and SNAPE- pooled), we only discussed the results for one of the two experimental sequencing replicates. The four statistics computed were: sensitivity or true positive rate (TPR) and false discovery rate (FDR) were computed as the proportion of true SNPs in the population that were correctly recovered, and as the proportion of SNP calls that were incorrect, respectively. Lin's concordance correlation coefficient (CCC) was computed using epir package version 1.0- 4 (Stevenson et al., 2019). This statistic compares the agreement between the SNP frequencies estimated by a specific caller and those of the simulated data/individual sequencing data (true SNP frequencies). This statistic accounts for both precision (correlation between the estimated and true SNP frequencies) and accuracy (bias in the SNP frequency estimation). The guidelines for interpreting CCC suggested by McBride (2005) are: <0.90: poor; 0.90 to 0.95: moderate; 0.95 to 0.99: substantial; and >0.99 almost perfect. Mean of the percentage of the relative error (%RE): mean of the ratio of the absolute error (difference between the estimated and the true SNP frequencies) to the true SNP frequency expressed as a percentage. To study the performance of the four callers in recovering the SFS, we divided the estimated and the true SFS in 20 bins and computed the same descriptive statistics for each of the 20 frequency bins. We do not discuss the values of CCC across the SFS since they were well below 0.90 for all bins of frequency probably caused by the low number of SNPs in each frequency category and the high variance in the estimate of the frequencies relative to the range of the frequency of each bin. Note that this is not a problem with the rest of statistics since they are not based in correlations. Statistical analysis and plots were performed using r version 3.5.1. 3 | RESULTS We carried out a comparative analysis of the performance of four callers for Poolseq data based on different conceptual approaches and with different parameter settings (conditions; Table 1). We explored the callers’ performance on simulated data generated under the standard neutral model (SNM) or under a joint demographic model for Africa, North America, and Europe (Figure 1). We also explored the performance on Drosophila melanogaster sequencing data. 3.1 | SNAPE- pooled and MAPGD outperform heuristic methods under the standard neutral model Under the standard neutral model (SNM), the average sensitivity of the different callers ranged from 0 to 0.72, with PoolSNP being the most sensitive for most of the sample sizes and coverage (Table S2). However, a good SNP caller should have a good compromise between sensitivity and FDR, since very frequently, an increase in sensitivity is also accompanied by an increase in FDR. Figure 2 shows this relationship for intermediate sample size and | 1221 GUIRAORICO And GOnZÁLEZ three different coverages for the four callers and conditions under the SNM (see Figure S1 for high and low sample sizes). SNAPE- pooled (sn2) and MAPGD (m6) showed the best relationship between these two performance statistics whereas PoolSNP showed excellent sensitivities but higher FDR rates. VarScan showed the best performance in terms of the relationship between sensitivity and FDR with the less restrictive conditions (v4), although the FDR was far above the one exhibited by SNAPE- pooled and MAPGD (Figure 2). Similar results were obtained for low and high sample sizes (Figures S1, S2A,B; Table S2). In addition to evaluating general performance in terms of SNP detection (sensitivity and FDR), we were also interested in comparing allele frequency estimates across callers and conditions. As expected, the average Concordance Correlation Coefficient (CCC) values, which measures both the accuracy and precision of allele frequency estimates, were maximum with higher sample size and coverage (Figure S2C; Table S2). For intermediate to high sample sizes and coverages, the top callers in terms of SNP detection, MAPGD (m6) and SNAPE- pooled (sn2), showed also excellent performances in estimating allele frequencies (the average CCC values were >0.95). FIGURE 2 Sensitivity versus false discovery rate (FDR) of simulated pools of 50 individuals for the different simulated populations and coverages per chromosome (0.2×, 0.5× and 1.2×) for each condition of the four callers analysed. Each point depicts the mean value of the two statistics for 100 simulated replicates. See Figure S2 for results with simulated pools of 100 and 20 individuals 0.2 0.6 1.0 m22 m11 m6 v1 v2 v3 v4 sn1 sn2 psnp1 psnp2 0.2 0.6 1.0 FDR 0.2 0.6 1.0 0.20.6 1.0 0.2 0.61.0 0.2 0.6 1.0 SENSITIVITY SNM AfricaEurope 0.5x 1.2x 0.2x ΨΨ 0.2 0.6 1.0 North America Ψ FIGURE 3 Concordance correlation coefficient (CCC) versus the mean percentage of relative error (%RE) of simulated pools of 50 individuals for different simulated populations and coverages per chromosome (0.2×, 0.5× and 1.2×) for each condition of the four callers analysed. Each point depicts the mean value of the two statistics for 100 simulated replicates. See Figure S3 for results with simulated pools of 100 and 20 individuals m22 m11 m6 v1 v2 v3 v4 sn1 sn2 psnp1 psnp2 % RE CCC SNM Africa Europe 0.5x 1.2x 0.2x 0.3 1.0 070 0.94 1.0 050 -0.4 1.0 0 700 0.4 1.0 200 -0.2 1.0 0 300 0.85 1.00 0 140 0.98 1.0 040 0.3 1.0 0 200 0.80 1.00 0 120 ΨΨ North America 0 0. 41 .0 0 200 0.85 1.00 080 0.90 1.00 0 100 Ψ 1222 | GUIRAORICO And GOnZÁLEZ For most of the sample sizes and coverages, the most restrictive condition of VarScan (v1) and SNAPE- pooled (sn1) were the ones with least and most percentage of relative error (%RE), respectively (Figure S2D). Interestingly, VarScan (v1) clearly outperformed the two top callers for SNP detection although these showed values around or below 30%RE in high and intermediate sample size and coverages (Figures 3 and S3A). PoolSNP also showed a slightly less %RE compared to the two top callers but only when the coverage was high. In general, the callers that showed higher values of CCC also tend to show higher values of %RE (Figures 3 and S3). The best balance between these two measures was obtained with the less restrictive condition of VarScan (v4). 3.2 | SNAPE- pooled (sn2) showed the best performance in terms of SNP detection in SFSs with an increasing degree of bias towards lowfrequency variants We simulated a join demographic scenario with three populations (hereafter ΨAfrica, ΨNorth America, and ΨEurope; see Section 2), each with a different degree of bias towards lowfrequency variants compared to the SNM (Figure 1). This allowed us to assess the performance of the different callers in increasingly challenging conditions, i.e., higher numbers of SNPs in the lowfrequency variants category. 3.2.1 | ΨAfrica The average sensitivity of all callers in ΨAfrica, the population with the most skewed SFS, was very low, ranged from 0 to 0.3 (Table S3A). In general, SNAPE- pooled and PoolSNP were the most sensitive callers, being SNAPE- pooled the more sensitive when both the number of individuals and the coverage decreased (Figure S4A). However, these two callers showed very different behaviour with respect to FDR (Figure S4B; Table S3A). Again, heuristic callers (Pool- SNP and VarScan) yielded a higher number of false positives compared to nonheuristic callers (SNAPE- pooled and MAPGD), although the low FDR values observed in conditions m22 and m11 of MAPGD were probably due to the low detection power of this caller under these conditions (Figure S4B; Table S3A). The best callers regarding SNP detection were SNAPE- pooled and MAPGD (Figures 2 and S1). In general, we observed poorer estimates of allele frequencies compared to those for the SNM, with low values of CCC (<0.90; Table S3; Figure S4). Again, despite being one of the callers with higher FDR, VarScan outperformed the other callers in terms of the relationship between CCC and %RE (Figures 3 and S3). MAPGD (m6) and SNAPE- pooled (sn2) showed similar performance in the estimates of the allele frequencies with the later yielding slightly higher CCC values (Table S3A; Figure S4) and less %RE as we moved towards low number of individuals and coverages (Table S3A; Figures S3 and S 4 C – D ) . 3.2.2 | ΨEurope In ΨEurope, where the bias towards low frequency variants is less accentuated, the increase in sensitivity is minimal compared to ΨAfrica (ranging from 0 to 0.39; Table S3B). In most cases, the caller with higher sensitivity was PoolSNP (psnp2; Table S3B; Figure S5A), and again the top callers in terms of SNP detection were MAPGD (m6) and SNAPE- pooled (sn2), and both of them detected a similar number of true SNPs (Table S3B; Figure S5A). Instead, as the number of individuals and coverage decreased, SNAPE- pooled was the most sensitive and even outperformed PoolSNP when the number of individuals and coverage was low (Table S3B; Figure S5A). SNAPE- pooled and PoolSNP showed an opposite behaviour regarding the FDR, being SNAPE- pooled the only that maintains a relatively good balance between sensitivity and FDR (Table S3B; Figures 2 and S5B). In this sense, MAPGD (m6) also yielded acceptable FDR values (below 0.05), except for the case with the highest number of individuals and coverage, where FDR increased to 0.1 (Table S3B; Figure S5B). Regarding CCC values, the behaviour of the different callers was slightly improved with respect to the ΨAfrican population (Table S3B; Figure S5C). SNAPE- pooled (sn2) outperformed MAPGD regarding allele frequency estimation (Table S3B; Figure S5C). When the number of individuals and/or the coverage was intermediate to high, SNAPE- pooled (sn2) performed better than MAPGD (m6), with CCC values classified as substantial and moderate, indicating a reliable estimation of the SFS (see Materials and Methods). SNAPE- pooled (sn2) performed better than SNAPE- pooled (sn1) in terms of %RE in all cases (Table S3B; Figure S5D). Again, VarScan showed the best balance between CCC and %RE (Figure 3). 3.2.3 | ΨNorth America Finally, in ΨNorth America, the less skewed population, the average sensitivity reaches its maximum among the three simulated populations, ranging from 0 to 0.71 (Table S3C). PoolSNP (psnp2) was the caller that detected a higher number of true SNPs (Table S3C; Figure S6A). Among the other callers, MAPGD (m6), VarScan (v4) and SNAPE- pooled (both conditions), showed similar sensitivity when the sample size and the coverage was high or intermediate (Figure S6A). Instead, as the number of individuals and coverage decreased, the best choice to detect true SNPs were PoolSNP and SNAPE- pooled (Table S3C; Figure S6A). However, the high FDR associated to PoolSNP, especially for intermediate to small sample sizes and low coverages (Table S3C; Figure S6B), makes the two conditions of SNAPE- pooled the best options for this task (Table S3C; Figures 2, S1, and S6B). For intermediate and high coverages, SNAPE- pooled | 1223 GUIRAORICO And GOnZÁLEZ and MAPGD showed the best balance between sensitivity and FDR (Figure 2). As in the other two simulated populations, the estimates of the allele frequencies with VarScan are more accurate than those of the other callers. However, as it was observed in ΨEurope, the CCC values obtained with SNAPE- pooled (sn2), which had an acceptable FDR values compared to VarScan, indicated that the SNP frequency estimation were also reliable (Table S3C; Figure S6C). SNAPE- pooled (sn2) performed better than SNAPE- pooled (sn1) in terms of %RE in all cases and yielded also slightly better results when the sample size was high or intermediate and the coverage was high. Both SNAPE- pooled (sn2) and MAPG (m6) yielded similar values for the case of intermediate number of individuals and coverage (Table S3C; Figure S6D). For low coverage, the values of %RE were better for MAPG (m6) than for SNAPE- pooled (sn2) (Table S3C; Figure S6D). Finally, the top callers and conditions in terms of SNP detection, SNAPE and MAPGD, showed intermediate performance compared with the other callers (Figures 3 and S3). 3.3 | Callers performed differently for SNP frequencies up to 35% Since it is well known that the detection of SNPs in Poolseq data is biased to common frequency variants (Fracassetti et al., 2015; Raineri et al., 2012), as well as analysing all the SNPs together, we also studied the performance of the four callers and their conditions in different parts of the SFS (20 frequency categories). We observed that the most pronounced differences between callers were in the category of rare (<1%), or very lowfrequency variants (1%– 5%). However, the frequency range where these differences can be observed depends on the sequencing effort, being this range larger as the sample size and the coverage per chromosome decreases. Moreover, the frequency range where these callers perform differently also depended on the shape of the SFS of the simulated scenario. For instance, in the case of the population simulated under the SNM, the differences in sensitivity could be observed in allele frequencies from 0 to 0.35 and from 0.80 to 1 (Figure S7A5). Moreover, the differences in the performance of the different callers were more pronounced in populations with SFSs more skewed toward lowfrequency variants (Figures S8A and S9A). For the majority of frequency categories, MAPGD and VarScan were the callers with sensitivities more affected by the sample size and coverage (Figures S7A– S10A). In addition, MAPGD showed a decrease in sensitivity that was symmetrical, with low- and highfrequency variants more affected than intermediate ones, since this caller estimates a folded SFS and hence only reports the major allele frequency. For very lowfrequency variants (<0.05), SNAPE- pooled (sn2) and MAPGD (m6) showed higher sensitivity for the SNM and ΨAfrican population (Figures S7A1 and S8A1) whereas for ΨNorth American and ΨEuropean populations, PoolSNP and MAPGD (m6) were the ones with highest sensitivity (Figures S9A1 and S10A1). In general, the best option in terms of sensitivity was SNAPE- pooled (sn2), specially as the sample size and the coverage decreased. Regarding the FDR, for common variants in populations with high and intermediate sample size and coverage, most of the callers and conditions performed well, yielding FDR values very low or around 0 (Figures S7B– S10B). Indeed, most of the callers gave values of FDR <0.05 for the frequency range of 0.25– 0.90. For rare and lowfrequency variants, only SNAPE- pooled (sn2) and MAPGD (m6) yielded FDR values around or below 0.05 in all scenarios, except in some cases where the sample size or the coverage was low (Figures S7B– S10B), showing the best balance between sensitivity and FDR. For those frequencies, PoolSNP yielded relatively good estimates of FDR but only when the sample size and/or coverage was high (Figure S7B1 and S8B1). Allele frequency estimation across the SFS was evaluated using the %RE (see Section 2). We found that the poorer allele frequency estimates also accumulated in rare and lowfrequency variants, although some differences were also found in highfrequency variants (for frequencies from 0 to 0.20 and from 0.85 to 1 in the simulated population under the SNM; Figures S7C– S10C). However, given that relative errors are calculated in percentage units, a high %RE applied to very lowfrequencies has very little effect on the estimated SFS. This higher %RE in lowfrequency variants progressively decreases as the SFSs are less skewed toward lowfrequency variants (is higher in ΨAfrica and ΨEurope than in ΨNorth America and SNM), which is a consequence of the different frequencies in the same frequency category generated by a different underlying demography. For lowfrequency variants, among the best callers in terms of sensitivity and FDR, MAPGD (m6) performed slightly better than PoolSNP and SNAPE- pooled but only in some scenarios and in some cases when the sample size and/or the coverage was high (see for example Figures S7C1– C2 and S8C2). For the rest of sample size and conditions, PoolSNP and SNAPE- pooled (sn2) outperform MAPGD (m6), being SNAPE- pooled (sn2) slightly better in low sample size and coverage in the SNM and the ΨAfrican population (Figures S7C6– C8 and S8C6– C8) and vice versa (Figures S10C6– C8 and S9C6– C8). Analogously to the analysis with the total number of SNPs, VarScan showed lower %RE for rare and very lowfrequency variants (<0.05) than other callers for all simulated scenarios except SNM, where we can observe more similar %RE values. These differences are probably caused by the fact that, for the same frequency bin, both the number of called SNPs (SNPs passing probability/heuristic thresholds) and the SFS of these SNPs can vary importantly across scenarios (especially between simulated demographic scenarios and the SNM). 3.4 | SNAPE- pooled (sn2) and PoolSNP were the callers with the best performance in terms of sensitivity and FDR in Drosophila sequencing data In addition to assessing the performance of the different callers and settings using coalescent simulations, we further evaluated them 1224 | GUIRAORICO And GOnZÁLEZ using D. melanogaster sequencing data from 30 DGRP strains that were individually and pooled sequenced (Mackay et al., 2012; see Section 2). SNPs called in individual strains were used as the gold standard. The average sensitivity was higher than that obtained from the simulated SFSs, ranging from 0.28 to 0.84 (Table S4). The highest values (>0.70) were obtained with both PoolSNP (psnp2) and SNAPE- pooled (sn2). As expected, the sensitivity increased when the conditions within each caller were more permissive and with the option of joint for VarScan and PoolSNP where the SNPs could be called in multiple samples (as having multiple samples allows to rescue SNPs that did not pass the calling criteria in one sample). However, it was especially interesting how this increase in sensitivity affected the FDR of each caller and settings. The FDR ranged from 0.02 to 0.08 (Table S4), and as in the simulated data, the highest values were observed for VarScan (v4j) and PoolSNP (psnp1 and psnp2). Interestingly, the best balance between sensitivity and FDR was obtained with SNAPE- pooled (sn2) and followed very closely by PoolSNP without the joint variant calling option (Figure 4a). For the two callers with the joint variant calling options (VarScan and PoolSNP), the sensitivity increased at the expense of an increase in the FDR compared to when this option was not used (Figure 4a). On the other hand, CCC values were in general good for all callers and conditions, ranging from 0.89 to 0.96. The callers that performed better in terms of sensitivity and FDR (PoolSNP and SNAPE- pooled [sn2]) yielded similar CCC values (Table S4). The values for these callers were above 0.95, indicating substantial concordance between the SNP frequencies estimated in individual and Poolseq data. The %RE ranged from 0.16 to 0.46, being SNAPE- pooled (sn1) the caller with the highest %RE (Table S4). As with the sensitivity and FDR, both, the CCC and the %RE increased when the conditions within each caller were more permissive and with the joint variant calling option for those callers where the SNPs can be called in multiple samples (VarScan and PoolSNP). The balance between CCC and %RE was very similar for those callers and conditions that performed well in terms of the balance between sensitivity and FDR – PoolSNP and SNAPE- pooled (sn2)– (Figure 4). We also analysed the performance of the different callers across the SFS. For frequencies ranging from 0.3 to 0.8 most of the callers and settings showed sensitivities >0.90 (Figure S11). The sensitivity for MAPGD and VarScan showed a decrease for frequencies below 0.3, being this decrease less pronounced for the options less restrictive (m6 and v4) and for the joint variant calling option in the case of VarScan. The callers that performs better for lowfrequency variants, PoolSNP and SNAPE- pooled (sn2), showed sensitivities above 0.70 for most of the frequencies <0.10. In general, the highest FDR was obtained with VarScan, with values ≤0.06 for frequencies between 0.3 and 0.95 and with values up to 0.1 for the rest of the frequencies (Figure S12). The FDR for MAPGD were acceptable, with most of FDR values ≤0.05 for all conditions. Instead, SNAPE- pooled (sn2) and PoolSNP showed low FDR (≤ 0.05) for frequencies above 0.20, but the highest FDR values for rare and low frequencies (from 0 to 0.10). Regarding the estimate of the frequencies across the SFS, the worst estimates were observed in frequencies up to 0.15 (Figure S13). The values of the %RE above these frequencies were similar or lower than those averaged for all frequencies, with a gradual decrease of the %RE as the frequencies increased (Figure S13). Again, for most of the SFS, SNAPE- pooled (sn2) yielded slightly lower values of the %RE compared with PoolSNP (Figure S13). For VarScan, and for rare and very lowfrequency variants (<0.05), we observed the same trend as in the simulated population under the SNM: higher %RE compared with other callers and lower %RE for the less stringent conditions. Finally, the values of sensitivity, FDR, CCC and %RE obtained with VarScan, SNAPE- pooled and PoolSNP when we considered complete inbreeding were very similar to those obtained considering no inbreeding except for SNAPE- pooled (sn1), where the %RE was higher in the case of inbreeding (Figure S14). Overall, both SNAPE- pooled (sn2) and PoolSNP were the callers with the best performance in terms of sensitivity and FDR, and with an intermediate performance compared with other callers in frequency estimation. This behaviour was observed both considering all SNPs and across the different frequency categories of the SFS. As in the simulated population under the SNM, FIGURE 4 Sensitivity versus false discovery rate (FDR) and concordance correlation coefficient (CCC) versus the mean percentage of relative error (%RE) of Drosophila melanogaster sequencing data. j, indicates join variant calling m22 m11 m6 v1 v2 v3 v4 sn1 sn2 psnp v1j v2j v3j v4j psnp1j psnp2j