dataesr/scientific-paragraphs-categorization huggingface dataset:
Structural fragments The PDB file input, obtained from the worldwide Protein Data Bank (wwPDB) (http://www. wwpdb. org/) [42, 43] , contains the atomic coordinates describing the 3D structure of the protein. Since the original observation (3D structures from PDB files) is highly complex, we start by reducing this complexity to a sequence of numeric descriptors as in the original HMM-SA publications  [2, 3]. Starting from the 3D positions of the alpha carbons (denoted a C α ), "fragment" is a succession of four consecutive C α and we use the four descriptors in Fig 1. Formally, for the i th fragment we have: X 1 i ¼ DðC a i ; C a iþ2 Þ, X 2 i ¼ DðC a i ; C a iþ3 Þ, X 3 i ¼ DðC a iþ1 ; C a iþ3 Þ, and X 4 i ¼ ZDðC a iþ3 ; HÞ where D is the Euclidian distance, H is the orthogonal projection of C a iþ3 on the plane ðC a i ; C a iþ1 ; C a iþ2 Þ, and where η = +1 (resp.
SAFlex structural alphabet implementation An SAFlex preliminary web server including dynamic pages (php/javascript/html/css) is made freely available to the scientific community. The backend was developed in C++ language as a high performance encoding program. All computations (evidence, forward, backward and posterior marginal) are performed in logarithmic scale and thus allow for low probabilities. The SAFlex server is able to complete encoding and indication of data uncertainties in less than one second (in most cases). The SAFlex web server has been successfully tested in the latest version of Chrome, Firefox and Safari. SAFlex is available at the following URL http:// saflex. rpbs. univ-paris-diderot. fr/SA-Encoder. php.
The optimal structural alphabet model was selected by comparing structural alphabets of different number of SL using the Bayesian Information Criterion, which balances the log-likelihood of the model and a penalty term related to the number of parameters of the model and the sample size. HMM-SA results in m = 27 SL: four SL specific to helices, five SL specific to strands and the remaining 18 SL that describe loops  [15]. SAFlex corresponds to 27 HMM-SA SL but in order to improve the interpretability of the 27 SL, a novel nomenclature is applied in SAFlex. This structural letter assignment now depends on the secondary structure type, as identified using the STRIDE software  [53]  in  [3]. Hence, we use only three letters ('A','B','C') which refer to the class of SL (Helices, Strands or Coils respectively) as indicated in Table  1.
When all four descriptors are unavailable, the position is totally uninformative (local likelihood of 1. 0 for all SL) but the context of the position is still accounted thanks to the Markov dependence of the model through the transition matrix. In order to quantify the number of SL mismatches induced by the presence of missing residues in the chain in the case of MAP encoding, we designed the following numerical experiment. First, we selected a total of 39 PDB chains (The 39 PDB ids: 1XMK 1MZ9 1QSA 3IIS 1GXM 4K12 4HI8 4DEQ 1UUN 4GV5 2AYD 2O9S 2EVB 3WJT 2E5Y 4A02 3NBC 2DPF 1VMO 3DCL 3C7X 1TL2 1PJX 2XDW 1W6S 1M8N 4E2V 1IGD 1EWF 4BEU 1VBM 2HBA 1A9X 1DL5 1HQ0 1UD9 2CI1 1J0P 1V54 ) with no missing residue and representative of the variability of available structures in terms of secondary structure types.
Multi-chains In recent decades, many protein complex structures containing multiple chains have been determined: homomers, heteromers or different PDB files corresponding to the same protein in different conditions. If heteromers are naturally encoded as different structural sequences, homomers can be considered as replicates of the same underlying structure. SAFlex proposes to encode homomers either as independent structures (one structural sequence per chain) or as a single consensus one, where a single hidden structural sequence is shared by all homomeric chains. The resulting consensus encoding hence represents the variability of the homomer across the chains. This variability is either due to measurement uncertainty or to intrinsic flexibility. One illustration is presented on the small Heat Shock Proteins (sHSPs), which are important in stress tolerance and play an essential role in preventing aggregation of target proteins  [60].
They participate in protecting, maintaining and regulating specific protein functions. The PDB entry 1gme corresponds to HSP16. 9, a member of the sHSPs, that assembles into a dodecameric double disk. In the PDB file, an available tetramer can be used to reconstruct the dodecamer by symmetry operations  [61]. The monomer's residue length is 151 which gives 148 overlapping structural fragments. The four monomers have a global common structure, called the alpha crystallin domain signature  [60]  but have differences in some regions: the 42 N-terminal residues are missing in the two monomers B and D, whereas the Nterminal arm in A and C monomers is fully resolved and composed of helices connected by random coils. In Fig  9 , we can see the values of NEFF for the four chains (upper panel) and for the consensus encoding (lower panel).
This article describes the implementation of real-space refinement in the phenix. real_space_refine program from the PHENIX suite. The use of a simplified refinement target function enables very fast calculation, which in turn makes it possible to identify optimal data-restraint weights as part of routine refinements with little runtime cost. Refinement of atomic models against lowresolution data benefits from the inclusion of as much additional information as is available. In addition to standard restraints on covalent geometry, phenix. real_space_refine makes use of extra information such as secondarystructure and rotamer-specific restraints, as well as restraints or constraints on internal molecular symmetry. The re-refinement of 385 cryo-EM-derived models available in the Protein Data Bank at resolutions of 6 A ˚or better shows significant improvement of the models and of the fit of these models to the target maps.
Introduction Improvements in the cryo-electron microscopy (cryo-EM) technique have led to a rapid increase in the number of highresolution three-dimensional reconstructions that can be interpreted with atomic models (Fig. 1 ). This has prompted a number of new developments in PHENIX  (Adams et al. , 2010)  to support the method, from model building  (Terwilliger, Adams et al. , 2018) , map improvement  (Terwilliger, Sobolev et al. , 2018)  and refinement  (Afonine et al. , 2013)  to model validation  (Afonine et al. , 2018). In this manuscript, we focus on atomic model refinement using a map (primarily cryo-EM, but the same algorithms and software are also applicable to crystallographic maps). Model refinement is an optimization problem and as such it requires the definition of three entities (for reviews, see  Tronrud, 2004; Watkin, 2008; Afonine et al.
, 2002). For this reason RSR has been particularly popular in the context of interactive model-building software such as FRODO, O  (Jones, 1978; Jones et al. , 1991) , MAIN  (Turk, 2013)  and Coot  (Emsley & Cowtan, 2004; Emsley et al. , 2010). In the case of cryo-EM an atomic model can also be refined using a reciprocal-space target. This can be achieved by converting the map into Fourier coefficients. These Fourier coefficients can then be used in reciprocal-space refinement using standard refinement protocols that are well established for crystallographic structure refinement (see, for example,  Cheng et al. , 2011; Baker et al. , 2013; Brown et al. , 2015). We note, however, that unless the map is converted to the full corresponding set of Fourier coefficients (and not a subset containing only a sphere limited to the stated resolution) this conversion may not be lossless.
To address the emerging structure-refinement needs of the rapidly growing field of cryo-EM, the phenix. real_space_refine program  (Afonine et al. , 2013) , which is capable of the refinement of atomic models against maps, has been introduced into the PHENIX suite. It is not limited to cryo-EM and can also be used in crystallographic refinement (X-ray, electron or neutron). In this paper, we describe the implementation of the phenix. real_space_refine program and demonstrate its performance by applications to simulated data and to cryo-EM models in the PDB  (Bernstein et al. , 1977; Berman et al. , 2000)  and corresponding maps in the EMDB  (Henrick et al. , 2003). This is a work in progress, and further details and advances will be reported as the program evolves. To date, phenix. real_space_refine has been used in a number of documented structural studies (see, for example,  Fischer et al.
Refinement flowchart Fig. 2  shows the model-refinement flowchart as it is implemented in phenix. real_space_refine. This is very similar to the reciprocal-space refinement workflow implemented in phenix. refine (see Fig. 1  in  Afonine et al. , 2012). The program begins by reading a model file, in PDB or mmCIF format, map data (as an actual map in MRC/CCP4 format or as Fourier map coefficients in MTZ format) and other parameters, such as resolution (if a map is provided) or additional restraint definitions for novel ligands, internal molecular symmetry (e. g. NCS in crystallography) or secondary structure. Once inputs have been read, the program proceeds to calculations that constitute a set of tasks repeated multiple times (macro-cycles). Tasks to be performed during the refinement are defined by the program automatically and/ or by the user.
The methods and tools to evaluate the geometric quality of a model are the same in crystallography and in cryo-EM. For example, the PHENIX comprehensive validation program provides an extensive report on model quality, making extensive use of the MolProbity validation algorithms  (Chen et al. , 2010; Richardson et al. , 2018). In crystallography, the model-to-data fit is quantified by crystallographic R and R free (Bru ¨nger, 1992) factors, which are global reciprocal-space metrics. In cryo-EM, model and data validation is currently performed by the comparison of complex Fourier coefficients in resolution shells; these coefficients are calculated from the model and from the full map or half-maps; different masks can be applied prior to calculation of these coefficients. Also in real space the model-to-data fit can be evaluated locally or globally by various correlation coefficients between a modelcalculated map and the experimentally derived map  (Urzhumtsev et al.
Test refinements with simulated data Below, we illustrate the performance of refinement at different resolutions and map sharpnesses and using atomic models with various amounts of error in the coordinates. All refinements were performed using refinement target (1) with geometry restraints included with optimal weights and data term (7). We begin with several numerical tests using simulated data. The advantage of such tests is that one can study individual effects in a setting where the answer is known. 3. 1. 1. Preparing simulated data. A model from the PDB (PDB entry 3vb1) was chosen as a test model. The following manipulations were made to this model prior to test calculations: (i) the model was placed in a sufficiently large P1 unit cell, (ii) alternative conformations were replaced with a single conformation and (iii) model geometry was regularized using the phenix.
Default parameters were used in all refinements that, in addition to standard restraints, also include rotamer, C deviations and Ramachandran plot restraints, as well as NCS constraints where applicable (see x2. 2. 2). The program ran successfully, generating a refined model for all cases and highlighting the robustness of the algorithms and their implementation. In all cases we observe a substantial overall improvement of geometry metrics, such as reduced or fully eliminated Ramachandran plot and rotamer outliers, C deviations and MolProbity clashscore, as well as improvement of the model-to-data (map) fit (Fig. 6 ). Clearly, the removal of some outliers can be attributed to the use of rotamer, C deviations and Ramachandran plot restraints. Therefore, we also used an orthogonal validation metric to assess model improvement: EMRinger  (Barad et al.
The refined models fit slightly but systematically better when using sharpened maps if the original model-map CC is low (<0. 5) and systematically slightly worse if the original model-map correlation is higher (CC > 0. 5). This agrees with the observation that target (7) allows the removal of large errors but may slightly distort exact models (x3. 1. 2). Also, we note that the MolProbity scores for models refined against sharpened maps are systematically better, but the difference is small. 3. 2. 4. Re-refinement of the TRPV1 structure. The structure of the TRPV1 ion channel (PDB entry 3j5p; EMDB code EMD-5778) was determined by single-particle cryo-EM  (Liao et al. , 2013)  at a resolution of 3. 28 A ˚. The model was built manually and was not subjected to refinement. As the model was not refined it contains substantial geometry violations: the clashscore is high ($100) and about one third of the side chains are identified as rotamer outliers (Table  1 ).
More recently, the better resolved part of this structure has been re-evaluated using the same data  (Barad et al. , 2015 ; PDB entry 3j9j; ankyrin domain not included). This involved some rebuilding and refinement using algorithms implemented in the Rosetta suite  (DiMaio et al. , 2015). The resulting model has a much improved clashscore and EMRinger score  (Barad et al. , 2015)  and no rotamer outliers, yet the number of Ramachandran plot outliers has increased compared with the original model (Table  1 ). We performed a refinement of PDB entry 3j5p (the portion that matches PDB entry 3j9j) using phenix. real_space_refine with all default settings and automatically, with no manual intervention, using the original, deposited map. The refinement took about 3 min on a Macintosh laptop. 3 Overall, the refined model is similar to PDB entry 3j9j (virtually no rotamer or Ramachandran plot outliers), the EMRinger score is improved further and the model-to-map correlation (CC mask ) is increased compared with both PDB entries 3j5p and 3j9j.
Funding information This work was supported by the  NIH  (grant  GM063210  to PDA, RJR and TT) and the  PHENIX Industrial Consortium. This work was supported in part by the  US Department of Energy  under Contract No. DE-AC02-05CH11231. AU acknowledges the support and the use of resources of the  French Infrastructure for Integrated Structural Biology FRISBI   ANR-10-INBS-05  and of Instruct-ERIC. RJR is supported by a  Principal Research Fellowship  funded by the  Wellcome Trust  (Grant  082961/ Z/07/Z ).
More precisely, the demographic history of populations is represented as a multifurcating tree, and the ESR is inferred for each branch of that tree. Our approach makes full use of the information contained in genome-wide SNP data and can be applied to a wide range of model and non-model species, i. e. it does not require a detailed and reliable linkage map. Instead of relying on summary statistics (as in  [19, 21, 22, 30] ), we explicitly model the change in allele frequencies along each branch of the population tree, using Kimura's time-dependent diffusion approximation  [31]. Our method is an extension to the model by Gautier and Vitalis  [32] , taking advantage of the joint analysis of autosomal and X-linked allele frequency data. The motivation behind our study is threefold: (i) to improve the original model to yield unbiased estimates of the branch lengths, particularly for internal branches; (ii) to extend the model and provide estimates of branch lengths for both autosomal and X-linked data, and therefore to infer the ESR; and (iii) to evaluate our method through simulations and provide real data application examples from cattle and human.
Model The starting point for our model is detailed in Gautier and Vitalis  [32] , and implemented in the software package KIMTREE. In short, KIMTREE is a hierarchical Bayesian model, where the allele frequencies are modeled along each branch of a population tree that needs to be specified a priori, using Kimura's time-dependent diffusion approximation for genetic drift  [31]. Consider a sample of I populations sharing a common history, represented as a tree. Each population has a label, i, which varies from 1 to I for the sampled populations, and from I + 1 to r for the internal nodes of the tree, where r represents the population at the root of the tree (i. e. , the most ancestral population in the tree). In the following, we denote a(i) as the ancestral population of population i. The data consist of J bi-allelic SNPs.
In the present study, the model has been improved in several directions. First, we extended KIMTREE to estimate the hyper-parameters of the Beta(α, β) prior for allele frequencies in the root population. Estimating the hyper-parameters of the beta distribution allows for a more flexible allele frequency distribution at the root, potentially shifting the total age of the tree. Following Gautier  [34] , we re-parameterized the beta distribution using hyper parameters μ α/(α + β) and ν (α + β). We assumed a uniform prior for μ with support from 0 to 1 and an exponential prior for ν, i. e. m $ Uð0; 1Þ and ν * exp(1. 0), respectively. Second, we extended the model to account for the fact that the dataset consists, by construction, of polymorphic sites only. In SNP datasets, indeed, sites that are fixed across the entire sample have been filtered out.
Evaluation of the model In a preliminary evaluation, we confirmed that the improved KIMTREE model resulted in accurate estimates of external and internal branch lengths (see S1 Text, and S2-S5 Figs). Since the true population history is generally unknown, we investigated the power of the deviance information criterion (DIC)  [35]  to choose between alternative histories. To that end, we simulated 50 datasets using ms  [36]  for a three-population history with topology ((1,2),3). We then analyzed each of these datasets, conditionally on four alternative topologies. As in Gautier and Vitalis  [32] , we found that the DIC provides a clear support in favor of the true (simulated) population history (S6 Fig). We further found that, whatever the topology, the DIC supports the model where the likelihood is conditioned on SNP polymorphism (S6 Fig).
Then, we evaluated the performance of our model to infer the branch-specific ESR in a population tree, using simulated datasets. First, we simulated scenarios complying to the model assumptions, with constant population sizes along each branch and no migration between branches. Since the KIMTREE model assumes that all polymorphisms are ancestral (an assumption which is not made in the simulations), we defined a large population size for the root population (made of 50,000 males and 50,000 females). Fig  2  shows the distributions of posterior means of branch-specific ESR, in a population tree with topology ((1,2),3), where some branches have been simulated with ξ 6 ¼ 0. 5. Note that an evaluation of these datasets based on wrong topologies provided consistent results for the terminal branches (see S7 Fig) Population growth, bottlenecks, and migration.
As depicted in (A), branch 1 was made of N f e = 1,000 females and N m e ¼ 9; 000 males (ξ 1 = 0. 1); branch 2 was made of N f e ¼ 2; 000 females and N m e ¼ 8; 000 males (ξ 2 = 0. 2); branch 3 was made of N f e ¼ 9; 000 females and N m e ¼ 1; 000 males (ξ 3 = 0. 9); branch 4 was made of N f e ¼ 8; 000 females and N m e ¼ 2; 000 males (ξ 4 = 0. 8). The two successive splits occurred 1,000 and 3,000 generations before present time. The mutation rate was fixed at μ = 1. 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    , 4 )), as depicted in the inset tree (top). In all scenarios, the root population was made of 50,000 males and 50,000 females, and the internal branches correspond to populations made of 5,000 males and 5,000 females.
The two successive splits occurred 2,000 and 4,000 generations before present time. The mutation rate was fixed at μ = 1. 5 × 10 -7. 50 females per population were sampled for each dataset. In (A) the four external branches were made of N f e ¼ 5; 000 females and N m e ¼ 5; 000 males, and so a balanced ESR (ξ i = 0. 5) was assumed throughout the tree ("control" scenario). In (B), we simulated an instantaneous 5-fold population growth in branch 1 and an instantaneous 5-fold bottleneck in branch 4, both events having occurred 400 generations before present. In (C), we simulated migration between population 1 and 2, with equal rates for both sexes: neighboring SNPs (linkage disequilibrium, LD) is not accounted for in KIMTREE. Furthermore, the extent of LD is expected to differ between autosomes and the X chromosome, because of the difference in effective size and the absence of recombination in males for the latter  [26, 40].
We therefore tested the precision and accuracy of ESR estimates based on the analysis of linked SNPs. We found that, as expected, increasing LD between SNPs decreased the precision (but not the accuracy) of ESR estimates, which might be interpreted as the consequence of the smaller number of effectively independent markers in the data (S10 Fig). Under realistic conditions (see the "whole-genome" case in S10 Fig), however, the model was robust to LD and only slightly less precise than with truly unlinked markers. m f = m m = 0. 00025 (therefore 4N f e m f ¼ 4N m e m m ¼ 5 Ascertainment bias. We also tested the effects of ascertaining SNPs from individuals not included in the sample (discovery panel), which may mimic datasets obtained from genotyping arrays (see Materials and methods section).
It should be noted that, although some individuals from African taurine populations (including NDA) were included in the discovery panel of the genotyping assay, they are under-represented compared to individuals from European origin. However, as we have previously shown (see S11 Fig), ascertainment bias is not expected to cause biased estimates of the ESR, even in the most extreme scheme, where outer branches of the population tree are not represented in the discovery panel (see S11G-S11I Fig). In such schemes, branch length estimates of the internal branch leading to the populations represented in the panel were vanishingly small (see S11G and S11H Fig). This is not what we observe from the data (see  Fig 5). Human data (HapMap). We re-analyzed the dataset from Keinan et al. [19, 42] , with genotypes from European American individuals from Utah, USA (CEU), Asian individuals grouping Han Chinese from Beijing and Japanese from Tokyo (ASN) and Yoruba individuals from Ibadan, Nigeria (YRI) (see the Materials and methods section).
5; in Oceania, we found a large support for a strongly male-biased ESR (see Fig  7B ). Since the Oceanian sample consisted of only six males, we analyzed simulated datasets mimicking these human data, using the same topology, sample sizes, and estimated autosomal branch lengths, but assuming a balanced ESR in all branches. We found no support for a deviation of the ESR from 0. 5, that would have been caused by a small sample size in the Oceania-like branch (S14 Fig).
Recently, Tataru et al. [46]  evaluated the accuracy of Kimura's time-dependent diffusion We re-analyzed a subset of the whole-genome sequence data from Pagani et al. [33] , with populations from NW-Europe (NWE), SE-Asia (SEA), Oceania (OCE) and Americas (AME) (see the Materials and methods section for a detailed composition of populations). For both genetic systems, we randomly subsampled 50 pseudo-replicated datasets from the full data, each made of 5,000 autosomal SNPs and 5,000 Xlinked SNPs. We ran KIMTREE considering the best fitting tree topology (NWE,SEA,OCE,AME) (see the Materials and methods section), represented in (A) with branch lengths estimates corresponding to the posterior means of t ðAÞ approximation for genetic drift, relatively to alternative models like the Gaussian (used in, e.