A method for classifying plant biocontrol beneficial microorganisms and pathogenic microorganisms by genome
Patent Information
- Application Number
- CN202610924068.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-10-13
AI Technical Summary
[0006]为解决或部分解决相关技术中存在的问题,本申请提供一种植物生防有益微生物与致病微生物基因组分类方法,旨在解决缺乏专门针对植物生防微生物领域、兼具高精度和高鲁棒性的轻量化基因组分类技术的问题
针对植物生防微生物领域首次筛选出10个核心k-mer特征标志物GAGT、ACTC、AGTC、CCAAGA、AGTCTC、CCAAGAA、CCAAGAT、TCTTGGG、GTCCAAGA、GTGTCTTG,通过在双层增量特征选择之后引入差异倍数值、科恩效应量和韦尔奇t检验等多维度统计指标进行特征平衡性分析,有效去除了过度富集特征,提高模型的泛化鲁棒性;仅需10个特征即可实现高维初始特征高效压缩,基于XGBoost模型在独立测试集上取得的优异分类性能,使用的特征数量极少、大幅低于已有方案,显著降低算力消耗;同时,10个特征具有明确的碱基序列含义和可解释的差异模式,并封装了支持从原始测序读段到分类结果全自动化分析的宏基因组分类工具,便于在植物生防微生物资源筛选中实际推广应用。
Smart Images

Figure CN122907126A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of microbial classification technology, and in particular to a method for classifying the genomes of beneficial and pathogenic microorganisms used in plant biocontrol. Background Technology
[0002] In agricultural production, plant diseases are a significant factor affecting crop yield and quality. Utilizing beneficial microorganisms for biological control is an effective means of replacing chemical pesticides and achieving sustainable green agriculture. Common beneficial plant biocontrol microorganisms include Bacillus, Pseudomonas, Trichoderma, and Streptomyces, while common plant pathogenic microorganisms include Fusarium, Phytophthora, Rhizoctonia, and Blastomyces. Rapidly and accurately distinguishing between beneficial and pathogenic microorganisms from complex metagenomic data is of great significance for the development and utilization of agricultural microbial resources.
[0003] Currently, the main methods used for microbial classification and identification include the following categories: classification methods based on 16S rRNA / ITS amplicon amplification, which only amplify and sequence a single marker gene, have limited resolution, making it difficult to distinguish closely related strains with similar functions, and primer amplification is prone to bias; methods based on whole genome alignment, such as BLAST and Bowtie2, rely on the completeness of the reference database, consume a lot of computational resources, and have limited effectiveness on uncultured microorganisms; and classification methods based on deep learning, which have complex models, poor interpretability, require a large amount of labeled data and GPU computing power, and are not conducive to promotion in grassroots laboratories.
[0004] In recent years, microbial classification methods combining k-mer frequency features and machine learning have attracted attention. These methods convert whole-genome sequences into fixed-dimensional k-mer frequency feature vectors, and then use feature selection algorithms to screen core discriminative features before classification. For example, the iProbiotics method uses k-mer frequency features at seven scales (k=2 to 8) and incremental feature selection (IFS) to screen 184 core features from dairy microbial genomes. A classification model based on SVM is then built for the rapid identification of probiotics in dairy products. However, this technical solution focuses on the classification of probiotics and non-probiotics in dairy products. The 184 core features it screened directly reflect the genomic composition characteristics of microorganisms in dairy products. However, plant biocontrol bacteria and crop pathogens have significant differences in taxonomic status and genomic composition. Existing features and models cannot be directly transferred to the task of classifying plant biocontrol microorganisms. Existing technologies directly use the core features for model construction after screening, lacking a systematic evaluation of the distribution balance of candidate features between the two types of microorganisms. Although the screened features have the best statistical discriminative power, they may have distribution bias in practical applications, affecting generalization ability. Moreover, the large number of core features screened results in high computational costs for feature extraction and model inference, which is not conducive to lightweight deployment in resource-constrained environments.
[0005] Therefore, there is an urgent need for a method specifically for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol, which can screen out specific discriminative features from the unique genomic data in this field, while taking into account both high classification accuracy and lightweight deployment requirements. Summary of the Invention
[0006] To address or partially address the problems existing in related technologies, this application provides a method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol, aiming to solve the problem of the lack of a lightweight genome classification technology that is both highly accurate and robust, specifically for the field of plant biocontrol microorganisms.
[0007] This application provides a method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol, including: Collect whole genome sequence data of known categories of microorganisms, including genomes of beneficial biocontrol microorganisms and pathogenic microorganisms, each genome containing one or more nucleic acid sequences; Extract all k-mer normalized frequency features within a preset k-value range from the whole genome sequence data to construct an initial feature matrix; A two-layer incremental feature selection strategy is used to filter the initial feature matrix to obtain a set of candidate core features; For each feature in the candidate core feature set, a distribution balance assessment is performed. The distribution balance assessment includes calculating the difference fold and Welch t-test p-value of the feature between beneficial plant biocontrol microorganisms and pathogenic plant microorganisms, and calculating the Cohen effect size and coefficient of variation. Based on the results of the distribution balance assessment, the final core k-mer feature markers are selected from the candidate core feature set. Using core k-mer feature markers, k-mer frequency feature vectors of corresponding dimensions are directly calculated from the FASTA files of each genome, and machine learning classification models are trained using the k-mer frequency feature vectors. The trained machine learning classification model and core k-mer feature markers are packaged into a complete metagenomic classification tool, which is then used to classify the microorganisms to be tested.
[0008] In some implementations, the following three stages are included: Phase 1: Genome-wide extraction of multi-scale k-mer features Step S101: Genome Data Collection and Preprocessing. Collect whole genome sequence data of known microbial categories, including beneficial biocontrol microorganism genomes and pathogenic microorganism genomes. Beneficial microorganism genomes are considered positive samples, and pathogenic microorganism genomes are considered negative samples; a total of 869 genome samples are collected, comprising 441 beneficial biocontrol microorganism genomes and 428 pathogenic microorganism genomes. Each genome contains one or more nucleic acid sequences (contigs / scaffolds). The genome data are stratified and randomly divided into training and test sets at a 9:1 ratio.
[0009] Step S102: Construct a multi-scale k-mer index mapping. For seven k values (k=2, 3, 4, 5, 6, 7, 8), generate all possible k-mer sequences composed of the four bases A, T, C, and G. Assign a unique global feature index to each k-mer and establish a mapping dictionary from k-mer to feature index. The number of k-mers corresponding to each k value is: k=2: =16 types; k=3: =64 types; k=4: =256 types; k=5: =1024 types; k=6: =4096 types; k=7: =16384 types; k=8: =65536 types. Total feature dimension = 16 + 64 + 256 + 1024 + 4096 + 16384 + 65536 = 87376 dimensions.
[0010] Step S103: Extract k-mer frequency features for each genome sample. For each genome sample, which contains all its contig sequences, perform the following operations: (a) Convert the sequence to uppercase letters and mark non-ATCG characters as N; (b) For each k value, extract all k-mer substrings of length k sequentially along the sequence using a sliding window, skipping k-mers containing N, and count the occurrences of each k-mer; (c) Calculate the normalized frequency. ,in, For frequency, L represents the occurrence count, and L represents the total number of bases, which is the total number of bases in all sequences of this sample; (d) fill the normalized frequencies into the corresponding positions of the 87376-dimensional feature vector.
[0011] Repeat the above operation for all 869 genome samples to obtain an 869×87376 feature matrix X and the corresponding class label vector y.
[0012] Phase Two: Two-Layer Incremental Feature Selection and Feature Balance Analysis A two-layer incremental feature selection (IFS) strategy was adopted, combined with feature balance analysis, to screen out discriminative core features from 87,376 features for plant biocontrol microorganism data.
[0013] First-level IFS: Grouping and filtering by k value Step S201: Perform incremental feature selection independently for each feature group with k values. For each feature subset corresponding to a k value, perform the following operations: (a) F-score sorting: Calculate the F-score of each feature in the group relative to the class label. Based on the univariate feature evaluation of ANOVA F-value, sort the features by F-score from largest to smallest. The higher the F-score, the stronger the feature's ability to distinguish between beneficial and pathogenic bacteria; (b) Incremental feature addition: Starting with the feature with the highest F-score, add one feature at a time. Use a support vector machine as the evaluation classifier and evaluate the classification accuracy of the current feature subset through 10-fold hierarchical cross-validation; (c) Determine the optimal number of features for each group: As the number of features gradually increases, the cross-validation accuracy first rises and then falls or tends to stabilize. Record the number of features that maximizes the cross-validation accuracy as the optimal feature subset for that k value group; (d) Evaluate at most the top 500 high F-score features for each group to control the computational load.
[0014] Step S202: Summarize the results of the first-level screening, and merge the optimal feature subsets selected by each of the 7 k-value groups to obtain the first-level selected feature set. The first-level screening achieves initial compression from 87376 dimensions to several hundred dimensions.
[0015] Second-layer IFS: Globally selected core features Step S203: Perform global incremental feature selection on the selected features after merging in the first layer. (a) Merge all features obtained from the first layer into a candidate feature pool. (b) Recalculate the F-score and sort the candidate feature pool. (c) Incremental feature addition (IFS): Starting from the feature with the highest F-score, add one feature at a time, and evaluate the classification accuracy using RBF kernel support vector machine (SVM) and 10-fold hierarchical cross-validation. (d) Record the number of features that maximizes the global cross-validation accuracy. The feature subset corresponding to this number is the final core feature set.
[0016] After a two-layer IFS screening, 13 core features were finally selected from 87,376 candidate features, with a feature compression ratio of 87,376:13=6721:1.
[0017] Step S204: Perform balance assessment and secondary screening of the core features. For the 13 selected core features, calculate the following statistical indicators: (a) Fold Change (FC): the mean of the feature in beneficial bacteria / the mean of the feature in pathogenic bacteria, which measures the difference in the fold change of the feature expression between the two types of microorganisms; (b) Welch's t-test p-value: test whether the difference in the distribution of the feature between beneficial bacteria and pathogenic bacteria is statistically significant, p < 0.05 is significant; (c) Cohen's d effect size: measure the absolute size of the feature difference, |d| > 0.8 is a large effect; (d) Coefficient of variation CV: standard deviation / mean, which measures the stability of the feature within the category.
[0018] Based on the above calculation indicators, the features are classified into balanced features and non-balanced high-quality features. Balanced features: Fold Change is between 0.5 and 2.0, showing expression to a certain extent in both types of microorganisms, with a relatively uniform distribution. Non-balanced high-quality features: Fold Change exceeds the 0.5-2.0 range, but is highly enriched in a certain type of microorganism, while Cohen's d effect size is large and statistically significant, exhibiting strong unidirectional discriminative ability. Detailed analysis results of the 13 core features are shown in the table below: A negative Cohen's d value indicates that the feature is enriched in pathogenic microorganisms, meaning that the frequency is higher in pathogenic bacteria than in beneficial bacteria. Fold Change < 1 also confirms this trend. The p-values for all 13 features are much less than 0.01, indicating a significant statistical difference between beneficial and pathogenic bacteria.
[0019] Step S205: Final feature selection based on balance analysis. Using statistical screening methods, 10 high-quality features were selected from 13 core features as the final classification feature set, retaining features that are statistically significant (p < 0.05) and have a Fold Change between 0.33 and 3.0. This condition removed three over-enriched features with a Fold Change below 0.33: GACT (4-mer, FC = 0.291), AGACTC (6-mer, FC = 0.329), and GAGACT (6-mer, FC = 0.275). These three features are over-enriched in pathogenic bacteria; an FC < 0.33 means their frequency in pathogenic bacteria is more than three times that of beneficial bacteria, potentially introducing class-specific overfitting risk. Finally, 10 features with FC values in the range of 0.33-3.0 were retained, possessing both statistical significance and moderate inter-class differences.
[0020] The final 10 core features are: 4-mer (k=4, 3 features): GAGT, ACTC, AGTC; 6-mer (k=6, 2 features): CCAAGA, AGTCTC; 7-mer (k=7, 3 features): CCAAGAA, CCAAGAT, TCTTGGG; 8-mer (k=8, 2 features): GTCCAAGA, GTGTCTTG.
[0021] These 10 features include: 4 balanced features GAGT, ACTC, AGTC, and AGTCTC, with Fold Change between 0.5 and 2.0, expressed in both types of microorganisms but with significant differences in frequency; and 6 non-balanced high-discrimination features CCAAGA, CCAAGAA, CCAAGAT, TCTTGGG, GTCCAAGA, and GTGTCTTG, which are more enriched in pathogenic bacteria and have strong unidirectional discrimination ability.
[0022] Phase 3: Training machine learning models based on core features and building classification tools Step S301: Prepare training data. Using the 10 selected core features, directly calculate the corresponding 10-dimensional k-mer frequency feature vectors from the FASTA files of each genome. Stratify and randomly divide the dataset into a training set of 782 samples and an independent test set of 87 samples at a 9:1 ratio, maintaining a consistent ratio of positive to negative samples during the partitioning.
[0023] Step S302: Multi-model comparative training. Three machine learning models are trained simultaneously, all using grid search with 5-fold hierarchical cross-validation for hyperparameter optimization. (a) Random Forest: Search Space: Number of Decision Trees Maximum depth Minimum number of samples required for internal node repartitioning Minimum number of samples required for leaf nodes The optimal parameter combination determined by grid search is: , , =2, =2; The classification accuracy on the independent test set was 97.70%, the F1 score was 0.9773, and the AUC was 99.89%.
[0024] (b) Support Vector Machine (SVM, RBF): Search space: penalty coefficient C=[0.1,1,10,100], kernel function coefficient gamma=[0.001,0.01,0.1,1,'scale']; before training, the features are standardized using the StandardScaler processor; the optimal parameter combination determined by grid search is: C=1, gamma=1; the classification accuracy on the independent test set is 98.85%, the F1 score is 0.9885, and the AUC value is 99.89%.
[0025] (c) XGBoost (extreme gradient boosting, ultimately chosen): Search space: number of iterative decision trees The maximum depth of the tree Learning rate The optimal parameter combination determined by grid search is: =0.01, , =300; the classification accuracy on the independent test set was 98.85%, the F1 score was 0.9888, the AUC was 99.95%, and the recall was 100%.
[0026] Step S303: Model selection. A comprehensive comparison of F1 score, accuracy, and recall led to the selection of XGBoost as the final classification model. The reasons for this selection are as follows: Although both SVM and XGBoost achieved a test set accuracy of 98.85%, XGBoost outperformed SVM in the following key metrics: (a) F1 score: XGBoost achieved 0.9888, higher than SVM's 0.9885; (b) Beneficial bacteria recall: XGBoost achieved 100% (44 / 44), higher than SVM's 97.73% (43 / 44), meaning SVM would miss one beneficial bacteria sample, while XGBoost achieved zero omissions; (c) In the plant biocontrol microbial screening scenario, the cost of missing beneficial biocontrol bacteria is far higher than misclassifying pathogenic bacteria. Therefore, a 100% beneficial bacteria recall rate was the decisive factor in selecting XGBoost. The confusion matrix of the XGBoost model on the test set is as follows: 42 pathogenic bacteria were correctly classified and 1 was misclassified, with an accuracy of 97.7%; 44 beneficial bacteria were correctly classified and 0 were misclassified, with an accuracy of 100%.
[0027] Step S304: Construct an automated classification tool. The trained XGBoost model and 10 core features are encapsulated into a complete metagenomic classification tool, enabling a fully automated analysis process from raw sequencing data to classification results. (a) Input data intelligent recognition module: Reads the first 500 sequences of the input FASTA file, calculates the average length, median length, maximum length and minimum length, and automatically determines the input type as assembled contigs or raw reads according to the rules.
[0028] (b) Sequence assembly module: If the input is reads, SPAdes (meta mode) or MEGAHIT (meta-sensitive mode) is automatically called to assemble from scratch, splicing the reads into contigs.
[0029] (c) Sequence length filtering module: Remove contigs shorter than the preset threshold (default 1000bp) and retain sequences of sufficient length.
[0030] (d) Core feature extraction module: For each retained contig, a sliding window scan sequence is used to extract the normalized frequencies of 10 core k-mer features GAGT, ACTC, AGTC, CCAAGA, AGTCTC, CCAAGAA, CCAAGAT, TCTTGGG, GTCCAAGA, and GTGTCTTG, forming a 10-dimensional feature vector.
[0031] (e) Classification prediction module: Input the 10-dimensional feature vector into the pre-trained XGBoost model and output the classification label beneficial / pathogenic, the predicted probability (beneficial probability, pathogenic probability) and the confidence level.
[0032] (f) Results Output Module: Based on a confidence threshold of 0.9, contigs are divided into three categories: high-confidence beneficial microbial sequences, high-confidence pathogenic microbial sequences, and low-confidence sequences, and each category is output as a separate FASTA file. A classification statistical report is also generated.
[0033] The technical solution provided in this application may include the following beneficial effects: For the first time in the field of plant biocontrol microorganisms, 10 core k-mer feature markers, namely GAGT, ACTC, AGTC, CCAAGA, AGTCTC, CCAAGAA, CCAAGAT, TCTTGGG, GTCCAAGA, and GTGTCTTG, were screened. After a two-layer incremental feature selection, multi-dimensional statistical indicators such as fold change, Cohen effect size, and Welch t-test were introduced for feature balance analysis, effectively removing over-enriched features and improving the model's generalization robustness. Only 10 features are needed to achieve efficient compression of high-dimensional initial features. Based on the excellent classification performance achieved by the XGBoost model on independent test sets, the number of features used is extremely small, significantly lower than existing schemes, significantly reducing computational consumption. Furthermore, the 10 features have clear base sequence meanings and interpretable difference patterns, and a metagenomic classification tool supporting fully automated analysis from raw sequencing reads to classification results is encapsulated, facilitating practical application in the screening of plant biocontrol microorganism resources.
[0034] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0035] The above and other objects, features and advantages of this application will become more apparent from the more detailed description of exemplary embodiments thereof in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments thereof.
[0036] Figure 1 This is a schematic diagram of the overall technical route of the genomic classification method for beneficial and pathogenic microorganisms in plant biocontrol, as shown in the embodiments of this application; Figure 2 This is a schematic diagram illustrating the multi-scale k-mer feature extraction of the genome classification method for beneficial and pathogenic microorganisms in plant biocontrol, as shown in the embodiments of this application; Figure 3 This is a flowchart of the first-level IFS feature selection process for the genomic classification method of beneficial and pathogenic microorganisms in plant biocontrol, as shown in the embodiments of this application. Figure 4 This is a flowchart of the second-level IFS global feature selection process for the genomic classification method of beneficial and pathogenic microorganisms in plant biocontrol, as shown in the embodiments of this application. Figure 5 This is a diagram showing the characteristic balance analysis results of the genomic classification method for beneficial and pathogenic microorganisms in plant biocontrol, as illustrated in the embodiments of this application; Figure 6 This is a performance comparison diagram of different feature subsets of the genomic classification methods for beneficial and pathogenic microorganisms in plant biocontrol, as shown in the embodiments of this application; Figure 7 This is the confusion matrix diagram of the XGBoost optimal model for the genomic classification method of beneficial and pathogenic microorganisms in plant biocontrol, as shown in the embodiments of this application; Figure 8 This is a flowchart illustrating the operation of the classification tool for the genomic classification method of beneficial and pathogenic microorganisms in plant biocontrol, as shown in the embodiments of this application. Detailed Implementation
[0037] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to make this application more thorough and complete, and to fully convey the scope of this application to those skilled in the art.
[0038] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.
[0039] Example 1: Genomic Data Collection and Preprocessing (1) Data Sources: Microbial whole genome sequences were downloaded from public databases such as NCBI GenBank. Beneficial biocontrol microorganisms: 441 genomes, covering microorganisms with confirmed biocontrol functions such as Bacillus, Pseudomonas, Trichoderma, and Streptomyces. Pathogenic microorganisms: 428 genomes, covering microorganisms known to cause crop diseases such as Fusarium, Phytophthora, Rhizoctonia, and Magnaphalthe. Total: 869 genome samples.
[0040] (2) Data partitioning: The training set and the test set were randomly partitioned in a 9:1 ratio. Training set: 782 samples, 397 beneficial bacteria and 385 pathogenic bacteria. Test set: 87 samples, 44 beneficial bacteria and 43 pathogenic bacteria. Stratified sampling was used to ensure that the ratio of positive to negative samples in the training set and the test set was consistent.
[0041] Example 2: Multi-scale k-mer feature extraction (1) k-mer parameter settings: k value range: k=2,3,4,5,6,7,8, a total of 7 scales, total feature dimensions: 42+43+...+48=87376 dimensions.
[0042] (2) Feature extraction process: For each genome sample containing all its contigs sequences, perform the following operations: a) Convert the sequence to uppercase letters and label non-ATCG characters as N; b) For each k value, extract all k-mers using a sliding window: the window slides from position 0 to position Lk, where L is the total number of bases, skipping k-mers containing N bases, and counting the occurrence frequency of each k-mer; c) Calculate the normalized frequency: ;d) Fill the frequency values into the corresponding index positions of the 87376-dimensional feature vector.
[0043] (3) Output results: Training set feature matrix: 782×87376; Test set feature matrix: 87×87376; k-mer index mapping file. The high proportion of zero features in the feature matrix indicates that most k-mers do not appear or appear at very low frequencies in a specific genome, so feature screening is necessary.
[0044] Example 3: Two-layer incremental feature selection First-level IFS: Grouping and filtering by k value For each k-value group from k=2 to 8, perform the following steps: Taking k=4 (256-dimensional features) as an example: a) Calculate the F-score of all 256 4-mer features and sort them in descending order of F-score; b) Take the first feature with the highest F-score, train an SVM (RBF kernel), perform 10-fold cross-validation, and record the accuracy; c) Take the two features with the highest F-scores, train an SVM, perform 10-fold cross-validation, and record the accuracy; d) Gradually increase the number of features to 100 and plot the "feature count - accuracy" curve; e) Find the number of features that maximizes the cross-validation accuracy, and use this as the optimal feature subset for group k=4. Repeat the above process for k=2, 3, 5, 6, 7, 8 to obtain the optimal feature subset for each group.
[0045] Second-tier IFS: Global Selection a) Merge the first-level screening results of the 7 k-value groups into a candidate feature pool; b) Recalculate the F-score of all features in the candidate feature pool and sort them in descending order; c) Incrementally add features: starting with the feature with the highest F-score, add one feature at a time, and evaluate the accuracy using SVM (RBF kernel) + 10-fold cross-validation; d) Record the feature subset that achieves the highest cross-validation accuracy, which is the final core feature.
[0046] After a two-layer IFS screening process, 13 core features were finally identified: Feature compression ratio: 87376:13 = 6721:1.
[0047] After identifying 13 candidate core features through a two-layer IFS screening, feature balance analysis was further introduced. Multiple statistical indicators, including FoldChange, Cohen's d, and Welch's t tests, were used to refine the candidate features, ultimately determining 10 more robust core feature markers. Furthermore, the specific sequences of the 10 selected k-mer features are GAGT, ACTC, AGTC, CCAAGA, AGTCTC, CCAAGAA, CCAAGAT, TCTTGGG, GTCCAAGA, and GTGTCTTG. These 10 k-mer features are the first to be identified specifically for the unique genomic composition characteristics of plant biocontrol microorganisms.
[0048] Example 4: Feature Balance Analysis A detailed statistical analysis of the 13 core features was conducted: Fold Change Analysis: Four balanced traits with FC between 0.5 and 2.0 were identified: GAGT (FC=0.559), ACTC (FC=0.557), AGTC (FC=0.615), and AGTCTC (FC=0.618). These traits were expressed in both beneficial and pathogenic bacteria, but their frequencies differed by approximately 1.6-1.8 times. Six unbalanced selected traits with FC between 0.33 and 0.5 were identified: CCAAGA (FC=0.393), CCAAGAA (FC=0.401), CCAAGAT (FC=0.379), TCTTGGG (FC=0.391), GTCCAAGA (FC=0.368), and GTGTCTTG (FC=0.368). These traits were approximately 2.5-2.7 times more frequent in pathogenic bacteria than in beneficial bacteria. Three other over-enriched features were excluded with FC < 0.33: GACT (FC = 0.291), AGACTC (FC = 0.329), and GAGACT (FC = 0.275).
[0049] Effect size analysis: The absolute values of Cohen's d for all 13 features were greater than 2.9, far exceeding the "large effect" threshold of 0.8, indicating that these features showed extremely significant differences between beneficial and pathogenic bacteria.
[0050] Statistical significance: The p-values for all 13 features were in the range of 10⁻⁷⁵ to 10⁻⁸⁹, which were much less than 0.01, indicating that the differences were statistically significant.
[0051] Final selection based on balance analysis: Statistical screening methods were used to select 10 high-quality features from 13 core features. The screening criteria were statistical significance (p < 0.05) and a Fold Change between 0.33 and 3.0. Three of the 13 features were excluded because their Fold Change was below 0.33: GACT (4-mer, FC = 0.291), AGACTC (6-mer, FC = 0.329), and GAGACT (6-mer, FC = 0.275). These features were over-enriched in pathogenic bacteria, but their frequency in beneficial bacteria was only about one-third that of pathogenic bacteria, which may introduce the risk of class-specific overfitting. The final selection retains 10 features: 4-mer (k=4, 3 features): GAGT, ACTC, AGTC; 6-mer (k=6, 2 features): CCAAGA, AGTCTC; 7-mer (k=7, 3 features): CCAAGAA, CCAAGAT, TCTTGGG; 8-mer (k=8, 2 features): GTCCAAGA, GTGTCTTG. The final feature compression ratio is 87376:10 = 8737:1.
[0052] Example 5: Multi-feature subset contrast training To verify the optimality of selecting 10 features, five feature subsets were designed for comparative experiments: Random Forest, SVM, and XGBoost models were trained for each feature subset. The results show that the combination of 10 high-quality features + XGBoost has the best overall performance, with a moderate number of features, balancing accuracy and computational efficiency.
[0053] Example 6: Final Model Performance Evaluation Performance of the XGBoost model (10 core features) on independent test sets: Confusion matrix: Key metrics interpretation: 100% recall rate for beneficial bacteria, with all beneficial bacteria correctly identified and no missed detections; 97.78% precision rate for beneficial bacteria, with only one pathogenic bacterium misidentified as a beneficial bacterium; and similar accuracy rates between the training and test sets, with no significant overfitting.
[0054] Example 7: Use of Classification Tools (a) Classification of assembled genome sequences For assembled microbial genome sequence files (FASTA format), users can perform classification operations via command line, specifying the input file path, output directory, sequence length filtering threshold, and confidence threshold. Specifically, the input file is set to the assembled sequence file, the output directory is set to the result storage path, the minimum sequence length threshold is set to 1000 bp, and the confidence threshold is set to 0.9. The tool will automatically complete feature extraction and classification prediction, and save the results to the specified output directory.
[0055] (ii) Classification of raw sequencing reads For raw sequencing reads (FASTA format) that have not yet been assembled, users can perform classification operations via command line, specifying the input file path, output directory, and number of threads. The tool first automatically determines that the input type is a raw sequencing read, then calls the assembly tool to assemble the reads into genome fragments, and then performs the subsequent classification process. Specifically, the input file is set to the raw read file, the output directory is set to the result storage path, and the number of threads is set to 16 to accelerate computation. The tool automatically completes the entire process of de novo assembly, feature extraction, and classification prediction.
[0056] (III) Custom Parameter Classification The various operating parameters of the classification tool can be flexibly adjusted according to the actual data quality and application needs. For example, the minimum sequence length threshold can be set to 500 bp to retain shorter sequences for analysis; the confidence threshold can be set to 0.85 to adjust the strictness of the classification results. The remaining parameters can be left at their default values, and the tool will execute the complete classification process according to the customized parameters.
[0057] Output results description After the classification tool finishes running, the following files will be generated in the output directory: The high-confidence beneficial microorganism sequence file (classified_beneficial.fasta) contains sequences that the model has determined to be beneficial microorganisms for plant biocontrol with a high confidence level; The high-confidence pathogenic microorganism sequence file (classified_pathogenic.fasta) contains sequences that the model has identified as plant pathogenic microorganisms with a high confidence level. The low-confidence sequence file (classified_low_confidence.fasta) contains sequences whose prediction confidence is lower than a set threshold, for users to further manually review. The classification statistics report file (classification_report.txt) contains evaluation information such as the number of sequences of each type, classification accuracy, and confusion matrix, making it easy for users to intuitively understand the classification results.
[0058] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol, characterized in that, include: Collect whole genome sequence data of known categories of microorganisms, including genomes of beneficial biocontrol microorganisms and pathogenic microorganisms, each genome containing one or more nucleic acid sequences; Extract all k-mer normalized frequency features within a preset k-value range from the whole genome sequence data to construct an initial feature matrix; A two-layer incremental feature selection strategy is used to filter the initial feature matrix to obtain a set of candidate core features; For each feature in the candidate core feature set, a distribution balance assessment is performed. The distribution balance assessment includes calculating the difference fold and Welch t-test p-value of the feature between beneficial plant biocontrol microorganisms and pathogenic plant microorganisms, and calculating the Cohen effect size and coefficient of variation. Based on the results of the distribution balance assessment, the final core k-mer feature markers are selected from the candidate core feature set. Using core k-mer feature markers, k-mer frequency feature vectors of corresponding dimensions are directly calculated from the FASTA files of each genome, and machine learning classification models are trained using the k-mer frequency feature vectors. The trained machine learning classification model and core k-mer feature markers are packaged into a complete metagenomic classification tool, which is then used to classify the microorganisms to be tested.
2. The method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol according to claim 1, characterized in that, The distribution balance of each feature in the candidate core feature set is evaluated, including: Calculate the multiple of difference for candidate core features between beneficial and pathogenic microorganisms, where the multiple of difference is the ratio of the mean frequency of the feature in beneficial microorganisms to the mean frequency of the feature in pathogenic microorganisms; Calculate the Welch t-test p-value for candidate core features between beneficial and pathogenic microorganisms; Calculate the Cohen effect magnitude of candidate core features; Calculate the coefficient of variation of candidate core features within the category of beneficial biocontrol microorganisms and within the category of pathogenic microorganisms; Based on the calculation results, the features are divided into balanced high-quality features and unbalanced high-quality features.
3. The method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol according to claim 1, characterized in that, The final core k-mer feature markers are selected from the candidate core feature set, including: Statistical screening was used to retain statistically significant features with a difference fold between 0.33 and 3.0, while removing over-enriched features with a difference fold below 0.33, resulting in a final classification feature set containing both balanced and unbalanced high-quality features.
4. The method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol according to claim 3, characterized in that: The final core k-mer feature markers are the following 10 k-mer sequences: GAGT, ACTC, AGTC, CCAAGA, AGTCTC, CCAAGAA, CCAAGAT, TCTTGGG, GTCCAAGA, GTGTCTTG; The final classification feature set consists of balanced, high-quality features: GAGT, ACTC, AGTC, and AGTCTC showed fold differences between 0.5 and 2.0, and were expressed in both beneficial and pathogenic microorganisms, but with significant differences in frequency. Unbalanced high-quality features: CCAAGA, CCAAGAA, CCAAGAT, TCTTGGG, GTCCAAGA, and GTGTCTTG were enriched in pathogenic microorganisms and had strong unidirectional discrimination ability.
5. The method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol according to claim 1, characterized in that, The two-layer incremental feature selection strategy includes: The first-level screening involves grouping by k value, sorting the k-mer features within each k-value group by F-score, and selecting incremental features to obtain the optimal feature subset for each k-value group. The second-level screening involves merging the optimal feature subsets of each k-value group, performing global F-score reordering and incremental feature selection to obtain the candidate core feature set.
6. The method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol according to claim 1, characterized in that, The extraction of all k-mer normalized frequency features within a preset k-value range includes: Set the range of k values to k=2, 3, 4, 5, 6, 7, 8, generate all k-mer sequences composed of four bases A, T, C, and G for each k value, and assign a unique global feature index to each k-mer to construct a k-mer index mapping; For each microbial genome sample, extract all substrings of length k one by one along the sequence using a sliding window, count the number of times each k-mer appears in the entire sequence of the sample, and skip k-mers containing non-ATCG characters; Calculate the normalized frequencies of each k-mer. ,in, For frequency, L represents the number of occurrences, and L represents the total number of bases, which is the total number of bases in all sequences of this sample. The normalized frequencies of each k-mer are filled into the positions corresponding to the global feature indices in the initial feature matrix. The total dimension of the initial feature matrix is 87376.
7. The method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol according to claim 1, characterized in that, The collection of whole genome sequence data of known categories of microorganisms includes: Collect the whole genome sequence of beneficial biocontrol microorganisms as positive samples, wherein the beneficial biocontrol microorganisms include microorganisms of the genera Bacillus, Pseudomonas, Trichoderma, or Streptomyces; Collect the whole genome sequence of pathogenic microorganisms as negative samples. The pathogenic microorganisms include microorganisms of the genera Fusarium, Phytophthora, Rhizoctonia, or Oryzae. The collected whole genome sequence data were divided into stratified random partitions to ensure that the ratio of positive to negative samples in the training and test sets was consistent with the overall data.
8. The method for classifying the genomes of beneficial and pathogenic microorganisms in plant biocontrol according to claim 1, characterized in that, Training a machine learning classification model using k-mer frequency feature vectors includes: Microbial whole genome data of known categories are stratified and randomly divided into training set and test set according to a predetermined ratio, wherein the ratio of positive and negative samples in the training set and test set is consistent with the overall data; For each genome sample in the training and test sets, all sequences in the FASTA file are scanned in a sliding window manner. The occurrence frequency of each k-mer in the core k-mer feature markers is counted and divided by the total number of effective k-mers in the corresponding sequence to obtain the normalized frequency, which forms a k-mer frequency feature vector equal to the number of core k-mer feature markers. Multiple machine learning models are trained using the k-mer frequency feature vectors of the training set, and the machine learning models include at least random forest, support vector machine, and extreme gradient boosting. The hyperparameters of the machine learning models were optimized using grid search combined with hierarchical k-fold cross-validation to determine the optimal combination of hyperparameters for each model. The classification performance of each optimized model was evaluated using the test set, and the evaluation metrics included accuracy, precision, recall, F1 score, and AUC. Based on the evaluation results, the final classification model is selected.