A method for encoding SNP genotypes

By preprocessing and completing the genome selection data, generating multi-channel input sample vectors, and combining the SNP type information of the genome annotation file, the problem that CNN cannot use multi-channel input in genome selection is solved, and the accuracy of genotype selection is improved.

CN115223655BActive Publication Date: 2025-10-10湖南工商大学
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210853338.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2025-10-10
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

In the existing technology, CNN cannot perform multi-channel input in genome selection, and the genome annotation file information is not utilized, resulting in insufficient accuracy of genotype selection.

Method used

By preprocessing and completing the genome selection data to form a multi-channel input, and combining it with the SNP type information of the genome annotation file, a sample vector is generated for use by the convolutional neural network.

Benefits of technology

The accuracy of genotype selection is improved, and the effect of deep learning is enhanced by adding SNP type information. It is in line with biological reality and can identify SNP clusters and gene interactions of specific genes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115223655B_ABST
    Figure CN115223655B_ABST
Patent Text Reader

Abstract

The application discloses a SNP genotype coding method, comprising the following steps: obtaining genomic selection data and a genomic annotation file, wherein the data comprises SNP input data; the SNP input data comprises chromosome number and SNP position; sorting columns of a data table according to the chromosome number and the SNP position; preprocessing the data table to obtain SNP coding; extracting the genomic annotation file to obtain SNP type information; forming SNP columns in the data table at the SNP positions, traversing adjacent SNP columns, storing the SNP columns into channels, and completing the channels; and coding the filled SNP based on the SNP type information and the SNP coding to obtain a sample vector. The sample vector can be used as an input of a convolutional neural network, so that information contained in the genomic annotation file can be applied to deep learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of genotype coding, and in particular to a SNP genotype coding method. Background Art

[0002] To address the conflict between a growing world population and food shortages, particularly in developing countries, the Third Agricultural Revolution increased crop yields through the adoption of modern plant breeding techniques. Plant breeding is a scientific approach to improving desirable plant phenotypes, such as yield and quality. Breeders accumulate favorable alleles by selecting genotypes that exhibit improved phenotypes. In addition to relying on selection from naturally occurring genotypes, breeders can also create greater diversity by mating genotypes that differ phenotypically for a given trait.

[0003] Plant breeding has been revolutionized by the use of genetic markers based on DNA sequences that identify genotypes. Single nucleotide polymorphisms (SNPs) have become widely used genetic markers due to their low cost and high density. Marker-assisted selection (MAS) relies on genetic markers associated with target genes to accurately select genotypes of interest, thereby reducing errors caused by visual selection. The main problem with MAS breeding is that quantitative trait locus (QTL) mapping can only detect loci with major effects, whereas the traits associated with genetics are often complex and controlled by several loci with minor effects.

[0004] Compared to traditional genomic selection models (such as rrBLUP and GBLUP), CNNs can capture higher-order gene interactions and therefore hold greater potential. However, recent studies using CNNs for genomic selection have not shown significant advantages over traditional models. Existing approaches, such as CNNs, can accept multi-channel inputs (such as color RGB images), but genomic selection cannot. Furthermore, in existing approaches, the information contained in genomic annotation files is not utilized in deep learning. Summary of the Invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the defects in the prior art, thereby providing a SNP genotype encoding method.

[0006] The present invention provides a SNP genotype encoding method, comprising the steps of:

[0007] S1: Obtain genome selection data and genome annotation files, including SNP input data; SNP input data includes chromosome number and SNP position;

[0008] S2: Sort the columns of the data table according to the chromosome number and the SNP position;

[0009] S3: preprocess the data table to obtain SNP codes;

[0010] S4: Extract the genome annotation file to obtain SNP type information;

[0011] S5: forming SNP columns at the SNP positions in the data table, traversing adjacent SNP columns, storing the SNP columns in the channel, and completing the channel;

[0012] S6: Based on the SNP type information and SNP code, a sample vector is obtained.

[0013] Preferably, in S2, the columns of the data table are recorded as: C i _L ij , where C i represents the i-th chromosome; L ij Indicates the position of the jth SNP on the i-th chromosome; sort the columns of the data table in ascending order of chromosome number and according to the SNP position; among them, within the same chromosome number, the SNP positions are arranged in ascending order.

[0014] Preferably, in S3, a threshold is set, and in the data table, rows or columns with null values ​​greater than the threshold are deleted, and rows or columns with null values ​​less than or equal to the threshold are filled; at the same time, columns with allele frequencies less than 1% are deleted;

[0015] The SNP input data also includes the number of unmutated bases. The SNPs in the SNP column are encoded according to the number of unmutated bases to obtain SNP codes.

[0016] Preferably, the process of obtaining the SNP code is:

[0017] When the bases of both alleles are identical to those of the reference gene, the SNP code is 2;

[0018] When the base of one allele is the same as that of the reference gene and the base of the other allele is different from that of the reference gene, the SNP is coded as 1;

[0019] When the bases of the two alleles are different from those of the reference gene, the SNP code is 0;

[0020] The base of the reference gene is the base with the highest frequency of the allele.

[0021] Preferably, the threshold is 10% of the values ​​in the data table.

[0022] Preferably, in S5, adjacent SNP columns are traversed until the adjacent SNP columns are located in different chromosome numbers, one of the SNP columns and all the SNP columns before it are extracted into a new channel, and the length of the new channel is recorded;

[0023] The first extracted SNP column is subjected to data dimensionality increase until all SNP columns are stored in the corresponding channel; the channels are sorted according to the length, and the channels with a length less than the maximum length are completed to the length equal to the maximum length by adding blank columns, and the value of the blank column is -1.

[0024] Preferably, the sample vector can be used as the input of the convolutional neural network.

[0025] Preferably, in S6, the SNP columns are traversed again, the SNP encoding is converted into an encoding vector, and the SNP type information is converted into a type information vector; the type information vector is spliced to the encoding vector to obtain a sample vector.

[0026] The encoding vector is represented as:

[0027]

[0028] Wherein, 0, 1 and 2 represent different SNP encodings; blank represents a blank column, and the encoding vector corresponding to the blank column is [0 0 0];

[0029] The type information vector is represented as:

[0030]

[0031] Wherein, gene, start_codon, stop_codon, transcipt, five_prime_utr, three_prime_utr, CDS and exon are respectively the region types in the genome annotation file; none is a region type in the genome annotation file which does not belong to any of the above.

[0032] The technical scheme has the following advantages: the obtained sample vector can be used as the input of the convolutional neural network, so that the information contained in the genome annotation file can be used in deep learning; the SNP type information can be added to increase the details and improve the accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0033] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 The present invention is a flowchart of a SNP genotype encoding method. DETAILED DESCRIPTION

[0035] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0036] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0037] like Figure 1 As shown, this embodiment provides a SNP genotype encoding method, which includes:

[0038] S1: Obtain genome selection data and genome annotation files, including SNP input data; SNP input data includes chromosome number and SNP position;

[0039] S2: Sort the columns of the data table according to the chromosome number and the SNP position;

[0040] Specifically, the columns of the data table are: C i _L ij , where C i represents the i-th chromosome; L ij Indicates the position of the jth SNP on the i-th chromosome; "_" represents a separator, which is used to separate the above two; the columns of the data table are sorted in ascending order of chromosome number and according to the SNP position (the columns of the data table are sorted with chromosome number as the primary keyword and SNP position as the secondary keyword); among them, within the same chromosome number, the SNP positions are arranged in ascending order.

[0041] S3: preprocess the data table to obtain SNP codes;

[0042] Specifically, a threshold is set. In the data table, rows or columns with null values ​​greater than the threshold are deleted, and rows or columns with null values ​​less than or equal to the threshold are filled. At the same time, columns with allele frequencies less than 1% are deleted. Rows or columns that meet the above conditions are deleted because they have too little valid information.

[0043] The SNP input data also includes the number of unmutated bases. The SNPs in the SNP column are encoded according to the number of unmutated bases to obtain SNP codes.

[0044] The process of obtaining the SNP code is as follows:

[0045] When the bases of both alleles are identical to those of the reference gene, the SNP code is 2;

[0046] When the base of one allele is the same as that of the reference gene and the base of the other allele is different from that of the reference gene, the SNP is coded as 1;

[0047] When the bases of the two alleles are different from those of the reference gene, the SNP code is 0;

[0048] The base of the reference gene is the base with the highest frequency of the allele.

[0049] In this embodiment, the threshold is 10% of the values ​​in the data table.

[0050] S4: Extract the genome annotation file to obtain SNP type information;

[0051] In this embodiment, the genome annotation file in GTF format (taking the human genome as an example; if other species need to be analyzed, the corresponding genome needs to be downloaded) is extracted;

[0052] Table 1 is the genome annotation file table in GTF format;

[0053]

[0054]

[0055] In Table 1, the first few lines beginning with "#" contain annotation information from the genome annotation file. Each subsequent line represents annotation information for a specific chromosome segment. This annotation information requires four columns: the chromosome ID in the first column, the region feature type in the third column, the interval start position in the fourth column, and the interval end position in the fifth column. The genome annotation file is traversed, and the information in the first, third, fourth, and fifth columns of the row is stored as SNP type information. If the third column is "gene," the information in the first, fourth, and fifth columns is also stored.

[0056] S5: forming SNP columns at the SNP positions in the data table, traversing adjacent SNP columns, storing the SNP columns in the channel, and completing the channel;

[0057] Specifically, traverse adjacent SNP columns until they are located on different chromosome numbers, extract one of the SNP columns and all the previous SNP columns into a new channel, and record the length of the new channel;

[0058] The first extracted SNP column is upgraded until all SNP columns are stored in the corresponding channels. The channels are sorted according to their lengths, and the channels with lengths less than the maximum length are supplemented with the channel with the maximum length as the benchmark until the length is equal to the maximum length. The supplementation method is to add a blank column, and the value of the blank column is all -1.

[0059] After completion, a data sample is converted into multiple channels, similar to the input data of an image.

[0060] S6: Based on the SNP type information and SNP code, a sample vector is obtained.

[0061] Specifically, the SNP column is traversed again, the SNP code is converted into a code vector, and the SNP type information is converted into a type information vector; the type information vector is concatenated with the code vector to obtain a sample vector;

[0062] The encoding vector is represented as:

[0063]

[0064] Among them, blank represents the blank column, and the encoding vector corresponding to the blank column is [0 0 0];

[0065] The type information vector is represented as:

[0066]

[0067] Among them, gene, start_codon, stop_codon, transcipt, five_prime_utr, three_prime_utr, CDS, and exon are the region types in the genome annotation file respectively; none is the region type in the genome annotation file that does not belong to any of the above.

[0068] In this embodiment, a SNP can belong to two regions at the same time because regions can overlap. For example, when a SNP is in both the gene region and the transcript region, the corresponding type information vector is (1, 0, 0, 1, 0, 0, 0, 0); and the encoding vector and the type information vector can be combined arbitrarily, but when the encoding vector is blank, it can only be combined with none.

[0069] After completing the above steps, the sample vector can be used as the input of a convolutional neural network. The convolutional neural network can then identify SNP clusters located in specific genes based on the gap sequence, or use the attention mechanism to divide the gene segments into blocks and predict the shape according to the SNP-gene-gene interaction route. This design is more in line with biological reality and enables deep learning to be applied to the field of genomic selection.

[0070] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.

Claims

1. A SNP genotype encoding method, characterized in that: include: S1: Obtain genome selected data and genome annotation files, wherein the data includes SNP input data; the SNP input data includes chromosome number and SNP position; S2: sorting the columns of the data table according to the chromosome number and the SNP position; S3: preprocess the data table to obtain SNP codes; S4: extracting the genome annotation file to obtain SNP type information; S5: forming an SNP column at the SNP position in the data table, traversing the adjacent SNP columns, storing the SNP columns in a channel, and completing the channel; Traversing the adjacent SNP columns until the adjacent SNP columns are located at different chromosome numbers, extracting one of the SNP columns and all the previous SNP columns into a new channel, and recording the length of the new channel; Perform data dimension upgrade on the first extracted SNP columns until all the SNP columns are stored in the corresponding channels; sort the channels according to their lengths, and use the channel with the maximum length as the benchmark to complete the channels with lengths less than the maximum length until the length equals the maximum length; the completion method is to add a blank column, and the value of the blank column is all -1; S6: Obtain a sample vector based on the SNP type information and the SNP code; The SNP column is traversed again, the SNP code is converted into a code vector, and the SNP type information is converted into a type information vector; the type information vector is concatenated with the code vector to obtain the sample vector.

2. A SNP genotype encoding method according to claim 1, characterized in that: In S2, the columns of the data table are recorded as follows: ,in, represents the i-th chromosome; Indicates the position of the jth SNP on the i-th chromosome; sorts the columns of the data table in ascending order of the chromosome numbers and according to the SNP positions; wherein, within the same chromosome number, the SNP positions are arranged in ascending order.

3. A SNP genotype encoding method according to claim 2, characterized in that: In S3, a threshold is set. In the data table, rows or columns with null values ​​greater than the threshold are deleted, and rows or columns with null values ​​less than or equal to the threshold are filled. At the same time, columns with allele frequencies less than 1% are deleted. The SNP input data also includes the number of unmutated bases. The SNPs in the SNP column are encoded according to the number of unmutated bases to obtain SNP codes.

4. A SNP genotype encoding method according to claim 3, characterized in that: The process of obtaining the SNP code is: When the bases of both alleles are identical to those of the reference gene, the SNP is coded as 2; When the base of one of the alleles is the same as the base of the reference gene, and the base of the other allele is different from the base of the reference gene, the SNP is coded as 1; When the bases of the two alleles are different from the bases of the reference gene, the SNP is coded as 0; The base of the reference gene is the base with the highest frequency of the allele.

5. A SNP genotype encoding method according to claim 3, characterized in that: The threshold is 10% of the value in the data table.

6. A SNP genotype encoding method according to claim 1, characterized in that: The sample vector can be used as input of a convolutional neural network.

7. A SNP genotype encoding method according to claim 1, characterized in that: In S6, The encoding vector is expressed as: Among them, blank represents the blank column, and the encoding vector corresponding to the blank column is [0 0 0]; The type information vector is represented as: Among them, gene, start_codon, stop_codon, transcipt, five_prime_utr, three_prime_utr, CDS, and exon are the region types in the genome annotation file respectively; none is the region type in the genome annotation file that does not belong to any of the above.

Citation Information

Patent Citations

  • Annotation method and annotation system of whole-genome variant data

    CN106156538A

  • Method for gene association analysis on basis of deep learning algorithm

    CN107025386A