dataesr/scientific-paragraphs-categorization huggingface dataset:
These challenges called for a high-throughput approach capable of processing large volumes of data of variable quality in a fast and reproducible way that would be compatible with identification approaches downstream. Additionally, unlike the seemingly increasing complexity of existing workflows  [33] , an uncomplicated and 'minimal, barebones' but fully functional approach that is transparent and easily explainable is critical given the regulatory context. MetFrag, used in this work to support identification efforts, is an example of an open in silico identification approach which satisfies the aforementioned criteria. Released in 2010  [68] , it first retrieves potential candidates with matching mass from compound databases such as PubChem  [23]  (111 million chemical structures, August 2020), ChemSpider  [7, 48]  (103 million chemical structures, February 2021), or smaller biological databases like the Human Metabolome Database  [67] , 20) (114,304 metabolites, February 2021).
These candidates are then scored according to how well the experimental spectrum matches the in silico fragments generated per candidate using a bond dissociation approach  [68] , and subsequently ranked according to this Fragment-erScore (sometimes referred to as the Fragmentation Score or FragScore, or simply the MetFrag Score when it is the only component thereof ). For the identification of environmental "known unknowns", using fragmentation information alone in this way can give mediocre results (e. g. , ~ 22 and 6% of 473 environmentally relevant standards ranked first with ChemSpider and PubChem, respectively  [51] ). This outcome may have various causes: (i) the search databases used are too large and/or do not contain only environmentally relevant compounds, therefore resulting in too many candidates that are not meaningful, and/or (ii) there is simply not enough information to distinguish candidates when considering their fragmentation alone.
To address these limitations, MetFrag was 'relaunched' in 2016 to incorporate further identification strategies beyond fragmentation, such as retention time information, substructure in/exclusion, availability of literature and patent information, presence/absence in suspect lists, and user-defined scoring terms  [51]. Over time, spectral similarity comparison with spectra from the MassBank of North America (MoNA) (Fiehn  [12]  with and without a MetFusion approach  [14]  was also integrated into MetFrag. Since then, two further open-science/environmental chemistry developments have contributed significantly to MetFrag's extended capabilities for identifying environmental unknowns. Firstly, the release and integration of the United States Environmental Protection Agency's CompTox Chemicals Dashboard  [66]  (hereafter, "CompTox") into MetFrag provides a search database of > 850,000 compounds of environmental and toxicological relevance  [54] , while allowing users to leverage the "MS-Ready" concept  [37]  and various forms of chemical metadata availability in CompTox as user-defined scoring terms.
Secondly, critical information from international regulatory bodies can now be exploited through MetFrag towards identifying environmental chemicals. Beyond (i) the US EPA's Chemicals and Products database (CPDat) ([62,  [10]  and other CompTox-related metadata terms that are already integrated via CompTox, MetFrag's user-defined scoring terms can also be configured to incorporate information such as (ii) hazard and exposure from the Swedish Chemicals Agency KEMI  [13] , (iii) European chemicals registration, i. e. REACH  [2] , and (iv) the NORMAN Network's merged suspect list of chemicals of emerging concern known as SusDat (NORMAN  [43]  representing knowledge gathered from NORMAN members, which include > 70 regulatory and academic reference laboratories throughout the world, as well as external contributions.
Used in this way, MetFrag connects disparate resources from various regulatory agencies and academic researchers towards identifying environmental unknowns, practically 'helping researchers and regulators help each other' by providing an interconnected information platform with identification functionality. Since MetFrag's relaunch in 2016, work on the identification of environmental unknowns has used MetFrag's post-relaunch functionality to varying extents. Some research simply uses MetFrag purely for its in silico fragmentation capabilities, i. e. not paired with any compound database  [9, 40, 49]. Many examples use only the Frag-menterScore to rank candidates retrieved from Chem-Spider alone  [3, 31, 35] , PubChem alone  [29, 61, 64] , or a combination of either or both with other databases  [8, 25, 45, 47]  like KEGG  [22] , FOR-IDENT  [30]  and MassBank  [36].
Several studies have begun to use one or more of MetFrag's post-relaunch capabilities such as data source, patent, and/or reference counts for the respective compound database used  [4, 5, 11, 39, 41, 42, 63] , spectral library similarity  [4, 5, 11, 21, 63] , and presence in suspect lists  [5, 28, 41]. Albergamo and colleagues  [1]  were amongst the first to use MetFrag's post-relaunch capabilities heavily, in particular those provided via CompTox and by international regulators and scientists. The present work aimed to exploit "post-relaunch" MetFrag and Open Science developments towards retrospectively identifying non-target environmental pollutants in a regulatory context, as summarised in Fig. 1. Here, pollutants determined to be of regulatory concern by regulators originating from industrial activities found in Swiss wastewater treatment plant (WWTP) effluents were the main subjects of this study, which focused on developing the open in silico workflow to identify them.
Part 3-identification using MetFrag Tentative identification was performed using MetFrag (command line v. 2. 4. 5,  [51, 68] ). CompTox was used as the candidate database in the form of a local. csv file  [54]. R scripts, building on the code bases of ReSOLUTION (v. 0. 1. 8, [55] ) and RChemMass (v. 0. 1. 27, [56] ), were written to accomplish the following steps. First, the neutral monoisotopic mass corresponding to the [M + H] + or [M -H] -adducts indicated by envi-Mass in positive and negative mode, respectively, was calculated. Then, candidates of matching mass with a relative deviation of 5 ppm (selected to reflect the analytical mass error, also known as "Search ppm") were retrieved from CompTox. Subsequently, candidates were fragmented in silico using the following fragmentation settings: Absolute Fragment Peak Match Deviation 0.
Four scoring terms relate to the availability of the chemical's metadata: CPDAT_COUNT  [66]  (number of entries within US EPA's Chemicals and Products database), DATA_SOURCES  [66]  (number of data sources underlying CompTox, which performs similarly to the reference count), KEMIMARKET_HAZ (v. S17. 0. 1. 3, [13] ) (scaled and normalised hazard score calculated by the Swedish Chemicals Agency), and KEMIMARKET_EXPO (v. S17. 0. 1. 3, [13] ) (scaled and normalised exposure score calculated by the Swedish Chemicals Agency KEMI). The remaining three terms account for the candidate's presence or absence in suspect lists, another form of metadata availability: INDACT (Industrial Activity chemicals known to be used near the sampling sites, supplied by the regulator), REACH2017 (v. S32. 0. 1. 3, [2] ) (chemicals registered under the European legislation framework REACH), and NORMANSUSDAT (vS0.
0. 2. 0, NORMAN  [43]  (chemicals in the merged NORMAN Suspect List Exchange). All metadata scoring terms were weighted 1 except for REACH2017 and NORMANSUSDAT, which were both weighted 0. 5 due to the high redundancy across the two databases. To calculate the maximum possible MetFrag Score, all the scoring terms except NORMANSUSDAT, REACH2017, INDACT, and OfflineIndivMoNA are first normalised to their respective largest values among the candidate set and scaled between 0-1. These normalised and scaled values are then summed together with the presence/absence scores of NORMANSUSDAT, REACH2017, and INDACT (0. 5, 0. 5, 1. 0 if present, 0, 0, 0, if absent, respectively), and the similarity score from OfflineIndivMoNA (which is not scaled as it is already defined between 0 and 1). Tentative identifications by MetFrag were communicated using an established system of levels  [57] , reiterated here with study-specific context for clarity: as MetFrag is an in silico method, it generally gives identifications of Level 3 confidence based on evidence for possible chemical structure using MS1, MS2 and experimental data/ context.
In this sense, Metadata scoring terms contribute an extra layer of information beyond spectral evidence towards identifying potentially relevant unknowns. For example, the top four candidates of m/z 249. 0728 (Table  7 ) have comparably poor Spectral scores meaning there is overall little spectral evidence supporting these identifications. However, Candidate 1 distinguishes itself significantly from the other candidates because of its relatively high Metadata scores, in particular its KEMI-MARKET_EXPO, KEMIMARKET_HAZ, and presence in REACH2017. Therefore, it has higher environmental relevance than subsequent candidates, which explains its top ranking. For the top candidates of m/z 152. 0198, practically no metadata exists except for DATA_SOURCES-each candidate has 1, indicating that these are not particularly well-known chemicals (or, potentially newly discovered and not well documented in public databases yet).
In the current work, the mass spectra of the m/z of interest from the given list were subjected to pre-screening and quality control (Fig. 2 ) to ensure their suitability for use in non-target identification. Quality control isolated measurements worthy of further identification efforts and eliminated those of poor standard, effectively resulting in data reduction (Fig. 3 ). The prescreening workflow was written in R and is now openly available within the package Shinyscreen  [24]. Then, MetFrag  [51, 68]  was employed to provide tentative identifications for these unknowns, leveraging its extensive metadata capabilities "post-relaunch", as well as several open resources/information sources, including chemical information from regulators around the world. MetFrag analysis was performed via the command line using scripts based on ReSOLUTION  [55]  and RChem-Mass  [56].
In fact, most data (> 80% cases) were not fully suitable for the intended non-target identification. R scripts (now embedded within Shinyscreen package) were written to automate most of the quality control checks (Table  1 , checks 1-5). Automated quality control allowed for quick and reproducible processing of the large quantity of data needed to answer the superlative research questions guiding this work. The variable quality of the data had several likely causes: (i) List B masses were not in the inclusion list; (ii) MS2 were not measured immediately after MS1, therefore sample degradation over long storage time between MS1 and MS2 measurements could have occurred, and (iii) possibly over-restrictive enviMass prioritisation criteria. Thus, the small number of cases (~ 0. 03% of total) passing all quality control checks and qualifying for MetFrag identification was not unexpected.
MetFrag was configured to comprise both Spectral and Metadata scoring terms, including chemical suspect lists and scoring terms from international regulators within the latter such as KEMIMARKET_EXPO, KEMIMA-RKET_HAZ, REACH2017, NORMANSUSDAT, and CPDAT_COUNT. Paired with CompTox as its candidate database, MetFrag was thus specifically customised to perform non-target identification of environmental unknowns in WWTP samples within a regulatory context in this work. Beyond using fragmentation information alone, using metadata to inform MetFrag's identifications proved to be especially important in certain situations, e. g. , when Spectral scores based on fragmentation were not informative enough to distinguish candidates from each other (Tables  7  and 8 ). Crucially, the information provided by metadata can serve as guidance for future regulatory actions in the context of the environmental protection aims of this study.
Further scoring terms based on physical-chemical properties could be integrated in the future such as correlation of the partitioning coefficient logK ow (or log P) with retention time as already available in Met-Frag  [51]. While such scoring criteria would help filter out any unrealistic candidates based on objective criteria like ionisability and polarity, insufficient information was available to perform retention time correlation via Met-Frag in this study. With respect to the individual terms, CPDAT_COUNT, INDACT, and OfflineIndividualMoNA proved to be relatively uninformative in this particular study, evidenced by their frequent zero-value scores. As a database containing consumer chemical products ranging from those used in home maintenance (paints, sealants, lubricants, cleaners, etc.
), and/or inherently do not end up in wastewater if the compounds themselves are used in closed circuits, are recycled, or partition into sludge if they are very non-polar. Lastly, while mass spectral libraries are inherently incomplete  [44] , a low OfflineIn-dividualMoNA score does not necessarily indicate poor spectral library matches. Rather, low OfflineIndividual-MoNA scores could also signify that the candidate is not present within MoNA to begin with, or result from noisy experimental spectra even if the match would otherwise be good. Therefore, evaluating candidates on this scoring term alone must be done with these factors in mind, and improvements to its design to avoid possible faulty interpretations could constitute future work. Other future work on MetFrag itself could involve the addition of new Spectral scoring terms which do not require scaling via normalisation of the maximum value, as this maximum value is highly dependent on the candidate database chosen.
For instance, a simple spectral similarity metric such as cosine similarity would evaluate how well the in silico and experimental fragmentation spectra align, independent of those of other candidates. CompTox, the candidate database chosen here, remains one of the most environmentally-focused open databases of chemical compounds as it exclusively contains chemicals of environmental and toxicological relevance. Compared to other open databases like PubChem (111 million chemical structures, August 2020), CompTox is also smaller in size (883,000 chemicals, February 2021). Therefore, MetFrag paired with CompTox is likely to suggest smaller lists of candidates which are de facto environmentally-meaningful, making workflow runtimes shorter and candidate evaluation relatively easier. However, using CompTox has drawbacks, principally stemming from its lack of comprehensiveness when compared to PubChem.
In some cases, there may be a lack of candidates matching the identification criteria when using CompTox with MetFrag simply because they may not exist within CompTox itself to begin with due to its limited size and scope. PubChemLite  [55, 56, 58]  represents one complementary alternative to these issues, as it is by design essentially a subset of environmentally relevant compounds based on compound classifications. Overall, the ability to subset databases based on usage and classification information of chemicals can be beneficial, as different regulatory bodies may have different mandates, and studies can be designed to align with those mandates accordingly, e. g. , focus only on chemicals with (i) known usage in industrial manufacturing, or (ii) agricultural chemicals, or (iii) pharmaceuticals, etc.
Two concrete follow-up initiatives are foreseen: (i) build an interface connecting Shinyscreen and MetFrag, including automated reporting features as previously described, and (ii) develop a set of 'default' scoring terms and settings tailored for NTA of wastewater samples. Further collaborations involving non-target wastewater studies and database hosts will help augment expert knowledge on more use cases, which would be leveraged to develop this approach further. On a community level, standardisation would play a role in increasing the feasibility of NTA as part of routine regulatory environmental monitoring. As previously mentioned, there exist considerable, albeit nascent, efforts towards standardising analytical protocols for non-target screening on a national level in, e. g. , Germany in the form of guidelines  [52].
Through these analyses, specific candidates were recommended for further identification efforts, and transparent justifications were provided based on the MetFrag score breakdown (i. e. , spectral vs. metadata evidence). These recommendations, and not just MetFrag's outputs, represent the final results in the regulatory and environmental monitoring context of this study, and may serve as a template to drive future developments in NTA. The prescreening and quality control workflow developed here is embedded in the open R package Shinyscreen  [24] , which is freely available online, as is code from ReSOLUTION  [55]  and RChemMass  [56]  used for performing command-line MetFrag identification. The CompTox database version with the metadata terms used here is likewise also publicly available  [54].
Availability of data and materials The mass spectrometry dataset generated and analysed during the current study, including the complete MetFrag results for the 22 m/z that were tentatively identified, are available as an open MassIVE dataset (MSV000086631) via https:// massi ve. ucsd. edu/ Prote oSAFe/ datas et. jsp? task= 14f51 e6ec9 9a423 29e7a 0eeaa d0e58 24. Software Project name: Shinyscreen. Project home page: https:// git-r3lab. uni. lu/ eci/ shiny screen. Archived version used in this study: Shinyscreen v. 0. 1. 1-paper (https:// git-r3lab. uni. lu/ eci/ shiny scree n/-/ tree/v. 0. 1. 1-paper). Operating system(s): Windows, Mac OSX, Linux. Programming language: R Other requirements: OpenJDK and other R package dependencies listed in Shinyscreen's README. License: Apache Version 2.
Code availability All codes used to run the prescreening and quality control workflow and Met-Frag command-line analysis is open/publicly available via https:// github. com/ schym ane/ ReSOL UTION, https:// github. com/ schym ane/ RChem Mass, and Shinyscreen (see below). All other datasets and databases used as part of Met-Frag identification are open/publicly available (links available in References).
Evolutionary history and origins of tarpan horses Our analyses elucidate the geographic, temporal and biological origins of DOM2 horses. This study features a diverse ancient horse genome dataset, revealing the presence of deep mitochondrial and/ or Y-chromosomal haplotypes in non-DOM2 horses (Supplementary Fig  1 ). This suggests that yet-unsampled divergent populations contributed to forming several lineages excluding DOM2. This was especially true in the Iberian group (IBE), where the expected genetic distance to the donkey was reduced (Extended Data Fig. 5f ), but also in NEO-ANA according to OrientAGraph modelling (Fig  3b ). Disentangling exact divergence and ancestry contributions of such unsampled lineages is difficult with the currently available data. It can, however, be stressed that Iberia and Anatolia represent two well-known refugia  33  , where populations could have survived and mixed during Ice Ages.
The Y-chromosome Bayesian skyline plot was obtained following the same procedure as above. Maximum-likelihood trees and Bayesian skyline plots are shown in Supplementary Fig  1  and Extended Data Fig. 3e , f, respectively. The presence of alleles associated with or causative for a diversity of coat colouration changes was investigated using individual BAM read alignments. For a total of 43 genomic locations representing biallelic SNPs, we simply counted the proportion of reads supporting the associated or causative allele. Results were summarized in the heat map shown in Extended Data Fig. 8 , with respect to the sample ordering displayed in the neighbour-joining phylogenetic reconstruction, and limited to those 13 loci that were polymorphic in our horse panel for clarity.
Neighbour-joining phylogeny, genetic continuity and population modelling Phylogenetic affinities were first estimated by performing a BioNJ tree reconstruction with FastME 73 (version 2. 1. 4), based on the pairwise matrix of genetic distances inferred from the bed2diffs_v1 program  16. Node supports were assessed using a total of 100 bootstrap pseudo-replicates. The 'goodness-of-fit' of the neighbour-joining tree to the data was evaluated by comparing the patristic distances and raw pairwise distances. Patristic distances were obtained from the ape  74  R package (version 5. 5) and their ratios to raw pairwise distances were averaged for each given individual (Fig  1c ). Averaged ratios equal to one support perfect phylogenetic placement for the specimen considered. Genetic continuity between each individual specimen predating about 2200 bc and DOM2 horses was tested following the methodology from Schraiber  75  , which implements a likelihood-ratio test to compare the statistical support for placing DOM2 and the ancient specimen in a direct line of ancestry or as two sister groups.
0), in which one particular (group of) individual(s) is modelled as a linear, additive combination of candidate population sources ('left' populations). We followed the rotating strategy recommended by Harney and colleagues  18  to assess all possible combinations of two, three and four donors ('left') selected from a total of 18 populations. The remaining 14, 15 and 16 populations were used as reference ('right') populations (Supplementary Table  3 ). We selected a total of nine horse lineages representing the main phylogenetic clusters, and carrying genetic ancestry profiles representative of the complete dataset, to model the population evolutionary history using OrientAGraph  19  (version 1. 0). By implementing a network orientation subroutine that enables throughout exploration of the graph space, OrientAGraph constitutes a marked advancement in the automated inference of admixture graphs.
Struct-f4, ancestry components and multi-dimensional scaling We extended the Struct-f4 package so as to assess individual genetic affinities within a panel of genomes, and to decompose them into K genetic ancestries. Struct-f4, thus, achieves similar objectives to other clustering methods, such as ADMIXTURE  77  and Ohana  78  , but does not assume Hardy-Weinberg equilibrium. The latter assumption is known to cause misinterpretation of highly drifted samples as ancestral homogeneous groups instead of highly derived mixtures from multiple populations, as thoroughly described elsewhere  79. To circumvent this, Struct-f4 relies on the calculation of the widely used f 4 statistics, which were originally devised not only to test for admixture, but also to quantify the drift between the internal nodes of a population tree.
Spatial pie-chart projection was carried out using the draw. pie R function from the mapplots package 81 (version 1. 5. 1). The size of each individual pie-chart was commensurate with the number of samples excavated at a given geographic location, provided that the number of samples was lower than 10, while set to a constant maximum radius otherwise. Partial Mantel tests measuring the correlation between geographic and genomic distances over time were carried out using the ncf R package 82 (version 1. 2. 9). This test corrected for the time variation present within each window, similar to the approach described by Loog and colleagues  83. Haversine geographic distances between pairs of ancient samples were computed using the geosphere package (version 1. 5. 10) in R  84  , from the corresponding longitude and latitude coordinates, while radiocarbon date ages were considered as point estimates (Supplementary Table  1 ).