Method for predicting river nitrogen metabolism gene abundance based on automatic machine learning

The prediction model of river nitrogen metabolism gene abundance is constructed through automatic machine learning methods, which solves the problems of high model complexity, insufficient data volume and weak interpretation in traditional methods, and achieves high precision and high interpretation prediction effects, providing a scientific basis for river nitrogen cycle research and water quality management.

CN119851769APending Publication Date: 2025-04-18TIANJIN CHENGJIAN UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510027006.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

When traditional methods predict the abundance of river nitrogen metabolism genes and their influencing factors, application bottlenecks caused by high model complexity, insufficient data volume and weak interpretation.

Method used

Using an automatic machine learning method, the optimal algorithm is screened through the automatic machine learning function of the H2O platform, a prediction model of nitrogen metabolism gene abundance is established, and the interpretability analysis of the prediction model is achieved using SHAP value graph and PDP.

Benefits of technology

A high-precision and highly interpretable prediction model was constructed under a small sample data set, and the key impact of various water quality physical and chemical indicators on the abundance of nitrogen metabolism genes was accurately identified, and their relative contributions were quantified, providing a scientific basis for river nitrogen cycle research and water quality management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention relates to a method for predicting river nitrogen metabolism gene abundance and key influence factors thereof based on automatic machine learning. Comprising the following steps: collecting a river water sample, detecting water quality physicochemical indexes, and performing metagenome sequencing to obtain nitrogen metabolism gene abundance; taking conventional water quality physicochemical indexes as explanatory variables, taking nitrogen metabolism gene abundance as a target variable, adopting automatic machine learning to construct a model, evaluating the performance of the model through a mean square error (MSE) and a fitting coefficient (R), and selecting an optimal algorithm for prediction; the model analyzes the relative contribution of each water quality index through an SHAP value graph, and reveals the relationship between each water quality index and gene abundance by using a partial dependency graph (PDP). The method shows high precision and good generalization performance in the aspect of predicting the abundance of the nitrogen metabolism gene, and is suitable for describing the nitrogen dynamic process of a river water body. The model can explain, analyze and quantify the influence of different water quality indexes on the nitrogen metabolism gene afterwards, and a scientific basis is provided for river water quality management and nitrogen metabolism optimization regulation and control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of environmental monitoring and ecological protection, and in particular to a method for predicting the abundance of river nitrogen metabolism genes and their key influencing factors based on automatic machine learning. Background Art

[0002] Nitrogen is an important nutrient element in water bodies. Appropriate amounts of nitrogen are beneficial to the normal function of aquatic ecosystems, but excessive nitrogen can cause eutrophication of water bodies, leading to excessive algae growth, reduced dissolved oxygen and other water quality problems, which in turn affect the survival and ecological balance of aquatic organisms. Microbial nitrogen metabolism plays a vital role in river ecosystems. Its expression and function directly affect the circulation and transformation of nitrogen, determine the form and concentration of nitrogen in water bodies, and thus affect river water quality, nutrient dynamics and ecosystem health. The microbial nitrogen metabolism processes driven by nitrogen metabolism genes mainly include: nitrification, denitrification, assimilative nitrate reduction, dissimilatory nitrate reduction, organic nitrogen synthesis, and organic nitrogen degradation. Studies have shown that environmental factors (such as water temperature, dissolved oxygen, pH, etc.) significantly affect the community structure and activity of functional genes of nitrogen-metabolizing microorganisms, thereby regulating the efficiency and path of river nitrogen cycle. Therefore, it is crucial to deeply understand the distribution and expression level of nitrogen metabolism genes in river environments and the mechanism by which they are regulated by environmental factors, and to achieve dynamic regulation of nitrogen cycle by regulating different forms of nitrogen, which is crucial to the health and stability of river ecosystems.

[0003] However, although traditional molecular biological detection methods such as metagenomic sequencing and fluorescent quantitative PCR can provide accurate data on nitrogen metabolism genes, they are not suitable for large-scale and rapid detection due to their time-consuming, high cost and cumbersome procedures. For this reason, a data-driven nitrogen metabolism gene prediction model has become an efficient alternative. By predicting the distribution of nitrogen metabolism genes, it can help managers quickly evaluate and predict the response of the nitrogen cycle process when the environment changes, and formulate scientific water quality management and ecological restoration strategies. This prediction method has important application prospects in river ecological protection and nitrogen management.

[0004] In recent years, researchers have developed predictive models related to nitrogen metabolism. One study used the interpretable causal machine learning (ICML) framework to analyze the microbial nitrogen metabolism patterns driven by 26 environmental and socioeconomic factors in 105 rivers in China by studying the relationship between the abundance of nitrogen-metabolizing bacteria and environmental factors. However, the nitrogen metabolism activity and efficiency of nitrogen-metabolizing bacteria under different conditions are different, so they cannot be directly equated with the nitrogen metabolism process. In contrast, the prediction of nitrogen metabolism gene abundance directly focuses on the expression and activity of specific genes, which can provide more accurate nitrogen metabolism function information and help to more deeply understand the impact of different environmental factors on the nitrogen metabolism process. Another study used the long short-term memory (LSTM) model in deep learning to predict the dynamic changes of nitrogen metabolism genes under different water conditions through climate and environmental factors such as water temperature, precipitation, and flow. However, this type of model does not predict nitrogen metabolism genes based on various water quality indicators, making it difficult to identify the fundamental water quality factors that affect the nitrogen metabolism process, and thus unable to achieve nitrogen metabolism regulation. In addition, the LSTM model has a complex training process, large amount of calculations, long training time, high requirements for computing resources, and sensitivity to parameters, which increases the difficulty of parameter adjustment and is prone to overfitting. In contrast, automatic machine learning (AutoML) has higher flexibility, multiple optional algorithms, and does not require complex manual parameter adjustment. It is more efficient and easy to implement, and can be applied to a wider range of water environment nitrogen metabolism prediction tasks. At present, there is no model method that uses automatic machine learning to predict the abundance of nitrogen metabolism genes based on water quality indicators. Summary of the invention

[0005] Therefore, the present invention aims to provide a method for predicting the abundance of river nitrogen metabolism genes and their key influencing factors based on automatic machine learning, so as to improve the scientificity and prediction accuracy of water quality management.

[0006] The present invention discloses a method for predicting the abundance of river nitrogen metabolism genes and their key influencing factors based on automatic machine learning, which is characterized by comprising the following steps: (1) Collect water samples from several rivers, obtain data on 15 conventional physical and chemical indicators of the water samples through testing, and obtain the abundance data of representative functional genes in each nitrogen metabolic pathway through metagenomic sequencing; construct a data set using the 15 water quality physical and chemical indicators as explanatory variables and the abundance of each nitrogen metabolic gene as the target variable; (2) Randomly divide the constructed data set into training set and test set; use the automatic machine learning function of the H2O platform to screen the optimal algorithm, and establish a nitrogen metabolism gene abundance prediction model based on the screened optimal algorithm, and train and test the model; (3) Use the prediction model to predict the abundance of nitrogen metabolism genes in the water samples to be tested, and evaluate the model performance based on the mean square error (MSE) and the fitting coefficient (R²); (4) Implement interpretability analysis of the prediction model through SHAP value graph and PDP; In step (1), the 15 water quality physical and chemical indicators include: water temperature (Temp), pH, dissolved oxygen (DO), oxidation-reduction potential (ORP), conductivity (COND), ammonia nitrogen (NH 4 + -N), nitrate nitrogen (NO 3 - -N), nitrite (NO 2 - -N), total nitrogen (TN), phosphate phosphorus (PO 4 3- -P), total phosphorus (TP), dissolved organic carbon (DOC), chlorophyll a (Chl-a), chemical oxygen demand (CODcr), and total dissolved solids (TDS). In step (1), the representative functional genes of the nitrogen metabolism pathway include: napA, a representative functional gene of the denitrification process, nxrB, a representative functional gene of the nitrification process, nasA, a representative functional gene of the assimilative nitrate reduction process, nirB, a representative functional gene of the dissimilatory nitrate reduction process, glnA, a representative functional gene of the organic nitrogen synthesis process, and gdh, a representative functional gene of the organic nitrogen degradation process.

[0007] In step (1), the process of obtaining nitrogen metabolism gene abundance from metagenomic data includes DNA extraction and high-throughput sequencing, followed by data cleaning, splicing and host DNA removal. Representative functional genes of the nitrogen metabolism process are identified through alignment and annotation tools, and the gene abundance is calculated based on the sequence alignment results.

[0008] In step (1), the target variable nitrogen metabolism gene abundance data is preprocessed, that is, the 0 value of the target variable is replaced by 1 / 10 of the minimum value and then uniformly logarithmized.

[0009] In step (2), the data set of the river water samples is randomly divided into a training set and a test set, the training set is used to train the prediction model, and the test set is used to test the generalization ability of the prediction model, with 85% of the data set used for training and 15% for testing.

[0010] In step (2), the automatic machine learning function of H2O is used to automatically select the best model and set the maximum running time and model number limit; AutoML uses different algorithms for model training and hyperparameter tuning, including Gradient Boosting Machine (GBM), Deep Learning, Random Forest, and eXtreme Gradient Boosting; the mean square error (MSE) and fitting coefficient (R²) of each algorithm model on the training set and test set are compared, and the model with the smallest MSE or the largest R² is selected as the optimal model algorithm.

[0011] In step (2), the optimal algorithm selected by AutoML of the H2O platform is the GBM algorithm, and the h2o.gbm() function in the H2O platform is used to establish the optimal prediction model for the abundance of river nitrogen metabolism genes.

[0012] In step (3), the performance of the prediction model is evaluated by MSE and R², where: When R 2 When ≤0.3, the predicted value and the observed value have a poor fitting effect, and the prediction ability of the prediction model is poor; When 0.3<R 2 When ≤0.4, the fitting effect between the predicted value and the observed value is weak, and the prediction ability of the prediction model is weak; When 0.4<R 2 When ≤0.6, the fitting effect between the predicted value and the observed value is moderate, and the prediction ability of the prediction model is moderate; When 0.6<R 2 When ≤1.0, the predicted value and the observed value have a strong fitting effect, and the prediction model has a strong prediction ability.

[0013] The present invention further discloses the application of the method for predicting river nitrogen metabolism gene abundance and its key influencing factors based on automatic machine learning in analyzing the relative contribution of each water quality index to river nitrogen metabolism gene abundance using a SHAP value graph, and in analyzing the influence of each water quality index on river nitrogen metabolism gene abundance using a partial dependence graph. The experimental results show that the method can accurately identify the key influence of each water quality physical and chemical index on the change of nitrogen metabolism gene abundance, and quantify its relative contribution, providing a scientific basis for river nitrogen cycle research and water quality management.

[0014] This paper mainly solves the application bottleneck problem of traditional methods in predicting the abundance of nitrogen metabolism genes in rivers and their influencing factors due to high model complexity, insufficient data volume, and weak interpretability. It focuses on investigating the specific effects of 15 water quality physical and chemical indicators on the abundance of multiple key nitrogen metabolism genes (napA, nxrB, nasA, nirB, gdh, glnA) and their relative contributions. The main difficulty lies in how to build a prediction model with high accuracy and high interpretability under a small sample data set, and effectively combine machine learning methods to analyze the complex nitrogen metabolism network, while accurately evaluating the contribution and uncertainty of each water quality indicator.

[0015] The present invention is described in more detail as follows: A method for predicting the abundance of nitrogen metabolism genes in rivers and their key influencing factors based on automatic machine learning, comprising the following steps: (1) Collect water samples from several rivers, obtain data on 15 conventional physical and chemical indicators of the water samples through testing, and obtain the abundance data of representative functional genes in each nitrogen metabolic pathway through metagenomic sequencing; construct a data set using the 15 water quality physical and chemical indicators as explanatory variables and the abundance of each nitrogen metabolic gene as the target variable; (2) Randomly divide the constructed data set into training set and test set; use the automatic machine learning function of the H2O platform to screen the optimal algorithm, and establish a nitrogen metabolism gene abundance prediction model based on the screened optimal algorithm, and train and test the model; (3) Use the prediction model to predict the abundance of nitrogen metabolism genes in the water samples to be tested, and evaluate the model performance based on the mean square error (MSE) and the fitting coefficient (R²); (4) The interpretability analysis of the prediction model is realized through SHAP value graph and PDP.

[0016] Furthermore, the water quality physical and chemical indicators in step (1) include water temperature (Temp), pH, dissolved oxygen (DO), oxidation-reduction potential (ORP), conductivity (COND), ammonia nitrogen (NH 4 + -N), nitrate nitrogen (NO 3 - -N), nitrite (NO 2 - -N), total nitrogen (TN), phosphate phosphorus (PO 4 3- -P), total phosphorus (TP), dissolved organic carbon (DOC), chlorophyll a (Chl-a), chemical oxygen demand (CODcr), and total dissolved solids (TDS).

[0017] Furthermore, the representative genes of the nitrogen metabolism process in step (1) include denitrification process (from nitrate NO3 - Converted into nitrite NO 2 - ) representative functional gene napA, nitrification process (from nitrite NO 2 - Converted to nitrate NO 3 - ) representative functional gene nxrB, assimilation of nitrate reduction process (from nitrate NO 3 - Converted to ammonia NH 3 ) representative functional gene nasA, dissimilatory nitrate reduction process (from nitrate NO 3 - or nitrite NO 2 - Converted into nitric oxide NO, nitrous oxide N 2 O or nitrogen N 2 ) representative functional gene nirB, organic nitrogen synthesis process (from ammonia NH 3 The representative functional gene glnA of the organic nitrogen degradation process (from glutamate to ammonia NH 3 )'s representative functional gene gdh.

[0018] Furthermore, in step (1), the abundance data of representative functional genes of each nitrogen metabolic pathway are obtained by performing metagenomic sequencing on river water samples.

[0019] Furthermore, the method for obtaining the abundance data of representative functional genes of each nitrogen metabolism pathway includes: First, DNA was extracted from surface water samples and subjected to high-throughput sequencing, followed by data cleaning, splicing, and host DNA removal. Representative functional genes (napA, nxrB, nasA, nirB, glnA, gdh) of nitrogen metabolism were identified through alignment and annotation tools (such as KEGG, NR database, etc.), and the abundance of genes was calculated based on the sequence alignment results.

[0020] Furthermore, in step (1), the data set for constructing the nitrogen metabolism gene abundance prediction model specifically includes: water quality physical and chemical indicators (Temp, pH, DO, ORP, COND, NH 4 + -N, NO 3 - -N, NO 2 - -N, TN, PO 4 3--P, TP, DOC, Chl-a, CODcr, TDS) were used as explanatory variables, and the abundance of the representative functional gene napA in denitrification, the representative functional gene nxrB in nitrification, the representative functional gene nasA in assimilative nitrate reduction, the representative functional gene nirB in dissimilatory nitrate reduction, the representative functional gene glnA in organic nitrogen synthesis, and the representative functional gene gdh in organic nitrogen degradation were used as complete data sets for target variables.

[0021] Furthermore, the target variable nitrogen metabolism gene abundance data needs to be preprocessed, specifically, the 0 value of the target variable is replaced by 1 / 10 of the minimum value and then uniformly logarithmized.

[0022] Furthermore, in step (2), the automatic machine learning (AutoML) function of H2O is used to automatically select the best model and set the maximum running time and number of models. AutoML uses different algorithms for model training and hyperparameter tuning, including Gradient Boosting Machine (GBM), Deep Learning, Random Forest, eXtreme Gradient Boosting, and other algorithms.

[0023] Furthermore, in step (2), the optimal algorithm selected by AutoML of the H2O platform is the GBM algorithm. The h2o.gbm() function in the H2O platform is used to establish the optimal prediction model for the abundance of river nitrogen metabolism genes, and the model performance is trained and evaluated multiple times in a cycle.

[0024] Furthermore, in step (2), the nitrogen metabolism gene abundance prediction model established includes: gene napA (belonging to the denitrification pathway) abundance prediction model, gene nxrB (belonging to the nitrification pathway) abundance prediction model, gene nasA (belonging to the assimilative nitrate reduction process) abundance prediction model, gene nirB (belonging to the dissimilatory nitrate reduction process) abundance prediction model, gene glnA (organic nitrogen synthesis process) abundance prediction model and gene gdh (organic nitrogen degradation process) abundance prediction model.

[0025] Furthermore, in step (3), the mean square error (MSE) and fitting coefficient (R²) of each algorithm model on the training set and the test set were compared, and the model with the smallest MSE or the largest R² was selected as the optimal model algorithm to predict the abundance of nitrogen metabolism genes.

[0026] Mean Squared Error is a commonly used regression problem evaluation indicator, which is used to measure the average square error between the model prediction value and the true value. Its calculation formula is as follows:

[0027] in: It is The true value of the samples.

[0028] It is The predicted value of a sample.

[0029] is the total number of samples.

[0030] The R-Squared coefficient is used to evaluate the model’s ability to explain the data, reflecting the proportion of the independent variable 𝑥 that can explain the variation of the dependent variable 𝑦. 2 : The value range is [0, 1]. The closer the value is to 1, the better the model fit is. The calculation formula is as follows:

[0031] in: is the residual sum of squares, which represents the sum of squared errors between the model predictions and the true values.

[0032] is the total sum of squares, which represents the sum of squared errors between all true values ​​and the true mean.

[0033] is the mean of all true sample values ​​and is used to calculate the total variability of the data.

[0034] Furthermore, the method of predicting the abundance of nitrogen metabolism genes using 15 water quality physical and chemical indicators also includes: randomly dividing the data set of river water samples into a training set and a test set, and using the training set to establish the prediction model. Preferably, 85% of the data set is used as a training set and 15% of the data set is used as a test set.

[0035] Furthermore, the prediction ability of the prediction model is measured by the fitting coefficient R²: When R²≤0.3, the predicted value and the observed value have a poor fitting effect, and the prediction ability of the prediction model is poor; When 0.3 < R² ≤ 0.4, the fitting effect between the predicted value and the observed value is weak, and the prediction ability of the prediction model is weak; When 0.4 < R² ≤ 0.6, the fitting effect between the predicted value and the observed value is medium, and the prediction ability of the prediction model is medium; When 0.6 < R² ≤ 1.0, the fitting effect between the predicted value and the observed value is strong, and the prediction ability of the prediction model is strong.

[0036] Furthermore, the performance of the model was evaluated using MSE and R² to show whether the model exhibited a strong fitting effect on the training set and whether it maintained a high prediction accuracy on the test set. The relative contributions of each water quality index to the model prediction were determined through SHAP value plots, revealing the influence degree of different environmental factors on the functional gene abundance. At the same time, the influence of individual variables (such as water temperature, dissolved oxygen, pH, etc.) on gene abundance was further analyzed through PDP, revealing the relationship between key water quality factors and gene abundance.

[0037] The positive effects of the method for predicting river nitrogen metabolism gene abundance and its key influencing factors based on automated machine learning disclosed in the present invention compared with the prior art are as follows: This method uses conventional water quality physical and chemical indicators (such as water temperature, dissolved oxygen, pH, etc.) as explanatory variables, and these indicators are usually standard items in river water quality monitoring, which are widely used and easy to obtain. Compared with molecular biology detection methods for directly measuring nitrogen metabolism gene abundance (such as metagenomic analysis and qPCR), the acquisition of water quality physical and chemical indicators is both economical and efficient, greatly reducing the monitoring cost and time investment. In addition, since water quality physical and chemical indicator data widely exist in existing monitoring databases, this method can be directly applied to the collected data without additional gene detection, and has wide practicability. Moreover, these conventional water quality physical and chemical indicators are the fundamental factors affecting the microbial nitrogen metabolism process. Further interpretable machine learning analysis can identify the key water quality factors and their influencing effects in each nitrogen metabolism process, helping to deeply understand complex microbial processes, so that river nitrogen metabolism regulation can be effectively achieved based on water quality regulation, providing practical guidance for water quality management and nitrogen metabolism process optimization.

[0038] This method uses automated machine learning (AutoML) technology. By automating the model screening and optimization process, the optimal prediction model can be quickly found. The AutoML technology can automatically search for the optimal configuration among a large number of models and hyperparameter combinations, thus reducing the complexity and time cost of manual intervention. Compared with the traditional manual model selection and tuning process, AutoML is more intelligent and efficient, significantly improving the model development efficiency. AutoML is suitable for analyzing the complex associations between nitrogen metabolism gene abundance and various water quality physical and chemical indicators and provides high-precision prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 The model training effect and test effect of using 15 water quality physical and chemical indicators to predict the abundance of each gene in the embodiment, including the mean square error MSE, the fitting coefficient R 2 ,in: (a) shows the model training effect and test effect of predicting the abundance of gene napA (belonging to the denitrification pathway) using 15 water quality physical and chemical indicators in an embodiment of the present invention; (b) shows the model training effect and test effect of predicting the abundance of gene nxrB (belonging to the nitrification pathway) using 15 water quality physical and chemical indicators in an embodiment of the present invention; (c) shows the model training effect and test effect of predicting the abundance of gene nasA (belonging to the assimilative nitrate reduction process) using 15 water quality physical and chemical indicators in an embodiment of the present invention; (d) shows the model training effect and test effect of using 15 water quality physical and chemical indicators to predict the abundance of the gene nirB (belonging to the dissimilatory nitrate reduction process) in an embodiment of the present invention; (e) shows the model training effect and test effect of predicting the abundance of gene glnA (organic nitrogen synthesis process) using 15 water quality physical and chemical indicators in an embodiment of the present invention; (f) shows the model training effect and test effect of predicting the abundance of gene gdh (organic nitrogen degradation process) using 15 water quality physical and chemical indicators in an embodiment of the present invention.

[0041] Figure 2 The SHAP values ​​of the 15 environmental factors in each gene abundance prediction model on the abundance of the gene napA show the contribution of each environmental factor to the prediction of the abundance of the gene napA. (a) shows the SHAP value of environmental factors on gene napA abundance in the gene napA abundance prediction model; (b) shows the SHAP value of environmental factors on gene nxrB abundance in the gene nxrB abundance prediction model; (c) shows the SHAP value of environmental factors on gene nasA abundance in the gene nasA abundance prediction model; (d) shows the SHAP value of environmental factors on gene nirB abundance in the gene nirB abundance prediction model; (e) shows the SHAP value of environmental factors on gene glnA abundance in the gene glnA abundance prediction model; (f) shows the SHAP value of environmental factors on gene gdh abundance in the gene gdh abundance prediction model; Figure 3 This is a partial dependence diagram of the effects of 15 environmental factors on the abundance of gene napA in each gene abundance prediction model, showing the effect of a single environmental factor on the abundance of river nitrogen metabolism genes. (a) shows the partial dependence diagram of the effect of environmental factors on the abundance of gene napA in the prediction model of gene napA abundance; (b) shows the partial dependence diagram of the effect of environmental factors on the abundance of gene nxrB in the prediction model of gene nxrB abundance; (c) shows the partial dependence diagram of the effect of environmental factors on gene nasA abundance in the prediction model of gene nasA abundance; (d) shows the partial dependence diagram of the effect of environmental factors on the abundance of nirB gene in the prediction model of nirB gene abundance; (e) shows the partial dependence diagram of the effect of environmental factors on the abundance of gene glnA in the prediction model of gene glnA abundance; (f) shows the partial dependence diagram of the effect of environmental factors on the abundance of gene gdh in the prediction model of gene gdh abundance; Figure 4 It is a flow chart of the method for constructing a nitrogen metabolism gene abundance prediction model described in the present invention. DETAILED DESCRIPTION

[0042] The following examples are provided for a better understanding of the present invention, but are not intended to limit the best mode of implementation, nor to limit the content and protection scope of the present invention. Any product identical or similar to the present invention obtained by anyone under the guidance of the present invention or by combining the features of the present invention with other prior arts shall fall within the protection scope of the present invention.

[0043] If no specific experimental steps or conditions are specified in the examples, the conventional experimental steps or conditions described in the literature in the art can be used. The raw materials or instruments used are all conventional products that can be obtained commercially, including but not limited to the raw materials or instruments used in the examples of this application.

[0044] Example 1 Prediction model building This embodiment provides a method for establishing a prediction model for nitrogen metabolism gene abundance, and the detailed steps are as follows: (1) Water sample collection The sections of the GBD River and the QH River, two rivers that receive tailwater from sewage treatment plants in Beijing, were selected for sampling. Five sampling points (D1, D2, E, U1, and U2) were set up in each river, and these sampling points had similar river morphology, riverbank land use, and vegetation. The sampling work was carried out at six time points in November 2015, March 2016, September 2016, September 2018, December 2018, and March 2019, and a total of 77 water samples were collected for testing and analysis.

[0045] (2) Testing of physical and chemical indicators of water samples The physical and chemical indicators of water quality include water temperature (Temp), pH, dissolved oxygen (DO), oxidation-reduction potential (ORP), conductivity (COND), ammonia nitrogen (NH 4 + -N), nitrate nitrogen (NO 3 - -N), nitrite (NO 2 - -N), total nitrogen (TN), phosphate phosphorus (PO 4 3- -P), total phosphorus (TP), dissolved organic carbon (DOC), chlorophyll a (Chl-a), chemical oxygen demand (CODcr), and total dissolved solids (TDS).

[0046] The analysis methods of the physical and chemical indicators of the collected water samples mainly refer to the national standards of the People's Republic of China and the "Water and Wastewater Monitoring and Analysis Methods (Fourth Edition)". The detection methods, reference standards and main instruments and equipment for various water quality indicators are shown in Table 1.

[0047] Table 1 Water quality testing methods, reference standards and main instruments and equipment Water quality indicators abbreviation unit Detection Methods Reference Standards Instruments and Equipment Water temperature Temp ℃ On-site testing Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) Multi-parameter water quality detector (MYRON) pH pH - On-site testing Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) Multi-parameter water quality detector (MYRON) Dissolved oxygen DO mg / L On-site testing Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) Portable dissolved oxygen meter (HACH) Redox potential ORP mv On-site testing Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) Multi-parameter water quality detector (MYRON) Conductivity COND μS / cm On-site testing Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) Multi-parameter water quality detector (MYRON) Ammonia nitrogen <![CDATA[NH 4 + -N]]> mg / L Nessler's reagent spectrophotometry Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) UV / Visible spectrophotometer (U3010, Hitachi) Nitrate <![CDATA[NO 3 - -N]]> mg / L UV spectrophotometry Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) UV / Visible spectrophotometer (U3010, Hitachi) Nitrite <![CDATA[NO 2 - -N]]> mg / L UV spectrophotometry Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) UV / Visible spectrophotometer (U3010, Hitachi) Total Nitrogen TN mg / L Alkaline potassium persulfate digestion UV spectrophotometry National Environmental Protection Standard of the People's Republic of China HJ 636-2012 UV / Visible spectrophotometer (U3010, Hitachi) Phosphate Phosphorus <![CDATA[PO 4 3- -P]]> mg / L Ammonium molybdate spectrophotometry Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) UV / Visible spectrophotometer (U3010, Hitachi) Total Phosphorus TP mg / L Ammonium molybdate spectrophotometry National Standard of the People's Republic of China GB11893-89 UV / Visible spectrophotometer (U3010, Hitachi) Dissolved organic carbon DOC mg / L Dry oxidation method Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) <![CDATA[Total Organic Carbon Analyzer (TOC-V CPH , Shimadzu)]]> Chlorophyll a Chl-a mg / L On-site testing Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) Handheld Fluorometer (Turner) Chemical oxygen demand CODcr mg / L Ammonium molybdate spectrophotometry National Standard of the People's Republic of China GB11893-89 UV / Visible spectrophotometer (U3010, Hitachi) Total dissolved solids TDS mg / L On-site testing Water and Wastewater Monitoring and Analysis Methods (Fourth Edition) Multi-parameter water quality detector (MYRON) Note: The test results of each indicator are the average of three test results.

[0048] (3) Metagenomic sequencing to obtain gene abundance The DNA samples to be tested were sent to Beijing Genomics Institute (BGI) for metagenomic sequencing, and the library was constructed using the IlluminaTruSeq DNA Sample Preparation Kit (Illumina, San Diego, California, USA). Large DNA fragments were randomly fragmented into specific length fragments using Covaris or Bioruptor ultrasonic devices. Subsequently, the sticky ends were repaired to blunt ends by treatment with T4 DNA polymerase, Klenow DNA polymerase, and T4 PNK. Next, the base "A" was added to the 3' end to enable the DNA fragment to be connected to a specific adapter containing a 3' end "T" base. After the connection products of the target fragments were selected and recovered by electrophoresis, DNA fragments with adapters at both ends were obtained by PCR amplification, and the target insert fragment length was 300 bp. Next, cluster preparation and sequencing with a 150 bp double-end read length were performed on the Illumina Hiseq X-Ten platform. After sequencing, the initial raw data was processed, including removing reads with a base quality value of ≤20 for 40% of the bases, reads with a base N content of 10%, adapter contamination, and duplicate reads. Finally, high-quality clean data was obtained, with a data volume of approximately 5.6Gbp per sample. The high-quality clean data obtained by this process can be used to accurately analyze the abundance of nitrogen metabolism genes in surface water samples.

[0049] (4) Building a dataset The target variable nitrogen metabolism gene abundance data was preprocessed. Specifically, the 0 value in the target variable was replaced by 1 / 10 of the minimum value of the variable, and then all data were uniformly logarithmically transformed with a base of 10 to normalize the scale of the data and reduce the skewness of the data. With water quality physical and chemical indicators as explanatory variables and nitrogen metabolism gene abundance as the target variable (as shown in Table 2), a complete data set was formed.

[0050] Table 2 Explanatory variables and target variables

[0051] (5) Building a prediction model The automatic machine learning (AutoML) function of the open source machine learning platform H2O was used to automatically screen and train multiple machine learning algorithms such as gradient boosting, random forest, and deep neural network. Before training the model, the data set was divided into a training set and a test set, and the data set was randomly divided in a ratio of 85% for training and 15% for testing. Since the h2o.splitFrame method randomly divides the data set based on a pseudo-random number sequence generated by a computer, the distribution of samples may be different at each division. This difference may cause slight changes in the number of samples in Tables 3-14. The training set was used to build a prediction model, and the test set was used to evaluate the generalization performance of the model. During the training process, the model automatically tuned hyperparameters to improve the prediction accuracy. After the training was completed, the test set was used to test the model. The prediction model of nitrogen metabolism process was established with 15 water quality physical and chemical indicators as explanatory variables and the abundance of nitrogen metabolism genes napA, nxrB, nasA, nirB, glnA, and gdh as target variables (as shown in Table 2). The mean-square error (MSE) and coefficient of determination (R) of the predictions based on the training set 2 ) to evaluate the model training effect, and use the test set to evaluate the generalization performance of the model.

[0052] (6) Interpretability Analysis Partial dependence plots (PDPs) and SHAP values ​​were used to analyze the effects of different environmental variables on nitrogen metabolism.

[0053] When conducting partial dependency analysis, h2o, dplyr, and ggplot2 packages were mainly used. h2o is used to build and predict machine learning models; dplyr is used for data manipulation, especially to extract the unique values ​​of the specified feature columns in the input data frame for partial dependency analysis; ggplot2 is used to draw partial dependency graphs and use the locally weighted regression (LOESS) smooth curve to show the relationship between features and prediction results, helping to reveal the impact of features on model predictions.

[0054] When performing SHAP analysis, the h2o and shapviz packages were mainly used. h2o is used to build and predict machine learning models; the shapviz() function is used to calculate and visualize the SHAP values ​​of the model for features, specifying the features to be analyzed and the training data. The shapviz() function automatically sorts the features by their contribution, so that the features with greater influence are ranked first, making it easier to identify the most important features.

[0055] Example 2 Verification of prediction model and prediction results This embodiment provides a prediction model based on automatic machine learning to predict the abundance of river nitrogen metabolism genes and their key influencing factors.

[0056] (1) Model training effect based on training set The results of predicting the abundance of gene napA using all explanatory variables based on the training set are shown in Table 3 , and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (a) Red part. It can be seen that the prediction model can achieve a strong fitting effect on the prediction of gene napA abundance in the training set (R 2 =0.826), and the MSE is 0.030.

[0057] Table 3 Training effect of napA abundance (logarithmized) prediction model based on training set Training set samples Actual value Predicted value Training set samples Actual value Predicted value 1 -2.08294 -2.05723 11 -1.89126 -1.86600 2 -2.08306 -2.06791 12 -1.68792 -1.74873 3 -1.84519 -1.84075 13 -1.66290 -2.24602 4 -1.82809 -1.88598 14 -2.64726 -2.60932 5 -1.82267 -1.87110 15 -2.32638 -2.37134 6 -1.73147 -1.75395 16 -1.90581 -2.02103 7 -1.76831 -1.75254 17 -1.85623 -1.83091 8 -2.04372 -2.03677 18 -1.73966 -1.75790 9 -1.80145 -1.87652 19 -2.06116 -2.09188 10 -2.21221 -1.80718 20 -2.59860 -2.53058 Note: Due to the large sample size of the data set, only some results are presented. The same applies to Tables 4-8 The results of predicting the abundance of gene nxrB using all explanatory variables based on the training set are shown in Table 4 , and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (b) Red part. It can be seen that the prediction model can achieve a strong fitting effect on the prediction of the abundance of gene nxrB in the training set (R 2 =0.839), and the MSE is 0.157.

[0058] Table 4 Training effect of prediction model based on nxrB abundance (logarithmized) of training set Training set samples Actual value Predicted value Training set samples Actual value Predicted value 1 -2.28294 -2.81469 11 -2.32717 -2.34044 2 -4.52288 -3.82347 12 -2.21314 -2.57208 3 -1.99241 -2.41533 13 -4.52288 -3.97612 4 -4.52288 -3.72170 14 -4.52288 -3.87993 5 -2.87856 -3.02371 15 -3.21100 -3.42107 6 -2.04697 -2.41561 16 -2.93522 -3.72679 7 -3.15331 -3.16192 17 -4.52288 -4.27302 8 -2.69556 -3.03500 18 -4.52288 -4.33743 9 -2.44362 -2.89771 19 -4.52288 -4.07030 10 -2.78489 -2.78905 20 -2.97590 -2.96877 The results of predicting the abundance of gene nasA using all explanatory variables based on the training set are shown in Table 5 , and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (c) Red part. It can be seen that the prediction model can achieve a strong fitting effect on the prediction of gene nasA abundance in the training set (R 2 =0.909), and the MSE is 0.004.

[0059] Table 5 Training effect of prediction model based on nasA abundance (logarithmized) of training set Training set samples Actual value Predicted value Training set samples Actual value Predicted value 1 -1.99575 -2.00512 11 -1.78826 -1.82633 2 -2.22642 -2.12081 12 -2.08255 -1.98191 3 -2.05713 -2.03839 13 -1.82009 -1.83381 4 -1.75594 -1.80544 14 -1.79220 -1.69757 5 -1.98611 -1.94876 15 -1.83531 -1.88225 6 -1.89066 -1.91081 16 -1.70495 -1.83644 7 -1.75377 -1.79826 17 -1.73649 -1.78387 8 -1.69636 -1.70750 18 -2.12973 -2.06320 9 -1.72893 -1.72246 19 -1.80915 -1.81636 10 -1.98370 -1.85262 20 -1.94389 -1.78981 The results of predicting the abundance of gene nirB using all explanatory variables based on the training set are shown in Table 6 , and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (d) Red part. It can be seen that the prediction model can achieve a strong fitting effect on the prediction of the abundance of the gene nirB in the training set (R 2 =0.864), and the MSE is 0.004.

[0060] Table 6 Training effect of prediction model based on nirB abundance (logarithmized) of training set Training set samples Actual value Predicted value Training set samples Actual value Predicted value 1 -1.56577 -1.53095 11 -1.50838 -1.49617 2 -1.52577 -1.51177 12 -1.52505 -1.54479 3 -1.44975 -1.42672 13 -1.47661 -1.30583 4 -1.46270 -1.45988 14 -1.67979 -1.56667 5 -1.35983 -1.39471 15 -1.34261 -1.46561 6 -1.46999 -1.49322 16 -1.31907 -1.46477 7 -1.29752 -1.31470 17 -1.28592 -1.38061 8 -1.31751 -1.28530 18 -1.56330 -1.52986 9 -1.60225 -1.50075 19 -1.60243 -1.54917 10 -1.69975 -1.63226 20 -1.65918 -1.51671 The results of predicting the abundance of gene glnA using all explanatory variables based on the training set are shown in Table 7 , and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (e) Red part. It can be seen that the prediction model can achieve a strong fitting effect on the prediction of the abundance of the gene glnA in the training set (R 2 =0.705), and the MSE is 0.002.

[0061] Table 7 Training effect of the prediction model based on the abundance of glnA in the training set (after logarithmization) Training set samples Actual value Predicted value Training set samples Actual value Predicted value 1 -1.02594 -0.98176 11 -0.77232 -0.77600 2 -1.04494 -0.99411 12 -0.87401 -0.86082 3 -0.75378 -0.83120 13 -1.00805 -0.78193 4 -0.99795 -0.96674 14 -0.74028 -0.75991 5 -0.88873 -0.90207 15 -0.77940 -0.76825 6 -0.83139 -0.87148 16 -0.72237 -0.89538 7 -1.04640 -0.96956 17 -0.85403 -0.86292 8 -0.80084 -0.79825 18 -0.97797 -0.92233 9 -0.93790 -0.91062 19 -0.90060 -0.88223 10 -0.75098 -0.78465 20 -0.82782 -0.78964 The results of predicting the abundance of the gene gdh using all explanatory variables based on the training set are shown in Table 8 , and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (f) Red part. It can be seen that the prediction model can achieve a strong fitting effect on the prediction of the abundance of the gene gdh in the training set (R 2 =0.780), and the MSE is 0.005.

[0062] Table 8 Training effect of prediction model based on gdh abundance (logarithmized) of training set Training set samples Actual value Predicted value Training set samples Actual value Predicted value 1 -1.51610 -1.49571 11 -1.54055 -1.53622 2 -1.59637 -1.56849 12 -1.38402 -1.51068 3 -1.40014 -1.40861 13 -1.60010 -1.56941 4 -1.40072 -1.42196 14 -1.50431 -1.53148 5 -1.31474 -1.39576 15 -1.39129 -1.52770 6 -1.56929 -1.51994 16 -1.40640 -1.43854 7 -1.49393 -1.50062 17 -1.34515 -1.49036 8 -1.44521 -1.47969 18 -1.41382 -1.43715 9 -1.59505 -1.49735 19 -1.49335 -1.52802 10 -1.51337 -1.51573 20 -1.54313 -1.56281 (2) Model prediction effect based on the test set The prediction model based on the training set is used in the test set to verify the generalization ability of the model, that is, the prediction ability for new data sets, using the mean square error MSE and the fitting coefficient R 2 Conduct an assessment.

[0063] The prediction results of the constructed optimal prediction model for gene napA abundance on the test set are shown in Table 9, and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (a) In the blue part, it can be seen that the prediction model can achieve a strong fitting effect on the prediction of the abundance of gene napA in the test set (R 2 =0.826), MSE is 0.012, and the model generalization performance is good.

[0064] Table 9 Test results of the prediction model based on the test set napA abundance (logarithmized) Test set samples Actual value Predicted value Test set samples Actual value Predicted value 1 -1.66415 -1.71102 6 -1.94818 -1.95999 2 -1.92496 -1.94791 7 -1.98449 -1.99059 3 -1.45964 -1.69214 8 -1.57306 -1.80790 4 -2.14384 -2.13452 9 -1.92527 -1.97531 5 -2.07209 -2.07060 10 -2.39830 -2.48820 The prediction results of the constructed optimal prediction model for gene nxrB abundance on the test set are shown in Table 10, and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (b) In the blue part, it can be seen that the prediction model can achieve a strong fitting effect on the abundance of gene nxrB in the test set (R 2=0.846), MSE is 0.099, and the model has good generalization performance.

[0065] Table 10 Test results of the prediction model based on the abundance of nxrB in the test set (after logarithmization) Test set samples Actual value Predicted value Test set samples Actual value Predicted value 1 -2.31769 -2.63870 6 -3.60199 -3.33429 2 -3.35356 -2.96530 7 -3.28283 -3.23318 3 -4.52288 -4.34343 8 -4.52288 -4.36269 4 -3.02197 -3.31711 9 -2.23109 -2.56586 5 -2.56078 -3.11468 The prediction results of the constructed optimal prediction model for gene nasA abundance on the test set are shown in Table 11, and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (c) In the blue part, it can be seen that the prediction model can achieve a strong fitting effect on the prediction of nasA abundance of genes in the test set (R 2 =0.913), MSE is 0.004, and the model has good generalization performance.

[0066] Table 11 Test results of the prediction model based on the nasA abundance (logarithmized) of the test set Test set samples Actual value Predicted value Test set samples Actual value Predicted value 1 -2.00096 -1.94782 6 -1.82730 -1.85210 2 -2.12499 -2.11437 7 -1.78591 -1.78017 3 -1.70269 -1.72205 8 -1.84506 -1.89057 4 -1.58834 -1.67539 9 -1.87821 -1.79038 5 -2.31404 -2.17023 10 -1.57445 -1.58894 The prediction results of the constructed optimal prediction model for gene nirB abundance on the test set are shown in Table 12, and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (d) In the blue part, it can be seen that the prediction model can achieve a strong fitting effect on the abundance of the gene nirB in the test set (R 2 =0.862), MSE is 0.007, and the model has good generalization performance.

[0067] Table 12 Test results of the prediction model based on the abundance of nirB in the test set (after logarithmization) Test set samples Actual value Predicted value Test set samples Actual value Predicted value 1 -1.47041 -1.48748 6 -1.06801 -1.08440 2 -1.57091 -1.54455 7 -1.38169 -1.38059 3 -1.39140 -1.40353 8 -1.34865 -1.37042 4 -2.01010 -1.77000 9 -1.38382 -1.28320 5 -1.51328 -1.46925 10 -1.31222 -1.32550 The prediction results of the constructed optimal prediction model for gene glnA abundance on the test set are shown in Table 13, and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (e) In the blue part, it can be seen that the prediction model can achieve a strong fitting effect on the prediction of the abundance of the gene glnA in the test set (R 2 =0.710), MSE is 0.003, and the model has good generalization performance.

[0068] Table 13 Test results of the prediction model based on the abundance of glnA in the test set (after logarithmization) Test set samples Actual value Predicted value Test set samples Actual value Predicted value 1 -0.76095 -0.77233 6 -0.79141 -0.81148 2 -0.84940 -0.81895 7 -1.03793 -0.90531 3 -0.94472 -0.92545 8 -0.73666 -0.76493 4 -0.82286 -0.81647 9 -0.85691 -0.86162 5 -0.73296 -0.79108 The prediction results of the constructed optimal prediction model for gene gdh abundance on the test set are shown in Table 14, and the fitting results of the predicted values ​​and observed values ​​are shown in Figure 1 (f) In the blue part, it can be seen that the prediction model can achieve a strong fitting effect on the prediction of the abundance of the gene gdh in the test set (R 2 =0.767), MSE is 0.005, and the model has good generalization performance.

[0069] Table 14 Test results of the prediction model based on the gdh abundance (logarithmized) of the test set Test set samples Actual value Predicted value Test set samples Actual value Predicted value 1 -1.55207 -1.51971 6 -1.56097 -1.62545 2 -1.56614 -1.53656 7 -1.75207 -1.71941 3 -1.27784 -1.46041 8 -1.60035 -1.62456 4 -1.41293 -1.41747 9 -1.64103 -1.61736 5 -1.35044 -1.35081 Figure 1 The results show the model training effect and test effect of using 15 water quality physical and chemical indicators in the embodiment of the present invention to predict the abundance of gene napA (belonging to the denitrification pathway), gene nxrB (belonging to the nitrification pathway), gene nasA (belonging to the assimilative nitrate reduction process), gene nirB (belonging to the dissimilative nitrate reduction process), gene glnA (organic nitrogen synthesis process) and gene gdh (organic nitrogen degradation process). The mean square error MSE and fitting coefficient R 2 Evaluate model training and generalization performance.

[0070] Figure 2 The SHAP values ​​of 15 environmental factors on the abundance of each gene in the prediction model of gene napA abundance, nxrB abundance, nasA abundance, nirB abundance, glnA abundance and gdh abundance are shown. A positive SHAP value indicates that the factor increases the abundance of the gene, while a negative value indicates a decrease.

[0071] Figure 3 Shown is a partial dependence diagram of the effects of environmental factors on the abundance of each gene in the prediction model for the abundance of genes napA, nxrB, nasA, nirB, glnA and gdh.

[0072] Figure 4 It is a flow chart of the method for constructing a nitrogen metabolism gene abundance prediction model described in the present invention.

[0073] The above results show that the nitrogen metabolism prediction model constructed by the method of the present invention can achieve strong fitting prediction accuracy, has good generalization performance, and can identify the key water quality factors and their influences of each nitrogen metabolic process.

[0074] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.

Claims

1. A method for predicting the abundance of river nitrogen metabolism genes and their key influencing factors based on automatic machine learning, characterized in that: The following steps are involved: (1) Collect water samples from several rivers, obtain data on 15 conventional physical and chemical indicators of the water samples through testing, and obtain the abundance data of representative functional genes in each nitrogen metabolic pathway through metagenomic sequencing; construct a data set using the 15 water quality physical and chemical indicators as explanatory variables and the abundance of each nitrogen metabolic gene as the target variable; (2) Randomly divide the constructed data set into training set and test set; use the automatic machine learning function of the H2O platform to screen the optimal algorithm, and establish a nitrogen metabolism gene abundance prediction model based on the screened optimal algorithm, and train and test the model; (3) Use the prediction model to predict the abundance of nitrogen metabolism genes in the water samples to be tested, and evaluate the model performance based on the mean square error (MSE) and the fitting coefficient (R²); (4) Implement interpretability analysis of the prediction model through SHAP value graph and PDP; In step (1), the 15 water quality physical and chemical indicators include: water temperature (Temp), pH, dissolved oxygen (DO), oxidation-reduction potential (ORP), conductivity (COND), ammonia nitrogen (NH4 + -N), nitrate (NO3 - -N), nitrite (NO2 - -N), total nitrogen (TN), phosphate phosphorus (PO4 3- -P), total phosphorus (TP), dissolved organic carbon (DOC), chlorophyll a (Chl-a), chemical oxygen demand (CODcr), and total dissolved solids (TDS).

2. The method according to claim 1, characterized in that: In step (1), the representative functional genes of the nitrogen metabolism pathway include: representative functional genes of the denitrification process napA , Representative functional genes of nitrification process nB , Representative functional genes of assimilation nitrate reduction process nasA Representative functional genes of dissimilatory nitrate reduction process nirB Representative functional genes in the organic nitrogen synthesis process gL Representative functional genes in the organic nitrogen degradation process gdh.

3. The method according to claim 1, characterized in that: In step (1), the process of obtaining nitrogen metabolism gene abundance from metagenomic data includes DNA extraction and high-throughput sequencing, followed by data cleaning, splicing and host DNA removal. Representative functional genes of the nitrogen metabolism process are identified through alignment and annotation tools, and the gene abundance is calculated based on the sequence alignment results.

4. The method according to claim 1, characterized in that: In step (1), the target variable nitrogen metabolism gene abundance data is preprocessed, that is, the 0 value of the target variable is replaced by 1 / 10 of the minimum value and then uniformly logarithmized.

5. The method according to claim 1, characterized in that: In step (2), the data set of the river water samples is randomly divided into a training set and a test set, the training set is used to train the prediction model, and the test set is used to test the generalization ability of the prediction model, with 85% of the data set used for training and 15% for testing.

6. The method according to claim 1, characterized in that: In step (2), the automatic machine learning function of H2O is used to automatically select the best model and set the maximum running time and model number limit; AutoML uses different algorithms for model training and hyperparameter tuning, including Gradient Boosting Machine (GBM), Deep Learning (DeepLearning), Random Forest (Random Forest), and eXtreme Gradient Boosting. The mean square error (MSE) and fitting coefficient (R²) of each algorithm model on the training set and test set are compared, and the model with the smallest MSE or the largest R² is selected as the optimal model algorithm.

7. The method according to claim 1, characterized in that: In step (2), the optimal algorithm selected by AutoML of the H2O platform is the GBM algorithm, and the h2o.gbm() function in the H2O platform is used to establish the optimal prediction model for the abundance of river nitrogen metabolism genes.

8. The method according to claim 1, characterized in that: In step (3), the performance of the prediction model is evaluated by MSE and R², where: When R 2 When ≤0.3, the predicted value and the observed value have a poor fitting effect, and the prediction ability of the prediction model is poor; When 0.3<R 2 When ≤0.4, the fitting effect between the predicted value and the observed value is weak, and the prediction ability of the prediction model is weak; When 0.4<R 2 When ≤0.6, the fitting effect between the predicted value and the observed value is moderate, and the prediction ability of the prediction model is moderate; When 0.6<R 2 When ≤1.0, the predicted value and the observed value have a strong fitting effect, and the prediction model has a strong prediction ability.

9. Application of the method for predicting river nitrogen metabolism gene abundance and its key influencing factors based on automatic machine learning as described in claim 1 in analyzing the relative contribution of various water quality indicators to river nitrogen metabolism gene abundance using a SHAP value graph.

10. The method for predicting the abundance of nitrogen metabolism genes in rivers and their key influencing factors based on automatic machine learning as described in claim 1 is used to analyze the impact of various water quality indicators on the abundance of nitrogen metabolism genes in rivers using partial dependence diagrams.

Citation Information

Cited By

  • River nitrogen concentration simulation method based on functional gene abundance

    CN120375942A

  • AI monitoring evaluation method and system for nitrogen reduction in sewage treatment

    CN121545625A

  • An ai monitoring and evaluation method and system for nitrogen reduction in sewage treatment

    CN121545625B