A DNA sequencing read reconstruction method and system based on a hybrid expert model

By converting DNA sequencing reads into images and using a hybrid expert model for denoising, the problem of correcting heterogeneous errors in DNA sequencing is solved, achieving efficient read reconstruction and cost reduction, and improving the reliability and retrieval efficiency of DNA storage data.

CN121122432BActive Publication Date: 2026-03-03HUAIAN LOUZHI TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511226733.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2026-03-03
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

Existing DNA sequencing technologies suffer from high complexity, high cost, and insufficient accuracy in error correction methods when dealing with heterogeneous errors such as insertions, deletions, and substitutions, making it difficult to meet the data reliability requirements of platforms with high error rates.

Method used

A DNA sequencing read reconstruction method based on a hybrid expert model is adopted to convert DNA sequencing reads into image form, use the DNAMoE model for denoising, and reconstruct the reads through confidence filters and iterative optimization techniques, thereby reducing the dependence on traditional error correction codes.

Benefits of technology

The reconstruction success rate reached 92.30% on the high-error-rate Nanopore sequencing platform, reducing DNA synthesis costs and significantly improving the reliability and retrieval efficiency of DNA storage data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121122432B_ABST
    Figure CN121122432B_ABST
Patent Text Reader

Abstract

This invention belongs to the interdisciplinary field of DNA digital storage and bioinformatics, and discloses a DNA sequencing read reconstruction method and system based on a hybrid expert model. The method involves clustering the original DNA sequencing reads, converting the clustered reads into image form using nucleotide-color mapping, and then normalizing the length and adjusting the cluster size to obtain a standardized 3-channel image. This standardized 3-channel image is input into the DNAMoE model to obtain an initial reconstruction result. If the confidence level of the initial reconstruction result is lower than a set threshold, a confidence filter is used to generate an updated image through majority voting for low-confidence regions. The updated image replaces the column corresponding to the read with the largest deviation in the input image and is then re-input into the DNAMoE model for iterative optimization until the confidence level reaches the threshold or the maximum number of iterations is reached, at which point the final reconstruction result is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of DNA digital storage and bioinformatics, specifically relating to a method and system for reconstructing DNA sequencing reads based on a hybrid expert model. Background Technology

[0002] DNA storage, with its advantages of ultra-high storage density, ultra-long storage time, and low energy consumption, has become a potential solution to cope with the explosive growth of global data. However, errors such as insertions, deletions, and substitutions (IDS) can occur during DNA synthesis and sequencing, and these errors are spatially heterogeneous and platform-specific, seriously affecting the reliable retrieval of data.

[0003] Traditional error correction methods rely on error-correcting codes (such as Reed-Solomon codes and LDPC codes), which can only correct substitution errors and require 20-30% logical redundancy, increasing the cost of DNA synthesis. While reconstruction algorithms based on multiple sequence alignment (MSA) can handle synchronization errors, they suffer from high computational complexity and memory consumption. Existing deep learning methods experience significant accuracy loss on high-error-rate sequencing platforms (such as Nanopore), making them unsuitable for practical applications. Therefore, there is an urgent need for a DNA read reconstruction technology that can efficiently handle heterogeneous errors without relying on traditional error-correcting codes. Summary of the Invention

[0004] To address the issues of low reliability, reliance on error correction codes, and high cost in existing DNA sequencing read reconstruction technologies, this invention provides a DNA sequencing read reconstruction method and system based on a hybrid expert model. This method effectively handles heterogeneous errors such as insertions, deletions, and substitutions generated during sequencing. On the high-error-rate Nanopore sequencing platform, the reconstruction success rate can reach 92.30%, and it does not rely on traditional error correction codes, thus reducing DNA synthesis costs and significantly improving the reliability and efficiency of DNA storage data retrieval.

[0005] To achieve the above objectives, the present invention provides the following solution:

[0006] A DNA sequencing read reconstruction method based on a hybrid expert model, the method comprising:

[0007] The raw DNA sequencing reads are clustered, and the clustered reads are converted into image form through nucleotide-color mapping. The length is normalized and the cluster size is adjusted to obtain a standardized 3-channel image.

[0008] The standardized 3-channel image is input into the DNAMoE model to obtain the initial reconstruction result. If the confidence of the initial reconstruction result is lower than the set threshold, the confidence filter is used to generate an updated image by majority voting on the low confidence region.

[0009] Replace the column corresponding to the read segment with the largest deviation in the input image with the updated image, and then re-input it into the DNAMoE model for iterative optimization until the confidence level is met or the maximum number of iterations is reached, and then output the final reconstruction result.

[0010] Preferably, the method for clustering raw DNA sequencing reads, converting the clustered reads into images using nucleotide-color mapping, and then performing length normalization and cluster size adjustment to obtain standardized 3-channel images includes:

[0011] The original DNA sequencing reads are clustered according to whether the first 12 bases are the same, that is, sequencing reads with the same first 12 bases are clustered into one cluster;

[0012] After clustering, the sequencing reads of varying lengths in each cluster are normalized. Sequencing reads with a length not exceeding 155 are padded with the character N, while sequencing reads with a length greater than 155 are truncated by removing excess bases at the end. The number of sequencing reads in each cluster is also normalized. For clusters with fewer than 50 sequencing reads, the sequencing reads in the cluster are randomly copied until the number of reads equals 50. For clusters with more than 50 sequencing reads, the 50 reads with a length closest to 155 are retained, and the remaining reads are deleted.

[0013] The four bases of the sequencing reads in each cluster and the N-character padding are mapped to specific colors: A-black, T-red, C-blue, G-green, and N-white, thus converting the clusters into an image with a size of 3×50×155.

[0014] Preferably, the DNAMoE model includes an encoder, a decoder, a linear network, and a confidence filter;

[0015] The encoder consists of six stacked improved transformer modules. Specifically, the improvement involves replacing the forward feedback layer of the transformer module with a MoE-enhanced feedforward layer, which includes eight expert networks {E1, E2, ... E...}. i ...,E8} and 1 router, each expert is a linear network E i The parameter is W i The router dynamically selects two expert networks to activate. The dynamic routing algorithm is as follows:

[0016] R(x) = TopK(Softmax(x·W) r ));

[0017] Where x is the vector obtained after the image passes through the transformer regularization layer, and R(·) represents the routing module, which implements the linear transformation of x, with parameters W. r Then input the Softmax activation function and the sparse gating function T. OPK(·) selects two experts based on the two largest values ​​in the softmax function. The weights of unselected experts are set to zero. The entire MoE feedforward layer is described as follows:

[0018]

[0019] Where E i (x)=W i ·x, n represent the total number of expert networks;

[0020] The vector obtained after being calculated by the MoE feedforward layer is then fed into the decoder after passing through a transformer regularization layer.

[0021] The decoder uses a standard Transformer structure, receives the encoder output, and obtains a new 32-dimensional vector y by calling the standard transformer module for computation. This vector is then input into a linear network for linear transformation.

[0022] The formula for calculating a linear network is:

[0023] M = Wy;

[0024] Where W is the parameter of the linear network, y is the input of the linear network, and through linear transformation, the vector y is transformed into a 3×50×155 image matrix M, and then M is input into the confidence filter.

[0025] The core component of the confidence filter is a confidence function that operates on the output of a linear layer. The output of the linear layer is a 3×50×155 image matrix M, where the 50 pixel values ​​in the j-th row are considered as 50 predictions for the j-th symbol, and L is the length of the encoded sequence. The confidence function is calculated using the following formula:

[0026]

[0027] Where P(·) represents the probability distribution of each color in the j-th row of the image matrix M, max[·] represents taking the maximum element, L is the total number of rows of the image, and the threshold of the confidence function is 0.85. For image matrices M that exceed this threshold, the color with the highest frequency in each row is taken, converted into the corresponding base, and a read segment of length L is obtained, thus completing the read segment reconstruction. For prediction results with a confidence score lower than 0.85, a majority vote is performed on each row, the color with the highest frequency in each row is taken, and a 1×L image M1 is generated. M1 is fed back to the input for iterative update.

[0028] Preferably, the method of replacing the column corresponding to the read segment with the largest deviation in the input image with the updated image and then re-inputting it into the DNAMoE model for iterative optimization until the confidence level reaches the target or the maximum number of iterations is reached, and then outputting the final reconstruction result includes:

[0029] Replace the column corresponding to the read segment with the largest deviation from the reference length L in the input image with M1, and re-input it into the DNAMoE model for iteration until the confidence of the image generated by the DNAMoE model exceeds the threshold of 0.85. Then, take the color with the highest frequency in each row of the image generated by the DNAMoE model, convert it into the corresponding base, and obtain a read segment of length L, thus completing the read segment reconstruction.

[0030] The present invention also provides a DNA sequencing read reconstruction system based on a hybrid expert model, the system being used to implement the aforementioned method, the system comprising: a data preprocessing module, a read reconstruction module, and an iterative optimization module;

[0031] The data preprocessing module is used to cluster the raw DNA sequencing reads, convert the clustered reads into image form through nucleotide-color mapping, and perform length normalization and cluster size adjustment to obtain a standardized 3-channel image.

[0032] The read segment reconstruction module is used to input a standardized 3-channel image into the DNAMoE model to obtain an initial reconstruction result. If the confidence of the initial reconstruction result is lower than a set threshold, a confidence filter is used to perform majority voting on the low-confidence region to generate an updated image.

[0033] The iterative optimization module is used to replace the column corresponding to the read segment with the largest deviation in the input image with the updated image and then re-input it into the DNAMoE model for iterative optimization until the confidence level reaches the standard or the maximum number of iterations is reached, and then output the final reconstruction result.

[0034] Preferably, the data preprocessing module includes: a clustering unit, an adjustment unit, and a transformation unit;

[0035] The clustering unit is used to cluster the original DNA sequencing reads according to whether the first 12 bases are the same, that is, to cluster the sequencing reads with the same first 12 bases into one cluster;

[0036] The adjustment unit is used to normalize the sequencing reads of varying lengths in each cluster after clustering. Specifically, sequencing reads with a length not exceeding 155 are padded with the character N, and sequencing reads with a length greater than 155 are truncated by removing excess bases at the end. The number of sequencing reads in each cluster is also normalized. For clusters with fewer than 50 sequencing reads, the sequencing reads in the cluster are randomly copied until the number of reads equals 50. For clusters with more than 50 sequencing reads, the 50 reads with a length closest to 155 are retained, and the remaining reads are deleted.

[0037] The conversion unit is used to map the four bases and the N-character filling in the sequencing reads in each cluster to specific colors, namely A-black, T-red, C-blue, G-green, and N-white, thereby converting the cluster into an image form and obtaining an image of size 3×50×155.

[0038] Preferably, the DNAMoE model includes an encoder, a decoder, a linear network, and a confidence filter;

[0039] The encoder consists of six stacked improved transformer modules. Specifically, the improvement involves replacing the forward feedback layer of the transformer module with a MoE-enhanced feedforward layer, which includes eight expert networks {E1, E2, ... E...}. i ...,E8} and 1 router, each expert is a linear network E i The parameter is W i The router dynamically selects two expert networks to activate. The dynamic routing algorithm is as follows:

[0040] R(x) = TopK(Softmax(x·W) r ));

[0041] Where x is the vector obtained after the image passes through the transformer regularization layer, and R(·) represents the routing module, which implements the linear transformation of x, with parameters W. r Then input the Softmax activation function and the sparse gating function T. OP K(·) selects two experts based on the two largest values ​​in the softmax function. The weights of unselected experts are set to zero. The entire MoE feedforward layer is described as follows:

[0042]

[0043] Where E i (x)=W i ·x, n represent the total number of expert networks;

[0044] The vector obtained after being calculated by the MoE feedforward layer is then fed into the decoder after passing through a transformer regularization layer.

[0045] The decoder uses a standard Transformer structure, receives the encoder output, and obtains a new 32-dimensional vector y by calling the standard transformer module for computation. This vector is then input into a linear network for linear transformation.

[0046] The formula for calculating a linear network is:

[0047] M = Wy;

[0048] Where W is the parameter of the linear network, y is the input of the linear network, and through linear transformation, the vector y is transformed into a 3×50×155 image matrix M, and then M is input into the confidence filter.

[0049] The core component of the confidence filter is a confidence function that operates on the output of a linear layer. The output of the linear layer is a 3×50×155 image matrix M, where the 50 pixel values ​​in the j-th row are considered as 50 predictions for the j-th symbol, and L is the length of the encoded sequence. The confidence function is calculated using the following formula:

[0050]

[0051] Where P(·) represents the probability distribution of each color in the j-th row of the image matrix M, max[·] represents taking the maximum element, L is the total number of rows of the image, and the threshold of the confidence function is 0.85. For image matrices M that exceed this threshold, the color with the highest frequency in each row is taken, converted into the corresponding base, and a read segment of length L is obtained, thus completing the read segment reconstruction. For prediction results with a confidence score lower than 0.85, a majority vote is performed on each row, the color with the highest frequency in each row is taken, and a 1×L image M1 is generated. M1 is fed back to the input for iterative update.

[0052] Preferably, the process of replacing the column corresponding to the read segment with the largest deviation in the input image with the updated image, re-inputting it into the DNAMoE model for iterative optimization until the confidence level reaches the target or the maximum number of iterations is reached, and outputting the final reconstruction result includes:

[0053] Replace the column corresponding to the read segment with the largest deviation from the reference length L in the input image with M1, and re-input it into the DNAMoE model for iteration until the confidence of the image generated by the DNAMoE model exceeds the threshold of 0.85. Then, take the color with the highest frequency in each row of the image generated by the DNAMoE model, convert it into the corresponding base, and obtain a read segment of length L, thus completing the read segment reconstruction.

[0054] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0055] This invention discloses a DNA sequencing read reconstruction method and system based on a Hybrid Expert (MoE) model. This method transforms the read reconstruction problem into an image denoising problem. First, the DNA sequencing reads are clustered. Then, the A, T, C, and G bases of the DNA reads in each cluster are converted into black, red, blue, and green pixel values, respectively, thus converting the clusters into an image. The image is then input into the DNAMoE reconstruction model for denoising. After denoising, each row of the image undergoes majority voting to select the color with the highest frequency in each row. Finally, the color with the highest frequency in each row is converted into its corresponding base to achieve read reconstruction. This invention effectively handles heterogeneous errors such as insertions, deletions, and substitutions generated during sequencing. On the high-error-rate Nanopore sequencing platform, the reconstruction success rate can reach 92.30%, and it does not rely on traditional error correction codes, reducing DNA synthesis costs and significantly improving the reliability and efficiency of DNA storage data retrieval. Attached Figure Description

[0056] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a schematic diagram of a DNA sequencing read reconstruction method based on a hybrid expert model, according to an embodiment of the present invention. Detailed Implementation

[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0060] Example 1

[0061] like Figure 1 As shown, this invention provides a DNA sequencing read reconstruction method based on a hybrid expert model, the method comprising:

[0062] The raw DNA sequencing reads are clustered, and the clustered reads are converted into image form through nucleotide-color mapping. The length is normalized and the cluster size is adjusted to obtain a standardized 3-channel image.

[0063] The standardized 3-channel image is input into the DNAMoE model to obtain the initial reconstruction result. If the confidence of the initial reconstruction result is lower than the set threshold, the confidence filter is used to generate an updated image by majority voting on the low confidence region.

[0064] Replace the column corresponding to the read segment with the largest deviation in the input image with the updated image, and then re-input it into the DNAMoE model for iterative optimization until the confidence level is met or the maximum number of iterations is reached, and then output the final reconstruction result.

[0065] In this embodiment, the method for clustering raw DNA sequencing reads, converting the clustered reads into images using nucleotide-color mapping, and then performing length normalization and cluster size adjustment to obtain standardized 3-channel images includes:

[0066] The original DNA sequencing reads are clustered according to whether the first 12 bases are the same, that is, sequencing reads with the same first 12 bases are clustered into one cluster;

[0067] After clustering, the sequencing reads of varying lengths in each cluster are normalized. Sequencing reads with a length not exceeding 155 are padded with the character N, while sequencing reads with a length greater than 155 are truncated by removing excess bases at the end. The number of sequencing reads in each cluster is also normalized. For clusters with fewer than 50 sequencing reads, the sequencing reads in the cluster are randomly copied until the number of reads equals 50. For clusters with more than 50 sequencing reads, the 50 reads with a length closest to 155 are retained, and the remaining reads are deleted.

[0068] The four bases of the sequencing reads in each cluster and the N-character padding are mapped to specific colors: A-black, T-red, C-blue, G-green, and N-white, thus converting the clusters into an image with a size of 3×50×155.

[0069] In this embodiment, the DNAMoE model includes an encoder, a decoder, a linear network, and a confidence filter;

[0070] The encoder consists of six stacked improved transformer modules. Specifically, the improvement involves replacing the forward feedback layer of the transformer module with a MoE-enhanced feedforward layer, which includes eight expert networks {E1, E2, ... E...}. i ...,E8} and 1 router, each expert is a linear network E i , with parameter W iThe router dynamically selects two expert networks to activate. The dynamic routing algorithm is as follows:

[0071] R(x) = TopK(Softmax(x·W) r ));

[0072] Where x is the vector obtained after the image passes through the transformer regularization layer, and R(·) represents the routing module, which implements the linear transformation of x, with parameters W. r Then input the Softmax activation function and the sparse gating function T. OP K(·) selects two experts based on the two largest values ​​in the softmax function. The weights of unselected experts are set to zero. The entire MoE feedforward layer is described as follows:

[0073]

[0074] Where E i (x)=W i ·x, n represent the total number of expert networks. The vector calculated by the MoE feedforward layer is then passed through a transformer regularization layer before being input into the decoder;

[0075] The decoder uses a standard Transformer structure, receives the encoder output, performs calculations by calling the standard Transformer module, obtains a new 32-dimensional vector y, and inputs it into a linear network for linear transformation.

[0076] The formula for calculating a linear network is:

[0077] M = W·y;

[0078] Where W is the parameter of the linear network, y is the input of the linear network, and through linear transformation, the vector y is transformed into a 3×50×155 image matrix M, and then M is input into the confidence filter.

[0079] The core component of the confidence filter is a confidence function that operates on the output of a linear layer. The output of the linear layer is a 3×50×155 image matrix M, where the 50 pixel values ​​in the j-th row are considered as 50 predictions for the j-th symbol, and L is the length of the encoded sequence. The confidence function is calculated using the following formula:

[0080]

[0081] Where P(·) represents the probability distribution of each color in the j-th row of the image matrix M, max[·] represents taking the maximum element, L is the total number of rows of the image, and the threshold of the confidence function is 0.85. For image matrices M that exceed this threshold, the color with the highest frequency in each row is taken, converted into the corresponding base, and a read segment of length L is obtained, thus completing the read segment reconstruction. For prediction results with a confidence score lower than 0.85, a majority vote is performed on each row, the color with the highest frequency in each row is taken, and a 1×L image M1 is generated. M1 is fed back to the input for iterative update.

[0082] In this embodiment, the method of replacing the column corresponding to the read segment with the largest deviation in the input image with the updated image and then re-inputting it into the DNAMoE model for iterative optimization until the confidence level reaches the target or the maximum number of iterations is reached, and then outputting the final reconstruction result includes:

[0083] Replace the column corresponding to the read segment with the largest deviation from the reference length L in the input image with M1, and re-input it into the DNAMoE model for iteration until the confidence of the image generated by the DNAMoE model exceeds the threshold of 0.85. Then, take the color with the highest frequency in each row of the image generated by the DNAMoE model, convert it into the corresponding base, and obtain a read segment of length L, thus completing the read segment reconstruction.

[0084] In this embodiment, model training and inference:

[0085] 1. Training set: Construct a mixed simulated dataset containing 6 million reads, with an error rate of 2%-15% and sequence length of 110-150bp, and divide it into training and test sets in an 8:2 ratio;

[0086] 2. Training parameters: Adam optimizer is used, learning rate is 5e-5, loss function is mean squared error, and training lasts for 100 epochs;

[0087] 3. Inference process: The preprocessed image is input into the trained model, and the encoder and decoder process it to obtain the initial result. If the confidence level meets the standard, the result is output; otherwise, it is output after iterative optimization.

[0088] Tests showed that the present invention achieved a reconstruction success rate of 92.30% on the Srinivasavaradhan dataset (Nanopore platform, error rate 5.90%) and 99.95% on the Illumina platform dataset, with a processing time of 3.28 microseconds per cluster, outperforming existing technologies.

[0089] This invention offers the following advantages: 1. It preserves the spatiotemporal semantic features of DNA reads using an image representation method, and combines this with an expert network based on the MoE architecture to handle different error modes, significantly improving the ability to handle heterogeneous errors such as insertions and deletions, achieving a reconstruction success rate of 92.30% on high error rate datasets; 2. It eliminates 20-30% of logical redundancy by eliminating reliance on traditional error correction codes, reducing DNA synthesis costs; 3. Through an iterative optimization mechanism using a confidence filter, it maintains high reliability even with small cluster sizes and high contamination, and boasts fast processing speed, averaging 3.28 microseconds per cluster, thus improving the efficiency and practicality of DNA storage data retrieval.

[0090] Example 2

[0091] The present invention also provides a DNA sequencing read reconstruction system based on a hybrid expert model. The system is used to implement the method described in Embodiment 1. The system includes: a data preprocessing module, a read reconstruction module, and an iterative optimization module.

[0092] The data preprocessing module is used to cluster the raw DNA sequencing reads, convert the clustered reads into image form through nucleotide-color mapping, and perform length normalization and cluster size adjustment to obtain a standardized 3-channel image.

[0093] The segment reconstruction module is used to input the standardized 3-channel image into the DNAMoE model to obtain the initial reconstruction result. If the confidence of the initial reconstruction result is lower than the set threshold, the confidence filter is used to generate an updated image by majority voting on the low confidence region.

[0094] The iterative optimization module is used to replace the column corresponding to the read segment with the largest deviation in the input image with the updated image and then re-input it into the DNAMoE model for iterative optimization until the confidence level reaches the target or the maximum number of iterations is reached, and then output the final reconstruction result.

[0095] In this embodiment, the data preprocessing module includes: a clustering unit, an adjustment unit, and a transformation unit;

[0096] Clustering units are used to cluster raw DNA sequencing reads based on whether the first 12 bases are the same, that is, to group sequencing reads with the same first 12 bases into a cluster;

[0097] The adjustment unit is used to normalize the sequencing reads of varying lengths in each cluster after clustering. That is, sequencing reads with a length not exceeding 155 are padded with the character N, and sequencing reads with a length greater than 155 are truncated with excess bases at the end. The number of sequencing reads in each cluster is normalized. For clusters with fewer than 50 sequencing reads, sequencing reads in the cluster are randomly copied until the number of reads is equal to 50. For clusters with more than 50 sequencing reads, the 50 reads with a length closest to 155 are retained, and the rest are deleted.

[0098] The conversion unit is used to map the four bases and the N-character filling in the sequencing reads in each cluster to specific colors, namely A-black, T-red, C-blue, G-green, and N-white, thereby converting the cluster into an image with a size of 3×50×155.

[0099] In this embodiment, the DNAMoE model includes an encoder, a decoder, a linear network, and a confidence filter;

[0100] The encoder consists of six stacked improved transformer modules. Specifically, the improvement involves replacing the forward feedback layer of the transformer module with a MoE-enhanced feedforward layer, which includes eight expert networks {E1, E2, ... E...}. i ...,E8} and 1 router, each expert is a linear network E i The parameter is W i The router dynamically selects two expert networks to activate. The dynamic routing algorithm is as follows:

[0101] R(x) = TopK(Softmax(x·W) r ));

[0102] Where x is the vector obtained after the image passes through the transformer regularization layer, and R(·) represents the routing module, which implements the linear transformation of x, with parameters W. r Then input the Softmax activation function and the sparse gating function T. OP K(·) selects two experts based on the two largest values ​​in the softmax function. The weights of unselected experts are set to zero. The entire MoE feedforward layer is described as follows:

[0103]

[0104] Where E i (x)=W i ·x, n represent the total number of expert networks;

[0105] The vector obtained after being calculated by the MoE feedforward layer is then fed into the decoder after passing through a transformer regularization layer.

[0106] The decoder uses a standard Transformer structure, receives the encoder output, and obtains a new 32-dimensional vector y by calling the standard transformer module for computation. This vector is then input into a linear network for linear transformation.

[0107] The formula for calculating a linear network is:

[0108] M = W·y;

[0109] Where W is the parameter of the linear network, y is the input of the linear network, and through linear transformation, the vector y is transformed into a 3×50×155 image matrix M, and then M is input into the confidence filter.

[0110] The core component of the confidence filter is a confidence function that operates on the output of a linear layer. The output of the linear layer is a 3×50×155 image matrix M, where the 50 pixel values ​​in the j-th row are considered as 50 predictions for the j-th symbol, and L is the length of the encoded sequence. The confidence function is calculated using the following formula:

[0111]

[0112] Where P(·) represents the probability distribution of each color in the j-th row of the image matrix M, max[·] represents taking the maximum element, L is the total number of rows of the image, and the threshold of the confidence function is 0.85. For image matrices M that exceed this threshold, the color with the highest frequency in each row is taken, converted into the corresponding base, and a read segment of length L is obtained, thus completing the read segment reconstruction. For prediction results with a confidence score lower than 0.85, a majority vote is performed on each row, the color with the highest frequency in each row is taken, and a 1×L image M1 is generated. M1 is fed back to the input for iterative update.

[0113] In this embodiment, the process of replacing the column corresponding to the read segment with the largest deviation in the input image with the updated image, re-inputting it into the DNAMoE model for iterative optimization until the confidence level reaches the target or the maximum number of iterations is reached, and then outputting the final reconstruction result includes:

[0114] Replace the column corresponding to the read segment with the largest deviation from the reference length L in the input image with M1, and re-input it into the DNAMoE model for iteration until the confidence of the image generated by the DNAMoE model exceeds the threshold of 0.85. Then, take the color with the highest frequency in each row of the image generated by the DNAMoE model, convert it into the corresponding base, and obtain a read segment of length L, thus completing the read segment reconstruction.

[0115] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A DNA sequencing read reconstruction method based on a hybrid expert model, characterized in that, The method includes: The raw DNA sequencing reads are clustered, and the clustered reads are converted into image form through nucleotide-color mapping. The length is normalized and the cluster size is adjusted to obtain a standardized 3-channel image. The standardized 3-channel image is input into the DNAMoE model to obtain the initial reconstruction result. If the confidence of the initial reconstruction result is lower than the set threshold, the confidence filter is used to generate an updated image by majority voting on the low confidence region. Replace the column corresponding to the read segment with the largest deviation in the input image with the updated image, and then re-input it into the DNAMoE model for iterative optimization until the confidence level reaches the target or the maximum number of iterations is reached, and then output the final reconstruction result. The DNAMoE model includes an encoder, a decoder, a linear network, and a confidence filter; The encoder consists of six stacked improved transformer modules. Specifically, the improvement involves replacing the forward feedback layer of the transformer module with a MoE-enhanced feedforward layer, which includes eight expert networks. E 1, E 2, ... E i , ..., E 8} and 1 router, each expert is a linear network E i The parameters are W i The router dynamically selects two expert networks to activate. The dynamic routing algorithm is as follows: ; in, x It is the vector obtained after the image has passed through the transformer regularization layer. R (·) indicates the routing module, which implements... x A linear transformation with parameters as W r Then input the Softmax activation function and the sparse gating function. T OP K (·)according to softmax The two largest values ​​in the function select the corresponding two experts, and the weights of the unselected experts are set to zero. The entire MoE feedforward layer is described as follows: ; in , n Indicates the total number of expert networks; The vector obtained after being calculated by the MoE feedforward layer is then fed into the decoder after passing through a transformer regularization layer. The decoder uses a standard Transformer architecture, receives the encoder output, and obtains a new 32-dimensional vector by calling the standard Transformer module for computation. y And input it into a linear network for linear transformation; The formula for calculating a linear network is: ; in, W These are the parameters of a linear network. y As the input to a linear network, the vector is transformed through a linear transformation. y Transformed into a 3×50×155 image matrix M Next M Input to the confidence filter; The core component of the confidence filter is a confidence function that operates on the output of a linear layer, which is a 3×50×155 image matrix. M , of which j The 50 pixel values ​​of the row are considered as the first... j 50 prediction results for each symbol, and L Given the length of the encoded sequence, the confidence function is calculated using the following formula: ; in, P (·) represents the image matrix M No. j The probability distribution of each color in the row, where max[·] represents taking the maximum element. L The total number of rows in the image is given, and the confidence function threshold is 0.

85. Image matrices exceeding this threshold... M Take the most frequent color in each row, convert it to the corresponding base, and obtain a length of... L The reading segment is then reconstructed; for prediction results with a confidence score below 0.85, a majority vote is performed on each line, and the color with the highest frequency in each line is selected to generate a 1× L Image M 1 ,Will M 1 Feedback is sent to the input end for iterative updates.

2. The method according to claim 1, characterized in that, Methods for clustering raw DNA sequencing reads, converting the clustered reads into images using nucleotide-color mapping, and then performing length normalization and cluster size adjustment to obtain standardized 3-channel images include: The original DNA sequencing reads are clustered according to whether the first 12 bases are the same, that is, sequencing reads with the same first 12 bases are clustered into one cluster; After clustering, the sequencing reads of varying lengths in each cluster are normalized. Sequencing reads with a length not exceeding 155 are padded with the character N, while sequencing reads with a length greater than 155 are truncated by removing excess bases at the end. The number of sequencing reads in each cluster is also normalized. For clusters with fewer than 50 sequencing reads, the sequencing reads in the cluster are randomly copied until the number of reads equals 50. For clusters with more than 50 sequencing reads, the 50 reads with a length closest to 155 are retained, and the remaining reads are deleted. The four bases of the sequencing reads in each cluster and the N-character padding are mapped to specific colors: A-black, T-red, C-blue, G-green, and N-white, thus converting the clusters into an image with a size of 3×50×155.

3. The method according to claim 1, characterized in that, The method of replacing the column corresponding to the read segment with the largest deviation in the input image with the updated image, and then re-inputting it into the DNAMoE model for iterative optimization until the confidence level reaches the target or the maximum number of iterations is reached, and then outputting the final reconstruction result, includes: use M 1 Replace the input image with the reference length L The column corresponding to the read with the largest deviation is re-input into the DNAMoE model for iteration until the confidence level of the image generated by the DNAMoE model exceeds the threshold of 0.

85. Then, the most frequent color in each row of the image generated by the DNAMoE model is taken and converted into the corresponding base, resulting in a length of [length missing]. L The reading segment is then used to reconstruct the reading segment.

4. A DNA sequencing read reconstruction system based on a hybrid expert model, the system being used to implement the method described in any one of claims 1-3, characterized in that, The system includes: a data preprocessing module, a segment reconstruction module, and an iterative optimization module; The data preprocessing module is used to cluster the raw DNA sequencing reads, convert the clustered reads into image form through nucleotide-color mapping, and perform length normalization and cluster size adjustment to obtain a standardized 3-channel image. The read segment reconstruction module is used to input a standardized 3-channel image into the DNAMoE model to obtain an initial reconstruction result. If the confidence of the initial reconstruction result is lower than a set threshold, a confidence filter is used to perform majority voting on the low-confidence region to generate an updated image. The iterative optimization module is used to replace the column corresponding to the read segment with the largest deviation in the input image with the updated image and then re-input it into the DNAMoE model for iterative optimization until the confidence level reaches the standard or the maximum number of iterations is reached, and then output the final reconstruction result.

5. The system according to claim 4, characterized in that, The data preprocessing module includes: a clustering unit, an adjustment unit, and a transformation unit; The clustering unit is used to cluster the original DNA sequencing reads according to whether the first 12 bases are the same, that is, to cluster the sequencing reads with the same first 12 bases into one cluster; The adjustment unit is used to normalize the sequencing reads of varying lengths in each cluster after clustering. Specifically, sequencing reads with a length not exceeding 155 are padded with the character N, and sequencing reads with a length greater than 155 are truncated by removing excess bases at the end. The number of sequencing reads in each cluster is also normalized. For clusters with fewer than 50 sequencing reads, the sequencing reads in the cluster are randomly copied until the number of reads equals 50. For clusters with more than 50 sequencing reads, the 50 reads with a length closest to 155 are retained, and the remaining reads are deleted. The conversion unit is used to map the four bases and the N-character filling in the sequencing reads in each cluster to specific colors, namely A-black, T-red, C-blue, G-green, and N-white, thereby converting the cluster into an image form and obtaining an image of size 3×50×155.

6. The system according to claim 4, characterized in that, The DNAMoE model includes an encoder, a decoder, a linear network, and a confidence filter; The encoder consists of six stacked improved transformer modules. Specifically, the improvement involves replacing the forward feedback layer of the transformer module with a MoE-enhanced feedforward layer, which includes eight expert networks. E 1, E 2, ... E i , ..., E 8} and 1 router, each expert is a linear network E i The parameters are W i The router dynamically selects two expert networks to activate. The dynamic routing algorithm is as follows: ; in, x It is the vector obtained after the image has passed through the transformer regularization layer. R (·) indicates the routing module, which implements... x A linear transformation with parameters as W r Then input the Softmax activation function and the sparse gating function. T OP K (·)according to softmax The two largest values ​​in the function select the corresponding two experts, and the weights of the unselected experts are set to zero. The entire MoE feedforward layer is described as follows: ; in , n Indicates the total number of expert networks; The vector obtained after being calculated by the MoE feedforward layer is then fed into the decoder after passing through a transformer regularization layer. The decoder uses a standard Transformer architecture, receives the encoder output, and obtains a new 32-dimensional vector by calling the standard Transformer module for computation. y And input it into a linear network for linear transformation; The formula for calculating a linear network is: ; in, W These are the parameters of a linear network. y As the input to a linear network, the vector is transformed through a linear transformation. y Transformed into a 3×50×155 image matrix M Next M Input to the confidence filter; The core component of the confidence filter is a confidence function that operates on the output of a linear layer, which is a 3×50×155 image matrix. M , of which j The 50 pixel values ​​of the row are considered as the first... j 50 prediction results for each symbol, and L Given the length of the encoded sequence, the confidence function is calculated using the following formula: ; in, P (·) represents the image matrix M No. j The probability distribution of each color in the row, where max[·] represents taking the maximum element. L The total number of rows in the image is given, and the confidence function threshold is 0.

85. Image matrices exceeding this threshold... M Take the most frequent color in each row, convert it to the corresponding base, and obtain a length of... L The reading segment is then reconstructed; for prediction results with a confidence score below 0.85, a majority vote is performed on each line, and the color with the highest frequency in each line is selected to generate a 1× L Image M 1 ,Will M 1 Feedback is sent to the input end for iterative updates.

7. The system according to claim 4, characterized in that, The process of replacing the column corresponding to the read segment with the largest deviation in the input image with the updated image, and then re-inputting it into the DNAMoE model for iterative optimization until the confidence level reaches the target or the maximum number of iterations is reached, and finally outputting the final reconstruction result, includes: use M 1 Replace the input image with the reference length L The column corresponding to the read with the largest deviation is re-input into the DNAMoE model for iteration until the confidence level of the image generated by the DNAMoE model exceeds the threshold of 0.

85. Then, the most frequent color in each row of the image generated by the DNAMoE model is taken and converted into the corresponding base, resulting in a length of [length missing]. L The reading segment is then used to reconstruct the reading segment.

Citation Information

Patent Citations

  • DNA (Deoxyribonucleic Acid) storage data reconstruction method and system based on non-redundant Debrueine graph

    CN118782143A

  • SNP and INDEL detection method based on deep learning and long-reading sequencing

    CN119028431A