Giardia genome SNP bar code typing method based on machine learning optimization

By using a machine learning-based Giardia genome SNP barcoding method, the problems of insufficient resolution and high cost in existing technologies are solved, achieving efficient and low-cost Giardia typing, which is suitable for public health and epidemiological research.

CN121366631APending Publication Date: 2026-01-20JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511477730.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Existing Giardia typing technologies suffer from insufficient resolution, high cost, high technical barriers, and unstable typing results under low-depth sequencing and complex backgrounds, making it difficult to meet the needs of public health and epidemiological research.

Method used

A machine learning-optimized Giardia genome SNP barcoding genotyping method was adopted. Through unsupervised population structure clustering, machine learning feature screening, and SNP barcode panel construction, combined with multiplex PCR and low-throughput sequencing, efficient and low-cost genotyping was achieved.

Benefits of technology

It significantly improves the resolution and stability of typing, reduces detection costs, is suitable for low-quality data and complex backgrounds, forms a standardized typing system, and is suitable for application in grassroots laboratories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121366631A_ABST
    Figure CN121366631A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of biology, and provides a giardia genome SNP bar code typing method based on machine learning optimization. According to the method, typing is completed through data acquisition and preprocessing, unsupervised group structure clustering, machine learning feature screening, bar code SNP panel construction, robustness evaluation and detection and interpretation. According to the method, an XGBoost model is trained by taking an unsupervised clustering result as a label, and 50 loci are screened in combination with an SHAP index to form an SNP bar code panel. The resolution ratio of the panel is close to that of whole genome SNP typing only by using a small number of sites, the performance of the panel is superior to that of MLST, and high accuracy is kept under low-quality data such as 15X low depth. Detection modes such as multiple PCR and the like and standardized reports are supported, the process adopts modular design and can be realized in a computer readable storage medium, and an effective tool is provided for giardia public health monitoring and cross-host traceability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of biology, and particularly relates to a Giardia SNP barcode typing method based on machine learning optimization. BACKGROUND

[0002] Giardia duodenalis (also known as G. intestinalis and G. lamblia) is a globally distributed zoonotic intestinal protozoan parasite that can cause giardiasis. The disease is mainly transmitted through the fecal-oral route, and common transmission vectors include contaminated drinking water, food, and interpersonal transmission, which frequently causes waterborne and foodborne outbreaks worldwide. According to epidemiological investigations, there are hundreds of millions of human infection cases every year, which causes a serious burden on public health and the social economy. From a genetic perspective, Giardia can be divided into at least eight genotypes (Assemblages A–H), among which Assemblages A and B can infect humans and have a wide host spectrum, being the main risk genotypes for zoonotic giardiasis. Since different genotypes / subtypes differ significantly in host adaptability and transmission mode, establishing a precise and standardized typing method is a core requirement for epidemiological tracing and prevention and control.

[0003] Currently, there are two main typing techniques: one is multilocus sequence typing (MLST), which uses a few housekeeping genes such as tpi, gdh, bg, and SSU rRNA as targets for typing through polymerase chain reaction (PCR) amplification and sequencing. This method is mature, low-cost, and has a unified naming system, making it easy to compare across laboratories. However, it has significant drawbacks: ① The number of loci is limited, and most are evolutionarily conserved genes with low mutation rates and insufficient information, making it difficult to meet the needs of fine typing; ② Different evolutionary lineages are often incorrectly grouped into the same sequence type (ST), resulting in insufficient typing resolution; ③ It cannot reveal complex population structures and cross-host transmission chains. The second is whole-genome SNP analysis (WGS-SNP), which uses high-throughput sequencing to obtain whole-genome variation information, can finely distinguish highly related strains, and reveal population structure, gene flow, and selection signals, making it the most resolution-based method. However, it has significant disadvantages: ① The cost is high, requiring whole-genome sequencing, limiting its application in routine typing of large-scale samples; ② The technical threshold is high, requiring professional experiments and bioinformatics platforms, making it difficult for many laboratories to apply this technology; ③ In cases of low sequencing depth (2X–10X), complex metagenomic background, or poor sample quality, SNPs (single nucleotide polymorphisms) are often missing or genotypes are unstable, making the typing results unreliable; ④ The computational and storage resources are large, which is not conducive to rapid tracing or routine monitoring of public health.

[0004] With the development of artificial intelligence and machine learning, researchers have begun to try to introduce it into typing research. Machine learning (such as XGBoost) can perform feature selection in high-dimensional SNP data, automatically identify the most valuable sites for classification; it is still robust in low-depth and noisy data; it can greatly reduce the number of sites while maintaining the accuracy of typing, achieving dimensionality reduction and cost reduction. More importantly, the selected sites are highly consistent with important functional sites in genome-wide association studies (GWAS), and have biological rationality. However, the current machine learning-based typing research is still in its infancy, and there is no mature typing method that combines high resolution, low cost, robustness and standardization, which cannot meet the needs of accurate and efficient typing in practical applications.

[0005] In summary, although MLST and WGS-SNP each have their own application scenarios, there is still a lack of a typing method that combines high resolution, low cost, and robustness. Specifically, the MLST technology is relatively simple to operate but has insufficient typing resolution, making it difficult to meet the needs of fine epidemiological research; the WGS-SNP technology has high typing resolution, but the cost and technical threshold are too high, making it difficult to popularize and apply in public health systems and basic laboratories. At the same time, under complex conditions such as low-depth sequencing and metagenomics, existing typing methods lack effective solutions. In addition, there is no internationally recognized high-resolution Giardia typing system worldwide, and the lack of standardization has seriously hampered the development of Giardia disease epidemiological research and prevention and control work.

[0006] Therefore, there is an urgent need for an innovative typing technology that can integrate whole-genome information and machine learning algorithms, maintain high discriminability even with limited SNP sites, and be widely applicable under low-cost and low-depth conditions. Based on this, the present application proposes a Giardia genomic SNP barcode typing method based on machine learning optimization. SUMMARY

[0007] The purpose of the present application is to provide a Giardia genomic SNP barcode typing method based on machine learning optimization, which aims to solve the problems raised in the above background art.

[0008] The purpose of the present application is achieved by the following technical solutions:

[0009] A Giardia genomic SNP barcode typing method based on machine learning optimization, comprising the following steps:

[0010] Data acquisition and preprocessing: collect Giardia samples, obtain whole-genome sequencing raw data, perform quality control, sequence alignment and variation detection, generate a whole-genome genotype matrix and output a genotype probability matrix;

[0011] Unsupervised population structure clustering: Construct genetic distance matrix using whole genome SNP data, reveal population structure and subpopulation division by principal component analysis, hierarchical clustering or ADMIXTURE analysis, generate pseudo-labels;

[0012] Machine learning feature selection: Use pseudo-labels as supervision signal, train model using ensemble learning algorithm, calculate feature importance of each SNP site, select candidate SNP sites with the largest classification contribution by combining SHAP interpretability index and progressive feature selection and linkage disequilibrium constraint to remove redundancy, obtain candidate barcode site pool;

[0013] SNP barcode panel construction: Select 25-50 SNP sites from candidate barcode site pool, construct SNP barcode panel based on information content, genomic distribution uniformity, primer designability and cross-genotype stability;

[0014] Robustness evaluation: Simulate different sequencing depths by downsampling, compare SNP barcode panel and whole genome SNP typing results, evaluate the stability and consistency of SNP barcode panel under low depth, high noise or metagenomic background;

[0015] Detection and interpretation: Use multiplex PCR, probe hybridization or low-throughput sequencing to detect target SNP sites, and generate typing report by combining standardized interpretation algorithm.

[0016] Further, in the data acquisition and preprocessing step: the quality control process includes removing low-quality sequences, removing adapters, and filtering contaminated fragments; sequence alignment uses BWA-MEM tool; variant detection uses GATK or bcftools tool.

[0017] Further, in the unsupervised population structure clustering step, hierarchical clustering uses Ward method, and the number of clusters K is set to 3 when subpopulation division is performed.

[0018] Further, in the machine learning feature selection step: the ensemble learning algorithm is XGBoost algorithm; the SHAP interpretability index is used to quantify the contribution of each SNP site to the classification result; the linkage disequilibrium constraint condition is set to r 2 <0.2.

[0019] Further, the SNP barcode panel includes 50 sites.

[0020] The SNP barcode typing system based on machine learning optimization applies the Giardia genome SNP barcode typing method based on machine learning optimization as described above, which includes:

[0021] A data acquisition and preprocessing module is configured to collect a Giardia sample, acquire raw whole-genome sequencing data, perform quality control, sequence alignment and variation detection, generate a whole-genome genotype matrix, and output a genotype probability matrix.

[0022] An unsupervised population structure clustering module is configured to construct a genetic distance matrix using whole-genome SNP data, reveal population structure and subpopulation division through principal component analysis, hierarchical clustering or ADMIXTURE analysis, and generate pseudo-labels.

[0023] A machine learning feature screening module is configured to use pseudo-labels as a supervision signal, train a model using an ensemble learning algorithm, calculate the feature importance of each SNP site, screen out candidate SNP sites with the largest classification contribution by combining SHAP interpretability indicators, and remove redundancies through progressive feature screening and linkage disequilibrium constraints to obtain a candidate barcode site pool.

[0024] An SNP barcode panel construction module is configured to select 50 SNP sites from the candidate barcode site pool, and construct an SNP barcode panel based on information content, genomic distribution uniformity, primer designability and cross-genotype stability.

[0025] A robustness evaluation module is configured to simulate different sequencing depths by downsampling, compare SNP barcode panel and whole-genome SNP typing results, and evaluate the stability and consistency of the SNP barcode panel under low-depth, high-noise or metagenomic background.

[0026] A detection and interpretation module is configured to detect target SNP sites using multiplex PCR, probe hybridization or low-throughput sequencing, and generate a typing report using a standardized interpretation algorithm.

[0027] A computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the machine learning optimized Giardia genomic SNP barcode typing method as described above.

[0028] Compared with the prior art, the present application has the following advantages:

[0029] 1. Propose SNP barcode construction strategy: For the first time, the unsupervised clustering results (such as PCA, ADMIXTURE, hierarchical clustering obtained population structure) are used as pseudo-labels, input into the supervised learning model (such as XGBoost) for training, combined with SHAP interpretability index to quantify the importance of candidate SNPs, while using linkage disequilibrium constraint to remove site redundancy, automatically selecting 50 sites from millions of candidate SNPs to form a compact and efficient barcode panel; In feature selection, the feature importance is calculated by XGBoost model (its core logic includes gain, frequency, coverage, etc. Comprehensive indicators), combined with SHAP global interpretability, to ensure that the selected SNPs have statistical and biological rationality, breaking through the limitations of traditional methods that rely on expert experience or single statistical indicators to select sites, and ensuring the objectivity and repeatability of typing.

[0030] 2. Significantly improve the performance of typing and adaptability to low-quality data: The SNP barcode panel constructed in the present application can reproduce the resolution close to whole genome SNP typing with only 50 sites, which is much better than traditional MLST; At the same time, the genotype probability (GL / GP) matrix is generated in the data preprocessing stage to retain the uncertainty information in the low-depth data, and the matrix is used to replace the single hard genotype call in the typing interpretation, combined with the missing robust encoding and uncertainty penalty mechanism, and verified by clustering and phylogenetic tree comparison with whole genome SNP, even under the conditions of low sequencing depth (2X-10X), high background noise, macrogenomic complex background or poor sample quality, it still maintains stability and high accuracy, which not only solves the problem of frequent failure of traditional methods under low-quality data, but also is suitable for typing of environmental samples and metagenomic data.

[0031] 3. Reduce detection cost and technical threshold: The SNP barcode panel of the present application supports multiplex PCR, probe hybridization, low-throughput sequencing and other detection methods, without relying on high-cost whole genome sequencing, which greatly reduces the detection cost; At the same time, it is equipped with standardized interpretation algorithm and visualization report generation function, without the support of professional bioinformatics platform, the operation threshold is low, which is suitable for basic laboratories to carry out routine monitoring, and solves the problem of high technical threshold of WGS-SNP and difficult popularization.

[0032] 4. Form a standardized typing system: The typing method and process of the present application adopts modular design, which can be realized in computer readable storage medium, and the operation is repeatable and easy to popularize, and a standardized typing platform is established; The platform is used for Giardia typing, which can adapt to different cost and resolution requirements, and provides an effective tool for public health monitoring and cross-host tracing. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 The flowchart of the method of the present application.

[0034] Figure 2 Figure 1. Model evaluation and population clustering structure analysis results; a, ROC curve and AUC value comparison of different machine learning models for multi-classification task based on whole genome SNP data; b, PCA dimensionality reduction scatter plot with hierarchical clustering K = 3 result labeled color; c, clustering result and machine learning model performance trend graph under different clustering number K; d, hierarchical clustering tree diagram based on Ward method.

[0035] Figure 3 Figure 2. Genome distribution and functional correlation of Top50 SNP barcodes; a, Top50 SNP sample distribution; b, SHAP value ranking; c, genome distribution density.

[0036] Figure 4 Figure 3. Comparison of Giardia SNP barcoding and whole genome SNP typing ability.

[0037] Figure 5 Figure 4. Comparison of Giardia typing ability based on MLST and SNP; a, Tanglegram of MLST and SNP clustering tree; b, Similarity heatmap of MLST and SNP and population division results under different similarity thresholds.

[0038] Figure 6 Figure 5. Robustness analysis results of Top50 SNP barcode panel across sequencing depth; a, Per-locus call rate heatmap; b, Per-sample call rate at sample level; c, Concordance of Top50 SNP; d, Per-sample concordance under different sequencing depths, blue points in the figure represent the concordance value of each sample with 40X reference data, and gray horizontal line represents the average value, it can be seen that the overall concordance tends to be stable after ≥15X; e, Clustering consistency comparison under different depths, orange line in the figure is Adjusted Rand Index (ARI), and blue line is Normalized Mutual Information (NMI), both of which show that the clustering results are highly consistent with 40X data when the depth is ≥8X. DETAILED DESCRIPTION

[0039] In order to have a clearer understanding of the technical features, objectives and beneficial effects of the present application, the technical solutions of the present application will be described in detail below, but it should not be understood as limiting the scope of the present application.

[0040] The Giardia genome SNP barcoding typing method based on machine learning optimization provided by the embodiments of the present application has a framework diagram as shown inFigure 1 As shown in the figure, the overall process includes the following steps:

[0041] (I) Data acquisition and preprocessing;

[0042] G. duodenalis samples were collected from different hosts (humans, domestic animals, pets, and wild animals) and different geographical sources, and whole genome sequencing (WGS) raw data was obtained. Standard quality control processes such as removing low-quality sequences, removing adapters, and filtering contaminated fragments were used to ensure data reliability. Reference genomes (such as BWA-MEM) were used for sequence alignment, and standard variant detection tools (such as GATK, bcftools) were used for SNP / INDEL calling. Finally, a whole genome genotype matrix was generated, and optionally genotype probabilities (GL / GP) were output to retain uncertainty information in low-depth data.

[0043] (II) Unsupervised population structure clustering;

[0044] Genetic distance matrix was constructed using whole genome SNP data, and principal component analysis (PCA), hierarchical clustering, or ADMIXTURE analysis was performed on the sample population to reveal population structure and potential subpopulation division. Figure 2 This process not only provides the global genetic background of the population, but also provides pseudo-labels for subsequent machine learning model training as a baseline reference for supervised signals.

[0045] Figure 2 Unsupervised population structure clustering results are shown. Figure 2 Figure a shows the ROC curves and AUC values of different machine learning models in the multi-classification task based on whole genome SNP data. The results show that XGBoost and Random Forest models have significantly higher classification performance, indicating that they can effectively distinguish different populations and provide the best algorithm framework for feature selection of SNP barcodes. Figure 2 Figure b shows the PCA-based dimensionality reduction scatter plot, and the color annotation is based on the hierarchical clustering result at K=3. The results show that the samples can be clearly divided into three populations with obvious boundaries and tight internal clustering, verifying the effectiveness of unsupervised population structure clustering and providing reliable pseudo-labels for subsequent machine learning training. Figure 2 Figure c shows the trend of clustering results and machine learning model performance (accuracy and F1-score) under different clustering numbers K. When K=3, the model performance reaches the highest level, and then gradually decreases with the increase of K, indicating that over-clustering will reduce the discriminability of the model, verifying that K=3 is the optimal population division number for this dataset. Figure 2Figure 3a shows the Ward's method-based hierarchical clustering dendrogram, with the horizontal axis representing samples and the vertical axis representing clustering distance. At the cutting point of K = 3, the samples are clearly divided into three groups of A, B, and Non, which is consistent with the PCA result, further proving the robustness of the genetic structure division of the population and providing a basis for the construction of the SNP barcode panel.

[0046] (Three) Machine learning feature screening;

[0047] Introduce integrated learning algorithms such as XGBoost to train with the pseudo-label generated by unsupervised population structure as the supervision signal, and calculate the feature importance of each site. Further combined with SHAP (Shapley Additive Explanations) value (N = 20), the candidate SNP sites with the largest contribution in the classification task are screened out. Through stepwise feature selection and linkage disequilibrium (LD) constraint (such as r 2 <0.2) de-redundancy, a candidate barcode site pool is finally obtained, that is, a group of SNPs with large information content and low redundancy (N = 20) Figure 3 ).

[0048] (Four) Construction of barcode SNP panel;

[0049] According to the information content, genomic distribution uniformity, primer designability, and cross-genotype stability, the barcode SNP panel (such as 25-50 sites) is automatically / semi-automatically assembled ( Figure 3 ).

[0050] Figure 3 The results of machine learning feature screening and barcode SNP panel construction are shown. Figure 3 Figure 3a shows the distribution of Top50 SNPs in all samples. The results show that these sites can form obvious typing differences between different populations, and each population shows a characteristic SNP combination, indicating that they have good discrimination. Figure 3 Figure 3b shows the importance ranking results based on SHAP value. The first few SNPs (such as CM018789_32159, CM018789_4338, etc.) have the largest contribution to model prediction. These SNPs are identified as the most information-rich candidate sites and are the core of the barcode panel construction. Figure 3 Figure 3c shows the distribution density of SNP barcodes on the genome. Some chromosome segments (such as the tail end of ChrCM018792) are rich in candidate SNPs, suggesting that this region may play an important role in population differentiation and host adaptation.

[0051] (Five) Robustness evaluation:

[0052] Systematic downsampling (2X, 4X, 6X, 10X, 20X, 30X, 40X) was performed on representative samples and compared with whole genome SNP typing results, using ARI (adjusted Rand Index), NMI (Normalized Mutual Information), RI (Rand Index), tree tanglegram and other indicators to quantify the stability and consistency of SNP barcode panels at different sequencing depths. At the same time, the influence of metagenomic mixed background on the results was evaluated to verify its applicability in real complex environmental samples.

[0053] (VI) detection and interpretation;

[0054] A detection method of multiplex PCR, probe hybridization and low-throughput sequencing is provided, which is combined with a standardized interpretation algorithm and a visual report generation.

[0055] All analysis modules are designed in a modular manner, support implementation in a computer-readable storage medium, and can be extended to high-resolution typing of other pathogens through software upgrades.

[0056] The specific implementation of the present application is described in detail below in combination with specific embodiments.

[0057] Example 1: Efficient Giardia typing based on SNP barcodes and application expansion

[0058] High resolution: Whole genome SNP typing can achieve near whole genome typing ability with dozens of sites, which is significantly better than MLST and single gene typing.

[0059] Figure 4 The comparison of whole genome SNP and SNP barcode typing results in Giardia is presented. The left and right sides are respectively the system clustering trees constructed by whole genome SNP and SNP barcode, and the middle connecting line represents the corresponding relationship of the same sample in the two clustering results. As can be seen from the figure, the connecting lines of most samples are parallel and do not cross significantly, indicating that the grouping results of the two methods are highly consistent, and the A and B type samples can be clearly distinguished, only a few samples have slightly changed positions in the barcode clustering. This shows that although SNP barcode contains only a small number of high information sites (such as Top-50 SNP) in the whole genome, it can still accurately reproduce the population structure at the whole genome level, achieving significant dimension reduction with minimal information loss. This result shows that the SNP barcode panel has high representativeness and reliability, and can be used as an efficient alternative to whole genome typing, suitable for low sequencing depth or large-scale epidemiological research. At the same time, Figure 5 The advantages of whole genome SNP typing compared to MLST are embodied, including Figure 5In the diagram, 'a' represents the tangled graph of MLST and SNP clustering trees. The left and right sides show the hierarchical clustering trees based on MLST and SNP, respectively, with the lines indicating the correspondence of the same sample under the two classification methods. The results show that the MLST method has instances of misclassification or low resolution in some samples, while SNP classification can more clearly distinguish between groups A and B. Figure 5 Figure b shows the similarity heatmaps of MLST and SNP, as well as the group segmentation results under different similarity thresholds. Compared to MLST (which can only distinguish about 6 groups at most), the SNP method can identify more than 30 groups under the condition of similarity ≥90%, which fully demonstrates the significant improvement of SNP genotyping resolution and can reveal more refined group structure.

[0060] High robustness: SNP barcode typing at depths of 15X or even lower can still maintain a high degree of consistency with whole-genome SNP typing results.

[0061] like Figure 6 As shown, Figure 6 The per-locus call rate heatmap of the 'a' site shows the detection of the Top50 SNPs at different depths. The results show that as the sequencing depth increases, the detection rate of most sites gradually approaches 1, with some sites missing only at very low depths (≤2X). Figure 6 The per-sample call rate of sample b is presented in box plot form to show the overall SNP detection completeness of the sample at different depths. The results show that the detection rate of each sample reaches a stable high level when the sequencing depth is ≥10X. Figure 6 The concordance index of the Top 50 SNPs in the sequencing data shows the average consistency and range between the SNP genotyping results and the baseline whole genome genotyping at different sequencing depths. The results show that the consistency is close to 100% when the sequencing depth is ≥6X. Figure 6 The per-sample concordance of d is reflected in the fact that even under low-depth conditions, the classification results of most samples still maintain a high degree of consistency with the benchmark. Figure 6 The clustering consistency of the data in the middle e represents the similarity (ARI / NMI index) between the clustering results based on Top50SNP and the benchmark clustering results at different depths. The results show that the clustering structure is basically stable when the sequencing depth is ≥15X, which verifies the robustness of the SNP barcode panel at low sequencing depths.

[0062] The above are only preferred embodiments of the present application, it should be pointed out that, for those skilled in the art, without departing from the concept of the present application, can also make several variations and improvements, these should also be considered as the protection scope of the present application, these will not affect the effect and the practicality of the patent of the present application.

Claims

1. A method for Giardia genomic SNP barcoding based on machine learning optimization, characterized in that, Comprising the following steps: Data acquisition and preprocessing: Collecting Giardia samples, obtaining whole genome sequencing raw data, quality control, sequence alignment and variation detection, generating whole genome genotype matrix and outputting genotype probability matrix; Unsupervised population structure clustering: Using whole genome SNP data to construct genetic distance matrix, revealing population structure and subpopulation division through principal component analysis, hierarchical clustering or ADMIXTURE analysis, generating pseudo-labels; Machine learning feature selection: Using pseudo-labels as a supervisory signal, training a model using ensemble learning algorithms, calculating the feature importance of each SNP site, and selecting the most contributing candidate SNP sites by combining SHAP interpretability indicators and progressive feature selection and linkage disequilibrium constraint redundancy removal to obtain a candidate barcode site pool; SNP barcode panel construction: Selecting 25-50 SNP sites from the candidate barcode site pool, constructing an SNP barcode panel based on information content, genomic distribution uniformity, primer designability, and cross-genotype stability; Robustness evaluation: Simulating different sequencing depths by downsampling, comparing SNP barcode panel and whole genome SNP typing results, and evaluating the stability and consistency of SNP barcode panel under low depth, high noise or metagenomic background; Detection and interpretation: Using multiplex PCR, probe hybridization or low-throughput sequencing to detect target SNP sites, and generating a typing report by combining standardized interpretation algorithms.

2. The machine learning optimization based giardia genome SNP barcoding method of claim 1, wherein, In the data acquisition and preprocessing step: The quality control process includes removing low-quality sequences, removing adapters, and filtering contaminated fragments; Sequence alignment uses the BWA-MEM tool; Variation detection uses GATK or bcftools tools.

3. The machine learning optimization based giardia genome SNP barcoding method of claim 1, wherein, In the unsupervised population structure clustering step, hierarchical clustering uses the Ward method, and the number of clusters K is set to 3 when subpopulation division is performed.

4. The machine learning optimization based giardia genome SNP barcoding method of claim 1, wherein, In the machine learning feature selection step: the ensemble learning algorithm is the XGBoost algorithm; the SHAP interpretability index is used to quantify the contribution of each SNP site to the classification result; the linkage disequilibrium constraint is set to r. 2 <0.

2.

5. The machine learning optimization based giardia genome SNP barcoding method of claim 1, wherein The SNP barcode panel includes 50 SNP sites.

6. A SNP barcode typing system based on machine learning optimization, applying the Giardia genome SNP barcode typing method based on machine learning optimization according to any one of claims 1-5, characterized by comprising: a data acquisition and preprocessing module for collecting Giardia samples, obtaining whole genome sequencing raw data, quality control, sequence alignment and variation detection, generating a whole genome genotype matrix, and outputting a genotype probability matrix; an unsupervised population structure clustering module for constructing a genetic distance matrix using whole genome SNP data, revealing population structure and subpopulation division through principal component analysis, hierarchical clustering or ADMIXTURE analysis, and generating pseudo-labels; a machine learning feature selection module for using pseudo-labels as a supervisory signal, training a model using ensemble learning algorithms, calculating the feature importance of each SNP site, and selecting the most contributing candidate SNP sites by combining SHAP interpretability indicators and progressive feature selection and linkage disequilibrium constraint redundancy removal to obtain a candidate barcode site pool; The SNP barcode panel construction module is used for selecting 50 SNP sites from the candidate barcode site pool and constructing the SNP barcode panel based on information amount, genome distribution uniformity, primer designability and cross-genotype stability; The robustness evaluation module is used for evaluating the stability and consistency of the SNP barcode panel under low depth, high noise or metagenomic background by simulating different sequencing depths through downsampling and comparing the SNP barcode panel with the whole genome SNP typing result. The detection and interpretation module is used for detecting the target SNP sites by using multiplex PCR, probe hybridization or low-throughput sequencing and generating a typing report by combining a standardized interpretation algorithm.

7. A computer readable storage medium characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the steps of the Giardia genome SNP barcode typing method based on machine learning optimization in any one of claims 1-5.