A method and system for predicting biological toxicity of organic matter based on spectral analysis
Through the spectrum analysis method, using XGBoost model and mass spectrometry data, the rapid, simple and low-cost problems of biotoxicity assessment of organic compounds are solved, and effective prediction of a variety of compounds is achieved, with stability and wide application value.
Patent Information
- Application Number
- CN202111270668.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The prior art is difficult to quickly, easily and cost-controllable to assess the biotoxicity of organic compounds, especially in the case of pollutants and metabolites in unknown compound structures or complex environments.
Using a spectral analysis method, the mass spectral digital data of the compound is obtained through the mass spectral data acquisition module, pre-processed and imported into the machine learning algorithm, and XGBoost model is constructed. Five-fold cross-validation and parameter optimization adjustment are used to extract information related to biological toxicity in the spectra and make predictions.
It realizes rapid, simple and low-cost prediction of the biotoxicity of a variety of organic compounds, can handle compounds with unknown structure but with mass spectrometry data, the model has stability and good prediction capabilities, and is suitable for the design and use evaluation of organic compounds.
Smart Images

Figure CN114141316B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the research field of machine learning-assisted prediction of toxicity of organic compounds, and in particular to a method and system for predicting biological toxicity of organic matter based on spectral analysis. Background Art
[0002] The biological toxicity of organic compounds is extremely important for a comprehensive assessment of their usability. The biological toxicity of a compound can help analyze its metabolic process in the human body, its pharmaceutical use or potential hazards associated with it. Since 2006, the European Regulation on Registration, Evaluation, Authorization and Restriction of Chemicals (REACH) requires a mandatory preliminary assessment of the aquatic toxicity of compounds before production and trade begins. Toxicity is a complex special property achieved by different biological mechanisms. Conducting toxicity testing experiments on organic compounds in organisms is not only costly, but also subject to differences in experimental environment and technical level of researchers, and the results are often unstable. In order to meet this challenge, a simple, fast and cost-effective method for evaluating the toxicity of compounds is urgently needed.
[0003] With the continuous breakthroughs and progress of computer computing power at the hardware level, various artificial intelligence algorithms represented by machine learning and deep learning are also constantly being updated, and the predictive ability of algorithm models has also been rapidly improved. Models can be built based on existing data more accurately to predict the properties of objects. In the past decade, artificial intelligence has been widely used in many fields such as face recognition, autonomous driving, assisted medical care, user behavior prediction, and drug design. In the field of chemical informatics, artificial intelligence is also used to predict the properties of compounds and assist in compound design and detection. In recent years, many researchers have used various properties of compounds to build models for predicting the biological toxicity of compounds and have achieved good experimental results. However, the construction of these models requires the specific structure of the compound to be known in advance, and in many cases (such as pollutants and metabolites in complex environments), the structure of the compound is difficult to determine. For this reason, it is urgent to develop a prediction model that does not require the structure of the compound. Summary of the invention
[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and to provide a method and system for predicting the biological toxicity of organic matter based on spectral analysis. According to the coordinate data of the spectral graph and the XGBoost method, a machine learning model is constructed to directly extract characteristic information that can quantify the toxicity of the associated organic matter from the spectral graph data, thereby eliminating the need to obtain the composition and structure information of the molecule in advance, and eliminating the need to calculate the molecular descriptors in a complex manner. Internal and external validation was performed during the modeling process to examine the predictive ability and robustness of the model.
[0005] The first object of the present invention is to provide a method for predicting the biological toxicity of organic matter based on spectral analysis.
[0006] The second object of the present invention is to provide an organic matter biological toxicity prediction system based on spectral analysis.
[0007] The first object of the present invention is achieved by the following technical solutions:
[0008] A method for predicting the biological toxicity of organic matter based on spectral analysis comprises the following steps:
[0009] Obtaining biological toxicity data of compounds through biological experiments and using them to build models and evaluate prediction results, wherein the biological toxicity data include toxicity values and toxicity classifications;
[0010] Acquire mass spectrum digital data in compound spectrum data through a mass spectrum data acquisition module;
[0011] Preprocessing the mass spectrum digital data to obtain preprocessed mass spectrum digital data;
[0012] Importing preprocessed mass spectrometry digital data into machine learning algorithms to build machine learning models;
[0013] Use different parameter values to perform multiple predictions through five-fold cross validation, and select the best parameter combination after comparison to obtain the best machine learning model;
[0014] The interpolated spectral data is input into the optimal machine learning model, and the information related to biological toxicity in the spectrum is learned and extracted through the optimal machine learning model, and the biological toxicity prediction result is output.
[0015] Furthermore, the mass spectrum digital data in the compound spectrum data is obtained by the mass spectrum data acquisition module, specifically: the mass spectrum digital data in the organic spectrum data is obtained by standard spectrum library query and experimental detection methods, and the horizontal coordinate of the mass spectrum and its corresponding vertical coordinate value are extracted therefrom, wherein the horizontal coordinate is the mass-to-charge ratio, and the vertical coordinate is the relative abundance.
[0016] Furthermore, the mass spectrum digital data is preprocessed, specifically: the horizontal coordinates of all organic spectrum data are unified and interpolated; the interpolation process is to fill the vertical coordinates corresponding to the horizontal coordinates that do not exist in the mass spectrum digital data of the original compound.
[0017] Furthermore, the horizontal coordinate needs to obtain the maximum mass-to-charge ratio and the minimum mass-to-charge ratio of all mass spectra including the training set organic spectra and the predicted organic spectra, and use a series of integers from the minimum mass-to-charge ratio with an integer 1 as a step length to the maximum mass-to-charge ratio as the common horizontal coordinate of all spectra; the vertical coordinate needs to interpolate the spectra of all organic matter according to the obtained common horizontal coordinate, and fill the missing values of the corresponding vertical coordinate with 0, so that there is no missing vertical coordinate value of each spectrum under the common horizontal coordinate.
[0018] Furthermore, it also includes standardizing the pre-processed mass spectrometry data, specifically: for each common horizontal coordinate value corresponding to a group of vertical coordinate values of all compounds, a new set of vertical coordinate values is obtained by subtracting the mean of the vertical coordinate value and then dividing it by the standard deviation of the vertical coordinate value.
[0019] Furthermore, the processed mass spectrometry digital data is imported into a machine learning algorithm to construct a machine learning model. Specifically, the values obtained from the preprocessing are used as feature data in a two-dimensional array with compound types as the vertical directory and a common horizontal axis as the horizontal directory, and the toxicity value or toxicity classification of the organic matter is used as label data to input into the machine learning model for training.
[0020] Furthermore, multiple predictions are performed using five-fold cross validation with different parameter values, and the best parameter combination is selected after comparison to obtain the best machine learning model. Specifically, multiple predictions are performed using five-fold cross validation for different parameter value ranges of different model parameters to obtain corresponding scores, the parameter values with the best scores are recorded, and the parameter values with the best scores are used to rebuild a machine learning model with the best parameter combination for subsequent predictions.
[0021] Furthermore, the spectral data after interpolation processing is input into the best machine learning model, and the information related to biological toxicity in the spectrum is learned and extracted by the best machine learning model, and the biological toxicity prediction result is output. Specifically, the spectral data after interpolation processing is input into the best machine learning model, and the model is allowed to learn the training set data and extract the information related to biological toxicity in the spectrum, and finally the predicted value or category of biological toxicity is output.
[0022] The second object of the present invention is achieved by the following technical solutions:
[0023] An organic matter biological toxicity prediction system based on spectral analysis, comprising:
[0024] The biological toxicity data module is used to obtain the biological toxicity data of compounds through biological toxicity experiments;
[0025] A mass spectrum data acquisition module, used to acquire mass spectrum data from compound spectrum data;
[0026] A preprocessing module, used for preprocessing the mass spectrum data to obtain preprocessed mass spectrum data;
[0027] A spectrum information extraction module, used to extract spectrum information from organic spectrum data;
[0028] The model building and training module is used to build a machine learning model based on the spectral information, obtain the best model parameters of the machine learning model through five-fold cross validation, and then obtain the best machine learning model;
[0029] The biological toxicity prediction module predicts the biological toxicity of compound mass spectra through the best machine learning model;
[0030] The prediction result output module is used to output the prediction results of biological toxicity.
[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0032] 1. The model constructed by the present invention can be used to predict the biological toxicity of various organic compounds. The method is simple, fast, low-cost, and has a simple process, and can be easily used by researchers without a foundation in computational chemistry.
[0033] 2. The method used in the present invention can not only predict the toxicity of compounds with known structures and mass spectrometry data, but also predict the toxicity data of compounds with unknown composition structures but with measured mass spectrometry data.
[0034] 3. The model of the present invention is constructed using the XGBoost method, which is a relatively excellent model in machine learning models and can automatically extract feature information from spectral data without the need for complex compound descriptor calculations.
[0035] 4. The constructed model has undergone five-fold cross-validation and parameter optimization and adjustment, and has stronger stability and better predictive ability. It can be used to guide the design and use of organic compounds and is of great significance to the biological toxicity evaluation of organic compounds.
[0036] 5. The constructed model can be visualized through importance analysis to further explore the factors affecting the biological toxicity of organic matter. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a method flow chart of a method for predicting the biological toxicity of organic matter based on spectral analysis according to the present invention;
[0038] Figure 2 is a fitting diagram of the measured values and predicted values of the toxicity of organic compounds in the training set and the test set of Example 1 of the present invention;
[0039] Figure 3is an importance analysis diagram of the model in Example 1 of the present invention;
[0040] Figure 4 is an importance analysis diagram of the model in Embodiment 2 of the present invention;
[0041] Figure 5 The present invention discloses a structural framework diagram of organic matter biological toxicity prediction based on spectral analysis. DETAILED DESCRIPTION
[0042] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.
[0043] Example 1
[0044] A method for predicting the biological toxicity of organic matter based on spectral analysis, such as Figure 1 As shown, the following steps are included:
[0045] Obtaining biological toxicity data of compounds through biological experiments and using them to build models and evaluate prediction results, wherein the biological toxicity data include toxicity values and toxicity classifications;
[0046] Acquire mass spectrum digital data in compound spectrum data through a mass spectrum data acquisition module;
[0047] Preprocessing the mass spectrum digital data to obtain preprocessed mass spectrum digital data;
[0048] Importing preprocessed mass spectrometry digital data into machine learning algorithms to build machine learning models;
[0049] Use different parameter values to perform multiple predictions through five-fold cross validation, and select the best parameter combination after comparison to obtain the best machine learning model;
[0050] The interpolated spectral data is input into the optimal machine learning model, and the information related to biological toxicity in the spectrum is learned and extracted through the optimal machine learning model, and the biological toxicity prediction result is output.
[0051] The details are as follows:
[0052] First, the 48-hour half-lethal concentration (IGC) of 1306 organic compounds to Tetrahymena pyriformis was collected. 50 ), using the formula -log 10 IGC 50Convert it to toxicity values. Obtain the mass spectrum files (SDF format) of these organic compounds by querying the mass spectrum library of the National Institute of Standards and Technology (NIST) (https: / / webbook.nist.gov / chemistry / ), then use the rdkit code package in Python to read these SDF files, extract the relevant information of the mass spectrum from these files, and store the mass-to-charge ratio and the corresponding relative abundance.
[0053] The organic compound data set used contains 1,306 compounds, which can comprehensively represent various organic compounds. The biological toxicity of these organic compounds ranges from 1.21 to 5.22. The diversity of organic compound structures and the wide distribution of predicted values are conducive to building a robust prediction model.
[0054] In order to verify the model effect, 80% of the organic matter data was separated as a training set for model training and parameter optimization. The training set was then divided into five parts for five-fold cross-validation, four of which were selected for model training, and the last one was used to evaluate the trained model. This was repeated five times, and the predicted results were spliced together and scored with the actual results of the original training set. The score value was used as the evaluation of the model for this five-fold validation. In this way, the parameters corresponding to the model with the best five-fold cross-validation evaluation were compared in the process of constantly adjusting the parameters, and these parameters were recorded one by one. First, objective defaulted to reg:squarederror, and then the parameters num_boost_round and eta were adjusted at the same time, and then max_depth, gamm, alpha, and lambda were adjusted one by one. The final optimization parameters are as follows: num_boost_round = 100, eta = 0.12, max_depth = 5, gamma = 0.0, alpha = 1.6, lambda = 1.0.
[0055] The complete training set was then input into the trained model to predict the remaining 20% of the organic matter data, and the predicted toxicity and true toxicity were compared as a criterion for evaluating the model stability and external prediction ability. The determination coefficient of the five-fold cross-validation was 0.705, with a standard deviation of 0.488; the determination coefficient of the external validation was 0.734, with a standard deviation of 0.440, indicating that the model has good stability and external prediction ability. Figure 2 It is a fitting diagram of the measured and predicted values of the training set and the test set, where the circle represents the training set and the star represents the test set. Figure 3This is an importance analysis diagram of different mass-to-charge ratios in the trained model. Through importance analysis, we can compare which peaks have a greater impact on the biological toxicity of organic matter. As can be seen from the figure, the peaks in the range of 0 to 200 occupy most of the importance. Importance analysis can be used to analyze organic compounds in a targeted manner, which is of great significance in guiding the design and use of organic compounds.
[0056] Example 2
[0057] This embodiment has the same structure as Embodiment 1 except for the following features:
[0058] The hepatotoxicity binary classification data of 1237 organic compounds were collected, and the training method was similar to Example 1. The final optimization parameters are as follows: num_boost_round = 92, eta = 0.67, max_depth = 6, gamma = 0.0, alpha = 0.0, lambda = 2.25. The accuracy of the obtained five-fold cross-validation was 76.77%, and the accuracy of the external validation was 80.16%, which shows that the model has good stability and external prediction ability, and can classify compounds well through spectral data. Figure 4 It is an importance analysis diagram of different mass-to-charge ratios in the trained model. It can be seen from the figure that the peaks in the range of 0 to 400 occupy most of the importance, while in the range of 0 to 400, 0 to 200 occupy most of the importance.
[0059] Example 3
[0060] A prediction system for the biological toxicity of organic matter based on spectral analysis, such as Figure 5 As shown, including:
[0061] The biological toxicity data module is used to obtain the biological toxicity data of compounds through biological toxicity experiments;
[0062] A mass spectrum data acquisition module, used to acquire mass spectrum data from compound spectrum data;
[0063] A preprocessing module, used for preprocessing the mass spectrum data to obtain preprocessed mass spectrum data;
[0064] A spectrum information extraction module, used to extract spectrum information from organic spectrum data;
[0065] The model building and training module is used to build a machine learning model based on the spectral information, obtain the best model parameters of the machine learning model through five-fold cross validation, and then obtain the best machine learning model;
[0066] The biological toxicity prediction module predicts the biological toxicity of compound mass spectra through the best machine learning model;
[0067] The prediction result output module is used to output the prediction results of biological toxicity.
[0068] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A method for predicting the biological toxicity of organic matter based on spectral analysis, characterized in that: The following steps are involved: Obtaining biological toxicity data of compounds through biological experiments and using them to build models and evaluate prediction results, wherein the biological toxicity data include toxicity values and toxicity classifications; Acquire mass spectrum digital data in compound spectrum data through a mass spectrum data acquisition module; Preprocessing the mass spectrum digital data to obtain preprocessed mass spectrum digital data; Importing the pre-processed mass spectrometry digital data into the machine learning algorithm to construct a machine learning model; Importing the processed mass spectrometry digital data into the machine learning algorithm to construct a machine learning model, specifically: using the values obtained from the pre-processing as a two-dimensional array consisting of the compound types as the vertical directory and the common horizontal axis as the horizontal directory as feature data, and using the toxicity value or toxicity classification of the organic matter as label data to input into the machine learning model for training; Use different parameter values to perform multiple predictions through five-fold cross validation, and select the best parameter combination after comparison to obtain the best machine learning model; The interpolated spectral data is input into the optimal machine learning model, and the information related to biological toxicity in the spectrum is learned and extracted through the optimal machine learning model, and the biological toxicity prediction result is output.
2. The method for predicting the biological toxicity of organic matter based on spectral analysis according to claim 1, characterized in that: The method of obtaining the mass spectrum digital data in the compound spectrum data by the mass spectrum data acquisition module is specifically as follows: the mass spectrum digital data in the organic spectrum data is obtained by a standard spectrum library query and experimental detection method, and the abscissa of the mass spectrum and its corresponding ordinate value are extracted therefrom, wherein the abscissa is the mass-to-charge ratio and the ordinate is the relative abundance.
3. The method for predicting the biological toxicity of organic matter based on spectral analysis according to claim 1, characterized in that: The preprocessing of the mass spectrum digital data is specifically: unifying the horizontal coordinates of all organic spectrum data and performing interpolation processing; the interpolation processing is to fill the vertical coordinates corresponding to the horizontal coordinates that do not exist in the mass spectrum digital data of the original compound.
4. The method for predicting the biological toxicity of organic matter based on spectral analysis according to claim 3, characterized in that: The horizontal coordinate needs to obtain the maximum mass-to-charge ratio and the minimum mass-to-charge ratio of all mass spectra including the training set organic spectra and the predicted organic spectra, and use a series of integers from the minimum mass-to-charge ratio with an integer 1 as a step length to the maximum mass-to-charge ratio as the common horizontal coordinate of all spectra; the vertical coordinate needs to interpolate the spectra of all organic matter according to the obtained common horizontal coordinate, and fill the missing values of the corresponding vertical coordinate with 0 values, so that there is no missing vertical coordinate value of each spectrum under the common horizontal coordinate.
5. The method for predicting the biological toxicity of organic matter based on spectral analysis according to claim 4, characterized in that: The method also includes standardizing the pre-processed mass spectrometry data, specifically, for each common horizontal coordinate value corresponding to a group of vertical coordinate values of all compounds, a new group of vertical coordinate values is obtained by subtracting the mean of the vertical coordinate value and then dividing it by the standard deviation of the vertical coordinate value.
6. The method for predicting the biological toxicity of organic matter based on spectral analysis according to claim 1, characterized in that: Use different parameter values to perform multiple predictions through five-fold cross-validation, and select the best parameter combination after comparison to obtain the best machine learning model. Specifically, perform multiple predictions through five-fold cross-validation for different parameter value ranges of different model parameters to obtain the corresponding scores, record the parameter value with the best score, and use the parameter value with the best score to rebuild a machine learning model with the best parameter combination for subsequent predictions.
7. The method for predicting the biological toxicity of organic matter based on spectral analysis according to claim 1, characterized in that: The interpolated spectral data is input into the best machine learning model, and the information related to biological toxicity in the spectrum is learned and extracted by the best machine learning model, and the biological toxicity prediction result is output. Specifically, the interpolated spectral data is input into the best machine learning model, and the model is allowed to learn the training set data and extract the information related to biological toxicity in the spectrum, and finally the predicted value or category of biological toxicity is output.
8. An organic matter biological toxicity prediction system based on spectral analysis, characterized in that: include: The biological toxicity data module is used to obtain the biological toxicity data of compounds through biological toxicity experiments; A mass spectrum data acquisition module, used to acquire mass spectrum data from compound spectrum data; A preprocessing module, used for preprocessing the mass spectrum data to obtain preprocessed mass spectrum data; A spectrum information extraction module, used to extract spectrum information from organic spectrum data; The model building and training module is used to build a machine learning model through spectral information, obtain the best model parameters of the machine learning model through five-fold cross validation, and then obtain the best machine learning model; import the processed mass spectrum digital data into the machine learning algorithm to build a machine learning model, specifically: the values obtained by preprocessing are used as the compound type as the vertical directory and the common horizontal axis as the horizontal directory. The two-dimensional array is used as feature data, and the toxicity value or toxicity classification of the organic matter is used as label data to input the machine learning model for training; The biological toxicity prediction module predicts the biological toxicity of compound mass spectra through the best machine learning model; The prediction result output module is used to output the prediction results of biological toxicity.