dataesr/scientific-paragraphs-categorization huggingface dataset:
g. , TREEMIX  [39] ), the beta distribution (used in, e. g. , NB  [47] ) or the beta with spikes approximation (used in SPIKEYTREE  [48] ). As expected, they found that Kimura's time-dependent diffusion provides the most accurate approximation to the drift process. Yet, for branch length inference, Tataru et al. [48]  showed that SPIKEYTREE could outperform KIMTREE  [32] , which is based on Kimura's time-dependent diffusion. We have shown that this discrepancy originated from the fact that in its original implementation, KIMTREE did not account for the exclusive presence of polymorphic markers in SNP datasets. By construction, these datasets lack the information contained in the fraction of sites that are polymorphic in the root population, but fixed in the sample (see S2 and S3 Figs). Following Tataru et al.
Although the assumption of conditional independence of SNPs is violated in KIMTREE, and although the expected extent of LD differs between autosomes and the X chromosome, we found that our model is robust to LD under realistic conditions (S10 Fig). Based on our simulation results, we therefore recommend to subsample SNPs randomly, or to thin the data by taking one SNP out of every n SNPs from the ordered map. Such a strategy is more relevant than LD pruning, because it does not alter the allele frequency spectrum, on which inference is based. Random subsampling of genome-wide data can further be used to provide pseudoreplicated estimates from a handful of reduced datasets. This allows in turn to provide higher support to our conclusions through pseudo-independent estimates of the parameters of interest.
From a more technical point of view, another advantage of this approach is that we may reduce the asymmetry in the number of markers for autosomes and the X chromosome. This asymmetry in the amount of information available for each genetic system may indeed cause specific issues for the joint update of branch lengths, with poor acceptance rates. We found that 5,000 markers per dataset and per genetic system provided accurate parameter estimates, while limiting the computational burden. Estimation of the ESR might also be affected by SNP ascertainment bias, which notably depends on the ascertainment scheme. Although conditioning the likelihood on the presence of polymorphic sites only does improve the accuracy of branch length estimates (see above), it does not address the specific problem of ascertainment bias in genotyping assays.
We found that ascertainment bias may result in biased estimates of branch lengths, in particular when only a subset of populations belongs to the discovery panel (see S11A, S11B, S11D, S11E, S11G and S11H Fig). However, estimates of the ESR were unbiased in the simulated conditions, where the ascertainment scheme was identical for both autosomal and X-linked markers (see S11C, S11F and S11I Fig). Nevertheless, we recommend to be cautious when interpreting the results from ascertained datasets and, if possible, to use whole-genome sequence data. For illustration purposes, we analyzed both cattle and human SNP genotyping data, providing new insights into the sex-specific demographic history of these two species. We chose three cattle breeds (HOL, ANG and NDA) with contrasting breeding schemes (from a widespread use of artificial insemination in the HOL dairy cattle to mostly uncontrolled mating in the NDA cattle from West-Africa).
Deciphering between these two non-mutually exclusive hypotheses would require further investigations. Finally, we re-analyzed recently published sequence data from Pagani et al. [33]  combined with sequences from Drmanac et al. [61]  and from the Personal Genomes Project. We found a strong and significant male-biased ESR in the Oceanian sample (Fig 7 ), that could not be explained by the small sample size in that branch (S14 Fig). It should be pointed out, however, that because this Oceanian sample consists of only six males, it may not be representative for the whole region. Nevertheless, our results are consistent with Malaspinas et al. [4] , who recently studied high-coverage genomes in a large dataset from Aboriginal Australians and Papuans and provided important insight into the social structure of Aboriginal Australian societies.
Our method takes advantage of genome-wide SNP data and can in principle be applied to a wide range of species. Its generic character allows it to be also applicable to Pool-seq data, which in contrast to individual sequencing, is based on sequencing individuals in pools, resulting in read count data instead of individual genotypes. Pool-seq allows for cost efficient production of large datasets, and recently became a popular source of data due to its high accuracy-to-cost ratio  [63]. For Pool-seq data, one shall assume that the (observed) read counts are binomially distributed, given the (unknown) allele frequencies and the sample size of each pool  [64] , which is straightforward to implement in our hierarchical Bayesian framework  [34]. It should be noted however that conditioning the likelihood on the exclusive presence of polymorphic sites in the sample has to be further adjusted for Pool-seq data.
Conditioning on polymorphic sites Because SNP data from different populations contain, by definition, only polymorphic sites, we condition the likelihood to account for those sites that are polymorphic in the root population but end up as fixed positions in the full sample and are, as such, absent from the dataset (see Tataru et al. [48] ). In the following, for the sake of clarity, we develop the computation of the conditional likelihood in the context of the simpler model defined by Eq (1). This computation extends naturally to the full model defined by Eq (3), for both autosomal and X-linked data. Conditioning the likelihood amounts to defining an indicator variable λ j , which equals 1 if the jth position is polymorphic in the full sample (i. e. , if 0 < ∑ i y ij < ∑ i n ij ). As detailed below, we assume that the prior on λ j depends on the sample size n j , the branch lengths τ and the allele frequencies in the root population x rj : Pðl j ¼ 1 j n j ; x rj ; τ Þ ¼ 1 À Pð X i y ij ¼ 0 j n j ; x rj ; τÞ À Pð X i y ij ¼ X i n ij j n j ; x rj ; τÞ ð5Þ where Pð P i y ij ¼ 0 j n j ; x rj ; τÞ is the probability that the reference allele is absent in all sampled populations and likewise Pð P i y ij ¼ P i n ij j n j ; x rj ; τÞ is the probability that the reference allele is fixed in the entire sample.
Given that the allele frequency in the root population at site j is x rj , we get: Pðy rj ¼ 0 j x rj ; n j ; τ Þ ¼ X k Pðñ rj ¼ k j n j ; τÞð1 À x rj Þ k ð10Þ and: Pðy rj ¼ n rj j x rj ; n j ; τ Þ ¼ X k Pðñ rj ¼ k j n j ; τÞx k rj ð11Þ Therefore, combining Eqs (  5 ),  (10)  and  (11) , the probability that all the ancestral lineages in the root node are not of the same allelic type (and therefore that the full sample is polymorphic) is given by: Pðl j ¼ 1 j x rj ; n j ; τ Þ ¼ 1 À X k Pðñ rj ¼ k j n j ; τÞ½ð1 À x rj Þ k þ x k rj " # ð12Þ For ease of computation, we assume the same sample size n across all sites, which we set to the maximum sample size observed in the dataset. Then the number of ancestral lineages in the root node, Pðñ rj ¼ k j n; τÞ, is independent of site j and is therefore equal across loci.
Model assessment Because the tree topology is generally unknown, we implemented a model choice procedure to characterize, for any given dataset, the strength of evidence for alternative population histories. Following Gautier and Vitalis  [32] , we used the deviance information criterion (DIC), which is a standard criterion for model selection  [35]. Up to a constant that does not depend on the model, the DIC is equal to ð2 " D À Dð " ΘÞÞ, where " D is the posterior mean deviance, which can be interpreted as a Bayesian measure of fit, and Dð " ΘÞ is the Bayesian deviance evaluated at the posterior mean of the parameters Θ. Extending Eq (8) from Gautier and Vitalis  [32]  to our model gives (dropping the index O for the sake of clarity): " D ¼ À 2 T X T t¼1 X I i¼1 X J j¼1 log n ij y ij ! x ij ðtÞ y ij ð1 À x ij ðtÞÞ n ij À y ij " # " À X J j¼1 log Pðl j ¼ 1 j n j ðtÞ; x rj ðtÞ; τðtÞÞ # ð13Þ and: Dð " yÞ ¼ À 2 X I i¼1 X J j¼1 log n ij y ij ! " x y ij ij ð1 À " x ij Þ n ij À y ij " # " À X J j¼1 log Pðl j ¼ 1 j n j ; " x rj ; " τÞ # ð14Þ In Eq (13), x ij (t) is the tth sampled value of the parameter x ij along the MCMC, out of T total draws.
Each locus is constrained to be strictly bi-allelic (i. e. , all coalescent trees with more than a single mutation are discarded). The mutation rate was set to μ = 1. 5 × 10 -7 with an ancestral (root) population made of 50,000 males and 50,000 females. In general, we simulated 5,000 autosomal markers and 5,000 bi-allelic X-linked markers. We sampled 50 diploid females from each population (such that the number of sampled genes is 100 for both autosomal and X-linked markers). Typically, 50 independent datasets were simulated for each scenario. The analysis of SNP data is intricate due to the discovery protocols used to ascertain polymorphisms. Typically, SNPs are called using genotypes from a reduced sample of individuals, which is referred to as the discovery panel. Only then, the ascertained SNPs are genotyped in the full sample of interest.
As a consequence, the data contain less low-frequency alleles than expected in the absence of ascertainment  [76]. To analyze the consequences of SNP ascertainment bias on the inference of the ESR, we simulated SNP datasets mimicking different ascertainment schemes. For all schemes, we considered a population history with balanced topology ((1,2),  (3, 4) ). We called SNPs using two "ghost" individuals (out of 50 simulated diploid females) in a panel of populations. These individuals were used exclusively for SNP calling and discarded from further analyses. Only those sites that were polymorphic in the discovery panel were therefore considered for the KIMTREE analyses, using allele counts from the remaining 48 individuals of each sample. We considered three schemes differing by the populations contributing to the panel.
In the first scheme, all populations (1-4) were represented in the discovery panel. In the second scheme, only populations 1 and 3 (that belong to both sides of the balanced tree) were represented in the panel. In the third scheme, only populations 1 and 2 (that belong to a single side of the balanced tree) were represented in the panel. To evaluate the robustness of the model to LD, we simulated additional datasets using msprime  [77] , because our generation-by-generation simulator is not designed to generate linked markers. Considering a population history with balanced topology ((1,2),(3,4)), we generated 100 haplotypes of 100 Mb (1 Morgan in our parameterization) for each population and each genetic system. Assuming a balanced ESR, we considered N e = 1,000 and τ i = 0. 1 in all branches for autosomal data, and N e = 750 and τ i = 0.
133 for X-linked data. We also reduced the recombination rate for the X chromosome by a 2/3 factor, because of the absence of recombination in males. We then analyzed 50 replicated datasets consisting of 5,000 SNPs sampled from a single autosome and 5,000 SNPs sampled from a single X chromosome. To vary the extent of LD, we sampled SNPs from the whole chromosomes, or from the first 50 Mb, 20 Mb, or 10 Mb. To mimic more realistic datasets, we considered a "whole-genome" sampling scheme, where 5,000 autosomal SNPs were sampled from 20 distinct autosomes and 5,000 X-linked SNPs were sampled from a single X chromosome. As a matter of comparison, we also analyzed 50 datasets simulated with msprime, but assuming strictly independent SNPs.
Data Cattle data. The analyzed cattle dataset consisted of 60 individuals (55 bulls and 5 cows) belonging to the Holstein dairy cattle breed (HOL), 42 individuals (39 bulls and 3 cows) belonging to the Angus beef cattle breed (ANG), and 23 individuals (4 bulls and 19 cows) belonging to the N'Dama breed (NDA). The data were taken from the public database WIDDE  [78] , based on the high-density Illumina 770K SNP chip https://www. illumina. com/ Documents/products/datasheets/datasheet_bovineHD. pdf. We used DETSEX  [79]  to infer the sex of individuals, and to identify the markers located in the pseudo-autosomal regions of the X chromosome. Only those SNPs that unambiguously mapped to the X chromosome (with posterior probability > 0. 95) were retained as X-linked markers. Only those markers that were polymorphic in the full sample, and typed in all sampled individuals were retained, resulting in a total of 643,090 autosomal SNPs and 15,009 X-linked SNPs.
For both genetic systems, we randomly subsampled 50 pseudo-replicated datasets from the full data, consisting in 5,000 autosomal SNPs and 5,000 X-linked SNPs. We performed the f 3 admixture test on autosomal SNPs  [54]  and found no evidence of admixture in all three possible tree topologies: Human HapMap data. We re-analyzed the dataset from Keinan et al. [19, 42]  (available from https://reich. hms. harvard. edu/datasets), consisting of 60 European American individuals from Utah, USA (of North European ancestry; CEU), 60 West African individuals from Ibadan, Nigeria (YRI), and 90 East Asian individuals (45 Han Chinese from Beijing, China, and 45 Japanese from Tokyo, Japan; ASN). From the filtered sequences (level 3), we concatenated all available SNPs from the autosomes and X chromosome, respectively, and removed duplicates (multiple annotated sites).
We retained 340,909 autosomal and 12,737 X-linked sites that were polymorphic in the full sample, which we randomly subsampled into 50 pseudo-replicated datasets made of 5,000 autosomal SNPs and 5,000 X-linked SNPs. We performed the f 3 admixture test  [54]  using autosomal data and found no evidence of admixture in all three possible tree topologies: f 3 (CEU;ASN,YRI) = 0. 014 (z-score = 163. 4), f 3 (ASN;CEU,YRI) = 0. 023 (z-score = 216. 3), and f 3 (YRI;CEU,ASN) = 0. 042 (z-score = 319. 5). Human whole-genome sequence data. The analyzed dataset consisted in a subset of individuals that were recently published in Pagani et al. [33] , which combined 379 previously unpublished genomes with sequences from the Personal Genomes Project (http://www. personalgenomes. org) and previously published data from Drmanac et al.
[61]  and Clemente et al. [80]  (available from http://evolbio. ut. ee/CGgenomes. html). All samples have been sequenced at >40x coverage, mapped and called by Complete Genomics (Mountain View, California, USA) using CG software versions 1. 5; 2. 0, 2. 2 and 2. 4. Despite minor differences between the pipeline versions, the resulting data can be considered as single platform data with negligible platform bias. The raw data were reduced to contain only SNPs of high quality and were further subject to three subsequent filtering steps: (a) Hardy-Weinberg equilibrium filter, (b) biallelic filter and (c) no-call filter (see Pagani et al. [33]  for details). We were interested in inferring ESR in populations that experienced the Out-of-Africa bottleneck but are genetically as distinct as possible.
Using the ADMIXTURE plots from Extended Data Figure  1C  in Pagani et al. [33] , we clustered together 9 North-West Europeans with 29 Estonians (NW-Europe); 8 Dusun, 9 Murut and 8 Igorot (SE-Asia island); 3 Kosipe and 3 Koinanbe (Oceania) and 5 Cachi, 19 Colla, and 4 Wichi (Americas). Among these individuals, we extracted strictly bi-allelic SNPs (sites with missing data were excluded) that were segregating in the full sample and concatenated the remaining 11,566,865 loci from all autosomes. For the X chromosome, we excluded the pseudo-autosomal regions as annotated in GRCh37. p13 and retained 340,475 X-linked markers. For each genetic system, we then randomly subsampled the full data into 50 pseudo-replicated datasets made of 5,000 autosomal SNPs and 5,000 X-linked SNPs. We performed the four population test (f 4 ) on all autosomal loci, which suggested no admixture for the unrooted tree (NW-Europe,SE-Asia island); (Oceania,Americas) (f 4 = -0.
We analyzed 50 replicate simulated datasets for each scenario, with 5,000 autosomal SNPs and 5,000 X-linked SNPs. The boxplots summarize the distributions of the 50 posterior means of ξ i for each of the four branches. The horizontal dashed segments indicate the true (simulated) values of ξ i. The pie-charts indicate the fraction of significant support values (S < 0. 01), against the hypothesis ξ = 0. 5 (see Eq 4). https://doi. org/10. 1371/journal. pgen. 1007191. g002.
50 females per population were sampled for each dataset. We analyzed 50 replicate simulated datasets of each scenario, with 5,000 autosomal SNPs and 5,000 X-linked SNPs. The boxplots in (B) summarize the distributions of the 50 posterior means of ξ i for each of the six branches. The horizontal dashed segments indicate the true (simulated) values of ξ i. The pie-charts indicate the fraction of significant support values (S < 0. 01), against the hypothesis ξ = 0. 5 (see Eq 4).
50 females per population were sampled for each dataset. We analyzed 50 replicate simulated datasets of each scenario, with 5,000 autosomal SNPs and 5,000 X-linked SNPs. The boxplots in (B) summarize the distributions of the 50 posterior means of ξ i for each of the six branches. The horizontal dashed segments indicate the true (simulated) values of ξ i. The pie-charts indicate the fraction of significant support values (S < 0. 01), against the hypothesis ξ = 0. 5 (see Eq 4). https://doi. org/10. 1371/journal. pgen. 1007191. g003.
In (C), we simulated migration between population 1 and 2, with equal rates for both sexes: m f = m m = 0. 00025 (therefore 4N f e m f ¼ 4N m e m m ¼ 5). In (D), we simulated female-biased migration between populations 1 and 2 with m f = 0. 00025 and m m = 0 (therefore 4N f e m f ¼ 5 and 4N m e m m ¼ 0). We analyzed 50 replicate simulated datasets for each scenario, with 5,000 autosomal SNPs and 5,000 X-linked SNPs. The boxplots in (A-D) summarize the distributions of the 50 posterior means of ξ i for each of the six branches. The horizontal dashed line indicates the true (simulated) values of ξ i. The pie-charts indicate the fraction of significant support values (S < 0. 01), against the hypothesis ξ = 0. 5 (see Eq 4).
In (C), we simulated migration between population 1 and 2, with equal rates for both sexes: m f = m m = 0. 00025 (therefore 4N f e m f ¼ 4N m e m m ¼ 5). In (D), we simulated female-biased migration between populations 1 and 2 with m f = 0. 00025 and m m = 0 (therefore 4N f e m f ¼ 5 and 4N m e m m ¼ 0). We analyzed 50 replicate simulated datasets for each scenario, with 5,000 autosomal SNPs and 5,000 X-linked SNPs. The boxplots in (A-D) summarize the distributions of the 50 posterior means of ξ i for each of the six branches. The horizontal dashed line indicates the true (simulated) values of ξ i. The pie-charts indicate the fraction of significant support values (S < 0. 01), against the hypothesis ξ = 0. 5 (see Eq 4). https://doi. org/10. 1371/journal. pgen. 1007191. g004.
i t=ð2N ðAÞ i Þ. (B) The boxplots summarize the distributions of the posterior means of the ESR for each branch in the tree, for the 50 pseudo-replicated datasets. The dotted line indicates the expectation for a balanced ESR (ξ i = 0. 5). The pie-charts indicate the fraction of significant support values (S < 0. 01) against the hypothesis ξ = 0. 5 (see Eq 4). https://doi. org/10. 1371/journal. pgen. 1007191. g007.
The human data from  Keinan et al. (2007 Keinan et al. ( , 2009) )  are available from the website (https://reich. hms. harvard. edu/datasets) as a subset of SNPs from HapMap (Public Release #21a). The human data from Pagani et al. , 2016 are deposited in the ENA archive under accession number PRJEB12437 and are also freely available through the Estonian Biocentre website (http:// evolbio. ut. ee/CGgenomes. html). Additional data are available through the Personal Genomes Project (http://www. personalgenomes. org). The cattle data were taken from the public database WIDDE (http://widde. toulouse. inra. fr/widde/).
5 × 10 -7. 50 females per population were sampled for each dataset. We analyzed 50 replicate simulated datasets of each scenario, with 5,000 autosomal SNPs and 5,000 X-linked SNPs. The boxplots in (B) summarize the distributions of the 50 posterior means of ξ i for each of the six branches. The horizontal dashed segments indicate the true (simulated) values of ξ i. The pie-charts indicate the fraction of significant support values (S < 0. 01), against the hypothesis ξ = 0. 5 (see Eq 4).
The conception and improvement of algorithms for subpixel stereovision requires very precise test databases. The state of the art on the sets of images used extensively by the scientific community shows that they are often incomplete and imprecise compared to the dataset goals. We will present a method based on image synthesis to produce stereoscopic pairs with ground truths such as disparity and occlusion maps reaching an accuracy of about 10 -6 pixels. The a priori noise estimate is also taken into account. This process allows us to deliver a new image database consisting of 66 stereo pairs together with their ground truths.
For the stereo matching algorithms computing a disparity map from a pair of images (see Szeliski  [24, Chapter 11] ), the following information is added to the ground truths: • the transformation matrices between the view and the 3D frame of the scene to reconstruct the epipolar geometry (see Hartley et al. [10, Chapter 6] , Szeliski  [24, Chapter 2] ); • the disparity map which, for each pixel of an image I 1 , indicates its position in the image I 2 ; • the occlusion map which, for each pixel of I 1 , indicates if it is visible or not in I 2. State of the art datasets for stereo algorithms are sometimes incomplete. This is why we present in this paper an approach to ground truths creation filling some of the gaps. To this aim, we use synthetic scenes produced by a renderer where the geometry of objects in the scene, the optical characteristics of cameras and the variety of scenes are controllable.
We tried to make the most of the geometric information obtained by ray tracing by exploiting the ray tracing spatial oversampling. This article is organized as follows. Section 2 is devoted to an analysis of the state of the art of databases widely used by the scientific community for stereo algorithms evaluation. Having motivated our approach in Section 3 and briefly described the principle of ray tracing in Section 5 we detail in Section 6 the noise estimation method in image pairs, in Sections 7, 8 and 9 the creation of point clouds, disparity maps and occlusion maps, respectively. Finally, Appendix B describes the features of the image database files.
Stereo Ground Truths in Real Environment The Middlebury Dataset. Scharstein et al. [21]  of Middlebury College were among the first to generate stereo pairs accompanied by ground truth. They have published five datasets with disparity maps over the last 15 years. From 2003 Scharstein et al. [22]  produced pairs whose disparity estimation is obtained by illuminating the scene with a coherent light. Specifically the scene was illuminated several times by projecting different bar patterns. As a result each pixel of the stereo pairs was marked with a unique multi-spectral signature. Measurement of disparities using an ad hoc algorithm was then much easier. The authors did not, however, describe this registration algorithm. Until 2013 the disparity maps are accurate up to one pixel. By improving the illumination device, including the projection of colored bar patterns defined by the method of Gupta et al.