dataesr/scientific-paragraphs-categorization huggingface dataset:
We then calculated the empirical null distribution for the rate of false positive discovery by permuting male and female assignments randomly across the sample set 1000 times, each time screening for sex-linked markers with all three approaches. We retained only sex-linked marker sets where the number found using the real sex assignments fell outside of the 99th percentile of the null distribution, i. e. had a probability of <0. 01 of occurring by chance. We also used this permutation approach to identify which dataset properties were the most important predictors of the number of sex-linked markers or false positives found. To do this, we extracted various subsamples from the already published RADseq dataset from R. arvalis  81. We chose this dataset for several reasons: first, the sex-linked markers in this dataset (identified using the same three approaches as used here) have been validated via the use of PCR.
Second, the original sample size (29 males and 19 females) was large enough to allow for several rounds of downsampling. And third, exploratory PCA clustering of individuals using only the sex-linked markers shows evidence for two major Y haplotypes present among males (referred to here as Hap 1 and Hap 2). This dataset therefore allowed us to test four potential predictors for the success of sex-linkage screens: (1) the effect of overall sample size (via a series of subsamples from 19 males (M), 19 females (F) down to 5 M, 5 F), (2) a skew in sample size towards males (18 M, 9 F), (3) a skew towards females (9 M, 18 F), and (4) the effect of having multiple sex-chromosome haplotypes in the same dataset (6M Hap1 , 6M Hap2 , 12 F). The latter factor has not previously been considered when assessing the stringency of screens for sex-linked markers.
Thus, it was also necessary to calculate the expected false-positive mapping rate, per dataset and per R. temporaria chromosome. To do this, we first mapped the putative sex-linked markers for a given dataset to the ordered R. temporaria scaffolds. We then took 1000 random subsamples of RADtags from the Stacks catalogue of loci for that dataset, with each subsample being of the same size as the set of sex-linked markers. Each subsample was mapped to the chromosome-assigned R. temporaria scaffolds to give a distribution of the expected mapping rate for each chromosome. For final sex-chromosome identification, we required at least ten sex-linked markers to align to a single chromosome and the number of sex-linked marker alignments to fall outside of the 99th percentile of the random marker alignment distribution for that chromosome.
Assessing patterns of sex-chromosome turnover. In order to test whether sexchromosome recruitment was random, or if some chromosomes are more likely to be recruited, it was necessary to place all sex-chromosome identities onto a phylogenetic tree. A phylogeny was therefore produced using a combination of data from two previous phylogenetic studies  44, 45. We used all ten loci in ref. 44  , which included four mitochondrial genes (12S, 16S, cytb and nd2) and six nuclear genes (rag1, rag2, bdnf, slc83a3, tyr and pomc). Of the 28 species in our study, 22 were included in ref. 44. For the remaining six (R. italica, P. lessonae, P. perezi, P. porosus, G. rugosa and P. saharicus), we used data for 12S, 16S and cytb from ref. 45. Genbank accession numbers for all sequences used can be found in Supplementary Table  4.
Trees were calculated using MCMC chain lengths of 100 M, with sampling every 10,000 iterations, ensuring that the effective sample size (ESS) of each parameter in the model was above 200. Using this phylogenetic framework, we inferred ancestral states using a stochastic mapping approach, implemented in the R package Phytools v0. 6-44  94. The best model for transition rates between these states was identified by comparing the likelihood scores (using Akaike Information Criterion (AIC)) for three different transition rate models, equal rates (ER), symmetrical (SYM), all rates different (ARD). To reduce noise and increase the power of this analysis, we assumed that only the five chromosomes that had been confidently identified as a sex chromosome in at least one of our species could determine sex; thus we considered five possible states in the reconstruction.
As our RADseq data provided multiple sets of sex-linked RADtags, we took the opportunity to examine their distribution along the sex chromosome, in the hope of elucidating the drivers of sex-chromosome turnovers among these species. Recombination occurs much less frequently in male frog meiosis, and because Y chromosomes are almost always found only in males, we hypothesized that, instead of the Y chromosome diverging from the X only at a small non-recombining region around a sex-determining, or sex-antagonistic genes, the frog Y chromosomes would diverge from the X across almost their entire length, except for the tips of chromosomes where recombination is known to occur  41. To test for this expected pattern of divergence between gametologs, we first produced an additional linkage map in which we combined female-informative markers from all six Rana temporaria families into a single map using Lep-Map3 95 (see 'Linkage mapping' in Supplementary Note 4).
Acknowledgements We thank  E. A. Luna ,  J. Leuenberger ,  A. Athanasiades ,  J. Buser ,  A. D. King ,  A. H. McCall ,  S. J. Sferra ,  M. Biaggini ,  G. Sánchez-Montes  and  Dario Dominighetti  for their help with collection and processing of samples. We also thank  Philippe Geniez  and the collection B. E. V. of the C. N. R. S. for the P. saharicus samples,  Nicolas Salamin  for advice on phylogenetic analyses and  Barret Phillips  for comments on the manuscript. This work was primarily funded by two grants ( 31003A_166323 & CRSII3_147625 ) awarded by the  Swiss National Science Foundation  to N. P. All computations were performed at the  Vital-IT  (http:// www. vital-it. ch)Center for high-performance computing of the  SIB Swiss Institute of Bioinformatics.
Data availability All sequencing data used in this study can be found (demultiplexed by sample) on the NCBI Sequence Read Archive under the Bioproject accession PRJNA478189. Stacks intermediate files for each species, linkage maps and alignment and tree files for the phylogeny can be found on Figshare (http://dx. doi. org/10. 6084/m9. figshare. 6949331) along with fasta files containing putatively sex-linked markers where identified.
Slanted text has been demonstrated to be a salient feature of handwriting. Its estimation is a necessary preprocessing task in many document image processing systems in order to improve the required training. This paper describes and evaluates a new technique for removing the slant from historical document pages that avoids the segmentation procedure into text lines and words. The proposed technique first relies on slant angle detection from an accurate selection of fragments. Then, a slant removal technique is applied. However, the presented slant removal technique may be combined with any other slant detection algorithm. Experimental results are provided for four document image databases: two historical document databases, the TrigraphSlant database (the only database dedicated to slant removal), and a printed database in order to check the precision of the proposed technique.
The technique described in  [9]  is also used in that paper where extensive experiments over slant are performed. Last but not least, in the specific experiments, the pages were sheared entirely, since the alternative line or word segmentation is characterized as "less reliable and breaks ink traces at region boundaries"  [3]. The proposed techniques up to now require line or word segmentation in order to be applied. In Figure  1 , an example of the slant removal algorithm described in  [9] , is presented. The image is from the IAM Handwriting Database (IAM-DB), and the application of the algorithm requires image segmentation into text lines (Figure  1 , horizontal stripes). For this example, text line segmentation could succeed since text lines are spaced enough. It is not the case for the document image shown in Figure  2  (17th century) which includes touching ascenders and descenders and noise in the inter-line space.
The proposed techniques up to now require line or word segmentation in order to be applied. In Figure  1 , an example of the slant removal algorithm described in  [9] , is presented. The image is from the IAM Handwriting Database (IAM-DB), and the application of the algorithm requires image segmentation into text lines (Figure  1 , horizontal stripes). For this example, text line segmentation could succeed since text lines are spaced enough. It is not the case for the document image shown in Figure  2  (17th century) which includes touching ascenders and descenders and noise in the inter-line space. Since all existing algorithms perform slant removal on word or text line level, a segmentation-free approach is desirable for difficult to segment documents. Moreover, avoiding the text-line segmentation processing is computationally less expensive.
A preliminary approach has been described in  [17] , while in this paper the parameter set up is considered and described in detail. Moreover, the approach is extensively evaluated on new databases. The proposed technique is appropriate for slant detection and removal from document images with homogenous slant. It does not require page segmentation into text lines or words. This makes the proposed technique appropriate for historical documents, especially formal ones, since they ensure a uniform slant over the entire page. Moreover, the segmentation into text lines would create more noise. Usually, formal historical documents are written by well-educated people with a standard writing style and fixed slant. On the other hand, the proposed methodology is inappropriate Figure  1. An example of a slant removal application resulting from the detection algorithm described in  [9].
Text-line segmentation is required prior to slant estimation. A preliminary approach has been described in  [17] , while in this paper the parameter set up is considered and described in detail. Moreover, the approach is extensively evaluated on new databases. The proposed technique is appropriate for slant detection and removal from document images with homogenous slant. It does not require page segmentation into text lines or words. This makes the proposed technique appropriate for historical documents, especially formal ones, since they ensure a uniform slant over the entire page. Moreover, the segmentation into text lines would create more noise. Usually, formal historical documents are written by well-educated people with a standard writing style and fixed slant. On the other hand, the proposed methodology is inappropriate for document images containing unconstrained writing and several slant angles.
• the TrigraphSlant database [18] (the only available database for slant estimation), • two databases of historical documents (George Washington  [19]  and Barcelona historical, handwritten marriages database BH2M  [20] ) • a synthetic printed database where slants are fully determined. The contribution of the current work consists of: 1. To the best of our knowledge, this is the first time that a slant removal technique is proposed, able to be applied to the entire page, without requiring text line or word segmentation.
2. It does not generate extra noise, due to line and/or word segmentation that would remain in the page after slant removal, which is accomplished by shifting the entire page uniformly and ensuring text homogeneity. Most of the existed techniques apply to ideal databases, like IAM-DB (Figure  1 ) that is appropriately made for line and word segmentation. In the case of historical documents (Figure  2 ), the final result would be full of dots and strokes because of the segmentation.
3. Instructions are given over the best application to document page, after detailed results. In Section 2. 1, a short description of the elaborated slant detection algorithm  [9]  is presented. The proposed technique is described in detail in Section 2. 2, where the parameters that are examined in detail are analyzed. The experimental results are presented and analyzed in Section 3 while the conclusions are discussed in Section 4. for document images containing unconstrained writing and several slant angles. Methodologies, such as the one described in  [6] , are more appropriate in such cases. Thus, experiments are performed on several databases:  the TrigraphSlant database [18] (the only available database for slant estimation),  two databases of historical documents (George Washington  [19]  and Barcelona historical, handwritten marriages database BH2M  [20] )  a synthetic printed database where slants are fully determined.
The contribution of the current work consists of: 1. To the best of our knowledge, this is the first time that a slant removal technique is proposed, able to be applied to the entire page, without requiring text line or word segmentation. 2. It does not generate extra noise, due to line and/or word segmentation that would remain in the page after slant removal, which is accomplished by shifting the entire page uniformly and ensuring text homogeneity. Most of the existed techniques apply to ideal databases, like IAM-DB (Figure  1 ) that is appropriately made for line and word segmentation. In the case of historical documents (Figure  2 ), the final result would be full of dots and strokes because of the segmentation. 3. Instructions are given over the best application to document page, after detailed results.
Results Since there is no previous similar work to compare with, a trial is made to perform an absolute evaluation in various ways. Thus, in order to perform our experiments and evaluate the parameters, four databases were used: 1. The TrigraphSlant database (DB)  [18] , in order to perform tests on a renowned DB for slant. However, in this DB each writer was asked to write two pages of his natural slant and two of force slants. Only the natural slant documents were used here (see Experimental Results).
This measure gives a comparative result that is independent of the right or left slant direction. N refers to the amount of documents. Next, a short description of the databases is given, while the setup on the parameters follows. As initial parameter values, the parameters used in  [17]  are used in our experiments, and as soon as the best parameter value is estimated, it is used further on. Finally, experimental results for the four databases are presented (see Section 3. 9).
TrigraphSlant DB The TrigraphSlant [18] database contains images of handwriting produced under normal and forced slant conditions. It includes 190 handwritten document images, written by 47 people. For each image, the slant has been estimated by two researchers (Axel and Rolland) from the average slant computed from 10 measurements on each document image. In Figure  6 , an example of the TrigraphSlant database after the application of the proposed technique is shown.
BH2M DB The BH2M database  [20]  has been created under the EU ERC project Five Centuries of Marriages (5CofM). It includes the Archives of the Barcelona Cathedral: 244 books with information on approximately 550,000 marriages held between 1451 and 1905 in over 250 parishes. Each book was written by a different writer and contains information of the marriages during two years. Here pages for the 6th book are used. In Figure  8 , an example of the BH2M DB is presented.
In Figure  10 , the curve of sum of slant square errors (SSE) with reference to the text ratio is presented for printed and handwritten text. resolution, the procedure was very time consuming and just few of them were used. On the other hand, the images of printed text were all used. In Figure  10 , the curve of sum of slant square errors (SSE) with reference to the text ratio is presented for printed and handwritten text. The main volume of windows, as it is shown in Figure  11 , includes text up to 20%. Since the printed images with slant are an artificial database, the result derived from handwritten images were taken into account as a common R, that is 14% text in the image is the case of windows with minimum detection error. The majority of windows include text up to 20% (see Figure  11 ).
Since the slanted printed images are an artificial database, the result derived from handwritten images were taken into The main volume of windows, as it is shown in Figure  11 , includes text up to 20%. Since the printed images with slant are an artificial database, the result derived from handwritten images were taken into account as a common R, that is 14% text in the image is the case of windows with minimum detection error. The majority of windows include text up to 20% (see Figure  11 ). Since the slanted printed images are an artificial database, the result derived from handwritten images were taken into account as a common R = 14% corresponding to the minimum detection error (see Figure  10 ). The main volume of windows, as it is shown in Figure  11 , includes text up to 20%. Since the printed images with slant are an artificial database, the result derived from handwritten images were taken into account as a common R, that is 14% text in the image is the case of windows with minimum detection error.
Experimental Results on the Databases Having specified the parameters above, several experiments were conducted for the four databases, on each test set. In order to demonstrate the flexibility of the proposed technique, two more slant detection techniques were also used for the slant detection part, using the parameters that were specified by the use of our technique  [9]. The technique  [23]  detects the slant by using the main part of the text having removed the horizontal parts, ascenders, and descenders. The technique  [24]  estimates the slant by using the peaks of the slanted words. The experimental results for all databases are given in Table  1  through RMSE. For the TrigraphSlantDB: the RMSE is given only for the normal slants (between -45 and +45 degrees) but for the both estimators (Axel & Rolland).
• We present in the following experiments in order to evaluate the improvement brought by our slant detection and removal technique on document analysis and recognition tasks. We thus conduct recognition experiments on printed documents with an OCR, and word spotting experiments on handwritten documents, before and after slant removal. The recognition results for the handwriting of our databases were a failure, due to having historical documents or/and languages other than English. For the PrintDB database, in Figure  13 , the character error rate vs. the artificial slant are shown, as obtained by a commercial OCR system (Adobe Acrobat). For a page slant of less than -19 or greater than 37 degrees, it is very difficult to find a correspondence between the characters of the image and the OCR result.
Conclusions In this paper, a technique was presented for slant estimation and removal for the entire document page, without requiring line or word segmentation. The proposed technique is recommended for historical document images that include homogenous slant throughout the page. This segmentationfree technique guarantees the minimization of extra noise that could be introduced since the segmentation procedure, in historical document images, where the text is very dense, would leave behind small strokes and other kind of noise (points, lines). Experimental results were provided for four databases: PrintDB, which contains artificially slanted printed text to prove the accuracy of the technique; TrigraphSlant, a known DB of slant text; and the BH2M DB and the Washington DB to prove the application's utility on historical documents.
Conclusions In this paper, a technique was presented for slant estimation and removal for the entire document page, without requiring line or word segmentation. The proposed technique is recommended for historical document images that include homogenous slant throughout the page. This segmentation-free technique guarantees the minimization of extra noise that could be introduced since the segmentation procedure, in historical document images, where the text is very dense, would leave behind small strokes and other kind of noise (points, lines). Experimental results were provided for four databases: PrintDB, which contains artificially slanted printed text to prove the accuracy of the technique; TrigraphSlant, a known DB of slant text;.
Sampling The samples were selected according to the following criteria: (i) previously-published fluid inclusion data (trapping temperature, composition and origin of the enclosed fluids) is A C C E P T E D M A N U S C R I P T 5 available for all samples, or paragenetically equivalent samples, of one locality (Table  1 ); (ii) primary and pseudosecondary fluid inclusions were the dominant and most saline fluid inclusion population, and therefore comprise by far the majority of the element budget of Li in order that the data represented a single fluid and not a mixture of fluids; (iii) the samples were selected from relatively high-permeability hydrothermal vein systems where fluid flow rates were more than high enough to favor advective over diffusive Li transport  (Dolejš et al. , 2015) ; this means that diffusion between the wall rocks and the fluids prior to fluid inclusion trapping is expected to have had an insignificant effect on Li concentrations and 7 Li values and (iv) the dominant fluid inclusion populations in the samples account for the diversity of temperature and salinity of deep crustal fluids.
The standard value is 41. 54 ± 2. 9 µg/g (1 ) and the analysed value was 44. 8 ± 2. 5 µg/g (1 ). Signal integration was performed with the Matlab®based SILLS program  (Guillong et al. , 2008). A C C E P T E D M A N U S C R I P T 7 2. 3. Crush-leach Samples were crushed in an agate pestle and mortar and leached at the School of Earth and Environment, University of Leeds, UK, to release their bulk fluid inclusion content according to the conventional "crush-leach" technique  (Banks et al. , 2000b). Samples were crushed to a grain size fraction of 1-2 mm. Pure mineral separates were then picked under a binocular microscope and placed in a ultrasonic bath for 1 hour. Then samples were cleaned by boiling three times in 18. 2MΩ de-ionised water. Cleaned quartz and dolomite grains (0. 5 to 1. 5 g) were crushed to a fine powder in an agate pestle and mortar and the mineral powders were leached in 5-6 ml distilled 18.
A C C E P T E D M A N U S C R I P T 8 2. 5. High-performance ion chromatography (HPIC) For all samples, leachates from fluid inclusions were analysed for the concentrations of Li, Na, Mg, K, Ca and Sr at the Geological Survey of Finland (GTK, Espoo). Automated separation of Li from the leachates of fluid inclusions were performed using an HPIC technique similar to that previously described for the separation of Sr as applied to natural waters and carbonate rock digests  (Meynadier et al. , 2006). HPIC separation for Li was performed with the setup consisting of: (i) the temperature and pressure controlled Dionex ICS-3000 ion chromatograph with the Dionex AS autosampler; (ii) the Gilson FC204 fraction collector and (iii) the Chromeleon ® monitoring software. The autosampler with a 5 ml injection syringe consists of places with 10 ml sample vials and caps with Teflon covers.
A C C E P T E D M A N U S C R I P T 12 The majority of compositions do not overlap between the sample sets of different localities in a 7 Li vs [Li] field (Fig. 1 ). The 7 Li values of fluid inclusions show no clear correlation with trapping temperature and salinity, or Br/Cl, I/Cl, Na/Ca, Na/K, Na/Mg, Na/Li and Na/Sr molar ratios, considering individual localities and for the overall dataset (Fig. 2c-k ).