Whole genome machine learning method and system for toxoplasma gondii group structure analysis

By employing whole-genome machine learning methods, the accuracy and precision issues of traditional genetic analysis methods in Toxoplasma gondii genetic diversity analysis were addressed. A high-resolution and high-accuracy Toxoplasma gondii population structure analysis system was constructed, enabling real-time typing of Toxoplasma gondii samples and supporting epidemiological tracing.

CN121122409APending Publication Date: 2025-12-12JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511545556.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-28
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Traditional genetic analysis methods are insufficient to meet the needs of high-precision analysis of Toxoplasma gondii genetic diversity. In particular, they lack robust classification models under high-dimensional SNP features and are difficult to maintain accuracy in the context of low sequencing depth and metagenomics, making it impossible to transform them into prospective typing tools in real time.

Method used

A genome-wide machine learning approach was adopted to construct a Toxoplasma gondii population structure analysis system through SNP genotype probability matrix generation, unsupervised population structure analysis, supervised classification modeling, and progressive feature selection. This system includes data processing, unsupervised analysis, model training, and feature optimization, achieving high-resolution and high-accuracy genotyping.

Benefits of technology

It significantly improves the discrimination and generalization ability of Toxoplasma gondii multi-site sequence typing, achieving high-resolution and high-accuracy typing, adapting to the needs of grassroots monitoring and rapid typing, possessing robustness and compactness, and can type new samples in real time and automatically connect with the common typing system, supporting epidemiological tracing and geographic differentiation analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121122409A_ABST
    Figure CN121122409A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of computational biology and parasitic molecule epidemiology, and provides a whole genome machine learning method and system for toxoplasma gondii population structure analysis. According to the method, an SNP genotype probability matrix is constructed by using whole genome sequencing data, an optimal group structure is identified in combination with unsupervised clustering, and then multi-site sequence typing and rapid classification prediction of toxoplasma gondii are realized through supervised tag integration and supervised learning models. According to the method, a closed-loop mechanism of'unsupervised clustering-semi-supervised labeling-supervised learning 'is formed, and interpretability and expandability are achieved while high precision (the average accuracy is about 97%) is kept. According to the method, core information sites are obtained through screening based on progressive feature selection of feature importance, high robustness and accuracy can still be kept under the background of low sequencing depth and metagenome mixing, support is provided for genetic differentiation evaluation, epidemiological traceability and the like, modules are clear and easy to integrate, and efficient landing is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computational biology and parasite molecular epidemiology, and particularly relates to a whole-genome machine learning method and system for analyzing the population structure of Toxoplasma gondii. Background Technology

[0002] Toxoplasma gondii is a protozoan parasite that can infect a variety of hosts, including humans. The toxoplasmosis it causes can have serious health consequences, particularly threatening the health of immunocompromised individuals and pregnant women. The genetic diversity of Toxoplasma gondii plays a crucial role in its adaptation to different hosts and environments; therefore, studying its genetic structure is essential for understanding its epidemiology and evolutionary dynamics.

[0003] Traditional genetic analysis methods, such as restriction fragment length polymorphism (RFLP) and microsatellite typing, have provided fundamental insights into Toxoplasma gondii research, but are often limited by low resolution, failing to fully capture the complexity of the parasite's genetic diversity and thus hindering high-precision analysis, limiting epidemiological surveillance and regional source tracing. With the advent of high-throughput sequencing technology, the generation of large-scale genomic data has become possible, opening new avenues for more detailed and accurate gene analysis. Machine learning (ML) algorithms have become powerful tools for analyzing such complex datasets, promising to reveal hidden patterns and relationships within the genetic data. In particular, multi-site sequence typing (MLST) has been widely used for classifying and differentiating microbial strains, but traditional MLST methods often lack the precision required for analyzing complex organisms such as Toxoplasma gondii. With the widespread adoption of whole-genome sequencing (WGS), single nucleotide polymorphism (SNP) genotype probability matrices have provided a data foundation for high-resolution typing, but challenges remain: ① How to obtain robust and generalizable classification models under high-dimensional SNP features; ② How to maintain accuracy in low sequencing depth and metagenomic contexts; ③ How to transform unsupervised population structures into real-time typing tools that can be applied in the foresight of the market.

[0004] Therefore, this invention proposes a whole-genome machine learning method and system for analyzing the population structure of Toxoplasma gondii. Summary of the Invention

[0005] The purpose of this invention is to provide a whole-genome machine learning method and system for analyzing the population structure of Toxoplasma gondii, aiming to solve the problems mentioned in the background art.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] A genome-wide machine learning method for analyzing the population structure of Toxoplasma gondii includes the following steps:

[0008] SNP genotype probability matrix generation: Obtain whole genome sequencing data of Toxoplasma gondii samples, and generate SNP genotype probability matrices through sequence alignment, format conversion, variant detection and quality control filtering;

[0009] Unsupervised population structure analysis: Based on the SNP genotype probability matrix, a genetic distance matrix between samples is constructed, an agglomerative hierarchical clustering algorithm is used to determine the optimal number of clusters, and semi-supervised labels for supervised learning are generated;

[0010] Supervised classification modeling: Using the SNP genotype probability matrix as input features and semi-supervised labels as target variables, a genotyping model is trained, and the model performance is evaluated through cross-validation.

[0011] Progressive feature selection and optimization: Based on the genotyping model, the feature importance of SNP sites is calculated. High information content SNP sites are selected through threshold scanning and linkage disequilibrium constraints. Missing value imputation is performed on the selected site data.

[0012] Prospective typing and application: Genotype vectors are obtained by detecting the core barcode SNP sites of new Toxoplasma gondii samples. The genotype vectors are then input into the trained typing model, which outputs the typing results and confidence scores of the samples in real time and maps the typing results to the common typing system.

[0013] Furthermore, in the SNP genotype probability matrix generation step: sequence alignment uses the BWA-MEM algorithm; format conversion uses Samtools to process the alignment results into BAM format, complete sorting and indexing, and mark duplicate reads, abnormal insertion fragment lengths, and suboptimal alignment fragments; variant detection is performed using bcftools to generate the original VCF file; and the VCF file is filtered using vcftools.

[0014] Furthermore, in the unsupervised group structure analysis step: the agglomerative hierarchical clustering algorithm adopts the Ward connection method, and the optimal number of clusters is determined by calculating the silhouette coefficient in the range K∈[2,20].

[0015] Furthermore, in the supervised classification modeling step: the classification model is XGBoost, Random Forest, or LightGBM model; the cross-validation is five-fold cross-validation or leave-one-out cross-validation.

[0016] Furthermore, in the progressive feature selection and optimization steps, feature importance is calculated from three dimensions: gain, coverage, and frequency.

[0017] Furthermore, in the prospective typing and application steps, the new Toxoplasma gondii samples include low-depth sequencing samples or metagenomic background samples.

[0018] A genome-wide machine learning system for analyzing the population structure of Toxoplasma gondii includes:

[0019] The data processing module is used to acquire whole genome sequencing data of Toxoplasma gondii samples and generate an SNP genotype probability matrix through sequence alignment, format conversion, variant detection and quality control filtering.

[0020] The unsupervised parsing module is used to construct the genetic distance matrix between samples based on the SNP genotype probability matrix, determine the optimal number of clusters using an agglomerative hierarchical clustering algorithm, and generate semi-supervised labels for supervised learning.

[0021] The model training module is used to train the genotyping model with the SNP genotype probability matrix as input features and semi-supervised labels as target variables, and to evaluate the model performance through cross-validation.

[0022] The feature optimization module is used to calculate the feature importance of SNP sites based on the genotyping model, screen high informative SNP sites through threshold scanning and linkage disequilibrium constraints, and perform missing value imputation on the screened site data.

[0023] The genotyping application module is used to obtain genotype vectors by detecting the core barcode SNP sites of new Toxoplasma gondii samples, input the genotype vectors into the trained genotyping model, output the genotyping results and confidence levels of the samples in real time, and map the genotyping results to the common genotyping system.

[0024] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the whole-genome machine learning method for Toxoplasma gondii population structure analysis as described above.

[0025] Compared with the prior art, the beneficial effects of the present invention are:

[0026] This invention presents a technical solution for Toxoplasma gondii multilocus sequence typing (MLST) and population structure analysis using SNP data derived from whole-genome sequencing (WGS) combined with machine learning. Through a closed-loop mechanism of "unsupervised clustering → semi-supervised labeling → supervised learning," and relying on the high-quality SNP genotype probability matrix extracted from WGS for modeling, it significantly improves the discriminative power and generalization ability of MLST typing, achieving high resolution and high accuracy. Simultaneously, progressive feature selection and linkage disequilibrium constraints identify the most informative genetic loci, adapting to the needs of grassroots monitoring and rapid typing, while maintaining compactness and deployability. This invention maintains stable performance and strong robustness even with low sequencing depth and metagenomic confounding, thanks to the SNP genotype probability matrix and robust training. Furthermore, it can type new samples in real time without repeated clustering and can automatically interface with established typing systems, providing forward-looking support for assessing the impact of geographical distribution and host origin on genetic differentiation, as well as for epidemiological tracing and geographical differentiation analysis, comprehensively characterizing the population structure and evolutionary features of Toxoplasma gondii. In addition, the system modules are clearly defined and easy to integrate into existing analysis pipelines or LIMS / monitoring platforms, enabling efficient implementation. Attached Figure Description

[0027] Figure 1 To analyze the gene structure of Toxoplasma gondii based on hierarchical clustering; where A is the hierarchical dendrogram of the optimal hierarchical clustering results, and B is the contour score curve used to determine the optimal number of clusters (K) in agglomerated hierarchical clustering.

[0028] Figure 2 To optimize the machine learning algorithm and feature selection strategy for Toxoplasma gondii genotyping; where A represents the five-fold cross-validation performance of models built using different machine learning algorithms, and B represents feature selection based on XGBoost feature importance, with the optimal threshold determined.

[0029] Figure 3 This is a bubble chart showing the accuracy of the hierarchical model; the bubble size is directly proportional to the accuracy of leave-one-out cross-validation (LOO-CV)—larger bubbles indicate higher accuracy. The colors transition from dark (blue-purple) to light (yellow) along a continuous scale, with bright yellow representing the highest accuracy. Detailed Implementation

[0030] In order to provide a clearer understanding of the technical features, objectives and beneficial effects of the present invention, the technical solution of the present invention will now be described in detail below, but it should not be construed as limiting the scope of implementation of the present invention.

[0031] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.

[0032] One embodiment of the present invention provides a genome-wide machine learning method for analyzing the population structure of Toxoplasma gondii, comprising the following steps:

[0033] I. Sample collection and SNP genotype probability matrix generation;

[0034] This step involves standardizing the whole-genome sequencing (WGS) data from Toxoplasma gondii samples from the raw sequences to a SNP genotype probability matrix that can be used for modeling. The specific process is as follows:

[0035] Sample and data sources: Toxoplasma gondii strains obtained from the NCBI GenBank database were used as the research subjects to ensure that they could broadly represent the genetic diversity of different geographical regions and host species, while the original WGS sequencing data (FASTQ format) of the strains were obtained.

[0036] Sequence alignment and format conversion: Short read alignment algorithms (such as BWA-MEM) are used to align FASTQ sequences with the Toxoplasma gondii reference genome. The alignment results are processed into BAM format using Samtools, and sorted and indexed. At the same time, duplicate reads, the length of abnormal insertion fragments, and suboptimal alignment fragments are marked to prepare for subsequent variant detection and filtering.

[0037] Variant detection and quality control filtering: bcftools is used to detect single base variants and small insertions / deletions across the entire genome, generating raw VCF (Variant Call Format) files; vcftools is then used to filter the VCF files based on criteria such as minimum quality score, read depth, minor allele frequency, sample missing rate, and site missing rate, combined with site and sample-level thresholds, to remove low-quality variants and achieve data denoising and sparsification.

[0038] Standardization and matrix generation: VCF files filtered from multiple batches are processed to align variant sites and unify allele orientations to ensure that the data can be spliced. Finally, the VCF files are converted into SNP genotype probability matrices, where each SNP represents one feature and each strain is represented by its alleles at each SNP site, thus forming the input data for subsequent machine learning analysis.

[0039] II. Analysis of Unsupervised Group Structure;

[0040] This step, without prior labels, uses a semi-supervised, hierarchical dimensionality reduction clustering method to analyze the population structure and generate reference labels (i.e., semi-supervised labels) that can be used for subsequent supervised learning. The specific process is as follows:

[0041] Genetic distance matrix construction: Based on the allele dose or genotype probability in the SNP genotype probability matrix, calculate the genetic distance between samples and construct a sample × sample distance matrix.

[0042] Hierarchical clustering and determination of the optimal number of clusters: The Ward-connected agglomerative hierarchical clustering algorithm is used to cluster the distance matrix and group the samples according to the similarity. The results are visualized through a dendrogram to present the hierarchical relationship between the samples. The silhouette score (used to quantify the clustering quality, silhouette score > 0.6 indicates good cluster separation) is calculated within the cluster number range K∈[2,20]. The K with the highest score or near the inflection point is selected as the optimal number of clusters.

[0043] Visual verification: Principal component analysis (PCA) was performed on the SNP genotype probability matrix. PCA aims to reduce the dimensionality of SNP data and visualize genetic variation in the samples. The first two principal components (PC1, PC2) were extracted to construct a two-dimensional plot, and cluster labels were marked with different colors to examine inter-cluster separation and intra-cluster compactness. At the same time, geographic distribution and host origin data were overlaid on the PCA plot to examine the impact of geographic isolation and host preference on the genetic structure of Toxoplasma gondii.

[0044] Semi-supervised label generation: The clustering labels corresponding to the optimal number of clusters are used as semi-supervised labels, and representative samples of each cluster are recorded to provide a reference for subsequent supervised learning model training and classification mapping.

[0045] In this embodiment of the invention, a Ward-connected agglomerative hierarchical clustering method is applied to the genetic distance matrix of 104 genomic samples to obtain a dendrogram. Figure 1 (A) can intuitively present the process of samples aggregating from individuals to main branches. To quantify the optimal partitioning, the silhouette coefficient is calculated and a curve is plotted within the cluster number range of K∈[2,20]. Figure 1 (B) The results showed that the silhouette coefficient reached its peak (>0.6) when K=2-3, and gradually decreased after exceeding 3, stabilizing at around ~0.25 near K=10, suggesting that excessive subdivision weakens discriminative ability and biological interpretability. Subsequently, the obtained hierarchical labels (2, 3, ..., K clusters) were used as semi-supervised labels for subsequent supervised model training, achieving real-time subtype prediction without repeated clustering. This strategy can transform post-hoc hierarchical insights into a forward-looking, interpretable, and easily deployable subtyping toolkit, providing coarse and fine resolution as needed.

[0046] III. Supervised classification modeling;

[0047] This step, based on a high-quality SNP genotype probability matrix and a hierarchical modeling strategy, trains a typing model using a screening algorithm and evaluates its performance through cross-validation to construct a high-precision Toxoplasma gondii typing model. The specific process is as follows:

[0048] Model selection and training: Four mainstream algorithms were selected to build the model, namely XGBoost (gradient boosting tree), random forest, LightGBM (lightweight gradient boosting tree) and decision tree, with ensemble learning classifier as the core training direction; the SNP genotype probability matrix was used as the input feature and semi-supervised labels were used as the target variable to train the model and obtain a Toxoplasma gondii typing model that can output the cluster to which the sample belongs and its probability.

[0049] Model performance evaluation: The accuracy of the model is evaluated using five-fold cross-validation or leave-one-out cross-validation (LOO-CV). Five-fold cross-validation is used to evaluate model performance by splitting the dataset into five subsets, training on four of these subsets, and testing on the remaining subset; this process is repeated until all subsets are used as the test set, and the average accuracy of each model across all folds is recorded.

[0050] In this embodiment of the invention, five-fold cross-validation is used to evaluate the performance of four commonly used algorithms: XGBoost, RandomForest, LightGBM, and Decision Tree. Figure 2 (A). The results show that XGBoost has the highest average accuracy, approximately 0.97; Random Forest and LightGBM perform stably, with accuracies of approximately 0.90-0.95; Decision Tree has a relatively lower accuracy, approximately 0.80-0.90. These results indicate that ensemble learning has stronger classification and generalization capabilities in the Toxoplasma gondii genotyping task. Therefore, ensemble learning algorithms (especially XGBoost) are ultimately selected as the optimal model.

[0051] IV. Progressive Feature Filtering and Optimization;

[0052] This step targets the SNP genotype probability matrix, calculating feature importance, screening core SNP loci, and addressing missing data issues. This streamlines the feature set while maintaining model accuracy. The specific process is as follows:

[0053] Feature importance calculation: Based on the built-in metrics of the XGBoost model (gradient boosting algorithm), the feature importance of each SNP site is calculated. This algorithm calculates the importance by analyzing the contribution of each SNP site to reducing the model's prediction error. Specifically, it evaluates the importance from three dimensions: gain (the contribution of the feature to improving accuracy), coverage (the relative number of observations affected by the feature), and frequency (the number of times the feature is used in the decision tree). Finally, the most informative SNP sites for the genotyping and classification task are identified through these three dimensions.

[0054] Threshold scanning and subset selection: To optimize the feature set, different feature importance thresholds are first set. As the thresholds become more stringent, low-importance SNP sites are gradually eliminated. For each selected feature subset, a model is trained and the classification accuracy is recorded. By evaluating the model performance under different thresholds, the impact of feature selection on classification results is determined. Simultaneously, linkage imbalance constraints (setting an r² threshold) are used to remove redundant features, ultimately selecting high-information SNP sites, achieving a balance between feature size reduction and model performance stability.

[0055] Missing data handling: Missing values ​​are imputed in the high-information SNP data after screening, and low-quality samples with insufficient information are reweighted to avoid excessive or insufficient impact of such samples on model training and improve model stability.

[0056] In this embodiment of the invention, after determining XGBoost as the optimal model, the threshold is scanned based on the feature importance of the model output. Figure 2 (B) The results show that as the threshold increases (fewer features), the average accuracy gradually decreases, indicating that overly strict screening may result in the loss of key information; while at lower thresholds (more features), the accuracy remains at a high level (generally ≥0.90). Based on this, a trade-off can be made between accuracy and feature size to form a candidate set for subsequent barcode panels (panel size is determined by the application scenario).

[0057] To characterize the overall performance of the hierarchical model (i.e., the model trained with hierarchical labels for different K values) under different parameter settings, statistical summaries were compiled for each configuration. Figure 3 The results show that most models achieved an average accuracy exceeding 80% (approximately 97%) under leave-one-out cross-validation (LOO-CV), indicating strong overall classification ability of the hierarchical models. Furthermore, increasing the number of features generally leads to higher accuracy, suggesting that appropriately expanding the feature set can improve performance. The lower accuracy of some configurations may be related to overfitting, feature redundancy, or improper hierarchical height settings. In summary, by reasonably adjusting parameters such as the number of features and hierarchical height, and combining this with appropriate regularization, classification results can be further optimized and overall accuracy improved, providing a clear reference for parameter tuning in subsequent practical applications.

[0058] This method demonstrates high accuracy and stability on standard whole-genome data and has the potential to be extended to low sequencing depth or metagenomic samples. By introducing an SNP genotype probability matrix and a missing data handling strategy, the robustness and generalization ability of the model are expected to be further enhanced.

[0059] V. Prospective Classification and Application;

[0060] This invention is based on a whole-genome machine learning framework and further designs a scalable genotyping and application process. For unknown Toxoplasma gondii samples, the genotype vector of the sample can be obtained in subsequent applications by detecting core barcode SNP sites (e.g., about 50 sites).

[0061] Real-time genotyping and confidence output: Input the genotype vector of the sample into the trained XGBoost model, and the model outputs the genotyping result (cluster) and confidence score (to assess the reliability of the result) of the sample in real time.

[0062] International System Mapping and Report Generation: The cluster results output by the model are mapped to internationally recognized Toxoplasma gondii typing systems (such as types I / II / III and atypical lineages) to facilitate integration with existing typing systems. Based on this, standardized reports for monitoring and source tracing are generated, including basic sample information, barcode locus overview, typing results and confidence levels, and corresponding lineage mapping explanations, providing data support for Toxoplasma gondii epidemiological monitoring and geographic differentiation assessment.

[0063] Another embodiment of the present invention provides a genome-wide machine learning system for analyzing the population structure of Toxoplasma gondii, comprising:

[0064] The data processing module is used to perform the above-mentioned SNP genotype probability matrix generation step;

[0065] The unsupervised parsing module is used to perform the above unsupervised group structure parsing steps;

[0066] The model training module is used to perform the supervised classification modeling steps described above;

[0067] The feature optimization module is used to perform the above-mentioned progressive feature selection and optimization steps;

[0068] The classification application module is used to perform the above-mentioned forward classification and application steps.

[0069] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the whole-genome machine learning method for analyzing the Toxoplasma gondii population structure as described above.

[0070] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these should also be considered within the scope of protection of the present invention. These modifications and improvements will not affect the effectiveness of the implementation of the present invention or the practicality of the patent.

Claims

1. A genome-wide machine learning method for analyzing the population structure of Toxoplasma gondii, characterized in that, Includes the following steps: SNP genotype probability matrix generation: Obtain whole genome sequencing data of Toxoplasma gondii samples, and generate SNP genotype probability matrices through sequence alignment, format conversion, variant detection and quality control filtering; Unsupervised population structure analysis: Based on the SNP genotype probability matrix, a genetic distance matrix between samples is constructed, an agglomerative hierarchical clustering algorithm is used to determine the optimal number of clusters, and semi-supervised labels for supervised learning are generated; Supervised classification modeling: Using the SNP genotype probability matrix as input features and semi-supervised labels as target variables, a genotyping model is trained, and the model performance is evaluated through cross-validation. Progressive feature selection and optimization: Based on the genotyping model, the feature importance of SNP sites is calculated. High information content SNP sites are selected through threshold scanning and linkage disequilibrium constraints. Missing value imputation is performed on the selected site data. Prospective typing and application: Genotype vectors are obtained by detecting the core barcode SNP sites of new Toxoplasma gondii samples. The genotype vectors are then input into the trained typing model, which outputs the typing results and confidence scores of the samples in real time and maps the typing results to the common typing system.

2. The whole-genome machine learning method for analyzing the Toxoplasma gondii population structure according to claim 1, characterized in that, In the SNP genotype probability matrix generation step: sequence alignment uses the BWA-MEM algorithm; format conversion uses Samtools to process the alignment results into BAM format, complete sorting, indexing, and mark duplicate reads, abnormal insertion fragment lengths, and suboptimal alignment fragments; variant detection is performed using bcftools to generate the original VCF file; and the VCF file is filtered using vcftools.

3. The whole-genome machine learning method for analyzing the Toxoplasma gondii population structure according to claim 1, characterized in that, In the unsupervised group structure analysis step: the agglomerative hierarchical clustering algorithm adopts the Ward connection method, and the optimal number of clusters is determined by calculating the silhouette coefficient in the range of K∈[2,20].

4. The whole-genome machine learning method for analyzing the Toxoplasma gondii population structure according to claim 1, characterized in that, In the supervised classification modeling steps: the classification model is XGBoost, Random Forest or LightGBM model; the cross-validation is five-fold cross-validation or leave-one-out cross-validation.

5. The whole-genome machine learning method for analyzing the Toxoplasma gondii population structure according to claim 1, characterized in that, In the progressive feature filtering and optimization steps Feature importance is calculated from three dimensions: gain, coverage, and frequency.

6. The whole-genome machine learning method for analyzing the Toxoplasma gondii population structure according to claim 1, characterized in that, In the prospective typing and application steps, the new Toxoplasma gondii samples include low-depth sequencing samples or metagenomic background samples.

7. A genome-wide machine learning system for analyzing the population structure of Toxoplasma gondii, characterized in that, include: The data processing module is used to acquire whole genome sequencing data of Toxoplasma gondii samples and generate an SNP genotype probability matrix through sequence alignment, format conversion, variant detection and quality control filtering. The unsupervised parsing module is used to construct the genetic distance matrix between samples based on the SNP genotype probability matrix, determine the optimal number of clusters using an agglomerative hierarchical clustering algorithm, and generate semi-supervised labels for supervised learning. The model training module is used to train the genotyping model with the SNP genotype probability matrix as input features and semi-supervised labels as target variables, and to evaluate the model performance through cross-validation. The feature optimization module is used to calculate the feature importance of SNP sites based on the genotyping model, screen high informative SNP sites through threshold scanning and linkage disequilibrium constraints, and perform missing value imputation on the screened site data. The genotyping application module is used to obtain genotype vectors by detecting the core barcode SNP sites of new Toxoplasma gondii samples, input the genotype vectors into the trained genotyping model, output the genotyping results and confidence levels of the samples in real time, and map the genotyping results to the common genotyping system.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the whole-genome machine learning method for analyzing the Toxoplasma gondii population structure as described in any one of claims 1-6.