{'fraction_non_alphanumeric': 0.02300190799236803, 'fraction_numerical': 0.005935976256094976, 'mean_word_length': 5.229448662925058, 'pattern_counts': {'":': 1, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SPIX: A new software package to reveal chemical reactions at trace amounts in very complex mixtures from high‐resolution mass spectra dataset

Rationale High‐resolution mass spectrometry based non‐targeted screening has a huge potential for applications in environmental sciences, engineering and regulation. However, it produces large datasets for which full appropriate processing is a real challenge; the development of processing software is the last building‐block to enable large‐scale use of this approach. Methods A new software application, SPIX, has been developed to extract relevant information from high‐resolution mass spectral datasets. Dealing with intrinsic sample variability and reducing operator subjectivity, it opens up opportunities and promising prospects in many areas of analytical chemistry. SPIX is freely available at: http://spix.webpopix.org. Results Two features of the software are presented in the field of environmental analysis. An example illustrates how SPIX reveals photodegradation reactions in wastewater by fitting kinetic models to significant changes in ion abundance over time. A second example shows the ability of SPIX to detect photoproducts at trace amounts in river water, through comparison of datasets from samples taken before and after irradiation. Conclusions SPIX has shown its ability to reveal relevant modifications between two series of large datasets, allowing, for instance, the study of the consequences of a given event on a complex substrate. Most of all – and it is to our knowledge the only software currently available allowing this – it can reveal and monitor any kind of reaction in all types of mixture.

asset: it not only greatly improves the selectivity and specificity of "traditional" detection and quantification methods (in comparison with low-resolution analyzers), but also greatly facilitates structural elucidation by assigning raw formulae to the detected ions. 1 More recent use of high resolution takes advantage of its ability to separate isobaric ions, in an attempt to break free from separation methodsmainly gas (GC) or liquid chromatography (LC), or more rarely capillary electrophoresis or ion mobilityso as to expand the range of molecules detectable in a single analysis. This is particularly interesting in the context of non-targeted analysesin which the operator does not know which molecules are likely to be present in a samplebecause the choice of a chromatographic system focuses the analysis of certain classes of compounds based on their properties (volatile or not, polar or apolar, large or small, etc.) and thereby introduces a bias attributable to the subjectivity of the analyst. Direct introduction into the ion source without prior pretreatment or chromatographic separation was shown to be a useful alternative for rapid and comprehensive diagnosis of environmental samples, but this approach remains very challenging due to the extreme complexity of environmental matrices and the large number of contaminants likely to be present. 2 On direct introduction of a mixture, various molecules are simultaneously ionized, resulting in mass spectra yielded by the overlapping of spectra of the detectable species. Thus, complex mixture analyses provide mass spectra that can contain tens or hundreds of thousands of ions, even with soft ionization techniques such as electrospray ionization, atmospheric pressure ionization or atmospheric pressure photoionization; these spectra are of no possible use to the operator without the help of adapted software. Finding a molecule showing significant change between two conditions (upstream/ downstream or after treatment, for instance) in its trace amounts in an environmental sample is like looking for a needle in a haystack. Being able to quickly evaluate all the chemical consequences of an industrial accident on the biotope can be crucial to decision-making. In these situations, non-targeted HRMS-based screening is one of the last resorts for identifying unexpected or unknown contaminants. [3][4][5][6][7][8] This approach has recently been evaluated in a comprehensive collaborative study organized by the NORMAN association, in which a total of 18 institutes from 12 European countries analyzed an extract of the same water sample collected from the Danube River. The results revealed that non-targeted analytical techniques were already widespread and that practices were substantially harmonized between the participants, but that data processing remained complicated and time-consuming. 9 Among the main recommendations formulated to improve the non-targeted approach is the development of robust userfriendly processing software. Likewise, AQUAREFthe French national reference laboratory for aquatic environment monitoring, which works in close concert with other European reference laboratoriespublished guidelines for HRMS untargeted analysis, for which SPIX could be a powerful tool. 10 The first part of this article discusses the notions of uncertainty and subjectivity related to untargeted analysis. The second part presents the general working principle of SPIX software. The third part is dedicated to the presentation of results obtained on real samples. It discusses the strengths and limitations of the software and its specificities compared with the few programs currently commercially available. A brief overview of current computational and statistical approaches to extract relevant information from the big data of mass spectrometry analyses is provided in SI-1 (supporting information); it describes the approaches of Kendrick 11,12 and van Krevelen, [13][14][15] as well as multivariate statistical analysis. [16][17][18][19][20][21][22] Multivariate analysis tools enable global understanding of many concomitant variables and of their inter-correlations. Metabolomics processing pipelines often include univariate and multivariate statistical approaches. Univariate analysis is usually used as a preprocessing step, while multivariate analysis is used for classification of samples or features. For example, principal component analysis is used to characterize differences of two groups of metabolomics GC/MS data for the diagnosis of gastric cancer. The Wilcoxon rank sum test showed the marker metabolites specific to the tumor group.
Multivariate analysis, specifically principal component analysis, successfully divided the two groups of samples of normal and malignant gastric tissue. 23 A comprehensive workflow for univariate analysis of LC/HRMS data was developed to follow human adult urinary metabolome variations. Univariate analysis was used as a preprocessing step: nonparametric hypothesis testing was used to assess correlations with covariables and the Wilcoxon test was used to calculate the median differences between genders. The univariate p-value results together with multivariate importance in projection evidenced that there were 108 urine metabolites whose concentrations varied with either age, body mass index or gender. 24 Concerning direct infusion mass spectrometry, a comprehensive workflow for data processing and quality control was developed for metabolomics analysis of cardiac tissue extract. It can be used for different metabolomics analyses as it focuses on the correction of intra-and inter-batch variations and offers best-practice workflows and rigorous quality assessment. The data processing steps include the Wilcoxon test and multivariate analysis. 25 These applications could be extended to environmental samples; however, no approach has been reported using univariate or multivariate analysis which focuses on the kinetics of compounds in HRMS datasets. The concept behind multivariate analysis is different from that of the SPIX software: the latter aims at observing all statistically relevant variables individually. Examples of SPIX applications are given below.

| NOTIONS OF UNCERTAINTY AND SUBJECTIVITY IN MODERN UNTARGETED ANALYTICAL APPROACHES, AND INTRODUCTION TO SPIX
To illustrate the functionality of the SPIX software, it is necessary to address the notions of uncertainty and subjectivity that are fundamental in analytical chemistry. We propose to take an example in environmental chemistry. Consider a plant located on the bank of a river; it may be a treatment plant or, on the contrary, a source of pollution. The question is whether its presence significantly alters the composition of the water. The question seems simple enough, but providing a relevant answer is much less so. The conventional approach is to take water samples upstream and downstream of the plant, analyze them chemically and compare the results. This approach, while scientifically reasonable, nevertheless raises many questions at each step of the process. How many samples are needed to take account of the spatial and temporal variability of upstream and downstream water composition? Where, when and how to sample? What sample preparation to adopt, given that each choice of solvent, filter, solid-phase extraction column, chromatographic protocol and mass spectrometry ionization mode conditions the results of the analysis by favoring detection of certain molecules based on their size or polarity? Every single step in the analytical process introduces metrological uncertainties related to the measuring instruments used (balances, pipettes, etc.), but also to the so-called "matrix effect": i.e. the matrix of the reference used to validate the method is generally not rigorously identical to the matrix being analyzed. Stochastic biases and uncertainties are also caused by adsorption, evaporation, etc. The proliferation of sources of error obliges analysts to use internal standards to reduce the overall uncertainty of the results and try to conform to industry-specific standards. Limiting the subjectivity in a method needs to make no assumptions at all, which is in contradiction with the use of an internal standard; thus, the analytical scientist is left with choosing between limiting subjectivity or limiting uncertainties. To the problem of uncertainties must be added that of operator subjectivity, at two main levels. As mentioned above, this subjectivity comes into play before measurement: when the operator establishes the analytical protocol, choices are made, conditioned by assumptionsthe operator's own or those of third partiesas to what might have contaminated the water of the river. Even if the method is not "targeted" (i.e. specifically designed for the selective detection of given analytes), it cannot be considered totally "non-targeted" as there is no effective protocol capable of extracting and detecting everything simultaneously (e.g. both polar and apolar molecules) and any selected protocol effectively excludes some potential analytes. This will lead the analyst to try to minimize sample preparation, with the dual objective of limiting uncertainties and of reducing operator-induced subjectivity; an immediate consequence of this simplification is to increase the complexity of the data. For example, mass spectra recorded from environmental samples will be much more complex if the sample is introduced directly into the mass spectrometer without prior purification and separation. A point that is generally much less considered is operator subjectivity in interpreting results, especially when the data are complex and voluminous, when it comes to manually integrating a peak or comparing two chromatograms or two mass spectra, for example.
In 2019, a visual trial devoted to subjectivity evaluation was carried out during a European winter school on mass spectrometry, on a panel of 37 people with a strong scientific background in analytical chemistry. It consisted of a series of one-minute projections of two images with 5 to 22 differences; panelists were asked to note the number of differences that they were able to spot. Some images were quite simple (pictures with modified areas) while others were very complex (fractals containing very small differences within complex areas). A set of simulated mass spectra containing 15 differences (variations in peak intensity, addition and removal of peaks) was presented to the panelin triplicate and not consecutivelywithout prior notice. The variability between the results of these triplicates gave an average standard deviation of 2.3 observed differences per individual, with mean and median values of 9.6 and 9.7, respectively, and a range of 0-19. Considering the variability between panelists, a standard deviation of 20.6 differences was determined over the whole dataset, with mean and median values of 85.6 and 90, respectively, for a total 148 differences to be identified. The number of observed differences ranged from 31 to 122. The number of differences identified varied to the point that one operator would conclude that two spectra were almost identical while another would consider them significantly different! 26 The problem is substantially more complicated when comparing not only spectra but series of spectra corresponding, for example, to  A stand-alone version is freely available on the website (http://spix. webpopix.org). The source code can be made available on request.
Prior to performing any statistical analysis of the data, pre-processing is required to identify and align significant peaks in the data. The method used for detection and alignment actually depends on the type of data available: • When the device provides data in xml format, these data have already been filtered and contain only the most significant peaks. These peaks are then aligned by using the mspalign function of the Bioinformatics Toolbox (MATLAB) with the "shortest-path" option.
• When the data obtained are raw data (e.g. xy Bruker format in the present study), i.e. intensities measured on a fine and regular grid, the following algorithm is used: considering K series to analyze, the approximate positions of the significant peaks are first roughly determined by building a single series, consisting of the maximum intensities of the K series at all data points, and by thresholding this series. This procedure is used to determine disjoint segments in which the peaks of each of the K series are located.
The position and intensity of each of these peaks are then SPIX also permits two series of samples collected under two experimental conditions to be compared. The objective is to identify the ions with significant differences in intensity and to quantify these differences. The algorithm first consists of identifying the peaks considered significant: i.e. present and above a given threshold in at least one of the two conditions. For an ion detected in this way, the procedure is as follows. First, the series are locally shifted so that all the peaks are aligned.
The maximum intensity at the peak is estimated for each spectrum by fitting a model of the form A exp(−α(x − m)) for which the maximum value A is reached when x = m. This provides two series of values that can be compared on statistical tests. A t-test detects differences in the mean while a nonparametric Wilcoxon test more generally detects whether the peak intensity tends to be higher in one condition than in the other. A graphical representation of the p values obtained for all the peaks detected, as well as of the size effects (i.e. differences in mean values between the two conditions), provides quick visualization of the chemically significant differences and the statistical relevance of the differences.
Blank correction can be done as follows. The user chooses as a threshold, a ratio and a percentile. By default, the median of intensities is used for the calculations (p = 0.5). For the given percentile, the ratio is defined as: with B p (m/z) being the percentile of order p of the blank intensities' maximum and S p (m/z) the percentile of order p of the experimental data intensities' maximum. If the peak intensity is higher than S p (m/z) (as a threshold value) in at least one of the experiment spectra, it will be kept as a peak; if not it will be ignored.

| Chemicals, reagents, irradiation processes and analysis
The ability of SPIX to extract relevant information from sets of   (Table 1), these fittings being also those corresponding to the lowest p values.

| HRMS analysis
The formulas were assigned using Bruker software based on accurate mass measurements (sub-ppm accuracy) and isotopic pattern-matching. All the extracted m/z values were related to maprotiline or its photoproducts (oxidized compounds); they corresponded to singly charged ions with 12 Figure 3 for the former. One of the maprotiline-related peaks that was not in the list of the highest intensities was not found in the spectrum recorded at 2.5 min of irradiation: it was removed by the blank subtraction process, since the wastewater matrix was very complex. It is thus noteworthy that SPIX does not require blank subtraction to provide valuable information, allowing relevant peaks that coincidentally overlap with some of the matrix peaks not to be T A B L E 1 Ions extracted and associated kinetic models related to the photodegradation of maprotiline in wastewater with r 2 > 0.9 (data ordered by decreasing intensity)  Sets of spectra recorded before and after photolysis were compared using the SPIX software. Given the intensity of acetamiprid within the mixture, a peak detection limit was set at only three times the average intensity of spectral noise (average noise at 1 × 10 6 , detection threshold set at 3 × 10 6 ). This threshold was set as low as possible so as to identify acetamiprid degradation products in small amounts. Blank spectra were subtracted to eliminate any interference from solvents or instruments. Exported from SPIX, Table 2   indicated. Based on their chemical formulae, they were assumed not to be related to acetamiprid or to its photoproducts; they all included a large number of oxygen atoms (≥6) and probably resulted from oxidation of dissolved organic matter. This is of great interest because it opens a way to investigate the global consequences of a depollution treatment, evaluating the treatmentapart from its ability to efficiently degrade pollutantsin terms of biotope preservation.

| CONCLUSIONS
The SPIX software aims at extracting relevant data from mass spectra

PEER REVIEW
The peer review history for this article is available at https://publons. F I G U R E 5 Visual result provided by the SPIX software after processing of mass spectra series recorded from samples taken before and after 30 min photolysis. The differences in ion intensities are given on the y-axis, positive values corresponding to decreased intensity after irradiation. The associated p value is given by the color scale: the more the color tends toward red, the more statistically significant the difference