dataesr/scientific-paragraphs-categorization huggingface dataset:
00 to 1. 00 in 0. 01 intervals, was determined so as to calculate the Jaccard index defined by the ratio JI = TP TP+FP+FN for a given threshold value. To estimate the accuracy of classification, JIs were determined directly by comparing handannotated (ground truth) datasets obtained from fluorescence image of GFP (Myxocococus) and mCherry (E. coli). Analysis of MiSiC performance in the presence of noise and comparison with Supersegger. To illustrate MiSiC performances in the presence of noise and in comparison with SuperSegger  (Stylianidou et al. , 2016) , datasets consisting of 141 E. coli microcolony images were retrieved from the SuperSegger website. These images were analysed with the provided parameters with SuperSegger and with the following parameters with MiSiC: Cell width = 9, Scaling factor = Auto, Noise = 0.
001, Unsharp = 0. 6 and Gamma = 0. 1. To assess the segmentation robustness to noise for each program, datasets were normalized by the maximum intensity value recorded in the first frame of the dataset and Gaussian noise was added with varying variance. The resulting datasets were then analysed with the initial parameters used to compute reference segmented images except for MiSiC where the noise parameter was set to 0. The relative performance of each program was then evaluated by computing Dice indices  (Zijdenbos et al. , 1994).
Demograph construction To construct the plot shown in Figure  4e  (demograph), the cells bodies were obtained with MiSiC segmentation and the binary mask was analyzed with the MicrobeJ software  (Ducret et al. , 2016) , with a cell model set to parameters (area >0. 5 µm 2 , Circularity <0. 8, 'poles' = 2) to filter all remaining segmented objects that do not correspond to cells. The localization of the centroid (cell middle) and length of longitudinal axis was then determined for each cell under MicrobeJ. The fluorescent clusters were detected with a local maxima filter and their position relative to the middle of the cell was plotted along the axis with a positive sign. Negative sign clusters are therefore the manifestation of rare cells with bi-polar foci. The fluorescent clusters are plotted as dots with a color scale based on spatial density.
Panigrahi et al. eLife 2021;10:e65151. DOI: https:// doi. org/ 10. 7554/ eLife. 65151 14 of 18 labeled bright-field images unseen by the trained network. The accuracy of the network is calculated over this test set. This dataset was used to train the classification network to discriminate Myxococcus xanthus and Escherichia coli cells directly from phase contrast images. To construct the data set, we obtained images from predatory interactions of M. xanthus and E. coli, where M. xanthus is tagged with green fluorescence (GFP, DM31, Table S1, Supplementary file 1) and Escherichia coli with red fluorescence (mCherry, EC500 -Shaner et al. 2004-Table.
Acknowledgements We thank  Anke Treuner-Lange  in  Lotte Sogaard-Andersen  lab for sharing the plasmid pKA32 with us (Treuner-Lange et al. , 2013). MiSiC robustness was tested on microscope images showing various bacterial strains that were kindly shared with us. For that, we thank  Anne Galinier  and  Thierry Doan  ( Bacillus subtilis ),  Christophe Bordi  (Pseudomonas aeruginosa),  Aretha Fiebig  (Caulobacter crescentus) and  Romain Mercier  (SgmX-GFP images of Myxococcus xanthus). We also thank  Baptiste Piguet-Ruinet  and  Célia Jonas  for constructing the pDM14 plasmid during their internship. We thank  Jean Raphael Fantino  for the design of the  MiSiC Logo. SP, LE , and TM are funded by  CNRS  within a  80-Prime initiative. TM is funded by an  ERC   Advanced Grant  ( JAWS EM  is funded by an  AMIDEX-PhD program  from  Aix-Marseille University ).
ERC advanced grant JAWS 885145  Tâm Mignot AMIDEX Eugénie Martineau ANR IBM  ( ANR-14-CE09-0025-01 )  Marcelo Nöllmann ANR HiResBacs  ( ANR-15-CE11-0023 )  Marcelo Nöllmann  funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.
Code availability A MiSiC pip installable python package is available at https:// github. com/ pswapnesh/ MiSiC (Swapnesh, 2021; copy archived at swh:1:rev:45f659124a8e207f78296d77664fb96de5472708). A Graphic user Interface pip installable as python package is available at https:// github. com/ leec13/ MiSiCgui  (Espinosa, 2021 ; copy archived at swh:1:rev:97401bedd44aa7b28d22f8cf87e76b521f15f40a).
Data availability The tensorflow model describe in this article is available in GitHub: https:// github. com/ pswapnesh/ MiSiC (copy archived at https:// archive. softwareheritage. org/ swh: 1: rev: 45f6 5912 4a8e 207f 7829 6d77 664f b96d e5472708); https:// github. com/ leec13/ MiSiCgui (copy archived at https:// archive. softwareheritage. org/ swh: 1: rev: 9740 1bed d44a a7b2 8d22 f8cf 87e7 6b52 1f15f40a). Source data files have been provided for Figures 2, 3, 4 and 5.
Panigrahi et al. eLife 2021;10:e65151. DOI: https:// doi. org/ 10. 7554/ eLife. 65151 14 of 18 labeled bright-field images unseen by the trained network. The accuracy of the network is calculated over this test set. This dataset was used to train the classification network to discriminate Myxococcus xanthus and Escherichia coli cells directly from phase contrast images. To construct the data set, we obtained images from predatory interactions of M. xanthus and E. coli, where M. xanthus is tagged with green fluorescence (GFP, DM31, Table S1, Supplementary file 1) and Escherichia coli with red fluorescence (mCherry, EC500 -Shaner et al. 2004-Table Dataset 2.
The acquisition time at each position was 300 ms, yielding a total measurement time of approximately 32 min (includes raster scanning overhead). The same sample could be reproducibly scanned through multiple imaging cycles without visible photodamage. Data pre-processing consisted of three steps: cosmic ray removal, background subtraction, and D 2 O peak area integration. A very small fraction of individual spectra contained cosmic rays (typically < 1%). These are identified and the individual points (contaminated by cosmic rays) inside the Raman spectrum are discarded and replaced with the average value of the neighboring points. The average of the Raman spectra measured at points outside the plant represents the background spectrum (contribution from the agar, MgF 2 , coverslip, and microscope objective).
The Raman spectrum representing each point inside the plant was obtained by algebraic subtraction of the background spectrum. Finally, the area of the D 2 O peak in the 2200-2800 cm -1 region was estimated using a Gaussian peak fit with a linear baseline. The obtained value is proportional to the D 2 O content at each point inside the plant. Time-course (Fig. 2F ). Raman spectra were measured at the same position inside the xylem (roughly 6-9 mm away from the root-hypocotyl junction) for approximately 16 min (1000 s), acquiring one measurement per second using kinetic mode acquisition inside the Andor SOLIS software. To confirm sample viability, each sample was pre-loaded with D 2 O via the root tip and placed on the microscope. During the D 2 O loading phase (approximately 15 min) a suitable measurement site inside the xylem was identified and the microscope focus was adjusted to maximize the Raman signal.
Combining Eqs. (  5 ) and (  6 ), C t and C t+dt being two distinct versions of the vector C, yields the following matrix operation ðdiagðVÞ À dt 2 Á MÞ Á C tþdt ðdiagðVÞ À dt 2 Á MÞ Á C t À dt Á F BC ð7Þ In this system, after setting initial concentrations in the vector C t , the remaining unknowns are grouped in C t+dt. The system is solved with the Python Scipy function "spsolve" for sparse matrices. Model parametrization. The root hydraulic layout reproduces the anatomy of an A. thaliana primary root in the differentiation zone, with a mature protoxylem (Fig. 2B , Supplementary Fig. 2 ). The skeleton of the hydraulic anatomy can be digitized with the software CellSet  27  , as in the current study (version 1. 5. 1 used here), or simulated with the root anatomy simulator GRANAR  28. As axial water fluxes through phloem sieve tubes are relatively small compared to xylem water fluxes, here we assume phloem flow does not affect the xylem D 2 O content at the RMS measurement point.
Different parameter values are tested as part of a "search loop" (Fig. 2A-F ) until simulations and measurements converge. With the search algorithm Multistart from the MATLAB (MathWorks, Inc. ) global optimization toolbox, we find parameter values of primary cell wall hydraulic conductivity (k w ), individual plasmodesma hydraulic conductance (K PD ), and aquaporin contribution to plasma membrane hydraulic conductivity (k AQP ) that best fit the Lp r data of WT, esb1. 1 CDEF, CDEF, and sgn3-3 myb36-2, under control and azide treatments, except for sgn3-3 myb36-2 for which only control Lp r data is available (Fig. 2E , optimal parameter values in Supplementary Table  2 ). As the measured Lp r data has units of water flow rate per pressure differential per root mass, while Lp r simulated with the 3-D version of MECHA has units of water flow rate per pressure differential per root surface, all Lp r values are normalized by the WT Lp r under control treatment (leaving six other data points to constrain three unknowns).
Acknowledgements This work was supported by awards from the  Biotechnology and Biological Sciences Research Council  (grant Nos. BB/K010212/1  to K. F. W. ,  BB/T001437/1  to  M. J. B. /D. M. W. ,  BB/V003534/1  to  D. E. S. /M. J. B. ,  BB/L027739/1 , and  BB/N023927/1  to D. E. S. ) The  Leverhulme Trust  ( RPG-2016-409 , to M. J. B. /D. M. W. /K. F. W. ), and from the  ERA-NET   Coordinating Action in Plant Sciences program  ( ERACAPS13. 089_RootBarriers  to DES). V. C. was funded by as Research Fellow by the  Belgian Fonds de la Recherche Scientifique (F. R. S. -FNRS , grant number:  1208619F ), M. C. -P. has received funding from the  EU 's  Seventh Framework Program  under grant agreement  N°FP7-609398  (AgreenSkills + contract), I. C. was funded by  Junta de Extremadura Spain  ( GR18168 ).
Code availability The latest code of MECHA working in 3D with solute advection-diffusion and associated Matlab codes for inverse modeling schemes are openly available online under GPL. 2 open-source licence at FigShare [https://doi. org/10. 6084/m9. figshare. 14892408. v2] or GitHub [https://github. com/MECHARoot/MECHA/blob/master/MECHA_4Dsolute. zip]. The custom code used to acquire and analyze the Raman microspectroscopy data is openly available online at the FigShare database [https://doi. org/10. 6084/m9. figshare. 14815671]. The commercial softwares ANDOR SOLIS (4. 2230007. 0), ANDOR SDK (2. 94. 30007. 0), and Prior scientific software Version 1. 78. 0. 0 were also used in this study to acquire the Raman microspectroscopy data.
Results: Based on co-eluting mass/charge fragments, we developed an innovative data analysis method to reliably reconstruct the chemical formulae of the fragments, using efficient combinatorics and graph theory. The method does not require the presence of the molecular ion, which is absent in ∼40% of EI spectra. Our method has been trained and validated on >50 halocarbons and hydrocarbons, with 3-20 atoms and molar masses of 30-330 g mol -1 , measured with a mass resolution of approx. 3500. For >90% of the compounds, more than 90% of the annotated fragment formulae are correct. Cases of wrong identification can be attributed to the scarcity of detected fragments per compound or the lack of isotopic constraint (no minor isotopocule detected). Conclusions: Our method enables to reconstruct most probable chemical formulae independently from spectral databases.
The entire method is written in Python and publicly available under the name ALPI-NAC (for ALgorithmic Process for Identification of Non-targeted Atmospheric Compounds, see "Availability of data and materials" section). While Python may not be the fastest programming language (compared to e. g. C++), it is now widely used in teaching computer science, including to students in environmental sciences and chemistry, and we hope this work will therefore be accessible to a large public.
Remaining compounds are separated by a gas chromatograph (GC), equipped with a Gaspro pre-and main column (5 m and 60 m, respectively, 0. 32 mm inner diameter, Agilent), ionised and detected by a time-of-flight detector (H-TOF, Tofwerk AG, Thun, Switzerland). The detector is set to measure fragments with masses from 24 m/z (mass to charge ratio) to 300 m/z. Masses below 24 m/z are prevented from hitting the detector, to avoid saturation by potential water contamination. The mass resolution is approximately 3000 below m/z of 50 and up to 4000 above m/z of 100. The raw intensity data at each time-of-flight and each time bin are saved in a file of format hdf5  [50] , which constitutes the used raw data. The total analysis time for one sample is 70 min, with 40 min of preconcentration and stepwise thawing, followed by 30 min of gas chromatography and detection by TOFMS.
Method overview The output after peak fitting and mass calibration is a dataset of mass/charge ratio (m/z), each with intensity (in V) and uncertainty (in ppm), at a precise retention  (1)  u mass = 2. 5 u 2 calibration + u 2 measurement time (in seconds). Co-eluting peaks may correspond to chemical fragments of a unique molecule, or a small number of distinct molecules. They are therefore grouped into one time slot of approx. 2 s width to be treated together by the identification algorithm. We consider each time slot separately. The overview of our method is depicted in Fig. 1. The general approach is to consider separately each group of co-eluting fragments, and to reconstruct the chemical formula of each fragment based on two types of information: • From the experimental data produced by GC-EI-TOF analysis, we use the measured mass and measured signal intensity of each peak.
Our strategy turned out to be fast enough for the considered mass ranges (see runtime in "How wrong knapsack solutions are rejected and implications for computationruntime" section) and we did not investigate further optimisations. Dührkop et al. [58]  have a very different approach well-suited for molecular masses of around 1000 Da, implemented in the SIRIUS software suite for tandem MS  [59]. After Step 1 (Fig. 1 ), for each measured mass, all chemical formulae that are in agreement with the measured mass within its uncertainty, made of abundant isotopes, and having a positive DBE value, are generated. At this stage, the fragment formulae are not uniquely identified by the knapsack: for each measured mass there are either too many possibilities, or none (usually because the fragment may contain non-abundant isotopes).
Step 5 to Step 8: Iterating loop to compute the optimum contribution of multiple sets of candidates together Overall, the measured signal profile s measured = {(m a , I m a ) : m a ∈ mass abscissa} should match a linear combina- tion of the expected profiles of all correct candidate sets, an approach already found in e. g. [63]. Formally, this approach allows several fragments to form together the signal of one measured peak, which is realistic given our mass resolution. Equation (  3 ) is therefore completed as:  (6) g(n) = i sub-fragment of n k max i j isotopocule of i p i,j m spec ∈mass spectrum I m spec #{sub-fragments i of n} #{all theoretical sub-fragments of n, mass ≥ 23m/z} This equation cannot be simplified. Instead, the optimisation of multiple k i is handled by a machine learn- ing technique, using the Python package lmfit, based on the Levenberg-Marquardt algorithm [for details, see 64].
This optimisation of multiple k i together is by far the most expensive computation step in the entire method. The lmfit package is most efficient when only a limited number of parameters k i are optimised. In particular, it is outside the computing power of a regular desktop machine to optimize all the profiles of the candidate formulae together. We implement three techniques to lower the running time of lmfit. First, the measured profile is itself not perfect but affected by measurement noise. This noise also affects the expected isotopic pattern accuracy. To account for this, we do not aim at reconstructing 100% of the signal, but only a significant portion of it. Since our experimental precision is in the order of 1 % to 5%, as well as the isotopic pattern accuracy, we set the threshold at 95% of the signal: when 95% of the "area" below the signal is reconstructed, the optimisation is stopped.
For comparison, we tested two software that suggest the weight of the molecular ion. Both software use unit mass information, not high resolution. We used the same training set, excluding C 6 F 14 because its molecular weight is Fig. 7  Training set: distribution of ranking values for fragments and maximal fragments. A ranking value of 1 means that the fragment/maximal fragment was ranked as most likely (maximum likelihood value within the set of fragments/maximal fragment). Blue: distribution of ranking for correctly identified fragments/maximal fragments. Red: distribution of ranking for wrongly identified fragments/maximal fragments Fig. 8  Behaviour of the identification algorithm for the training and validation sets: how knapsack solutions are rejected outside our mass detection range.
The NIST library tool  [22]  was able to reconstruct the correct molecular weight in 17 cases ( ≈49 %). In average, the NIST molecular weight prediction deviates from the correct one by 12 Da, with a median deviation of 2 Da, which is very similar to the performances published initially in 1993 by Scott et al. [22]. We also tested the commercial software MOLGEN-MS, which contains a module to determine if specific chemical classes are present in a molecule (MSclass module,  [25] ), and then predicts the weight of the molecular ion (ElCoCo module,  [23] ). We found better results when using the ElCoCo module alone, without MSclass: the correct weight for the molecular ion was listed in 15 cases ( ≈ 43 %). Technical details are given in the Additional file 1.
Performance of the model on the validation set The validation set (Table  2 ) is made of 23 compounds. The performance of the reconstructions is similar as with the training set: for 95% of the compounds, more than 90% of the reconstructed signal is correct (Fig. 10 ). This illustrates that our identification method can be applied to different dataset, while producing similar performances. As an example, the reconstructed mass spectrum for HFO-1234yf is given in Figure  11. The reconstructed molecular ion is correct in 19 cases (83 %, see detailed results in Table  4 ). For the wrong cases, the suggested molecular ions are mostly sub-fragments of the true molecular ion. Interestingly, when the correct molecular ion is listed, it is always ranked first, suggesting that the likelihood estimator (Eq.
Acknowledgements M. Guillevic  thanks  Luke Western ,  Stuart Grange  and  Minsu Kim  for valuable discussions related to machine learning. A. Guillevic thanks  Paul Zimmermann  for discussions on the knapsack problem, and  Stephane Glondu  for his valuable help in installing Python packages for computational chemistry and setting the development environment on Linux platforms. We thank  Georgios Papadopoulos ,  Mike Cubison  ( Tofwerk AG ) and  Harald Stark  ( Aerodyne Research Inc. ) for their support related to the TOF instrument;  Titian Steiger  for improving efficiency of Python data files handling; and  Marco Panayiotou  for establishing the software license scheme for ALPINAC. We are grateful to  Markus Meringer  who provided a 90-days free trial version of the commercial software MOLGEN-MS.
To illustrate this approach and detect selection using either temporal or present time sampling, we combined SNP chip data from previous projects and whole-genome sequencing (WGS) data for the Asturiana de los Valles breed produced within the European Project IMAGE, and built a dataset covering eight generations of this population. These data were used to detect selection signatures in this breed using both a new statistical approach taking advantage of genomic time series  (Paris et al. , 2019)  and a state of the art statistic (nSL) based on a single sampling time  (Ferrer-Admetlla et al. , 2014). Apart from expanding our understanding on the genomic grounds of Asturiana de los Valles evolution and providing molecular tools for enhancing the performance of this breed, this study outlines one potential use of gene bank collections in animal breeding.
Samples We considered genotype data from 153 animals of the Asturiana de los Valles bovine breed. These genotypes were obtained from three projects involving three distinct genotyping technologies: 88 sires were genotyped using the Illumina's BovineSNP50 v. 2 chip within the Climgen project (FACCE_20171212), 50 animals (25 sires and 25 dams) were genotyped using the Illumina's Bovine High Density BeadChip 770 k SNP within the Gene2Farm project (EU Seventh Framework Programme for research, technological development, and demonstration under grant agreement no. 289,592 -Gene2Farm), and WGS data were obtained for 15 sires within the IMAGE project (Innovative Management of Animal Genetic Resources. European Grant 677353). Animal birth dates ranged from 1980 to 2015, with different distributions for the three origins (Figure  1 ).
DNA Sequencing and Bioinformatics Analysis The 15 WGS samples were sequenced on a HiSeq 3,000, using 2 × 150 bp paired-end reads. The average coverage per animal ranged from 5. 81 to 13. 14, with a median value of 8. 9. Sequences were mapped to the reference genome UMD3. 1 using BWA v0. 7. 17  (Li, 2013). Optical and PCR duplicates were identified and marked using Picard tools v2. 18. 2 (Picard Toolkit, 2019). Local realignment around indels and base quality recalibration were performed with GATK (  Van der Auwera et al. , 2013). SNPs were then called using a two-step procedure. First, each sample was called independently using three alternative softwares: GATK HaplotypeCaller v3. 7. 0, samtools mpileup v1. 8/bcftools v1. 6  (Li, 2011) , and FreeBayes v1. 1. 0 (Garrison and Marth, 2012). This provided two sets of variants: high-quality variants, which were found by the three callers and passed standard GATK quality filters, and low-quality variants that were found only in one caller and unfiltered.
Second, GATK SNPs were filtered using the Variant Quality Score Recalibration (VQSR) of GATK, a machine learning algorithm that sets the quality filter thresholds based on two training datasets, respectively, representing true and spurious variants; these two training datasets were provided by the high-quality and low-quality variants obtained in step 1. A total of 15,768,037 autosomal bi-allelic SNPs and 302,181 bi-allelic SNPs on chromosome X were called from this procedure. In the next sections, we describe the different steps of the analysis for autosomal variants. Analysis of the X chromosome required specific treatments, which are described in the Supplementary Material.
Merging and Cleaning Genotypes In vcf files generated by GATK from WGS data, the quality of a genotype call for a given individual and variant is quantified by the value GQ = -10*log10(Pwrong), where Pwrong is the probability of this genotype call being wrong. 2  For the WGS SNPs obtained as described in the previous section, individuals with genotype quality (GQ) below 10 (i. e. , a probability of being wrong higher than 0. 1) were set to missing, resulting in a relatively high rate of missing values per marker (about 23% on average). All variants with more than 40% missing values (1,439,050) were removed. Call rates were much higher in the SNP chip data sets; thus only SNPs with more than 5% missing values were removed, which provided 49,393 and 715,454 SNPs for the 50K and 770K datasets, respectively.