SNP phenotype prediction method based on deep learning
By constructing a SNP phenotype prediction model based on a deep learning method, the problem of insufficient high-dimensional data processing capabilities in existing technologies is solved, and efficient and accurate prediction of individual biological phenotypes is achieved, which is suitable for animal and plant breeding and disease risk assessment.
Patent Information
- Application Number
- CN202510832964.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-26
AI Technical Summary
Existing SNP-based phenotype prediction methods have problems such as insufficient feature extraction, limited model expression ability, and insufficient generalization ability when processing high-dimensional data, making it difficult to achieve efficient and accurate prediction of biological individual phenotypes.
A deep learning-based method is used to obtain SNP genotype data from VCF files, generate two-character coding sequences, build a SNP basic model, and use the BERT architecture for training. Finally, phenotype prediction is performed, including the fusion processing of word embedding layer, position embedding layer, type embedding layer, convolution transformation and attention weight distribution calculation, and finally encoding output.
It achieves more direct and efficient SNP phenotype prediction, improves the accuracy and efficiency of phenotype prediction, and is suitable for animal and plant breeding and disease risk assessment.
Smart Images

Figure CN120708699A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a SNP phenotype prediction method based on deep learning. Background Art
[0002] Biological phenotype prediction can effectively guide animal and plant breeding and disease risk assessment. SNP-based phenotype prediction helps detect genomic regions that have a greater impact on phenotypes during the genetic variation and trait formation of biological individuals, which is of great significance for precision breeding and precision medicine.
[0003] Specifically predicting the phenotype of biological individuals and calculating the phenotypic values of individuals can more accurately improve traits and prevent diseases. Understanding the genetic differences between different individuals of the same species and the phenotypic manifestations of the corresponding individuals provides the conditions for more accurate exploration of the genetic potential of the corresponding biological individuals. Traditional SNP-based phenotypic prediction methods mainly rely on statistical models, such as whole-genome association analysis and genomic selection methods. However, these methods have problems such as insufficient feature extraction, limited model expression ability, and insufficient generalization ability when processing high-dimensional SNP data. Therefore, how to efficiently and accurately realize the SNP phenotypic prediction of biological individuals has become an urgent problem to be solved in the industry. Summary of the Invention
[0004] In order to solve the above problems, the present invention proposes a SNP phenotype prediction method based on deep learning.
[0005] The technical solution of the present invention is: a SNP phenotype prediction method based on deep learning comprises the following steps:
[0006] S1. Obtain SNP genotype data from the VCF file and generate a two-character encoding sequence;
[0007] S2, constructing the SNP basic model;
[0008] S3, training the SNP basic model based on the two-character coding sequence;
[0009] S4. Use the trained SNP-based model to predict phenotypes.
[0010] Furthermore, S1 includes the following sub-steps:
[0011] S11. Obtain SNP genotype data from the VCF file and calculate the minor allele frequency and deletion rate;
[0012] S12. Genotype coding of each SNP site in the SNP genotype data according to the minor allele frequency and missing rate;
[0013] S13, assigning LD labels to each SNP site in the SNP genotype data;
[0014] S14. Generate a two-character coding sequence based on the genotype code and LD tag of each SNP site.
[0015] Furthermore, in S12, the expression for genotype encoding is:
[0016]
[0017] where Encode(·) represents the genotype encoding function, which converts the original genotype data into a standardized single-character representation. G_m,n represents the genotype data of the mth sample at the nth SNP site. major_n represents the major allele (the allele with a higher frequency) of the nth SNP site. minor_n represents the minor allele (the allele with a lower frequency) of the nth SNP site. H represents homozygous major alleles, M represents heterozygous minor alleles, L represents homozygous minor alleles, and X represents missing genotypes.
[0018] Furthermore, in S13, LD labels are assigned to the SNP sites based on the linkage disequilibrium values between adjacent SNP sites.
[0019] Furthermore, S2 includes the following sub-steps:
[0020] S21, mapping the two-character code sequence to an integer ID;
[0021] S22. Build a SNP basic model based on integer ID.
[0022] Furthermore, in S21, a SNP-specific vocabulary is constructed, the two-character code sequence is traversed, a number of valid codes are generated, and after adding tags to the valid codes using the SNP-specific vocabulary, the two-character code sequence is mapped to an integer ID.
[0023] Furthermore, S22 includes the following sub-steps:
[0024] S221, setting a word embedding layer, a position embedding layer, and a type embedding layer connected in sequence;
[0025] S222, fusing the word embedding layer, the position embedding layer, and the type embedding layer;
[0026] S223, performing convolution transformation based on the fusion processing result;
[0027] S224. After the convolution transformation, calculate the attention weight distribution;
[0028] S225. Based on the attention weight distribution, calculate the final encoding output and complete the construction of the SNP model.
[0029] Furthermore, in S222, the calculation formula for fusing the word embedding layer, the position embedding layer, and the type embedding layer is:
[0030] E total =LayerNorm(E word +E position +E tokentype );
[0031] Where, E total represents the total embedded vector after fusion, including SNP coding, position and type information, E word Represents the word embedding vector, corresponding to the semantic representation of the SNP genotype-LD combination encoding, E position Represents the position embedding vector, encoding the position information of the SNP site in the genome sequence, E tokentype Represents the type embedding vector, distinguishing different LD (linkage disequilibrium) types or token types, layerNorm(·) represents the layer normalization function, which is used to stabilize the training process and accelerate convergence, and x represents the input feature;
[0032] In S223, the calculation formula for convolution transformation is:
[0033] ConvBlock i (x)=Conv1d(GELU(BatchNorm1d(k)),k i ,s=2,c_out,i);
[0034] Where, ConvBlock i (x) represents the output feature of the i-th layer convolution kernel, BatchNorm1d(x) represents one-dimensional batch normalization, which standardizes the input features, GELU(·) represents the Gaussian error linear unit activation function, which provides nonlinear transformation capabilities, Conv1d(·) represents a one-dimensional convolution operation, which is used to extract local SNP pattern features, s represents the convolution step size, which controls the downsampling rate of the feature map, and k i represents the size of the convolution kernel of the i-th layer, c_out,i represents the number of output channels;
[0035] In S224, the expression of attention weight distribution AttentionPool(x) is:
[0036] AttentionPool(x)=∑(j=1toheads)α j ⊙
[0037] head j(unfold(x,pool_size));
[0038] α j =softmax(Conv1d_j(BatchNorm1d(x)));
[0039] Where heads represents the number of attention heads in the multi-head attention mechanism, α j Represents the weight distribution vector of the jth attention head, j represents the index number of the attention head, head j represents the feature transformation function of the j-th attention head, unfold(·) represents the tensor expansion operation, which reorganizes the input according to the specified window size, pool_size represents the window size parameter of the attention pooling, BatchNorm1d(·) represents the one-dimensional batch normalization operation, softmax(·) represents the activation function, and Conv1d_j(·) represents the one-dimensional convolution operation of the j-th attention head;
[0040] In S225, the final encoding output is H final The expression is:
[0041] H final =BertEncoder(Linear a lign(ConvBackbone(E total )));
[0042] In the formula, BertEncoder(·) represents the BERT encoder module, which performs the self-attention mechanism and feedforward network transformation, ConvBackbone(·) represents the convolutional backbone network, which is used to extract the local feature patterns of the SNP sequence, and Linear a lign(·) means aligning the convolution output dimension to the Transformer input dimension.
[0043] Furthermore, S3 includes the following sub-steps:
[0044] S31, performing random masking processing on the double-character code sequence;
[0045] S32. Based on the two-character code sequence after random masking, the SNP basic model is trained using the AdamW optimizer.
[0046] Furthermore, in S32, the update expression of the AdamW optimizer is:
[0047]
[0048] Where θ t+1 represents the model parameters at step t+1, θt represents the model parameters of the tth step, α represents the learning rate, represents the bias-corrected first-order momentum estimate at step t, represents the bias-corrected second-order momentum estimate at step t, m t represents the first-order momentum estimate (exponential moving average of gradient) at step t, v t represents the second-order momentum estimate (exponential moving average of the squared gradient) at step t, m t-1 represents the first-order momentum estimate at step t-1, v t-1 represents the second-order momentum estimate at step t-1, represents the t-th power of the first-order momentum decay factor, represents the t-th power of the second-order momentum decay factor, ε represents the numerical stability term, λ represents the weight decay coefficient, β1 represents the first momentum parameter, β2 represents the second momentum parameter, Represents the gradient
[0049] The beneficial effects of the present invention are as follows: the present application utilizes the pre-training idea of deep learning to directly predict SNP phenotypes, starting from the genome sequence characteristics, further extending the BERT architecture to the field of genomics, and providing a more direct and efficient computational method for phenotype prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Flowchart of the SNP phenotype prediction method based on deep learning;
[0051] Figure 2 Schematic diagram of the structure of SNP phenotype prediction based on deep learning. DETAILED DESCRIPTION
[0052] The embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0053] like Figure 1 As shown, the present invention provides a SNP phenotype prediction method based on deep learning, comprising the following steps:
[0054] S1. Obtain SNP genotype data from the VCF file and generate a two-character encoding sequence;
[0055] S2, constructing the SNP basic model;
[0056] S3, training the SNP basic model based on the two-character coding sequence;
[0057] S4. Use the trained SNP-based model to predict phenotypes.
[0058] In this embodiment of the present invention, S1 includes the following sub-steps:
[0059] S11. Obtain SNP genotype data from the VCF file and calculate the minor allele frequency and deletion rate;
[0060] S12. Genotype coding of each SNP site in the SNP genotype data according to the minor allele frequency and missing rate;
[0061] S13, assigning LD labels to each SNP site in the SNP genotype data;
[0062] S14. Generate a two-character coding sequence based on the genotype code and LD tag of each SNP site.
[0063] Allele frequency = number of a certain allele / total number of alleles, minor allele frequency (MAF) = min(ref frequency, alt frequency), missing rate = number of missing genotypes / total number of samples.
[0064] Calculate the LD threshold, maintain coding consistency, and assign Y (high LD, R 2 ≥0.8), J (low LD, R 2 <0.8), N (different chromosomes or calculation failure) labels.
[0065] In the embodiment of the present invention, in S12, the expression for genotype coding is:
[0066]
[0067] where Encode(·) represents the genotype encoding function, which converts the original genotype data into a standardized single-character representation. G_m,n represents the genotype data of the mth sample at the nth SNP site. major_n represents the major allele (the allele with a higher frequency) of the nth SNP site. minor_n represents the minor allele (the allele with a lower frequency) of the nth SNP site. H represents homozygous major alleles, M represents heterozygous minor alleles, L represents homozygous minor alleles, and X represents missing genotypes.
[0068] In this embodiment of the present invention, in S13, LD labels are assigned to SNP sites based on linkage disequilibrium values between adjacent SNP sites.
[0069] In this embodiment of the present invention, S2 includes the following sub-steps:
[0070] S21, mapping the two-character code sequence to an integer ID;
[0071] S22. Build a SNP basic model based on integer ID.
[0072] In the embodiment of the present invention, in S21, a SNP-specific vocabulary is constructed, a two-character code sequence is traversed, a number of valid codes are generated, and after adding tags to the valid codes using the SNP-specific vocabulary, the two-character code sequence is mapped to an integer ID.
[0073] In this embodiment of the present invention, S22 includes the following sub-steps:
[0074] S221, setting a word embedding layer, a position embedding layer, and a type embedding layer connected in sequence;
[0075] S222, fusing the word embedding layer, the position embedding layer, and the type embedding layer;
[0076] S223, performing convolution transformation based on the fusion processing result;
[0077] S224. After the convolution transformation, calculate the attention weight distribution;
[0078] S225. Based on the attention weight distribution, calculate the final encoding output and complete the construction of the SNP model.
[0079] The three embeddings are fused and calculated, and then normalized by LayerNorm and regularized by Dropout.
[0080] Construct an optional EBMGP convolutional backbone network with a 5-layer ConvBlock structure. Each ConvBlock performs a convolution transformation, including BatchNorm1d normalization, GELU activation function, and Conv1d convolution layer. The convolution kernel size sequence is [30, 3, 30, 3, 30], the step size is uniformly set to 2, and the number of output channels is [32, 64, 128, 256, 512], followed by AttentionPool multi-head attention pooling.
[0081] Implement the AttentionPool adaptive pooling mechanism, calculate the attention weight distribution, expand the input features by pool_size, independently calculate the weight distribution for each attention head, generate attention scores through a learnable convolutional layer, and perform weighted aggregation on local features after softmax normalization, effectively compressing the sequence length while retaining key genetic information.
[0082] like Figure 2As shown in the figure, a hybrid architecture BertEncoder is designed, which includes num_hidden_layers = 2 layers of TransformerEncoderLayer, each layer is configured with num_attention_heads = 4 attention heads, and the intermediate layer dimension intermediate_size = 256. When the convolution backbone is enabled, the final encoding output is calculated, and the convolution feature dimension is aligned to hidden_size = 64 through the linear transformation layer, realizing the deep fusion of convolutional feature extraction and self-attention mechanism.
[0083] In this embodiment of the present invention, in S222, the calculation formula for fusing the word embedding layer, the position embedding layer, and the type embedding layer is:
[0084] E total =LayerNorm(E word +E position +E tokentype );
[0085] Where, E total represents the total embedded vector after fusion, including SNP coding, position and type information, E word Represents the word embedding vector, corresponding to the semantic representation of the SNP genotype-LD combination encoding, E positon Represents the position embedding vector, encoding the position information of the SNP site in the genome sequence, E tokentype Represents the type embedding vector, distinguishing different LD (linkage disequilibrium) types or token types. LayerNorm(·) represents the layer normalization function, which is used to stabilize the training process and accelerate convergence. x represents the input feature.
[0086] In S223, the calculation formula for convolution transformation is:
[0087] ConvBlock i (x)=Conv1d(GELU(BatchNorm1d(x)),k i ,s=2,c_out,i);
[0088] Where, ConvBlock i (x) represents the output feature of the i-th layer convolution kernel, BatchNorm1d(x) represents one-dimensional batch normalization, which standardizes the input features, GELU(·) represents the Gaussian error linear unit activation function, which provides nonlinear transformation capabilities, Conv1d(·) represents a one-dimensional convolution operation, which is used to extract local SNP pattern features, s represents the convolution step size, which controls the downsampling rate of the feature map, and k i represents the size of the convolution kernel of the i-th layer, c_out,i represents the number of output channels;
[0089] In S224, the expression of attention weight distribution AttentionPool(x) is:
[0090] AttentionPool(x)=∑(j=1toheads)α j ⊙
[0091] head j (unfold(x,pool_size));
[0092] α j =softmax(Conv1d_j(BatchNorm1d(x)));
[0093] Where heads represents the number of attention heads in the multi-head attention mechanism, α j Represents the weight distribution vector of the jth attention head, j represents the index number of the attention head, head j represents the feature transformation function of the j-th attention head, unfold(·) represents the tensor expansion operation, which reorganizes the input according to the specified window size, pool_size represents the window size parameter of the attention pooling, BatchNorm1d(·) represents the one-dimensional batch normalization operation, softmax(·) represents the activation function, and Conv1d_j(·) represents the one-dimensional convolution operation of the j-th attention head;
[0094] In S225, the final encoding output is H final The expression is:
[0095] H final =BertEncoder(Linear a lign(ConvBackbone(E total )));
[0096] In the formula, BertEncoder(·) represents the BERT encoder module, which performs the self-attention mechanism and feedforward network transformation, ConvBackbone(·) represents the convolutional backbone network, which is used to extract the local feature patterns of the SNP sequence, and Linear a lign(·) means aligning the convolution output dimension to the Transformer input dimension.
[0097] In this embodiment of the present invention, S3 includes the following sub-steps:
[0098] S31, performing random masking processing on the double-character code sequence;
[0099] S32. Based on the two-character code sequence after random masking, the SNP basic model is trained using the AdamW optimizer.
[0100] In S31, a random masking strategy is used to mask 15% of the tokens in the input sequence, of which 80% are replaced with [MASK] tags, 10% are replaced with random tokens, and 10% remain the original tokens unchanged.
[0101] Construct an MLM dataset, which includes the masked input sequence and the original label sequence, which is the training data.
[0102] In the embodiment of the present invention, in S32, the update expression of the AdamW optimizer is:
[0103]
[0104] Where θ t+1 represents the model parameters at step t+1, θ t represents the model parameters of the tth step, α represents the learning rate, represents the bias-corrected first-order momentum estimate at step t, represents the bias-corrected second-order momentum estimate at step t, m t represents the first-order momentum estimate (exponential moving average of gradient) at step t, v t represents the second-order momentum estimate (exponential moving average of the squared gradient) at step t, m t-1 represents the first-order momentum estimate at step t-1, v t-1 represents the second-order momentum estimate at step t-1, represents the t-th power of the first-order momentum decay factor, represents the t-th power of the second-order momentum decay factor, ε represents the numerical stability term, λ represents the weight decay coefficient, β1 represents the first momentum parameter, β2 represents the second momentum parameter, Represents the gradient.
[0105] In the embodiment of the present invention, the masked language model task is used to perform unsupervised pre-training to verify the effectiveness of the established method, and the masked language model loss function L M The expression of LM is:
[0106] L M LM=-1 / |M|*∑(i∈M)logP(x i |x \M );
[0107] P(x i |x \M )=softmax(W v ocab*h i +bv ocab);
[0108] Where M represents the set of masked positions, P(x i |x \M ) represents the probability function, x i is the real token representing position i, x \M represents the context excluding the mask position, h i represents the hidden state of the i-th position, W v ocab represents the vocabulary mapping weight matrix, b v ocab represents the bias term, and |M| represents the total number of mask positions.
[0109] Training objective function L t The expression of otal is:
[0110] L t otal=L M LM+λ r eg*||λ|| 2 ;
[0111]
[0112] Where λ r eg is the regularization coefficient, ||θ|| 2 represents the L2 regularization term, Represents the gradient of the loss function with respect to the parameters.
[0113] The present invention will be described below with reference to specific embodiments.
[0114] Using the cyvcf2 library and the corresponding parameters set in the VCF file, we generated porcine chromosome 18 SNP data, including genotype information for 1274 samples, as shown in Table 1. After quality control, SNPs that met the criteria of MAF ≥ 0.05 and missingness ratio ≤ 0.1 were retained. Based on the genotype data, a genotype encoding rule was set, with H, M, L, and X used to represent homozygous major allele, heterozygous minor allele, homozygous minor allele, and missing genotypes, respectively.
[0115] The linkage disequilibrium calculation method was used to calculate the R of adjacent SNP sites. 2 According to R 2 Threshold, assign Y(R 2 ≥0.8)、J(R 2 <0.8) and N (different chromosomes), and generate two-character coding sequences of genotype-LD combinations, such as HY, MJ, and LN.
[0116] According to the above-mentioned constructed method, the SNP data of pig chromosome 18 were encoded to generate a coding sequence file containing all samples.
[0117] Table 1
[0118] Data Project Numerical Total number of samples 1274 Number of training samples 849 Number of validation samples 425 Number of SNP sites 50,000 Coding sequence length 100,000 characters
[0119] For the encoded sequence, the BERT architecture is used to build the vocabulary, embedding layer, Transformer encoder and MLM prediction head respectively.
[0120] We downloaded porcine chromosome 18 SNP data and 10 simulated phenotypic data sets and used the pretrained SNP-based model to fine-tune the phenotypic model. According to the established method, the long SNP sequence was first processed into blocks. To facilitate model training based on the regression loss function, the error between the predicted phenotypic value and the true phenotypic value for each sample was calculated, as shown in Table 2.
[0121] Table 2
[0122] Sample ID Fold1 predicted value Fold1 true value Fold2 predicted values Fold2 true value Fold3 prediction value Fold3 true value Sample_1 0.8524 0.8630 0.7336 0.7428 0.9228 0.9315 Sample_2 0.8326 0.8204 0.6646 0.6792 0.8066 0.8156 ... ... ... ... ... ... ...
[0123] The 3-fold cross validation results were summarized and the average Pearson correlation coefficient, root mean square error and mean absolute error were calculated. Calculate the comprehensive evaluation index, where ρ k represents the Pearson correlation coefficient of the k-th fold, and K = 3 represents the number of folds in the cross-validation. The detailed results of the 3-fold cross-validation are shown in Table 3.
[0124] Table 3
[0125] index Fold1 Fold2 Fold3 Mean ± SD Pearson correlation coefficient 0.9524 0.8336 0.9228 0.9029±0.0505 RMSE 0.3131 0.4646 0.8066 0.5281±0.2064 MAE 0.0862 0.1240 0.2016 0.1373±0.0476
[0126] The embodiment of the present invention establishes a SNP phenotype prediction model through a deep learning method, performs predictive analysis on real SNP data with known phenotypes, obtains relatively reliable phenotype prediction results, verifies the correctness and accuracy of the method, and uses real pig chromosome 18 SNP data and simulated phenotypic data in this application to achieve high-precision phenotypic prediction.
[0127] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the present invention.
Claims
1. A SNP phenotype prediction method based on deep learning, characterized in that: The following steps are involved: S1. Obtain SNP genotype data from the VCF file and generate a two-character encoding sequence; S2, constructing the SNP basic model; S3, training the SNP basic model based on the two-character coding sequence; S4. Use the trained SNP-based model to predict phenotypes.
2. The SNP phenotype prediction method based on deep learning according to claim 1, characterized in that The S1 comprises the following sub-steps: S11. Obtain SNP genotype data from the VCF file and calculate the minor allele frequency and deletion rate; S12. Genotype coding of each SNP site in the SNP genotype data according to the minor allele frequency and missing rate; S13, assigning LD labels to each SNP site in the SNP genotype data; S14. Generate a two-character coding sequence based on the genotype code and LD tag of each SNP site.
3. The SNP phenotype prediction method based on deep learning according to claim 2, characterized in that In S12, the expression for genotype coding is: where Encode(·) represents the genotype encoding function, G_m,n represents the genotype data of the mth sample at the nth SNP site, major_n represents the major allele of the nth SNP site, minor_n represents the minor allele of the nth SNP site, H represents homozygous major allele, M represents heterozygous, L represents homozygous minor allele, and X represents missing genotype.
4. The SNP phenotype prediction method based on deep learning according to claim 2, characterized in that In S13, LD labels are assigned to SNP sites based on linkage disequilibrium values between adjacent SNP sites.
5. The SNP phenotype prediction method based on deep learning according to claim 1, characterized in that The S2 includes the following sub-steps: S21, mapping the two-character code sequence to an integer ID; S22. Build a SNP basic model based on integer ID.
6. The SNP phenotype prediction method based on deep learning according to claim 5, characterized in that In said S21, a SNP-specific vocabulary is constructed, a two-character code sequence is traversed, a number of valid codes are generated, and after adding marks to the valid codes using the SNP-specific vocabulary, the two-character code sequence is mapped to an integer ID.
7. The SNP phenotype prediction method based on deep learning according to claim 5, characterized in that The S22 includes the following sub-steps: S221, setting a word embedding layer, a position embedding layer, and a type embedding layer connected in sequence; S222, fusing the word embedding layer, the position embedding layer, and the type embedding layer; S223, performing convolution transformation based on the fusion processing result; S224. After the convolution transformation, calculate the attention weight distribution; S225. Based on the attention weight distribution, calculate the final encoding output and complete the construction of the SNP model.
8. The SNP phenotype prediction method based on deep learning according to claim 7, characterized in that: In S222, the calculation formula for fusing the word embedding layer, the position embedding layer, and the type embedding layer is: AND total =LayerNorm(E word +E position +E tokentype ); Where, E total represents the total embedded vector after fusion, E word Represents the word embedding vector, E position represents the position embedding vector, E tokentype Represents the type embedding vector, LayerNorm(·) represents the layer normalization function; In S223, the calculation formula for performing the convolution transformation is: ConvBlock i (x)=Conv1d(GELU(BatchNorm1d(x)),k i ,s=2,c_out,i); Where, ConvBlock i (x) represents the output feature of the convolution kernel of the i-th layer, BatchNorm1d(x) represents one-dimensional batch normalization, GELU(·) represents the Gaussian error linear unit activation function, Conv1d(·) represents the one-dimensional convolution operation, s represents the convolution step size, k i represents the size of the convolution kernel in layer i, c_out,i represents the number of output channels, and x represents the input features; In S224, the expression of attention weight distribution AttentionPool(x) is: AttentionPool(x)=∑(j=1toheads)α j ⊙ head j (unfold(x,pool_size)); a j =softmax(Conv1d_j(BatchNorm1d(x))); Where heads represents the number of attention heads in the multi-head attention mechanism, α j Represents the weight distribution vector of the jth attention head, j represents the index number of the attention head, head j represents the feature transformation function of the j-th attention head, unfold(·) represents the tensor expansion operation, pool_size represents the window size parameter of the attention pooling, BatchNorm1d(·) represents the one-dimensional batch normalization operation, softmax(·) represents the activation function, and Conv1d_j(·) represents the one-dimensional convolution operation of the j-th attention head; In the above S225, the final encoding output is H final The expression is: H final =BertEncoder(Linear a eq(ConvBackbone(E total ))); In the formula, BertEncoder(·) represents the BERT encoder module, ConvBackbone(·) represents the convolutional backbone network, and Linear a lign(·) means aligning the convolution output dimension to the Transformer input dimension.
9. The SNP phenotype prediction method based on deep learning according to claim 1, characterized in that The S3 includes the following sub-steps: S31, performing random masking processing on the double-character code sequence; S32. Based on the two-character code sequence after random masking, the SNP basic model is trained using the AdamW optimizer.
10. The SNP phenotype prediction method based on deep learning according to claim 9, characterized in that: In S32, the update expression of the AdamW optimizer is: Where θ t+1 represents the model parameters at step t+1, θ t represents the model parameters of the tth step, α represents the learning rate, represents the bias-corrected first-order momentum estimate at step t, represents the bias-corrected second-order momentum estimate at step t, m t represents the first-order momentum estimate at step t, v t represents the second-order momentum estimate at step t, m t-1 represents the first-order momentum estimate at step t-1, v t-1 represents the second-order momentum estimate at step t-1, represents the t-th power of the first-order momentum decay factor, represents the t-th power of the second-order momentum decay factor, ε represents the numerical stability term, λ represents the weight decay coefficient, β1 represents the first momentum parameter, β2 represents the second momentum parameter, Represents the gradient.