dataesr/scientific-paragraphs-categorization huggingface dataset:
com/ BioSpecNorway/biospectools). The proposed Fringe EMSC is validated by simulated data and two experimentally obtained datasets, one from pollen samples embedded in a polyethylene and paraffin film, and one from thin hair cross sections. The developed code can be used for infrared spectra and infrared hyperspectral images. We demonstrate how the Fringe EMSC can be used on a hyperspectral image. This procedure includes steps to separate sample spectra from the image background, and to identify spectra which need fringe correction from the ones which do not.
| Pollen grains dataset The pollen dataset consist of single spectra of pollen grains from four Oak species, collected in Australia and Portugal in the time period 2017-2018. The pollen samples were embedded, without any sample pretreatment, in a matrix medium, consisting of a soft paraffin (Vaseline-type petroleum jelly) between two sheets of polyethylene foils. The amount of paraffin was approximately 1 mg per 25 cm 2. An X-ray fluorescence (XRF) sample cup was used to stretch the foils and to minimize the appearance of air bubbles in the sample  [27]. Microscopic transmission measurements of pollen were performed using a Vertex 70 FTIR spectrometer with a Hyperion 3000 IR microscope (Bruker Optik, Ettlingen, Germany), equipped with a globar as mid-IR source and a liquid nitrogen-cooled mercury cadmium telluride (MCT) detector.
The spectra were recorded with a total of 128 scans in the 7000-600 cm À1 spectral range, with a spectral resolution of 2 cm À1 , and digital spacing of 0. 9630 cm À1. The samples were measured using a Â15 objective, with a 30 Â 30 μm 2 aperture. Background spectra were recorded at the start of each measurement (one per sample) by measuring a sample-free setting. The microscope was equipped with a computer-controlled x/ y/z stage. The spectroscopic system was controlled with OPUS 7. 5 software (Bruker Optik, Ettlingen, Germany). 50 spectra per sample were obtained, each corresponding to different single pollen grains, resulting in 200 spectra in total. Only a selection of these 200 spectra was used in this study.
| Hair cross section dataset The hair dataset consists of a hyperspectral image of thin cross sections of human hair. The samples were prepared by inserting the hair in a plastic tubing of pharmaceutical grade, filled with water. Subsequently, the samples were frozen and cryosectioned with a cryotome at negative temperature (À5 to À10 C). The thicknesses of the samples were approximately 10 μm. The sections were then deposited on a slide which is transparent in the infrared. The infrared image was collected in 2016 at the Synchrotron SOLEIL, using a synchrotron source on a Continuum XL microscope (ThermoFisher Scientific, Courtaboeuf, France) with a MCT detector. The spectral resolution was 8 cm À1 and the number of averaged scans was 50 for the sample and 512 for the background. The aperture size was set to 6 Â 6 μm 2 in single aperture mode.
2 6 6 6 6 4 3 7 7 7 7 5 ð13Þ Finally, the vector p of length j which contains the EMSC parameters, p ¼ a b c. 0 B B B B @ 1 C C C C A ð14Þ can be found by regressing each apparent absorbance spectrum α onto the matrix of model spectra M. The vector of EMSC parameters p contains the regression coefficients obtained from the regression model for one apparent absorbance spectrum. It is important to note that the EMSC needs as an input a very rough estimate of the pure absorbance spectrum as a reference spectrum. This estimate is preferably an absorbance spectrum from the same dataset that shows little or no scatter contributions. The aim of the Fringe EMSC is not to restore iteratively the pure absorbance spectrum. It aims at estimating the fringes, scaling and baseline effects and to subtract these from the measure absorbance spectrum which then results in a very good estimate of the pure absorbance spectrum.
| Improvements of the Fringe EMSC algorithm In this study, several improvements to the Fringe EMSC algorithm are proposed. The algorithm is shown in Figure  2 , where the improvements with respect to the algorithm proposed by Konevskikh et al. [7]  are marked in red. The new algorithm includes a robust and precise frequency estimation and suggests to select and use several frequencies in the Fourier domain. In the following, a step-wise explanation of the new algorithm is presented. Subsequently, the algorithm is demonstrated in F I G U R E 2 The Fringe EMSC algorithm with improvements marked in red (wrt. the algorithm of Konevskikh et al. [7] ). Each step of the algorithm is explained in more detail in the text use on two datasets of infrared spectroscopic measurements. Two filtering methods which are used when preprocessing infrared hyperspectral images are also presented.
The first method is used to identify spectra which are affected by interference fringes, while the second method is used to discard empty background spectra in an infrared image. The improved Fringe EMSC algorithm consists of six steps (the algorithm is available open source at BioSpec Norway's GitHub page; https://github. com/BioSpecNorway/biospectools): Step 1: The user specifies a region containing undisturbed fringes Z crop e ν ð Þ, that is, within the "silent" region. The data used in this study did not show signals from CO 2 in this region. In cases where variations in CO 2 is a problem, we suggest to linearly interpolate the CO 2 region prior to the following steps. Step 2: The selected region Z crop e ν ð Þ is then mean centered. This is because an offset in Z crop e ν ð Þ leads to high amplitudes for low frequencies in the Fourier domain, which are unrelated to the fringes in the measured spectra.
| EXPERIMENTAL VALIDATION 4. 1 | Case study: Correction of single spectra from pollen grains embedded in paraffin In the following example, we show how the Fringe EMSC algorithm can be used on infrared spectra of pollen grains embedded in paraffin. Since pollen grains normally are of F I G U R E 7 The frequency selection is shown in the inserted panels, where the color of the frame corresponds to the colors of the corrected spectra in the main figure. The raw spectrum is shown in dashed gray and the reference spectrum in black. The raw spectrum is selected from the hair cross section dataset spherical shape, with a size in the same order as the wavelength of the employed radiation, the samples are highly effective Mie scatterers  [33]. In order to avoid Mie scattering in these measurements, the pollen grains were embedded in paraffin, and sandwiched between two sheets of a thin polyethylene film.
While the paraffin embedding successfully suppressed the Mie scattering, fringes were observed in measured spectra due to the nearly perfect film caused by the paraffin. Since the refractive indices of paraffin and polyethylene are similar, 1. 47 and 1. 53, respectively  [43, 44] , we can treat them optically as the same material. Raw spectra are shown in gray in Figure  8 , where the mean spectrum is shown in black. The mean spectrum does not contain fringe signals, and is therefore well suited as a reference spectrum in the Fringe EMSC. In this dataset not all spectra are affected by fringes, and a filtering technique was therefore developed to detect spectra which need fringe correction.
For the pollen samples, the region of interest is in the range 800-2000 cm À1. In order to be able to F I G U R E 1 0 (a) Example of correcting a full spectrum with the Fringe EMSC model. The raw spectrum is show in red, the reference spectrum in black, weights in grey (dashed) and the corrected spectrum in blue. When the spectral range is broad, and the fringes are highfrequent with low amplitude, the fringe signal can in some cases be (b) artificially increased, or (c) simply not removed estimate the fringe frequency we included a chemically silent region as well, and chose the region 600-2750 cm À1. As is shown in Figure  11 , the fringe correction works well when a smaller spectral range is corrected. The fringe signal is removed completely. We evaluated the complete dataset of pollen sepctra which were identified as needing fringe correction and found that it worked well when the fringe correction was applied to the region 600-2750 cm À1.
| Case study: correction of infrared images of hair cross sections The Fringe EMSC algorithm was further evaluated on a hyperspectral image of hair cross sections. In Figure  12a , a set of spectra that were randomly selected from inside the hair section is shown. The chemical image obtained from the absorbance values at 2952 cm À1 from the same image is shown in Figure  12b. The amide I and II peaks are partly removed from the spectra due to saturation of the absorbance signal, that is, the sample absorbs the incoming radiation completely in these spectral regions. For preprocessing hyperspectral images, different filtering techniques are often needed prior to the preprocessing itself, and in the following we suggest a robust method for preprocessing image data with fringe signals. The pipeline is shown in Figure  13 , and each step is described in the following.
For each local maximum, two frequencies were selected. The weights shown in Figure  16a ,b as a gray dashed line were both applied for the standard EMSC for selecting sample spectra and for the Fringe EMSC. Polynomials up to the second order were used in the Fringe EMSC. The fringe corrected spectra are shown as raw spectra in Figure  16a , and corrected spectra in Figure  16b. The reference spectrum is plotted in red, and one of the sample spectra is plotted in black. Step 4: The corrected spectra can now be combined to a complete preprocessed dataset. The spectra which needed Fringe EMSC are taken from step 3, while the spectra which did not need the Fringe EMSC were already corrected with a standard EMSC in step 1. Since the same reference spectrum was used in both corrections, all spectra are scaled in the same way.
An image of the corrected spectra at 2952 cm À1 is shown in Figure  16c. Compared to the image of the raw data at the same wavenumber (Figure  12b ) it is evident that the contrast is better. For the largest hair sample, even the lipid rich medullah is visible. One should note that with the Fringe EMSC, the spectra are baseline corrected and scaled according to the reference spectrum, in addition to the fringe correction. The biggest difference between the raw spectra and the corrected spectra is due to baseline correction and scaling (see Figure  16a, b ). This demonstrates one of the advantages of the Fringe EMSC. All physical effects are comprised in the model and therefore handled simultaneously. In this study, we developed the Fringe EMSC into a stable and automated algorithm for fringe removal in infrared microspectroscopy and infrared microspectroscopic imaging.
The presented algorithm is robust, e. g. the choice of the number of frequencies for the fringe corrections does not affect the correction result notably. The improved Fringe EMSC is demonstrated on two experimental datasets, accompanied by two filtering methods. The first filtering method allows for separation of sample spectra from empty background spectra in infrared imaging, while the second filtering method identifies spectra which are affected by fringe signals. Both filtering methods are based on standard EMSC, which makes them robust and easy to use. Python codes for the Fringe EMSC and filtering methods are available on GitHub (https://github. com/BioSpecNorway/biospectools).
Genome annotation Eighty-one publicly available genomes were used for this study (Table  S1 ), all of them corresponding to strains that have been isolated from the brown alga Ectocarpus subulatus. The genomes were structurally and functionally annotated using five popular annotation pipelines: the Magnifying Genomes (MaGe) platform  (Vallenet et al. , 2019) , the Rapid Annotations using Subsystems Technology (RAST) toolkit  (Aziz et al. , 2008) , the Integrated Microbial Genomes (IMG) server  (Markowitz et al. , 2009) , the Prokka tool v1. 13  (Seemann, 2014)  and the DDBJ Fast Annotation and Submission Tool (DFAST)  (Tanizawa, Fujisawa & Nakamura, 2017). Each pipeline uses one or more unique databases to predict and search for genes and gene functions. MaGe searches for functional features using UniProtKB/Swiss-Prot, Interpro, FIGFAM, COG, ENZYME, and Diamond as a search tool  (Vallenet et al.
, 2019) ; RAST predicts gene functions using the SEED database  (Aziz et al. , 2008) ; IMG predicts features for genes based on COGs, Pfams, TIGRFAMs, as well as the KEGG and MetaCyc; Prokka is a command-line tool using UniProt, Pfam, and TIGRFAMs; DFAST uses ortholog searches with reciprocal BLAST searches, HMM searches against TIGRFAMs, and COG assignments for functional annotations  (Tanizawa, Fujisawa & Nakamura, 2017). All of the pipelines were run with default parameters (Table  S2 ). For Prokka, we also performed tests with more stringent e-value settings (1e-15 vs 1e-6 (default)); as these results were similar to those obtained with default parameters they are included only in the supplementary tables.
Draft metabolic network reconstruction The draft metabolic network of the host alga Ectocarpus subulatus was already available  (Dittami et al. , 2020a)  and had been reconstructed using Pathway Tools version 23  (Karp et al. , 2019)  and the AuReMe pipeline  (Aite et al. , 2018). To be able to use this metabolic network of the host for complementarity analyses, the same version of Pathway Tools was also used to reconstruct the bacterial draft metabolic networks. For each annotated bacterial genome (i. e. , 5 pipelines × 81 strains), a draft metabolic network was automatically reconstructed using Mpwt, the PathoLogic multiprocessing wrapper Python package  (Belcour et al. , 2020)  taking into account the protein description, GO terms, and complete EC numbers. The output files created by Pathway Tools were then converted to the SBML format with the Padmet software.
Indirect measures of network quality and manual examination of pipeline-specific reactions reconstructed metabolic networks To gain insight into the quality of metabolic networks generated based on the different pipelines, dead-end metabolites were computed for each pipeline using Memote  (Lieven et al. , 2020). Furthermore, sizes of the largest strongly connected components were counted in each of the networks to obtain a measure of its overall connectivity. First, directed metabolite graphs were constructed from the SBML files using the Networkx package  (Hagberg, Swart & Chult, 2008). Then, 23 ubiquitous metabolites were removed (water, proton, ATP, ADP, 3-5-ADP, AMP, NADP, NADPH, NAD, NADH, FAD, UDP, GTP, GDP, oxygen molecule, inorganic phosphate, diphosphate, carbon dioxide, ammonia, hydrogen peroxide, coenzyme A, H 2 -acceptor, H 2 -donor).
Finally, for each graph, strongly connected components were found with the Networkx strongly_connected_components function. Then, for each metabolic network, the ratio between the size of the largest strongly connected component and the total number of metabolites was computed. In addition to these indirect measures, we randomly chose 100 reactions that were exclusively found in one pipeline (20 per pipeline) for manual curation. Protein sequences of the bacterial genes that led to the prediction of these reactions were aligned with the Swissprot/Uniprot database using blastP and were then classified as high confidence (>30% ID; >70% coverage with a protein with the same metabolic function, functional domains present), low confidence (lower similarity with a protein with the same function, or similarity with a protein with a distinct but similar function), or false (>30% ID; >70% coverage with proteins known to carry out a different function).
0001 in both cases), but confirm that the effect was stronger for phylum (R = 0. 93) than for annotation pipeline (R = 0. 41). To further explore the differences in the metabolic network reconstructions and to highlight the specificities of each annotation pipeline we aimed to determine the conserved and unique content between the genome annotations from these different pipelines. This was done using the UpSetR package. Besides generating lists of reactions specific to different subsets of pipelines, this package also generates an UpSet diagram (Fig. 3 ), which displays the size of these sets. For instance, 2535 reactions were predicted in at least one genome with each of the 5 pipelines. Prokka and MaGe annotations resulted in the most pipeline-specific reactions: 390 (325 with more stringent e-value) and 256, respectively.
DFAST has the highest number of high confidence assignations (10) followed by Prokka and MaGe (6), IMG(4), and RAST(1). RAST, on the other hand, did not produce any annotations that could be clearly identified as false, followed by Prokka (1), DFAST (2), IMG (3), and MaGe (3). In Prokka, increasing the stringency of the e-value cutoff did not affect the proportions of high confidence, low confidence or false reactions. In DFAST, although the correct reaction was associated with the gene, we observed discrepancies between the product name of genes and the EC number associated in 3 cases. In MaGe and IMG we found 1 and 3 predicted proteins without any similarity in the database and classified them as low confidence (Table  S7 ). To assess how these differences in the draft metabolic networks impacted the function of the predicted metabolism of algal-bacterial holobionts, we next examined the list of metabolites that could be produced by the algal metabolic network when combined with the 81 draft bacterial networks for each annotation pipeline (i.
Fifteen strains were selected in only one of the five pipelines, 14 of which exclusively in the RAST-based community, and one, Pseudomonas 9AG, was included in minimal communities only when they were calculated from merged data from all annotation pipelines. Most strains were jointly selected by two or more pipelines, but even Prokka and IMG, for which minimal communities were based on the smallest subset of bacteria (15 and 17 selected strains, respectively) had only six strains in common. However, we also found commonalities between the selected communities: all communities comprised at least one representative of the Actinomycetales (Actinobacteria), Bacillales (Firmicutes), Rhizobiales (Alphaproteobacteria), Sphingomonadales (Alphaproteobacteria), and Pseudomonadales (Gammaproteobacteria).
Lastly, one strain, Maribacter strain 151 (Flavobacteriaceae, Bacteroidetes), was consistently selected in all data sets regardless of the annotation tool (Table  2 ). Finally, given the high variability between the selected communities, we tested how specific these communities were to the dataset used to select them. To this means, we selected the strains comprised in the minimal microbial communities predicted based on the Prokka annotations, i. e. , 15 bacteria, and examined the metabolites predicted to be produced by this community together with the host when applied to the datasets based on the other pipelines. Briefly, the DFAST, IMG, MaGe, and RAST metabolic networks with the Prokka community predicted similar scopes as the larger communities specifically selected for the dataset: 477 compounds vs 492 for RAST, 469 vs 484 for IMG, 488 vs 549 for MaGe, and 448 vs 504 producible compounds for DFAST, respectively (Table  S9 ).
, 2017) , the database used by Pathway Tools for draft metabolic network reconstruction. Each complete EC number can therefore be translated directly into one or several corresponding metabolic reactions. Our analyses also highlight a number of reactions that were predicted specifically for some pipelines, but our analysis of the corresponding pathways did not clearly show any pipelines to favor the annotation of specific biological processes over others. Furthermore, the fact that we observed little differences in the relative performance of the pipelines when comparing them separately for different bacterial phyla, suggests that there is no strong phylum-specificity of the tested pipelines. Our manual examination of a subset of pipeline-specific reactions showed that the reliability of these pipeline-specific predictions is generally low, with a tendency for those pipelines that predict the fewest pipeline-specific reactions (DFAST, RAST) to produce the highest proportion of high-confidence prediction, as well as the most connected networks in terms of dead-end metabolites.
These groups likely possess specific metabolic capacities absent from other groups making their presence indispensable in all selected consortia. These requirements were detected and met by MiSCoTo regardless of the annotation pipeline. Regarding the use of metabolic complementarity as a criterion to select microbial communities, this implies that, as also confirmed experimentally by  Burgunter-Delamare et al. (2020) , metabolic complementarity can be used to select microbial functions important for a symbiotic community. However, we need to expect high variability in the composition of the selected communities if several strains contain similar metabolic capacities. Just like in nature, there may simply not be one ideal solution that clearly excludes all others. In this sense, our data does not provide any evidence that one or another pipeline is more suitable for metabolic network reconstruction-we can only state that for our dataset Prokka and IMG, on average, produced more EC numbers and larger draft metabolic networks with Pathway Tools, while DFAST and RAST are likely to produce fewer false-positive reactions and dead-end metabolites, on average.
This will reduce the scope of the networks but likely also result in a reduction of noise and false-positive associations. An additional option may be to increase the stringency of the pipeline settings. Here moderate modification of the e-value in Prokka had little effect on the final results, but further adjustments are possible and their efficiency would likely need to be adapted for each dataset. Another application of metabolic complementarity using different annotation pipeline could also be in the context of metagenome analysis, on Metagenome Assembled Genomes (MAGs) of uncultured bacteria. Belcour et al. (2020)  have shown that reconstructed metabolic networks from MAGs are similar to the reference genomes. Also, the stability of the producible metabolites and selected minimal symbionts was demonstrated for degraded genomes with 2% of genes randomly removed.
It, therefore, seems probable that the overall stability observed in our study in terms of the predicted metabolic contributions of the symbionts to the algal metabolism regardless of the annotation pipeline will also hold true for metagenomic communities. In the long run, continued and extensive experimental validation of bioinformatic predictions in both a culture and a metagenomic context will be key to evaluate and refine the pipelines  (Poptsova & Gogarten, 2010)  and needs to be coupled with increased efforts to expand and improve annotations in reference databases  (Carr & Borenstein, 2014). In the meantime, one approach to overcome the variability brought by the annotation pipelines is to carefully curate the resulting metabolic networks. This is an indispensable step in obtaining high-quality metabolic networks as stated by  Thiele & Palsson (2010).
ACKNOWLEDGEMENTS We would like to thank  Alireza Asvadi  for his help writing a python script for merging tables of all strains across pipelines, and the reviewers of this paper for their constructive remarks. We are grateful to the  Institut Français de Bioinformatique  ( ANR-11-INBS-0013 ) and  BioGenouest Roscoff Bioinformatics platform ABiMS  (http://abims. sb-roscoff. fr/)for providing computing resources.
Data Availability The following information was supplied regarding data availability: The genomes are publicly available in the European Nucleotide Archive (ENA/EMBL): PRJEB31339 and PRJEB34356. The accession numbers are available in Table  S1. The detailed description of the code and data used for analysing is available at Github: https://github. com/ElhamKarimi/Metabolic-predictions_different-Pipelines.