Computer device, method and application for predicting ancestor blood lineage and variety purity of animal sample
By receiving resequencing data, performing SNP marker site detection and quality control, screening characteristic tag SNP sites, and training models using machine learning algorithms, the problem of low accuracy in animal breed identification has been solved, enabling accurate identification and purebred differentiation of animal samples.
Patent Information
- Application Number
- CN202411314785.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies suffer from low accuracy in animal breed identification and classification, especially when there are multiple categories, the probability of misclassification increases, and there are technological gaps in distinguishing between mixed bloodlines and purebreds.
Using computer devices and methods, SNP marker site detection, quality control, linkage disequilibrium analysis, and feature tag SNP site screening were performed by receiving resequencing data. Machine learning algorithms such as L1 regularized logistic regression, L2 regularized logistic regression, and k-nearest neighbor classifier models were combined to train a predictive probability model to predict the ancestral subpopulation and breed purity of animal samples.
It enables precise identification of animal samples, improves the classification accuracy of breed identification, effectively distinguishes between purebred and mixed populations, and solves the problem of accuracy in multi-category identification.
Smart Images

Figure BDA0005051855560000091 
Figure BDA0005051855560000111 
Figure BDA0005051855560000121
Abstract
Description
Technical Field
[0001] This invention relates to the field of biotechnology, and more specifically to computer devices, methods, and applications for predicting the ancestral lineage and breed purity of animal samples. Background Technology
[0002] Local pig breeds, formed through long-term natural and artificial selection under specific geographical and ecological conditions, are characterized by diverse breed types, strong resistance to adverse conditions, high reproductive capacity, and tolerance to roughage. They are important resources and materials for pig breeding and are of great significance for the industrialization and utilization of local breeds. However, in recent years, under the impact of commercialized pig breeds and other factors, the population size of local pig breeds has shrunk significantly, making the monitoring and protection of local germplasm resources urgent. An important aspect of effective monitoring and protection of local breeds is the accurate identification of different breeds and the assessment of mixed populations.
[0003] Machine learning offers new opportunities for the accurate identification of animal species or subpopulations. Classic methods include using log-likelihood ratios to determine whether an individual belongs to one of two groups; however, these methods have low accuracy and can increase the probability of misclassification when there are many species categories. Machine learning models, on the other hand, have shown good performance across various species, achieving classification accuracy above 95% and incorporating effective strategies for handling multiple categories, outputting the probability of identification.
[0004] Methods for screening genetic markers in the field of variety identification and classification rarely consider the correlation between different markers, and there are still some technical gaps in the distinction between mixed lineage and purebred. Summary of the Invention
[0005] The technical problem to be solved by this invention is how to predict the ancestral animal subgroup of an animal sample and / or how to predict the ancestral lineage of an animal sample and / or how to identify the purity of an animal breeding breed.
[0006] To address the aforementioned technical problems, the present invention first provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor can execute the computer program to perform the following steps:
[0007] A1) Data reception: Receiving resequencing data from samples containing different species of test animal populations;
[0008] A2) Data processing: The resequencing data was processed as follows to obtain the SNP marker sites characteristic of the tested animal species:
[0009] A2-1) Use SNP detection software to detect SNP sites in the resequencing data to obtain SNP marker sites;
[0010] A2-2) Quality control was performed on the SNP marker sites and the samples sequentially to obtain the quality-controlled SNP sites in the quality control samples;
[0011] A2-3) Perform linkage disequilibrium analysis on the quality-controlled SNP sites to obtain linked SNP sites, and further filter the quality-controlled SNP sites based on the linked SNP sites to obtain tag SNPs;
[0012] A2-4) Detecting the heterozygosity of the genotypes of the tested animal population: Divide the reference genome of the tested animals into N genomic windows, calculate the ratio of nucleotide diversity θπ values between any two species within each of the N genomic windows, sort the N genomic windows from largest to smallest according to the ratio of θπ values, and select the genomic window with the highest ratio of θπ values as the selection signal region in the genome of the tested animal; where N is a natural number greater than 2.
[0013] The diversity of the tested animal population was tested: the reference genome of the tested animals was divided into N genomic windows, and the genetic differentiation index FST value of the SNP loci within each genomic window for any two species was calculated. ST The values are sorted from largest to smallest among the N genome windows, and the F value is selected. ST The SNP sites within the genomic window with the highest value ratio are selected as feature tag SNP sites; the feature tag SNP sites in the selected signal region are selected to obtain pre-filtered tag SNPs; N is a natural number greater than 2;
[0014] A2-5) Select the pre-filtered tag SNPs of each species in the test animal population that are ranked in the top 1000 in terms of cumulative classification ability relative to other species in the test animal population as feature SNP sites, and merge the feature SNP sites of all species in the test animal population to obtain the feature SNP marker sites of the test animal species.
[0015] A3) Obtaining known and unknown datasets: The SNP marker loci and their corresponding genotypes of the tested animal population samples are divided into known datasets and unknown datasets; both the known and unknown datasets contain the breed corresponding to the sample and the SNP marker loci and their corresponding genotypes of the tested animal breed; three animal breed prediction probability models are trained using the known datasets, including an L1 regularized logistic regression model, an L2 regularized logistic regression model, and a k-nearest neighbor classifier model;
[0016] A4) Obtaining the simulation dataset: Select m breeds from the tested animal population as ancestral breeds to simulate the hybridization population dataset. The names of the ancestral breeds are M1, M2, ..., Mm. The simulation includes the following steps:
[0017] The desired ancestral bloodline ratio for each ancestral variety in the hybrid population is set as M1:M2:...:Mm = n1:n2:...:n m From the pre-filtered tag SNPs, n1 tag SNPs are randomly selected to obtain SNPs from variety M1, and the genotypes corresponding to the SNPs from variety M1 in g samples are obtained; from the pre-filtered tag SNPs, n2 tag SNPs are randomly selected to obtain SNPs from variety M2, and the genotypes corresponding to the SNPs from variety M2 in g samples are obtained; and so on, n1 tag SNPs are randomly selected from the pre-filtered tag SNPs. m The number of tag SNP sites is used to obtain the SNP sites from the Mm variety, and the genotypes corresponding to the SNP sites from the Mm variety are obtained for g samples in the Mm variety.
[0018] The SNP loci and their corresponding genotypes from the M1 variety in the g samples of the M1 variety, the SNP loci and their corresponding genotypes from the M2 variety in the g samples of the M2 variety, ... and the SNP loci and their corresponding genotypes from the Mm variety in the g samples of the Mm variety are randomly spliced together to obtain g hybrid individual samples.
[0019] The simulation steps are repeated K times to obtain a hybrid population containing g×K hybrid individual samples and the genotype data of the pre-filtered tag SNPs corresponding to each hybrid population, and finally the simulated hybrid population dataset is obtained.
[0020] The n1+n2+……+n m The sum of their values is 1;
[0021] Where m is a natural number greater than or equal to 2, and m is less than or equal to the number of species in the tested animal population; where g is a natural number greater than 0; where K is a natural number greater than 0;
[0022] A5) Perform the following operations on the known dataset, the unknown dataset, and the hybrid population dataset respectively: input the SNP marker sites of the tested animal species characteristics in the dataset into the three animal species prediction probability models obtained in A3) for prediction, select the top six prediction probabilities in the prediction results of each model and merge them as features for training a new model, to obtain the features for training a new model using the known dataset, the features for training a new model using the unknown dataset, and the features for training a new model using the hybrid population dataset;
[0023] The known dataset is used to train a new model using features, the unknown dataset is used to train a new model using features, and the hybrid population dataset is used to train a new model using features, and the dataset type is used to train the model using machine learning algorithms to obtain a predictive model R that determines whether a sample belongs to a known variety (in the library).
[0024] The dataset type is the known dataset, the unknown dataset, and / or the hybrid population dataset.
[0025] In the aforementioned computer device, the steps may further include:
[0026] A6) Input the genotype data of the SNP marker loci of the test animal species characteristics into the three animal species prediction probability models obtained in A3) for prediction to obtain the training model usage features of the test animal; input the training model usage features of the test animal into the prediction model R to obtain the species prediction result of the test animal and the prediction probability of the prediction result; predict the test animal whose species prediction result is the test animal species in the known dataset and whose prediction probability is greater than or equal to 50% as a known species; otherwise, predict the test animal as an unknown species.
[0027] The known varieties (also known as in-database varieties) are the varieties corresponding to the samples (the tested animal population samples) in the known dataset, and the unknown varieties (also known as out-of-database varieties) are the varieties corresponding to the samples (the tested animal population samples) in the unknown dataset and / or the hybrid individuals (non-purebred) corresponding to the hybrid population dataset.
[0028] The machine learning algorithms described above can be support vector machines, logistic regression classifiers, Gaussian Bayes, decision trees, and / or random forest algorithms. Further, the machine learning algorithm can be a random forest.
[0029] In the aforementioned computer device, the steps may further include:
[0030] A7) Input the unknown dataset and the hybrid population dataset into the L2 regularized logistic regression model obtained in step A3) for prediction. Use the sample of the test animal population whose prediction result is the known dataset and whose prediction probability is greater than 0.05 as the reference population. Perform population structure analysis on the reference population using population structure estimation software to obtain the population structure analysis result. Based on the population analysis result, use the random forest algorithm to train and construct the unknown species prediction model Q1. Perform population structure analysis on the unknown species in A6) using the population structure estimation software to obtain the unknown species population structure analysis result. Input the population structure analysis result of the unknown species into the unknown species prediction model Q1 to obtain the unknown species prediction result. Output the result that the test animal is an unknown species or a non-purebred (mixed bloodline population or hybrid individual) according to the unknown species prediction result.
[0031] The machine learning algorithms described above can be support vector machines, logistic regression classifiers, Gaussian Bayes, decision trees, and / or random forest algorithms. Further, the machine learning algorithm can be a random forest.
[0032] In the aforementioned computer device, the step may further include A7):
[0033] A7) Train a new model using the features of the unknown dataset described in A5) and the features of the hybrid population dataset, as well as their corresponding dataset types, using a machine learning algorithm to train the model and obtain a prediction model Q2 that distinguishes whether a sample belongs to an unknown breed or a mixed-breed individual; input the features of the new model for the unknown breed described in A6) into the prediction model Q2 to obtain the prediction result for the unknown breed; output the result that the test animal is an unknown breed or a non-purebred (mixed-breed population or hybrid individual) based on the prediction result for the unknown breed.
[0034] In the aforementioned computer device, the test animal may be a pig.
[0035] To address the aforementioned technical problems, a device for predicting whether a test animal is a known species within a stockpile of test animals is provided. The device may include the following modules:
[0036] C1) Data receiving module: used to receive resequencing data from samples containing different species of test animal populations;
[0037] C2) Data processing module: used to process the resequencing data to obtain SNP marker sites characteristic of the tested animal species:
[0038] C2-1) Use SNP detection software to detect SNP sites in the resequencing data to obtain SNP marker sites;
[0039] C2-2) Quality control is performed sequentially on the SNP marker sites and the samples to obtain the quality-controlled SNP sites in the quality control samples;
[0040] C2-3) Linkage disequilibrium analysis was performed on the quality-controlled SNP sites to obtain linked SNP sites, and the quality-controlled SNP sites were further filtered based on the linked SNP sites to obtain tag SNPs;
[0041] C2-4) Detect the heterozygosity of the genotypes of the tested animal population: Divide the reference genome of the tested animals into N genomic windows, calculate the ratio of nucleotide diversity θπ values between any two species within each of the N genomic windows, sort the N genomic windows in descending order of the ratio of θπ values, and select the genomic window with the highest ratio of θπ values as the selection signal region in the genome of the tested animal; where N is a natural number greater than 2.
[0042] The diversity of the tested animal population was tested: the reference genome of the tested animals was divided into N genomic windows, and the genetic differentiation index FST value of the SNP loci within each genomic window for any two species was calculated. ST The values are sorted from largest to smallest among the N genome windows, and the F value is selected. ST The SNP sites within the genomic window with the highest value ratio are selected as feature tag SNP sites; the feature tag SNP sites in the selected signal region are selected to obtain pre-filtered tag SNPs; N is a natural number greater than 2;
[0043] C2-5) Select the pre-filtered tag SNPs of each species in the test animal population that are ranked in the top 1000 in terms of cumulative classification ability relative to other species in the test animal population as feature SNP sites, and merge the feature SNP sites of all species in the test animal population to obtain the feature SNP marker sites of the test animal species.
[0044] C3) Module for obtaining known and unknown datasets: This module is used to divide the SNP marker sites and corresponding genotypes of the tested animal species in the tested animal population samples into known and unknown datasets. Both the known and unknown datasets contain the species corresponding to the samples and the SNP marker sites and corresponding genotypes of the tested animal species. Three animal species prediction probability models are trained using the known datasets, including an L1 regularized logistic regression model, an L2 regularized logistic regression model, and a k-nearest neighbor classifier model.
[0045] C4) Simulation Dataset Acquisition Module: Used to select m varieties from the test animal population as ancestral varieties for the simulation hybridization population dataset, wherein the names of the ancestral varieties are M1, M2, ..., Mm, and the simulation includes the following steps:
[0046] The desired ancestral bloodline ratio for each ancestral variety in the hybrid population is set as M1:M2:...:Mm = n1:n2:...:n m From the pre-filtered tag SNPs, n1 tag SNPs are randomly selected to obtain SNPs from variety M1, and the genotypes corresponding to the SNPs from variety M1 in g samples are obtained; from the pre-filtered tag SNPs, n2 tag SNPs are randomly selected to obtain SNPs from variety M2, and the genotypes corresponding to the SNPs from variety M2 in g samples are obtained; and so on, n1 tag SNPs are randomly selected from the pre-filtered tag SNPs. m The number of tag SNP sites is used to obtain the SNP sites from the Mm variety, and the genotypes corresponding to the SNP sites from the Mm variety are obtained for g samples in the Mm variety.
[0047] The SNP loci and their corresponding genotypes from the M1 variety in the g samples of the M1 variety, the SNP loci and their corresponding genotypes from the M2 variety in the g samples of the M2 variety, ... and the SNP loci and their corresponding genotypes from the Mm variety in the g samples of the Mm variety are randomly spliced together to obtain g hybrid individual samples.
[0048] The simulation steps are repeated K times to obtain a hybrid population containing g×K hybrid individual samples and the genotype data of the pre-filtered tag SNPs corresponding to each hybrid population, and finally the simulated hybrid population dataset is obtained.
[0049] The n1+n2+……+n m The sum of their values is 1;
[0050] Where m is a natural number greater than or equal to 2, and m is less than or equal to the number of species in the tested animal population; where g is a natural number greater than 0; where K is a natural number greater than 0;
[0051] C5) Perform the following operations on the known dataset, the unknown dataset, and the hybrid population dataset respectively: input the SNP marker sites of the tested animal species characteristics in the dataset into the three animal species prediction probability models obtained in A3) for prediction, select the top six prediction probabilities in the prediction results of each model and merge them as features for training a new model, thus obtaining the features for training a new model using the known dataset, the features for training a new model using the unknown dataset, and the features for training a new model using the hybrid population dataset;
[0052] The known dataset is used to train a new model using features, the unknown dataset is used to train a new model using features, the hybrid population dataset is used to train a new model using features, and the dataset type is used to train a model using machine learning algorithms to obtain a predictive model R for determining whether a sample belongs to a known variety (in the library);
[0053] C6) Prediction Module: This module is used to input the genotype data of the SNP marker loci of the test animal species characteristics into the three animal species prediction probability models obtained in C3) for prediction, and obtain the training model usage features of the test animal; input the training model usage features of the test animal into the prediction model R to obtain the species prediction result of the test animal and the prediction probability of the prediction result; predict the test animal whose species prediction result is the test animal species in the known dataset and whose prediction probability is greater than or equal to 50% as a species in the database (known); otherwise, predict the test animal as an unknown (outside the database) species.
[0054] The machine learning algorithms described above can be support vector machines, logistic regression classifiers, Gaussian Bayes, decision trees, and / or random forest algorithms. Further, the machine learning algorithm can be a random forest.
[0055] To address the aforementioned technical problems, the present invention also provides a method for predicting whether a test animal is a known species within a testing library, an unknown species outside the library, or a mixed-blood individual. The method may include the following steps:
[0056] D1) Data reception: Re-sequencing data of samples containing different species of test animal populations;
[0057] D2) Data Processing: The resequencing data was processed as follows to obtain the SNP marker sites characteristic of the tested animal species:
[0058] D2-1) Use SNP detection software to detect SNP sites in the resequencing data to obtain SNP marker sites;
[0059] D2-2) Quality control was performed on the SNP marker sites and the samples sequentially to obtain the quality-controlled SNP sites in the quality control samples;
[0060] D2-3) Perform linkage disequilibrium analysis on the quality-controlled SNP sites to obtain linked SNP sites, and further filter the quality-controlled SNP sites based on the linked SNP sites to obtain tag SNPs;
[0061] D2-4) Detect the heterozygosity of the genotypes of the tested animal population: Divide the reference genome of the tested animals into N genomic windows, calculate the ratio of nucleotide diversity θπ values between any two species in each of the N genomic windows, sort the N genomic windows in descending order of the ratio of the θπ values, and select the genomic window with the highest ratio of the θπ values as the selection signal region in the genome of the tested animal; where N is a natural number greater than 2.
[0062] The diversity of the tested animal population was tested: the reference genome of the tested animals was divided into N genomic windows, and the genetic differentiation index FST value of the SNP loci within each genomic window for any two species was calculated. ST The values are sorted from largest to smallest among the N genome windows, and the F value is selected. ST The SNP sites within the genomic window with the highest value ratio are selected as feature tag SNP sites; the feature tag SNP sites in the selected signal region are selected to obtain pre-filtered tag SNPs; N is a natural number greater than 2;
[0063] D2-5) Select the pre-filtered tag SNPs of each species in the test animal population that are ranked in the top 1000 in terms of cumulative classification ability relative to other species in the test animal population as feature SNP sites, and merge the feature SNP sites of all species in the test animal population to obtain the feature SNP marker sites of the test animal species.
[0064] D3) Obtaining the known and unknown datasets: The SNP marker loci and their corresponding genotypes of the tested animal population samples are divided into known and unknown datasets; both the known and unknown datasets contain the breed corresponding to the sample and the SNP marker loci and their corresponding genotypes of the tested animal breed; three animal breed prediction probability models are trained using the known datasets, including an L1 regularized logistic regression model, an L2 regularized logistic regression model, and a k-nearest neighbor classifier model;
[0065] D4) Obtaining the simulation dataset: Select m breeds from the tested animal population as ancestral breeds to simulate the hybridization population dataset. The names of the ancestral breeds are M1, M2, ..., Mm. The simulation includes the following steps:
[0066] The desired ancestral bloodline ratio for each ancestral variety in the hybrid population is set as M1:M2:...:Mm = n1:n2:...:n m From the pre-filtered tag SNPs, n1 tag SNPs are randomly selected to obtain SNPs from variety M1, and the genotypes corresponding to the SNPs from variety M1 in g samples are obtained; from the pre-filtered tag SNPs, n2 tag SNPs are randomly selected to obtain SNPs from variety M2, and the genotypes corresponding to the SNPs from variety M2 in g samples are obtained; and so on, n1 tag SNPs are randomly selected from the pre-filtered tag SNPs. m The number of tag SNP sites is used to obtain the SNP sites from the Mm variety, and the genotypes corresponding to the SNP sites from the Mm variety are obtained for g samples in the Mm variety.
[0067] The SNP loci and their corresponding genotypes from the M1 variety in the g samples of the M1 variety, the SNP loci and their corresponding genotypes from the M2 variety in the g samples of the M2 variety, ... and the SNP loci and their corresponding genotypes from the Mm variety in the g samples of the Mm variety are randomly spliced together to obtain g hybrid individual samples.
[0068] The simulation steps are repeated K times to obtain a hybrid population containing g×K hybrid individual samples and the genotype data of the pre-filtered tag SNPs corresponding to each hybrid population, and finally the simulated hybrid population dataset is obtained.
[0069] The n1+n2+……+n m The sum of their values is 1;
[0070] Where m is a natural number greater than or equal to 2, and m is less than or equal to the number of species in the tested animal population; where g is a natural number greater than 0; where K is a natural number greater than 0;
[0071] D5) Perform the following operations on the known dataset, the unknown dataset, and the hybrid population dataset respectively: input the SNP marker sites of the tested animal species characteristics in the dataset into the three animal species prediction probability models obtained in D3) for prediction, select the top six prediction probabilities in the prediction results of each model and merge them as features for training a new model, thus obtaining the features for training a new model using the known dataset, the features for training a new model using the unknown dataset, and the features for training a new model using the hybrid population dataset;
[0072] The known dataset is used to train a new model using features, the unknown dataset is used to train a new model using features, the hybrid population dataset is used to train a new model using features, and the dataset type is used to train a model using machine learning algorithms to obtain a predictive model R for determining whether a sample belongs to a known variety (in the library);
[0073] D6) Prediction Module: This module is used to input the genotype data of the SNP marker loci of the test animal species characteristics into the three animal species prediction probability models obtained in D3) for prediction, and obtain the features used by the new training model for the test animal; input the features used by the new training model for the test animal into the prediction model R to obtain the species prediction result of the test animal and the prediction probability of the prediction result; predict the test animal whose species prediction result is a test animal species in the known dataset and whose prediction probability is greater than or equal to 50% as a species in the database (known); otherwise, predict the test animal as an unknown (outside the database) species.
[0074] D7) Input the unknown dataset and the hybrid population dataset into the L2 regularized logistic regression model obtained in step D3) for prediction. Use the sample of the test animal population whose prediction result is the known dataset and whose prediction probability is greater than 0.05 as the reference population. Perform population structure analysis on the reference population using population structure estimation software to obtain the population structure analysis result. Based on the population analysis result, use the random forest algorithm to train and construct the unknown species prediction model Q1. Perform population structure analysis on the unknown species in D6) using the population structure estimation software to obtain the unknown species population structure analysis result. Input the population structure analysis result of the unknown species into the unknown species prediction model Q1 to obtain the unknown species prediction result. Output the result that the test animal is an unknown species or a non-purebred (mixed bloodline population or hybrid individual) according to the unknown species prediction result.
[0075] The machine learning algorithms described above can be support vector machines, logistic regression classifiers, Gaussian Bayes, decision trees, and / or random forest algorithms. Further, the machine learning algorithm can be a random forest.
[0076] To address the aforementioned technical problems, the present invention also provides a method for predicting whether a test animal is a known species within a testing library, an unknown species outside the library, or a mixed-blood individual. The method may include the following steps:
[0077] E1) Data reception: Receiving resequencing data from samples containing different species of test animal populations;
[0078] E2) Data Processing: The resequencing data was processed as follows to obtain the SNP marker sites characteristic of the tested animal species:
[0079] E2-1) Use SNP detection software to detect SNP sites in the resequencing data to obtain SNP marker sites;
[0080] E2-2) Quality control was performed on the SNP marker sites and the samples sequentially to obtain the quality-controlled SNP sites in the quality control samples;
[0081] E2-3) Linkage disequilibrium analysis was performed on the quality-controlled SNP sites to obtain linked SNP sites, and the quality-controlled SNP sites were further filtered based on the linked SNP sites to obtain tag SNPs;
[0082] E2-4) Detect the heterozygosity of the genotypes of the tested animal population: Divide the reference genome of the tested animals into N genomic windows, calculate the ratio of nucleotide diversity θπ values between any two species within each of the N genomic windows, sort the N genomic windows in descending order of the ratio of the θπ values, and select the genomic window with the highest ratio of the θπ values as the selection signal region in the genome of the tested animal; where N is a natural number greater than 2.
[0083] The diversity of the tested animal population was tested: the reference genome of the tested animals was divided into N genomic windows, and the genetic differentiation index FST value of the SNP loci within each genomic window for any two species was calculated. ST The values are sorted from largest to smallest among the N genome windows, and the F value is selected. ST The SNP sites within the genomic window with the highest value ratio are selected as feature tag SNP sites; the feature tag SNP sites in the selected signal region are selected to obtain pre-filtered tag SNPs; N is a natural number greater than 2;
[0084] E2-5) Select the pre-filtered tag SNPs of each species in the test animal population that are ranked in the top 1000 in terms of cumulative classification ability relative to other species in the test animal population as feature SNP sites, and merge the feature SNP sites of all species in the test animal population to obtain the feature SNP marker sites of the test animal species.
[0085] E3) Obtaining known and unknown datasets: The SNP marker sites and their corresponding genotypes of the tested animal species in the tested animal population samples are divided into known datasets and unknown datasets; both the known datasets and the unknown datasets contain the species corresponding to the samples and the SNP marker sites and their corresponding genotypes of the tested animal species in the samples; three animal species prediction probability models are trained using the known datasets, including an L1 regularized logistic regression model, an L2 regularized logistic regression model, and a k-nearest neighbor classifier model;
[0086] E4) Obtaining the simulation dataset: Select m breeds from the tested animal population as the ancestral breed simulation hybridization population dataset, and name the ancestral breeds as M1, M2, ..., Mm. The simulation includes the following steps:
[0087] The desired ancestral bloodline ratio for each ancestral variety in the hybrid population is set as M1:M2:...:Mm = n1:n2:...:n m From the pre-filtered tag SNPs, n1 tag SNPs are randomly selected to obtain SNPs from variety M1, and the genotypes corresponding to the SNPs from variety M1 in g samples are obtained; from the pre-filtered tag SNPs, n2 tag SNPs are randomly selected to obtain SNPs from variety M2, and the genotypes corresponding to the SNPs from variety M2 in g samples are obtained; and so on, n1 tag SNPs are randomly selected from the pre-filtered tag SNPs. m The number of tag SNP sites is used to obtain the SNP sites from the Mm variety, and the genotypes corresponding to the SNP sites from the Mm variety are obtained for g samples in the Mm variety.
[0088] The SNP loci and their corresponding genotypes from the M1 variety in the g samples of the M1 variety, the SNP loci and their corresponding genotypes from the M2 variety in the g samples of the M2 variety, ... and the SNP loci and their corresponding genotypes from the Mm variety in the g samples of the Mm variety are randomly spliced together to obtain g hybrid individual samples.
[0089] The simulation steps are repeated K times to obtain a hybrid population containing g×K hybrid individual samples and the genotype data of the pre-filtered tag SNPs corresponding to each hybrid population, and finally the simulated hybrid population dataset is obtained.
[0090] The n1+n2+……+n m The sum of their values is 1;
[0091] Where m is a natural number greater than or equal to 2, and m is less than or equal to the number of species in the tested animal population; where g is a natural number greater than 0; where K is a natural number greater than 0;
[0092] E5) Perform the following operations on the known dataset, the unknown dataset, and the hybrid population dataset respectively: input the SNP marker sites of the tested animal species characteristics in the dataset into the three animal species prediction probability models obtained in E3) for prediction, select the top six prediction probabilities in the prediction results of each model and merge them as features for training a new model, thus obtaining the features for training a new model using the known dataset, the features for training a new model using the unknown dataset, and the features for training a new model using the hybrid population dataset;
[0093] The known dataset is used to train a new model using features, the unknown dataset is used to train a new model using features, the hybrid population dataset is used to train a new model using features, and the dataset type is used to train a model using machine learning algorithms to obtain a predictive model R for determining whether a sample belongs to a known variety (in the library);
[0094] The machine learning algorithms described above can be support vector machines, logistic regression classifiers, Gaussian Bayes, decision trees, and / or random forest algorithms. Further, the machine learning algorithm can be a random forest.
[0095] E6) Prediction Module: This module is used to input the genotype data of the SNP marker loci of the test animal species characteristics into the three animal species prediction probability models obtained in E3) for prediction, thereby obtaining the features used by the new training model for the test animal; input the features used by the new training model for the test animal into the prediction model R to obtain the species prediction result of the test animal and the prediction probability of the prediction result; predict the test animal whose species prediction result is a test animal species in the known dataset and whose prediction probability is greater than or equal to 50% as a species in the database (known); otherwise, predict the test animal as an unknown (outside the database) species.
[0096] E7) Train a new model using the features of the unknown dataset described in E5) and the features of the hybrid population dataset, as well as their corresponding dataset types, using a machine learning algorithm to train the model and obtain a prediction model Q2 that distinguishes whether a sample belongs to an unknown breed or a mixed-breed individual; input the features of the new model for the unknown breed described in E6) into the prediction model Q2 to obtain the prediction result for the unknown breed; output the result that the test animal is an unknown breed or a non-purebred (mixed-breed population or hybrid individual) based on the prediction result for the unknown breed.
[0097] The machine learning algorithms described above can be support vector machines, logistic regression classifiers, Gaussian Bayes, decision trees, and / or random forest algorithms. Further, the machine learning algorithm can be a decision tree.
[0098] The test animal mentioned above was a pig.
[0099] To address the aforementioned technical problems, a computer-readable storage medium storing a computer program is also provided, the computer program enabling a computer to perform the steps of the methods described above. Attached Figure Description
[0100] Figure 1 A flowchart of the computer device or method of the present invention. Detailed Implementation
[0101] The present invention will now be described in further detail with reference to specific embodiments. The given embodiments are merely illustrative of the invention and not intended to limit its scope. The embodiments provided below can serve as a guide for further improvements by those skilled in the art and do not constitute a limitation on the invention in any way.
[0102] Unless otherwise specified, the experimental methods used in the following examples are conventional methods, performed according to the techniques or conditions described in the literature in this field or according to the product instructions. Unless otherwise specified, the materials and reagents used in the following examples are commercially available.
[0103] The calculation programs used in the examples in this patent (unless otherwise specified) are all implemented using the Python language.
[0104] Example 1. Identification of individuals with mixed lineages and prediction of whether an individual belongs to a breed in the stock.
[0105] SNP marker data for the 42 Chinese local pig breeds were obtained by comparing resequencing data from 1,249 samples from 42 Chinese local pig breeds (Table 1) with the pig reference genome (Sscrofa11.1, February 7, 2017).
[0106] Table 1.42 Local Pig Breeds and Corresponding Sample Sizes
[0107]
[0108] 1. Data quality control: sample screening and SNP labeling.
[0109] SNP detection and routine quality control (DP<10||QD<2.0||MQ<40.0||FS>60.0||SOR>3.0||MQRankSum<-12.5||ReadPosRankSum<-8.0) were performed on the resequencing data using GATK (https: / / gatk.broadinstitute.org / hc / en-us). After quality control, 57,335,285 SNP markers were obtained.
[0110] 1.1 SNP Marking Quality Control
[0111] The SNP markers detected by resequencing were quality controlled using PLINK (https: / / www.cog-genomics.org / plink2 / ): SNP markers with a deletion rate greater than 0.01 (i.e., a deletion rate greater than 1%) were removed, and SNP markers with a MAF (Minor Allele Frequency) less than 0.05 were removed to obtain the quality-controlled SNP marker sites.
[0112] 1.2 Sample quality control:
[0113] After quality control of SNP markers, PLINK was used to further control the samples: samples with an SNP marker loss rate greater than 0.01% (i.e., an SNP loss rate greater than 1%) were removed, and samples had a maximum of two allele types. This resulted in 20,937,518 SNP markers from 1,189 resequencing data samples.
[0114] 1.3 Removal of sites with high linkage disequilibrium levels
[0115] After quality control of the SNP markers, and then quality control of the samples, the linkage disequilibrium (LD) of the remaining SNP sites (quality control sites in the quality control samples) was calculated. The PLINK software was used to calculate and remove linkage sites with high LD (--indep-pairwise 50 10 0.2), resulting in 1,611,107 tag SNPs and 1,189 samples for further analysis.
[0116] 2. Use classic genetic methods and indicators to pre-filter SNP markers for characteristic loci.
[0117] 2.1 Genetic θπ values and F2P of variety combinations ST Value calculation
[0118] Heterozygosity was assessed for pig breeds by selecting regions within the genome that had undergone selection; higher levels of selection correlated with lower heterozygosity. Vcftools (https: / / vcftools.github.io / ) was used to calculate the nucleotide polymorphism (θπ) values for each genome window across 42 pig breeds (1189 samples) using 100kb genome windows. The θπ value ratio for each genome window between every two breeds was calculated (the ratio of θπ value of breed 1 to that of breed 2, with the logarithm of this ratio to be used as the ratio of θπ values within each genome window between breed 1 and breed 2). The θπ value ratios within each genome window were ranked, and the highest-ranked genome window was selected as the genomic region in the pig genome that had undergone evolutionary selection.
[0119] The genomes of different breeds were subjected to interpopulation divergence tests to screen for characteristic SNP loci. Vcftools was used to calculate the F-values of SNP loci within each genomic window in every pair of breed populations across 42 pig breeds. ST Genetic differentiation index. For each pair of pig breeds, the Fi within each genomic window is calculated. ST The SNP values are sorted, and the highest-ranked SNP is selected as the feature tag SNP. The higher the differentiation index, the greater the difference.
[0120] 2.2 Pre-filtering of tag SNPs
[0121] For each pair of breed combinations (each pair of pig breed groups) among the 42 breeds, the top 2% of the genome windows with the highest θπ ratio between breeds were selected as selection signal regions, and Fi was extracted from the genome windows of the selection signal regions. ST The top 1% of SNP genetic markers with the highest values were selected as characteristic tag SNP sites. Finally, all characteristic tag SNP sites selected from all variety pairs were used as pre-filtered tag SNPs.
[0122] In this process, 103,389 pre-filtered tag SNPs were obtained from the 1,611,107 tag SNPs obtained through quality control in step 1 for further screening.
[0123] 3. Further screen effective loci using indicators that consider feature classification ability and redundancy between features.
[0124] Effective loci were further screened using an index that considers feature classification ability and redundancy between features. The index used in this invention is CCA (Cumulative classification Ability, related literature: Zhao S, Shi CM, Ma L, et al. AIM-SNPtag: a computationally efficient approach for developing ancestry-informative SNP panels[J]. Forensic Science International: Genetics, 2019, 38: 245-253). The CCA index value of SNP loci was calculated using self-compiled Python code. The top 1000 pre-filtered tag SNPs of each of the 42 pig breeds in terms of CCA ranking relative to other breeds were taken as feature SNP loci (i.e. SNP loci with breed classification ability). If the total number of feature SNP markers in the 42 datasets of the 42 breeds exceeded 20,000, only the top 20,000 loci were taken. Finally, the 42 datasets were merged, and a total of 19,263 pig feature SNP marker loci (high-quality genetic variation loci) were screened for model training. The specific distribution of the number of feature SNP marker loci on each chromosome is shown in Table 2.
[0125] Table 2. Distribution and number of characteristic SNP marker sites on each chromosome
[0126] chromosome Number of SNP sites chromosome Number of characteristic SNP marker sites 1 1,760 11 1,016 2 1,179 12 927 3 889 13 1,895 4 1,280 14 820 5 1,014 15 1,503 6 1,265 16 366 7 770 17 368 8 1,248 18 579 9 1,184 X 670 10 530 total 19,263
[0127] 4. Classification Model Training
[0128] The 19,263 SNP markers from 42 pig breeds (1258 samples) obtained in step 3 were divided into a 70% training set and a 30% test set. The SNP markers in PLINK format corresponding to the samples in the training set were recoded and used as features in the classifier training (recoded in 0, 1, 2 format, representing the three genotypes: 0 for AA, 1 for AB, and 2 for BB, where A represents the major allele and B the minor allele). The breed corresponding to the sample was used as the label in the classifier training. A suitable machine learning classifier was trained, and the optimal classifier (the one with the highest accuracy) was selected to predict which breed a sample should belong to. The trained classifier can output the pig breed name corresponding to the sample by inputting the 19,263 pig feature SNP markers from the pig breed samples.
[0129] The classifiers involved in this invention include k-Nearest Neighbor (KNN) classifiers, Logistic Regression classifiers, Support Vector Machine (SVM) classifiers, Naive Bayes (NB) classifiers, and Random Forest Algorithm classifiers. Accuracy and AUC (Area Under Curve) are used as accuracy metrics. Table 3 shows the classification accuracy of the classifiers under different methods. The Logistic Regression model shows the best accuracy and AUC results.
[0130] Table 3. Classification accuracy of classifiers
[0131]
[0132] 5. Divide the known dataset and train its corresponding classifier model.
[0133] The 42 local pig breeds were divided into two datasets: a known dataset (942 samples from 32 breeds) and an unknown dataset (307 samples from 10 breeds), as shown in Table 4. The known dataset was further divided into a 70% training set and a 30% test set. The SNP markers in PLINK format corresponding to the samples in the training set were recoded and used as features in classifier training (same as step 4, recoded to 0, 1, 2 format, representing the three genotypes AA, AB, and BB, respectively, where A represents the major allele and B represents the minor allele). The breed corresponding to the samples was used as the label information for classifier training. Five-fold cross-validation was used to train three classifier models: a regularized logistic regression model (11), a regularized logistic regression model (12), and a k-nearest neighbor classifier. The trained classifier models were saved, as were the results of each validation set. The test set was tested, and the test set results were saved. The three classifier models trained here are different from the classifier models trained in step 4. They are classifier models trained under the condition of no unknown dataset. By inputting the 19,263 SNP marker loci of pig breed samples, the classifier model outputs the names of the corresponding pig breeds in the "known dataset".
[0134] Table 4. Classification of 42 local pig breed datasets
[0135]
[0136] 6. Simulation of hybrid population data
[0137] The simulation method of this invention refers to the method of Jacoho et al. (related literature: Pardo-Seco, J., F. Martinón-Torres, and A. Salas, Evaluating the accuracy of AIM panels at quantifying genome ancestry. BMC Genomics, 2014.15(1):p.543). Five pig breeds, namely Bama Xiangzhu, Luchuan Zhu, Lantang Zhu, Jiaxing Black Zhu and Dapulian Zhu, are used as ancestral breeds. The haplotypes from these five groups (based on 103,389 tag SNPs obtained by screening in step 2) are randomly mixed according to the expected bloodline ratio in the simulation scheme to generate new hybrid population genotypes as hybrid population datasets. For example, if the ancestral components are Bama Miniature Pig and Luchuan Pig, and the desired bloodline ratio is 0.5:0.5, the specific method is as follows: 50% of the SNP markers from 103,389 pre-filtered tag SNPs are randomly selected as the SNPs originating from the Bama Miniature Pig breed. The genotypes of these Bama Miniature Pig SNPs come from the corresponding marker SNPs of 20 individuals randomly selected from the Bama Miniature Pig breed dataset. In addition, the genotypes of the remaining 50% of the SNPs (denoted as Luchuan Pig SNPs) after removing the Bama Miniature Pig SNPs from the 103,389 pre-filtered tag SNPs come from the corresponding SNP markers of 20 individuals randomly selected from the Luchuan Pig breed dataset. The SNP markers from the two ancestral breed individuals are then randomly spliced together to form 20 new hybrid individuals. This method is repeated 100 times, and the simulation scheme finally generates genotype data of a hybrid population containing 2,000 individuals. The simulation was performed as described above according to the specific method of the simulation (Table 5), resulting in a simulation dataset (hybrid population dataset) containing 8 hybrid populations.
[0138] Table 5. Specific Simulation Methods
[0139]
[0140] 7. Classifier training for determining whether a sample belongs to a known variety in the database.
[0141] The known dataset from step 5, the unknown dataset, and the simulated dataset from step 6 are processed as follows: The datasets are divided into a 70% training set and a 30% test set. The genotypes of pig SNP marker sites from the samples in the training set are input into the three classifier models trained in step 5: the L1-regularized logistic regression model, the L2-regularized logistic regression model, and the k-nearest neighbor classifier, to obtain model prediction results. The top six (pig breed) prediction probabilities (ranked by probability) of each classifier model are combined as features for training a new (classifier) model (a total of 18 features). These features are then used to train a new model on the known dataset, the unknown dataset, and the simulated dataset.
[0142] Features were used to train a new model on the known dataset, the unknown dataset, and the simulated dataset. The dataset type used as the label for training the new classifier (samples in the "known dataset" were labeled as in-library varieties, while samples in the "unknown dataset" and "simulated dataset" were labeled as non-in-library purebreds) were also considered. Different machine learning methods (including support vector machines, logistic regression classifiers, Gaussian Bayes, decision trees, and random forests) were used to train and save the predictive model to determine whether a sample belongs to an in-library (known) variety. The training set data was then input into the classifier in step 4, and the predicted probability was input into the classifier model trained in the current step (determining whether a sample belongs to an in-library (known) variety). Samples predicted as in-library varieties with a probability greater than 50% were considered in-library varieties; otherwise, they were considered out-of-library (unknown) varieties (mixed-blood (non-purebred) groups or unknown purebred groups). Table 6 shows the accuracy and other evaluation metrics of different machine learning methods, where f1 represents the harmonic mean of precision and recall. The results show that the random forest method has the best prediction accuracy and AUC.
[0143] Table 6. Accuracy and other evaluation indicators of machine learning methods for determining whether a variety is in the database.
[0144]
[0145] 8. Method 1 for determining mixed-blood individuals or off-lineage varieties
[0146] The method for classifying the off-lineage varieties obtained in step 7 into mixed-lineage populations or off-lineage variety resources is as follows: First, input the unknown dataset and the hybrid population dataset from step 6 into the L2-regularized logistic regression model classifier in step 5. Use the prediction results with a prediction probability greater than 0.05 (on-lineage varieties) as the reference population. Run the Admixture population structure estimation software to estimate the population structure of the reference population, obtaining the ancestral components at K equal to 2, 3, 4, 5, 6, and 7. Summarize the ancestral components of each individual into two parameters: one is "mixing degree," which represents the number of ancestors with a population structure estimation component greater than 0.01, and the other is "specific component ratio," which represents the ratio of ancestral components that are significantly different from the ancestral components of the reference population. Divide the dataset labeled as mixed-lineage populations or off-lineage variety resources into training and test sets in a 7:3 ratio. Use the "mixing degree" and "specific component ratio" calculated with different K values in the training set as input features for classifier training. Use the dataset type ("unknown dataset" labeled as off-lineage variety resources, "simulated dataset" labeled as mixed-lineage individuals) as the label for training, and train decision tree and random forest classifiers respectively. By inputting the Admixture results, the classifier model trained in this step (out-of-stock variety prediction model) can determine whether the out-of-stock variety resource is an unknown variety or a mixed-blood individual (not purebred). The decision tree model has an accuracy of 0.9961 and an F1 score of 0.8973, while the random forest model has an accuracy of 0.9984 and an F1 score of 0.9570. It can be seen that the random forest model performs better in determining whether a variety is a purebred (unknown variety) from outside the stock and whether it is a new out-of-stock resource. Individuals identified as mixed-blood by the classifier and their corresponding reference groups are input into the Admixture software, and the Admixture results for each individual are used as the pedigree composition result.
[0147] 9. Method Two for Determining Mixed-Blood Individuals or Off-Stock Variety Resources
[0148] The second method for classifying mixed-blood populations or out-of-breed resources is similar to step 7. The unknown dataset and the hybrid population dataset from step 6 are divided into a 70% training set and a 30% test set. Samples from the training set are input into the three classifier models trained in step 5: an L1-regularized logistic regression model, an L2-regularized logistic regression model, and a k-nearest neighbor classifier. The top six predicted probabilities (ranked by probability) of each classifier model are used as input features (a total of 18 features). The dataset type (in this step, samples from the "unknown dataset" are labeled as out-of-breed (unknown purebred) resources, and samples from the "hybrid population dataset" are labeled as mixed-blood individuals) are used as training labels. A suitable machine learning classifier is trained, and the optimal classifier (the one with the highest accuracy) is selected. Samples predicted as out-of-breed with a probability greater than 50% are classified as out-of-breed, and samples predicted as mixed-blood individuals with a probability greater than 50% are classified as mixed-blood individuals. Table 7 shows the accuracy and other evaluation metrics of different machine learning methods in this step, where f1 represents the harmonic mean of precision and recall.
[0149] Table 7. Accuracy and other evaluation metrics of machine learning methods for determining whether an individual is a new resource from outside the database or an individual with mixed ancestry.
[0150]
[0151] The results show that the decision tree method has the best prediction accuracy and AUC.
[0152] Individuals identified as having mixed ancestry by a classifier and their corresponding reference groups are input into the Admixture software, and the Admixture results of these individuals are used as the results of their ancestry composition.
[0153] The present invention has been described in detail above. Those skilled in the art will recognize that the invention can be practiced in a wide range of ways with equivalent parameters, concentrations, and conditions without departing from its spirit and scope, and without requiring unnecessary experiments. While specific embodiments have been provided, it should be understood that further modifications can be made to the invention. In summary, according to the principles of the invention, this application is intended to include any changes, uses, or improvements to the invention, including changes made using conventional techniques known in the art that depart from the scope disclosed herein.
Claims
1. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to perform the following steps: A1) Data reception: Receiving resequencing data from samples containing different species of test animal populations; A2) Data processing: The resequencing data was processed as follows to obtain the SNP marker sites characteristic of the tested animal species: A2-1) Use SNP detection software to detect SNP sites in the resequencing data to obtain SNP marker sites; A2-2) Quality control was performed on the SNP marker sites and the samples sequentially to obtain the quality-controlled SNP sites in the quality control samples; A2-3) Perform linkage disequilibrium analysis on the quality-controlled SNP sites to obtain linked SNP sites, and further filter the quality-controlled SNP sites based on the linked SNP sites to obtain tag SNPs; A2-4) Detecting the heterozygosity of the genotypes of the tested animal population: Divide the reference genome of the tested animals into N genomic windows, calculate the ratio of nucleotide diversity θπ values between any two species within each of the N genomic windows, sort the N genomic windows from largest to smallest according to the ratio of θπ values, and select the genomic window with the highest ratio of θπ values as the selection signal region in the genome of the tested animal; where N is a natural number greater than 2. The diversity of the tested animal population was examined: the reference genome of the tested animals was divided into N genomic windows, and the genetic differentiation index (FST) of the SNP loci within each genomic window for any two species was calculated. Based on the FST... ST The values are sorted from largest to smallest among the N genome windows, and the F value is selected. ST The SNP sites with the highest value within the preceding genomic window are used as characteristic tag SNP sites. Select the feature tagSNP sites in the selected signal region to obtain the pre-filtered tag SNPs; where N is a natural number greater than 2. A2-5) Select the pre-filtered tag SNPs of each species in the test animal population that are ranked in the top 1000 in terms of cumulative classification ability relative to other species in the test animal population as feature SNP sites, and merge the feature SNP sites of all species in the test animal population to obtain the feature SNP marker sites of the test animal species. A3) Obtaining known and unknown datasets: The SNP marker loci and their corresponding genotypes of the tested animal population samples are divided into known datasets and unknown datasets; both the known and unknown datasets contain the breed corresponding to the sample and the SNP marker loci and their corresponding genotypes of the tested animal breed; three animal breed prediction probability models are trained using the known datasets, including an L1 regularized logistic regression model, an L2 regularized logistic regression model, and a k-nearest neighbor classifier model; A4) Obtaining the simulation dataset: Select m breeds from the tested animal population as ancestral breeds to simulate the hybridization population dataset. The names of the ancestral breeds are M1, M2, ..., Mm. The simulation includes the following steps: The desired ancestral bloodline ratio for each ancestral variety in the hybrid population is set as M1:M2:...:Mm = n1:n2:...:n m From the pre-filtered tag SNPs, n1 tag SNPs are randomly selected to obtain SNPs from variety M1, and the genotypes corresponding to the SNPs from variety M1 in g samples are obtained; from the pre-filtered tag SNPs, n2 tag SNPs are randomly selected to obtain SNPs from variety M2, and the genotypes corresponding to the SNPs from variety M2 in g samples are obtained. Similarly, n are randomly selected from the pre-filtered tagSNPs. m The number of tag SNP sites is used to obtain the SNP sites from the Mm variety, and the genotypes corresponding to the SNP sites from the Mm variety are obtained for g samples in the Mm variety. The SNP loci and their corresponding genotypes from the M1 variety in the g samples of the M1 variety, the SNP loci and their corresponding genotypes from the M2 variety in the g samples of the M2 variety, ... and the SNP loci and their corresponding genotypes from the Mm variety in the g samples of the Mm variety are randomly spliced together to obtain g hybrid individual samples. The simulation steps are repeated K times to obtain a hybrid population containing g×K hybrid individual samples and the genotype data of the pre-filtered tag SNPs corresponding to each hybrid population, and finally the simulated hybrid population dataset is obtained. The n1+n2+……+n m The sum of their values is 1; Where m is a natural number greater than or equal to 2, and m is less than or equal to the number of species in the tested animal population; where g is a natural number greater than 0; where K is a natural number greater than 0; A5) Perform the following operations on the known dataset, the unknown dataset, and the hybrid population dataset respectively: input the SNP marker sites of the tested animal species characteristics in the dataset into the three animal species prediction probability models obtained in A3) for prediction, select the top six prediction probabilities in the prediction results of each model and merge them as features for training a new model, to obtain the features for training a new model using the known dataset, the features for training a new model using the unknown dataset, and the features for training a new model using the hybrid population dataset; The known dataset is used to train a new model using features, the unknown dataset is used to train a new model using features, and the hybrid population dataset is used to train a new model using features, and the dataset type is used to train the model using machine learning algorithms to obtain a predictive model R that determines whether a sample belongs to a known variety (in the library). Summary of the invention: The dataset type is the known dataset, the unknown dataset, and / or the hybrid population dataset.
2. The computer device according to claim 1, characterized in that: The steps also include: A6) Input the genotype data of the SNP marker loci of the test animal species characteristics into the three animal species prediction probability models obtained in A3) for prediction to obtain the training model usage features of the test animal; input the training model usage features of the test animal into the prediction model R to obtain the species prediction result of the test animal and the prediction probability of the prediction result; predict the test animal whose species prediction result is the test animal species in the known dataset and whose prediction probability is greater than or equal to 50% as a known species; otherwise, predict the test animal as an unknown species. Summary of the invention: The known varieties (also known as in-database varieties) are the varieties corresponding to the samples (the tested animal population samples) in the known dataset, and the unknown varieties (also known as out-of-database varieties) are the varieties corresponding to the samples (the tested animal population samples) in the unknown dataset and / or the hybrid individuals (non-purebred) corresponding to the hybrid population dataset.
3. The computer device according to claim 1 or 2, characterized in that: The steps also include: A7) Input the unknown dataset and the hybrid population dataset into the L2 regularized logistic regression model obtained in step A3) for prediction. Use the sample of the test animal population whose prediction result is the known dataset and whose prediction probability is greater than 0.05 as the reference population. Perform population structure analysis on the reference population using population structure estimation software to obtain the population structure analysis result. Based on the population analysis result, use the random forest algorithm to train and construct the unknown species prediction model Q1. Perform population structure analysis on the unknown species in A6) using the population structure estimation software to obtain the unknown species population structure analysis result. Input the population structure analysis result of the unknown species into the unknown species prediction model Q1 to obtain the unknown species prediction result. Output the result that the test animal is an unknown species or a non-purebred (mixed bloodline population or hybrid individual) according to the unknown species prediction result.
4. The computer device according to claim 1 or 2, characterized in that: The steps also include A7): A7) Train a new model using the features of the unknown dataset described in A5) and the features of the hybrid population dataset, as well as their corresponding dataset types, using a machine learning algorithm to train the model and obtain a prediction model Q2 that distinguishes whether a sample belongs to an unknown breed or a mixed-breed individual; input the features of the new model for the unknown breed described in A6) into the prediction model Q2 to obtain the prediction result for the unknown breed; output the result that the test animal is an unknown breed or a non-purebred (mixed-breed population or hybrid individual) based on the prediction result for the unknown breed.
5. The computer device according to any one of claims 1-4, characterized in that: The test animal was a pig.
6. A device for predicting whether a test animal is a known species of test animal in a stockpile, characterized in that: The device includes the following modules: C1) Data receiving module: used to receive resequencing data from samples containing different species of test animal populations; C2) Data processing module: used to process the resequencing data to obtain SNP marker sites characteristic of the tested animal species: C2-1) Use SNP detection software to detect SNP sites in the resequencing data to obtain SNP marker sites; C2-2) Quality control is performed sequentially on the SNP marker sites and the samples to obtain the quality-controlled SNP sites in the quality control samples; C2-3) Linkage disequilibrium analysis was performed on the quality-controlled SNP sites to obtain linked SNP sites, and the quality-controlled SNP sites were further filtered based on the linked SNP sites to obtain tag SNPs; C2-4) Detect the heterozygosity of the genotypes of the tested animal population: Divide the reference genome of the tested animals into N genomic windows, calculate the ratio of nucleotide diversity θπ values between any two species within each of the N genomic windows, sort the N genomic windows in descending order of the ratio of θπ values, and select the genomic window with the highest ratio of θπ values as the selection signal region in the genome of the tested animal; where N is a natural number greater than 2. The diversity of the tested animal population was examined: the reference genome of the tested animals was divided into N genomic windows, and the genetic differentiation index (FST) of the SNP loci within each genomic window for any two species was calculated. Based on the FST... ST The values are sorted from largest to smallest among the N genome windows, and the F value is selected. ST The SNP sites with the highest value within the preceding genomic window are used as characteristic tag SNP sites. Select the feature tagSNP sites in the selected signal region to obtain the pre-filtered tag SNPs; where N is a natural number greater than 2. C2-5) Select the pre-filtered tag SNPs of each species in the test animal population that are ranked in the top 1000 in terms of cumulative classification ability relative to other species in the test animal population as feature SNP sites, and merge the feature SNP sites of all species in the test animal population to obtain the feature SNP marker sites of the test animal species. C3) Module for obtaining known and unknown datasets: This module is used to divide the SNP marker sites and corresponding genotypes of the tested animal species in the tested animal population samples into known and unknown datasets. Both the known and unknown datasets contain the species corresponding to the samples and the SNP marker sites and corresponding genotypes of the tested animal species. Three animal species prediction probability models are trained using the known datasets, including an L1 regularized logistic regression model, an L2 regularized logistic regression model, and a k-nearest neighbor classifier model. C4) Simulation Dataset Acquisition Module: Used to select m varieties from the test animal population as ancestral varieties for the simulation hybridization population dataset, wherein the names of the ancestral varieties are M1, M2, ..., Mm, and the simulation includes the following steps: The desired ancestral bloodline ratio for each ancestral variety in the hybrid population is set as M1:M2:...:Mm = n1:n2:...:n m From the pre-filtered tag SNPs, n1 tag SNPs are randomly selected to obtain SNPs from variety M1, and the genotypes corresponding to the SNPs from variety M1 in g samples are obtained; from the pre-filtered tag SNPs, n2 tag SNPs are randomly selected to obtain SNPs from variety M2, and the genotypes corresponding to the SNPs from variety M2 in g samples are obtained. Similarly, n are randomly selected from the pre-filtered tagSNPs. m The number of tag SNP sites is used to obtain the SNP sites from the Mm variety, and the genotypes corresponding to the SNP sites from the Mm variety are obtained for g samples in the Mm variety. The SNP loci and their corresponding genotypes from the M1 variety in the g samples of the M1 variety, the SNP loci and their corresponding genotypes from the M2 variety in the g samples of the M2 variety, ... and the SNP loci and their corresponding genotypes from the Mm variety in the g samples of the Mm variety are randomly spliced together to obtain g hybrid individual samples. The simulation steps are repeated K times to obtain a hybrid population containing g×K hybrid individual samples and the genotype data of the pre-filtered tag SNPs corresponding to each hybrid population, and finally the simulated hybrid population dataset is obtained. The n1+n2+……+n m The sum of their values is 1; Where m is a natural number greater than or equal to 2, and m is less than or equal to the number of species in the tested animal population; where g is a natural number greater than 0; where K is a natural number greater than 0; C5) Perform the following operations on the known dataset, the unknown dataset, and the hybrid population dataset respectively: input the SNP marker sites of the tested animal species characteristics in the dataset into the three animal species prediction probability models obtained in A3) for prediction, select the top six prediction probabilities in the prediction results of each model and merge them as features for training a new model, thus obtaining the features for training a new model using the known dataset, the features for training a new model using the unknown dataset, and the features for training a new model using the hybrid population dataset; The known dataset is used to train a new model using features, the unknown dataset is used to train a new model using features, the hybrid population dataset is used to train a new model using features, and the dataset type is used to train a model using machine learning algorithms to obtain a predictive model R for determining whether a sample belongs to a known variety (in the library); C6) Prediction Module: This module is used to input the genotype data of the SNP marker loci of the test animal species characteristics into the three animal species prediction probability models obtained in C3) for prediction, and obtain the training model usage features of the test animal; input the training model usage features of the test animal into the prediction model R to obtain the species prediction result of the test animal and the prediction probability of the prediction result; predict the test animal whose species prediction result is the test animal species in the known dataset and whose prediction probability is greater than or equal to 50% as a species in the database (known); otherwise, predict the test animal as an unknown (outside the database) species.
7. A method for predicting whether a test animal is a known species within a testing library, an unknown species outside the library, or a mixed-blood individual, characterized in that: The method includes the following steps: D1) Data reception: Re-sequencing data of samples containing different species of test animal populations; D2) Data Processing: The resequencing data was processed as follows to obtain the SNP marker sites characteristic of the tested animal species: D2-1) Use SNP detection software to detect SNP sites in the resequencing data to obtain SNP marker sites; D2-2) Quality control was performed on the SNP marker sites and the samples sequentially to obtain the quality-controlled SNP sites in the quality control samples; D2-3) Perform linkage disequilibrium analysis on the quality-controlled SNP sites to obtain linked SNP sites, and further filter the quality-controlled SNP sites based on the linked SNP sites to obtain tag SNPs; D2-4) Detect the heterozygosity of the genotypes of the tested animal population: Divide the reference genome of the tested animals into N genomic windows, calculate the ratio of nucleotide diversity θπ values between any two species in each of the N genomic windows, sort the N genomic windows in descending order of the ratio of the θπ values, and select the genomic window with the highest ratio of the θπ values as the selection signal region in the genome of the tested animal; where N is a natural number greater than 2. The diversity of the tested animal population was examined: the reference genome of the tested animals was divided into N genomic windows, and the genetic differentiation index (FST) of the SNP loci within each genomic window for any two species was calculated. Based on the FST... ST The values are sorted from largest to smallest among the N genome windows, and the F value is selected. ST The SNP sites with the highest value within the preceding genomic window are used as characteristic tag SNP sites. Select the feature tagSNP sites in the selected signal region to obtain the pre-filtered tag SNPs; where N is a natural number greater than 2. D2-5) Select the pre-filtered tag SNPs of each species in the test animal population that are ranked in the top 1000 in terms of cumulative classification ability relative to other species in the test animal population as feature SNP sites, and merge the feature SNP sites of all species in the test animal population to obtain the feature SNP marker sites of the test animal species. D3) Obtaining the known and unknown datasets: The SNP marker loci and their corresponding genotypes of the tested animal population samples are divided into known and unknown datasets; both the known and unknown datasets contain the breed corresponding to the sample and the SNP marker loci and their corresponding genotypes of the tested animal breed; three animal breed prediction probability models are trained using the known datasets, including an L1 regularized logistic regression model, an L2 regularized logistic regression model, and a k-nearest neighbor classifier model; D4) Obtaining the simulation dataset: Select m breeds from the tested animal population as ancestral breeds to simulate the hybridization population dataset. The names of the ancestral breeds are M1, M2, ..., Mm. The simulation includes the following steps: The desired ancestral bloodline ratio for each ancestral variety in the hybrid population is set as M1:M2:...:Mm = n1:n2:...:n m From the pre-filtered tag SNPs, n1 tag SNPs are randomly selected to obtain SNPs from variety M1, and the genotypes corresponding to the SNPs from variety M1 in g samples are obtained; from the pre-filtered tag SNPs, n2 tag SNPs are randomly selected to obtain SNPs from variety M2, and the genotypes corresponding to the SNPs from variety M2 in g samples are obtained. Similarly, n are randomly selected from the pre-filtered tagSNPs. m The number of tag SNP sites is used to obtain the SNP sites from the Mm variety, and the genotypes corresponding to the SNP sites from the Mm variety are obtained for g samples in the Mm variety. The SNP loci and their corresponding genotypes from the M1 variety in the g samples of the M1 variety, the SNP loci and their corresponding genotypes from the M2 variety in the g samples of the M2 variety, ... and the SNP loci and their corresponding genotypes from the Mm variety in the g samples of the Mm variety are randomly spliced together to obtain g hybrid individual samples. The simulation steps are repeated K times to obtain a hybrid population containing g×K hybrid individual samples and the genotype data of the pre-filtered tag SNPs corresponding to each hybrid population, and finally the simulated hybrid population dataset is obtained. The n1+n2+……+n m The sum of their values is 1; Where m is a natural number greater than or equal to 2, and m is less than or equal to the number of species in the tested animal population; where g is a natural number greater than 0; where K is a natural number greater than 0; D5) Perform the following operations on the known dataset, the unknown dataset, and the hybrid population dataset respectively: input the SNP marker sites of the tested animal species characteristics in the dataset into the three animal species prediction probability models obtained in D3) for prediction, select the top six prediction probabilities in the prediction results of each model and merge them as features for training a new model, thus obtaining the features for training a new model using the known dataset, the features for training a new model using the unknown dataset, and the features for training a new model using the hybrid population dataset; The known dataset is used to train a new model using features, the unknown dataset is used to train a new model using features, the hybrid population dataset is used to train a new model using features, and the dataset type is used to train a model using machine learning algorithms to obtain a predictive model R for determining whether a sample belongs to a known variety (in the library); D6) Prediction Module: This module is used to input the genotype data of the SNP marker loci of the test animal species characteristics into the three animal species prediction probability models obtained in D3) for prediction, and obtain the features used by the new training model for the test animal; input the features used by the new training model for the test animal into the prediction model R to obtain the species prediction result of the test animal and the prediction probability of the prediction result; predict the test animal whose species prediction result is a test animal species in the known dataset and whose prediction probability is greater than or equal to 50% as a species in the database (known); otherwise, predict the test animal as an unknown (outside the database) species. D7) Input the unknown dataset and the hybrid population dataset into the L2 regularized logistic regression model obtained in step D3) for prediction. Use the sample of the test animal population whose prediction result is the known dataset and whose prediction probability is greater than 0.05 as the reference population. Perform population structure analysis on the reference population using population structure estimation software to obtain the population structure analysis result. Based on the population analysis result, use the random forest algorithm to train and construct the unknown species prediction model Q1. Perform population structure analysis on the unknown species in D6) using the population structure estimation software to obtain the unknown species population structure analysis result. Input the population structure analysis result of the unknown species into the unknown species prediction model Q1 to obtain the unknown species prediction result. Output the result that the test animal is an unknown species or a non-purebred (mixed bloodline population or hybrid individual) according to the unknown species prediction result.
8. A method for predicting whether a test animal is a known species within a testing library, an unknown species outside the library, or a mixed-blood individual, characterized in that: The method includes the following steps: E1) Data reception: Receiving resequencing data from samples containing different species of test animal populations; E2) Data Processing: The resequencing data was processed as follows to obtain the SNP marker sites characteristic of the tested animal species: E2-1) Use SNP detection software to detect SNP sites in the resequencing data to obtain SNP marker sites; E2-2) Quality control was performed on the SNP marker sites and the samples sequentially to obtain the quality-controlled SNP sites in the quality control samples; E2-3) Linkage disequilibrium analysis was performed on the quality-controlled SNP sites to obtain linked SNP sites, and the quality-controlled SNP sites were further filtered based on the linked SNP sites to obtain tag SNPs; E2-4) Detect the heterozygosity of the genotypes of the tested animal population: Divide the reference genome of the tested animals into N genomic windows, calculate the ratio of nucleotide diversity θπ values between any two species within each of the N genomic windows, sort the N genomic windows in descending order of the ratio of the θπ values, and select the genomic window with the highest ratio of the θπ values as the selection signal region in the genome of the tested animal; where N is a natural number greater than 2. The diversity of the tested animal population was examined: the reference genome of the tested animals was divided into N genomic windows, and the genetic differentiation index (FST) of the SNP loci within each genomic window for any two species was calculated. Based on the FST... ST The values are sorted from largest to smallest among the N genome windows, and the F value is selected. ST The SNP sites with the highest value within the preceding genomic window are used as characteristic tag SNP sites. Select the feature tagSNP sites in the selected signal region to obtain the pre-filtered tag SNPs; where N is a natural number greater than 2. E2-5) Select the pre-filtered tag SNPs of each species in the test animal population that are ranked in the top 1000 in terms of cumulative classification ability relative to other species in the test animal population as feature SNP sites, and merge the feature SNP sites of all species in the test animal population to obtain the feature SNP marker sites of the test animal species. E3) Obtaining known and unknown datasets: The SNP marker sites and their corresponding genotypes of the tested animal species in the tested animal population samples are divided into known datasets and unknown datasets; both the known datasets and the unknown datasets contain the species corresponding to the samples and the SNP marker sites and their corresponding genotypes of the tested animal species in the samples; three animal species prediction probability models are trained using the known datasets, including an L1 regularized logistic regression model, an L2 regularized logistic regression model, and a k-nearest neighbor classifier model; E4) Obtaining the simulation dataset: Select m breeds from the tested animal population as the ancestral breed simulation hybridization population dataset, and name the ancestral breeds as M1, M2, ..., Mm. The simulation includes the following steps: The desired ancestral bloodline ratio for each ancestral variety in the hybrid population is set as M1:M2:...:Mm = n1:n2:...:n m From the pre-filtered tag SNPs, n1 tag SNPs are randomly selected to obtain SNPs from variety M1, and the genotypes corresponding to the SNPs from variety M1 in g samples are obtained; from the pre-filtered tag SNPs, n2 tag SNPs are randomly selected to obtain SNPs from variety M2, and the genotypes corresponding to the SNPs from variety M2 in g samples are obtained. Similarly, n are randomly selected from the pre-filtered tagSNPs. m The number of tag SNP sites is used to obtain the SNP sites from the Mm variety, and the genotypes corresponding to the SNP sites from the Mm variety are obtained for g samples in the Mm variety. The SNP loci and their corresponding genotypes from the M1 variety in the g samples of the M1 variety, the SNP loci and their corresponding genotypes from the M2 variety in the g samples of the M2 variety, ... and the SNP loci and their corresponding genotypes from the Mm variety in the g samples of the Mm variety are randomly spliced together to obtain g hybrid individual samples. The simulation steps are repeated K times to obtain a hybrid population containing g×K hybrid individual samples and the genotype data of the pre-filtered tag SNPs corresponding to each hybrid population, and finally the simulated hybrid population dataset is obtained. The n1+n2+……+n m The sum of their values is 1; Where m is a natural number greater than or equal to 2, and m is less than or equal to the number of species in the tested animal population; where g is a natural number greater than 0; where K is a natural number greater than 0; E5) Perform the following operations on the known dataset, the unknown dataset, and the hybrid population dataset respectively: input the SNP marker sites of the tested animal species characteristics in the dataset into the three animal species prediction probability models obtained in E3) for prediction, select the top six prediction probabilities in the prediction results of each model and merge them as features for training a new model, thus obtaining the features for training a new model using the known dataset, the features for training a new model using the unknown dataset, and the features for training a new model using the hybrid population dataset; The known dataset is used to train a new model using features, the unknown dataset is used to train a new model using features, the hybrid population dataset is used to train a new model using features, and the dataset type is used to train a model using machine learning algorithms to obtain a predictive model R for determining whether a sample belongs to a known variety (in the library); E6) Prediction Module: This module is used to input the genotype data of the SNP marker loci of the test animal species characteristics into the three animal species prediction probability models obtained in E3) for prediction, thereby obtaining the features used by the new training model for the test animal; input the features used by the new training model for the test animal into the prediction model R to obtain the species prediction result of the test animal and the prediction probability of the prediction result; predict the test animal whose species prediction result is a test animal species in the known dataset and whose prediction probability is greater than or equal to 50% as a species in the database (known); otherwise, predict the test animal as an unknown (outside the database) species. E7) Train a new model using the features of the unknown dataset described in E5) and the features of the hybrid population dataset, as well as their corresponding dataset types, using a machine learning algorithm to train the model and obtain a prediction model Q2 that distinguishes whether a sample belongs to an unknown breed or a mixed-breed individual; input the features of the new model for the unknown breed described in E6) into the prediction model Q2 to obtain the prediction result for the unknown breed; output the result that the test animal is an unknown breed or a non-purebred (mixed-breed population or hybrid individual) based on the prediction result for the unknown breed.
9. The method according to claim 7 or 8, characterized in that: The test animal was a pig.
10. A computer-readable storage medium storing a computer program, characterized in that: The computer program causes the computer to perform the steps of the method according to any one of claims 7-9.