Method and device for base identification, electronic equipment and storage medium
The fluorescence matrix in the second-generation sequencing technology is processed through deep learning models, and the base signal is corrected using the spatial position information of the fluorescence cluster, which solves the problem of insufficient base recognition accuracy in the prior art, and achieves more efficient and reliable sequencing results.
Patent Information
- Application Number
- CN202411483395.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-10-22
AI Technical Summary
The existing second-generation sequencing technology has challenges in the accuracy of base recognition, especially on high-density array chips. Due to the crosstalk of fluorescent signals and the resolution limitation of optical imaging systems, base recognition errors are caused, affecting the accuracy of the data and the reliability of subsequent analysis.
A base recognition method based on a deep learning model is proposed. By obtaining the characteristic matrix of the synthesis and sequencing reaction, the matrix includes the position information and brightness information of multiple fluorescence clusters, input the trained prediction model, and output the base recognition results of multiple fluorescence clusters. This method makes full use of the spatial position information of the fluorescent cluster to correct the base signal, improving the accuracy and reliability of the sequencing results.
Through this method, the accuracy and efficiency of base recognition are significantly improved, the computational complexity and resource consumption of data processing are reduced, and it is suitable for high-density array chips, improving the quality and reliability of sequencing results.
Smart Images

Figure CN119694407A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of bioinformatics, and in particular to a method, device, electronic device and storage medium for base recognition. Background Art
[0002] In the field of bioinformatics, gene sequencing technology is a key scientific tool that allows researchers to accurately read the genetic information of organisms. With the development of technology, the next-generation sequencing (NGS) technology has become mainstream, which can generate a large amount of genetic data in a short time and at a low cost. The next-generation sequencing technology, such as the sequencing by synthesis (SBS) method, uses multiple rounds of detection of fluorescently labeled nucleotides to determine the base sequence on the DNA template.
[0003] However, despite significant progress in efficiency and cost, the second-generation sequencing technology still faces challenges in the accuracy of base recognition. In the actual sequencing process, due to crosstalk of fluorescent signals, resolution limitations of optical imaging systems, and lags and advances in sequencing reactions, base recognition errors can occur, affecting the accuracy of the data and the reliability of subsequent analysis. These problems are particularly prominent on high-density array chips, because the distance between fluorescent clusters is reduced and the limitation of spatial resolution makes the signal crosstalk problem more serious. In other words, high-throughput sequencing data and high-accuracy sequencing data are often difficult to achieve at the same time.
[0004] Therefore, the current base recognition methods still need to be further improved. Summary of the invention
[0005] The present application aims to solve at least one of the above technical problems. To this end, the present application proposes a base recognition method that effectively improves the accuracy of base recognition.
[0006] Specifically, this application provides the following technical solutions:
[0007] In a first aspect of the present application, the present application proposes a method for base recognition. According to an embodiment of the present application, the method comprises: obtaining a feature matrix of a sequencing-by-synthesis reaction, the feature matrix comprising a fluorescence matrix composed of position information and brightness information of multiple fluorescence clusters; and inputting the feature matrix into a trained prediction model to output base recognition results of the multiple fluorescence clusters.
[0008] According to the embodiments of the present application, the method can fully utilize the spatial position information of the fluorescent cluster to correct the base signal, effectively improving the accuracy and reliability of the sequencing results.
[0009] In a second aspect of the present application, the present application proposes a device for base recognition. According to an embodiment of the present application, the device includes: a prediction feature acquisition unit, used to acquire a feature matrix of a sequencing-by-synthesis reaction, wherein the feature matrix includes a fluorescence matrix composed of position information and brightness information of multiple fluorescence clusters; and a base recognition unit, used to input the feature matrix into a trained prediction model and output base recognition results of the multiple fluorescence clusters.
[0010] According to the embodiments of the present application, the device can effectively implement the base recognition method of the first aspect, effectively improve the base recognition efficiency, and improve the accuracy and reliability of sequencing results.
[0011] In a third aspect of the present application, the present application proposes a computer program product. According to an embodiment of the present application, the computer program product includes: when part or all of the computer instructions are run on a computer, the method for base identification as described in the first aspect is executed.
[0012] In a fourth aspect of the present application, the present application proposes a computing device. According to an embodiment of the present application, the device comprises: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the computer program to implement the method for base identification as described in the first aspect.
[0013] In a fifth aspect of the present application, the present application proposes a computer-readable storage medium. According to an embodiment of the present application, the storage medium includes computer instructions, and when the instructions are executed by a computer, the computer implements the method for base identification as described in the first aspect.
[0014] In some examples of the present application, the aforementioned computer program product, computing device, and computer-readable storage medium achieve efficient automation and improve recognition efficiency and accuracy by automatically executing the base recognition method through computer instructions. Secondly, the characteristics of the instructions make the above method highly consistent and reliable in different environments.
[0015] It should be noted that, in this article, the features and advantages described in various aspects are applicable to each other.
[0016] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] in:
[0019] Figure 1 A schematic diagram of a base recognition method according to an embodiment of the present application is shown;
[0020] Figure 2 A schematic diagram of a process of calling a prediction model to process input data to obtain a base recognition result according to an embodiment of the present application is shown;
[0021] Figure 3 A schematic diagram showing how to convert an entire image into a group of blocks and write the group of blocks into a group of matrices as input data according to an embodiment of the present application;
[0022] Figure 4 A schematic diagram of a process of training a prediction model according to an embodiment of the present application is shown;
[0023] Figure 5 A schematic diagram of a process of obtaining base recognition results based on U-Net processing input data according to an embodiment of the present application is shown;
[0024] Figure 6 A schematic diagram of the U-Net structure with a CBAM module added according to an embodiment of the present application is shown;
[0025] Figure 7 A schematic diagram of the structure of an input convolutional layer according to an embodiment of the present application is shown;
[0026] Figure 8 A schematic diagram of the structure of a CBAM layer according to an embodiment of the present application is shown;
[0027] Fig. 9 A schematic diagram of the structure of a downsampling layer according to an embodiment of the present application is shown;
[0028] Fig.10 A schematic diagram of the structure of an upsampling layer according to one embodiment is shown.
[0029] Fig.11 A schematic structural diagram of a base recognition device according to another embodiment of the present application is shown;
[0030] Fig.12A schematic structural diagram of an electronic device according to another embodiment of the present application is shown. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] In this application, the terms "first", "second", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number or order of the indicated technical features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0033] The term "sequencing" herein refers to gene sequencing, which refers to determining the nucleotide sequence of a nucleic acid molecule, including DNA sequencing and / or RNA sequencing. Including long fragment sequencing and / or short fragment sequencing. Sequencing is the identification and determination of the types of bases at multiple continuous or non-continuous positions on the nucleic acid molecule sequence. In some examples of the present application, sequencing is sequencing by synthesis (SBS), including the process in which nucleotides or nucleotide analogs are bound to a template, also referred to as base extension reaction. In addition, sequencing by synthesis as referred to in the present application refers to the process of identifying the type of at least one base on a template by a round of sequencing detection, and also includes sequencing similar to SBS such as the generally referred to sequencing by hybridization (SBH), sequencing by connection (SBL).
[0034] According to an embodiment of the present application, a sequencing run generally includes multiple repetitions, such as a repetition of an SBS using a reversible terminator includes an extension reaction-signal acquisition-excision, and this process may also be referred to as a cycle. Sequencing generally includes multiple rounds, each of which includes identifying bases at one or more positions connected or incorporated into a series of templates. A round of sequencing, also referred to as a "sequencing round", can be defined as a process of completing an extension of four nucleotides / bases. In other words, a round of sequencing may refer to the process of identifying and detecting a base position on any template.
[0035] For example, a round of sequencing includes the following steps: under conditions suitable for polymerization, four nucleotides (including any analogs) are sequentially or simultaneously contacted with a template to cause a base extension reaction. Capture or collect signals from the base extension reaction. According to the base pairing principle, for example, under the catalysis of DNA polymerase, the substrate (nucleotide or its analog) is connected to the sequencing primer and / or template, and paired with the base at a specific position of the template. A round of sequencing can include one or more base extensions (repeat). For example, four nucleotides are added to the reaction system in sequence, and base extension and signal collection are performed after each addition, so a round of sequencing can include four base extensions. If the nucleotides are added in a specific combination (such as a combination of two or three), each combination is base extended and signal collected separately, and a round of sequencing can include two base extensions. If the four nucleotides are added to the reaction system at the same time, the base extension and signal collection are completed at one time, then a round of sequencing includes one base extension.
[0036] In the present application, the term "fluorescent cluster" refers to a nucleic acid molecule or template to be tested; in certain embodiments, it specifically refers to a collection of nucleic acid molecule clones to be tested that have generated a specified sequencing reaction signal. A so-called nucleic acid molecule clone to be tested contains multiple nucleic acid molecules with the same nucleotide sequence, also known as an amplicon, cluster, group, DNA nanoball, etc. These fluorescent clusters emit detectable signals in the reaction through fluorescently labeled bases or other markers, and the signal detection is used to realize the identification of the nucleotide sequence on the DNA template. Specifically, the fluorescent cluster is imaged and detected during the sequencing process, for example, and the base arrangement order of the DNA template at the corresponding position is determined based on the intensity and position information of the detected signal.
[0037] In this application, the term "fluorescence matrix" refers to data in a matrix form consisting of position information and brightness information of multiple fluorescent clusters. Each row or column represents a fluorescent cluster, and its position on the chip surface is represented by the position coordinates in the matrix, while the brightness information represents the signal intensity of the fluorescent cluster. The so-called fluorescence matrix is constructed based on the original image obtained by chip imaging or the original image after processing, such as denoising and background removal.
[0038] Based on the information of the original image including the processed image, the position and intensity / brightness (fluorescence brightness) of the fluorescence cluster is determined. The fluorescence brightness can be a real or objective absolute value or a relative value. Including various deformations of the pixel value or sub-pixel value or sub-pixel value based on the position, such as enlarged, reduced, based on a certain ratio or relationship such as a normalized value, etc. Generally, involving the intensity / pixel size of one or more images or bright spots (fluorescence clusters) or positions, the intensity / pixel size of these images or bright spots or positions is the intensity / pixel size after the same processing, such as objective pixel values or pixel values after the same deformation processing. Involving the extraction or analysis of information of one or more images of the same area such as the same field of view, it is preferred to align these images so that they are located in the same coordinate system. The so-called pixels or pixel values include but are not limited to pixels, sub-pixels and sub-pixels. In some examples of the present application, the fluorescent cluster positioning coordinates are accurate to the sub-pixel level. For example, the brightness value at the sub-pixel level can be determined by interpolation, so as to obtain more accurate or stable and reliable training data and / or input data, which is conducive to constructing a model with accurate and reliable prediction results or facilitating obtaining accurate prediction results based on the constructed model.
[0039] The aforementioned "bright spots" or "bright spots" (spots or peaks) refer to the positions on the image where the signal is greater than the background, and a general spot occupies at least one pixel. At least a portion of the bright spots are fluorescent clusters reflecting the occurrence of a specified biochemical reaction. In some embodiments, fluorescent clusters and bright spots can be used interchangeably, and those skilled in the art can understand from the context.
[0040] In this application, a "prediction model" is a computing model or algorithm that automatically predicts classification results by processing and analyzing input data. In some examples of this application, the prediction model is a single model, which is a neural network that can achieve semantic segmentation (sometimes referred to as a semantic segmentation model); in other examples, the prediction model is a cascade model, consisting of multiple machine learning sub-models in series. Each machine learning sub-model can use various algorithms and techniques, such as deep learning / neural networks, support vector machines, decision trees, random forests, etc., and can be trained and optimized through supervised learning, unsupervised learning, or reinforcement learning.
[0041] The chip referred to in the embodiments of the present application is also called a surface, including random chips and array chips. The so-called array chip is also called a patterned chip or surface (patterned), on which, for example, a large number of tiny reaction units (such as holes or micropores) are regularly arranged, so that the nucleic acid molecules or molecular clusters to be tested are connected to the holes to achieve high-throughput detection and analysis of nucleic acid molecules. Specifically, for example, the DNA molecules to be tested are connected to the surface of the chip, so that the nucleic acid molecules to be tested on the surface react and detect the reaction signals from the surface, such as imaging the surface, and determining at least a portion of the sequence of the DNA molecules to be tested based on the processing and analysis of these images.
[0042] Furthermore, for patterned surfaces, the positions and relative distances of fluorescent clusters / holes are predetermined, or the relative positional relationship between the reaction zone and the labeling zone (tracer) is known. Generally, the position of the labeling zone can be determined by identifying signals from the labeling zone, and then the positions of the reaction zones, such as the holes (fluorescent clusters) in the reaction zone, can be determined.
[0043] Understandably, in pursuit of flux, it is generally desirable to make the gaps between the holes smaller, even gapless or partially overlapping (multiple fluorescent clusters are connected in one hole), however, due to the detection limit of the detection means, for example, detection relying on optical imaging is limited by the optical diffraction limit, etc., the spacing between different fluorescent clusters becomes smaller, which will make the detection and recognition of the fluorescent cluster signal at the specified position more obviously interfered by the signals of the fluorescent clusters at other positions or the context itself. To this end, the embodiments of the present application provide a base recognition scheme based on a prediction model, which can eliminate or reduce the influence of various crosstalk interferences on the accuracy of the base recognition results.
[0044] This application is based on the discovery, testing and verification of the following problems by the inventors:
[0045] In high-throughput sequencing, sequencing results are affected by adjacent bases from the same fluorescent cluster, adjacent fluorescent clusters, etc., such as phase imbalance of the same fluorescent cluster (multiple molecules with the same sequence in a fluorescent cluster react asynchronously), chromatic aberration, energy transfer of the same or different fluorescent cluster signals, crosstalk, biochemical reaction efficiency and other factors that often affect the accurate identification or detection of the signal of the specified fluorescent cluster in this round of reaction. Therefore, such signal interference is often corrected, such as phasing / prephasing correction, crosstalk correction, etc. In the process of base recognition of array chips by traditional algorithms, the position of the holes (fluorescent clusters) on the image is generally determined first, and then the brightness information at each hole position is extracted, and then the base recognition results of each hole position are determined based on these brightness characteristics. However, the traditional base recognition method also considers the influence of the previous and next rounds of signals on the current round of signal detection, such as reaction lag phase loss (phasing) correction and reaction advance phase loss (prephasing). However, a unified correction parameter is usually used, that is, a unified parameter is determined to uniformly correct the brightness information of all fluorescent clusters in this round, which makes it difficult to accurately correct the signals of each fluorescent cluster. In addition, the traditional base recognition algorithm usually processes the signal of each fluorescent cluster independently and determines the base type by extracting the fluorescent signal features. It can be seen that the traditional method does not fully consider the influence of the spatial position information of each fluorescent cluster, the context of the fluorescent cluster, etc. on the occurrence and recognition of the current round of reaction signals of the specified fluorescent cluster.
[0046] Based on the above shortcomings, the inventors of the present application have proposed a method for base recognition using the brightness information of the front and rear rounds in a single fluorescent cluster. Specifically, the inventors of the present application have proposed recording the fluorescence brightness corresponding to each fluorescent cluster of the array chip in a matrix form according to the spatial arrangement, processing it through a deep learning model, and considering the context information of the brightness matrix of adjacent multiple rounds of fluorescent clusters. Using the deep learning model, the spatial fluorescence crosstalk between adjacent fluorescent clusters is corrected, and the context influence of each fluorescent cluster is independently processed, including the correction of reaction lag dephasing (phasing), the correction of reaction advance dephasing (prephasing), the influence of context bases (or bases on the template) on the current base fluorescence brightness, and the elimination of pattern error preferences caused by context base arrangement characteristics. Thus, the present invention is completed, and the inventors have found that this method has obvious advantages in processing efficiency. Since only the brightness information at the center of the fluorescent cluster is input into the model in matrix form, compared with the traditional algorithm directly inputting the original image, the data size is reduced, and the operation efficiency and calculation speed of the algorithm are improved.
[0047] Specifically, in the first aspect, the present application proposes a method for base recognition, referring to Figures 1 to 9 , the method comprising:
[0048] S100: Obtaining a characteristic matrix of a sequencing-by-synthesis reaction, where the characteristic matrix includes a fluorescence matrix composed of position information and brightness information of a plurality of fluorescence clusters.
[0049] Sequencing by Synthesis (SBS) is a high-throughput sequencing technology commonly used in second-generation sequencing platforms. In SBS, DNA fragments are fixed on a chip, and then complementary chains are synthesized by gradually adding nucleotides with different fluorescent labels. The type of nucleotide added each time (A, T, C or G) is detected and recorded by the color of its fluorescent label. As the sequencing process proceeds, the base sequence of the target DNA template can be gradually constructed by continuously adding nucleotides and recording the fluorescent signal.
[0050] Sequencing by synthesis based on surface fluorescence imaging includes multiple rounds of sequencing reactions, each round of sequencing reaction includes collecting images after the extension reaction of the designated area (fluorescent cluster) on the surface, and then analyzing and processing the target round of the area or the images before and after the target round to determine the extension reaction information of the target round. In this step, the characteristic matrix of the sequencing by synthesis reaction is obtained, which is a simplified representation of the extension reaction information of the fluorescent clusters on the designated area image or surface, reflecting the target signal of the fluorescent clusters in a certain surface area in one or more images of a certain round. Specifically, the sequencing data is provided by the fluorescence information of each fluorescent cluster. The fluorescent cluster is a group of fluorescent signals generated by a single DNA template fixed on the chip and amplified. For the array surface, the fluorescent clusters (or holes connected to the fluorescent clusters) are regularly arranged, and the spatial position relationship between the reaction area where the fluorescent clusters are located and the labeling area (tracing area) is known, so that by identifying the position of the labeling area, the position of each fluorescent cluster can be quickly determined. In addition, according to an embodiment of the present application, the brightness information refers to the intensity of the signal from the fluorescent cluster. According to the embodiments of the present application, taking four-color fluorescence sequencing as an example, each field of view (FOV) will obtain 4 pictures in each round of sequencing, which are fluorescence images taken under four fluorescence channels A, G, C, and T. By further analyzing these fluorescence images, the signal intensity of each fluorescence cluster can be obtained, and combined with the position information of each fluorescence cluster, a series of fluorescence matrices can be obtained for subsequent analysis.
[0051] According to an embodiment of the present application, in this step, the feature matrix obtained includes a fluorescence matrix composed of position information and brightness information of multiple fluorescence clusters. The fluorescence matrix is a data structure, which contains the position and brightness information of all fluorescence clusters. Each element in the matrix corresponds to a specific fluorescence cluster. The position of the element in the matrix reflects the position of the cluster on the image or surface, and the value of the element reflects the brightness information of the cluster. By processing the fluorescence matrix input data through the prediction model, the type of bases connected or incorporated into each fluorescence cluster in a specified round of a certain field of view can be quickly and accurately predicted. According to an embodiment of the present application, the sequencing-by-synthesis reaction is performed on an array chip, and the position information is determined based on the center position of the hole where the fluorescence cluster is located. According to an embodiment of the present application, the brightness information is determined based on the original fluorescence brightness of the fluorescence cluster.
[0052] According to an embodiment of the present application, the brightness information is obtained by performing at least one of a background removal operation and a correction operation on the original fluorescence brightness. According to an embodiment of the present application, the correction operation includes at least one of a lag correction, a pre-phasing correction, and a cross talk correction. According to an embodiment of the present application, the correction operation here is not special, and a method for determining a correction coefficient can be used. Specifically, according to an embodiment of the present application, in a platform for determining nucleic acid sequences based on optical imaging, after the image is acquired, for base recognition, the position of each hole on the fluorescence image will first be determined according to the known chip design layout, and then the brightness information at the hole position will be extracted, that is, the fluorescence signal corresponding to the fluorescence cluster in the hole. Then, according to the brightness characteristics corresponding to each hole position, the base recognition results at each hole are determined respectively. Next, by examining the brightness characteristics of the front and rear wheels, phasing correction (i.e., delayed phase loss due to incomplete reaction) and prephasing correction (i.e., phase loss due to failure to block and reaction of more than one base) can be performed. For example, the brightness information of the front and rear wheels can be counted as the brightness distribution characteristics corresponding to all fluorescent clusters, and unified correction parameters can be calculated. Further, the brightness information obtained by all fluorescent clusters in this round of sequencing will use the same set of correction parameters for phasing and prephasing correction. According to an embodiment of the present application, crosstalk correction can also be performed in a similar manner. Specifically, the data of each fluorescent cluster can be corrected by calculating the crosstalk correction coefficient between the signals of each channel.
[0053] According to an embodiment of the present application, the collected image is processed, including simplifying and extracting the information of the target signal on the calculated image and writing it in a matrix form that is easy for the machine to recognize and process, so that the size of the input data is significantly reduced, the requirements for storage and / or computing power are reduced, and it is conducive to quickly processing the input data to obtain base recognition results. Through deep learning or other machine learning techniques, useful patterns and associations can be extracted from these feature matrices, thereby improving the accuracy and reliability of sequencing. This method is particularly suitable for eliminating or reducing sequencing errors introduced into base recognition results due to factors such as fluorescence signal space and / or context crosstalk, including reaction lag and advance. Through this method, these errors can be corrected more effectively, thereby obtaining high-quality sequencing data.
[0054] According to an embodiment of the present application, the prediction model is a deep learning model, and the deep learning model is used to perform at least one of spatial crosstalk correction and contextual influence correction. According to an embodiment of the present application, the deep learning model is used to output the base recognition result matrix of the Nth round extension reaction based on the fluorescence brightness matrix of the Nmth round to the N+nth round extension reaction, wherein m and n are each independently integers, preferably m is not less than n, and more preferably m is greater than n. According to an embodiment of the present application, by designing in this way, the prediction model can capture the long-term dependence in the sequencing process, and by considering the information of multiple rounds, the model can better understand and correct the sequencing errors caused by signal crosstalk and contextual effects. In addition, the base recognition of the current round may be affected by the addition of multiple rounds of bases in the previous rounds. In this way, the model can more accurately predict the base type of each fluorescent cluster, thereby improving the accuracy and reliability of sequencing.
[0055] According to an embodiment of the present application, the fluorescent matrix is obtained by photographing the array chip during the sequencing-by-synthesis process and processing the obtained photograph (image).
[0056] According to an embodiment of the present application, the processing includes: dividing the photo into a plurality of sub-regions; and identifying the plurality of sub-regions respectively, so as to obtain a plurality of the feature matrices.
[0057] According to an embodiment of the present application, dividing a photo into multiple sub-regions can improve the locality of data processing, and related data (data points close in space) can be stored and processed together, thereby reducing the time of data access and the bandwidth requirements of the memory. Since the sub-regions can be identified independently, this method allows data to be processed in parallel on multiple processors or computing cores, significantly improving the speed and efficiency of data processing. Through sub-region division, the system can flexibly adapt to different hardware configurations and computing resources. For example, when there are more computing resources, the number of sub-regions can be increased to improve parallelism. If there is a problem with the data in a certain sub-region, this method allows only that specific region to be reprocessed instead of the entire image, thereby improving the fault tolerance of the system. Independent identification of sub-regions can improve the accuracy of feature extraction, because the identification parameters can be adjusted for the specific features of each region, rather than using a unified processing method for the entire image. In addition, after obtaining multiple feature matrices, information from different sub-regions can be combined through feature fusion technology to obtain more comprehensive data analysis results. As a result, this method can adapt to fluorescent clusters of different densities and distributions, because it allows the system to adjust the size and shape of the sub-regions according to the actual distribution of fluorescent clusters. In addition, by processing only specific parts of the image, the consumption of computing resources can be reduced, especially when processing large-scale image data, this method can significantly reduce the required computing power and storage requirements. According to an embodiment of the present application, for uneven illumination or local damage that may exist on the array chip, sub-region processing can reduce the impact of these factors on the entire data set and improve the robustness of the overall data. The multiple feature matrices obtained can be used for subsequent analysis and processing, such as base recognition, variation detection or other bioinformatics analysis, providing researchers with more flexibility and control capabilities.
[0058] According to an embodiment of the present application, the plurality of feature matrices contain at least one piece of information determined based on the position of the sub-region. This facilitates the analysis and positioning of the sub-region. According to an embodiment of the present application, at least a portion of the plurality of sub-regions has an overlapping region. According to an embodiment of the present application, by creating overlapping regions between sub-regions, the redundancy of data can be increased. This redundancy helps to improve robustness during data processing, because even if the data in a certain area is affected by noise or damage, the data in the overlapping region can provide additional information to compensate for these losses. The overlapping region ensures that the feature matrices between different sub-regions are continuous at the boundaries. This is particularly important for analysis that requires continuous data input, such as when performing image stitching or feature tracking. When merging the data of multiple sub-regions into a complete data set, the overlapping region can be used as a buffer to reduce stitching errors. By comparing and aligning the data in the overlapping region, the data of each sub-region can be more accurately fused together. During data analysis, the overlapping region can be used for error correction. For example, if the data quality of an area is poor, the data of the adjacent overlapping region can be used for correction or replacement.
[0059] In a specific example, Figure 3 The image is converted into a set of sub-region matrices (block matrices). Block matrices of different sizes are filled with zeros to the same size as input, so the entire image is converted into a total of 3*3, or 9 blocks. The length and width of a block may be different, so after splitting into 9 blocks, the edges of all blocks with a size less than b*y can be filled with 0 values to a size of b*y. Finally, an additional position encoding layer is added according to the position number of the block in the entire image. For example, the block number in the lower right corner is 9, and a layer of Pos (P) position encoding is filled with all values 9 to obtain the final input matrix. In this way, the running speed is further improved.
[0060] S200: After obtaining the feature matrix, the feature matrix may be input into a trained prediction model to output base recognition results of multiple fluorescent clusters.
[0061] refer to Figures 2 to 5According to the embodiment of the present application, by adopting the feature matrix, the position and brightness information of multiple fluorescent clusters are integrated, so that the model can consider these factors at the same time for base recognition, thereby improving the accuracy of recognition. According to the embodiment of the present application, compared with processing the entire original image, the feature matrix is processed by dimensionality reduction, the amount of data is reduced, and thus the computational complexity and resource consumption are reduced. According to the embodiment of the present application, by adopting the feature matrix, the model can learn and predict faster, especially in large-scale data processing, the operation efficiency can be significantly improved. According to the embodiment of the present application, as mentioned above, the feature matrix is pre-corrected by preliminary lag (phasing), advance (pre-phasing) and crosstalk (crosstalk), and these correction operations help to eliminate common errors in the sequencing process. In addition, according to the embodiment of the present application, the form of the feature matrix includes explicitly extracting and representing the position and intensity information of each fluorescent cluster, which helps to analyze and interpret the prediction results of the model. At the same time, the feature matrix not only effectively reflects the information of the target (amplicon) on the image, but also the data form is easy for computer recognition and operation, and can be easily integrated with other models or algorithms, which provides convenience for future technical upgrades and functional expansion. By comprehensively considering multiple relevant factors, the feature matrix can help the model predict the base sequence more accurately, thereby improving the quality of the final sequencing results.
[0062] According to the embodiments of the present application, the so-called prediction model is a single model, which is a network capable of implementing semantic segmentation (referred to as a semantic segmentation model). Specifically, in some examples, the semantic segmentation model is selected from at least one of U-Net, DeepLab, SegFormer, PSPNet, FCN, GCN and their respective variants. By processing input data using the prediction model, prediction results can be obtained quickly and accurately, which is particularly suitable for working environments that have been configured with strong computing capabilities.
[0063] According to an embodiment of the present application, the prediction model is a machine learning model, and the machine learning model includes at least one of the following: a first sub-model for spatial crosstalk correction; and a second sub-model for contextual influence correction. According to an embodiment of the present application, optionally, the first sub-model is used to output the base classification prediction probability matrix of the single round extension reaction based on the fluorescence matrix of the single round extension reaction; the second sub-model is used to output the base recognition result matrix of the Nth round extension reaction based on the base classification prediction probability matrix of the Nmth round to the N+nth round extension reaction, wherein the base classification prediction probability matrix of the Nmth round to the N+nth round extension reaction is generated by the first sub-model. Wherein, N and m are both positive integers, and N is not less than m, m and n are different integers, preferably m is not less than n, and more preferably m is greater than n.
[0064] According to an embodiment of the present application, the prediction model is composed of two sub-models, each of which is responsible for different correction tasks, further improving the accuracy and efficiency of base recognition. Among them, the first sub-model focuses on correcting the spatial crosstalk effect, which usually occurs between high-density fluorescent clusters, where the signals of adjacent fluorescent clusters may interfere with each other. By specifically correcting the spatial crosstalk, the base recognition accuracy of adjacent fluorescent clusters can be significantly improved. The second sub-model handles contextual influences, that is, the recognition of the current base may be affected by the previous and next bases in the sequence, and this correction helps to reduce the recognition errors caused by sequence dependence. In addition, the first sub-model can independently generate a base classification prediction probability matrix based on a single round of fluorescence matrix, which allows the model to focus on the specific features of each round and improve the accuracy of single-round base recognition. The second sub-model is based on the multi-round base classification prediction probability matrix obtained from the first sub-model, taking into account the information of multiple rounds, which can reveal the long-term dependence of base recognition and improve the accuracy of overall recognition. The term "long-term dependence" used here refers to the correlation or influence between elements or events that are far apart in a sequence. This dependency suggests that the current state or value in the sequence may be affected by states observed earlier in the sequence, and these effects may span multiple sequence positions.
[0065] According to an embodiment of the present application, by analyzing the extension reaction from Nm to N+n rounds, the model can learn the short-term and long-term dependencies of the sequence, which helps the model to better understand and predict complex sequence patterns.
[0066] In addition, according to the embodiments of the present application, the design of the two sub-models allows independent optimization and updating, making the model more flexible and easy to maintain, and modularity also facilitates adjustment and improvement for specific problems.
[0067] According to the embodiment of the present application, through two stages of correction and prediction, the model can more accurately predict the base type of each fluorescent cluster. This two-stage method can gradually refine the prediction results and improve the credibility of the final prediction.
[0068] It will be appreciated by those skilled in the art that merging spatial information and context information into a complete input feature data for training will result in an excessively large input feature dimension, requiring a larger amount of training data, and the model will also become complicated, thereby increasing the computing power and time cost required for training. In the present application embodiment, by separately training and modeling spatial information and context information, the feature dimension of each sub-model is relatively small, so the amount of training data and complexity required for each model will not be too high. The independent training and operation of the sub-model can not only optimize the use of computing resources and reduce the overall computing cost, but also improve the data processing speed through parallel processing, making full use of the advantages of modern computing architecture. Through this comprehensive method of utilizing spatial crosstalk correction and context influence correction, the accuracy and efficiency of base recognition can be significantly improved, providing a powerful analysis tool for high-throughput sequencing.
[0069] In addition, according to an embodiment of the present application, a sub-model for context influence correction can be first used to predict the base classification prediction probability matrix of a given round of extension reaction, and further a sub-model for spatial crosstalk correction can be used to output the base recognition result of a given round of extension reaction. Specifically, according to an embodiment of the present application, the prediction model is a machine learning model, and the machine learning model may include at least one of the following: a third sub-model for context influence correction; and a fourth sub-model for spatial crosstalk correction. According to an embodiment of the present application, the third sub-model is used to output the base classification prediction probability matrix of the Nth round of extension reaction based on the fluorescence matrix of each fluorescence channel of the Nmth round to the N+nth round of extension reaction; the fourth sub-model is used for the base classification prediction probability matrix of the Nth round of extension reaction, and outputs the base recognition result matrix of the Nth round of extension reaction.
[0070] According to an embodiment of the present application, the above sub-models (including the first, second, third, and fourth sub-models) are trained independently using non-overlapping training samples. According to an embodiment of the present application, each sub-model uses an independent training data set, which reduces the risk of decreased generalization ability due to overfitting of the model on the training data, and independent training helps to ensure that each sub-model can learn the general features in the data, rather than just remembering the specific noise or outliers of the training sample. According to an embodiment of the present application, since each sub-model is optimized for different data sets, the entire system has better adaptability and robustness for sequencing data from different sources or types, and each sub-model can focus on learning to correct a specific type of sequencing error (such as spatial crosstalk or contextual influence), thereby improving the professionalism and effect of the correction. According to an embodiment of the present application, since the sub-models are trained independently, model training can be performed in parallel, which helps to speed up the entire training process, especially when there are a large number of computing resources. Independently trained sub-models are easier to maintain and update. If a specific type of correction needs to be improved, only the corresponding sub-model can be retrained. . According to an embodiment of the present application, if the final prediction result is wrong, it can be more easily traced back to which sub-models may have problems, so as to make targeted adjustments. According to an embodiment of the present application, using different training samples can ensure that each sub-model can learn different aspects of the data, increasing the diversity of features learned by the model. In summary, through this independent training method, each sub-model can achieve optimal performance in its professional field, and the entire system can combine the advantages of each sub-model to provide more accurate and reliable base recognition results.
[0071] According to an embodiment of the present application, the sub-models (including the first, second, third, and fourth sub-models) each independently adopt a neural network structure based on U-Net.
[0072] According to an embodiment of the present application, the sub-models independently adopt at least one of a semantic segmentation network structure, an encoder-decoder network structure or a Transformer network structure. According to an embodiment of the present application, the encoder-decoder network structure includes at least one of a U-Net network or its variants, and DeepLap. According to an embodiment of the present application, the Transformer network structure includes Segformer. According to an embodiment of the present application, an attention mechanism is provided in at least one layer of the neural network structure based on U-Net, and optionally, the attention mechanism includes at least one of a channel attention unit and a spatial attention unit. According to an embodiment of the present application, the channel attention unit and the spatial attention unit independently adopt at least one of a SE attention mechanism and a CBAM attention mechanism. According to an embodiment of the present application, the channel attention unit and the spatial attention unit both independently adopt a CBAM attention mechanism. According to an embodiment of the present application, the spatial attention unit adopts the output result of the channel attention unit as an input feature. According to an embodiment of the present application, the attention mechanism only includes a channel attention unit that adopts the SE attention mechanism.
[0073] According to a more specific embodiment, at least one layer of the U-Net-based neural network structure is provided with an attention mechanism, and the attention mechanism includes at least one of a channel attention unit and a spatial attention unit. Thus, according to an embodiment of the present application, when the attention mechanism is set in the U-Net-based neural network structure, the mutual crosstalk between channels and the influence between each fluorescent cluster in space are indeed taken into account. Specifically, the design of the channel attention unit allows the model to evaluate the importance of different channels, which can help reduce or correct the mutual crosstalk between channels. Through the global pooling layer and the MLP subunit, the model can identify which channels contain more relevant information, thereby reducing the interference of noise and irrelevant features during the feature extraction process. The spatial attention unit enables the model to focus on key areas in space, which helps to identify and correct the spatial crosstalk caused by the close distance between fluorescent clusters. By merging the two-dimensional matrix of each channel and applying the compression layer, the model can enhance the recognition of the spatial distribution characteristics of the fluorescent clusters, thereby improving the spatial analysis accuracy of the sequencing data. According to the embodiments of the present application, by adopting the attention mechanism, the model has taken into account the complexity of the channel and spatial dimensions in the sequencing data and their potential impact on the accuracy of base recognition when designing. By paying attention to the channel and spatial dimensions independently, the model can adapt to different data characteristics more flexibly and improve the robustness to various sequencing errors. In addition, the attention mechanism enables the model to more accurately locate and emphasize important fluorescent signals during feature extraction, while suppressing or reducing errors caused by crosstalk.
[0074] According to an embodiment of the present application, the channel attention unit includes: a first pooling subunit, the first pooling subunit uses a first global maximum pooling layer and a first global average pooling layer to merge the channels of the input data of the channel attention unit to reduce the number of channels of the input data; a neural network MLP subunit, which uses shared parameters to process the output data of the first global maximum pooling sublayer and the output data of the first global average pooling sublayer, respectively, to obtain maximum pooling conversion data and average pooling conversion data; a convolution processing subunit, which uses multiple convolution kernels to perform channel restoration on the maximum pooling conversion data and the average pooling conversion data respectively; an output layer, which is used to merge and activate the output data of the convolution processing subunit and multiply it with the input data of the channel attention unit to obtain the output data of the channel attention unit. According to an embodiment of the present application, the first pooling subunit reduces the number of channels by global maximum and average pooling, which helps the model identify the most important channel features. The MLP subunit further processes these features so that the model can encode the importance of each channel and selectively emphasize key information. By multiplying the results of the convolutional processing subunits with the original input through the output layer, the channel attention unit can dynamically adjust the contribution of each channel to the final feature representation. This gating mechanism allows the model to flexibly adjust in different situations, enhance useful features and suppress noise. In addition, the channel restoration step helps to restore the channel dimension reduced by the pooling operation, while enhancing the expressiveness of the features and ensuring that the model does not lose important information.
[0075] According to an embodiment of the application, the channel attention unit includes: the channel attention unit adopts the SE attention mechanism, which may include:
[0076] A compression subunit, wherein the compression subunit compresses the feature matrix of each channel by global average pooling, and optionally compresses it into a numerical value;
[0077] An excitation subunit, wherein the excitation subunit learns the weight relationship between the channels through a fully connected layer and outputs the weight of each channel. Optionally, the excitation subunit further includes a first fully connected layer, a ReLu activation layer, a second fully connected layer and a Sigmoid activation layer;
[0078] A recalibration layer is used to multiply the weights of the channels by the feature matrix of each channel to obtain an output result of the attention unit.
[0079] According to an embodiment of the present application, the features of certain channels can be enhanced or suppressed through the SE attention mechanism.
[0080] According to an embodiment of the present application, the spatial attention unit includes: a second pooling subunit, the second pooling subunit uses a second global maximum pooling layer and a second global average pooling layer to merge the two-dimensional matrix of each channel of the output data of the channel attention unit; a compression layer, the compression layer uses a convolution kernel to compress and activate the output data of the second global maximum pooling layer and the second global average pooling layer; an output layer, which is used to multiply the output data of the compression layer with the output data of the channel attention unit to obtain the output data of the spatial attention unit. According to an embodiment of the present application, the second pooling subunit performs a spatial pooling operation on the output of the channel attention unit, which helps the model identify key spatial areas in the image. This operation enables the model to focus on the spatial features that are most critical to the prediction task. The compression layer compresses the output of the second pooling subunit, extracts representative information of the spatial features, and forms a more abstract feature representation. This helps the model capture a wider range of spatial contextual information, not just local details. The output layer of the spatial attention unit multiplies the result of the compression layer with the output of the channel attention unit to achieve dynamic adjustment of the spatial features. This operation enables the model to balance its attention among different regions, strengthening the features of important regions and ignoring irrelevant background.
[0081] According to an embodiment of the present application, the structure of the channel attention unit enables it to focus on identifying and emphasizing the most important features in the channel dimension, while the structure of the spatial attention unit enables it to focus on capturing and emphasizing key areas in the spatial dimension. The channel attention unit performs complex feature transformations through MLP, while the spatial attention unit abstracts and compresses spatial information through a compression layer. The output of the channel attention unit directly affects the contribution of each channel, while the output of the spatial attention unit affects the spatial feature representation of the entire image. This structural difference enables the channel attention unit and the spatial attention unit to work together, optimizing the selection and emphasis of feature channels on the one hand, and strengthening the correlation and expression of spatial features on the other hand, thereby jointly improving the model's analysis capabilities and prediction accuracy for sequencing data.
[0082] It should be noted that, according to the embodiments of the present application, SE (Squeeze-and-Excitation) and CBAM (Convolutional Block Attention Module) are two different attention mechanisms, both of which can be used to improve the feature recognition ability of sequencing data, especially the processing of fluorescent signals in gene sequencing. According to the embodiments of the present application, the SE mechanism is implemented by global average pooling and two fully connected layers, with a simple structure and high computational efficiency. Due to the simple structure, the SE module requires fewer parameters, which reduces the complexity of the model and the risk of overfitting. In addition, SE can learn the importance of different channels, automatically highlight useful features and suppress irrelevant features, and can be easily embedded in existing convolutional neural networks to improve existing models without major architectural adjustments. According to the embodiments of the present application, CBAM takes into account the attention of both channel and space dimensions, and can capture features more comprehensively. Through the spatial attention mechanism, CBAM can identify key spatial positions in images, which is particularly effective for processing data with spatial correlation. CBAM enhances the model's ability to express features through fine-grained control of channels and spatial features.
[0083] In the context of gene sequencing, the choice between SE and CBAM should be based on specific task requirements. If the task focuses mainly on the relationship between channels and requires a lightweight solution, SE may be a better choice. However, if the task requires considering both channel and spatial information, especially when analyzing sequencing data on high-density array chips, CBAM may provide a more comprehensive feature focus, thereby improving sequencing accuracy and reliability. Although CBAM has a higher computational cost, the performance improvement it brings may be crucial in complex bioinformatics data analysis.
[0084] For ease of understanding, refer to Figure 2 to Figure 10 , the training process of the model is described in detail:
[0085] Construct a training data set with known real base recognition results (or highly reliable base sequences), and train the model based on this training data to make it learn the association between input data and base recognition results. Figure 2 and Figure 3 The model training process includes data extraction and preprocessing, and model training. More specifically, it can be carried out through the following steps:
[0086] Collect raw data generated by the sequencing platform, which usually includes raw images or signal intensity data obtained from the sequencing instrument;
[0087] Perform quality control on raw data and eliminate low-quality data, such as sequencing data with excessively high error rates or noise;
[0088] Use a high-quality reference genome to align with the sequencing data to determine the known base sequence;
[0089] Align the sequencing data with the reference sequence to determine the base type at each position in the sequencing data. This step may use various alignment tools, such as BWA, Bowtie, etc.
[0090] Based on the alignment results, a target matrix or label matrix is constructed, which contains the correct base sequence of each sequencing position;
[0091] Extract features from the raw sequencing data, such as fluorescence intensity, signal pattern, etc., which will serve as input to the model;
[0092] Preprocess the input features, including normalization, background noise removal, and correction operations (such as lag correction, lead correction, and crosstalk correction);
[0093] Divide the dataset into training, validation, and test sets to evaluate the performance of the model and prevent overfitting;
[0094] Make sure that each sample in the training dataset has the correct label, that is, the known base sequence.
[0095] In addition, according to the embodiments of the present application, the diversity and coverage of the data set can be increased through data augmentation technology to improve the generalization ability of the model. If necessary, it is necessary to ensure that the data set represents the diversity of the target genome to avoid bias, which is crucial to improving the applicability of the model on different samples.
[0096] According to an embodiment of the present application, the data enhancement technology includes but is not limited to at least one of the following:
[0097] Rotation and flipping: Rotate or flip the image data to simulate different observation angles, which helps the model learn more robust features.
[0098] Scaling and Cropping: Resizing or cropping different parts of an image can simulate different fields of view and resolutions.
[0099] Color transformation: Transform the color space of the image, such as adjusting brightness, contrast, and saturation, so that the model can adapt to different lighting conditions.
[0100] Adding noise: Adding random noise to the data to simulate the signal noise that may occur in the actual sequencing process and enhance the model’s robustness to noise.
[0101] Sample interpolation: Generate new samples through interpolation techniques, for example, create new data points in sequencing data by linear or nonlinear interpolation between known samples.
[0102] Sequence perturbations: Small perturbations are made to the DNA sequence, such as single base substitutions, insertions, or deletions, to simulate mutations that may arise during the sequencing process.
[0103] Mixed samples: Mix features or signals from multiple samples together to simulate complex sequencing scenarios.
[0104] Time Series Jitter: If your dataset contains time series information, you can use time jitter to change the relative order of events.
[0105] Domain randomization: Randomize data in different domains (such as different sequencing platforms or experimental conditions) to improve the model's adaptability to new environments. The training dataset constructed through these steps will provide the machine learning model with the necessary information to enable it to learn to accurately predict base sequences from sequencing data.
[0106] This enables the acquisition of high-quality training data sets, which is the key to efficient and accurate sequencing analysis.
[0107] Specifically, according to the embodiments of the present application, in order to construct a training data set, in sequencing, the sequencing rounds are consistent with the longest sequencing rounds in practical applications. In order to obtain more comprehensive training data, the aforementioned sequencing should be selected on different instruments of the same model, and different operators use different batches of reagents and chips to repeat multiple times for accumulating training data sets. Taking four-color fluorescent sequencing as an example, each field of view (Field of view, referred to as FOV) will obtain 4 pictures in each round of sequencing, which are fluorescent images taken under four fluorescent channels of A, G, C, and T.
[0108] According to an embodiment of the present application, conventional base recognition tools are used to analyze the obtained sequencing data to obtain base recognition results, such as fastq files.
[0109] According to an embodiment of the present application, the fastq file is compared with the reference genome, and a bam or sam file of the comparison result can be generated. Wherein, the aforementioned reference genome is a sequence that has been determined, which can be a DNA and / or RNA sequence pre-determined and assembled by oneself, or a DNA and / or RNA sequence disclosed by others, and can be any reference template in the biological category to which the sample source individual / target individual belongs obtained in advance, for example, all or at least a part of the disclosed genome assembly sequence of the same biological category. If the sample source individual or the target individual is human, its genome reference sequence (also referred to as a reference genome or a reference chromosome group) can select the human reference genome provided by UCSC, NCBI or ENSEMBL database, such as HG19, HG38, GRCh36, GRCh37, GRCh38, etc.
[0110] According to an embodiment of the present application, after obtaining the alignment results, a target value matrix is constructed based on the alignment results to record the correct base sequence corresponding to each fluorescent cluster, and low-quality or unreliable sequences are eliminated.
[0111] For example, for the Nth round of sequencing, the target value is the "correct answer" of the base recognition corresponding to each fluorescent cluster in the Nth round of sequencing, that is, the corresponding base on the reference genome after alignment. The correct answers of the base recognition corresponding to each fluorescent cluster are arranged into a matrix according to the actual spatial position of the fluorescent cluster, that is, the target value matrix. For example, assuming that the correct answer of the fluorescent cluster in the 2nd row and the 8th column on the chip in the Nth round of sequencing should be A, then write A at the [1,7] coordinate position (counting from 0) of the target value matrix.
[0112] It should be noted that when constructing the target value matrix, in order to ensure the reliability of the training data, sequences with poor sequencing quality or unreliable alignment positions are selected and eliminated. For sequences that failed to successfully align to the reference genome or whose alignment results were unreliable, the position of the corresponding fluorescent cluster on the target value matrix was recorded as "N", and the positions recorded as N were not included in the training.
[0113] According to the array chip design layout, the center position of the hole on each round of fluorescence images is located, and the fluorescence intensity is obtained as the original fluorescence brightness. The brightness information is determined based on the original fluorescence brightness.
[0114] For example, in a four-color fluorescence sequencing scenario, each round of sequencing of each fluorescence cluster corresponds to four fluorescence intensity values of four fluorescence channels A, G, C, and T. In some examples of the present application, the fluorescence intensity on the original fluorescence image corresponding to the center position of each fluorescence cluster is referred to as "original fluorescence brightness".
[0115] In some examples of the present application, after obtaining the original fluorescence brightness information, it further includes: obtaining it by at least one of a background removal operation and a correction operation. The background-removed fluorescence brightness is obtained based on the fluorescence brightness obtained by the background removal operation. In some examples of the present application, the background-removed fluorescence brightness is further corrected to obtain the corrected fluorescence brightness. By performing a background removal operation on the original fluorescence brightness, the influence caused by the background of the image is removed. The correction operation eliminates or reduces errors and deviations that may be introduced in the sequencing process. Among them, the aforementioned correction operation includes at least one of a lag correction, a pre-phasing correction, and a cross talk correction.
[0116] Exemplarily, based on the background-removed fluorescence brightness distribution characteristics of the n-1th and Nth rounds, a phasing correction is performed on the background-removed fluorescence brightness of the Nth round; based on the background-removed fluorescence brightness distribution characteristics of the Nth and n+1th rounds, a prephasing correction is further performed; and based on the mutual crosstalk parameters of the fluorescence signals of the four fluorescence channels (determined by the spectrum of the fluorescent molecules and the parameters of the optical instrument), the signal crosstalk of the fluorescence channels is corrected.
[0117] Each fluorescent cluster will obtain a fluorescence brightness value in each fluorescent image. For each fluorescent image, the fluorescence brightness corresponding to each fluorescent cluster is arranged into a matrix according to the actual spatial position of the fluorescent cluster. For example, the fluorescence brightness corresponding to the fluorescent cluster in the 2nd row and the 8th column on the chip is written under the [1,7] coordinate of the matrix (counting from 0). Therefore, for each fluorescent image, the fluorescence matrix is determined based on the position information and brightness information of the fluorescent cluster to obtain the fluorescence brightness matrix. The so-called position information is determined based on the center position of the hole where the aforementioned fluorescent cluster is located. The fluorescence brightness matrix (including the original fluorescence brightness, background-removed fluorescence brightness or corrected fluorescence brightness) is input into the prediction model as a feature parameter.
[0118] refer to Figures 1 to 10 In some examples of this application, the training method of the aforementioned prediction model is as follows:
[0119] In some examples of the present application, the aforementioned prediction model may be a machine learning model, including at least one of a decision tree, a random forest, a logistic regression model, a convolutional neural network, a generative adversarial network, and a recurrent neural network, and the trained prediction model is determined by the following steps:
[0120] Obtain a first training set and a first test set data, wherein the first training set and the first test set data have a fluorescence brightness matrix and a corresponding known base type matrix obtained in the aforementioned manner; input the fluorescence brightness matrix into a prediction model, use the known base type matrix as a label, and perform supervised training on the prediction model to obtain a trained prediction model.
[0121] Specifically, the model training process includes steps such as building a training data set, data processing, establishing a deep learning model, model training, model evaluation and optimization.
[0122] First, select the appropriate FOV (Field of View) and its corresponding round (e.g., round N) from the sequencing data as training samples, and use all the fluorescence brightness matrices from rounds Nm to N+n of each FOV as the features of the training samples; use the target value matrix of round N of each FOV, that is, the base sequence corresponding to the fluorescence cluster, as the target value of the training sample. The effect of the model is evaluated by the error rate level of the sequence output by the model.
[0123] Then, when constructing the training data set, only the data with high confidence in the alignment results are selected for training. For example, when constructing the target value matrix in the above 4, if the corresponding sequence in the sam or bam file has insertions or deletions, it can be suspected that the alignment position is not reliable enough, and the target value matrix value of the corresponding entire sequence can be written as 'N'. In the subsequent training process, the position with the target value of N can be excluded from the training. For example, when calculating the loss function, the position corresponding to N can be ignored.
[0124] Next, a prediction model is established, the model architecture (including the number of network layers, the number of neurons, activation functions, etc.), loss function (such as the cross entropy loss function), optimizer (such as the stochastic gradient descent optimizer), etc. are determined, and the training set and validation set are divided for model training. The model parameters are continuously updated through the back-propagation algorithm so that the model gradually converges to the optimal solution.
[0125] According to the embodiments of the present application, reference Figure 2 and Figure 3 Different models can be used for base calling, for example, Figure 2 and Figure 3 Among the schemes 1, 2.1 and 2.2, schemes 2.1 and 2.2 are preferred.
[0126] Reference below Figure 2 and Figure 4 , these solutions are described in detail:
[0127] Solution 1 (reference Figure 2 and Figure 3 Solution 1)
[0128] In this scheme, the fluorescence brightness matrices of the current round and the adjacent rounds are directly input into the deep learning model.
[0129] First, a training data set is established. In short, taking the sequencing data of the Nth round of a certain FOV as an example, the target value of this data is the target value matrix of the Nth round of the FOV, and the eigenvalue is all the fluorescence brightness matrices from the nmth to the N+nth rounds, a total of (2m+1)*4 (including 2m+1 rounds, 4 fluorescence channels in each round).
[0130] Next, we use the above training dataset to build a deep learning model. The way to evaluate the effect of the final model is to evaluate the error rate level of the sequence output by the model.
[0131] Solution 2 (reference Figure 2 and Figure 4 Solution 2.1 and Solution 2.2)
[0132] In this scheme, a two-step series connection method of spatial crosstalk model and context model is adopted.
[0133] Specifically, the main idea of solution 2 is to use a spatial crosstalk correction model and a context influence correction model in two steps. You can correct the spatial crosstalk first, or you can correct the context influence first. Here, we first refer to solution 2.1 to explain it by correcting the spatial crosstalk first and then the context influence:
[0134] First, construct the training data set for model 1. One piece of training data corresponds to the sequencing data of one round (assuming the Nth round) of one FOV. The target value of this piece of data is the target value matrix of the Nth round of the FOV, and the eigenvalue is the matrix of all fluorescence brightness of the Nth round, a total of 4.
[0135] Next, deep learning model 1 is established based on the training data set of model 1. Model 1 outputs the base recognition result matrix of each round of sequencing, and can also output the probability of base classification at each position in each round calculated by the model, that is, the probability that the base at each position is A, G, C, and T. The above base classification probabilities are also output in the form of a matrix, and the matrix coordinates correspond one-to-one to the spatial position of the fluorescent cluster.
[0136] Construct the training data set for model 2. One piece of data corresponds to the relevant data information of a certain round (assuming it is the Nth round) of sequencing at a certain fluorescent cluster position. The target value is the reference base of the fluorescent cluster in the Nth round (i.e., the "standard answer" after alignment), and the feature value is the base classification probability value corresponding to the Nmth to N+nth rounds, a total of (m+n+1)*4 values; in addition, the feature value can also include the number of rounds (i.e., N value), the size distribution relationship parameters of the four base classification probabilities, etc.
[0137] Next, based on the training data set of model 2, model 2 is trained. Model 2 can be either a deep learning model or a machine learning model. The output of model 2 is the final base recognition result of each fluorescent cluster in each round.
[0138] According to the embodiments of the present application, those skilled in the art can also understand that the order of model 1 and model 2 can also be exchanged and then modeled. It is only necessary to exchange the fluorescence brightness and base classification probability in the above steps and re-model them. See Figure 2 and Figure 3 Solution 2.2.
[0139] It should be noted that in order to prevent potential overfitting, the training data corresponding to Model 1 and Model 2 should be completely independent and disjoint.
[0140] It should be noted that for Scheme 1 and Scheme 2, in the process of establishing the model, more data selection and model parameter adjustment methods are involved. According to an embodiment of the present application, when constructing a training data set, only data with high confidence in the comparison results are selected for training. For example, as mentioned above, when constructing the target value matrix, if the corresponding sequence in the sam or bam file has insertions or deletions, it may be suspected that the comparison position is not credible enough, and the corresponding target value matrix values of the entire sequence can be written as 'N'. In the subsequent training process, the position with the target value of N may not participate in the training. For example, when calculating the loss function, the position corresponding to N may not be considered.
[0141] In some examples of this application, the loss function needs to be optimized according to the specific model, especially considering the parameters for evaluating sequencing quality in the sequencing scenario. For example, when calculating the loss function, in addition to considering the traditional loss function calculation method, parameters specific to the sequencing scenario can also be added, such as the sequencing error rate, pattern error characteristic parameters, etc.
[0142] For sequencing with a large number of rounds, the sequencing quality and data characteristics may vary greatly at different stages of sequencing (e.g., when the number of rounds is small in the early stage and when the number of rounds is large in the later stage). Different models can be established according to different round segmentation intervals. For example, one model can be used for rounds 0-50, another for rounds 51-100, and so on.
[0143] During the model training process, the model's hyperparameters can be adjusted based on indicators such as accuracy and loss value to improve the model's generalization ability.
[0144] Finally, the trained model is evaluated and optimized, including calculating various indicators (such as accuracy, precision, recall, etc.), analyzing performance, trying different optimization methods (such as different model architectures, loss functions, optimizers, etc.), etc., and then applying it to the new data set for prediction.
[0145] According to an embodiment of the present application, the model that can be used is a machine learning model, and the aforementioned machine learning model includes at least one of the following: a first sub-model for performing spatial crosstalk correction; and a second sub-model for performing contextual influence correction. The first sub-model and the second sub-model are independently selected from at least one of a decision tree, a random forest, a logistic regression model, a convolutional neural network, a generative adversarial network, and a recurrent neural network.
[0146] The first sub-model is used to output the base classification prediction probability matrix of the single-round extension reaction based on the fluorescence matrix of the single-round extension reaction; the second sub-model is used to output the base recognition result matrix of the Nth round extension reaction based on the base classification prediction probability matrix of the Nmth to N+nth round extension reactions, wherein the base classification prediction probability matrix of the Nmth to N+nth round extension reactions is generated by the first sub-model.
[0147] In this embodiment, the first sub-model (correcting spatial crosstalk) is first constructed, and on this basis, the second sub-model (correcting contextual influence) is constructed. The training method of each sub-model is the same as above, except that the training data sets are different.
[0148] Among them, the first sub-model training data set includes: selecting FOV (Field of View) and its corresponding rounds from the sequencing data as training samples. Determine the target value matrix of each FOV in the Nth round, that is, the base sequence corresponding to the fluorescent cluster, as the target value of the training sample. Determine the eigenvalue, that is, all the fluorescence brightness matrices from the Nmth to the N+nth rounds of each FOV, as the characteristics of the training sample. Based on the above training data set, training is performed in the same manner as above to obtain the trained first sub-model. The output data of the first sub-model is the base recognition result matrix of each round of sequencing. At the same time, the probability of base classification at each position in each round calculated by the model can also be output, that is, the probability that the base at each position is A, G, C, and T bases respectively. The above base classification probability is also output in the form of a matrix, and the matrix coordinates correspond one-to-one to the spatial position of the fluorescent cluster.
[0149] The training data set of the second sub-model includes: the target base of the Nth round of sequencing of any fluorescent cluster and the base classification probability values corresponding to the Nmth to N+mth rounds. In some examples of the present application, it can further include round number information, four base classification probability size distribution relationship related parameters, etc. Based on the above training data set, training is performed in the same manner as above to obtain a trained second sub-model. The output data of the second sub-model is the base recognition result of each round of each fluorescent cluster.
[0150] The trained first sub-model and the trained second sub-model together constitute a trained prediction model.
[0151] In some other examples of the present application, the aforementioned prediction model is a machine learning model, and the aforementioned machine learning model includes at least one of the following: a third sub-model for contextual influence correction; and a fourth sub-model for spatial crosstalk correction. The third sub-model and the fourth sub-model are independently selected from at least one of a decision tree, a random forest, a logistic regression model, a convolutional neural network, a generative adversarial network, and a recurrent neural network.
[0152] The third sub-model is used to output the base classification prediction probability matrix of the Nth round of extension reaction based on the fluorescence matrix of each fluorescence channel from the Nmth round to the N+nth round of extension reaction; the fourth sub-model is used for the base classification prediction probability matrix of the Nth round of extension reaction, and outputs the base recognition result matrix of the Nth round of extension reaction.
[0153] This embodiment first constructs the third sub-model (correcting contextual influence), and on this basis constructs the fourth sub-model (correcting spatial crosstalk). The training method of each sub-model is the same as above, except that the training data sets are different.
[0154] Among them, the third sub-model training data set includes: the target base of the Nth round of sequencing of any fluorescent cluster and the base classification probability values corresponding to the Nmth to N+nth rounds. In some examples of the present application, it can further include parameters related to the size distribution relationship of the four base classification probabilities of the round number information. Based on the above training data set, training is performed in the same manner as above to obtain a trained third sub-model. The output data of the third sub-model is the base recognition result matrix of each round of sequencing, and the probability of base classification at each position in each round calculated by the model can also be output, that is, the probability that the base at each position is A, G, C, and T bases respectively. The above base classification probabilities are also output in matrix form, and the matrix coordinates correspond one to one to the spatial position of the fluorescent cluster.
[0155] The training data set of the fourth sub-model includes: the target base of the Nth round of sequencing of any fluorescent cluster and the base classification probability values corresponding to the Nmth to N+nth rounds. In some examples of the present application, it can further include round number information, the size distribution relationship related parameters of the 4 base classification probabilities, etc. Based on the above training data set, training is performed in the same manner as above to obtain a trained fourth sub-model. The output data of the fourth sub-model is the base recognition result of each round of each fluorescent cluster.
[0156] The trained third sub-model and the trained fourth sub-model together constitute the trained prediction model.
[0157] In some examples of the present application, the above m is an integer less than or equal to N and greater than 0.
[0158] In some examples of the present application, the first sub-model and the aforementioned second sub-model are trained independently using non-overlapping training samples.
[0159] In some examples of the present application, the aforementioned sub-models independently adopt at least one of a semantic segmentation network structure, an encoder-decoder network structure, or a Transformer network structure. Among them, the aforementioned encoder-decoder network structure includes at least one of a U-Net network or its variant, and DeepLap; the aforementioned Transformer network structure includes Segformer.
[0160] In some examples of the present application, an attention mechanism is provided in at least one layer of the aforementioned U-Net-based neural network structure, and the aforementioned attention mechanism includes at least one of a channel attention unit and a spatial attention unit.
[0161] In some examples of the present application, the aforementioned channel attention unit includes: a first pooling subunit, the aforementioned first pooling subunit uses a first global maximum pooling layer and a first global average pooling layer to respectively merge channels of the input data of the aforementioned channel attention unit to reduce the number of channels of the aforementioned input data; a neural network MLP subunit, which uses shared parameters to process the output data of the aforementioned first global maximum pooling sublayer and the output data of the aforementioned first global average pooling sublayer, respectively, to obtain maximum pooling conversion data and average pooling conversion data, respectively; a convolution processing subunit, which uses multiple convolution kernels to perform channel restoration on the maximum pooling conversion data and the average pooling conversion data, respectively; an output layer, which is used to merge and activate the output data of the aforementioned convolution processing subunit and then multiply it with the input data of the aforementioned channel attention unit to obtain the output data of the aforementioned channel attention unit.
[0162] In some examples of the present application, the aforementioned spatial attention unit includes: a second pooling subunit, the aforementioned second pooling subunit uses a second global maximum pooling layer and a second global average pooling layer to merge the two-dimensional matrices of each channel of the output data of the aforementioned channel attention unit respectively; a compression layer, the aforementioned compression layer uses a convolution kernel to compress and activate the output data of the aforementioned second global maximum pooling layer and the second global average pooling layer; an output layer, used to multiply the output data of the aforementioned compression layer with the output data of the aforementioned channel attention unit to obtain the output data of the aforementioned spatial attention unit.
[0163] The base recognition scheme of the embodiment of the present application utilizes a deep learning model and combines the spatial arrangement information of fluorescent clusters to automatically correct the spatial fluorescence crosstalk between adjacent fluorescent clusters, and can independently perform contextual influence correction for each fluorescent cluster, effectively improving the accuracy of base recognition. Compared with traditional methods, this method has significant advantages by reducing the input data size, reducing computing power consumption and computing speed, and is more suitable for array chips. It can process the sequencing data of array chips more efficiently, which helps to improve the accuracy and reliability of sequencing results.
[0164] Reference below Figures 4 to 9 For the U-Net structure neural network according to the embodiment of the present application, an operation example of the model is described in detail.
[0165] In this model, a U-Net-based network structure is used, and spatial attention and channel attention mechanisms are added. After inputting 32*4*400*320 (B, C, H, W) data X (B: batch size, batch size; C: channel, number of fluorescence channels; H: height, height of fluorescence brightness matrix; W: width, width of fluorescence brightness matrix), it undergoes the following processing:
[0166] First, it passes through an input layer in_conv layer and an attention mechanism CBAM layer. The structures of the two are as follows Figure 6 and 7 The in_conv layer includes a convolution kernel for dimensionality increase (for example, a 3*3 convolution can be used to change the size to 32*32*400*320), normalized and ReLU activation function, and finally a convolution kernel for dimensionality increase (for example, a 3*3 convolution can be used), normalized and ReLU activation function, and finally a dimensionality increase X0 (for example, X0 of 32*32*400*320) is obtained.
[0167] Then it is input into the CBAM layer. In the channel attention of the CBAM layer, the data X0 passes through the global maximum pooling layer and the global average pooling layer respectively, and then passes through a neural network MLP with shared parameters. In MLP, the data first passes through a dimensionality reduction convolution kernel (for example, 1*1 convolution), and the number of channels is reduced, for example, to 1 / 16 of the original, and then passes through the activation function ReLU, and finally passes through another dimensionality reduction convolution kernel (for example, 1*1 convolution) to restore the number of channels. Finally, the two data are added and passed through the Sigmoid activation function to obtain X 0C , and perform element-wise multiplication with X0 to obtain the final output X 0MID .
[0168] In the spatial attention of CBAM, for data X 0MIDThe global average and global maximum are calculated based on the channel, and then the two results are concatenated based on the channel. After being processed by a convolution kernel (for example, a 7*7 convolution), they are compressed into one channel, and finally X is obtained through the Sigmoid activation function. 0S , and compare it with X 0MID Do element-wise multiplication to get the final CBAM output X 0FIN .
[0169] Next, after 4 layers of downsampling layers, the first three layers of downsampling layers each include an attention mechanism CBAM layer and a downsampling layer (Down layer), and the last layer has only one Down layer. The Down layer structure is as follows Figure 8 As shown in the figure, each time the data passes through a Down layer, the number of channels C doubles (except the last Down layer), and the height and width H, W are halved.
[0170] Take the first layer as an example (the input is X 0FIN , the output is X 1FIN ):
[0171] X 0FIN Input the downsampling layer, pass through the maximum pooling layer, dimensionality reduction convolution kernel, normalization and ReLU activation function, and get the reduced dimension X1. For example, it can pass through a 2*2 maximum pooling layer with a step size of 2, and the data becomes 32*32*200*160, and then pass through a 3*3 convolution, the size becomes 32*64*200*160, and then normalize and ReLU activation function, and finally pass through a 3*3 convolution, normalization and ReLU activation function, and finally get 32*64*200*160 X1.
[0172] Then after 4 upsampling layers, the structure is as follows Fig. 9 Each upsampling layer has two inputs, one is the output result of the previous layer (the first downsampling layer is X4, the second layer is the output of the first layer Y1), and the other is the corresponding downsampling result (the first layer corresponds to X 3FIN , the last layer corresponds to X 0FIN ). After each upsampling layer, the number of channels C of the data is halved (except for the last upsampling), and the height and width H, W are doubled.
[0173] Take the first layer upsampling as an example (the input is X4, X 3FIN , the output is Y1):
[0174] The input X4 is bilinearly interpolated, and then X4 and X 3FIN The concatenation is performed according to the channel dimension C, and then the dimension-enhanced convolution kernel processing, normalization processing and ReLU activation function are performed to obtain the dimension-enhanced Y1. For example, the format can be changed to 32*256*50*40 through bilinear interpolation, and then X4 and X3FIN According to the channel dimension C, the result format is 32*512*50*40. Then the result is convolved by a 3*3 convolution, the size becomes 32*256*50*40, and then normalized and ReLU activation function is performed, and finally a 3*3 convolution, normalization and ReLU activation function are performed, and finally 32*128*50*40 is obtained.
[0175] Y1 and X 2FIN Input the next upsampling layer to get the output result Y2, and so on. Finally, input Y4 into a 1*1 convolution out_conv, the number of output channels is the number of classifications, and the final prediction result Out is 32*5*400*320.
[0176] In other examples of the present application, a deconvolution kernel may be used to replace the above-mentioned bilinear difference processing method. The output matrices of the two methods have the same size and will not be described in detail here.
[0177] On the other hand, the present application provides a device for base recognition. Fig.11 The device includes: a prediction feature acquisition unit 100 and a base recognition unit 200. In some examples of the present application, the prediction feature acquisition unit 100 and the base recognition unit 200 are connected, and the connection includes a network connection.
[0178] The prediction feature acquisition unit 100 is used to acquire a feature matrix of a sequencing-by-synthesis reaction, wherein the feature matrix includes a fluorescence matrix composed of position information and brightness information of a plurality of fluorescence clusters;
[0179] The base recognition unit 200 is used to input the aforementioned feature matrix into a trained prediction model and output base recognition results of the aforementioned multiple fluorescent clusters.
[0180] The device of the present application is used to implement the above-mentioned base recognition method. The advantages of the above-mentioned base recognition method are also applicable to this aspect and will not be repeated here.
[0181] In yet another aspect, the present application proposes a computer program product, comprising computer instructions. When part or all of the aforementioned computer instructions are run on a computer, the method for base recognition as described above in the present application is executed.
[0182] When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0183] On the other hand, the present application proposes a computing device, comprising: a processor and a memory; the aforementioned memory is used to store a computer program; the aforementioned processor is used to execute the aforementioned computer program to implement the method for base identification as described above in the present application.
[0184] The so-called electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Computing devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are intended to be examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0185] like Fig.12 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 502 or a computer program loaded from a storage unit 508 to a RAM (Random Access Memory) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An I / O (Input / Output) interface 505 is also connected to the bus 504.
[0186] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0187] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as a method for predicting the state of a microsatellite. For example, in some embodiments, the method for predicting the state of a microsatellite may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the aforementioned method for base identification in any other appropriate manner (eg, by means of firmware).
[0188] On the other hand, the present application proposes a computer-readable storage medium, wherein the storage medium includes computer instructions. When the instructions are executed by a computer, the computer implements a method for base recognition.
[0189] In the present application, a sequenced list of executable instructions for implementing a logical function may be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with such instruction execution systems, devices or apparatuses. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with such instruction execution systems, devices or apparatuses. More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection having one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the aforementioned program may be printed, because the aforementioned program may be obtained electronically, for example, by optically scanning the paper or other medium, and then editing, interpreting or processing in other suitable ways as necessary, and then storing it in a computer memory. The various computer-readable storage media described in this application may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.
[0190] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0191] A person of ordinary skill in the art may understand that all or part of the steps in the method of the above-mentioned embodiment may be completed by instructing related hardware through a program, and the aforementioned program may be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.
[0192] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0193] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0194] The present application is described below by way of examples, but this should not be construed as limiting the scope of the present application to the following examples. All technologies implemented based on the above content of the present application belong to the scope of the present application.
[0195] Example 1: Application of deep learning models in gene sequencing data analysis
[0196] This example aims to verify the potential of deep learning models in improving the quality of gene sequencing, with a particular focus on the correction of spatial fluorescence crosstalk. This example uses high-density array chip sequencing images provided by Zhenmai Biotechnology, and selects P150 double-end sequencing data in the region as the research object. The training data set consists of 1,000 independent array chip sequencing samples, which are derived from different experimental conditions, reagent batches, and chip batches, ensuring the diversity and breadth of the data.
[0197] refer to Figures 5 to 9 , this embodiment is based on the U-Net network structure, and further integrates the spatial attention and channel attention mechanisms to enhance the model's ability to recognize sequencing image features. Data processing: The input data is the ACGT image collected by the camera in each sequencing cycle under a fixed field of view (FOV). The hole coordinates and light intensity information in the central area of the image are extracted to form a two-dimensional matrix of (High: 381, Width: 304). The matrices of the four color channels are merged to form a four-channel three-dimensional matrix to provide input for the model. The input data is standardized, adjusted to the light intensity value range of 0-255, and edge-filled to meet the model input size requirements.
[0198] Standardization and training: The input data is standardized using the mean and variance calculated using a large amount of data to ensure that the mean of the data is 0 and the standard deviation is 1. Data labels are generated based on the reference genome information, encoding the bases ACGT as numbers 1-4 and performing corresponding edge filling.
[0199] Model training: Stochastic gradient descent (SGD) is used as the optimizer, and the initial learning rate is set to 0.05, momentum to 0.9, and weight_decay to 1e-4.
[0200] During the training process, the learning rate update strategy is applied to dynamically adjust the learning rate to optimize the training effect.
[0201] A weighted combination of cross entropy loss, dice loss, and custom miss_match loss is used as the loss function, focusing on the loss calculation of the four categories of ACGT.
[0202] Performance evaluation: After training, the padding area is removed by cropping, and the output results are compared with the reference genome labels to calculate the base recognition error rate. An early stopping strategy is implemented to prevent overfitting. When the loss on the validation set does not improve within 30 consecutive epochs, the training is stopped.
[0203] Model effect: On a test dataset of 100 FOVs, the model successfully reduced the sequencing error rate by 28% and increased the alignment rate by 1.2%, demonstrating the significant effect of deep learning models in improving the accuracy of gene sequencing.
[0204] Example 2: Deep learning model considering contextual influence
[0205] The purpose of this example is to verify the potential of deep learning / machine learning models in correcting the impact of context on current base recognition. In this example, the impact of spatial fluorescence crosstalk is not considered, and the sequence information of the fluorescence cluster is focused on.
[0206] Using high-density array chip sequencing images provided by Zhenmai Bio, we focus on a fixed area in the PE150 double-end sequencing process. The training data set consists of 80 different FOVs, each of which comes from independent experiments, different reagents and chip batches, ensuring the diversity and breadth of the data.
[0207] Model construction: The training data is based on a single fluorescent cluster. Each data record records the fluorescence brightness value of a certain round of sequencing, and does not contain spatial location information. The feature value includes the corrected fluorescence brightness value of the current sequencing round of the fluorescent cluster and the three rounds before and after it, as well as the number of sequencing rounds in the current round. The target value is the reference sequence base after alignment corresponding to the current round of sequencing of the fluorescent cluster.
[0208] Model selection and effects:
[0209] The lightGBM algorithm was used to build a machine learning model to improve the accuracy of base recognition.
[0210] The test dataset contains 20 FOVs from different experimental conditions, and all samples are human genomes.
[0211] After the model was applied, the sequencing error rate was significantly reduced by 37% and the alignment rate was increased by 2.3%, proving the effectiveness of the model when considering contextual influences.
[0212] Example 3: Model effect verification
[0213] This example is used to verify the effect of the complete algorithm. This example uses a fixed area in a high-density array chip sequencing image of a pre-research level of Zhenmai Bio, uses a four-color fluorescent second-generation sequencing process, PE150 (double-end sequencing 150+150), and the fluorescence brightness matrix uses the "corrected fluorescence brightness" matrix. The training data set sample is a human genome sample.
[0214] The modeling process of this embodiment can refer to Figure 2 and Figure 3 Section 2.1 of the protocol.
[0215] The modeling method of model 1 is basically the same as that of embodiment 1. Each piece of training data corresponds to the sequencing information corresponding to a certain round of sequencing of a certain FOV. The training data is the array chip sequencing data of 1000 FOVs, P150 (150+150 double-end sequencing), which comes from different experiments, using different reagents and chip batches. The modeling method of model 2 is similar to that of embodiment 2. The training data is in units of a single fluorescent cluster, and each piece of training data represents the sequencing information corresponding to a certain round of sequencing of a fluorescent cluster, and does not contain the spatial position information of the fluorescent cluster. The training data is the array chip sequencing data of 80 FOVs, P150 (150+150 double-end sequencing), which comes from different experiments, using different reagents and chip batches. It should be noted that the training data of 80 FOVs used in model 2 and the training data of 1000 FOVs used in model 1 are completely non-overlapping. In addition, it should be noted that the training data (sequencing data) of model 2 needs to be processed by the trained model 1 first to obtain the base classification probability value, and then the base classification probability value corresponding to each fluorescent cluster is input as a feature parameter into model 2 for training. Here, the construction of model 2 still uses the lightGBM model.
[0216] The test data is 20 FOV array chip sequencing data, PE150 (double-end sequencing 150+150), from different experiments, using different reagents and chip batches, and the samples are all human genome samples. After using the above model, the overall sequencing error rate was reduced by 49% and the alignment rate was increased by 3.1%.
[0217] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0218] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and purpose of the present invention.
Claims
1. A method for base recognition, characterized in that include: Acquiring a characteristic matrix of a sequencing-by-synthesis reaction, wherein the characteristic matrix includes a fluorescence matrix composed of position information and brightness information of a plurality of fluorescence clusters; and The feature matrix is input into a trained prediction model, and base recognition results of the multiple fluorescent clusters are output.
2. The method according to claim 1, characterized in that The sequencing-by-synthesis reaction is performed on an array chip, and the position information is determined based on the center position of the hole where the fluorescent cluster is located.
3. The method according to claim 1 or 2, characterized in that: The prediction model is a deep learning model, and the deep learning model is used to perform at least one of spatial crosstalk correction and context influence correction; Optionally, the deep learning model is used to output a base recognition result matrix of the Nth round of extension reaction based on the fluorescence brightness matrix of the Nmth round to N+nth round of extension reaction, wherein m and n are each independently integers, preferably m is not less than n, and more preferably m is greater than n.
4. The method according to claim 2, characterized in that: The fluorescent matrix is obtained by taking photos of the array chip during the sequencing-by-synthesis process and processing the obtained photos.
5. The method according to claim 4, characterized in that The processing includes: dividing the photograph into a plurality of sub-regions; and Processing the plurality of sub-regions respectively includes determining the position information and brightness information of the fluorescence clusters of each sub-region in the photograph, so as to obtain a plurality of the feature matrices; Optionally, the plurality of feature matrices include at least one piece of information reflecting the position determination of the sub-region in the photo; Optionally, at least a portion of the plurality of sub-regions have an overlapping region.
6. The method according to claim 1, characterized in that The prediction model is a machine learning model, and the machine learning model includes at least one of the following: A first sub-model, for performing spatial crosstalk correction; and The second sub-model is used to correct for contextual effects; Optionally, the first sub-model is used to output a base classification prediction probability matrix of a single round of extension reaction based on a fluorescence matrix of the single round of extension reaction; The second sub-model is used to output a base recognition result matrix of the Nth round of extension reaction based on the base classification prediction probability matrix of the Nmth round to the N+nth round of extension reaction, wherein the base classification prediction probability matrix of the Nmth round to the N+nth round of extension reaction is generated by the first sub-model; Optionally, the prediction model is a cascade model including the first sub-model and the second sub-model.
7. The method according to claim 1, characterized in that The prediction model is a machine learning model, and the machine learning model includes at least one of the following: The third sub-model is used to correct for contextual effects; and The fourth sub-model is used for spatial crosstalk correction; Optionally, the third sub-model is used to output a base classification prediction probability matrix of the Nth round of extension reaction based on the fluorescence matrix of each fluorescence channel of the Nmth round to the N+nth round of extension reaction; The fourth sub-model is used for the base classification prediction probability matrix of the N-th round extension reaction, and outputs the base recognition result matrix of the N-th round extension reaction; Optionally, the prediction model is a cascade model including the third sub-model and the fourth sub-model.
8. The method according to claim 6 or 7, characterized in that: The sub-models are trained independently using non-overlapping training samples.
9. The method according to claim 8, characterized in that The prediction model includes a semantic segmentation network, and the semantic segmentation network is selected from at least one of a network with an encoder-decoder structure or a Transformer-based network; Optionally, the network with an encoder-decoder structure is selected from at least one of U-Net or its variants, and DeepLap; Optionally, the Transformer-based network includes Segformer or its variants; Optionally, the U-Net or its variant or the Segformer or its variant adds an attention mechanism, and optionally, the attention mechanism includes at least one of a channel attention unit and a spatial attention unit, Optionally, the attention mechanism is selected from at least one of a SE attention mechanism and a CBAM attention mechanism. Optionally, the attention mechanism adopts the CBAM attention mechanism. Optionally, the spatial attention unit uses the output result of the channel attention unit as an input feature, Optionally, the attention mechanism includes a channel attention unit adopting the SE attention mechanism.
10. The method according to claim 9, characterized in that The channel attention unit comprises: A first pooling subunit, wherein the first pooling subunit adopts a pooling layer to reduce the number of channels of the input data, optionally, the pooling layer includes an average pooling layer, and optionally, the pooling layer further adopts a first global maximum pooling layer and a first global average pooling layer to respectively merge channels of the input data of the channel attention unit; A neural network MLP subunit, used to process the output data of the first global maximum pooling sublayer and the output data of the first global average pooling sublayer respectively using shared parameters to obtain maximum pooling conversion data and average pooling conversion data respectively; A convolution processing subunit, used to use a plurality of convolution kernels to perform channel restoration on at least one of the maximum pooling conversion data and the average pooling conversion data; The output layer is used to merge and activate the output data of the convolution processing subunit and multiply it with the input data of the channel attention unit to obtain the output data of the channel attention unit.
11. The method according to claim 9 or 10, characterized in that: The channel attention unit comprises: A compression subunit, wherein the compression subunit compresses the feature matrix of each channel by global average pooling, and optionally compresses it into a numerical value; An excitation subunit, wherein the excitation subunit learns the weight relationship between the channels through a fully connected layer and outputs the weight of each channel. Optionally, the excitation subunit further includes a first fully connected layer, a ReLu activation layer, a second fully connected layer and a Sigmoid activation layer; A recalibration layer is used to multiply the weights of the channels by the feature matrix of each channel to obtain an output result of the attention unit.
12. The method according to claim 9 or 10, characterized in that The spatial attention unit comprises: A second pooling subunit, wherein the second pooling subunit adopts the pooling layer adopted by the first pooling subunit to reduce the number of channels of the input data, optionally, the pooling layer includes an average pooling layer, and optionally, the pooling layer further adopts a second global maximum pooling layer and a second global average pooling layer to merge the two-dimensional matrix of each channel of the output data of the channel attention unit respectively; A compression layer, wherein the compression layer uses a convolution kernel to compress and activate the output data of the second global maximum pooling layer and the second global average pooling layer; The output layer is used to multiply the output data of the compression layer with the output data of the channel attention unit to obtain the output data of the spatial attention unit.
13. A device for base recognition, characterized in that: include: A prediction feature acquisition unit, used to acquire a feature matrix of a sequencing-by-synthesis reaction, wherein the feature matrix includes a fluorescence matrix composed of position information and brightness information of a plurality of fluorescence clusters; and The base recognition unit is used to input the feature matrix into a trained prediction model and output base recognition results of the multiple fluorescent clusters.
14. A computer program product, characterized in that include: Computer instructions; When part or all of the computer instructions are executed on a computer, the method for base recognition according to any one of claims 1 to 12 is executed.
15. A computing device, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is used to execute the computer program to implement the method for base recognition according to any one of claims 1 to 12.
16. A computer-readable storage medium, characterized in that: The storage medium includes computer instructions, and when the instructions are executed by a computer, the computer implements the method for base calling according to any one of claims 1 to 12.
Citation Information
Patent Citations
Base determination method and device, computer equipment and storage medium
CN115910217A
Image processing method of gene chip, data processing device and storage medium
CN117237352A
Basic group recognition method based on fluorescently labeled dNTP gene sequencing, sequencer and medium
CN117274614A
End-to-end gene sequencing method and device, gene sequencer and storage medium
CN117315654A
Base recognition method and device, gene sequencer and medium
CN117392673A