A biological nanopore signal recognition method and storage medium

By combining Fourier transform and convolutional neural network to identify biological nanopore signals, the problems of high computational burden and poor recognition effect in existing technologies are solved, and more efficient base recognition and DNA sequence recognition are achieved.

CN117076929BActive Publication Date: 2025-12-09河南省华之源生物技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311099563.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-12-09
Estimated Expiration
2043-08-29

AI Technical Summary

Technical Problem

Existing methods for identifying signals from biological nanopores, such as convolutional neural networks and recurrent neural networks, suffer from high computational burden, low computational efficiency, and data distortion when identifying bases, resulting in poor recognition performance.

Method used

By combining Fourier transform models and convolutional neural networks, standard signal data is used as the training set to input into a preset training model. Batch normalization, convolutional layer processing, Fourier transform, max pooling layer processing, and fully connected layer processing are performed. Combined with the beam search algorithm, base sequence information is decoded, thereby improving the signal recognition effect.

Benefits of technology

By combining Fourier transform and convolutional neural networks, bases can be identified more effectively, improving the accuracy of DNA sequence identification and the generalization ability of the model, while reducing computational burden and time cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117076929B_ABST
    Figure CN117076929B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of biotechnology, and particularly relates to a biological nanopore signal recognition method and a storage medium. The method comprises the following steps: inputting standard signal data with classification ATCG as execution data of a training set into a preset training model for training, and converting feature values after data normalization into a corresponding feature matrix; processing the feature matrix according to a convolution layer to generate a convolution matrix in a time domain; performing Fourier transform on the convolution matrix to generate a target feature matrix in a frequency domain; performing an activation operation on the target feature matrix according to a preset activation function to generate a corresponding nonlinear feature matrix; then performing inverse Fourier transform to generate a corresponding time domain feature; processing the time domain feature through a full connection layer and an output layer to output a corresponding target feature set; and decoding the target feature set according to a beam search algorithm to generate corresponding target base sequence information. The technical scheme can improve the recognition effect of biological nanopore signals.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of biotechnology, and in particular to a biological nanopore signal recognition method and a storage medium. BACKGROUND

[0002] Biological nanopore signal recognition refers to the process of converting the electrical signal in the biological nanopore into information that can be analyzed and recognized. A biological nanopore is a small pore structure, usually composed of proteins or other materials, with a nanoscale size. When molecules or ions in the solution pass through the biological nanopore, it will cause a change in the electric current, which can be recorded by electronic devices and used for signal analysis and recognition.

[0003] Due to the real-time and rapid characteristics of biological nanopore sequencing, sequencing can be performed directly at the collection point, and sequence information can be obtained in real time for species classification and identification, completing the rapid identification of microorganisms. The principle is that the nanopore protein is fixed on a polymer membrane and immersed in an electrolyte solution. When a constant voltage is applied to the system, electrolyte ions will pass through the nanopore and generate an electric current on both sides of the membrane. Under the action of the motor protein, single-stranded DNA or RNA will move from the negative side (cis) to the positive side (trans) and generate an electric current signal. By recording the current signal data and performing base conversion of the signal data, the nucleic acid sequence can be identified.

[0004] In practical applications, early signal recognition was mainly achieved by using a hidden Markov model, but it cannot detect homopolymer repeat sequences and is gradually replaced by convolutional neural network (CNN) and recurrent neural network (RNN) models. The strategy of recurrent neural network for base recognition is diversified, but according to the characteristics of recurrent neural network, the previous input has a superimposed effect on the next input to further estimate the feature value, thereby greatly increasing the workload of model analysis and data operation, causing the server to run with a heavy burden, increasing the cost and time cost, and making the data prone to distortion. Convolutional neural network uses convolution to handle short-range dependencies, extracts features through convolution layers, and reduces the number of parameters through pooling layers, so that the running burden is smaller and the time cost is reduced. However, despite this, the convolution calculation is very inefficient, and the sliding window requires a lot of calculation and limits the size of the filter. From the above, the signal recognition effect of the convolutional neural network (CNN) and the recurrent neural network (RNN) model is poor. SUMMARY

[0005] In order to improve the recognition effect of biological nanopore signals, the present application provides a biological nanopore signal recognition method and a storage medium.

[0006] In a first aspect, the present application provides a biological nanopore signal recognition method, comprising the following steps:

[0007] The standard signal data with classification ATCG is input into a preset training model as execution data of a training set, and initial parameters of the preset training model are customized, the standard signal data including current signals corresponding to known DNA sequences, and the base information represented by each signal in the ATCG is A: adenine deoxyribonucleotide, T: thymine deoxyribonucleotide, C: cytosine deoxyribonucleotide, G: guanine deoxyribonucleotide, and B: blank signal;

[0008] The standard signal data input each time is batch normalized to generate corresponding feature values, and the feature values are converted into a corresponding feature matrix;

[0009] The feature matrix is processed according to a convolution layer to generate a convolution matrix in a time domain;

[0010] The convolution matrix is subjected to Fourier transform to generate a target feature matrix in a frequency domain;

[0011] The target feature matrix is subjected to an activation operation according to a preset activation function to generate a corresponding nonlinear feature matrix;

[0012] The nonlinear feature matrix is processed according to a maximum pooling layer to obtain a corresponding target feature;

[0013] The target feature is subjected to inverse Fourier transform to generate a corresponding time domain feature;

[0014] The time domain feature is processed through a full connection layer and an output layer to output a corresponding target feature set;

[0015] The target feature set is decoded according to a beam search algorithm to generate corresponding target base sequence information.

[0016] By using the above technical solution, according to the combined application of the Fourier transform model and the convolution neural network, the real-time generated current signal can be subjected to real signal recognition and feature value extraction for Fourier transform, and the base can be better recognized, so that the advantages of the convolution neural network model can be maximized and its disadvantages can be weakened, and the recognition effect of the biological nanopore signal is improved.

[0017] Optionally, the standard signal data includes original signals S of T time points, S = [S1, S2, S3..., S T ], S corresponds to a DNA sequence label y of K bases, y = [y1, y2, y3,..., y K ], and each signal base y i∈ [A, T, C, G], the data in the training set is {(S(1), y(1)), (S(2), y(2)), (S(3), y(3))..., (S(T), y(k))}.

[0018] By adopting the technical scheme, the convolutional neural network can learn the complex relationship between the DNA sequence and the current signal through training, so that the network can accurately identify new unknown DNA sequences, thereby improving the accuracy of DNA sequence identification.

[0019] Optionally, the standard signal data is normalized to generate a corresponding normalized input signal s', The s represents the value of the original signal, The s represents the value of the original signal, and std(s) represents the standard deviation of the original signal of the entire reading.

[0020] By adopting the technical scheme, normalization can make the weights of different features more balanced, reduce the deviation between features, and help improve the generalization ability of the model for new samples.

[0021] Optionally, the convolutional layer includes 8 convolution kernels, each of which has a size of 5*5, a stride of 1, a boundary padding of 2, a bias vector of 1, and a channel number of 256.

[0022] By adopting the technical scheme, multiple convolution kernels are used, and the network can simultaneously extract multiple local features of the input signal. Each convolution kernel can learn different features, thereby increasing the perception ability of the network for the input signal and improving the recognition ability for complex patterns and structures.

[0023] Optionally, according to the biological nanopore signal recognition method according to claim 1, the input of the convolutional layer is a feature map with K channels, each channel representing a feature dimension of the input data, and the convolution operation defined on the K channel input with L*m filter, n*p step and S output channel is: Output(i,j,s)=∑ di<l,dj<m,q<k Input(i*n+di,j*p+dj,q)*Filter(di,dj,q,s).

[0024] By adopting the technical scheme, the convolution operation can extract local features in the input data by convolving the input feature map with the filter, and each filter can learn different features, so that multiple different feature maps can be obtained, which helps the network to capture various features in the input data and improve the representation ability of the model.

[0025] Optionally, the batch normalization processing procedure is as follows: X represents the current input matrix, γ and β represent the scaling and translation parameters to be learned in the model, the parameters are adjusted during the training process, and the parameters are automatically adjusted in the model, are not fixed parameters, and ∈ is a small quantity introduced to prevent division by zero.

[0026] By adopting the above technical solution, the batch normalization can reduce the covariate shift problem of the intermediate layer of the network, that is, the change of the input distribution will cause the instability of the network training, and the normalization can reduce the influence, so that the network is more stable.

[0027] Optionally, the preset activation function is a ReLU function: ReLU(X) = max(X, 0).

[0028] By adopting the above technical solution, the ReLU function is a nonlinear activation function, which can introduce nonlinear transformation, so that the neural network can learn and represent more complex nonlinear relationships, thereby helping to improve the expression ability of the neural network, so that it can adapt to more complex data distribution and tasks.

[0029] Optionally, in the process of training the preset training model, a loss function is used to measure the difference between the true label and the predicted probability, and the loss function is defined as: Y and P represent the probability distribution parameters calculated in the model.

[0030] By adopting the above technical solution, the loss function plays a key role in the gradient descent process. By calculating the gradient of the loss function with respect to the model parameters, the gradient descent algorithm can be used to update the model parameters, and the value of the loss function is iteratively reduced. In this way, the model can be gradually optimized, and the prediction accuracy can be improved.

[0031] Optionally, the gradient descent iterative method is used to update the parameters of the preset training model, the gradient is calculated using the stochastic gradient descent, the parameters are updated in the form of back propagation, and the corresponding network parameters are obtained and saved as the final preset training model.

[0032] By adopting the above technical solution, the gradient descent iterative method can update the parameters of the model according to the gradient information of the loss function, thereby optimizing the model. The gradient descent method can adjust the parameters in the direction of the fastest decrease of the loss function, so that the model can better fit the training data.

[0033] In a second aspect, the present application provides a computer readable storage medium, which adopts the following technical solution:

[0034] A computer readable storage medium, wherein computer instructions are stored in the computer readable storage medium, and the computer instructions are loaded and executed by a processor, and a biological nanopore signal recognition method is adopted.

[0035] By adopting the technical scheme, the computer instructions of the biological nanopore signal recognition method are generated and stored in the computer readable storage medium to be loaded and executed by the processor, and the computer readable storage medium facilitates the readability and storage of the computer instructions.

[0036] In summary, according to the combination application of the Fourier transform model and the convolutional neural network, the real-time generated current signal can be recognized and the characteristic value can be extracted for Fourier transform, and then the bases can be better recognized, so that the advantages of the convolutional neural network model can be maximized and the disadvantages can be weakened, and the recognition effect of the biological nanopore signal is improved. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 is a flowchart of steps S101 to S109 in the biological nanopore signal recognition method of the application.

[0038] Figure 2 is a main flow logic block diagram of the biological nanopore signal recognition method of the application. DETAILED DESCRIPTION

[0039] The following will be described in detail in combination with the accompanying Figures 1-2 The application will be further described in detail.

[0040] The application discloses a biological nanopore signal recognition method, as shown in the accompanying drawings, comprising the following steps: Figure 1 The application discloses a biological nanopore signal recognition method, as shown in the accompanying drawings, comprising the following steps:

[0041] S101. The standard signal data classified as ATCG is input into a preset training model as execution data of a training set for training, and the initial parameters of the preset training model are defined, the standard signal data includes the current signal corresponding to the known DNA sequence, and the base information represented by each signal in ATCG is A: adenine deoxyribonucleotide, T: thymine deoxyribonucleotide, C: cytosine deoxyribonucleotide, G: guanine deoxyribonucleotide, and B: blank signal;

[0042] S102. Batch normalization processing is performed on each input standard signal data to generate corresponding characteristic values, and the characteristic values are converted into corresponding feature matrices;

[0043] S103. The feature matrix is processed according to the convolution layer to generate a convolution matrix in the time domain;

[0044] S104. Perform Fourier transform on the convolution matrix to generate a target feature matrix in the frequency domain;

[0045] S105. Perform activation operation on the target feature matrix according to a preset activation function to generate a corresponding nonlinear feature matrix;

[0046] S106. Process the nonlinear feature matrix according to a max-pooling layer to obtain a corresponding target feature;

[0047] S107. Perform inverse Fourier transform on the target feature to generate a corresponding time-domain feature;

[0048] S108. The time-domain feature is processed through a fully connected layer and an output layer to output a corresponding target feature set;

[0049] S109. Decode the target feature set according to a beam search algorithm to generate corresponding target base sequence information.

[0050] In step S101, the preset training model refers to the model structure defined in advance before starting training. Through learning and optimization of training data, a model capable of predicting or classifying unknown data is finally obtained.

[0051] Among them, the preset training model is designed as a classification model, which is used to divide the input current signal into a category in ATCG. Convolutional neural network (CNN) in deep learning can be used to process this classification task. CNN can effectively extract features in current signal and perform classification.

[0052] Secondly, in the training process, the initial parameters of the preset training model need to be defined. These initial parameters can be set using random initialization, or set according to domain knowledge and experience. Through back propagation and gradient descent in the training process, the model will gradually adjust these parameters according to the training data, so that the model can better fit the training data and obtain more accurate classification results.

[0053] Further, the standard signal data includes the current signal corresponding to the known DNA sequence. Each base information corresponds to a current signal, in which A represents adenine deoxyribonucleotide, T represents thymine deoxyribonucleotide, C represents cytosine deoxyribonucleotide, G represents guanine deoxyribonucleotide, and B: blank signal represents a blank signal detected without base. Through training the model, the model can automatically extract these features from the current signal, and then perform classification.

[0054] In step S102, batch normalization (BN) is a technique for neural networks that normalizes the input data during training to speed up the convergence of training and improve the robustness of the model.

[0055] Specifically, for the input standard signal data, the mean and variance of each feature dimension can be calculated, i.e., the mean and variance of each feature dimension are calculated; then, the value of each feature dimension is subtracted from the mean and divided by the variance to obtain the normalized value, i.e., each feature dimension is normalized; then the normalized value is scaled and translated to obtain the final feature value. Two learnable parameters are used here, namely the scaling factor and the translation factor.

[0056] Secondly, the process of converting the feature values calculated above into a feature matrix is to rearrange the feature values into a matrix form in a certain way. The specific way can be defined according to specific needs. For example, the feature matrix can be organized according to the number of channels and the number of samples of the input standard signal data.

[0057] In addition, each element in the feature matrix represents the value of a certain feature in a certain sample. The feature matrix can be used as the input of subsequent neural network models or other machine learning models as the feature representation of the model. By processing and analyzing the feature matrix, the relationship and pattern between features can be extracted, and further classification, prediction or other tasks can be performed.

[0058] In step S103, the convolution layer is a core layer in convolutional neural networks (CNN) for extracting the spatial relationship of input features. For the input feature matrix, the convolution layer will perform convolution operation with a set of learnable convolution kernels to generate a convolution matrix in the time domain.

[0059] Specifically, the convolution kernel is a set of small weight matrices, each with its own weight parameters. The size of the convolution kernel is generally smaller than the input feature matrix, and usually has a fixed size (such as 3x3, 5x5, etc.).

[0060] where the convolution layer performs convolution operation on each convolution kernel and the input feature matrix. The convolution operation is obtained by sliding the convolution kernel over the input feature matrix and calculating the sum of the products of the convolution kernel and the corresponding positions of the input feature matrix. This sum of products is placed in the corresponding position of the convolution matrix in the time domain.

[0061] Secondly, after the convolution operation, a bias term is added to each element in the convolution matrix, and it is activated by an activation function. This can introduce nonlinearity and increase the expressive power of the model. The convolution matrix in the time domain is the result of the convolution layer output, which represents the convolution result of the input features at different positions with the convolution kernel. The convolution matrix in the time domain can be regarded as the result of extracting and encoding the spatial information of the input features. Through the convolution operation, the convolution layer can capture the local patterns and spatial relationships in the input features, thereby helping the network to understand images, speech or other types of data.

[0062] In step S104, the Fourier transform is a mathematical transformation method that converts time-domain signals into frequency-domain signals, which can represent signals as a sum of sine and cosine functions, thereby analyzing the spectral characteristics of the signal.

[0063] Specifically, for the input convolution matrix, a two-dimensional Fourier transform is applied to each element in the convolution matrix, converting the convolution matrix in the time domain into the target feature matrix in the frequency domain. The Fourier transform represents the convolution matrix as a set of complex numbers, where each complex number represents a component at different frequencies.

[0064] where the target feature matrix in the frequency domain can be visualized to analyze the energy distribution of the signal at different frequencies. Heat maps or other visualization methods can be used to represent the frequency domain feature matrix and observe the spectral characteristics therein.

[0065] Secondly, the target feature matrix in the frequency domain represents the energy distribution and spectral characteristics of the input convolution matrix in the frequency domain. Through the Fourier transform, the input signal can be converted from the time domain to the frequency domain, better understanding the frequency components and periodic characteristics of the signal. The frequency domain feature matrix can be used for frequency domain analysis, frequency domain filtering and other related tasks, helping to extract and analyze the frequency domain characteristics of the signal.

[0066] In step S105, the preset activation function is a nonlinear function defined in advance in the neural network, which introduces nonlinear transformation to enhance the expressive power of the network. The activation function is usually applied to each neuron of the neural network, which nonlinearly transforms the input of the neuron.

[0067] where the activation function is usually an element-wise operation that nonlinearly transforms each matrix element. By applying the activation function to each element of the target feature matrix in the frequency domain, a corresponding nonlinear feature matrix can be generated. The activation function can increase the nonlinear capability of the network, enabling the network to learn more complex feature representations.

[0068] It should be noted that the nonlinear feature matrix represents the frequency domain feature matrix after being transformed by the activation function. Through the activation operation, nonlinearity can be introduced, so that the network can better learn and represent the nonlinear relationship in the data. The nonlinear feature matrix can help the network better capture the nonlinear features of the data, thereby improving the expression ability and performance of the model.

[0069] In step S106, the max-pooling layer is a downsampling operation that selects the maximum value of each region in the feature map as the output, thereby reducing the size of the feature map and retaining important feature information.

[0070] Specifically, for the nonlinear feature matrix, the following operations can be performed: defining the pooling window size and stride, i.e., the pooling window is a fixed-size sliding window that moves on the feature map and selects regions, and the stride is the distance the window moves each time; max-pooling operation, i.e., within each pooling window, the maximum value is selected from the nonlinear feature matrix as the output, which can retain the most significant features of the region and discard other insignificant details; repeat the max-pooling operation step until the entire nonlinear feature matrix is traversed to obtain the corresponding target feature matrix.

[0071] where the target feature matrix is the feature matrix obtained after the max-pooling operation. The role of the max-pooling layer is to reduce the spatial dimension of the feature map, reduce the amount of calculation and the number of parameters, and retain important feature information. Through the max-pooling operation, the most significant features in the nonlinear feature matrix can be obtained, thereby improving the robustness and generalization ability of the model.

[0072] In step S107, the inverse Fourier transform is the inverse operation of the Fourier transform, which is used to convert the frequency domain signal back to the time domain signal. Specifically, the target feature mentioned above can be converted from the frequency domain back to the time domain through the inverse Fourier transform. It generates the corresponding time domain signal by recombining the frequency components of the target feature.

[0073] Further, after the inverse Fourier transform, the corresponding time domain feature can be obtained. The time domain feature describes the change of the signal in time. It represents the amplitude, frequency and phase of the signal changing with time. Through the inverse Fourier transform, the target feature can be converted from the frequency domain back to the time domain. In the time domain feature, the specific form and change law of the signal can be observed, such as the amplitude, periodicity and timing relationship of the signal. The time domain feature is more consistent with the intuitive understanding of the signal, and can provide more intuitive information and insight.

[0074] In step S108, the time domain features obtained above are processed by a fully connected layer, i.e., the time domain features are taken as input, linear transformation and non-linear activation are performed through the fully connected layer, and higher-level feature representation is obtained. Each neuron in the fully connected layer is connected to all neurons of the previous layer, and each connection has a corresponding weight parameter.

[0075] Further, the output of the fully connected layer is further processed by an output layer. The output layer can use different activation functions and loss functions according to different tasks. For example, for a classification task, a softmax activation function and a cross-entropy loss function can be used; for a regression task, a linear activation function and a mean square error loss function can be used.

[0076] Secondly, the result of the output layer is the target feature set. The target feature set is the final result obtained by the model after processing the input time domain features. It can be a classification label, a regression value or other target feature information required. It should be noted that through the processing of the fully connected layer and the output layer, the time domain features can be converted into the output form required by the model. The fully connected layer can extract higher-level feature representation through the learning of weight parameters and non-linear transformation. The output layer maps the output of the fully connected layer to the final target feature set according to different tasks. In this way, the model can output the corresponding target feature information according to the input time domain features.

[0077] In step S109, a beam search algorithm is used to decode the target feature set to generate corresponding target base sequence information. The beam search algorithm is a heuristic search algorithm used to find the optimal solution or a solution close to the optimal solution in a large-scale search space.

[0078] Specifically, the decoding operation of the target feature set can be roughly divided into the following steps: S1. A certain number of initial solutions, also known as beams, are selected. The number of beams can be adjusted according to the complexity of the problem and the computing resources; S2. The fitness or score of each solution is calculated according to the target feature set and the representation method of the solution. The fitness function is usually defined according to the specific problem and is associated with the generation of target base sequence information; S3. New solutions are generated from the solutions in the current beam through certain strategies, which can be generated through mutation, crossover and other operations, and the solution set in the beam is updated; S4. The next generation beam is selected from the newly generated solutions according to a certain selection strategy. The selection strategy considers the fitness, diversity and search space exploration ability of the solution; steps 3 and 4 are repeated until the termination condition is met. The termination condition can be that the maximum number of iterations is reached, a solution that meets the requirements is found, or the search process is stagnant.

[0079] It should be noted that the beam search algorithm can find a better target base sequence information in the search space. The beam search algorithm gradually optimizes the quality of the solution through the strategy of evaluating the quality of the solution, generating new solutions and selecting the next generation of solutions, and maintains a certain diversity in the search process. Finally, the beam search algorithm can find the target base sequence information close to the optimal solution. Specifically, Figure 2 The main flow logic block diagram of the scheme of the present application is provided.

[0080] The biological nanopore signal recognition method provided by the embodiment can recognize real signals and extract feature values for Fourier transform on the real-time generated current signals according to the combination application of the Fourier transform model and the convolutional neural network, and can better recognize bases, so as to maximize the advantages of the convolutional neural network model and weaken its disadvantages, and improve the recognition effect of the biological nanopore signal.

[0081] In one of the embodiments of the present embodiment, the standard signal data includes original signals S of T time points, S = [S1, S2, S3..., S T ], S corresponds to a DNA sequence label y of K bases, y = [y1, y2, y3,..., y K ], each signal base y i ∈ [A, T, C, G] in the standard signal data, and the data in the training set is {(S(1), y(1)), (S(2), y(2)), (S(3), y(3))..., (S(T), y(k))}.

[0082] Wherein, the original signal S of T time points, this kind of standard signal data can be used for various signal processing and analysis tasks. The original signal of each time point can be various types of signals. By processing and analyzing these original signals, various information about the signals can be obtained, such as spectral features, time domain features, amplitude changes, etc.

[0083] Secondly, DNA sequence is a molecule used to encode biological genetic information, which is a sequence composed of four bases (adenine A, thymine T, guanine G and cytosine C). The position and order of each base in DNA determines the genetic characteristics of the organism. In the standard signal data, each signal base y i corresponds to a base in the DNA sequence. These bases can be represented by the letters A, T, C and G. Among them, A represents adenine, T represents thymine, C represents cytosine, and G represents guanine. Therefore, by sequencing and analyzing the DNA sequence, the understanding and interpretation of biological genetic information can be obtained. The specific base sequence of the DNA sequence can encode specific proteins, thereby determining the traits and functions of the organism.

[0084] Further, the data in the training set is composed of multiple samples, represented by {(S(1), y(1)), (S(2), y(2)), (S(3), y(3))..., (S(T), y(k))}. That is, each sample is composed of an original signal S i and a corresponding DNA sequence label y i . In the training set, each sample corresponds to an original signal S i and a DNA sequence label y i . The original signal S i is a sequence of signal values measured at T time points, represented by S(i) = [S1(i), S2(i), S3(i)..., S T (i)]. The DNA sequence label y i is a label of the DNA sequence represented by the original signal S i , represented by y(i) = [y1(i), y2(i), y3(i),..., y K (i)].

[0085] It should be noted that the training set is learned and trained by a group of known original signals and DNA sequence labels, so as to establish a model or algorithm, which can accurately match and predict unknown original signals and their corresponding DNA sequences. Through the samples in the training set, the features and patterns of the original signals can be extracted and associated with the corresponding DNA sequence labels, so as to establish a model capable of predicting and interpreting unknown original signals.

[0086] The biological nanopore signal recognition method provided by the embodiment can learn the complex relationship between DNA sequences and current signals through training, so that the network can accurately recognize new unknown DNA sequences, thereby improving the accuracy of DNA sequence recognition.

[0087] In one embodiment of the present embodiment, the standard signal data is normalized to generate a corresponding normalized input signal s′, s represents the value of the original signal, represents the average value of the entire read original signal, and std(s) represents the standard deviation of the entire read original signal.

[0088] wherein the normalization is a data preprocessing method aimed at converting data to a uniform scale for better comparison and analysis. In DNA sequence analysis, normalization of the original signal can help eliminate the scale difference between different signals, improve the comparability and interpretability of the signal.

[0089] Specifically, first, the mean and standard deviation of the entire read raw signal are calculated to describe the distribution of the raw signal. The mean represents the center position of the raw signal, and the standard deviation represents the degree of dispersion of the raw signal; then, the value of each raw signal is normalized. The normalization method can use standardization (Z-score normalization) or Min-Max normalization. Standardization subtracts the mean from the value of the raw signal and divides it by the standard deviation, so that the normalized signal has a distribution with a mean of 0 and a standard deviation of 1. Min-Max normalization subtracts the minimum value from the value of the raw signal and divides it by the difference between the maximum value and the minimum value, so that the normalized signal value is limited between 0 and 1.

[0090] The biological nanopore signal recognition method provided by the embodiment can balance the weights between different features, reduce the deviation between features, and help improve the generalization ability of the model for new samples.

[0091] In one of the embodiments of the present embodiment, the convolutional layer includes 8 convolutional kernels, each with a size of 5x5, a stride of 1, a boundary padding of 2, a bias vector of 1, and a channel number of 256.

[0092] In the present embodiment, the size of the convolutional kernel is 5x5, indicating that each convolutional kernel is composed of a 5x5 weight matrix. Each convolutional kernel extracts the features of the input data by sliding over the input data and performing convolution operations with it.

[0093] Secondly, the stride refers to the step length of the convolutional kernel sliding over the input data. In the present embodiment, the stride is set to 1, indicating that the convolutional kernel slides 1 unit of distance each time. This ensures that the convolutional kernel can cover every position of the input data, thereby extracting global features.

[0094] Furthermore, the boundary padding refers to filling a certain number of virtual pixels around the boundary of the input data. In the present embodiment, the boundary padding is set to 2, indicating that 2 virtual pixels are filled around each of the four sides of the input data. Boundary padding can keep the output size after convolution operation the same as the input size, avoiding information loss.

[0095] Further, the bias vector is a set of constants equal to the number of convolution kernels, used to offset the output of each convolution kernel. In this embodiment, the bias vector is set to 1, indicating that the output of each convolution kernel will be offset by 1. The number of channels refers to the depth or dimension of the input data. In this embodiment, the number of channels is 256, indicating that the input data is a multi-dimensional array with 256 channels. Each channel can be understood as a feature dimension of the input data, and the convolution kernel performs convolution operation on each channel to extract different features.

[0096] The biological nanopore signal recognition method provided by the embodiment uses multiple convolution kernels, and the network can simultaneously extract multiple local features of the input signal. Each convolution kernel can learn different features, thereby increasing the perception ability of the network to the input signal and improving the recognition ability of complex patterns and structures.

[0097] In one embodiment of the present embodiment, the input of the convolution layer is a feature map with K channels, each channel representing a feature dimension of the input data. The convolution operation defined on the K channel input has Lxm filters, nxp step size and S output channels, which is defined as: Output(i,j,s) = ∑ di<l,dj<m,q<k Input(i*n+di,j*p+dj,q)*Filter(di,dj,q,s).

[0098] Wherein, the input of the convolution layer is a feature map with K channels, each channel representing a feature dimension of the input data. This means that the input data is a K-channel multi-dimensional array, where each channel contains different feature information of the input data.

[0099] Secondly, in this convolution layer, there are Lxm filters, each filter has a size of nxp. The filter is a small weight matrix used to extract certain features in the input data. By applying each filter to each channel of the input data, Lxm output feature maps can be obtained.

[0100] Specifically, the convolution operation refers to the convolution operation of each filter with the corresponding channel of the input data, thereby generating the output feature map. The convolution operation is obtained by sliding the filter at each position of the input data, multiplying the filter with the corresponding elements of the input data and summing them up. This process slides nxp step size on the input data to ensure that all positions are covered.

[0101] Finally, the convolution operation generates S output channel feature maps. Each output channel corresponds to a filter, representing the specific feature extracted by the filter. Therefore, the output of the convolution layer is a feature map with S channels, each channel containing different feature information.

[0102] The biological nanopore signal recognition method provided by the embodiment can extract local features in the input data through convolution operation of the filter on the input feature map, each filter can learn different features, and therefore, multiple different feature maps can be obtained, which helps the network to capture various features in the input data and improves the representation ability of the model.

[0103] In one of the embodiments of the present embodiment, the batch normalization process is as follows: X represents the current input matrix, and gamma and beta represent the scaling and translation parameters to be learned in the model, the parameters are adjusted during the training process, and are automatically adjusted in the model, are non-constant parameters, and epsilon is a small quantity introduced to prevent division by zero.

[0104] Wherein, for the input matrix X, the mean mu and the variance sigma^2 of each mini-batch are calculated, the training data set is divided into multiple smaller subsets, each subset is called a mini-batch, and for the input matrix X of each mini-batch, the mean mu and the variance sigma^2 are used to normalize it: X_hat=(X-mu) / sqrt(sigma^2+epsilon), wherein epsilon is a small constant, which is used to prevent division by zero error.

[0105] Secondly, the normalized data is linearly transformed using the learnable scaling parameter gamma and the translation parameter beta: y=gamma*X_hat+beta, and y is taken as the output of the batch normalization and as the input of the next layer.

[0106] The biological nanopore signal recognition method provided by the embodiment can reduce the covariate shift problem of the intermediate layer of the network, that is, the change of the input distribution will cause instability of the network training, and the normalization can reduce the influence and make the network more stable.

[0107] In one of the embodiments of the present embodiment, the preset activation function is a ReLU function: ReLU(X)=max(X,0). The ReLU function is a nonlinear function, which outputs equal to the input when the input is greater than 0, and outputs 0 when the input is less than or equal to 0.

[0108] For example, when the input X is positive, the output is equal to the input: if X = 3, then ReLU(3) = max(3, 0) = 3; when the input X is negative, the output is 0: if X = -2, then ReLU(-2) = max(-2, 0) = 0; when the input X is 0, the output is 0: if X = 0, then ReLU(0) = max(0, 0) = 0; when the input X is a vector or matrix, the ReLU function is applied element-wise: if X = [-1, 2, -3, 4], then ReLU([-1, 2, -3, 4]) = [0, 2, 0, 4]. In summary, the formula of the ReLU function ReLU(X) = max(X, 0) means that when the input is greater than 0, the output is equal to the input; when the input is less than or equal to 0, the output is 0, so that the ReLU function can introduce non-linear characteristics and is very simple and efficient in calculation.

[0109] The biological nanopore signal recognition method provided by the embodiment uses the ReLU function, which is a non-linear activation function, to introduce non-linear transformation, so that the neural network can learn and represent more complex non-linear relationships, thereby helping to improve the expression ability of the neural network and making it adapt to more complex data distribution and tasks.

[0110] In one embodiment of the present embodiment, a loss function is used to measure the difference between the true label and the predicted probability during the training of the pre-set training model, and the loss function is defined as: wherein,

[0111] Y, P represent the probability distribution parameters calculated in the model.

[0112] In practical applications, different loss functions can be selected according to different tasks and problems. For example, for classification problems, common loss functions include cross-entropy loss functions, and for regression problems, common loss functions include mean square error loss functions.

[0113] Specifically, the step of using a loss function to measure the difference between the true label and the predicted probability can be roughly divided into the following steps: first, define the loss function, i.e. select an appropriate loss function according to the nature and requirements of the specific problem. Common loss functions include cross-entropy loss functions, mean square error loss functions, etc.; then, make a prediction through the model, i.e. input the training data into the model, and the model will process and calculate the data to obtain the prediction result. This prediction result can be a probability value or a classification label.

[0114] Further, the loss function is calculated, which compares the model's predictions with the true labels and calculates the difference between them. The specific calculation method depends on the chosen loss function; finally, the model parameters are updated by an optimization algorithm: according to the calculated loss value, the optimization algorithm (such as gradient descent) is used to update the model's parameters, so that the value of the loss function gradually decreases.

[0115] The biological nanopore signal recognition method provided by the embodiment plays a key role in the gradient descent process. By calculating the gradient of the loss function with respect to the model parameters, the gradient descent algorithm can be used to update the model parameters, continuously iterating to reduce the value of the loss function. This way, the model can be gradually optimized, improving the prediction accuracy.

[0116] In one embodiment of the present embodiment, the parameters of the preset training model are updated using the gradient descent iterative method, the gradient is calculated using batch stochastic gradient descent, and the parameters are updated in a backpropagation manner to obtain and save the corresponding network parameters as the final preset training model.

[0117] Specifically, the above calculation steps are as follows: S1. Initialize the model parameters, that is, randomly initialize the parameters of the model, such as the weight matrix and the bias vector; S2. Divide the training data into small batches, that is, divide the training data into multiple small batches, each small batch containing a portion of the training samples, which can be randomly selected, thus reducing the computational load and speeding up the training; S3. Forward propagation for each small batch, that is, input the training samples of each small batch into the model and calculate the predicted value of the model through forward propagation; S4. Calculate the loss function, that is, compare the predicted value of the model with the true label and calculate the value of the loss function.

[0118] Secondly, S5. Calculate the gradient, that is, through the backpropagation algorithm, start from the loss function and calculate the gradient of each parameter with respect to the loss function in turn, the gradient represents the rate of change of the loss function with respect to each parameter; S6. Update the parameters, that is, according to the calculated gradient, update the parameters of the model using the gradient descent method, the specific update method can be: parameter = parameter - learning rate * gradient, the learning rate is a hyperparameter that controls the step size of parameter updating; S7. Repeat steps 3 to 6 until all small batches of data are traversed, and each traversal of all data is called an epoch.

[0119] Further, S8. Repeat steps 2 to 7 for multiple epochs of training, as the training progresses, the model's parameters will be updated and the value of the loss function will gradually decrease. After training is completed, the final model parameters are saved, which can be used for model prediction and inference.

[0120] The biological nanopore signal recognition method provided by the embodiment can update the parameters of the model according to the gradient information of the loss function by using the gradient descent iteration method, thereby optimizing the model. The gradient descent method can adjust the parameters in the direction in which the loss function decreases fastest, so that the model can better fit the training data.

[0121] The application also discloses a computer readable storage medium, and the computer readable storage medium stores computer instructions, wherein the computer instructions are executed by a processor to use any of the biological nanopore signal recognition methods in the above embodiments.

[0122] The computer instructions can be stored in a computer readable medium, and the computer instructions include computer instruction codes, which can be in the form of source code, object code, executable files or some middleware forms, etc. The computer readable medium includes any entity or device, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. that can carry computer instruction codes. It should be noted that the computer readable medium includes but is not limited to the above components.

[0123] The computer readable storage medium stores any of the biological nanopore signal recognition methods in the above embodiments, and is loaded and executed on the processor to facilitate the storage and application of the above method.

[0124] The above are preferred embodiments of the application, and do not limit the protection scope of the application, so that: any equivalent changes made according to the structure, shape, principle of the application should be covered within the protection scope of the application.

Claims

1. A method of biological nanopore signal recognition, the method comprising: The method comprises the following steps: The standard signal data with classification ATCG is input into a preset training model as training set execution data, and initial parameters of the preset training model are customized, the standard signal data includes current signals corresponding to known DNA sequences, and the base information represented by each signal in the ATCG is A: adenine deoxyribonucleotide, T: thymine deoxyribonucleotide, C: cytosine deoxyribonucleotide, G: guanine deoxyribonucleotide, and B: blank signal; Batch normalization processing is performed on each input standard signal data to generate corresponding characteristic values, and the characteristic values are converted into corresponding characteristic matrices; The characteristic matrices are processed according to a convolution layer to generate a convolution matrix in the time domain; The convolution matrix is subjected to Fourier transform to generate a target characteristic matrix in the frequency domain; The target characteristic matrix is subjected to an activation operation according to a preset activation function to generate a corresponding nonlinear characteristic matrix; The nonlinear characteristic matrix is processed according to a maximum pooling layer to obtain a corresponding target feature; The target feature is subjected to inverse Fourier transform to generate a corresponding time domain feature; The time domain feature is processed through a full connection layer and an output layer to output a corresponding target feature set; The target feature set is decoded according to a beam search algorithm to generate corresponding target base sequence information. The input of the convolution layer is a feature map with K channels, each of which represents a feature dimension of the input data, and the convolution operation with Lxm filter, nxp stride and S output channel on the K channel input is defined as: ; In the process of training in the preset training model, a loss function is used to measure the difference between the real label and the prediction probability, and the loss function is defined as: , Y, P represent the probability distribution parameters calculated in the model.

2. The method of claim 1, wherein the method comprises: The standard signal data includes original signal S of T time points, S=[S1, S2, S3..., S T ], S corresponds to DNA sequence label y of K bases, y=[y1, y2, y3,..., y K ], each signal base y i ∈[A, T, C, G] in the standard signal data, the data in the training set is {(S(1), y(1)), (S(2), y(2)), (S(3), y(3))..., (S(T), y(k))}.

3. The method of claim 2, wherein the step of identifying the signal comprises: normalizing the standard signal data to generate a corresponding normalized input signal , , where s denotes the value of the original signal, denotes the average value of the original signal over the entire read, denotes the standard deviation of the original signal over the entire read.

4. The method of claim 1, wherein the method comprises: The convolution layer comprises eight convolution kernels, each of which has a size of 5*5, a stride of 1, a boundary padding of 2, a bias vector of 1, and a channel number of 256.

5. The method of claim 1, wherein the method comprises: The batch normalization processing procedure is: X represents the current input matrix, γ and β represent the parameters of scaling and translation to be learned in the model, the parameters are adjusted with the training process, and are automatically adjusted inside the model. Non-constant parameters, To prevent the introduction of a small amount of zero division.

6. The method of claim 1, wherein the method comprises: The preset activation function is a ReLU function: ReLU (X) = max (X, 0).

7. The method of claim 1, wherein the method comprises: The parameters of the preset training model are updated using the gradient descent iteration method, the gradient is calculated using the batch stochastic gradient descent, the parameters are updated in a back propagation manner, and the corresponding network parameters are obtained and saved as the final preset training model.

8. A computer readable storage medium having stored therein computer instructions, wherein, When the computer instructions are loaded and executed by the processor, a biological nanopore signal recognition method is adopted as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Biopolymer characterization method, device and equipment, and computer storage medium

    CN113837036A

  • Fault arc multi-domain identification method based on KPCA-MIV-LSTM

    CN114239653A