A machine learning-based genome selection method, apparatus, device, medium, and computer program product

By integrating multiple machine learning models and deep learning frameworks, and combining parallel computing and automated parameter optimization, the limitations of existing genome selection tools are overcome, and an efficient and accurate genome selection method and device are realized, which is suitable for large-scale breeding data analysis.

CN120613016BActive Publication Date: 2025-12-02INSTITUTE OF ANIMAL SCIENCES OF CHINESE ACADEMY OF AGRICULTURAL SCIENCES
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510738200.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-12-02
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

Existing genome selection tools suffer from problems such as model uniformity, data scale limitations, insufficient flexibility, lack of parameter optimization functions, limited molecular marker types, and insufficient human-computer interaction, making it difficult to adapt to the efficient processing of different genetic structures and large-scale genome data.

Method used

Employing a machine learning-based approach, combining multiple machine learning models and deep learning frameworks, and implementing data processing and model training through a graphical interface, this system supports multi-omics molecular marker data, parallel computing, and automated parameter optimization, providing an efficient method and device for genome selection.

Benefits of technology

It significantly improves the prediction accuracy and computational efficiency of genomic selection, supports large-scale breeding data analysis, simplifies the operation process, and enhances user-friendliness and model generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120613016B_ABST
    Figure CN120613016B_ABST
Patent Text Reader

Abstract

This invention relates to the field of bioinformatics and comprises a genome selection method, device, equipment, medium, and computer program product. It integrates multiple machine learning models, including 13 algorithms such as Support Vector Machine (SVM), linear regression, Ridge regression, and Lasso regression; combined with automated hyperparameter optimization, parallel computing, and efficient data preprocessing techniques, it significantly improves the accuracy and computational efficiency of breeding predictions. The device consists of two parts: an IASML software module and an IASML cloud platform module. The software supports command-line operation and is suitable for large-scale data computation; the cloud platform provides a graphical interface, supporting online data upload, model selection, real-time monitoring, and result download. This invention solves the problems of existing tools, such as model singularity, limited data scale, and poor interactivity, providing an efficient, flexible, and reproducible intelligent solution for plant and animal breeding and genetic research.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bioinformatics, and more particularly to a genome selection method, apparatus, device, medium, and computer program product. Background Technology

[0002] With advancements in high-throughput SNP genotyping technology, genomic selection, a statistical analysis method, has become increasingly popular in human genetics research due to its powerful predictive capabilities. It is widely used in plant and animal breeding to assess the genetic potential of complex traits. However, existing plant and animal genomic selection tools often rely on single statistical models, such as linear regression or mixed linear models, which have the following limitations:

[0003] 1. Model uniformity: A single model is difficult to adapt to the prediction of complex traits with different genetic structures, which can easily lead to insufficient generalization ability.

[0004] 2. Data scale limitation: Existing tools are often unable to be effectively used when processing massive amounts of genomic data, such as SNP data from tens of thousands of samples, due to low computational efficiency or insufficient memory.

[0005] 3. Lack of flexibility: Existing tools often use the same model to calculate data from different species, populations, and batches, lacking differentiated processing of data from different sources, and do not support user-defined model structures.

[0006] 4. Lack of parameter optimization function: Most existing tools do not integrate automated hyperparameter optimization function, relying on manual experience for adjustment, which affects model performance.

[0007] 5. Limited molecular marker types: Current methods mainly focus on genomic SNP markers, which cannot support omics data such as transcriptomics, metabolomics, and proteomics. A single marker type makes it difficult to achieve higher-precision predictions.

[0008] 6. Lack of user-friendly human-computer interaction: Existing tools are mostly based on command-line operation and lack graphical user interface (GUI) and visualization analysis modules, which poses a high barrier to entry for users with weak bioinformatics background. In addition, data processing, model training, and result interpretation are not integrated into a streamlined process, requiring users to manually connect each calculation step, which greatly increases the complexity of operation.

[0009] Based on the aforementioned technical bottlenecks, there is an urgent need to develop a genome selection method, device, equipment, medium, and computer program product that can support multi-omics molecular marker data, support parallel computing, have adaptive modeling capabilities, and is user-friendly and easy to operate. Summary of the Invention

[0010] To address the shortcomings of the existing technologies, this invention provides a machine learning-based genome selection method, apparatus, device, medium, and computer program product. By integrating multiple machine learning models and deep learning frameworks, and combining automated parameter optimization and parallel computing technologies, it significantly improves prediction accuracy and computational efficiency, meeting the needs of large-scale breeding data analysis.

[0011] This invention is implemented as follows:

[0012] This invention provides a machine learning-based genome selection method applied to a cloud platform. It allows users to perform online calculations on breeding data with limited scale. A graphical interface enables data uploading, model selection, covariate correction, real-time log monitoring, and result downloading. No programming knowledge is required; the operation is completed through web-based interaction. Users with some coding experience can perform large-scale breeding data calculations on personal computers or servers, configuring parameters such as genotype files, phenotype files, and model types via command-line arguments. It supports multiple machine learning algorithms and outputs result and model files.

[0013] Preferably, the machine learning-based genomic selection method is written in Python as IASML software, which uses the phenotype and genotype of experimental animal individuals as input information, uses individuals with both phenotype and genotype as a reference group to construct a model, uses the model to predict the phenotypic values ​​of individuals with unknown phenotypes, and then outputs the prediction results as the breeding values ​​of the individuals.

[0014] The genome selection method based on machine learning in this invention includes the following steps:

[0015] S1: Data preprocessing, processing genotype and phenotype files separately:

[0016] S11 Genotype Data Processing: Convert the input PLINK format file into a standardized NumPy matrix, process missing values ​​in parallel blocks, fill in the mean, and output a `.npy` file for subsequent calculations; or quantify the genotypes, with genotypes AA, AB, and BB encoded as 0, 1, and 2 respectively, and input the quantified results in a TXT format file.

[0017] S12 Phenotypic Data Processing: Extract the target trait column specified by `--phe-pos` from the input `.txt` phenotypic file, correct the covariates using a linear model, and generate cleaned training set data;

[0018] S2: Model configuration and training, selecting the model used for computation and choosing the configuration method for the model parameters, including two methods: obtaining parameters through pre-training based on input data and directly specifying them:

[0019] If the `--model` parameter is specified, the input reference group data is used for pre-training. The scikit-learn model uses a random search to optimize the parameters for `n_iter` iterations, uses triple cross-validation to build the model on the reference group data, and finally selects the best-performing parameter combination as the final model hyperparameters. The deep learning model uses a fixed network structure, continuously updates the parameters through gradient descent during training, and finally saves the best weights to the `.keras` file.

[0020] If the `--model-params` parameter is specified, the training will be performed directly using the hyperparameters specified by the user, skipping the parameter search step;

[0021] S3: Prediction and output results, including,

[0022] S31. Phenotypic Prediction: Use the trained model to predict the phenotype of individuals with unknown traits and output the predicted values. Save the results to `{out}_predict.txt`.

[0023] S32. Model saving: Saves the parameter file (`{out}_model.txt`) of the scikit-learn model and the Keras model file (`.keras`), supporting direct input for subsequent calculations;

[0024] S4: Extended functionality, using `--split-seed` to perform K-fold cross-validation on phenotypic data, generating a `Ref{fold}.txt` training set and a `Val{fold}.txt` validation set for evaluating the model used in prediction.

[0025] The present invention also provides a machine learning-based genome selection device, including an IASML breeding software module and an IASML breeding cloud platform module;

[0026] The IASML breeding software module includes:

[0027] R1 supports reading and preprocessing of genotype data in PLINK binary format (bed / bim / fam) and TXT format, including missing value imputation, genotype encoding conversion, and parallel block processing;

[0028] R2 integrates various machine learning models, including Support Vector Machines (SVM), Linear Regression, Ridge Regression, Lasso Regression, Elastic Net Regression, PLS Regression, Decision Trees, Random Forests, and Gradient Boosting Machines.

[0029] LightGBM, XGBoost, Convolutional Neural Network (CNN) and Multilayer Perceptron (MLP) are supported, and random search hyperparameter optimization is provided.

[0030] R3 supports two training modes: hyperparameter search and training with specified parameters. The neural network model can save all parameters and use them directly for inference.

[0031] R4 supports cross-validation to split phenotypic data and generate training and validation set files;

[0032] The IASML breeding cloud platform module includes:

[0033] Y1 provides a responsive graphical interface that allows users to upload PLINK or TXT format genotype files and TXT format phenotype files by dragging and dropping or selecting, and verifies file size and format in real time;

[0034] Y2 dynamically generates a table-type column selector and an interactive selection component for factor / numerical covariates, supporting multiple columns.

[0035] Collaborative filtering and missing value hints;

[0036] Y3 offers the ability to upload pre-built models, custom hyperparameter files, and pre-trained Keras models, and triggers the computation process via a visual button;

[0037] Y4 displays the analysis log stream in real time, supports one-click download of prediction files and model files, and integrates error handling mechanisms and user notification systems;

[0038] Y5 uses a temporary working directory to isolate computing tasks from different users, automatically retains result files and cleans up intermediate data to ensure system efficiency.

[0039] Preferably, the IASML breeding cloud platform module of the machine learning-based genome selection device includes a homepage, an IASML software download page, and an online usage page, and its user interface and deployment architecture include:

[0040] The web-based interactive interface includes dynamic navigation, KaTeX rendering of mathematical formulas, and real-time log monitoring; it adopts a front-end and back-end separation architecture, with the front-end implementing responsive layout through HTML / CSS and the back-end handling computational tasks based on an asynchronous Python framework.

[0041] Supports one-click cloud deployment and local private deployment.

[0042] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements any of the aforementioned genome selection methods.

[0043] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the genome selection method described in any of the preceding claims.

[0044] The present invention also provides a computer program product, comprising a computer program, characterized in that, when the computer program is executed by a processor, it implements any of the aforementioned genome selection methods.

[0045] The machine learning-based genome selection method, apparatus, device, medium, and computer program products provided by this invention have the following advantages:

[0046] 1. It integrates 13 machine learning algorithms, including SVM, Ridge, Lasso, Elastic net, Decision_tree, Random_forest, LightGBM, XGBoost, Linear, PLS, GBM, CNN, and MLP, for calculation to support the calculation of breeding values ​​for individuals of different species, populations, and batches. These algorithms include four main types: linear models, tree models, support vector machines, and neural networks.

[0047] 2. It possesses efficient data preprocessing capabilities, supporting PLINK format input for genotype data processing. It uses parallel block processing to impute missing values ​​and output a standardized matrix. For phenotypic data processing, it automatically corrects for factor and numerical covariates, filters missing samples, and ultimately generates training and prediction sets.

[0048] 3. It features automated parameter optimization, employing a randomized search (CV) method to optimize hyperparameters for the scikit-learn model through cross-validation (default 3-fold). The optimization objective is the negative mean squared error (NMSE), calculated using the following formula:

[0049]

[0050] In addition, deep learning model optimization introduces integrated early stopping, dynamic learning rate adjustment (Reduce LR On Plateau), and model checkpoints to effectively prevent overfitting and improve the model's generalization ability and stability.

[0051] 4. Parallel computing and resource optimization management are implemented. The Joblib framework supports multi-threaded parallel computing, significantly improving the efficiency of data preprocessing and model training. Simultaneously, the dynamic memory reclamation mechanism (GC module) effectively optimizes resource usage, ensuring efficient memory management.

[0052] 5. Achieve end-to-end traceability by recording key operations and error information through a comprehensive logging system, ensuring transparency and auditability at every stage. Simultaneously, the system automatically generates model parameter files (.txt) and prediction result files (.txt), facilitating result reproduction and subsequent in-depth analysis, thus enhancing workflow reproducibility and data integrity.

[0053] This invention significantly improves the accuracy of breeding by integrating multiple machine learning algorithms, efficiently processing large-scale molecular marker data, and combining parallel computing and parameter optimization techniques, providing an intelligent solution for phenotypic prediction, genetic evaluation, and selection optimization in biological breeding. Attached Figure Description

[0054] Figure 1 This is a schematic diagram of the use of the IASML breeding cloud platform module of the present invention. Figure 1 .

[0055] Figure 2 This is a schematic diagram of the use of the IASML breeding cloud platform module of the present invention. Figure 2 . Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0057] The genome selection method, apparatus, device, medium, and computer program product of the present invention will be further described below with reference to the accompanying drawings.

[0058] The device of this invention comprises two parts: an IASML breeding software module and an IASML breeding cloud platform module. The specific implementation of the IASML breeding software module is as follows:

[0059] 1. Data Preprocessing Workflow

[0060] The main data preprocessing workflow includes:

[0061] 1.1 Molecular marker data preprocessing:

[0062] The input format supports PLINK binary format (.bed / .bim / .fam) or TXT text format (.txt). It uses "joblib.Parallel" to process large-scale labeled data in parallel in blocks (block size of 10,000 labels), while filling missing sites according to the sample mean, and finally generating a normalized NumPy array file (.npy) for subsequent calculations.

[0063] 1.2 Phenotypic Data Preprocessing

[0064] 2. Implementation details of machine learning models

[0065] 2.1 Model Principle:

[0066] 2.1.1 Linear Model

[0067] Linear regression uses the mean squared error (MSE) as the objective function. By minimizing the objective function, it optimizes the regression coefficients (i.e., model parameters) in the model, ultimately fitting the optimal combination of parameters to minimize the model's fit error to the data. The model is as follows:

[0068] y = β0 + β1x1 + β2x2 + ... + β i x i +∈

[0069] Where y is the phenotypic value; β0 is the intercept term, which represents the predicted value of y when all independent variables are 0;

[0070] β1, β2, ..., β i These are regression coefficients, also known as weights or parameters, representing the degree of influence of each independent variable on y; x1, x2, ..., x... i ∈ represents the molecular marker, also known as the input feature; ∈ represents the error term, usually assumed to be a normal distribution with a mean of 0. During training, the linear regression model gradually adjusts the regression coefficients by minimizing the mean squared error (MSE), thereby enabling the model to predict phenotypes more accurately. The MSE is defined as follows:

[0071]

[0072] Where n is the number of samples, y i These are the actual phenotypic values. These are the phenotypic values ​​predicted by the model.

[0073] Lasso regression, Ridge regression, and Elastic Net regression are three machine learning methods based on linear regression models, but they use different objective functions to optimize parameters. They respectively incorporate L1 regularization, L2 regularization, and a combination of L1 and L2 regularization into their objective functions to improve the ability to adjust regression coefficients, effectively addressing overfitting and multicollinearity issues. Their objective functions are as follows:

[0074]

[0075] Among them, y i It is the true phenotypic value of the i-th sample; λ is the phenotypic value predicted by the model; λ is the regression coefficient of the j-th feature; λ is the regularization parameter used to control the regularization weights, λ1 is the weight of the L1 regularization term, and λ2 is the weight of the L2 regularization term; p is the number of features. Introducing regularization into the objective function can compress the regression coefficients, thereby reducing the involvement of features. L1 and L2 regularization achieve different degrees of feature compression, which can improve multicollinearity in the model and prevent overfitting. The specific value of λ will be determined through hyperparameter search.

[0076] Partial Least Squares Regression (PLS) can be viewed as a linear model that aims to model the relationship between the independent variable (molecular marker) and the dependent variable (phenotype) y by extracting a set of orthogonal factors (latent variables). This provides a novel strategy for explaining the relationship between molecular markers and phenotypes. These latent variables maximize their covariance with the response variable y. This method assumes that both X and y can be decomposed into bilinear forms.

[0077]

[0078] Among them, T A It is an n×A score matrix (latent variables), P A It is a p×A load matrix, q A It is a 1×A load vector, E A It is an n×p residual matrix, f A It is an n×1 residual vector. The goal is to find the value that maximizes the score t. j The weight w of the covariance between the latent variable and the response variable y j This goal can be achieved through the following optimization problem:

[0079] max(cov 2 (t j ,y))=max(cov 2 (Xw j ,y))

[0080] The number of latent variables will exist as an adjustable parameter, and the optimal value will be determined through hyperparameter search.

[0081] 2.1.2 Tree Model

[0082] Tree models construct prediction rules by recursively partitioning the feature space, enabling them to capture nonlinear relationships and higher-order interactions. They are commonly used in breeding to handle complex genetic effects and environmental interactions. The core idea is to progressively divide samples into different subsets based on molecular marker (feature) values, ensuring that the phenotypic values ​​within each subset are as homogeneous as possible. The tree models used in this invention include decision trees, random forests, gradient boosting machines with regression trees as weak learners, LightGBM, and XGBoost.

[0083] Decision trees are constructed based on feature splitting criteria (Gini index or information gain), recursively partitioning the data by maximizing the purity of child nodes. For regression tasks, the splitting features and split points are typically selected with the goal of minimizing the mean squared error (MSE). The model can be represented as:

[0084]

[0085] Where x is a feature vector composed of molecular markers. It is a phenotypic value; R m It is a region in the feature space (corresponding to a leaf node of the tree), c m I(·) is the mean of the sample phenotypes within this region, and I(·) is the indicator function. The decision tree selects the splitting feature j and the split point s according to the following rules:

[0086]

[0087] Each split node evaluates only a randomly selected subset of features. The decision tree continues to split according to the above rules until any hyperparameter reaches its upper limit or the features within a node cannot be split again.

[0088] Random Forest improves generalization ability by ensembles multiple decision trees. The samples used by each tree are obtained by bootstrap sampling, and the phenotypic prediction is the mean of all trees.

[0089]

[0090] Among them, T k (x) is the predicted value of the k-th tree, where K is the total number of trees. Random forests identify key molecular markers through feature importance assessment. For example, for the j-th feature, the sum of the MSE reductions when splitting nodes across all trees is calculated, and the importance value is obtained after normalization.

[0091]

[0092] Where ΔMSE j,t Let ΔMSE be the decrease in MSE of the j-th feature at node t. j,t The mean square error (MSE) of the parent node parent Mean Square Error (MSE) of the Left Child Node After Splitting left Mean Square Error (MSE) of the Right Child Node right The difference between the sums, where:

[0093]

[0094] ΔMSE j,t =MSE parent -(MSE left +MSE right )

[0095] Gradient Boosting Machine (GBM) iteratively fits the residuals using an additive model and optimizes the loss function through gradient descent. Its predictions are a weighted sum of the outputs of multiple decision trees.

[0096]

[0097] Among them, f k It is the Kth tree, and η is the learning rate. It is the set of all trees. Its core is the iterative training of multiple decision trees, with each tree correcting the spurious residuals of the preceding model. In the k-th iteration, the formula for calculating the spurious residuals is:

[0098]

[0099] That is, the pseudo residual is the loss function L with respect to the current model prediction value. The negative gradient. A new decision tree f will be constructed. k The goal is to fit these pseudo-residuals r ik That is, minimize:

[0100]

[0101] The process will continue to iterate until the number of decision trees constructed reaches the preset hyperparameter limit.

[0102] XGBoost further optimizes the objective function based on gradient boosting machines, introducing a regularization term to control model complexity:

[0103]

[0104] Where, N k Let w be the number of leaf nodes in the k-th tree.k Let γ be the leaf weight, and λ be the penalty for tree structure and weight size, respectively. During splitting, select the features and split points that maximize the gain.

[0105]

[0106] G and H are the first and second derivatives of the loss function, respectively.

[0107] LightGBM uses a histogram algorithm to accelerate split point finding, discretizing continuous features into histogram bins. For example, when processing genotype data, it directly bins the data according to genotype.

[0108]

[0109] Within each bin, the total gradient G of samples in that category is directly calculated. b b and the sum of the second derivatives H b :

[0110]

[0111] in For the first-order gradient, This is the second-order gradient. The split point only needs to be selected from b bins, not all samples. For candidate split points s (i.e., the boundaries of adjacent bins), the gain formula is calculated as follows:

[0112]

[0113] Where λ is the L2 regularization coefficient and γ is the leaf splitting gain threshold. The amount of training data is reduced through one-sided gradient sampling (GOSS), and the gradient statistics after sampling are:

[0114]

[0115] Where A is the set of large gradient samples, and B is the set of randomly sampled small gradient samples. The objective function of LightGBM is similar to that of XGBoost, but it optimizes computation using the techniques described above:

[0116]

[0117] Among them, T k Let W be the number of leaf nodes in the k-th tree. k The leaf weights are γ and λ, which control the complexity.

[0118] 2.1.3 Support Vector Machine

[0119] Support Vector Machines (SVRs), with their unique fitting strategy, can effectively reduce the impact of outliers on the model. Their core idea is not to fit the data with the optimal straight line, but rather to find an optimal regression hyperplane for phenotypic prediction. The goal of SVR is to maximize the margin between the regression hyperplane and the training data points while minimizing the model's prediction error. SVR is solved through the following optimization problem:

[0120]

[0121] Constraints:

[0122]

[0123] Where w is the weight vector, b is the bias term, ξ is the relaxation vector, and ∈ is the tolerance interval defining the acceptable range of prediction error. C is the regularization parameter, serving as the weight balancing the interval width and the prediction error penalty. φ(x i Kernel functions map input features to a high-dimensional space to handle nonlinearity. Kernel functions include the following types:

[0124] Linear kernel: The mapping function is an identity transformation, directly calculating the inner product of the original feature space:

[0125]

[0126] It is applicable to scenarios where there is a dominant linear relationship between traits (additive genetic effects).

[0127] Polynomial kernel: Extends the nonlinear expressive power by increasing the order of the polynomial.

[0128]

[0129] Where c is a constant term and d is the polynomial order, it is suitable for capturing moderately complex nonlinear relationships such as gene-environment interactions.

[0130] Radial basis kernel: Maps to an infinite-dimensional space using a Gaussian function to fit a highly nonlinear model.

[0131] K(x i x j )=exp(-γ||x i -x j || 2 )

[0132] Where ||x i -x j || 2 γ is the square of the Euclidean distance between samples, and γ is the Gaussian kernel width parameter. The larger the value, the more sensitive the model is to local structures, and it is suitable for complex epistatic effects or non-additive genetic structures.

[0133] 2.1.4 Neural Networks

[0134] The MLP model is designed with two hidden layers and one input layer. The first hidden layer contains 96 neurons and uses the sigmoid activation function, and the second hidden layer contains 64 neurons and uses the GELU activation function. The model is as follows:

[0135] y = f(W) (3) g(W (2) h(X)+b (2) )+b (3) )

[0136] Where X represents the pruned valid label information, y represents the phenotypic information, and W... (2) and b (2) W represents the weights and biases of the first hidden layer. (3) and b (3) This represents the weights and biases of the second hidden layer. h(X), g(X), and f(X) represent the activation functions of each layer starting from the input layer, as shown below:

[0137] h(x) = x

[0138]

[0139]

[0140] The loss function of MLP is as follows:

[0141]

[0142] Where y i Represents the true phenotypic value and This represents the predicted value of the phenotype.

[0143] The CNN model employs a 1D convolutional neural network (Conv1D) model. The input layer receives preprocessed SNP-labeled data, which is presented as a one-dimensional feature vector. The input data then passes through the first 1D convolutional layer. This layer uses 36 convolutional kernels (filters), each with a size of 3, and applies the GELU activation function.

[0144]

[0145] Among them, h t It is the convolution output at the t-th SNP position, ω i Here, b represents the weights of the convolution kernel, b is the bias term, and x represents the weights of the convolution kernel. tLet represent the value of the t-th SNP in the input. After the convolutional layer, a Dropout layer is introduced with a dropout rate of 0.5. During training, the Dropout layer randomly sets the output of neurons to zero with a 50% probability, thereby reducing overfitting. The Dropout operation can be represented as:

[0146]

[0147] Where f is the final output of the convolutional layer, and p is the dropout rate, set to 0.5 here. After the Dropout layer, the output of the convolutional layer is flattened by the Flatten layer so that the data can be input into the fully connected layer. The Flatten operation flattens the multidimensional feature map into a 1D vector:

[0148] f′=Flatten(f)

[0149] Here, f′ is the flattened vector. The flattened vector is fed into a fully connected layer, where it will be used to integrate the features extracted from the convolutional layers and ultimately perform regression prediction.

[0150] y = Wf' + b

[0151] Where y is the phenotypic value vector, W is the weight matrix of the fully connected layer, and b is the bias term matrix of the fully connected layer. This enables the prediction of the phenotypic value.

[0152] 2.2 Hyperparameter Search

[0153] The linear model, tree model, and support vector machine used in this invention all require specific hyperparameters. Each method has a corresponding parameter space. The training set data is used to search for the optimal parameter combination in the parameter space by performing three-fold cross-validation. After a certain number of iterations, the optimal parameter combination is found. The parameters and parameter spaces of each method are shown in Table 1.

[0154] Table 1

[0155]

[0156]

[0157]

[0158]

[0159]

[0160] 2.3 Optimization Strategies for Neural Networks

[0161] The main optimization strategy of the neural network in this invention is as follows:

[0162] 2.3.1 Basic Optimizer Configuration

[0163] 1. Use the Adam optimizer with an initial learning rate of 0.001.

[0164] 2. The loss function used is mean squared error (MSE).

[0165] 3. The batch size is fixed at 32.

[0166] 4. The maximum number of training epochs is set to 50.

[0167] 2.3.2 Dynamic Learning Rate Adjustment Strategy

[0168] 1. Monitoring metric: Training loss.

[0169] 2. Adjustment strategy: When the loss stagnates (no improvement after 5 epochs), the learning rate is reduced to 50% of the current value.

[0170] 3. Lower limit: The minimum learning rate must not be lower than le-7.

[0171] 4. Design purpose: To fine-tune parameters in the later stages of training.

[0172] 2.3.3 Early Stop Training Strategy

[0173] 1. Early stop: Monitor loss and tolerate no improvement for 50 epochs.

[0174] 2. Assisted early stop: Custom callback function: relative improvement threshold (min_delta) = 0.1; tolerance number (patience) = 3 times; automatically save the best model (best_model.keras).

[0175] 2.3.4 Training Process Control

[0176] 1. Dual early stop strategy: combining absolute threshold and relative improved threshold.

[0177] 2. Model checkpoints: Save both the intermediate best model and the final model simultaneously.

[0178] 3. Fixed random seed: Reproducibility is ensured by using set_random_seed(42).

[0179] The IASML breeding cloud platform module adopts a B / S architecture design, consisting of three parts: a front-end interactive interface, a back-end analysis engine, and a distributed computing module. The front-end is built on a responsive web framework and supports multi-terminal access; the back-end adopts a microservice architecture, integrating machine learning algorithm libraries and high-throughput data analysis modules; the computing layer achieves asynchronous parallel processing through task queues, ensuring efficient computation of large-scale molecular marker data.

[0180] The main functional modules are as follows:

[0181] 1. Data Upload Module

[0182] 1.1 Molecular marker processing unit: Supports uploading molecular phenotype files in Plink binary format (bed / bim / fam) and TXT text format, and automatically verifies file integrity (MD5 checksum comparison) and size limit (≤100MB).

[0183] 1.2 Phenotypic Data Parser: Employs streaming reading technology to parse TXT format phenotypic files, dynamically identifies the trait names and individual ID columns in the file header, and constructs a sparse matrix storage structure.

[0184] 1.3 Covariate Selector: Provides a dual selection interface for categorical variables (such as variety, environment) and continuous variables (such as temperature, humidity), and supports regular expression matching.

[0185] 2. Model Configuration Module

[0186] 2.1 Pre-built model library: Integrates 13 machine learning models (including linear models, tree models, support vector machines and neural network models), with built-in parameter optimization strategies (consistent with the strategies of various methods in breeding methods).

[0187] 2.2 Custom Model Interface: Supports uploading Keras model files (.keras) and parsing hyperparameter configuration files (TXT format).

[0188] 3. Task Execution Engine

[0189] 3.1 Create a separate temporary working directory.

[0190] 3.2 The core algorithm module (IASML.py) is called by a subprocess to capture the standard output stream in real time.

[0191] 3.3 Error recovery mechanism: When a process terminates abnormally, the breakpoint state is automatically saved and a SIGTERM signal is sent.

[0192] 4. Result Output Module

[0193] 4.1 Dynamic Log System: A circular buffer is used to store the most recent 100 lines of logs, and real-time push is achieved through WebSocket.

[0194] 4.2 It adopts a split-output architecture, allowing users to download result files and model files separately as needed.

[0195] Example 1

[0196] IASML breeding software was used to perform cross-generational genome prediction of three important slaughter traits—breast muscle weight, leg weight, and carcass weight—in a white-feathered meat duck population using a support vector machine model.

[0197] Step 1: Obtain the required files: The three files "genotype.bim, genotype.bed, and genotype.fam" contain the genotypes of the previous and next generation of white-feathered meat ducks, and the file "phenotype.txt" contains the phenotypes of the previous generation of white-feathered meat ducks in terms of breast muscle weight, leg weight, and carcass weight.

[0198] Step 2: Use the following command in the command line (taking pectoral muscle weight as an example):

[0199] The command `python IASML.py --bfile genotype --phe phenotype.txt --phe-pos 15 --model svm --out result` specifies the genotype and phenotype files to be used for the calculation. `-phe-pos` ensures the pectoral muscle weight trait is located in column 15. `--model` specifies the model type, and `--out` specifies the output filename. The calculation can then begin.

[0200] Step 3: The log information shows that a "genotype.npy" file was generated. After three-fold cross-validation with 20 parameter combinations and 60 training and validation iterations, the optimal parameter combination was found: {'kernel': 'rbf', 'gamma': 'scale', 'epsilon': 0.2, 'C': 1}. Finally, the next generation of white-feathered broiler duck breast muscle weight breeding values ​​calculated using the support vector machine model built with these optimal parameters were obtained and saved in the "result_predict.txt" file. The model parameter information was saved in "result_model.txt".

[0201] Step 4: Calculate the Pearson correlation between the calculated breeding values ​​and the actual values. The final results are shown in the table below:

[0202]

[0203]

[0204] The prediction accuracy for all three traits was higher than that of GBLUP.

[0205] Example 2:

[0206] The Ridge regression model was used on the IASML breeding cloud platform to perform cross-generational genomic predictions of feed intake and feed conversion ratio, two important feed efficiency traits, in white-feathered broiler ducks.

[0207] Step 1: Obtain the required files: The three files "genotype.bim, genotype.bed, and genotype.fam" contain the genotypes of the previous and next generation of white-feathered meat ducks, and the file "phenotype.txt" contains the phenotypes of the previous generation of white-feathered meat ducks in terms of feed intake and feed conversion ratio.

[0208] Step 2: Log in to the cloud platform https: / / iasbreeding.cn / IASML. Upload the prepared genotype and phenotype files, select the phenotype, select the Rdige model, and click the "Start Calculation" button. See the appendix for cloud platform usage status. Figure 1 .

[0209] Step 3: Click the button to download the model parameters and prediction results, and obtain the "result_model.txt" and "result_predict.txt" files.

[0210] Step Four:

[0211] The calculated breeding values ​​were compared with the actual values ​​using Pearson correlation, and the final results are shown in the table below:

[0212]

[0213] The prediction accuracy for both traits was higher than that of GBLUP.

[0214] Example 3: Cross-generational prediction of three important economic traits of white-feathered meat ducks: head weight, neck weight, and wing weight. First, IASML software was used for a large number of iterations to find the optimal parameter combination. Then, the model parameter file was uploaded to the IASML cloud platform for rapid calculation.

[0215] Step 1: Obtain the required files: The three files "genotype.bim, genotype.bed, and genotype.fam" contain the genotypes of the previous and next generation of white-feathered meat ducks, and the file "phenotype.txt" contains the head weight, neck weight, and wing weight phenotypes of the previous generation of white-feathered meat ducks.

[0216] Step 2: Use the following command in the command line (taking a top-heavy model as an example): "python IASML.py --bfilegenotype --phe phenotype.txt --phe-pos 17 --model svm --n-iter 100 --out result". The newly added "--n-iter" option controls the intensity of the parameter search. The intensity can be adjusted according to the computing environment and actual needs; the default parameter search combination is 8. Finally, save the generated "result_model.txt" file. In actual production, this step can be performed before the new generation is released. After the new generation is released, the saved model parameter file can be used directly, significantly reducing computation time. Therefore, if cost allows, the intensity of the parameter search can be increased to find the best parameters possible.

[0217] Step 3: Log in to the cloud platform https: / / iasbreeding.cn / IASML. Upload the prepared genotype and phenotype files, select the phenotype, upload the model parameter file, and click the "Start Calculation" button. See the appendix for cloud platform usage status. Figure 2 .

[0218] Step 4: Click the button to download the model parameters and prediction results, and obtain the "result_predict.txt" file.

[0219] Step 5: Calculate the Pearson correlation between the calculated breeding values ​​and the actual values. The final results are shown in the table below:

[0220]

[0221]

[0222] The prediction accuracy for all three traits was higher than that using GBLUP.

Claims

1. A machine learning-based genomic selection method, characterized in that, It is applied to cloud platforms, allowing users to perform calculations on breeding data with limited scale online. It enables data uploading, model selection, covariate correction, real-time log monitoring, and result downloading through a graphical interface. No programming knowledge is required for operation; it can be completed through web-based interaction. Users with some coding experience can perform calculations on large-scale breeding data on their personal computers or servers. They can configure genotype files, phenotype files, and model type parameters through command-line parameters, support multiple machine learning algorithms, and output result files and model files. The aforementioned machine learning-based genomic selection method is written in Python as IASML software. It uses the phenotype and genotype of experimental animal individuals as input information, uses individuals with both phenotype and genotype as a reference group to construct a model, uses the model to predict the phenotypic values ​​of individuals with unknown phenotypes, and then outputs the prediction results as the breeding values ​​of the individuals. The machine learning-based genome selection method includes the following steps: S1: Data preprocessing, processing genotype and phenotype files separately: S11 Genotype Data Processing: Convert the input PLINK format file into a normalized NumPy matrix, process missing values ​​in parallel blocks, fill in the mean, and output a `.npy` file for subsequent calculations; or quantify the genotypes, with genotypes AA, AB, and BB encoded as 0, 1, and 2 respectively, and input the quantified results as a TXT format file. S12 Phenotypic Data Processing: Extract the target trait column specified by `--phe-pos` from the input `.txt` phenotypic file, correct the covariates using a linear model, and generate cleaned training set data; S2: Model configuration and training, selecting the model used for computation and choosing the configuration method for the model parameters, including two methods: obtaining parameters through pre-training based on input data and directly specifying them: If the `--model` parameter is specified, the input reference group data is used for pre-training. The scikit-learn model uses a random search to optimize the parameters for `n_iter` iterations, uses triple cross-validation to build the model on the reference group data, and finally selects the best-performing parameter combination as the final model hyperparameters. The deep learning model uses a fixed network structure, continuously updates the parameters through gradient descent during training, and finally saves the best weights to the `.keras` file. If the `--model-params` parameter is specified, the training will be performed directly using the hyperparameters specified by the user, skipping the parameter search step; S3: Prediction and output results, including, S31. Phenotypic Prediction: Use the trained model to predict the phenotype of individuals with unknown phenotypes and output the predicted values; save the results to `{out}_predict.txt`. S32. Model Saving: Saves the parameter file `{out}_model.txt` of the scikit-learn model and the Keras model file `.keras`, supporting direct input for subsequent calculations; S4: Extended functionality, using `--split-seed` to perform K-fold cross-validation on phenotypic data, generating a `Ref{fold}.txt` training set and a `Val{fold}.txt` validation set for evaluating the model used in prediction.

2. A machine learning-based genome selection device, comprising: The IASML breeding software module and the IASML breeding cloud platform module are characterized by: The IASML breeding software module includes: R1. Supports reading and preprocessing of PLINK binary and TXT formats of genotype data, including missing value imputation, genotype encoding conversion, and parallel block processing; the PLINK binary formats include bed, bim, and fam; R2 integrates various machine learning models, including Support Vector Machine (SVM), Linear Regression, Ridge Regression, Lasso Regression, Elastic Net Regression, PLS Regression, Decision Tree, Random Forest, Gradient Boosting Machine, LightGBM, XGBoost, Convolutional Neural Network (CNN), and Multilayer Perceptron (MLP), and provides a random search hyperparameter optimization function. R3 supports two training modes: hyperparameter search and training with specified parameters. The neural network model can save all parameters and use them directly for inference. R4 supports cross-validation to split phenotypic data and generate training and validation set files; The IASML breeding cloud platform module includes: Y1. Provides a responsive graphical interface that allows users to upload PLINK or TXT format genotype files and TXT format phenotype files by dragging and dropping or selecting, and verifies file size and format in real time; Y2. Dynamically generates phenotypic column selectors and interactive selection components for factor / numerical covariates, supporting multi-column collaborative filtering and missing value hints; Y3. Provides the ability to upload pre-built models, custom hyperparameter files, and pre-trained Keras models, and triggers the computation process through a visual button; Y4. Real-time display of analysis log stream, support for one-click download of prediction files and model files, and integration of error handling mechanism and user notification system; Y5. Uses a temporary working directory to isolate computing tasks from different users, automatically retains result files and cleans up intermediate data to ensure system efficiency.

3. The machine learning-based genome selection device according to claim 2, characterized in that, The IASML breeding cloud platform module includes a homepage, an IASML software download page, and an online usage page. Its user interface and deployment architecture include: A web-based interactive interface, including dynamic navigation, KaTeX rendering of mathematical formulas, and real-time log monitoring; It adopts a front-end and back-end separation architecture, with the front-end implementing responsive layout through HTML and / or CSS, and the back-end handling computing tasks based on an asynchronous Python framework; Supports one-click cloud deployment and local private deployment.

4. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the genome selection method as described in claim 1.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the genome selection method as described in claim 1.

6. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the genome selection method as described in claim 1.

Citation Information

Patent Citations

  • Genome selective breeding method and system based on federal learning

    CN118538294A