A deep learning-based DNA sequence alignment method

CN120299519BActive Publication Date: 2026-10-20HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510358349.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2026-10-20
Estimated Expiration
2045-03-25

AI Technical Summary

Technical Problem

[0004]本发明的目的是为了解决现有主流序列比对工具如minimap2在面对超长DNA测序片段时,存在内存占用大幅增加、比对速度显著下降等问题以及在处理高密度结构变异、复杂重复序列及较长插入缺失等问题时,存在比对精度不足、难以全面准确反映真实基因组变异特征的问题,而提出一种基于深度学习的DNA序列比对方法

Benefits of technology

[0016]本发明提出一种基于深度学习的DNA序列比对方法,该方法针对一百万长度的超长DNA测序片段,通过深度学习模型预测其所属染色体类别,从而在比对过程中将对应染色体的DNA序列替代基因组序列作为候选比对区域。此举显著减少了比对候选区域范围,既提升了比对速度,又有效降低了内存占用,解决了传统比对工具(如minimap2)在处理DNA测序片段时存在的内存占用过大、比对速度慢等问题。通过该方法,比对工具能够使用超长DNA测序片段进行比对,可以更好地应对高密度结构变异、复杂重复序列及较长插入缺失等难题,全面且准确地反映真实基因组的变异特征,极大地提升了比对精度和效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120299519B_ABST
    Figure CN120299519B_ABST
Patent Text Reader

Abstract

The application relates to a DNA sequence alignment method based on deep learning, and relates to a DNA sequence alignment method based on deep learning.The application aims to solve the problems that the mainstream sequence alignment tools such as minimap2 have a large increase in memory occupation, a significant decrease in alignment speed and the like when facing super-long DNA sequencing fragments, and the problems that the alignment accuracy is insufficient and it is difficult to comprehensively and accurately reflect the real genomic variation characteristics when problems such as high-density structural variation, complex repetitive sequences and longer insertion and deletion are processed.The process is as follows: I. converting a DNA sequencing sequence into a word vector;II. inputting the word vector into a pre-training model, and outputting a feature vector from the pre-training model;performing dimension reduction processing on the feature vector;III. inputting the feature after the dimension reduction into a trained deep learning classification model, and predicting the chromosome category to which the feature after the dimension reduction corresponds;IV. aligning the sequence recording the category with the corresponding chromosome DNA sequence in a reference sequence.The application is used in the field of DNA sequence alignment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a DNA sequence alignment method based on deep learning. Background Technology

[0002] DNA sequence alignment plays a crucial role in genome research, with applications encompassing sequence difference identification, improved gene annotation accuracy, and the elucidation of genetic mechanisms. By comparing the genome sequences of different individuals or species, researchers can effectively reveal similarities and differences between sequences, precisely locate mutations and genetic polymorphisms, and thus gain a deeper understanding of the genetic basis of diseases and phenotypes. Furthermore, sequence alignment can identify conserved and variable regions in the genome, simplify the identification of gene functions and regulatory elements, and advance research on gene expression and epigenetic regulation mechanisms. In fields such as gene editing, mutation analysis, and functional genomics, high-quality sequence alignment significantly improves the accuracy of gene manipulation and functional studies. Simultaneously, through sequence alignment analysis of specific genetic markers such as mitochondrial DNA and sex chromosomes, it is possible to effectively reconstruct the genetic transmission patterns of human populations and reveal the historical trajectory of human evolution and migration. Therefore, DNA sequence alignment is of paramount importance to precision medicine, genetics, genomics, and evolutionary biology research.

[0003] Currently, mainstream sequence alignment tools such as Minimap2 can achieve rapid and accurate alignment of fragments ranging from hundreds to tens of thousands of bp, and are widely used in genome research. Minimap2 employs seed indexing and chain algorithms, demonstrating outstanding alignment efficiency. However, with the continuous development of sequencing technology, the length of sequencing fragments is gradually increasing, some even approaching one million base pairs. The emergence of these ultra-long fragments poses a serious challenge to Minimap2, specifically manifested in a significant increase in memory usage and a significant decrease in alignment speed. Furthermore, Minimap2 suffers from insufficient accuracy when dealing with high-density structural variations, complex repetitive sequences, and long insertions and deletions, making it difficult to comprehensively and accurately reflect the true characteristics of genomic variations. Therefore, there is an urgent need to develop or optimize next-generation sequence alignment tools to meet the demand for high-precision and high-efficiency alignment analysis of ultra-long DNA sequencing fragments. Summary of the Invention

[0004] The purpose of this invention is to address the problems of existing mainstream sequence alignment tools such as minimap2, which suffer from significantly increased memory consumption and significantly reduced alignment speed when dealing with ultra-long DNA sequencing fragments, as well as insufficient alignment accuracy and difficulty in comprehensively and accurately reflecting the true genomic variation characteristics when handling high-density structural variations, complex repetitive sequences, and long insertions and deletions. Therefore, this invention proposes a DNA sequence alignment method based on deep learning.

[0005] The specific process of a deep learning-based DNA sequence alignment method is as follows:

[0006] Step 1: Convert the one million-length DNA sequencing sequence from string format into word vectors based on BPE encoding;

[0007] Step 2: Input the word vectors into the pre-trained model DNABert2, and the pre-trained model DNABert2 will output feature vectors;

[0008] Average pooling is used to reduce the dimensionality of the feature vector to obtain the dimensionality-reduced features;

[0009] Step 3: Construct a deep learning classification model;

[0010] The deep learning classification model is trained based on the training set to obtain a well-trained deep learning classification model.

[0011] The dimensionality-reduced features from step two are input into the trained deep learning classification model, which then predicts the chromosome category to which the sequence corresponding to the dimensionality-reduced features from step two belongs.

[0012] Record the category results, with the DNA sequence corresponding to each category stored in a single FASTA format file;

[0013] Step 4: Align the sequence of the record category in each file with the corresponding chromosomal DNA sequence in the reference sequence, and save the alignment results;

[0014] The reference sequence is the human genome sequence.

[0015] The beneficial effects of this invention are as follows:

[0016] This invention proposes a deep learning-based DNA sequence alignment method. For ultra-long DNA sequencing fragments of up to one million bytes, this method uses a deep learning model to predict the chromosome category to which the fragment belongs, thus replacing the genomic sequence with the corresponding chromosomal DNA sequence as the candidate alignment region during the alignment process. This significantly reduces the range of candidate alignment regions, improving alignment speed and effectively reducing memory usage, solving the problems of excessive memory consumption and slow alignment speed of traditional alignment tools (such as Minimap2) when processing DNA sequencing fragments. Using this method, alignment tools can perform alignments on ultra-long DNA sequencing fragments, better handling challenges such as high-density structural variations, complex repetitive sequences, and long insertions and deletions, comprehensively and accurately reflecting the variation characteristics of the real genome, and greatly improving alignment accuracy and efficiency. Attached Figure Description

[0017] Figure 1 This is a flowchart of the present invention;

[0018] Figure 2 This is a structural diagram of the deep learning classification model of the present invention, where L = 5. Detailed Implementation

[0019] Specific Implementation Method 1: The specific process of this implementation method for DNA sequence alignment based on deep learning is as follows:

[0020] First, the DNA sequencing fragments are encoded using the BPE method and input into the pre-trained model DNABert2 to obtain sequence feature representations. Then, the features are reduced in dimensionality using average pooling to obtain the overall sequence representation. Finally, a deep learning classifier is used to predict the chromosome category of the sequencing fragments.

[0021] Based on the predicted chromosome category, the corresponding chromosome sequence is selected as the reference sequence for the DNA sequencing fragment, and the minimap2 tool is used to complete the high-precision sequence alignment analysis.

[0022] Step 1: Convert the one million-length DNA sequencing sequence from string format into word vectors based on BPE encoding;

[0023] Step 2: Input the word vectors into the pre-trained model DNABert2, and the pre-trained model DNABert2 will output feature vectors;

[0024] Average pooling is used to reduce the dimensionality of the feature vectors, resulting in high-quality dimensionality-reduced features.

[0025] Step 3: Construct a deep learning classification model ( Figure 2 );

[0026] The deep learning classification model is trained based on the training set to obtain a well-trained deep learning classification model.

[0027] The dimensionality-reduced features from step two are input into the trained deep learning classification model, which then predicts the chromosome category to which the sequence corresponding to the dimensionality-reduced features from step two belongs.

[0028] Record the category results, with the DNA sequence corresponding to each category stored in a single FASTA format file;

[0029] Step 4: Align the sequence of the record category in each file with the corresponding chromosomal DNA sequence in the reference sequence, and save the alignment results;

[0030] The reference sequence is the human genome sequence.

[0031] Specific Implementation Method Two: This implementation method differs from Specific Implementation Method One in that, in step one, the one million-length DNA sequencing sequence is converted from string format into word vectors based on BPE encoding; the specific process is as follows:

[0032] Step 1: Set the human genome sequence D = {S1, S2, ..., S...} i ,…,S n} is a corpus (a collection of all DNA sequences), where i = 1, 2, ..., n;

[0033] For example, S1 is the DNA sequence of chromosome 1;

[0034] Steps 1 and 2: Take the i-th sequence S from the sequence set D. i Each base (one base is one character) in the token is considered an independent token;

[0035] Step 13: Calculate the i-th sequence S in the corpus. i The frequency of occurrence of each token pair (x, y);

[0036] Each token pair (x, y) consists of adjacent tokens, and there is no overlap between token pairs (x, y);

[0037] Step 14: Repeat Step 13 until the frequency of each Token pair (x,y) in all n sequences in the sequence set D is obtained;

[0038] Step 1, Fifth: Add the frequencies of the same token pair (x, y) in the n sequences to obtain the total frequency of the same token pair (x, y) in the n sequences; expressed as:

[0039]

[0040] Where count((x,y),S i ) represents the i-th sequence S i The frequency of occurrence of the same token pair (x, y);

[0041] Step 16: Merge the token pair (x, y) corresponding to the maximum total frequency in each sequence to obtain a new token, denoted as z = (x, y), and update the vocabulary;

[0042] Step 17: Repeat steps 13 to 16 M times to obtain all the final tokens. Number all the final tokens (1, 2, 3, 4, etc.) and the numbers must be unique.

[0043] The final vocabulary consists of all tokens and the corresponding number for each token.

[0044] For example, the vocabulary list starts with {"A":0,"T":1,"C":2,"G":3}

[0045] After an update, it becomes {"A":0,"T":1,"C":2,"G":3,"AT":4}

[0046] M is 4088;

[0047] The resulting vocabulary includes both single-base tokens and merged tokens that can better represent common subsequences, thus enabling a more compact and efficient vector representation when segmenting and encoding new sequences.

[0048] Step 18: In order to speed up the prediction speed of the model, and since the DNA sequence itself contains rich sequence feature information, for a DNA sequencing fragment of one million lengths, a DNA sequence of length S′ of 10,000 is selected from the beginning of the DNA sequencing fragment backwards, a DNA sequence of length S″ of 10,000 is selected from the middle of the DNA sequencing fragment backwards, and a DNA sequence of length S′" of 10,000 is selected from the end of the DNA sequencing fragment forwards.

[0049] Based on the final vocabulary, a DNA sequence S′ of length 10,000 characters selected from the beginning of the DNA sequencing fragment is encoded by BPE to obtain a token sequence:

[0050] {x′1,x′2,…,x′ j ,…,x′ m}=BPE(S′)

[0051] Based on the final vocabulary, a DNA sequence S″ of length 10,000 characters selected from the middle end of the DNA sequencing fragment is encoded by BPE to obtain a token sequence:

[0052] {x″1,x″2,…,x″ j ,…,x″ m}=BPE(S″)

[0053] Based on the final vocabulary, a DNA sequence S″′ of length 10,000 selected from the end of the DNA sequencing fragment is encoded by BPE to obtain a token sequence:

[0054] {x″′1,x″′2,…,x″′ j ,…,x m}=BPE(S″′)

[0055] in,

[0056] m represents the number of encoded tokens;

[0057] {x′1,x′2,…,x′ j ,…,x′ m} represents a token sequence obtained by encoding a DNA sequence of length 10,000 bytes selected from the beginning of the DNA sequencing fragment using BPE; x′1 represents the first token obtained by encoding the first token in the 10,000-byte DNA sequence using BPE; x′2 represents the second token obtained by encoding the second token in the 10,000-byte DNA sequence using BPE; x′ j This represents the j-th token obtained after BPE encoding of the j-th token in a DNA sequence of length 10,000; x′ m This represents the m-th token obtained after BPE encoding of the m-th token in a DNA sequence of length 10,000.

[0058] {x″1,x″2,…,x″ j ,…,x″ m} represents a token sequence obtained by encoding a DNA sequence of length 10,000 bytes selected from the middle end of the DNA sequencing fragment using BPE; x″1 represents the first token obtained by encoding the first token in the 10,000-byte DNA sequence using BPE; x″2 represents the second token obtained by encoding the second token in the 10,000-byte DNA sequence using BPE; x″ j This represents the j-th token obtained after BPE encoding of the j-th token in a DNA sequence of length 10,000; x″ m This represents the m-th token obtained after BPE encoding of the m-th token in a DNA sequence of length 10,000.

[0059] {x″′1,x″′2,…,x″′ j ,…,x″′ m} represents a token sequence obtained by encoding a DNA sequence of length 10,000 units forward from the end of the DNA sequencing fragment using BPE; x″′1 represents the first token obtained by encoding the first token in the 10,000-unit DNA sequence using BPE; x″′2 represents the second token obtained by encoding the second token in the 10,000-unit DNA sequence using BPE; x″′ j This represents the j-th token obtained after BPE encoding of the j-th token in a DNA sequence of length 10,000; x″′ m This represents the m-th token obtained after BPE encoding of the m-th token in a DNA sequence of length 10,000.

[0060] Step 19: Map the BPE-encoded token sequence to the corresponding word vector embedding space to obtain the word vectors of the token sequence, represented as:

[0061] {e′1,e′2,…,e′ j ,…,e′ m}=Embed{x′1,x′2,…,x′ j ,…,x′ m}

[0062] {e″1,e″2,…,e″ j ,…,e″ m}=Embed{x″1,x″2,…,x″ j ,…,x″ m}

[0063] {e″′1,e″′2,…,e″′ j ,…,e″′ m}=Embed{x″′1,x″′2,…,x″′ j ,…,x″′ m}

[0064] in,

[0065] {e′1,e′2,…,e′ j ,…,e′ m} represents the combination of {x′1,x′2,…,x′ j ,…,x′ m} Map x′1 to the corresponding word embedding space to obtain the word vector corresponding to each Token; e′1 represents the word vector corresponding to the first Token obtained by mapping x′1 to the corresponding word embedding space; e′2 represents the word vector corresponding to the second Token obtained by mapping x′2 to the corresponding word embedding space; e′ j This means x′ j Mapping to the corresponding word embedding space, we obtain the word vector corresponding to the j-th token; e′ m This means x′ m Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the m-th Token;

[0066] {e″1,e″2,…,e″ j ,…,e″ m} represents the combination of {x″1,x″2,…,x″ j ,…,x′ m} Map x″1 to the corresponding word embedding space to obtain the word vector corresponding to each Token; e″1 represents the word vector corresponding to the first Token obtained by mapping x″1 to the corresponding word embedding space; e″2 represents the word vector corresponding to the second Token obtained by mapping x″2 to the corresponding word embedding space; e″j Indicates x″ j Mapping to the corresponding word embedding space, we obtain the word vector corresponding to the j-th token; e″ m Indicates x″ m Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the m-th Token;

[0067] {e″′1,e″′2,…,e″′ j ,…,e″′ m} represents the combination of {x″′1,x″′2,…,x″′ j ,…,x″′ m} Mapping x″′1 to the corresponding word embedding space yields the word vector for each Token; e″′1 represents the word vector for the first Token obtained by mapping x″′1 to the corresponding word embedding space; e″′2 represents the word vector for the second Token obtained by mapping x″′2 to the corresponding word embedding space; e″′ j This means x″′ j Mapping to the corresponding word embedding space, we obtain the word vector corresponding to the j-th token; e″′ m This means x″′ m Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the m-th Token;

[0068] Embed indicates word embedding;

[0069] The embedding vector e output by Embed(·) i It typically includes information such as the context and position of the sequence.

[0070] The other steps and parameters are the same as in Specific Implementation Method 1.

[0071] Specific Implementation Method Three: This implementation method differs from Specific Implementation Method One or Two in that, based on the final vocabulary, the DNA sequence S′ of length 10,000 selected from the beginning of the DNA sequencing fragment is encoded by BPE to obtain a token sequence:

[0072] {x′1,x′2,…,x′ j ,…,x′ m}=BPE(S′)

[0073] The specific process is as follows:

[0074] 1) One base in a DNA sequence S′ of length 10,000 selected from the beginning of the DNA sequencing fragment is considered as one character;

[0075] 2) Let i = 1, j = 1; i can be understood as the starting position of the search, and j is the length of the token to be searched;

[0076] 3) Starting from the i-th character in sequence S′, search for the adjacent j+1 characters, including the i-th character, in the final vocabulary;

[0077] If the adjacent j+1 characters can be found in the final vocabulary, check if i+j-1 = 10000 (termination signal, because the sequence length is only 10,000). If it is satisfied, execute 5); otherwise, execute 4).

[0078] If the adjacent j+1 characters cannot be found in the final vocabulary, execute step 5);

[0079] This step is done to find tokens that are as long as possible, because the purpose of encoding is not only to convert strings into numbers, but also to make the length of the encoded sequence much shorter than the original sequence, thereby improving the efficiency of subsequent calculations.

[0080] 4). Set j = j + 1, and continue executing step 3);

[0081] 5) Starting from the i-th character, treat the adjacent j characters, including the i-th character, as a token and encode them according to the final vocabulary (the corresponding number is the token number). Check if i + j - 1 = 10000 (the termination signal, because the sequence length is only 10,000). If it is satisfied, the process ends, resulting in a token sequence {x′1, x′2, ..., x′}. m};

[0082] If the condition is not met, then let i = i + j, j = 1, and execute step 3).

[0083] Other steps and parameters are the same as in specific implementation method one or two.

[0084] Specific Implementation Method Four: This implementation method differs from Specific Implementation Methods One to Three in that, based on the final vocabulary, the DNA sequence S″ with a length of 10,000 characters selected from the middle end of the DNA sequencing fragment is encoded using BPE to obtain a token sequence:

[0085] {x″1,x″2,…,x″ j ,…,x″ m}=BPE(S″)

[0086] The specific process is as follows:

[0087] 1) One base in a DNA sequence S″ of length 10,000 selected from the middle end of the DNA sequencing fragment is considered as one character;

[0088] 2) Let i = 1, j = 1; i can be understood as the starting position of the search, and j is the length of the token to be searched;

[0089] 3) Starting from the i-th character in sequence S″, search for the adjacent j+1 characters, including the i-th character, in the final vocabulary;

[0090] If the adjacent j+1 characters can be found in the final vocabulary, check if i+j-1 = 10000 (termination signal, because the sequence length is only 10,000). If it is satisfied, execute 5); otherwise, execute 4).

[0091] If the adjacent j+1 characters cannot be found in the final vocabulary, execute step 5);

[0092] This step is done to find tokens that are as long as possible, because the purpose of encoding is not only to convert strings into numbers, but also to make the length of the encoded sequence much shorter than the original sequence, thereby improving the efficiency of subsequent calculations.

[0093] 4). Set j = j + 1, and continue executing step 3);

[0094] 5) Starting from the i-th character, treat the adjacent j characters, including the i-th character, as a token and encode them according to the final vocabulary (the corresponding number is the token number). Check if i + j - 1 = 10000 (the termination signal, because the sequence length is only 10,000). If it is satisfied, the process ends, resulting in a token sequence {x″1,x″2,…,x″}. m};

[0095] If the condition is not met, then let i = i + j, j = 1, and execute step 3).

[0096] The other steps and parameters are the same as those in one of the specific implementation methods one to three.

[0097] Specific Implementation Method Five: This implementation method differs from Specific Implementation Methods One to Four in that, based on the final vocabulary, the DNA sequence S″′ of length 10,000 selected from the end of the DNA sequencing fragment forward is encoded by BPE to obtain a token sequence:

[0098] {x″′1,x″′2,…,x″′ j ,…,x″′ m}=BPE(S″′)

[0099] The specific process is as follows:

[0100] 1) One base in a DNA sequence S″′ of length 10,000 selected from the end of the DNA sequencing fragment is considered as one character;

[0101] 2) Let i = 1, j = 1; i can be understood as the starting position of the search, and j is the length of the token to be searched;

[0102] 3) Starting from the i-th character in sequence S″′, search for the adjacent j+1 characters, including the i-th character, in the final vocabulary;

[0103] If the adjacent j+1 characters can be found in the final vocabulary, check if i+j-1 = 10000 (termination signal, because the sequence length is only 10,000). If it is satisfied, execute 5); otherwise, execute 4).

[0104] If the adjacent j+1 characters cannot be found in the final vocabulary, execute step 5);

[0105] This step is done to find tokens that are as long as possible, because the purpose of encoding is not only to convert strings into numbers, but also to make the length of the encoded sequence much shorter than the original sequence, thereby improving the efficiency of subsequent calculations.

[0106] 4). Set j = j + 1, and continue executing step 3);

[0107] 5) Starting from the i-th character, treat the j adjacent characters, including the i-th character, as a token and encode them according to the final vocabulary (the corresponding number is the token number). Check if i + j - 1 = 10000 (the termination signal, because the sequence length is only 10,000). If it is satisfied, the process ends, resulting in a token sequence {x″′1,x″′2,…,x″′}. m};

[0108] If the condition is not met, then let i = i + j, j = 1, and execute step 3).

[0109] The other steps and parameters are the same as those in one of the specific implementation methods one to four.

[0110] Specific Implementation Method Six: This implementation method differs from one of Specific Implementation Methods One to Five in that, in step two, word vectors are input into the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs feature vectors.

[0111] Average pooling is used to reduce the dimensionality of the feature vectors, resulting in high-quality dimensionality-reduced features.

[0112] The specific process is as follows:

[0113] Step 2: Input the word vectors into the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs feature vectors; the specific process is as follows:

[0114] 1) Calculate the word vector {e′1,e′2,…,e′} corresponding to each token. j ,…,e′ m Input the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs the feature vector {h′1,h′2,…,h′} for each token. j ,…,h′ m}; represents:

[0115] {h′1,h′2,…,h′ j ,…,h′ m}=DNABert2({e′1,e′2,…,e′ j ,…,e′ m})

[0116] 2) Calculate the word vector {e″1,e″2,…,e″} corresponding to each token. j ,…,e″ m Input the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs the feature vector {h″1,h″2,…,h″} for each token. j ,…,h″ m}; represents:

[0117] {h″1,h″2,…,h″ j ,…,h″ m}=DNABert2({e″1,e″2,…,e″ j ,…,e″ m})

[0118] 3) Calculate the word vector {e″′1,e″′2,…,e″′} corresponding to each token. j ,…,e″′ m Input the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs the feature vector {h″′1,h″′2,…,h″′} for each token. j ,…,h″′ m}; represents:

[0119] {h″′1,h″′2,…,h″′ j ,…,h″′ m}=DNABert2({e″′1,e″′2,…,e″′ j ,…,e″′ m})

[0120] in,

[0121] h′1 represents the feature vector output by the pre-trained model DNABert2 when the word vector e′1 is input; h′2 represents the feature vector output by the pre-trained model DNABert2 when the word vector e′2 is input; h′ j This indicates that the word vector e′ j Input to the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; h′ m This indicates that the word vector e′ m Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2;

[0122] h″1 represents the feature vector output by the pre-trained model DNABert2 when the word vector e″1 is input into the pre-trained model DNABert2; h″2 represents the feature vector output by the pre-trained model DNABert2 when the word vector e″2 is input into the pre-trained model DNABert2; h″ j This indicates that the word vector e″ j Input to the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; h″ m This indicates that the word vector e″ m Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2;

[0123] h″′1 represents the feature vector output by the pre-trained model DNABert2 when the word vector e″′1 is input; h″′2 represents the feature vector output by the pre-trained model DNABert2 when the word vector e″′2 is input; h″′ j This indicates that the word vector e″′ j Input to the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; h″′ m This indicates that the word vector e″′ m Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2;

[0124] Step 22: Use average pooling to reduce the dimensionality of the feature vectors to obtain high-quality dimensionality-reduced features; the specific process is as follows:

[0125] For the subsequent chromosome classification prediction task, the output word vectors need to be reduced in dimensionality. The average pooling method is used, which involves taking the average of all feature vectors to obtain the overall feature vector of the selected region sequence.

[0126] 1) Use average pooling to process the feature vector {h′1,h′2,…,h′} j ,…,h′ m} Perform dimensionality reduction processing to obtain high-quality dimensionality-reduced features O′; represented as:

[0127]

[0128] 2) Apply average pooling to the feature vector {h″1,h″2,…,h″ j ,…,h″ m Dimensionality reduction is performed to obtain high-quality dimensionality-reduced features O″; represented as:

[0129]

[0130] 3) Apply average pooling to the feature vector {h″′1,h″′2,…,h″′ j ,…,h″′ m} Perform dimensionality reduction processing to obtain high-quality dimensionality-reduced features O″′; represented as:

[0131]

[0132] The other steps and parameters are the same as those in one of the specific implementation methods one to five.

[0133] Specific Implementation Method Seven: This implementation method differs from Specific Implementation Methods One through Six in that, in step three, a deep learning classification model is constructed ( Figure 2 );

[0134] The deep learning classification model is trained based on the training set to obtain a well-trained deep learning classification model.

[0135] The dimensionality-reduced features from step two are input into the trained deep learning classification model, which then predicts the chromosome category to which the sequence corresponding to the dimensionality-reduced features from step two belongs.

[0136] Record the category results, with the DNA sequence corresponding to each category stored in a single FASTA format file;

[0137] The specific process is as follows:

[0138] Step 3: 1. Construct a deep learning classification model ( Figure 2 The specific process is as follows:

[0139] Deep learning classification models include, in order:

[0140] Input layer, first module, second module, third module, fourth module, fifth module, twenty-first fully connected layer (Linear), eleventh dropout layer, sixteenth LeakyReLU activation function layer, twenty-second fully connected layer (Linear), twelfth dropout layer, seventeenth LeakyReLU activation function layer, twenty-third fully connected layer (Linear), output layer;

[0141] The first module includes:

[0142] First BN layer, first fully connected layer (Linear), first Leaky ReLU activation function, first Dropout layer, second fully connected layer (Linear), second Leaky ReLU activation function, second Dropout layer, third fully connected layer (Linear), fourth fully connected layer (Linear), third Leaky ReLU activation function;

[0143] The second module includes:

[0144] Second BN layer, fifth fully connected layer (Linear), fourth Leaky ReLU activation function, third Dropout layer, sixth fully connected layer (Linear), fifth Leaky ReLU activation function, fourth Dropout layer, seventh fully connected layer (Linear), eighth fully connected layer (Linear), sixth Leaky ReLU activation function;

[0145] The third module includes:

[0146] The third BN layer, the ninth fully connected layer (Linear), the seventh Leaky ReLU activation function, the fifth Dropout layer, the tenth fully connected layer (Linear), the eighth Leaky ReLU activation function, the sixth Dropout layer, the eleventh fully connected layer (Linear), the twelfth fully connected layer (Linear), and the ninth Leaky ReLU activation function;

[0147] The fourth module includes:

[0148] The fourth BN layer, the thirteenth fully connected layer (Linear), the tenth Leaky ReLU activation function, the seventh Dropout layer, the fourteenth fully connected layer (Linear), the eleventh Leaky ReLU activation function, the eighth Dropout layer, the fifteenth fully connected layer (Linear), the sixteenth fully connected layer (Linear), and the twelfth Leaky ReLU activation function;

[0149] The fifth module includes:

[0150] The fifth BN layer, the seventeenth fully connected layer (Linear), the thirteenth Leaky ReLU activation function, the ninth Dropout layer, the eighteenth fully connected layer (Linear), the fourteenth Leaky ReLU activation function, the tenth Dropout layer, the nineteenth fully connected layer (Linear), the twentieth fully connected layer (Linear), and the fifteenth Leaky ReLU activation function;

[0151] Step 32: Train the deep learning classification model based on the training set to obtain a trained deep learning classification model;

[0152] Step 3: Input the dimensionality-reduced features from Step 2 into the trained deep learning classification model. The trained deep learning classification model will predict the chromosome category to which the sequence corresponding to the dimensionality-reduced features from Step 2 belongs.

[0153] Steps 3 and 4: Record the category results. The DNA sequence corresponding to each category is stored in a FASTA format file.

[0154] After sequence encoding and extracting the sequence feature vector using the DNABert2 model, this method constructs a feedforward neural network (DNAMatch) based on a deep residual structure for chromosome category prediction. The backbone network consists of multiple consecutive residual modules, each composed of three fully connected layers, and has the following characteristics:

[0155] Layer-by-layer feature refinement: The input and output dimensions of each residual module are consistent. The module adopts a linear transformation that first expands to 3072 dimensions and then returns to 768 dimensions to enhance the non-linear expression of features. It is accompanied by the LeakyReLU non-linear activation function to further increase the feature expressive power.

[0156] Residual connections: prevent the gradient vanishing problem as the network depth increases and improve feature propagation capabilities.

[0157] In summary, the model first extracts features step by step through multiple residual modules. Each module consists of a linear transformation, a LeakyReLU activation function, and a Dropout layer, which enhances the network's generalization ability and reduces the gradient vanishing problem. Finally, the prediction results are obtained through multi-layer linear dimensionality reduction operations, achieving accurate classification of the chromosome to which the DNA fragment belongs.

[0158] The other steps and parameters are the same as those in one of the specific implementation methods one to six.

[0159] Specific Implementation Method Eight: This implementation method differs from Specific Implementation Methods One through Seven in that step three-two involves training the deep learning classification model based on the training set to obtain a trained deep learning classification model; the specific process is as follows:

[0160] 1) The Simlord tool was used to simulate and generate 10,000 DNA sequencing fragments of a length from the human reference genome for model training;

[0161] 2) Based on the final vocabulary, the simulated 10,000-word DNA sequencing fragment is encoded by BPE to obtain a sequence.

[0162] 3) Map the sequence obtained after BPE encoding to the corresponding word vector embedding space to obtain the word vector of the sequence;

[0163] 4) Input the word vectors of the sequence obtained in 3) into the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs feature vectors;

[0164] 5) Average pooling is used to reduce the dimensionality of the feature vectors output by the pre-trained model DNABert2 to obtain high-quality dimensionality-reduced features, which are then used as the training set.

[0165] 6) Use the dimensionality-reduced features (labeled) as input to the deep learning classification model, and use the chromosome category of the DNA sequence corresponding to the dimensionality-reduced features as output to train the deep learning classification model; the specific process is as follows:

[0166] 61) The dimensionality-reduced features are input into the first module via the input layer, and the first module outputs feature B′; the specific process is as follows:

[0167] After dimensionality reduction, the features are sequentially input into the first BN layer, the first fully connected Linear layer, the first LeakyReLU activation function, the first Dropout layer, the second fully connected Linear layer, the second LeakyReLU activation function, the second Dropout layer, and the third fully connected Linear layer. The third fully connected Linear layer outputs feature A′. The output feature A′ of the third fully connected Linear layer and the dimensionality-reduced features are then added element-wise and sequentially input into the fourth fully connected Linear layer and the third LeakyReLU activation function. The third LeakyReLU activation function outputs feature B′, which is used as the output feature of the first module.

[0168] 62) Input the output feature B′ of the first module into the second module, and the second module outputs feature D′; the specific process is as follows:

[0169] The output feature B′ of the first module is sequentially input into the second BN layer, the fifth fully connected linear layer, the fourth LeakyReLU activation function, the third Dropout layer, the sixth fully connected linear layer, the fifth LeakyReLU activation function, the fourth Dropout layer, and the seventh fully connected linear layer. The output feature C′ of the seventh fully connected linear layer is then added element-wise to the output feature B′ of the first module and sequentially input into the eighth fully connected linear layer and the sixth LeakyReLU activation function. The output feature D′ of the sixth LeakyReLU activation function is then used as the output feature of the second module.

[0170] 63) Input the output feature D′ of the second module into the third module, and the third module outputs feature F′; the specific process is as follows:

[0171] The output feature D′ of the second module is sequentially input into the third BN layer, the ninth fully connected linear layer, the seventh LeakyReLU activation function, the fifth Dropout layer, the tenth fully connected linear layer, the eighth LeakyReLU activation function, the sixth Dropout layer, and the eleventh fully connected linear layer. The eleventh fully connected linear layer outputs feature E′. The output feature E′ of the eleventh fully connected linear layer and the output feature D′ of the second module are added element-wise and then sequentially input into the twelfth fully connected linear layer and the ninth LeakyReLU activation function. The ninth LeakyReLU activation function outputs feature F′, and feature F′ is used as the output feature of the third module.

[0172] 64) Input the output feature F′ of the third module into the fourth module, and the fourth module outputs feature H′; the specific process is as follows:

[0173] The output feature F′ of the third module is sequentially input into the fourth BN layer, the thirteenth fully connected layer (Linear), the tenth Leaky ReLU activation function, the seventh Dropout layer, the fourteenth fully connected layer (Linear), the eleventh Leaky ReLU activation function, the eighth Dropout layer, and the fifteenth fully connected layer (Linear). The output feature G′ of the fifteenth fully connected layer (Linear) is then added element-wise to the output feature F′ of the third module and sequentially input into the sixteenth fully connected layer (Linear) and the twelfth Leaky ReLU activation function. The output feature H′ of the twelfth Leaky ReLU activation function is then used as the output feature of the fourth module.

[0174] 65) Input the output feature H′ of the fourth module into the fifth module, and the fifth module outputs feature J′; the specific process is as follows:

[0175] The output feature H′ of the fourth module is sequentially input into the fifth BN layer, the seventeenth fully connected layer (Linear), the thirteenth LeakyReLU activation function, the ninth Dropout layer, the eighteenth fully connected layer (Linear), the fourteenth LeakyReLU activation function, the tenth Dropout layer, and the nineteenth fully connected layer (Linear). The output feature I′ of the nineteenth fully connected layer (Linear) is then added element-wise to the output feature H′ of the fourth module and sequentially input into the twentieth fully connected layer (Linear) and the fifteenth LeakyReLU activation function. The output feature J′ of the fifteenth LeakyReLU activation function is then used as the output feature of the fifth module.

[0176] 66) Input the output feature J′ of the fifth module into the twenty-first fully connected layer Linear, the eleventh dropout layer, the sixteenth LeakyReLU activation function layer, the twenty-second fully connected layer Linear, the twelfth dropout layer, the seventeenth LeakyReLU activation function layer, and the twenty-third fully connected layer Linear in sequence. The twenty-third fully connected layer Linear outputs the chromosome category to which the DNA sequence corresponding to the predicted dimensionality reduction feature belongs. The category result is output through the output layer.

[0177] Train the deep learning classification model to obtain a well-trained deep learning classification model.

[0178] The other steps and parameters are the same as those in any of the specific implementation methods one to seven.

[0179] Specific Implementation Method Nine: This implementation method differs from Specific Implementation Methods One through Eight in that, in step three, the dimensionality-reduced features from step two are input into the trained deep learning classification model. The trained deep learning classification model predicts the chromosome category (24 categories) to which the sequence corresponding to the dimensionality-reduced features from step two belongs. The specific process is as follows:

[0180] 1) The dimensionality-reduced features from step two are input into the first module via the input layer, and the first module outputs feature B″; the specific process is as follows:

[0181] After dimensionality reduction, the features are sequentially input into the first BN layer, the first fully connected Linear layer, the first LeakyReLU activation function, the first Dropout layer, the second fully connected Linear layer, the second LeakyReLU activation function, the second Dropout layer, and the third fully connected Linear layer. The third fully connected Linear layer outputs feature A″. The output feature A″ of the third fully connected Linear layer and the dimensionality-reduced features are then added element-wise and sequentially input into the fourth fully connected Linear layer and the third LeakyReLU activation function. The third LeakyReLU activation function outputs feature B″, which is used as the output feature of the first module.

[0182] 2) Input feature B″ from the first module into the second module, and the second module outputs feature D″; the specific process is as follows:

[0183] The first module output feature B″ is sequentially input into the second BN layer, the fifth fully connected layer (Linear), the fourth LeakyReLU activation function, the third Dropout layer, the sixth fully connected layer (Linear), the fifth LeakyReLU activation function, the fourth Dropout layer, and the seventh fully connected layer (Linear). The seventh fully connected layer (Linear) outputs feature C″. The seventh fully connected layer (Linear) output feature C″ and the first module output feature B″ are added element-wise and then sequentially input into the eighth fully connected layer (Linear) and the sixth LeakyReLU activation function. The sixth LeakyReLU activation function outputs feature D″, and feature D″ is used as the second module output feature.

[0184] 3) Input the output feature D″ of the second module into the third module, and the third module outputs feature F″; the specific process is as follows:

[0185] The output feature D″ of the second module is sequentially input into the third BN layer, the ninth fully connected layer (Linear), the seventh LeakyReLU activation function, the fifth Dropout layer, the tenth fully connected layer (Linear), the eighth LeakyReLU activation function, the sixth Dropout layer, and the eleventh fully connected layer (Linear). The eleventh fully connected layer (Linear) outputs feature E″. The output feature E″ of the eleventh fully connected layer (Linear) and the output feature D″ of the second module are added element-wise and then sequentially input into the twelfth fully connected layer (Linear) and the ninth LeakyReLU activation function. The ninth LeakyReLU activation function outputs feature F″. Feature F″ is used as the output feature of the third module.

[0186] 4) Input the output feature F″ of the third module into the fourth module, and the fourth module outputs feature H″; the specific process is as follows:

[0187] The output feature F″ of the third module is sequentially input into the fourth BN layer, the thirteenth fully connected layer (Linear), the tenth Leaky ReLU activation function, the seventh Dropout layer, the fourteenth fully connected layer (Linear), the eleventh Leaky ReLU activation function, the eighth Dropout layer, and the fifteenth fully connected layer (Linear). The output feature G″ of the fifteenth fully connected layer (Linear) is then added element-wise to the output feature F″ of the third module and sequentially input into the sixteenth fully connected layer (Linear) and the twelfth Leaky ReLU activation function. The output feature H″ of the twelfth Leaky ReLU activation function is then used as the output feature of the fourth module.

[0188] 5) Input the output feature H″ of the fourth module into the fifth module, and the fifth module outputs feature J″; the specific process is as follows:

[0189] The output feature H″ of the fourth module is sequentially input into the fifth BN layer, the seventeenth fully connected layer (Linear), the thirteenth LeakyReLU activation function, the ninth Dropout layer, the eighteenth fully connected layer (Linear), the fourteenth LeakyReLU activation function, the tenth Dropout layer, and the nineteenth fully connected layer (Linear). The output feature I″ of the nineteenth fully connected layer (Linear) is added element by element to the output feature H″ of the fourth module and then sequentially input into the twentieth fully connected layer (Linear) and the fifteenth LeakyReLU activation function. The output feature J″ of the fifteenth LeakyReLU activation function is then used as the output feature of the fifth module.

[0190] 6) Input the output feature J″ of the fifth module into the twenty-first fully connected layer Linear, the eleventh dropout layer, the sixteenth LeakyReLU activation function layer, the twenty-second fully connected layer Linear, the twelfth dropout layer, the seventeenth LeakyReLU activation function layer, and the twenty-third fully connected layer Linear in sequence. The twenty-third fully connected layer Linear outputs the chromosome category to which the DNA sequence corresponding to the predicted dimensionality reduction feature from step two belongs. The category result is output through the output layer.

[0191] The other steps and parameters are the same as those in one of the specific implementation methods one to eight.

[0192] Specific Implementation Method Ten: This implementation method differs from Specific Implementation Methods One to Nine in that, in step four, the sequence of the record category in each file is compared with the corresponding chromosomal DNA sequence in the reference sequence, and the comparison results are saved; the reference sequence is the human genome sequence; the specific process is as follows:

[0193] The minimap2 tool was used to align the DNA sequences stored in each file with the corresponding chromosomal DNA sequences in the reference sequence, and the alignment results of the DNA sequences stored in each file were obtained.

[0194] The alignment results include: alignment position of the sequence, match length, base mismatch or insertion / deletion status, alignment score, and alignment quality;

[0195] Save the comparison results as a SAM format file;

[0196] The DNA sequence stored in each file is the DNA sequence of the known chromosome category predicted in step 3.3.

[0197] After predicting the chromosome class of DNA sequencing fragments using the DNABert2 model and the deep learning classification model (DNAMatch), the minimap2 tool was used to perform precise sequence alignment of the predicted sequences, and the alignment results were saved. Specifically, firstly, based on the chromosome classification prediction results of the aforementioned DNA sequencing fragments, different DNA sequencing fragments were organized and categorized according to the predicted chromosome class, and saved as corresponding FASTA format files. Subsequently, for each predicted tag, the corresponding reference chromosome sequence was selected from the complete reference genome as the object for subsequent alignment. In addition, for DNA sequencing fragments that are difficult to predict, alignment was still performed on a whole-genome scale.

[0198] Next, during the sequence alignment stage, minimap2 is used to align the sequences of each classified FASTA file, yielding detailed alignment results. The minimap2 output is saved in a standardized SAM format, facilitating compatibility with various subsequent bioinformatics analysis software and data analysis. The result file typically contains the following key information: sequence alignment position, match length, base mismatches or insertions / deletions, alignment score, and alignment quality.

[0199] The other steps and parameters are the same as those in any of the specific implementation methods one to nine.

[0200] This invention may have other embodiments. Without departing from the spirit and essence of this invention, those skilled in the art can make various corresponding changes and modifications according to this invention, but these corresponding changes and modifications should all fall within the protection scope of the appended claims.

Claims

1. A DNA sequence alignment method based on deep learning, characterized in that: The specific process of the method is as follows: Step 1: Convert the one million-length DNA sequencing sequence from string format into word vectors based on BPE encoding; Step 2: Input the word vectors into the pre-trained model DNABert2, and the pre-trained model DNABert2 will output feature vectors; Average pooling is used to reduce the dimensionality of the feature vector to obtain the dimensionality-reduced features; Step three includes: Step 31: Construct a deep learning classification model; the specific process is as follows: Deep learning classification models include, in order: Input layer, first module, second module, third module, fourth module, fifth module, twenty-first fully connected layer (Linear), eleventh dropout layer, sixteenth LeakyReLU activation function layer, twenty-second fully connected layer (Linear), twelfth dropout layer, seventeenth LeakyReLU activation function layer, twenty-third fully connected layer (Linear), output layer; The first module includes: First BN layer, first fully connected layer (Linear), first Leaky ReLU activation function, first Dropout layer, second fully connected layer (Linear), second Leaky ReLU activation function, second Dropout layer, third fully connected layer (Linear), fourth fully connected layer (Linear), third Leaky ReLU activation function; The second module includes: Second BN layer, fifth fully connected layer (Linear), fourth Leaky ReLU activation function, third Dropout layer, sixth fully connected layer (Linear), fifth Leaky ReLU activation function, fourth Dropout layer, seventh fully connected layer (Linear), eighth fully connected layer (Linear), sixth Leaky ReLU activation function; The third module includes: The third BN layer, the ninth fully connected layer (Linear), the seventh Leaky ReLU activation function, the fifth Dropout layer, the tenth fully connected layer (Linear), the eighth Leaky ReLU activation function, the sixth Dropout layer, the eleventh fully connected layer (Linear), the twelfth fully connected layer (Linear), and the ninth Leaky ReLU activation function; The fourth module includes: The fourth BN layer, the thirteenth fully connected layer (Linear), the tenth Leaky ReLU activation function, the seventh Dropout layer, the fourteenth fully connected layer (Linear), the eleventh Leaky ReLU activation function, the eighth Dropout layer, the fifteenth fully connected layer (Linear), the sixteenth fully connected layer (Linear), and the twelfth Leaky ReLU activation function; The fifth module includes: The fifth BN layer, the seventeenth fully connected layer (Linear), the thirteenth Leaky ReLU activation function, the ninth Dropout layer, the eighteenth fully connected layer (Linear), the fourteenth Leaky ReLU activation function, the tenth Dropout layer, the nineteenth fully connected layer (Linear), the twentieth fully connected layer (Linear), and the fifteenth Leaky ReLU activation function; Step 3.2: Train the deep learning classification model based on the training set to obtain a trained deep learning classification model; the specific process is as follows: 1) The Simlord tool was used to simulate and generate DNA sequencing fragments of 10,000 characters in length from the human reference genome; 2) Based on the final vocabulary, the simulated 10,000-word DNA sequencing fragment is encoded by BPE to obtain a sequence. 3) Map the sequence obtained after BPE encoding to the corresponding word vector embedding space to obtain the word vector of the sequence; 4) Input the word vectors of the sequence obtained in 3) into the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs feature vectors; 5) Average pooling is used to reduce the dimensionality of the feature vectors output by the pre-trained model DNABert2 to obtain the dimensionality-reduced features, which are then used as the training set. 6) Use the dimensionality-reduced features as input to the deep learning classification model, and use the chromosome category to which the DNA sequence corresponding to the dimensionality-reduced features belongs as output to the deep learning classification model. Train the deep learning classification model to obtain a trained deep learning classification model; the specific process is as follows: 61) The dimensionality-reduced features are input into the first module via the input layer, and the first module outputs the features. The specific process is as follows: After dimensionality reduction, the features are sequentially input into the first Batch Normalization (BN) layer, the first fully connected Linear layer, the first Leaky ReLU activation function, the first Dropout layer, the second fully connected Linear layer, the second Leaky ReLU activation function, the second Dropout layer, and the third fully connected Linear layer. The third fully connected Linear layer outputs the features. The output features of the third fully connected layer Linear The elements of the reduced-dimensional features are summed element-wise and then sequentially fed into the fourth fully connected layer (Linear) and the third LeakyReLU activation function. The third LeakyReLU activation function outputs the features. ,feature As the output feature of the first module; 62) Output features of the first module Input to the second module, the second module outputs features The specific process is as follows: First module output characteristics The input layers are sequentially: second Batch Normalization (BN) layer, fifth fully connected Linear layer, fourth Leaky ReLU activation function, third Dropout layer, sixth fully connected Linear layer, fifth Leaky ReLU activation function, fourth Dropout layer, and seventh fully connected Linear layer. The seventh fully connected Linear layer outputs features. The output features of the seventh fully connected layer Linear and the output features of the first module After element-wise addition, the input is sequentially fed into the eighth fully connected layer (Linear) and the sixth LeakyReLU activation function. The sixth LeakyReLU activation function outputs the features. ,feature As the output feature of the second module; 63) Output features of the second module Input to the third module, the third module outputs features The specific process is as follows: The second module outputs features The input layers are sequentially: the third BN layer, the ninth fully connected linear layer, the seventh Leaky ReLU activation function, the fifth Dropout layer, the tenth fully connected linear layer, the eighth Leaky ReLU activation function, the sixth Dropout layer, and the eleventh fully connected linear layer. The eleventh fully connected linear layer outputs features. The eleventh fully connected layer Linear output features Second module output features After element-wise summation, the input is sequentially fed into the twelfth fully connected layer (Linear) and the ninth Leaky ReLU activation function. The ninth Leaky ReLU activation function outputs the features. ,feature As the output feature of the third module; 64) Output features of the third module Input to the fourth module, the fourth module outputs features The specific process is as follows: Third module output characteristics The input layers are sequentially: the fourth BN layer, the thirteenth fully connected linear layer, the tenth Leaky ReLU activation function layer, the seventh Dropout layer, the fourteenth fully connected linear layer, the eleventh Leaky ReLU activation function layer, the eighth Dropout layer, and the fifteenth fully connected linear layer. The fifteenth fully connected linear layer outputs the features. The output features of the fifteenth fully connected layer Linear and the output features of the third module After element-wise summation, the input is sequentially fed into the sixteenth fully connected layer (Linear) and the twelfth Leaky ReLU activation function. The twelfth Leaky ReLU activation function outputs features. ,feature As the output feature of the fourth module; 65) Output features of the fourth module Input to the fifth module, the fifth module outputs features The specific process is as follows: Fourth module output features The input layers are sequentially: the fifth BN layer, the seventeenth fully connected linear layer, the thirteenth Leaky ReLU activation function layer, the ninth Dropout layer, the eighteenth fully connected linear layer, the fourteenth Leaky ReLU activation function layer, the tenth Dropout layer, and the nineteenth fully connected linear layer. The nineteenth fully connected linear layer outputs the features. Linear output features of the nineteenth fully connected layer and the output features of the fourth module After element-wise summation, the input is sequentially fed into the 20th fully connected layer (Linear) and the 15th Leaky ReLU activation function. The 15th Leaky ReLU activation function outputs the features. ,feature As the output feature of the fifth module; 66) Output features of the fifth module The input layers are sequentially: the 21st fully connected layer (Linear), the 11th Dropout layer, the 16th LeakyReLU activation function layer, the 22nd fully connected layer (Linear), the 12th Dropout layer, the 17th LeakyReLU activation function layer, and the 23rd fully connected layer (Linear). The 23rd fully connected layer (Linear) outputs the chromosome category to which the predicted dimensionality-reduced features correspond to the DNA sequence. The category results are then output through the output layer. Step 3: Input the dimensionality-reduced features from Step 2 into the trained deep learning classification model. The trained deep learning classification model will predict the chromosome category to which the sequence corresponding to the dimensionality-reduced features from Step 2 belongs. Steps 3 and 4: Record the category results. The DNA sequence corresponding to each category is stored in one FASTA format file. Step 4: Align the sequence of the record category in each file with the corresponding chromosomal DNA sequence in the reference sequence, and save the alignment results; The reference sequence is the human genome sequence.

2. The DNA sequence alignment method based on deep learning according to claim 1, characterized in that: In step one, the one million-length DNA sequencing sequence is converted from string form into word vectors based on BPE encoding; the specific process is as follows: Step 11: Assemble the human genome sequence As a corpus, ; Steps 1 and 2: Set the sequence The Middle bar sequence Each base in the token is considered an independent token; Step 13: Calculate the first... bar sequence Each Token pair Frequency of occurrence; Each Token pair Composed of adjacent tokens, and token pairs There is no overlap between them; Step 14: Repeat Step 13 until a set of sequences is obtained. All Each token pair in the sequence Frequency of occurrence; Step 15, identical token pairs in the sequence Add up the corresponding frequencies to obtain identical token pairs in the sequence The total frequency of occurrence; expressed as: in, Indicates the first bar sequence Same Token Pair Corresponding frequency of occurrence; Step 16: Pair the tokens corresponding to the highest total frequency of occurrence. Merging from each sequence yields a new token, denoted as . Update the vocabulary list; Step 17: Repeat steps 13 to 16M times to obtain all the final tokens. Number all the final tokens so that no two tokens are numbered. The final vocabulary consists of all tokens and the corresponding number for each token. M is 4088; Step 18: For a DNA sequencing fragment of one million units in length, select a DNA sequence of length 10,000 units from the beginning of the DNA sequencing fragment. A DNA sequence of length of 10,000 units is selected from the middle end of the DNA sequencing fragment. Select a DNA sequence of length 10,000 units forward from the end of the DNA sequencing fragment. ; The final vocabulary will be based on DNA sequences of length 10,000 characters selected from the beginning of the DNA sequencing fragments. After BPE encoding, a token sequence is obtained: The final vocabulary will be based on DNA sequences of length 10,000 units selected from the middle end of the DNA sequencing fragments. After BPE encoding, a token sequence is obtained: Based on the final vocabulary, a DNA sequence of length 10,000 will be selected from the end of the DNA sequencing fragment forward. After BPE encoding, a token sequence is obtained: in, This represents the number of encoded tokens; This indicates a token sequence obtained by encoding a DNA sequence of length 10,000 characters selected from the beginning of a DNA sequencing fragment using BPE. This represents the first token obtained after BPE encoding of the first token in a DNA sequence of length 10,000. This represents the second token obtained after BPE encoding the second token in a DNA sequence of length 10,000. This represents the first character in a DNA sequence of length 10,000. After the token is encoded by BPE, the resulting token is the first one. One Token; This represents the first character in a DNA sequence of length 10,000. After the token is encoded by BPE, the resulting token is the first one. One Token; This indicates a token sequence obtained by encoding a DNA sequence of length 10,000 characters selected from the middle end of a DNA sequencing fragment using BPE. This represents the first token obtained after BPE encoding of the first token in a DNA sequence of length 10,000. This represents the second token obtained after BPE encoding the second token in a DNA sequence of length 10,000. This represents the first character in a DNA sequence of length 10,000. After the token is encoded by BPE, the resulting token is the first one. One Token; This represents the first character in a DNA sequence of length 10,000. After the token is encoded by BPE, the resulting token is the first one. One Token; This indicates a token sequence obtained by encoding a DNA sequence of length 10,000 units forward from the end of the DNA sequencing fragment using BPE. This represents the first token obtained after BPE encoding of the first token in a DNA sequence of length 10,000. This represents the second token obtained after BPE encoding the second token in a DNA sequence of length 10,000. This represents the first character in a DNA sequence of length 10,000. After the token is encoded by BPE, the resulting token is the first one. One Token; This represents the first character in a DNA sequence of length 10,000. After the token is encoded by BPE, the resulting token is the first one. One Token; Step 19: Map the BPE-encoded token sequence to the corresponding word vector embedding space to obtain the word vectors of the token sequence, represented as: in, Indicates will Mapping to the corresponding word vector embedding space yields the word vector corresponding to each token; Indicates will Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the first token; Indicates will Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the second token; Indicates will Mapping to the corresponding word embedding space, the resulting word is... The word vectors corresponding to each token; Indicates will Mapping to the corresponding word embedding space, the resulting word is... The word vectors corresponding to each token; Indicates will Mapping to the corresponding word vector embedding space yields the word vector corresponding to each token; Indicates will Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the first token; Indicates will Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the second token; Indicates will Mapping to the corresponding word embedding space, the resulting word is... The word vectors corresponding to each token; Indicates will Mapping to the corresponding word embedding space, the resulting word is... The word vectors corresponding to each token; Indicates will Mapping to the corresponding word vector embedding space yields the word vector corresponding to each token; Indicates will Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the first token; Indicates will Mapping to the corresponding word vector embedding space, we obtain the word vector corresponding to the second token; Indicates will Mapping to the corresponding word embedding space, the resulting word is... The word vectors corresponding to each token; Indicates will Mapping to the corresponding word embedding space, the resulting word is... The word vectors corresponding to each token; Indicates word embedding.

3. The DNA sequence alignment method based on deep learning according to claim 2, characterized in that: The DNA sequence of length 10,000 characters will be selected from the beginning of the DNA sequencing fragment based on the final vocabulary. After BPE encoding, a token sequence is obtained: The specific process is as follows: 1) A DNA sequence of length 10,000 units will be selected from the beginning of the DNA sequencing fragment. One base in the code is considered one character; 2) Order , ; 3) From the sequence The Middle Starting from the 1st character, proceeding backwards, including the 1st character... Adjacent characters including one character Each character is searched in the final vocabulary; If adjacent If any of the characters can be found in the final vocabulary, determine whether the condition is met. If the condition is met, execute step 5); otherwise, execute step 4. If adjacent If the character cannot be found in the final vocabulary, proceed to step 5); 4) Let Continue with step 3); 5).No. Starting from the 1st character, proceeding backwards, including the 1st character... Adjacent characters including one character Each character is treated as a token, and encoded according to the final vocabulary content to determine whether it meets the requirements. If the condition is met, the process ends, resulting in a sequence of tokens. ; If not satisfied, then let , Execute 3).

4. The DNA sequence alignment method based on deep learning according to claim 3, characterized in that: The DNA sequence of length 10,000 characters will be selected from the middle end of the DNA sequencing fragment based on the final vocabulary. After BPE encoding, a token sequence is obtained: The specific process is as follows: 1) A DNA sequence of length 10,000 units will be selected from the middle end of the DNA sequencing fragment. One base in the code is considered one character; 2) Order , ; 3) From the sequence The Middle Starting from the 1st character, proceeding backwards, including the 1st character... Adjacent characters including one character Each character is searched in the final vocabulary; If adjacent If any of the characters can be found in the final vocabulary, determine whether the condition is met. If the condition is met, execute step 5); otherwise, execute step 4. If adjacent If the character cannot be found in the final vocabulary, proceed to step 5); 4) Let Continue with step 3); 5).No. Starting from the 1st character, proceeding backwards, including the 1st character... Adjacent characters including one character Each character is treated as a token, and encoded according to the final vocabulary content to determine whether it meets the requirements. If the condition is met, the process ends, resulting in a sequence of tokens. ; If not satisfied, then let , Execute 3).

5. The DNA sequence alignment method based on deep learning according to claim 4, characterized in that: The DNA sequence of length 10,000 characters will be selected from the end of the DNA sequencing fragment forward based on the final vocabulary. After BPE encoding, a token sequence is obtained: The specific process is as follows: 1) A DNA sequence of length 10,000 units will be selected from the end of the DNA sequencing fragment before and after it. One base in the code is considered one character; 2) Order , ; 3) From the sequence The Middle Starting from the 1st character, proceeding backwards, including the 1st character... Adjacent characters including one character Each character is searched in the final vocabulary; If adjacent If any of the characters can be found in the final vocabulary, determine whether the condition is met. If the condition is met, execute step 5); otherwise, execute step 4. If adjacent If the character cannot be found in the final vocabulary, proceed to step 5); 4) Let Continue with step 3); 5).No. Starting from the 1st character, proceeding backwards, including the 1st character... Adjacent characters including one character Each character is treated as a token, and encoded according to the final vocabulary content to determine whether it meets the requirements. If the condition is met, the process ends, resulting in a sequence of tokens. ; If not satisfied, then let , Execute 3).

6. The DNA sequence alignment method based on deep learning according to claim 5, characterized in that: In step two, word vectors are input into the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs feature vectors. Average pooling is used to reduce the dimensionality of the feature vector to obtain the dimensionality-reduced features; The specific process is as follows: Step 2: Input the word vectors into the pre-trained model DNABert2, and the pre-trained model DNABert2 outputs feature vectors; the specific process is as follows: 1) Extract the word vectors corresponding to each token. Input the pre-trained model DNABert2, and the pre-trained model DNABert2 will output the feature vector corresponding to each token. ; indicates as: 2) Extract the word vectors corresponding to each token. Input the pre-trained model DNABert2, and the pre-trained model DNABert2 will output the feature vector corresponding to each token. ; indicates as: 3) Extract the word vectors corresponding to each token. Input the pre-trained model DNABert2, and the pre-trained model DNABert2 will output the feature vector corresponding to each token. ; indicates as: in, This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; This indicates that word vectors Input the pre-trained model DNABert2, and the feature vector output by the pre-trained model DNABert2; Step 22: Use average pooling to reduce the dimensionality of the feature vector to obtain the dimensionality-reduced features; The specific process is as follows: 1) Use average pooling on the feature vector Perform dimensionality reduction to obtain the reduced features. ; indicates as: 2) Use average pooling on the feature vectors Perform dimensionality reduction to obtain the reduced features. ; indicates as: 3) Use average pooling on the feature vectors Perform dimensionality reduction to obtain the reduced features. ; indicates as: 。 7. The DNA sequence alignment method based on deep learning according to claim 6, characterized in that: In step three, the dimensionality-reduced features from step two are input into the trained deep learning classification model. The trained deep learning classification model predicts the chromosome category to which the sequence corresponding to the dimensionality-reduced features from step two belongs. The specific process is as follows: 1) The dimensionality-reduced features from step two are input into the first module via the input layer, and the first module outputs the features. The specific process is as follows: After dimensionality reduction, the features are sequentially input into the first Batch Normalization (BN) layer, the first fully connected Linear layer, the first Leaky ReLU activation function, the first Dropout layer, the second fully connected Linear layer, the second Leaky ReLU activation function, the second Dropout layer, and the third fully connected Linear layer. The third fully connected Linear layer outputs the features. The output features of the third fully connected layer Linear The elements of the reduced-dimensional features are summed element-wise and then sequentially fed into the fourth fully connected layer (Linear) and the third LeakyReLU activation function. The third LeakyReLU activation function outputs the features. ,feature As the output feature of the first module; 2) Output features of the first module Input to the second module, the second module outputs features The specific process is as follows: First module output characteristics The input layers are sequentially: second Batch Normalization (BN) layer, fifth fully connected Linear layer, fourth Leaky ReLU activation function, third Dropout layer, sixth fully connected Linear layer, fifth Leaky ReLU activation function, fourth Dropout layer, and seventh fully connected Linear layer. The seventh fully connected Linear layer outputs features. The output features of the seventh fully connected layer Linear and the output features of the first module After element-wise addition, the input is sequentially fed into the eighth fully connected layer (Linear) and the sixth LeakyReLU activation function. The sixth LeakyReLU activation function outputs the features. ,feature As the output feature of the second module; 3) Output features of the second module Input to the third module, the third module outputs features The specific process is as follows: The second module outputs features The input layers are sequentially: the third BN layer, the ninth fully connected linear layer, the seventh Leaky ReLU activation function, the fifth Dropout layer, the tenth fully connected linear layer, the eighth Leaky ReLU activation function, the sixth Dropout layer, and the eleventh fully connected linear layer. The eleventh fully connected linear layer outputs features. The eleventh fully connected layer Linear output features Second module output features After element-wise summation, the input is sequentially fed into the twelfth fully connected layer (Linear) and the ninth Leaky ReLU activation function. The ninth Leaky ReLU activation function outputs the features. ,feature As the output feature of the third module; 4) Output features of the third module Input to the fourth module, the fourth module outputs features The specific process is as follows: Third module output characteristics The input layers are sequentially: the fourth BN layer, the thirteenth fully connected linear layer, the tenth Leaky ReLU activation function layer, the seventh Dropout layer, the fourteenth fully connected linear layer, the eleventh Leaky ReLU activation function layer, the eighth Dropout layer, and the fifteenth fully connected linear layer. The fifteenth fully connected linear layer outputs the features. The output features of the fifteenth fully connected layer Linear and the output features of the third module After element-wise summation, the input is sequentially fed into the sixteenth fully connected layer (Linear) and the twelfth Leaky ReLU activation function. The twelfth Leaky ReLU activation function outputs features. ,feature As the output feature of the fourth module; 5) Output features of the fourth module Input to the fifth module, the fifth module outputs features The specific process is as follows: Fourth module output features The input layers are sequentially: the fifth BN layer, the seventeenth fully connected linear layer, the thirteenth Leaky ReLU activation function layer, the ninth Dropout layer, the eighteenth fully connected linear layer, the fourteenth Leaky ReLU activation function layer, the tenth Dropout layer, and the nineteenth fully connected linear layer. The nineteenth fully connected linear layer outputs the features. Linear output features of the nineteenth fully connected layer and the output features of the fourth module After element-wise summation, the input is sequentially fed into the 20th fully connected layer (Linear) and the 15th Leaky ReLU activation function. The 15th Leaky ReLU activation function outputs the features. ,feature As the output feature of the fifth module; 6) Output features of the fifth module The input layers are sequentially: the 21st fully connected layer (Linear), the 11th Dropout layer, the 16th LeakyReLU activation function layer, the 22nd fully connected layer (Linear), the 12th Dropout layer, the 17th LeakyReLU activation function layer, and the 23rd fully connected layer (Linear). The 23rd fully connected layer (Linear) outputs the chromosome category to which the DNA sequence corresponding to the predicted dimensionality reduction feature from step two belongs. The category result is then output through the output layer.

8. The DNA sequence alignment method based on deep learning according to claim 7, characterized in that: In step four, the sequence of each record category in each file is compared with the corresponding chromosomal DNA sequence in the reference sequence, and the comparison results are saved; the reference sequence is the human genome sequence; the specific process is as follows: The minimap2 tool was used to align the DNA sequences stored in each file with the corresponding chromosomal DNA sequences in the reference sequence, and the alignment results of the DNA sequences stored in each file were obtained. The alignment results include: alignment position of the sequence, match length, base mismatch or insertion / deletion status, alignment score, and alignment quality; Save the comparison results as a SAM format file; The DNA sequence stored in each file is the DNA sequence of the known chromosome category predicted in step 3.3.