Base calling method, base calling model training method, and related device

WO2026129176A1PCT designated stage Publication Date: 2026-06-25MGI TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
MGI TECH CO LTD
Filing Date
2024-12-18
Publication Date
2026-06-25

Smart Images

  • Figure CN2024140200_25062026_PF_FP_ABST
    Figure CN2024140200_25062026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a base calling method, a base calling model training method, and a related device. The base calling method comprises: acquiring a plurality of fluorescence images of a plurality of nucleic acid sequence clusters under test in a sequencing cycle process of gene sequencing; on the basis of an embedded module of a preset base calling model, performing feature mapping on fluorescence intensity sequences corresponding to the plurality of fluorescence images to obtain a fluorescence feature sequence; inputting the fluorescent feature sequence into a timing neural network module of the base calling model to obtain a target feature sequence output by the timing neural network module; and, by means of a classification module of the base calling model, classifying the plurality of nucleic acid sequence clusters under test on the basis of the target feature sequence to obtain base categories corresponding to the plurality of nucleic acid sequence clusters under test in the sequencing cycle. Using the method can improve the accuracy of calling base categories corresponding to nucleic acid sequence clusters under test.
Need to check novelty before this filing date? Find Prior Art

Description

Base recognition methods, base recognition model training methods and related equipment Technical Field

[0001] This application relates to the field of gene sequencing technology, and in particular to a base recognition method, a base recognition model training method, and related equipment. Background Technology

[0002] Gene sequencing technology is being used more and more widely in various fields such as health, agriculture, and energy, promoting the development of life sciences, biomedicine and related industries.

[0003] Base recognition of deoxyribonucleic acid (DNA) nanospheres is a crucial step in gene sequencer algorithms, and the accuracy of base recognition directly affects sequencing quality. Related technologies often struggle to learn the correlation between fluorescence intensities in multiple fluorescence images from the same sequencing cycle during gene sequencing, leading to poor base recognition accuracy. Summary of the Invention

[0004] In view of the above, it is necessary to provide a base identification method, a base identification model training method, and related equipment to solve the technical problem of poor accuracy in base identification.

[0005] On one hand, embodiments of this application provide a base identification method, which includes: acquiring multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during a sequencing cycle of gene sequencing; performing feature mapping on the fluorescence intensity sequences corresponding to the multiple fluorescence images according to the embedding module of a preset base identification model to obtain fluorescence feature sequences; inputting the fluorescence feature sequences into the temporal neural network module of the base identification model to obtain the target feature sequence output by the temporal neural network module; and classifying the multiple nucleic acid sequence clusters to be tested according to the target feature sequence through the classification module of the base identification model to obtain the base category corresponding to the multiple nucleic acid sequence clusters to be tested in the sequencing cycle.

[0006] In some embodiments of this application, the generation of the fluorescence intensity sequence includes: extracting the target nucleic acid sequence clusters and the coordinates of the target nucleic acid sequence clusters corresponding to effective pixels based on the preprocessed image corresponding to each fluorescence image, and generating the fluorescence intensity sequence according to the fluorescence intensity data of the coordinates of the multiple target nucleic acid sequence clusters in multiple preprocessed images.

[0007] In some embodiments of this application, the fluorescence intensity sequence has a first dimension and a second dimension. The dimension of the fluorescence intensity sequence in the first dimension represents the number of nucleic acid sequence clusters to be tested, and the dimension in the second dimension represents the number of multiple fluorescence images. The step of performing feature mapping on the fluorescence intensity sequences corresponding to the multiple fluorescence images according to the embedding module of the preset base recognition model to obtain a fluorescence feature sequence includes: performing a lookup table operation on the dense matrix of the embedding module according to each fluorescence intensity data in the fluorescence intensity sequence to obtain a vector corresponding to each fluorescence intensity data. The number of element values ​​in each vector is the dimension of the dense matrix in the second dimension. The fluorescence feature sequence is determined according to the vector corresponding to each fluorescence intensity data. The fluorescence feature sequence has a first dimension, a second dimension, and a third dimension. The dimension of the fluorescence feature sequence in the first dimension represents the number of nucleic acid sequence clusters to be tested, the dimension in the second dimension represents the number of multiple fluorescence images, and the dimension in the third dimension is the dimension of the dense matrix in the second dimension.

[0008] In some embodiments of this application, the temporal neural network module includes one or more of the following: a recurrent neural network module, a gated recurrent unit module, a long short-term memory network module, a bidirectional recurrent neural network module, a bidirectional gated recurrent unit module, and a bidirectional long short-term memory network module.

[0009] In some embodiments of this application, the gated recurrent unit module includes multiple gated recurrent units. The step of inputting the fluorescent feature sequence into the temporal neural network module of the base recognition model to obtain the target feature sequence output by the temporal neural network module includes: inputting the initial hidden state and the fluorescent feature sequence into the gated recurrent unit module to obtain the updated fluorescent feature sequence and updated hidden state output by each gated recurrent unit, wherein the updated fluorescent feature sequence and updated hidden state output by each gated recurrent unit are used as the input data of the next gated recurrent unit, and the updated fluorescent feature sequence output by the last gated recurrent unit in the gated recurrent unit module is determined as the target feature sequence.

[0010] In some embodiments of this application, the step of inputting the initial hidden state and the fluorescence feature sequence into the gated loop unit module to obtain the updated fluorescence feature sequence and updated hidden state output by each gated loop unit includes: dividing the fluorescence feature sequence output by the Nth gated loop unit into multiple sub-feature sequences corresponding to multiple time steps, where N is an integer greater than or equal to 1, the multiple time steps being determined by the dimension of the fluorescence feature sequence output by the Nth gated loop unit in the second dimension; and calculating the reset gate value and update gate value corresponding to the tth time step in the Nth gated loop unit based on the sub-feature sequence corresponding to the tth time step and the hidden state corresponding to the (t-1)th time step, where t is an integer greater than or equal to 1. The hidden state corresponding to the previous time step is the initial hidden state. Based on the sub-feature sequence corresponding to the t-th time step, the hidden state corresponding to the (t-1)-th time step, and the value of the reset gate corresponding to the t-th time step, the candidate hidden state corresponding to the t-th time step is calculated. Based on the candidate hidden state corresponding to the t-th time step, the hidden state corresponding to the (t-1)-th time step, and the value of the update gate corresponding to the t-th time step, the hidden state corresponding to the t-th time step is calculated. Based on the hidden states corresponding to multiple time steps, the updated fluorescent feature sequence output by the (N+1)-th gated recurrent unit is determined, and the hidden state corresponding to the last time step is determined as the updated hidden state output by the (N+1)-th gated recurrent unit.

[0011] In some embodiments of this application, the classification module of the base recognition model classifies the plurality of nucleic acid sequence clusters to be tested according to the target feature sequence to obtain the base category corresponding to the plurality of nucleic acid sequence clusters to be tested in the sequencing cycle, which includes: using the classification module to map the target feature sequence to a plurality of preset base categories, obtaining the confidence level of the target feature sequence corresponding to each preset base category, and determining the base category from the plurality of preset base categories according to the confidence level.

[0012] In some embodiments of this application, the data output by the temporal neural network module for the fluorescent feature sequence further includes a hidden state, and the method further includes: using the hidden state output by the temporal neural network module for the fluorescent feature sequence as the input to the temporal neural network module corresponding to a sequencing cycle in the initial hidden state.

[0013] In the base identification method of this embodiment, feature mapping of the fluorescence intensity sequence enriches the information content and increases the dimensionality of the fluorescence feature sequence, facilitating the analysis of the intensity of the fluorescence signal excited by the base using a time-series neural network module. Considering that different bases will excite fluorescence signals with different wavelengths and intensities during gene sequencing, and that the intensity of the excited fluorescence signal changes with the progress of biochemical reactions, the time-series neural network module possesses powerful sequence processing capabilities and a memory mechanism. Therefore, inputting the fluorescence feature sequence into the time-series neural network module can capture the long-term dependencies in the fluorescence feature sequence and the complex dynamic characteristics of the fluorescence signal intensity changing over time, thereby obtaining the output target feature sequence. Through the classification module, the nucleic acid sequence clusters to be tested are classified according to the target feature sequence, accurately identifying the base category corresponding to the nucleic acid sequence clusters to be tested.

[0014] On the other hand, this application provides a base recognition model training method, which includes: acquiring multiple training samples, each training sample including multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during a sequencing cycle of gene sequencing; performing feature mapping on the fluorescence intensity sequence corresponding to each training sample according to the embedding module of a preset classification network to obtain the fluorescence feature sequence corresponding to each training sample; inputting the fluorescence feature sequence corresponding to each training sample into the temporal neural network module of the classification network to obtain the target feature sequence corresponding to each training sample output by the temporal neural network module; classifying the multiple nucleic acid sequence clusters to be tested according to the target feature sequence corresponding to each training sample through the classification module of the classification network to obtain the confidence level of the nucleic acid sequence clusters to be tested corresponding to multiple preset base categories; and training the classification network according to the confidence level and base category label of the nucleic acid sequence clusters to be tested corresponding to each training sample to obtain a base recognition model.

[0015] In some embodiments of this application, training the classification network to obtain a base recognition model based on the confidence level and base category label of the nucleic acid sequence cluster to be tested corresponding to each training sample includes: calculating the classification loss based on the confidence level and base category label of the nucleic acid sequence cluster to be tested corresponding to each training sample, training the classification network based on the classification loss, and obtaining the base recognition model.

[0016] The base recognition model training method in this embodiment enriches the information content and increases the dimensionality of the fluorescence feature sequences by feature mapping the fluorescence intensity sequence corresponding to each training sample. This facilitates the analysis of the intensity of the fluorescence signal excited by the bases using a time-series neural network module. Considering that different bases will excite fluorescence signals with different wavelengths and intensities during gene sequencing, and that the intensity of the excited fluorescence signal will change with the progress of biochemical reactions, the time-series neural network module has powerful sequence processing capabilities and memory mechanisms. Therefore, by inputting the fluorescence feature sequence corresponding to each training sample into the time-series neural network module, the long-term dependencies in the fluorescence feature sequence and the complex dynamic characteristics of the fluorescence signal intensity changing over time can be captured, thereby obtaining the target feature sequence corresponding to each training sample. Through the classification module, the nucleic acid sequence clusters to be tested are classified according to the target feature sequence, and the confidence level of the nucleic acid sequence clusters to be tested corresponding to multiple preset base categories can be predicted. Training the classification network based on the confidence level and base category label of the nucleic acid sequence cluster to be tested enables the trained base recognition model to learn how to accurately identify the base category of the nucleic acid sequence cluster to be tested based on the temporal features in the target feature sequence, thereby improving the accuracy of the base recognition model in identifying the base category of the nucleic acid sequence cluster to be tested.

[0017] On the other hand, this application provides a base recognition device, which includes: an acquisition unit for acquiring multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during a sequencing cycle of gene sequencing; a feature mapping unit for performing feature mapping on the fluorescence intensity sequences corresponding to the multiple fluorescence images according to the embedding module of a preset base recognition model to obtain fluorescence feature sequences; an input unit for inputting the fluorescence feature sequences into the temporal neural network module of the base recognition model to obtain the target feature sequence output by the temporal neural network module; and a classification unit for classifying the multiple nucleic acid sequence clusters to be tested according to the target feature sequence through the classification module of the base recognition model to obtain the base category corresponding to the multiple nucleic acid sequence clusters to be tested in the sequencing cycle.

[0018] On the other hand, this application provides a base recognition model training device, which includes: an acquisition unit for acquiring multiple training samples, each training sample including multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during a sequencing cycle of gene sequencing; a feature mapping unit for performing feature mapping on the fluorescence intensity sequence corresponding to each training sample according to the embedding module of a preset classification network to obtain the fluorescence feature sequence corresponding to each training sample; an input unit for inputting the fluorescence feature sequence corresponding to each training sample into the temporal neural network module of the classification network to obtain the target feature sequence corresponding to each training sample output by the temporal neural network module; a classification unit for classifying the multiple nucleic acid sequence clusters to be tested according to the target feature sequence corresponding to each training sample through the classification module of the classification network to obtain the confidence level of the nucleic acid sequence clusters to be tested corresponding to multiple preset base categories; and a training unit for training the classification network according to the confidence level and base category label of the nucleic acid sequence clusters to be tested corresponding to each training sample to obtain a base recognition model.

[0019] On the other hand, this application provides an electronic device, the electronic device comprising: a memory storing at least one instruction; and a processor executing the at least one instruction to implement the base recognition method, or to implement the base recognition model training method.

[0020] On the other hand, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the base recognition method or the base recognition model training method. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0022] Figure 1 is a flowchart of a base recognition method provided in an embodiment of this application.

[0023] Figure 2 is a schematic diagram of the nucleic acid sequence clusters to be tested on a sequencing chip provided in an embodiment of this application.

[0024] Figure 3 is a schematic diagram of the fluorescence image of the first sequencing cycle of the gene sequencing process provided in an embodiment of this application.

[0025] Figure 4 is a schematic diagram of the fluorescence image of the second sequencing cycle of the gene sequencing process provided in an embodiment of this application.

[0026] Figure 5 is a schematic diagram of the fluorescence image of the third sequencing cycle of the gene sequencing process provided in an embodiment of this application.

[0027] Figure 6 is a schematic diagram of the fluorescence image of the fourth sequencing cycle of the gene sequencing process provided in an embodiment of this application.

[0028] Figure 7 is a schematic diagram of the generation of fluorescent feature sequences provided in an embodiment of this application.

[0029] Figure 8 is a schematic diagram of the generation of a target feature sequence provided in an embodiment of this application.

[0030] Figure 9 is a schematic flowchart of a base recognition method provided in an embodiment of this application.

[0031] Figure 10 is a flowchart of an embodiment of the present application providing an updated fluorescent feature sequence and an updated hidden state generation method.

[0032] Figure 11 is a flowchart of a base recognition model training method provided in an embodiment of this application.

[0033] Figure 12 is a functional block diagram of a base recognition device provided in an embodiment of this application.

[0034] Figure 13 is a functional block diagram of a base recognition model training device provided in an embodiment of this application.

[0035] Figure 14 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0036] The following detailed description, in conjunction with the accompanying drawings, will further illustrate this application. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this application clearer, the application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0038] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.

[0039] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0040] This application provides a base recognition method and a base recognition model training method. By training the base recognition model, the accuracy of identifying the base categories corresponding to the nucleic acid sequence clusters to be tested can be improved.

[0041] The base recognition method and base recognition model training method provided in this application can be applied to electronic devices.

[0042] In some embodiments of this application, the electronic device may be an embedded device or an embedded system composed of one or more embedded devices. For example, the electronic device may be a Jetson device. Jetson devices have the advantages of small size, low power consumption, and high performance, making them easy to integrate into space-constrained environments, such as gene sequencers. Therefore, Jetson devices have the ability to perform edge computing, bringing the base recognition process closer to the gene sequencing process.

[0043] In other embodiments of this application, the electronic device may be a gene sequencer, mobile phone, tablet computer, laptop computer, computer, etc. This application does not limit the electronic device.

[0044] Figure 1 shows a flowchart of a base recognition method provided in an embodiment of this application. The order of the steps in this flowchart can be adjusted according to different needs, and some steps can be omitted. The base recognition method is applied to electronic devices.

[0045] S11: Acquire multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during one sequencing cycle of gene sequencing.

[0046] In some embodiments of this application, the nucleic acid sequence cluster to be tested is a large-scale molecular cluster obtained by nucleic acid amplification of ribonucleic acid (or deoxyribonucleic acid) sequences during gene sequencing. It can consist of groups of similar or identical nucleotide chains or deoxyribonucleic acid (DNA) chains. For example, the nucleic acid sequence cluster to be tested can be amplified oligonucleotides or polynucleotides with the same or similar sequences.

[0047] During nucleic acid sequencing cycles, the target nucleic acid sequence clusters may include deoxyribonucleic acid (DNB) and other nucleic acid (DNB) sequences, which may be immobilized to reaction sites and / or reaction chambers of the sequencing chip. Gene sequencing methods may include DNA nanoball (DNB) sequencing. In other embodiments, gene sequencing methods may also include bridge sequencing. This application does not limit the sequencing method.

[0048] In some embodiments of this application, during one sequencing cycle of gene sequencing, sequencing equipment or platforms such as gene sequencers use a micro-imaging optical system to take a single image of the sequencing chip, obtaining a field of view (FOV) image, which can be used as the aforementioned fluorescence image. This application does not limit the type of sequencing equipment and sequencing chip. For example, the sequencing equipment can be a gene sequencer based on DNBSEQ technology. Specifically, the fluorescence image can be an image obtained by the micro-imaging optical system capturing the sequencing chip when the fluorescent groups of the adenine (A), guanine (G), cytosine (C), or thymine (T) bases of the nucleic acid sequence cluster to be tested are excited to emit fluorescence signals. Each fluorescence image can correspond to multiple nucleic acid sequence clusters to be tested.

[0049] In this application, multiple fluorescence images belong to the same sequencing cycle, have the same image size, and can be customized in terms of the shooting interval and the number of fluorescence images. For example, Figure 2 shows a schematic diagram of the nucleic acid sequence cluster to be tested on a sequencing chip according to an embodiment of this application. Exemplarily, the shooting interval between the multiple fluorescence images can be 1 second, the number of fluorescence images can be 4, 12, or 64, and the width and height of each fluorescence image can be 5664 pixels and 8496 pixels, respectively.

[0050] Since the multiple fluorescence images belong to the same sequencing cycle, and the nucleic acid sequence clusters to be tested are relatively fixed in spatial location within the same sequencing cycle, the same coordinates in the multiple fluorescence images correspond to the same nucleic acid sequence clusters to be tested. Therefore, the effective pixels at the same coordinates in the multiple fluorescence images correspond to the fluorescence signals emitted by the same nucleic acid sequence clusters to be tested.

[0051] The acquisition of multiple fluorescence images from the same sequencing cycle described above does not constitute a limitation on the acquired fluorescence images. In practical applications, multiple fluorescence images from different sequencing cycles can be acquired, and base identification can be performed on the multiple fluorescence images from different sequencing cycles separately. Different sequencing cycles are performed independently, therefore the fluorescence images corresponding to different sequencing cycles can correspond to different nucleic acid sequence clusters to be tested. For example, Figure 3 is a schematic diagram of the fluorescence image of the first sequencing cycle of the gene sequencing process provided in an embodiment of this application. Figure 4 is a schematic diagram of the fluorescence image of the second sequencing cycle of the gene sequencing process provided in an embodiment of this application. Figure 5 is a schematic diagram of the fluorescence image of the third sequencing cycle of the gene sequencing process provided in an embodiment of this application. Figure 6 is a schematic diagram of the fluorescence image of the fourth sequencing cycle of the gene sequencing process provided in an embodiment of this application. In Figures 3 to 6, circular patterns of different shades can represent fluorescence intensity data, pixels, or coordinates corresponding to different nucleic acid sequence clusters to be tested. Figures 3 to 6 show a total of 9 fluorescence intensity data, pixels, or coordinates of nucleic acid sequence clusters to be tested.

[0052] In some embodiments of this application, if the electronic device is a sequencing device such as a gene sequencer, the electronic device can take pictures at preset shooting intervals using a built-in micro-imaging optical system to obtain the multiple fluorescence images. If the electronic device is not a sequencing device such as a gene sequencer, the electronic device can establish a communication connection with the sequencing device such as a gene sequencer and receive the multiple fluorescence images sent from the sequencing device such as a gene sequencer.

[0053] The method for acquiring multiple fluorescence images described above is merely an example and is not limited to this in practical applications. For instance, the electronic device can also read multiple image data from a folder under a preset path as the multiple fluorescence images. The preset path can be customized.

[0054] S12, according to the embedding module of the preset base recognition model, feature mapping is performed on the fluorescence intensity sequence corresponding to the multiple fluorescence images to obtain the fluorescence feature sequence.

[0055] In some embodiments of this application, in addition to the embedding module, the base recognition model may also include a gated recurrent unit module and a classification module. The functions and roles of the gated recurrent unit module and the classification module will be described below. The above description of the base recognition model does not constitute a limitation on the base recognition model. For example, the base recognition model may also include other types of network layers, such as pooling layers and sampling layers.

[0056] The electronic device can perform background noise removal, Gaussian filtering, and image opening operations on each fluorescence image to obtain a preprocessed image corresponding to each fluorescence image. From the preprocessed image, effective pixels are extracted as nucleic acid sequence clusters to be tested, and the coordinates of the effective pixels are determined as the coordinates of the nucleic acid sequence clusters to be tested. Based on the fluorescence intensity data of the effective pixels at each coordinate in multiple preprocessed images, a fluorescence intensity sequence is generated.

[0057] The fluorescence intensity data of the nucleic acid sequence cluster to be tested can be the pixel value of the effective pixel point corresponding to the nucleic acid sequence cluster in the corresponding preprocessed image. Each nucleic acid sequence cluster to be tested can correspond to the same coordinates in multiple preprocessed images, and each nucleic acid sequence cluster to be tested has multiple corresponding fluorescence intensity data in multiple preprocessed images.

[0058] For example, an electronic device can filter out background noise from multiple fluorescence images based on a background image, perform Gaussian filtering on the multiple fluorescence images after background noise removal, divide the multiple fluorescence images after Gaussian filtering into multiple parts, select a preset number of fluorescence images from each part, and perform calculations on the pixel values ​​between the selected fluorescence images to obtain a corresponding operation image for each part. The multiple corresponding operation images are binarized to obtain multiple binary images. The features of the multiple binary images are fused, and morphological opening and closing operations are performed on the feature-fused binary images to obtain a mask image. The pixels with pixel values ​​in the mask image are determined as valid pixels.

[0059] The background image can be an image captured on the sequencing chip before the biochemical reaction of gene sequencing. Background noise can be filtered out by subtracting the pixel values ​​of the corresponding pixels in each fluorescence image from those in the background image. The method for dividing the multiple fluorescence images after Gaussian filtering into multiple parts can be customized, and there can be overlap between the fluorescence images in each part. For example, if there are 12 fluorescence images after Gaussian filtering, the first 7 fluorescence images can be grouped into the first part, and the last 8 fluorescence images into the second part. The preset number can be customized. For example, the electronic device can calculate the sum of pixel values ​​of each fluorescence image in each part, select the top two fluorescence images corresponding to the sums of pixel values ​​arranged from high to low, thus obtaining two fluorescence images. The pixel values ​​between the selected two fluorescence images are averaged to obtain the corresponding processed image. This application does not limit the feature fusion method. The base recognition method provided in this application can be used when the fluorescence image is monochromatic; this application does not limit the color corresponding to the pixel values ​​of the fluorescence image.

[0060] For example, the fluorescence intensity sequence can be in the form of a matrix. The electronic device can use multiple fluorescence intensity data corresponding to each nucleic acid sequence cluster to be tested in multiple preprocessed images as row data, and multiple rows of data can construct a fluorescence intensity sequence in the form of a matrix.

[0061] The fluorescence intensity sequence has a first dimension and a second dimension. The fluorescence intensity data in both the first and second dimensions have corresponding indices. Each index in the first dimension corresponds to a cluster of nucleic acid sequences to be tested, and each index in the second dimension corresponds to a fluorescence image. The number of indices in the first dimension represents the dimension of the fluorescence intensity sequence in that dimension, and the number of indices in the second dimension represents the dimension of the fluorescence intensity sequence in that dimension. Therefore, the dimension of the fluorescence intensity sequence in the first dimension represents the number of clusters of nucleic acid sequences to be tested, and the dimension in the second dimension represents the number of fluorescence images.

[0062] The shape of the fluorescence intensity sequence can be determined by the dimensions of the fluorescence intensity sequence in the first dimension and the second dimension. The dimension in the first dimension can be called the number of rows of the fluorescence intensity sequence, and the dimension in the second dimension can be called the number of columns of the fluorescence intensity sequence. For example, if the number of nucleic acid sequence clusters to be tested is N, and the number of fluorescence images is 12, then the shape of the fluorescence intensity sequence can be Nx12, where N represents the number of rows of the fluorescence intensity sequence and 12 represents the number of columns of the fluorescence intensity sequence.

[0063] In some embodiments of this application, the electronic device can perform a lookup operation in the dense matrix of the embedding module based on each fluorescence intensity data in the fluorescence intensity sequence to obtain the vector corresponding to each fluorescence intensity data. The number of element values ​​in each vector is the dimension of the dense matrix in the second dimension. Based on the vector corresponding to each fluorescence intensity data, a fluorescence feature sequence is determined. The fluorescence feature sequence has a first dimension, a second dimension, and a third dimension. The dimension of the fluorescence feature sequence in the first dimension represents the number of nucleic acid sequence clusters to be tested, the dimension in the second dimension represents the number of multiple fluorescence images, and the dimension in the third dimension is the dimension of the dense matrix in the second dimension.

[0064] A dense matrix can also be called an embedding matrix or a lookup table. The shape of a dense matrix can be determined by its first dimension and its second dimension. Each fluorescence intensity data point in the fluorescence intensity sequence can correspond to a row index or column index in the dense matrix, and the vector corresponding to each fluorescence intensity data point is the vector corresponding to the row index or column index in the dense matrix. For example, if the dense matrix has a first dimension of M and a second dimension of d, then the shape of the dense matrix can be M x d. M can be 2000, and d can be 64. The element values ​​in the dense matrix can be preset.

[0065] The electronic device can combine or splice the vectors corresponding to each fluorescence intensity data point based on their position or arrangement order within the fluorescence intensity sequence to obtain a fluorescence feature sequence. The shape of the fluorescence feature sequence can be determined by the dimensions of the first, second, and third dimensions of the fluorescence feature sequence.

[0066] For example, continuing with the above embodiments, if the shape of the fluorescence intensity sequence is Nx12 and the shape of the dense matrix is ​​Mxd, searching the dense matrix based on each fluorescence intensity data in the fluorescence intensity sequence yields a d-dimensional vector corresponding to each fluorescence intensity data. Concatenating the d-dimensional vectors of the Nx12 fluorescence intensity data results in a fluorescence feature sequence X of shape Nx12xd. e In this context, N represents the batch size of the fluorescent feature sequence, 12 represents the sequence length of the fluorescent feature sequence, and d represents the feature dimension of the fluorescent feature sequence. A d-dimensional vector can represent a vector with d elements.

[0067] Figure 7 illustrates the generation of a fluorescence feature sequence according to an embodiment of this application. In Figure 7, a 2x12 fluorescence intensity sequence is input to the embedding module. The module searches for the row index corresponding to each fluorescence intensity data point in the dense matrix of the embedding module. The shape of the dense matrix is ​​2000xd. The row index corresponding to each fluorescence intensity data point is then used as the vector corresponding to that fluorescence intensity data point in the d-dimensional vector of the dense matrix. Since there are a total of 2x12 fluorescence intensity data points in the fluorescence intensity sequence, 2x12 d-dimensional vectors are obtained. Based on the order of each fluorescence intensity data point in the fluorescence intensity sequence, these 2x12 d-dimensional vectors are concatenated to obtain a fluorescence feature sequence X of shape 2x12xd. e .

[0068] In this embodiment, by performing feature mapping on the fluorescence intensity sequence, each fluorescence intensity data in the fluorescence intensity sequence can be mapped to a corresponding vector in a dense matrix, thereby increasing the dimensionality and information content of the fluorescence feature sequence, so as to facilitate the analysis of the temporal characteristics between the intensities of the fluorescence signal excited by the base using the temporal neural network module below.

[0069] S13, input the fluorescent feature sequence into the temporal neural network module of the base recognition model to obtain the target feature sequence output by the temporal neural network module.

[0070] In some embodiments of this application, the temporal neural network module may include, but is not limited to, a recurrent neural network (RNN) module, a gated recurrent unit (GRU) module, a long short-term memory (LSTM) network module, a bidirectional recurrent neural network (Bi-RNN) module, a bidirectional gated recurrent unit (Bi-GRU) module, and a bidirectional long short-term memory (Bi-LSTM) network module. This application does not limit the specific type of the temporal neural network module. To clearly illustrate the base recognition method and base recognition model training method provided in the embodiments of this application, the following description will use a gated recurrent unit as an example.

[0071] This application does not limit the number of gated loop units in the gated loop unit module. For example, the gated loop unit module may include two gated loop units. The shape of the target feature sequence is the same as the shape of the fluorescence feature sequence. For example, following the above embodiments, if the shape of the fluorescence feature sequence is Nx12xd, then the shape of the target feature sequence is Nx12xd.

[0072] For example, the electronic device inputs the initial hidden state and fluorescence feature sequence to the gated loop unit module to obtain the updated fluorescence feature sequence and updated hidden state output by each gated loop unit. The updated fluorescence feature sequence and updated hidden state output by each gated loop unit are used as the input data for the next gated loop unit. The updated fluorescence feature sequence output by the last gated loop unit in the gated loop unit module is determined as the target feature sequence.

[0073] The initial hidden state can be a preset matrix or a matrix generated using a random function. For example, the initial hidden state can be an N x d matrix. The updated fluorescence feature sequence output by each gated recurrent unit has the same shape as the input fluorescence feature sequence, and the updated hidden state output by each gated recurrent unit has the same shape as the initial hidden state.

[0074] For example, Figure 8 shows a schematic diagram of the generation of a target feature sequence provided in an embodiment of this application. In Figure 8, the gated loop unit module includes two gated loop units. By inputting the initial hidden state and the fluorescence feature sequence into the gated loop unit module, the updated fluorescence feature sequence and the updated hidden state output by the first gated loop unit in the gated loop unit module can be obtained. The updated fluorescence feature sequence and the updated hidden state output by the first gated loop unit are used as the input data of the second gated loop unit, and the updated fluorescence feature sequence output by the second gated loop unit is determined as the target feature sequence.

[0075] In this embodiment, the gated loop unit module can control the flow and forgetting of information in the fluorescence feature sequence through a gating mechanism, thereby capturing the continuous change characteristics and time-series dependence between the intensity of the fluorescence signal excited by each base, and avoiding the problem of gradient vanishing.

[0076] In other embodiments of this application, there is a temporal relationship between multiple consecutive sequencing cycles. For example, when a gene sequencing device captures a fluorescence image of the second sequencing cycle, it is affected by the intensity of the fluorescence signal excited by the bases in the first sequencing cycle; when capturing a fluorescence image of the third sequencing cycle, it is affected by the intensity of the fluorescence signal excited by the bases in the second sequencing cycle, and so on. This allows it to be determined that there is a temporal relationship between multiple consecutive sequencing cycles. Therefore, a temporal neural network module (e.g., a gated recurrent unit module) can learn the dependencies / temporal relationships between the fluorescence images of multiple consecutive sequencing cycles, thereby identifying base categories.

[0077] For example, an electronic device can use the hidden state output by the temporal neural network module for the sequencing cycle as the initial hidden state input to the temporal neural network module corresponding to the next sequencing cycle, thereby learning the dependency / temporal relationship between the fluorescence images of multiple consecutive sequencing cycles, so as to identify the base class.

[0078] S14, the classification module of the base recognition model classifies the multiple nucleic acid sequence clusters to be tested according to the target feature sequence to obtain the base category corresponding to the multiple nucleic acid sequence clusters to be tested in the sequencing cycle.

[0079] In some embodiments of this application, the electronic device can use a classification module to map the target feature sequence to multiple preset base categories, obtain the confidence level of the target feature sequence corresponding to each preset base category, and determine the base category of each nucleic acid sequence cluster to be tested from multiple preset base categories based on the confidence level.

[0080] The classification module can include fully connected layers and classification functions such as softmax. When there are multiple nucleic acid sequence clusters to be tested, the weight matrix in the fully connected layer can be multiplied with the target feature sequence to obtain a multiplication vector. The multiplication vector is then added to the bias vector in the fully connected layer to obtain a feature vector. Each column element in the weight matrix can correspond to a preset base category, so that the feature vector includes the original score (logits) of each nucleic acid sequence cluster to be tested belonging to each preset base category. The original score of each nucleic acid sequence cluster to be tested belonging to each preset base category is calculated using classification functions such as softmax to obtain the confidence / probability of each nucleic acid sequence cluster to be tested corresponding to each preset base category.

[0081] The multiple preset base categories can be four base categories: A, T, C, and G. The base category corresponding to each nucleic acid sequence cluster to be tested can be the preset base category corresponding to the highest confidence level, thus obtaining the base category corresponding to each nucleic acid sequence cluster to be tested.

[0082] For example, the confidence / probability of the nucleic acid sequence cluster to be tested corresponding to each preset base class can be calculated using formula (1):

[0083] Among them, P i z represents the confidence level of the nucleic acid sequence cluster to be tested corresponding to the i-th preset base category. i The z represents the original score of the cluster of nucleic acid sequences to be tested in the feature vector corresponding to the i-th preset base category, C represents the number of multiple preset base categories, and z j This represents the original score of the cluster of nucleic acid sequences to be tested in the feature vector corresponding to the j-th preset base category.

[0084] For example, Figure 9 shows a flowchart of a base recognition method provided in an embodiment of this application. In Figure 9, a fluorescence intensity sequence of shape Nx12 is input into a base recognition model, which includes an embedding module, a gated recurrent unit module, and a classification module. The embedding module outputs a fluorescence feature sequence of shape Nx12xd, the gated recurrent unit module outputs a target feature sequence of shape Nx12xd for the input fluorescence feature sequence, and the classification module outputs the base category for the input target feature sequence.

[0085] Experiments showed that using DBSCAN for base identification of nucleic acid sequence clusters yielded a mapping rate of 84.77% and an average error rate of 1.65% for the base categories of the target nucleic acid sequence clusters on the reference genome. Using the base identification method provided in this application, the mapping rate of the base categories of the target nucleic acid sequence clusters on the reference genome was 87.03%, with an average error rate of 1.08%. Therefore, using the base identification method provided in this application can significantly improve the mapping rate of the base categories of the target nucleic acid sequence clusters on the reference genome and reduce the average error rate.

[0086] In the base identification method of this embodiment, feature mapping of the fluorescence intensity sequence enriches the information content and increases the dimensionality of the fluorescence feature sequence, facilitating the analysis of the intensity of the fluorescence signal excited by the base using a time-series neural network module. Considering that different bases will excite fluorescence signals with different wavelengths and intensities during gene sequencing, and that the intensity of the excited fluorescence signal changes with the progress of biochemical reactions, the time-series neural network module possesses powerful sequence processing capabilities and a memory mechanism. Therefore, inputting the fluorescence feature sequence into the time-series neural network module can capture the long-term dependencies in the fluorescence feature sequence and the complex dynamic characteristics of the fluorescence signal intensity changing over time, thereby obtaining the output target feature sequence. Through the classification module, the nucleic acid sequence clusters to be tested are classified according to the target feature sequence, accurately identifying the base category corresponding to the nucleic acid sequence clusters to be tested.

[0087] Figure 10 shows a flowchart of an embodiment of the method for generating updated fluorescent feature sequences and updated hidden states provided in this application. For ease of description, the Nth and (N+1th)th gated loop units in the gated loop unit module are used as examples, where N is an integer greater than or equal to 1.

[0088] S101 divides the fluorescence feature sequence output by the Nth gated recurrent unit into sub-feature sequences corresponding to multiple time steps.

[0089] In some embodiments of this application, the plurality of time steps are determined by the dimension of the fluorescence feature sequence output by the Nth gated loop unit in the second dimension, which can be referred to as the number of time steps.

[0090] For example, following the above embodiments, if the fluorescence feature sequence with shape Nx12xd has a dimension of 12 in the second dimension, the fluorescence feature sequence can be divided into sub-feature sequences corresponding to 12 time steps, namely the sub-feature sequence corresponding to the first time step, the sub-feature sequence corresponding to the second time step, ... the sub-feature sequence corresponding to the twelfth time step.

[0091] S102, based on the sub-feature sequence corresponding to the t-th time step and the hidden state corresponding to the (t-1)-th time step, calculate the value of the reset gate and the value of the update gate corresponding to the t-th time step in the (N+1)-th gated loop unit.

[0092] In some embodiments of this application, t is an integer greater than or equal to 1, and the hidden state corresponding to the time step preceding the first time step of the first gated loop unit is the initial hidden state. The (N+1)th gated loop unit includes a reset gate and an update gate.

[0093] The reset gate value at time step t is used to calculate the candidate hidden state at time step t together with the sub-feature sequence at time step t and the hidden state at time step (t-1). During the calculation of the candidate hidden state at time step t, the reset gate value at time step t can be used to determine the amount of information to be forgotten / ignored in the hidden state at time step (t-1). The reset gate value can be between 0 and 1. For example, a smaller reset gate value corresponds to a greater amount of information to be forgotten / ignored than a larger reset gate value.

[0094] The value of the update gate at time step t is used to calculate the hidden state at time step t together with the candidate hidden state at time step t and the hidden state at time step (t-1). During the calculation of the hidden state at time step t, the value of the update gate at time step t can be used to determine the amount of information that needs to be retained / transmitted between the candidate hidden state at time step t and the hidden state at time step (t-1). The value of the update gate can be between 0 and 1. For example, the closer the update gate value is to 0, the more information needs to be retained / transmitted in the candidate hidden state at time step t than in the hidden state at time step (t-1); conversely, the closer the update gate value is to 1, the less information needs to be retained / transmitted in the candidate hidden state at time step t than in the hidden state at time step (t-1).

[0095] The (N+1)th gated recurrent unit may include an activation function, a weight matrix and bias between the sub-feature sequence corresponding to the t-th time step and the reset gate value corresponding to the t-th time step, a weight matrix and bias between the hidden state corresponding to the (t-1)-th time step and the reset gate value corresponding to the t-th time step, a weight matrix and bias between the sub-feature sequence corresponding to the t-th time step and the update gate value corresponding to the t-th time step, and a weight matrix and bias between the hidden state corresponding to the (t-1)-th time step and the update gate value corresponding to the t-th time step.

[0096] For example, the calculation methods for the reset gate value and update gate value corresponding to the t-th time step can refer to the following formulas (2) to (3): r t =σ(w xr x t +b xr +w hr h t-1 +b hr (2)

[0097] Where, r t Let w represent the value of the reset gate at time step t, σ represent the sigmoid activation function, and w xr x represents the weight matrix between the sub-feature sequence corresponding to time step t and the value of the reset gate corresponding to time step t. t Let b represent the sub-feature sequence corresponding to the t-th time step. xr w represents the bias between the sub-feature sequence corresponding to time step t and the value of the reset gate corresponding to time step t. hr h represents the weight matrix between the hidden state at time step (t-1) and the value of the reset gate at time step t. t-1 Let b represent the hidden state at time step t-1. hr This represents the bias between the hidden state at time step (t-1) and the value of the reset gate at time step (t). t =σ(w xz x t +b xz +w hz h t-1 +b hz (3)

[0098] Among them, z t Let w represent the value of the update gate at time step t, σ represent the sigmoid activation function, and w xz Let x represent the weight matrix between the sub-feature sequence corresponding to time step t and the value of the update gate corresponding to time step t. t Let b represent the sub-feature sequence corresponding to the t-th time step. xzw represents the bias between the sub-feature sequence corresponding to time step t and the value of the update gate corresponding to time step t. hz h represents the weight matrix between the hidden state at time step (t-1) and the update gate value at time step (t). t-1 Let b represent the hidden state at time step t-1. hz This represents the bias between the hidden state at time step (t-1) and the value of the update gate at time step (t).

[0099] S103. Calculate the candidate hidden state corresponding to the t-th time step based on the sub-feature sequence corresponding to the t-th time step, the hidden state corresponding to the (t-1)-th time step, and the value of the reset gate corresponding to the t-th time step.

[0100] In some embodiments of this application, the N+1th gated loop unit may further include a weight matrix and bias between the sub-feature sequence corresponding to the tth time step and the candidate hidden state corresponding to the tth time step, and a weight matrix and bias between the hidden state corresponding to the (t-1)th time step and the candidate hidden state corresponding to the tth time step.

[0101] For example, the calculation of the candidate hidden state corresponding to the t-th time step can be referenced by the following formula (4): n t =tanh(w xn x t +b xn +r t *(w hn h t-1 )+b hn (4)

[0102] Where, n t Let w represent the candidate hidden state at time step t, tanh represent the hyperbolic tangent activation function, and w represent the candidate hidden state at time step t. xn Let x represent the weight matrix between the sub-feature sequence at time step t and the candidate hidden state at time step t. t Let b represent the sub-feature sequence corresponding to the t-th time step. xn r represents the bias between the sub-feature sequence corresponding to time step t and the candidate hidden state corresponding to time step t. t h represents the value of the reset gate at time step t. t-1 w represents the hidden state at time step t-1. hn b represents the weight matrix between the hidden state at time step (t-1) and the candidate hidden state at time step (t). hn This represents the bias between the hidden state at time step (t-1) and the candidate hidden state at time step (t).

[0103] S104. Calculate the hidden state corresponding to the t-th time step based on the candidate hidden state corresponding to the t-th time step, the hidden state corresponding to the (t-1)-th time step, and the value of the update gate corresponding to the t-th time step.

[0104] For example, the method for calculating the hidden state corresponding to the t-th time step can refer to the following formula (5): h t =(1-z) t )*n t +z t *h t-1 (5)

[0105] Among them, h t Let z represent the hidden state at time step t. t Let n represent the value of the update gate at time step t. t h represents the candidate hidden state at time step t. t-1 This represents the hidden state corresponding to the (t-1)th time step.

[0106] S105, based on the hidden states corresponding to the multiple time steps, determine the updated fluorescence feature sequence output by the (N+1)th gated loop unit, and determine the hidden state corresponding to the last time step as the updated hidden state output by the (N+1)th gated loop unit.

[0107] In some embodiments of this application, the electronic device can splice / combine the hidden states corresponding to multiple time steps according to the arrangement / combination of the sub-feature sequences corresponding to multiple time steps in the fluorescence feature sequence to obtain the updated fluorescence feature sequence output by the (N+1)th gated loop unit.

[0108] For example, following the above embodiment, the hidden state corresponding to the 12th time step is determined as the updated hidden state output by the (N+1)th gated loop unit. The hidden state corresponding to the 12th time step is determined as the updated hidden state output by the (N+1)th gated loop unit.

[0109] In some embodiments of this application, if N is 1, the input data of the first gated loop unit can be the original fluorescence feature sequence, and the process of the first gated loop unit outputting the updated fluorescence feature sequence can be referred to the description of the N+1th gated loop unit outputting the updated fluorescence feature sequence and the updated hidden state.

[0110] Figure 11 shows a flowchart of a base recognition model training method provided in one embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The base recognition model training is applied to electronic devices.

[0111] S111, acquire multiple training samples, each training sample includes multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during one sequencing cycle of gene sequencing.

[0112] In some embodiments of this application, the same coordinates among multiple fluorescence sample images in each training sample can correspond to the same cluster of nucleic acid sequences to be tested. Multiple training samples can correspond to different sequencing cycles. For example, fluorescence sample images from 15 sequencing cycles during gene sequencing can be obtained as training samples. Multiple fluorescence sample images in each training sample can correspond to the same sequencing cycle. This application does not limit the number of nucleic acid sequence clusters to be tested corresponding to multiple training samples. For example, the number of nucleic acid sequence clusters to be tested corresponding to multiple training samples can be 36 million.

[0113] In some embodiments of this application, the description of the nucleic acid sequence cluster to be tested and the fluorescent sample image can be referred to step S11.

[0114] S112, according to the embedding module of the preset classification network, feature mapping is performed on the fluorescence intensity sequence corresponding to each training sample to obtain the fluorescence feature sequence corresponding to each training sample.

[0115] In some embodiments of this application, in addition to the embedding module, the classification network may also include a gated recurrent unit module and a classification module. For a description of the embedding module, gated recurrent unit module, and classification module, please refer to the descriptions of steps S12, S13, and S14. The above description of the classification network does not constitute a limitation on the classification network. For example, the classification network may also include other types of network layers, such as pooling layers and sampling layers.

[0116] In some embodiments of this application, the description of the fluorescence intensity sequence and fluorescence feature sequence corresponding to each training sample can be found in step S12.

[0117] S113, input the fluorescence feature sequence corresponding to each training sample into the temporal neural network module of the classification network to obtain the target feature sequence corresponding to each training sample output by the temporal neural network module.

[0118] In some embodiments of this application, the description of the method for generating the target feature sequence corresponding to each training sample can be found in the description of the method for generating the target feature sequence in step S13.

[0119] S114, the classification module of the classification network classifies the multiple nucleic acid sequence clusters to be tested according to the target feature sequence corresponding to each training sample, and obtains the confidence level of the nucleic acid sequence cluster to be tested corresponding to multiple preset base categories for each training sample.

[0120] In some embodiments of this application, the description of the method for calculating the confidence level of the nucleic acid sequence cluster to be tested corresponding to each training sample can be found in step S14, which describes the method for calculating the confidence level / probability of each nucleic acid sequence cluster to be tested corresponding to each preset base category.

[0121] S115, Based on the confidence level and base category label of the nucleic acid sequence cluster to be tested corresponding to each training sample, the classification network is trained to obtain a base recognition model.

[0122] In some embodiments of this application, the base category label can indicate the actual base category corresponding to the nucleic acid sequence cluster to be tested. When there are multiple nucleic acid sequence clusters to be tested corresponding to the multiple training samples, each nucleic acid sequence cluster to be tested has a corresponding base category label. The multiple preset base categories include the actual base category indicated by the base category label.

[0123] In some embodiments of this application, the electronic device can calculate the classification loss based on the confidence level of the nucleic acid sequence cluster to be tested and the base category label corresponding to each training sample, and train the classification network based on the classification loss to obtain the base recognition model.

[0124] During the training of the classification network, the option to train the embedding module can be flexibly configured. For example, an electronic device can train the classification network by adjusting the parameters of the temporal neural network module and the classification module, or by adjusting the parameters of the embedding module, the temporal neural network module, and the classification module.

[0125] If the multiple training samples correspond to multiple nucleic acid sequence clusters to be tested, the confidence level corresponding to each training sample may include the confidence level of each nucleic acid sequence cluster to be tested in the training sample corresponding to multiple preset base categories.

[0126] In some embodiments of this application, the electronic device can encode the base category label corresponding to each nucleic acid sequence cluster to be tested in each training sample based on multiple preset base categories, thereby obtaining an encoding vector for each nucleic acid sequence cluster to be tested corresponding to multiple preset base categories. A preset loss function is then used to calculate the classification loss based on the encoding vector and confidence level of each nucleic acid sequence cluster to be tested corresponding to multiple preset base categories. This application does not limit the encoding processing method or the type of preset loss function.

[0127] For example, one-hot encoding can be used to encode the base category label corresponding to each nucleic acid sequence cluster to be tested, based on multiple preset base categories. This yields an encoding vector for each nucleic acid sequence cluster corresponding to multiple preset base categories. The actual base category indicated by the base category label can have a coded value of 1 in the encoding vector, while other base categories besides those indicated by the base category label can have a coded value of 0 in the encoding vector. The preset loss function can be the cross-entropy loss function.

[0128] For example, the classification loss can be calculated using the following formula (6):

[0129] Where L represents the classification loss, N can represent the number of nucleic acid sequence clusters to be tested corresponding to the multiple training samples, C represents the number of multiple preset base categories, and y in P represents the encoding value of the i-th preset base category corresponding to the n-th nucleic acid sequence cluster to be tested in the encoding vector. in This represents the confidence level of the nth nucleic acid sequence cluster corresponding to the i-th preset base category.

[0130] In one example, the electronic device can adjust the network parameters of the classification module and the gated recurrent unit module until the classification loss meets the convergence condition, then stop adjusting, and determine the embedding module and the trained gated recurrent unit module and the classification module as the base recognition model.

[0131] In other examples, the electronic device can adjust the network parameters of the embedding module, classification module, and gated recurrent unit module until the classification loss meets the convergence condition, then stop adjusting and determine the trained embedding module, gated recurrent unit module, and classification module as the base recognition model.

[0132] The network parameters can include weights and biases, and the convergence criteria can be customized; this application does not impose any restrictions on this. For example, the convergence criterion can be that the classification loss falls within a preset range. The preset range can be 0 to 0.1.

[0133] In this embodiment, the classification loss can reflect the degree of difference or similarity between the actual base class of the nucleic acid sequence cluster to be tested and the base class predicted by the classification network.

[0134] In some embodiments of this application, other parameters in the training process of the base recognition model, such as the learning rate, batch size, and optimizer, can be customized, and this application does not impose any restrictions on them. For example, the learning rate can be 5e-3, the optimizer can be Adam, and the batch size can be 10000.

[0135] The base recognition model training method in this embodiment enriches the information content and increases the dimensionality of the fluorescence feature sequences by feature mapping the fluorescence intensity sequence corresponding to each training sample. This facilitates the analysis of the intensity of the fluorescence signal excited by the bases using a time-series neural network module. Considering that different bases will excite fluorescence signals with different wavelengths and intensities during gene sequencing, and that the intensity of the excited fluorescence signal will change with the progress of biochemical reactions, the time-series neural network module has powerful sequence processing capabilities and memory mechanisms. Therefore, by inputting the fluorescence feature sequence corresponding to each training sample into the time-series neural network module, the long-term dependencies in the fluorescence feature sequence and the complex dynamic characteristics of the fluorescence signal intensity changing over time can be captured, thereby obtaining the target feature sequence corresponding to each training sample. Through the classification module, the nucleic acid sequence clusters to be tested are classified according to the target feature sequence, and the confidence level of the nucleic acid sequence clusters to be tested corresponding to multiple preset base categories can be predicted. Training the classification network based on the confidence level and base category label of the nucleic acid sequence cluster to be tested enables the trained base recognition model to learn how to accurately identify the base category of the nucleic acid sequence cluster to be tested based on the temporal features in the target feature sequence, thereby improving the accuracy of the base recognition model in identifying the base category of the nucleic acid sequence cluster to be tested.

[0136] Figure 12 shows a functional block diagram of a base recognition device provided in an embodiment of this application. The base recognition device 12 includes an acquisition unit 120, a feature mapping unit 121, an input unit 122, and a classification unit 123. The module / unit referred to in this application refers to a series of computer-readable instruction segments that can be acquired by the processor 143 in Figure 14 and can perform a fixed function, stored in the memory 142 in Figure 14. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0137] The acquisition unit 120 is used to acquire multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during one sequencing cycle of gene sequencing.

[0138] The feature mapping unit 121 is used to perform feature mapping on the fluorescence intensity sequence corresponding to the multiple fluorescence images according to the embedding module of the preset base recognition model, so as to obtain the fluorescence feature sequence.

[0139] In some embodiments of this application, the feature mapping unit 121 is further configured to extract the target nucleic acid sequence clusters corresponding to effective pixels and the coordinates of the target nucleic acid sequence clusters based on the preprocessed image corresponding to each fluorescence image, and generate the fluorescence intensity sequence based on the fluorescence intensity data of the coordinates of the multiple target nucleic acid sequence clusters in multiple preprocessed images.

[0140] In some embodiments of this application, the fluorescence intensity sequence has a first dimension and a second dimension. The dimension of the fluorescence intensity sequence in the first dimension represents the number of nucleic acid sequence clusters to be tested, and the dimension in the second dimension represents the number of multiple fluorescence images. The feature mapping unit 121 is further configured to perform a lookup operation on the dense matrix of the embedding module according to each fluorescence intensity data in the fluorescence intensity sequence to obtain a vector corresponding to each fluorescence intensity data. The number of element values ​​in each vector is the dimension of the dense matrix in the second dimension. Based on the vector corresponding to each fluorescence intensity data, the fluorescence feature sequence is determined. The fluorescence feature sequence has a first dimension, a second dimension, and a third dimension. The dimension of the fluorescence feature sequence in the first dimension represents the number of nucleic acid sequence clusters to be tested, the dimension in the second dimension represents the number of multiple fluorescence images, and the dimension in the third dimension is the dimension of the dense matrix in the second dimension.

[0141] The input unit 122 is used to input the fluorescent feature sequence into the temporal neural network module of the base recognition model to obtain the target feature sequence output by the temporal neural network module.

[0142] In some embodiments of this application, the temporal neural network module includes a gated recurrent unit module, which includes multiple gated recurrent units. An input unit 122 is further configured to input the initial hidden state and the fluorescence feature sequence into the gated recurrent unit module to obtain the updated fluorescence feature sequence and the updated hidden state output by each gated recurrent unit. The updated fluorescence feature sequence and the updated hidden state output by each gated recurrent unit are used as the input data for the next gated recurrent unit. The updated fluorescence feature sequence output by the last gated recurrent unit in the gated recurrent unit module is determined as the target feature sequence.

[0143] In some embodiments of this application, the input unit 122 is further configured to divide the fluorescence feature sequence output by the Nth gated loop unit into multiple sub-feature sequences corresponding to multiple time steps, where N is an integer greater than or equal to 1. The multiple time steps are determined by the dimension of the fluorescence feature sequence output by the Nth gated loop unit in the second dimension. Based on the sub-feature sequence corresponding to the tth time step and the hidden state corresponding to the (t-1)th time step, the values ​​of the reset gate and update gate corresponding to the tth time step in the Nth gated loop unit are calculated, where t is an integer greater than or equal to 1. The hidden state corresponding to the time step preceding the first time step of the first gated loop unit is the initial hidden state. Based on the sub-feature sequence corresponding to the t-th time step, the hidden state corresponding to the (t-1)-th time step, and the value of the reset gate corresponding to the t-th time step, the candidate hidden state corresponding to the t-th time step is calculated. Based on the candidate hidden state corresponding to the t-th time step, the hidden state corresponding to the (t-1)-th time step, and the value of the update gate corresponding to the t-th time step, the hidden state corresponding to the t-th time step is calculated. Based on the hidden states corresponding to multiple time steps, the updated fluorescent feature sequence output by the (N+1)-th gated recurrent unit is determined, and the hidden state corresponding to the last time step is determined as the updated hidden state output by the (N+1)-th gated recurrent unit.

[0144] In other embodiments of this application, the data output by the time-series neural network module for the fluorescent feature sequence further includes a hidden state. The input unit 122 is also used to input the hidden state output by the time-series neural network module for the fluorescent feature sequence as an initial hidden state into the time-series neural network module corresponding to the next sequencing cycle.

[0145] The classification unit 123 is used to classify the plurality of nucleic acid sequence clusters to be tested according to the target feature sequence through the classification module of the base recognition model, and obtain the base category corresponding to the plurality of nucleic acid sequence clusters to be tested in the sequencing cycle.

[0146] In some embodiments of this application, the classification unit 123 is further configured to use the classification module to map the target feature sequence to multiple preset base categories, obtain the confidence level of the target feature sequence corresponding to each preset base category, and determine the base category from the multiple preset base categories based on the confidence level.

[0147] Figure 13 shows a functional block diagram of a base recognition model training device provided in an embodiment of this application. The base recognition model training device 13 includes an acquisition unit 130, a feature mapping unit 131, an input unit 132, a classification unit 133, and a training unit 134. The module / unit referred to in this application refers to a series of computer-readable instruction segments that can be acquired by the processor 143 in Figure 14 and can perform a fixed function, stored in the memory 142 in Figure 14. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.

[0148] The acquisition unit 130 is used to acquire multiple training samples, each training sample including multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during one sequencing cycle of gene sequencing;

[0149] The feature mapping unit 131 is used to perform feature mapping on the fluorescence intensity sequence corresponding to each training sample according to the embedding module of the preset classification network, so as to obtain the fluorescence feature sequence corresponding to each training sample.

[0150] Input unit 132 is used to input the fluorescence feature sequence corresponding to each training sample into the temporal neural network module of the classification network to obtain the target feature sequence corresponding to each training sample output by the temporal neural network module;

[0151] The classification unit 133 is used to classify the multiple nucleic acid sequence clusters to be tested according to the target feature sequence corresponding to each training sample through the classification module of the classification network, and to obtain the confidence level of the nucleic acid sequence cluster to be tested corresponding to multiple preset base categories for each training sample.

[0152] Training unit 134 is used to train the classification network based on the confidence level of the nucleic acid sequence cluster to be tested and the base category label corresponding to each training sample, so as to obtain a base recognition model.

[0153] In some embodiments of this application, the training unit 134 is further configured to calculate the classification loss based on the confidence level of the nucleic acid sequence cluster to be tested and the base category label corresponding to each training sample, and train the classification network based on the classification loss to obtain the base recognition model.

[0154] Figure 14 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. In Figure 14, the electronic device 14 may include a communication module 141, a memory 142, a processor 143, an input / output (I / O) interface 144, and a bus 145. The processor 143 is coupled to the communication module 141, the memory 142, and the input / output interface 144 via the bus 145.

[0155] Communication module 141 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, frequency modulation (FM), near field communication (NFC), and infrared (IR).

[0156] Memory 142 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 143, and can be used to store executable programs (e.g., machine instructions) of other running programs, as well as user and application data. The RAM may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.

[0157] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 143. Non-volatile memory can include disk storage devices and flash memory. For example, flash memory can be Nand Flash.

[0158] The memory 142 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 143. The one or more computer programs include multiple instructions, which, when executed by the processor 143, can implement a base recognition method and a base recognition model training method that are executed on the electronic device 14.

[0159] In other embodiments, the electronic device 14 shown in FIG14 also includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 14.

[0160] Processor 143 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.

[0161] The processor 143 provides computing and control capabilities. For example, the processor 143 is used to execute computer programs stored in the memory 142 to implement the base recognition method and the base recognition model training method described above.

[0162] Input / output interface 144 is used to provide a channel for user input or output. For example, input / output interface 144 can be used to connect various input / output devices, such as mouse, keyboard, touch device, display screen, etc., so that users can enter information or visualize information.

[0163] Bus 145 is used at least to provide a channel for communication between communication modules 141, memory 142, processor 143, and input / output interface 144 in electronic device 14.

[0164] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 14. In other embodiments of this application, the electronic device 14 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0165] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application.

[0166] The computer-readable storage medium can be the internal memory of the electronic device described in the above embodiments, such as the hard disk or memory of the electronic device. Alternatively, the computer-readable storage medium can be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the electronic device.

[0167] In some embodiments, a computer-readable storage medium may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of the electronic device, etc.

[0168] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0169] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0170] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0171] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0172] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0173] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in this application may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.

[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A base calling method, characterized by, The base recognition method includes: Acquire multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during one sequencing cycle of gene sequencing; Based on the embedding module of the preset base recognition model, feature mapping is performed on the fluorescence intensity sequence corresponding to the multiple fluorescence images to obtain the fluorescence feature sequence; The fluorescent feature sequence is input into the temporal neural network module of the base recognition model to obtain the target feature sequence output by the temporal neural network module; The classification module of the base recognition model classifies the multiple nucleic acid sequence clusters to be tested according to the target feature sequence, thereby obtaining the base category corresponding to the multiple nucleic acid sequence clusters to be tested in the sequencing cycle.

2. The base calling method of claim 1, wherein, The generation of the fluorescence intensity sequence includes: Based on the preprocessed image corresponding to each fluorescence image, extract the nucleic acid sequence clusters to be tested corresponding to the effective pixels and the coordinates of the nucleic acid sequence clusters to be tested; The fluorescence intensity sequence is generated based on the fluorescence intensity data of the coordinates of the multiple nucleic acid sequence clusters to be tested in multiple preprocessed images.

3. The base calling method of claim 1, wherein, The fluorescence intensity sequence has a first dimension and a second dimension. The dimension of the fluorescence intensity sequence in the first dimension represents the number of nucleic acid sequence clusters to be tested, and the dimension in the second dimension represents the number of multiple fluorescence images. The feature mapping of the fluorescence intensity sequences corresponding to the multiple fluorescence images according to the embedding module of the preset base recognition model to obtain the fluorescence feature sequence includes: Based on each fluorescence intensity data in the fluorescence intensity sequence, a lookup table operation is performed on the dense matrix of the embedding module to obtain a vector corresponding to each fluorescence intensity data. The number of element values ​​in each vector is the dimension of the dense matrix in the second dimension. Based on the vector corresponding to each fluorescence intensity data, the fluorescence feature sequence is determined. The fluorescence feature sequence has a first dimension, a second dimension, and a third dimension. The dimension of the fluorescence feature sequence in the first dimension represents the number of nucleic acid sequence clusters to be tested, the dimension in the second dimension represents the number of multiple fluorescence images, and the dimension in the third dimension is the dimension of the dense matrix in the second dimension.

4. The base calling method of claim 3, wherein, The temporal neural network module includes one or more of the following: a recurrent neural network module, a gated recurrent unit module, a long short-term memory network module, a bidirectional recurrent neural network module, a bidirectional gated recurrent unit module, and a bidirectional long short-term memory network module.

5. The base calling method of claim 4, wherein, The gated recurrent unit module includes multiple gated recurrent units. The step of inputting the fluorescent feature sequence into the temporal neural network module of the base recognition model to obtain the target feature sequence output by the temporal neural network module includes: The initial hidden state and the fluorescence feature sequence are input to the gated loop unit module to obtain the updated fluorescence feature sequence and the updated hidden state output by each gated loop unit. The updated fluorescence feature sequence and the updated hidden state output by each gated loop unit are used as the input data for the next gated loop unit. The updated fluorescence feature sequence output by the last gated loop unit in the gated loop unit module is determined as the target feature sequence.

6. The base calling method of claim 5, wherein, The step of inputting the initial hidden state and the fluorescence feature sequence into the gated recurrent unit module to obtain the updated fluorescence feature sequence and updated hidden state output by each gated recurrent unit includes: The fluorescence feature sequence output by the Nth gated loop unit is divided into multiple sub-feature sequences corresponding to multiple time steps, where N is an integer greater than or equal to 1, and the multiple time steps are determined by the dimension of the fluorescence feature sequence output by the Nth gated loop unit in the second dimension. Based on the sub-feature sequence corresponding to the t-th time step and the hidden state corresponding to the (t-1)-th time step, calculate the value of the reset gate and the value of the update gate corresponding to the t-th time step in the N-th gated loop unit, where t is an integer greater than or equal to 1, and the hidden state corresponding to the time step preceding the first time step of the first gated loop unit is the initial hidden state. Based on the sub-feature sequence corresponding to the t-th time step, the hidden state corresponding to the (t-1)-th time step, and the value of the reset gate corresponding to the t-th time step, calculate the candidate hidden state corresponding to the t-th time step; The hidden state corresponding to the t-th time step is calculated based on the candidate hidden state corresponding to the (t-1)-th time step and the value of the update gate corresponding to the t-th time step. Based on the hidden states corresponding to the multiple time steps, the updated fluorescence feature sequence output by the (N+1)th gated loop unit is determined, and the hidden state corresponding to the last time step is determined as the updated hidden state output by the (N+1)th gated loop unit.

7. The base calling method of claim 1, wherein, The classification module of the base recognition model classifies the plurality of nucleic acid sequence clusters to be tested according to the target feature sequence, and obtains the base categories corresponding to the plurality of nucleic acid sequence clusters to be tested in the sequencing cycle, including: The target feature sequence is mapped to multiple preset base categories using the classification module to obtain the confidence level of the target feature sequence for each preset base category; The base category is determined from the plurality of preset base categories based on the confidence level.

8. The base calling method of claim 1, wherein, The data output by the temporal neural network module for the fluorescence feature sequence also includes hidden states, and the method further includes: The hidden state output by the time-series neural network module for the fluorescent feature sequence is used as the initial hidden state input to the time-series neural network module corresponding to the next sequencing cycle. 9.A base recognition model training method, characterized in that, The training method for the base recognition model includes: Multiple training samples were acquired, each training sample consisting of multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during one sequencing cycle of gene sequencing; Based on the embedding module of the preset classification network, feature mapping is performed on the fluorescence intensity sequence corresponding to each training sample to obtain the fluorescence feature sequence corresponding to each training sample. The fluorescence feature sequence corresponding to each training sample is input into the temporal neural network module of the classification network to obtain the target feature sequence corresponding to each training sample output by the temporal neural network module. The classification module of the classification network classifies the multiple nucleic acid sequence clusters to be tested according to the target feature sequence corresponding to each training sample, and obtains the confidence level of the nucleic acid sequence cluster to be tested corresponding to multiple preset base categories for each training sample. The classification network is trained based on the confidence level and base category label of the nucleic acid sequence cluster to be tested corresponding to each training sample to obtain a base recognition model. 10.The base recognition model training method of claim 9, wherein, The step of training the classification network based on the confidence level and base category label of the nucleic acid sequence cluster to be tested corresponding to each training sample to obtain the base recognition model includes: The classification loss is calculated based on the confidence level and base category label of the nucleic acid sequence cluster to be tested corresponding to each training sample; The classification network is trained based on the classification loss to obtain the base recognition model.

11. A base recognition device, characterized in that, The base recognition device includes: The acquisition unit is used to acquire multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during one sequencing cycle of gene sequencing. The feature mapping unit is used to perform feature mapping on the fluorescence intensity sequence corresponding to the multiple fluorescence images according to the embedding module of the preset base recognition model, so as to obtain the fluorescence feature sequence. An input unit is used to input the fluorescent feature sequence into the temporal neural network module of the base recognition model to obtain the target feature sequence output by the temporal neural network module; The classification unit is used to classify the plurality of nucleic acid sequence clusters to be tested according to the target feature sequence through the classification module of the base recognition model, and obtain the base category corresponding to the plurality of nucleic acid sequence clusters to be tested in the sequencing cycle. 12.A base recognition model training apparatus, characterized by comprising: The base recognition model training device includes: The acquisition unit is used to acquire multiple training samples, each training sample including multiple fluorescence images of multiple nucleic acid sequence clusters to be tested during one sequencing cycle of gene sequencing; The feature mapping unit is used to perform feature mapping on the fluorescence intensity sequence corresponding to each training sample according to the embedding module of the preset classification network, so as to obtain the fluorescence feature sequence corresponding to each training sample. The input unit is used to input the fluorescence feature sequence corresponding to each training sample into the temporal neural network module of the classification network to obtain the target feature sequence corresponding to each training sample output by the temporal neural network module. The classification unit is used to classify the multiple nucleic acid sequence clusters to be tested according to the target feature sequence corresponding to each training sample through the classification module of the classification network, and to obtain the confidence level of the nucleic acid sequence cluster to be tested corresponding to multiple preset base categories for each training sample. The training unit is used to train the classification network based on the confidence level of the nucleic acid sequence cluster to be tested and the base category label corresponding to each training sample, so as to obtain a base recognition model.

13. An electronic device, comprising: The electronic device includes: Memory, storing at least one instruction; and A processor executes the at least one instruction to implement the base calling method according to any one of claims 1-8, or to implement the base calling model training method according to any one of claims 9-10.

14. A computer-readable storage medium, characterized in that, A computer program is stored on the computer readable storage medium, and when executed by a processor, implements the base calling method according to any one of claims 1-8, or implements the base calling model training method according to any one of claims 9-10.