dataesr/scientific-paragraphs-categorization huggingface dataset:
Data and code availability All the software is made available in GitHub at: [https://github. com/stanford-stages/stanfordstages]. We asked all contributing co-authors whether we could make the anonymized EDF available, together with age, sex and T1N diagnosis (Y/N). The SSC  10, 32  (Emmanuel Mignot), the IS-RC  31  (Sam Kuna, Clete Kushida, Paula K. Schweitzer), the KHC (Seung Chul Hong), the HIS (Giuseppe Plazzi), the DHS (Poul Jennum), the FHC (Yves Dauvilliers), and associated data is available at [https://stanfordmedicine. app. box. com/s/r9e92ygq0erf7hn5re6j51aaggf50jly]. The AHC (Birgit Högl), and the CNC  12  (Fang Han) are available from the corresponding investigator on reasonable request. The WSC  32, 33  data analysed during the current study are not publicly available due to specific language contained in informed consent documents limiting use of WSC human subjects' data to specified institutionally-approved investigations.
a, b, and c summarize the overall design of the study for sleep stage scoring and narcolepsy biomarker development. Supplementary Table1provides a summary of the size of each cohort and how it was used. In the narcolepsy biomarker aspect of the study, PSGs from T1N and other patients were split across most datasets to ensure heterogeneity in both the training and testing dataset. For this analysis, a few recordings with poor quality sleep studies, i. e. missing critical channels, with additional sensors or with a too short sleep duration (≤ 2 hours) were excluded. A "never seen" subset cohort that included French and Chinese subjects (FHC and CNC) was also tested. Below is a brief description of each dataset. 33pulation-based Wisconsin Sleep CohortThis cohort is a longitudinal study of state agency employees aged 37 -82 years from Wisconsin, and approximates a population-based sample (see Supplementary Table1for age at study) and are generally more overweight33.
This work was supported by  Agence Nationale de la Recherche  (http://www. agencenationale-recherche. fr,grants  ANR-10-BLAN-1516  to OH and  12-BSV2-0023-02  to AB), by the  European Research Council  (https://erc. europa. eu,grants # 307387  to AB and # 615739  to OH), and by the  Gatsby Charitable Foundation  (http://www. , grants  GAT3395/DAA  to EMM and  GAT3395-PR4  to HJ). EMM also acknowledges support from the  Howard Hughes Medical Institute. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
The advent of high throughput sequencing and genotyping technologies enables the comparison of patterns of polymorphisms at a very large number of markers. While the characterization of genetic structure from individual sequencing data remains expensive for many nonmodel species, it has been shown that sequencing pools of individual DNAs (Pool-seq) represents an attractive and cost-effective alternative. However, analyzing sequence read counts from a DNA pool instead of individual genotypes raises statistical challenges in deriving correct estimates of genetic differentiation. In this article, we provide a method-of-moments estimator of F ST for Pool-seq data, based on an analysis-of-variance framework. We show, by means of simulations, that this new estimator is unbiased and outperforms previously proposed estimators.
2013). Appropriate estimators of diversity and differentiation parameters must therefore be sought to account for both the sampling of individual genes from the pool and the sampling of reads from these genes. There has been several attempts to define estimators for the parameter F ST for Poolseq data  (Kofler et al. 2011; Ferretti et al. 2013) , from ratios of heterozygosities (or from probabilities of genetic identity between pairs of reads) within and between pools. In the following, we will argue that these estimators are biased (i. e. , they do not converge toward the expected value of the parameter) and that some of them have undesired statistical properties (i. e. , the bias depends on sample size and coverage). Here, following  Cockerham (1969 Cockerham ( , 1973)) ,  Weir and Cockerham (1984) ,  Weir (1996) ,  Weir and Hill (2002) , and  Rousset (2007) , we define a method-of-moments estimator of the parameter F ST using an analysis-of-variance framework.
We then evaluate the accuracy and precision of this estimator, based on the analysis of simulated data sets, and compare it to estimates defined in the software package PoPoolation2  (Kofler et al. 2011) and in Ferretti et al. (2013). Furthermore, we test the robustness of our estimators to model misspecifications (including unequal contributions of individuals in pools and sequencing errors). Finally, we reanalyze the prickly sculpin (Cottus asper) Pool-seq data (published by  Dennenmoser et al. 2017) , and show how the use of biased F ST estimators in previous analyses may challenge the interpretation of population structure. Note that throughout this article, we use the term "gene" to designate a segregating genetic unit (in the sense of the "Mendelian gene" from  Orgogozo et al. 2016).
Model F-statistics may be described as intraclass correlations for the IIS probability of pairs of genes  (Cockerham and Weir 1987; Rousset 1996 Rousset , 2007)). F ST is best defined as: F ST [ Q 1 2 Q 2 1 2 Q 2 ; (1) where Q 1 is the IIS probability for genes sampled within subpopulations, and Q 2 is the IIS probability for genes sampled between subpopulations. In the following, we develop an estimator of F ST for Pool-seq data by decomposing the total variance of read frequencies in an analysis-of-variance framework. A complete derivation of the model is provided in the Supplemental Material, File S1. For the sake of clarity, the notation used throughout this article is given in Table  1. We first derive our model for a single locus and eventually provide a multilocus estimator of F ST.
We generated a very large number of sequences for each scenario and sampled independent single nucleotide polymorphisms (SNPs) from sequences with a single segregating site. Each scenario was replicated 50 times (500 times for Figure  3  and Figure  S2 ). Pool sequencing: For each ms simulated data set, we generated Pool-seq data by drawing reads from a binomial distribution  (Gautier et al. 2013). More precisely, we assume that for each SNP, the number r i:k of reads of allelic type k in pool i follows: r i:k $ Bin y i:k n i ; d i ; (14) where y i:k is the number of genes of type k in the ith pool, n i is the total number of genes in pool i (haploid pool size), and d i is the simulated total coverage for pool i. In the following, we either consider a fixed coverage, with d i ¼ D for all pools and loci, or a varying coverage across pools and loci, with d i $ PoisðDÞ: Sequencing error: We simulated sequencing errors occurring at rate m e ¼ 0:001; which is typical of Illumina sequencers  (Glenn 2011; Ross et al.
2013). We assumed that each sequencing error modifies the allelic type of a read to one of three other possible states with equal probability (there are therefore four allelic types in total, corresponding to four nucleotides). Note that only biallelic markers are retained in the final data sets. Also note that, since we initiated this procedure with polymorphic markers only, we neglect sequencing errors that would create spurious SNPs from monomorphic sites. However, such SNPs should be rare in real data sets, since markers with a low minimum read count (MRC) are generally filtered out. Experimental error: Nonequimolar amounts of DNA from all individuals in a pool and stochastic variation in the amplification efficiency of individual DNAs are sources of experimental errors in Pool-seq. To simulate experimental errors, we used the model derived by  Gautier et al.
Other estimators For the sake of clarity, a summary of the notation of the F ST estimators used throughout this article is given in Table  2. PP2 d : This estimator of F ST is implemented by default in the software package PoPoolation2  (Kofler et al. 2011). It is based on a definition of the parameter F ST as the overall reduction in average heterozygosity relative to the total combined population (see, e. g. ,  Nei and Chesser 1983) : PP2 d [ ĤT 2 ĤS ĤT ; ( 16 ) where ĤS is the average heterozygosity within subpopulations, and ĤT is the average heterozygosity in the total population (obtained by pooling together all subpopulations to form a single virtual unit). In PoPoolation2, ĤS is the unweighted average of within-subpopulation heterozygosities: ĤS ¼ 1 n d X n d i n i n i 2 1 C 1i C 1i 2 1 1 2 X k p2 i:k (17) (using the notation from Table  1 ).
Note that the IIS probability Q r 1 is different from Q 1 in Equation  1 , which, from our definition, represents the IIS probability between distinct genes in the same pool. This approach therefore confounds pairs of reads within pools that are identical because they were sequenced from a single gene from pairs of reads that are identical because they were sequenced from distinct, yet IIS genes. 16 above, although they estimate heterozygosities within and between pools as "average pairwise nucleotide diversities," which, from their definitions, are formally equivalent to IIS probabilities. In particular, they estimate the average heterozygosity within pools as (using the notation from Table  1 ): ĤS ¼ 1 n d X n d i n i n i 2 1 1 2 Qr 1i ( 20 ) and the total heterozygosity among the n d populations as: ĤT ¼ 1 n 2 d 2 4 X n d i n i n i 2 1 1 2 Qr 1i þ X n d i6 ¼i9 1 2 Qr 2ii9 3 5 : (21) Analyses of Ind-seq data For the comparison of Ind-seq and Pool-seq data sets, we computed F ST on subsamples of 5000 loci.
These subsamples were defined so that only those loci that were polymorphic in all coverage conditions were retained, and the same loci were   Weir and Cockerham (1984)  used for the analysis of the corresponding Ind-seq data. For the latter, we used either the  Nei and Chesser's (1983)  estimator based on a ratio of heterozygosity (see Equation  16 above), hereafter denoted by NC 83 ; or the analysis-of-variance estimator developed by  Weir and Cockerham (1984) , hereafter denoted by WC 84 : All the estimators were computed using custom functions in the R software environment for statistical computing, version 3. 3. 1 (R Core Team 2017). All of these functions were carefully checked against available software packages to ensure that they provided strictly identical estimates. Application example: C.
asper  Dennenmoser et al. (2017)  investigated the genomic basis of adaption to osmotic conditions in the prickly sculpin (C. asper), an abundant euryhaline fish in northwestern North America. To do so, they sequenced the whole genome of pools of individuals from two estuarine populations (Capilano River Estuary, CR; Fraser River Estuary, FE) and two freshwater populations (Pitt Lake, PI; Hatzic Lake, HZ) in southern British Columbia (Canada). We downloaded the four corresponding BAM files from the Dryad Digital Repository (http://dx. doi. org/10. 5061/dryad. 2qg01) and combined them into a single mpileup file using SAMtools version 0. 1. 19 (Li et al. 2009 ) with default options, except the maximum depth per BAM that was set to 5000 reads. The resulting file was further processed using a custom awk script to call SNPs and compute read counts, after discarding bases with a base alignment quality (BAQ) score ,25.
A position was then considered a SNP if: (1) only two different nucleotides with a read count. 1 were observed (nucleotides with # 1 read being considered as a sequencing error); (2) the coverage was between 10 and 300 in each of the four alignment files; (3) the minor allele frequency, as computed from read counts, was $ 0:01 in the four populations. The final data set consisted of 608,879 SNPs. Our aim here was to compare the population structure inferred from pairwise estimates of F ST using the estimator Fpool ST (Equation  12 ) with that of PP2 d. To determine which of the two estimators performs better, we then compared the population structure inferred from Fpool ST and PP2 d to that inferred from the Bayesian hierarchical model implemented in the software package BayPass  (Gautier 2015).
Data availability An R package called poolfstat, which implements F ST estimates for Pool-seq data, is available at the Comprehensive R Archive Network (CRAN): https://cran. r-project. org/web/ packages/poolfstat/index. html. The authors state that all data necessary for confirming the conclusions presented in this article are fully represented within the article, figures, and tables. Supplemental material (including Figures  S1-S4 , Tables  S1-S3 , and a complete derivation of the model in File S1) available at Figshare: https:// doi. org/10. 25386/genetics. 6856781.
Consider, for example, the case of samples of n ¼ 20 haploids. For F ST # 0:05 (in the conditions of our simulations), the RMSE of F ST estimates based on Pool-seq data tends to the RMSE of F ST estimates based on Ind-seq data either by sequencing pools of $200 haploids at 203, or by sequencing pools of 20 haploids at $2003. However, the same precision and accuracy are achieved by sequencing $50 haploids at $503. Conversely, we found that PP2 d (the default estimator of F ST implemented in the software package PoPoolation2) is biased when compared to the expected value of the parameter. We observed that the bias depends on both the sample size and the coverage (see Figure  2 ). We note that, as the coverage and the sample size increase, PP2 d converges to the estimator NC 83  (Nei and Chesser 1983)  computed from individual data (see Figure  S1B ).
This argument was used by  Kofler et al. (2011)  to validate their approach, even though the estimates of PP2 d depart from the true value of the parameter (Figure  S1, B  and C ). The second of the two estimators of F ST implemented in PoPoolation2, which we refer to as PP2 a ; is also biased (see Figure  2 ). We note that the bias decreases as the sample size increases. However, the bias does not depend on the coverage (only the variance over independent replicates depends on coverage). The estimator developed by  Ferretti et al. (2013) , which we refer to as FRP 13 ; is also biased (see Figure  2 ). However, the bias does not depend on the pool size or on the coverage (only the variance over independent replicates depends on coverage). FRP 13 converges to the estimator NC 83 ; computed from individual data (see Figure  2 ).
Discussion Whole-genome sequencing of pools of individuals is increasingly popular for population genomic research on both model and nonmodel species  (Schlötterer et al. 2014). The development of dedicated software packages (reviewed in  Fpool ST as a function of pool size and coverage for simulated F ST values ranging from 0. 005 to 0. 2. Each density plot, which represents the RMSE of the estimator Fpool ST , was obtained using simple linear interpolation from a set of 44 3 44 pairs of pool size and coverage values. For each pool size and coverage, 500 replicates of 5000 markers were simulated from an island model with n d ¼ 8 demes. White isolines represent the RMSE of the WC 84 estimator computed from Ind-seq data for various sample sizes (n = 5, 10, 20, and 50). Each isoline was fitted using a thin plate spline regression with smoothing parameter l ¼ 0:005; implemented in the fields package for R  (Nychka et al.
2017). Schlötterer et al. 2014)  undoubtedly has something to do with the breadth of research questions that have been tackled using Pool-seq. However, the analysis of population structure from Pool-seq data are complicated by the double sampling process of genes from the pool and sequence reads from those genes  (Ferretti et al. 2013). The naive approach that consists of computing F ST from read counts as if they were allele counts (e. g. , as in  Chen et al. 2016)  ignores the extra variance brought by the random sampling of reads from the gene pool during Pool-seq experiments. Furthermore, such computation fails to consider the actual number of lineages in the pool (haploid pool size). Altogether, these limits may result in severely biased estimates of differentiation when the pool size is low (see Figure  S3 ).
In a likelihood analysis of the island Figure  4  Precision and accuracy of F ST estimates with varying pool size or varying coverage. Our estimator Fpool ST was calculated from Pool-seq data over all demes and loci and compared to the estimator WC 84 ; computed from Ind-seq data. Each boxplot represents the distribution of multilocus F ST estimates across 50 independent replicates of the ms simulations. We used two migration rates, corresponding to (A and C) F ST ¼ 0:05 and (B and D) F ST ¼ 0:20: (A and B) The pool size was variable across demes, with haploid sample size n drawn independently for each deme from a Gaussian distribution with mean 100 and SD 30; n was rounded up to the nearest integer, with a minimum of 20 and a maximum of 300 haploids per deme. (C and D) The pool size was fixed (n ¼ 100) and the coverage (d i ) was varying across demes and loci, with d i $ PoisðDÞ where D 2 f20; 50; 100g: For Pool-seq data, we show the results for different coverages  (203, 503, and 1003).
This suggests that, with Pool-seq data, another strategy could consist of computing F ST from IIS probabilities between (unobserved) pairs of genes, which requires that unbiased estimates of such quantities are derived from read count data. We have done this in the second section of File S1 and we provide alternative estimators of F ST for Pool-seq data (see Equations A44 and A48 in File S1). These estimators (denoted by Fpool2PID ST and Fpool2PID.
ST ) have exactly the same form as the analysis-of-variance estimator if the pools all have the same size and if the number of reads per pool is constant (Equation A33 in File S1). This echoes the derivations by  Rousset (2007)  for Ind-seq data, who showed that the analysis-of-variance approach  (Weir and Cockerham 1984)  and the simple strategy of estimating IIS probabilities by counting identical pairs of genes provide identical estimates when sample sizes are equal (see Equation A28 in File S1 and also  Cockerham and Weir 1987; Weir 1996; Karlsson et al. 2007). With unbalanced samples, we found that analysis-of-variance estimates have better precision and accuracy than IIS-based estimates, particularly for low levels of differentiation (see ST was computed from Pool-seq data over all demes and loci without error, with sequencing error (occurring at rate m e ¼ 0:001), and with experimental error (e ¼ 0:5).
Comparison with alternative estimators An alternative framework to  Weir and Cockerham's (1984)  analysis-of-variance has been developed by Masatoshi Nei and coworkers to estimate F ST from gene diversities  (Nei 1973 (Nei , 1977 (Nei , 1986;; Nei and Chesser 1983). The estimator PP2 d (see Equation  16 , Equation  17 , and Equation  18 ) implemented in the software package PoPoolation2  (Kofler et al. 2011 ) follows this logic. However, it has long been recognized that both frameworks are fundamentally different in that the analysis-of-variance approach considers both statistical and genetic (or evolutionary) sampling, whereas Nei and coworkers' approach do not  (Weir and Cockerham 1984; Excoffier 2007; Holsinger and Weir 2009). Furthermore, the expectation of Nei and coworkers' estimators depend on the number of sampled populations, with a larger bias for lower numbers of sampled populations  (Goudet 1993; Excoffier 2007; Weir and Goudet 2017).
This is the case because the computation of the total diversity in Equation 18 and Equation 21 includes the comparison of pairs of genes from the same subpopulation, whereas the computation of IIS probabilities between subpopulations do not (see, e. g. ,  Excoffier 2007). Therefore, we do not recommend using the estimator PP2 d implemented in the software package PoPoolation2  (Kofler et al. 2011 ).
2018)  and we have shown here that we can achieve very good precision and accuracy of F ST estimates with smaller pool sizes. Furthermore, because genotypic information is lost during Pool-seq experiments, we assume in our derivations that pools are haploid (and therefore that F IS is nil). Analyzing nonrandom mating populations (e. g. , in selfing species) is therefore problematic. Finally, our model, as in  Weir and Cockerham (1984) , formally assumes that all populations provide independent replicates of some evolutionary process  (Excoffier 2007; Holsinger and Weir 2009). This may be unrealistic in many natural populations, which motivated  Weir and Hill (2002)  to derive a population-specific estimator of F ST for Ind-seq data (see also  Vitalis et al. 2001). Even though the use of  Weir and Hill's (2002)  estimator is still scarce in the literature (but see  Weir et al.
Acknowledgments We thank  Alexandre Dehne-Garcia  for his assistance in using computer farms. We thank two anonymous reviewers for their positive comments and suggestions. Analyses were performed on the  GenoToul bioinformatics platform Toulouse Midi-Pyrénées  (http://bioinfo. genotoul. fr)and the  High Performance Computational platform of the Centre de Biologie pour la Gestion des Populations. This work is part of V. H. 's Ph. D. ; V. H. was supported by a grant from the  Institut National de la Recherche Agronomique's Plant Health and Environment (SPE) Division  and by the  Biodi-vERsA project   EXOTIC  ( ANR-13-EBID-0001 ). Part of this work was supported by the project  SWING  ( ANR-16-CE02-0015 ) of the  French National Research Agency , and by the  CORBAM  project of the  French region Hauts-de-France.
Specifically, the SIS procedure ranks the importance of features according to their magnitude of marginal regression coefficients. To evaluate prediction performance, mean misclassification rates and the area under the curve (AUC) are computed on the 100 test sets for each method. The rates of convergence are also assessed for LS-PCR and those methods based on the PLS algorithm. Simulations and analyses are performed using the R software, version 3. 1. 2. The simulation results are summarized in Fig. 1  and Table  1 , which were produced based on the 100 simulated data sets. They depict the distributions of misclassification rates, AUCs and convergence rates in percent. For this simulation study, the two classes are much less distinguishable by the clinical data than by the gene expression data, which is confirmed in Fig.
Copy number alterations: breast cancer data The second original data set  [10, 24]  contains information on 2173 primary breast tumors, integrating somatic CNAs and long-term clinical follow-up data. Different types of data are merged based on the sample IDs. The data of a total of 1349 primary breast tumors (684 from patients with ER-positive (ER+) status and 221 with ER-negative (ER-) status) are given, including the clinical variables (grade (nominal), tumor stage (ordinal), human epidermal growth factor receptor 2 (HER2) status (binary), tumor size (numeric), progesterone receptor status (binary)) and CNA measurements. The goal here is to predict the ER stratification of a novel breast tumor to select the appropriate treatment for breast cancer. Concerning somatic CNAs, the data set used in this paper is prepared as described in the original manuscript  [24] , yielding 22544 somatic mutations.
The data were downloaded from the TCGA data portal (https://tcga-data. nci. nih. gov/). We report in Fig. 4 , the mean misclassification rates obtained for the most pertinent covariates from the SIS procedure p red for all methods. Here, we have the case where the use of clinical data alone or genomic data alone does not offer good predictors of ER stratification. Indeed, we observe a major gain in misclassification rates when the response variable is predicted using either the LS-PLS or LS-PCR approaches regardless of the value of p red. More specifically, the rates decrease to values between p red =50 and p red =500 and no longer change. The optimal misclassification rate is close to 0. 13 with p red =500. Figure  5  shows a boxplot of the misclassification rates and the AUCs for p red = 500.