Base identification method and system
By processing high-throughput sequencing data by a base recognizer based on neural network, the problem of insufficient base recognition accuracy in the prior art is solved, and higher sequencing accuracy and computing efficiency are achieved.
Patent Information
- Application Number
- CN202411482436.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-22
AI Technical Summary
Existing high-throughput sequencing technologies have challenges in the accuracy of base recognition, mainly due to crosstalk of fluorescent channel signals, crosstalk of adjacent fluorescent cluster signals, resolution limitations of optical imaging systems, lag in sequencing reactions and advance phenomena , and the effect of the base context to be tested on the efficiency of biochemical reactions.
Using a neural network-based base recognizer, an alternative representation is generated by processing the input data of multiple amplicons, and these representations are processed at the output layer to produce base recognition results. This method fully considers the influence of the spatial position, detection time and context of the fluorescence cluster on current base recognition.
It significantly improves the accuracy of sequencing results and is especially suitable for application detection with high requirements for the accuracy of sequencing results, such as pathogen detection, liquid biopsy, etc. At the same time, compared with the traditional method, this method has significant advantages in computing power consumption and computing speed.
Smart Images

Figure CN119479831A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing based on artificial intelligence, and more specifically, to the application of neural networks to process biological information such as information collected by nucleic acid sequencing, and more specifically, to a base recognition method based on neural networks, a system, a computer program product, a computer device and a computer-readable storage medium. Background Art
[0002] The subject matter discussed in this section should not be considered to be prior art simply because it is mentioned in this section. Similarly, technical problems mentioned in this section or associated with the subject matter provided as background technology should not be considered to have been previously recognized in the prior art. The subject matter in this section only represents different methods, which themselves may also correspond to specific implementations of the technical solutions contained in the claims.
[0003] In the related technology, machine learning is a subset of artificial intelligence, which enables the system to automatically improve through experience and is widely used in image recognition, speech recognition, natural language processing, recommendation systems and other fields. Machine learning includes various algorithms, such as linear regression, decision trees, support vector machines, etc. Traditional machine learning methods usually require manual feature extraction, and data preprocessing and feature extraction screening are usually very important for the effective training of the model. Deep learning, another subset of machine learning, can automatically extract features from raw data. It often focuses on neural networks, especially multi-layer neural networks (deep neural networks), such as convolutional neural networks or recurrent neural networks, to automatically extract features. In terms of the required computing power, compared with relatively simple machine learning models that can run on ordinary computers, deep learning models are usually more complex and usually require a lot of computing resources and GPU support.
[0004] In the related art, sequencing generally refers to the process of determining the primary structure or sequence of biopolymers, including nucleic acids such as DNA and RNA, including the order of nucleotide bases (adenine A, guanine G, thymine T / uracil U and cytosine C) of a given nucleic acid fragment. Such methods generally include identifying bases at one or more positions in a nucleic acid, i.e., performing base calling, to determine at least a segment or a portion of the sequence of the nucleic acid molecule.
[0005] The signal and / or signal intensity change corresponding to the binding of nucleotides / bases to a specific position of the nucleic acid molecule (template) to be tested can indicate the base type at that position on the nucleic acid molecule. For example, different bases can be identified by labeling with different fluorescent molecules. The binding of nucleotides / bases to a specific position of the nucleic acid molecule to be tested is also called incorporation of nucleotides / bases into the nucleic acid molecule to be tested or base extension, which can be achieved, for example, by polymerization, ligation, hybridization, etc.
[0006] Specifically, on platforms that utilize an optical imaging system to capture images of base extension signals multiple times and perform nucleic acid sequencing based on processing of these images, it is often difficult to accurately identify bases based on image processing due to the influence of optical effects, spatial effects and / or chemical reactions such as chromatic aberration, crosstalk and / or phase dephasing on image acquisition, template positioning and / or target signal intensity.
[0007] Specifically, for example, the current mainstream commercially available sequencing platforms that achieve high-throughput sequencing based on chip surface fluorescence imaging detection use fluorescent molecules to mark the nucleic acid molecules to be tested that have undergone specified biochemical reactions, and the nucleic acid molecules to be tested are often clones containing multiple copies after amplification, so as to amplify the luminescent signal after the specified biochemical reaction occurs on the chip surface or the luminescent signal detected by imaging; the amplified nucleic acid molecules to be tested often appear in clusters or spherical shapes on the surface. In the sequencing platforms of ILLUMINA or MGI, the nucleic acids to be tested connected to the chip surface are often also called fluorescent clusters or DNA nanoballs (DNBs).
[0008] According to the differences in the arrangement of the nucleic acid molecules to be tested on the chip surface, the chips supporting these sequencing platforms can be divided into two categories. One is a chip with fluorescent clusters or groups randomly distributed on the chip surface, which is called a random chip; the other is a chip with fluorescent clusters or groups regularly arranged on the chip surface, which is called an array chip. The position or relative distance of the fluorescent clusters or groups on the surface of the array chip is known, so for high-density chips, the image of the array chip is more conducive to the analysis of downstream algorithms than the image of the random chip. Fluorescent clusters or groups are regularly placed or connected at designated surface positions such as regularly set holes, which is a common array chip. If the array chip needs to increase the density of fluorescent clusters or clusters, the usual practice is to reduce the spacing between fluorescent clusters or clusters or reduce the distance between the positions that carry or accommodate fluorescent clusters or clusters, such as the distance between holes, thereby increasing the density of fluorescent clusters or clusters on the chip surface.
[0009] Although high-throughput sequencing technology has made significant progress in efficiency, cost and throughput, it still faces challenges in the accuracy of base recognition. In the actual sequencing process, due to the crosstalk of different fluorescent channel signals, the crosstalk of adjacent fluorescent clusters or groups, the resolution of the optical imaging system is limited by the diffraction limit, the lag and advance phenomenon in the sequencing reaction, and the influence of the context of the base to be tested on the efficiency of the biochemical reaction, etc., base recognition errors may occur, thereby affecting the accuracy of the obtained sequencing sequence and the reliability of the subsequent analysis and detection results based on these sequencing sequences. These problems are particularly prominent on high-density array chips, because the distance between fluorescent clusters or groups is reduced, and the limitation of spatial resolution makes the signal crosstalk problem more serious; moreover, the fluorescent clusters or groups are too close to each other physically and cannot be distinguished in space, or two or more clusters are physically overlapped and it is difficult to identify their respective nucleic acid sequences, etc. Therefore, there are often contradictions or difficulties in obtaining both the quantity and / or quality (accuracy) of the nucleic acid sequences read out, and it is often necessary to make trade-offs or compromises.
[0010] Machine learning models, including deep learning, have great application prospects in bioinformatics research, such as training machine learning models to predict template positions, base detection, nucleotide / base sequence detection, quality scoring or evaluation of detected bases or detected sequences, etc. Relevant literature such as US20230005253A1, CN117976042A, CN117912550A, US11676685B2, etc. disclose the use of machine learning models to process sequencing images or sequencing data to predict the type of bases incorporated into the nucleic acid molecule to be tested or the quality of the detected nucleotide / base sequence. Summary of the invention
[0011] The embodiments of the present application are intended to solve at least one of the above-mentioned technical problems to at least a certain extent or at least provide a practical commercial option.
[0012] The inventors have developed this technical solution based on the discovery of the following technical problems and the results of multiple tests and studies:
[0013] In the base recognition methods currently used in multi-color or multi-fluorescence channel high-throughput sequencing, such as two-color sequencing, three-color sequencing or four-color sequencing, the signal of each fluorescent cluster in a certain area at a certain time point is often calculated and processed independently, thereby identifying the base type incorporated into each fluorescent cluster in the area at that time point; moreover, the interference that the signal crosstalk and phase imbalance of different fluorescent channels (incomplete or asynchronous sequencing reactions of multiple nucleic acid molecules in the same fluorescent cluster, including advance or lag) may cause to the current base recognition is often considered, and thus crosstalk correction, phasing and prephasing correction are generally performed, such as the base recognition and signal correction methods disclosed in EP3077943B1, CN113012757B, etc., including calculating a fixed correction parameter or coefficient, such as calculating the brightness distribution of all fluorescent clusters and calculating unified phasing and prephasing correction parameters based on them, and using the correction parameters to uniformly correct the signal intensity / brightness of different fluorescent channels in this round or to correct the signal intensity / brightness of all fluorescent channels in the front and back rounds.
[0014] In this regard, the inventors have found that factors that may interfere with accurate base recognition and detection include, in addition to the aforementioned fluorescence channel signal crosstalk and fluorescence cluster phase imbalance, the energy transfer and dissipation of the fluorescence signals of the adjacent bases before and after the base to be tested, the energy transfer and dissipation of the fluorescence signals of the fluorescent clusters adjacent in physical position, and the influence of the context sequence of the base to be tested on the efficiency of the biochemical reaction of the current base position, which will also affect the accuracy of base recognition or sequencing. Moreover, it is difficult to accurately correct the reaction signals of each base position of each fluorescent cluster at different time points (rounds) in an area (field of view) using a fixed or unified correction coefficient, and therefore, the accuracy of base recognition or sequencing is still difficult to achieve expectations.
[0015] To this end, the inventors constructed training data, trained and tested different neural network models or cascade models containing neural networks for multiple times, and trained a base identifier based on a neural network. The base identifier based on the neural network fully considers the impact of the spatial position of the fluorescent cluster, the detection time (front and back round sequencing actions) and the context (front and back round sequencing results) on the current base recognition. The base identifier can quickly and accurately obtain base recognition results.
[0016] Specifically, a base recognition method provided in an embodiment of the present application includes: processing input data of multiple amplicons through a neural network-based base recognizer and generating an alternative representation of the input data, wherein the input data includes position information and intensity information of the amplicons on images collected from rounds n-m1 to n+m2 of sequencing, the sequencing adopts a multi-fluorescence channel sequencing technology based on surface imaging, the amplicons are nucleic acid molecules to be tested that contain multiple identical polynucleotide molecules, the amplicons are connected to the surface, n is a natural number greater than or equal to 2 and n is greater than m1, m1 and m2 are respectively and independently natural numbers greater than or equal to 1; processing the alternative representation through an output layer to generate an output, wherein the output identifies the probability that the bases introduced into each of the amplicons in the nth round of sequencing are A, C, T and G; and determining the base type introduced into each of the amplicons in the nth round of sequencing based on the output.
[0017] The present application also provides a base recognition system for implementing all or part of the steps of the base recognition method of any of the above embodiments, the system comprising: a processing unit, for processing input data of multiple amplicons through a base recognizer based on a neural network and generating an alternative representation of the input data, wherein the input data includes position information and intensity information of the amplicons on images collected from rounds n-m1 to n+m2 of sequencing, the sequencing adopts a multi-fluorescence channel sequencing technology based on surface imaging, the amplicons are nucleic acid molecules to be tested that contain multiple identical polynucleotide molecules, the amplicons are connected to the surface, n is a natural number greater than or equal to 1 and n is greater than m1, m1 and m2 are respectively and independently integers greater than or equal to 0; an output unit, for processing the alternative representation through an output layer to generate an output, wherein the output identifies the probability that the base introduced into each of the amplicons by the nth round of sequencing is A, C, T and G; and a base type determination unit, for determining the base type introduced into each of the amplicons by the nth round of sequencing based on the output.
[0018] The present application also provides a computer program product, including instructions. When a computer executes part or all of the instructions, the base recognition method of any of the above embodiments is executed.
[0019] The present application provides a computing device, comprising: a memory for storing data, including a computer executable program; and one or more processors for executing the computer executable program to implement the base recognition method in any of the above embodiments or examples. In some embodiments, the computing device is a sequencer.
[0020] The present application also provides a computer-readable storage medium for storing a program for execution by a computer, wherein executing the program includes completing the base recognition method of any of the above-mentioned embodiments or examples.
[0021] In some embodiments, the sequencing system includes one or more of the base recognition system, computer program product, computing device, or computer-readable storage medium in any of the above embodiments.
[0022] By utilizing a trained neural network or cascade model (a neural network-based base identifier) that fully considers the impact of the spatial position of the nucleic acid molecule to be tested and contextual sequence information on the current base recognition result of the nucleic acid molecule to be tested, and a relatively small amount of input data, the base recognition method, system or product in any of the above embodiments can efficiently process the input data and obtain accurate base recognition results.
[0023] Specifically, the constructed training data includes the signal strength information and position information of multiple amplicons at the same time point in the same area, and the strength and position information of the amplicons in the area before and after multiple rounds, so that the trained model fully considers the spatial position relationship of the amplicon, the context, and the reaction information of the amplicon at different time points before and after the specified amplicon. The base identifier based on the neural network can correct the spatial crosstalk between multiple physically adjacent amplicons, and can also perform independent context correction for each amplicon, which can not only correct the effects of phasing and prephasing, but also eliminate some of the pattern errors caused by the context base arrangement characteristics, etc., significantly improving the accuracy of the sequencing results, and is particularly suitable for application detection with high requirements for the accuracy of sequencing results, such as pathogen detection, liquid biopsy, etc. In addition, the file size of the input data is smaller than the file size of the corresponding image. Compared with the base recognition model whose input data is an image, the base recognition using this model has significant advantages in computing power consumption and calculation speed.
[0024] 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
[0025] The above and / or additional aspects and advantages of the embodiments of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0026] Figure 1 is a schematic diagram of the base recognition method of an embodiment of the present application;
[0027] Figure 2 is a schematic diagram of the base recognition method of an embodiment of the present application;
[0028] Figure 3 is a schematic diagram of the base recognition method of an embodiment of the present application;
[0029] Figure 4 A schematic diagram of the structure of a U-Net with a CBAM module added to the downsampling layer of an embodiment of the present application;
[0030] Figure 5 It is a schematic diagram of a flow chart of a base recognizer based on a neural network in an embodiment of the present application processing input data to predict a base recognition result;
[0031] Figure 6 It is a schematic diagram of an embodiment of the present application that converts the entire image into a group of blocks and writes the group of blocks into a group of matrices as input data;
[0032] Figure 7 is a schematic diagram of the structure of the base recognition system of the embodiment of the present application;
[0033] Figure 8 It is a schematic diagram of the construction process of a base recognizer based on a neural network in an embodiment of the present application;
[0034] Fig. 9 It is a flow chart of an embodiment of the present application using U-Net to process input data to obtain base recognition results;
[0035] Fig.10 It is a schematic diagram of the U-Net structure in which the spatial attention and channel attention mechanisms are added in the embodiment of the present application;
[0036] Fig.11 Schematic diagram of the structure of the input convolution layer (in_conv) of the embodiment of the present application;
[0037] Fig.12 It is a schematic diagram of the structure of the CBAM of the embodiment of the present application;
[0038] Fig.13 It is a structural diagram of the downsampling layer Down in an embodiment of the present application;
[0039] Fig.14 It is a structural diagram of the upsampling layer Up in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, but cannot be understood as limiting the present application.
[0041] As used herein, unless otherwise specified, the singular forms "a", "an", etc. include plural referents (one or more). "A set" or "a plurality" means two or more.
[0042] In this document, "first", "second", etc. are used for descriptive purposes only and should not 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, "plurality" means two or more, unless otherwise clearly specified.
[0043] Unless otherwise specified, the terms "connected" and "connection" used herein should be understood in a broad sense, for example, they may be fixedly connected, detachably connected, or integrally connected; they may be mechanically connected, electrically connected, or mutually communicative; they may be directly connected, or indirectly connected through an intermediate medium, or they may be internally connected between two elements or have an interactive relationship between two elements; they may be connected through forces such as physical adsorption, or they may be chemically connected through chemical bonds, such as incorporation through polymerization reactions, etc. Those skilled in the art may understand the specific meaning of the term in the corresponding example based on the description of the specific embodiment, including the context and common knowledge.
[0044] Herein, "sequencing" is the determination of nucleic acid sequence, which is the same as "nucleic acid sequencing" or "gene sequencing", and refers to the determination of the order of base arrangement of the primary structure of nucleic acid molecules, which can be achieved by synthetic sequencing (Sequencing by Synthesis, SBS), ligation sequencing (Sequencing by Ligation, SBL) or hybridization sequencing (SBH), etc. Unless otherwise specified, the sequencing by synthesis referred to in this article includes, in addition to the commonly understood SBS (typical ILLUMINA / Solexa technology) of using polymerase to catalyze the incorporation of nucleotides into the nucleic acid molecule to be tested (polymerization reaction) and detecting the corresponding reaction signal to identify the type of incorporated nucleotides, it also includes sequencing similar to SBS, using polymerase or non-polymerase to controllably introduce or connect nucleotides to the nucleic acid molecule to be tested, and directly or indirectly detecting the corresponding signal to determine the type of nucleotides connected, such as SBL and SBH based on surface fluorescence imaging detection.
[0045] Sequencing can be performed through a sequencing platform. According to the embodiments of the present application, the available sequencing platforms include, but are not limited to, Illumina's Hiseq, Miseq, Nextseq and Novasek series sequencing platforms, Thermo Fisher / Life Technologies' Ion Torrent platform, BGISEQ and MGISEQ / DNBSEQ platforms of MGI, Element Bioscience's AVITI and single-molecule sequencing platform; the sequencing method can be selected from single-end sequencing, double-end sequencing, or a sequencing method supported by the selected automated sequencing platform, etc.
[0046] In some examples, sequencing by synthesis is performed for multiple rounds to obtain sequencing sequences or reads. For example, the nucleic acid molecule to be tested is contacted with a polymerase and a modified nucleotide and placed under conditions suitable for a polymerization reaction, and the modified nucleotide is controllably incorporated into the nucleic acid molecule to be tested, or a single base extension is controllably achieved, and the corresponding reaction signal is detected, and the type of nucleotide incorporated into the nucleic acid molecule to be tested in this reaction is determined based on the signal, and multiple controllable single base extensions and corresponding signal detections are performed in this way, so that the type of nucleotides or bases incorporated into the nucleic acid molecule to be tested in multiple or multiple rounds of reactions can be detected according to the reaction signal information, so as to read out a portion of the sequence of the nucleic acid molecule to be tested.
[0047] The so-called nucleic acid molecule to be tested, also called nucleic acid template or template, can be a single molecule that has not been amplified, or a molecular cluster or group or long chain containing multiple identical polynucleotide molecules after amplification, such as the fluorescent cluster (cluster) or DNA nanoball (DNB) formed by bridge amplification or rolling circle amplification used by the current mainstream sequencing platform on the market. The nucleic acid molecule to be tested can be in the form of a single strand, a double strand and / or a complex hybridized with a probe or primer.
[0048] The corresponding reaction signal can be, for example, a fluorescent signal, or it can be converted into image data (such as a color image or a grayscale image) formed by collecting these fluorescent signals. Thus, these image data are processed and analyzed to detect the nucleotides incorporated into the nucleic acid molecule to be tested in each time or each round of reaction, so as to determine a portion of the base sequence of the nucleic acid molecule to be tested.
[0049] Specifically, in some examples, sequencing is achieved based on surface fluorescence imaging detection, and the nucleic acid molecules to be tested are connected to a solid surface. For example, the nucleotides can be modified so that the nucleotides carry or can be combined with fluorescent labels, and carry removable inhibitory groups that can prevent other nucleotides from polymerizing and connecting to the next position of the nucleic acid molecule to be tested (such modified nucleotides are also called reversible terminators), and after each polymerization reaction or single-base extension reaction is completed, the fluorescent label is stimulated to emit light, and these luminescent signals are collected to obtain an image of the nucleic acid molecule to be tested that has undergone a single-base extension reaction at a specified surface position; then, the inhibitory group and the fluorescent label are removed to perform the next polymerization reaction or the next round of polymerization reaction and signal collection (photography), and this polymerization-photography-excision is repeated multiple times or multiple rounds to obtain image set information related to the nucleotides connected to the nucleic acid molecule to be tested in each single-base extension reaction.
[0050] It can be understood that the nucleic acid molecules to be tested at the designated positions on the surface undergo polymerization reaction and emit fluorescence, which generally appears as bright spots or bright spots (spots) with a signal intensity higher than the background at the corresponding positions of the images collected in the round of reflection. Therefore, based on the information corresponding to the specific chemical features (the nucleic acid molecules to be tested that undergo polymerization reaction) contained in the image sets, it can be determined whether the nucleic acid molecules to be tested at the designated positions undergo polymerization reaction, and combined with the preset correspondence between the fluorescent luminescence signal and the type of nucleotide, the type of nucleotide that undergoes biochemical reaction and connects to the nucleic acid molecules to be tested can be detected, thereby determining at least a portion of the sequence of the nucleic acid molecules to be tested, and obtaining the so-called read segment.
[0051] Based on the image, the set of positions corresponding to the chemical features (the nucleic acid molecules to be tested) on the surface is determined, that is, the template is obtained. It can be determined by identifying the features corresponding to the chemical features on the detection image, such as the bright spots (the positions), or it can be determined by identifying other features on the image that have a specific correlation with the spatial position relationship of the chemical features. For example, for a regular array surface including a labeling area (also often called a tracking area), the spatial position relationship between the labeling area and the reaction area (the area where the nucleic acid molecules to be tested are located) is generally preset and known, and the signal from the labeling area is obviously distinguishable from the signal from the reaction area, or the signal from the labeling area appears as a detectable feature on the image. The position of the labeling area on the image is determined by identifying the signal from the labeling area, and the position of each amplicon (nucleic acid molecules to be tested) in the reaction area can be determined.
[0052] It should be noted that the nucleotides referred to herein include ribonucleic acid or deoxyribonucleic acid, including natural nucleotides or their derivatives or modifications (also referred to as modified nucleotides or modified nucleotides, etc.). In this article, the bases contained in the nucleotides are sometimes used to refer to the nucleotides, which can be clearly known by those skilled in the art based on common knowledge and / or context.
[0053] The so-called one round of sequencing may include one base extension reaction (one repeat). For example, four different nucleotides (dATP, dTTP, dGTP and dCTP) and multiple nucleic acid molecules to be tested may be placed in the same polymerization reaction system, so that each nucleotide can be stimulated to emit a signal that can be distinguished from other types of nucleotides, thereby determining the type of nucleotide incorporated or introduced at one position of any nucleic acid molecule to be tested through the information obtained from one repeated reaction. For example, the four nucleotides are respectively labeled with fluorescent markers of four different luminescent bands, and four-color or four-channel single-molecule sequencing or high-throughput sequencing is performed; for another example, the four nucleotides are respectively labeled with fluorescent markers of three different luminescent bands and without fluorescent markers (cold nucleotides), and two-color or three-color high-throughput sequencing is performed. One round of sequencing includes one repeat, and the base type at one position on any nucleic acid template can be detected.
[0054] The so-called one round of sequencing may also include multiple repeats. For example, four nucleotides may be sequentially contacted with multiple nucleic acid molecules to be tested on the surface, and base extension and corresponding reaction signal collection such as taking pictures are performed respectively, and one round of sequencing includes four base extensions; for another example, any combination of four nucleotides may be contacted with multiple nucleic acid molecules to be tested on the surface, such as two-by-two combinations or one-by-three combinations, and two combinations are respectively subjected to base extension and corresponding reaction signal collection such as taking pictures, and one round of sequencing includes two base extensions. In some embodiments, a repeat is sometimes referred to as a round, which can be understood by those skilled in the art based on the description of the specific embodiments, including the associated context.
[0055] Herein, the so-called amplicon is a nucleic acid molecule to be tested after amplification, and an amplicon is a cluster, chain or group containing multiple identical polynucleotide sequences; the so-called fluorescent cluster, group or ball is an amplicon that can be excited to emit light, such as fluorescence, after a specified biochemical reaction occurs. The amplicon can emit light and be detected by imaging during the sequencing process, and the bases incorporated into or connected to the nucleic acid molecule to be tested after the specified biochemical reaction occurs can be detected by processing the signals collected by imaging and / or the corresponding image information, thereby determining at least a portion of the sequence of the nucleic acid molecule to be tested.
[0056] The "chromatic aberration" (CA) mentioned in the embodiments of this article refers to the phenomenon that the lens cannot focus all wavelengths of light on the same point in optics [Max Born; Emil Wolf. Principles of Optics: Electromagnetic Theory of Propagation, Interference and Diffraction of Light (7th Edition). Cambridge University Press. October 13, 1999: 334. ISBN0521642221.]; in imaging, chromatic aberration is manifested as the inability of each color on the spectrum to focus on the same point on the optical axis. For a sequencing platform involving the use of multiple wavelengths of light to image the same object (such as one or more nucleic acid molecules), at least chromatic aberration will cause the object to have different positions / coordinates in multiple images of an object collected at different wavelengths, or in other words, the object does not actually move, but due to chromatic aberration it will appear to move in multiple images at different wavelengths.
[0057] The so-called crosstalk (laser-crosstalk or spectra-crosstalk), also known as "spectral crosstalk" or "spectral crossing", generally refers to the phenomenon that the signal corresponding to one base diffuses into the signal of another base; for sequencing platforms that use differently labeled fluorescent molecules to identify different bases, if the emission spectra of two or more selected fluorescent molecules overlap, it may be detected that the signal of one fluorescent molecule diffuses into another fluorescent channel in one round of sequencing.
[0058] The so-called phase dephasing, phase imbalance, dephasing or phase difference generally refers to the phenomenon of asynchronous reaction between nucleic acid molecules in a group, such as a nucleic acid molecule cluster, in a chemical reaction, including phasing or sequence lag and prephasing or sequence lead; in a sequencing platform that uses different fluorescent molecules to identify different bases, it is manifested as the phenomenon that the signal of the fluorescent molecule corresponding to the base at a specific position is not zero in more than one round of sequencing. Generally, sequencing is performed using nucleotides with fluorescent molecule labels and blocking groups. The blocking group on the nucleotide can prevent other nucleotides from binding to the next position of the template. The blocking group is, for example, an azide connected to the 3' position of the sugar group of the nucleotide. The shedding of the blocking group or its failure to be removed before the extension of the next base will cause phase dephasing.
[0059] In the embodiments of the present application, unless otherwise specified, the so-called amplicon, fluorescent cluster or group or ball, nucleic acid molecule cluster, clone group, nucleic acid molecule to be tested, template, nucleic acid template, template spot, bright spot corresponding to chemical feature or fluorescent cluster on the surface, etc. can generally be used interchangeably. The so-called signal intensity, intensity, brightness and fluorescence brightness, etc. can also be generally used interchangeably. The so-called surface, chip, array, etc. can also be generally used interchangeably in the embodiments of the present application.
[0060] Please refer to Figure 1 In some embodiments, the base recognition method includes: S10 processing input data of multiple amplicons through a neural network-based base recognizer and generating an alternative representation of the input data, wherein the input data includes position information and intensity information of the amplicons on images collected from rounds n-m1 to n+m2 of sequencing, the sequencing adopts a multi-fluorescence channel sequencing technology based on surface imaging, the amplicons are nucleic acid molecules to be tested that contain multiple identical polynucleotide molecules, the amplicons are connected to the surface, the file size of the input data is smaller than the file size of the corresponding image, n is a natural number greater than or equal to 1 and n is greater than m1, m1 and m2 are respectively and independently integers greater than or equal to 0; S20 processing the alternative representation through an output layer to generate an output, wherein the output identifies the probability that the base introduced into each of the amplicons by the nth round of sequencing is A, C, T and G; and S30 determining the base type introduced into each of the amplicons by the nth round of sequencing based on the output.
[0061] The neural network-based base caller is a trained single neural network model that can predict base types based on input data, or a composite model or cascade model containing neural networks. The neural network referred to here is a multi-layer neural network, including at least one hidden layer.
[0062] The so-called input data, sometimes also referred to as input features or input, contains information in the image that represents or reflects the target signal, that is, the amplicon in which a specified biochemical reaction has occurred. The file size of the input data is smaller than the file size of the corresponding image.
[0063] The so-called file size is sometimes also referred to as dimension or data amount, and its size reflects the storage space required to store the data or the storage space occupied.
[0064] The so-called amplicons are amplification products containing multiple identical polynucleotide molecules, which are often connected on a solid surface in the form of clusters (the same nucleic acid molecules are arranged side by side and closely together) or balls or spheres (the same nucleic acid molecules are connected end to end / in series, and form balls under some external or internal force). Therefore, they are sometimes also referred to as clusters, molecular clusters / clusters / balls, fluorescent clusters, nanospheres, clones, etc.
[0065] The embodiments of the present application do not limit the method for obtaining the surface amplicons. The amplicons can be obtained by various amplification methods such as liquid phase amplification or solid phase amplification, for example, strand displacement amplification such as template walking or bridge PCR can be performed on a solid surface to obtain amplicons connected to the surface, or rolling circle amplification can be performed in a liquid phase to obtain amplicons, and then these amplicons are loaded or adhered to designated positions on the solid surface to obtain amplicons connected to the surface.
[0066] In the multi-fluorescence channel high-throughput sequencing technology based on surface imaging, the positions of the amplicons connected to the chip surface or the connectable amplicons are randomly distributed (random chips) or regularly distributed (pattern chips or array chips). During each round of sequencing, the luminescent signals (fluorescence signals) of the amplicons from a certain imaging or scanning area (field of view) on the surface are collected to obtain multiple images corresponding to the number of fluorescent channels, such as four-color high-throughput sequencing, a certain field of view generally collects four images after one round of sequencing, such as three-color high-throughput sequencing, a certain area or field of view generally collects two images after one round of sequencing, and another example is two-color sequencing high-throughput, a certain field of view generally collects two images after one round of sequencing. The images collected by sequencing include images directly collected by sequencing, images collected by sequencing after pretreatment, or images generated by reconstruction or reorganization based on the images collected by sequencing, and these images are sometimes referred to as original images in this article.
[0067] The present application does not limit the method of determining (the position of) the amplicon on the image. It is understandable that the image collected by sequencing contains features of the luminescent amplicon corresponding to the field of view, and the signals of such features are often stronger than the background, and are often shown as separated or distinguishable bright spots or bright spots on the image. The amplicon on the image can be located based on the recognition or detection judgment of such features. For example, in an image from a random chip surface, a relatively reliable bright spot corresponding to the amplicon can be identified based on the signal intensity and / or morphology of the features that may be from the amplicon on the image, and a template (a set of amplicon positions or a set of bright spot positions corresponding to the amplicon) can be determined. Alternatively, based on the relative positional relationship between the position of the connectable amplicon on the preset surface and the specific marker, the position of the amplicon on the image or the position of the connectable amplicon can be located by recognizing the features corresponding to the specific marker on the image. For example, in an image from the surface of an array chip, by recognizing the specific marker on the image, such as the marker line or marker pattern (tracing), and based on the spatial positional relationship between the predetermined specific marker and the area where the amplicon is located or the surface area where the amplicon can be connected (such as the amplicon connected in the hole), and the arrangement rules between the predetermined amplicons or the surface area where the amplicon can be connected, the position information of the amplicon on the image or the surface area where the amplicon can be connected (the position information of the hole connected to the amplicon) can be determined. Furthermore, based on the determined position information of the amplicon on the image, the intensity information of the position can be determined as the intensity information of the amplicon.
[0068] The position information can be represented by a coordinate system, for example. The coordinate system can be a unified coordinate system based on which multiple images of the same visual field are registered or aligned. The position information can be expressed as an absolute or relative coordinate value, or can be assigned with other values including numbers to represent the relative position relationship of each amplicon on the image to show the position information of the amplicon, including the visual field (surface area) from which the amplicon comes and its position relationship with other amplicon in the visual field. For example, if the feature of the amplicon on the image occupies one or more pixels or multiple sub-pixels, the position information of the amplicon on the image can be represented by the position of any pixel or sub-pixel where it is located, or the position of the sub-pixel center of the feature can be determined by using a method such as a quadratic function interpolation to represent the position information of the amplicon on the image. The intensity of the amplicon on the image, sometimes also referred to as brightness, can be represented by the pixel value / grayscale value, sub-pixel value or sub-pixel value of the position of the amplicon on the image. For example, the feature of the amplicon on the image occupies one or more pixels or multiple sub-pixels, and the intensity value of any pixel or sub-pixel position where it is located can be used to represent the intensity information of the amplicon on the image. It is also possible to determine the center or centroid of the feature / amplicon, and to represent the intensity information of the amplicon on the image with the pixel value or sub-pixel value of the position where the center or centroid is located. The intensity information of the amplicon on the image can be the original signal intensity value on the image, or it can be the processed signal intensity value, such as the intensity value after background removal and / or after at least one correction of color difference, cross-color and phase, or it can be the intensity value after standardization or normalization. Crosstalk correction, phase correction, etc. can be carried out by the methods disclosed by disclosed methods such as EP3077943B1, CN113012757B, etc., and the full content of the relevant literature cited is incorporated herein.
[0069] The so-called alternative representation can refer to the output after inputting one or more convolutional layers or hidden layers in the trained base identifier, or it can be said to be a new representation after the input features are transformed by the encoder in the neural network. This new representation is often also called encoding or feature map.
[0070] By utilizing a trained single neural network model or a cascade model including a neural network (a neural network-based base identifier) that fully considers the impact of the spatial position of the nucleic acid molecule to be tested and the contextual sequence information on the current base recognition result of the nucleic acid molecule to be tested, as well as relatively small input data, the base recognition method can efficiently process the input data and obtain accurate base recognition results.
[0071] Specifically, the training data constructed by the inventor includes the signal intensity information and position information of multiple amplicons at the same time point (same round of sequencing) in multiple regions, and the intensity and position information of the amplicon in the region before and after multiple rounds, so that the trained model can fully consider the spatial position relationship of the amplicon, the context, and the reaction information of these amplicons at different time points before and after the specified amplicon current reaction position base recognition. The base identifier based on the neural network can correct the spatial crosstalk between multiple amplicons adjacent to each other physically, and can also perform independent context correction for each amplicon, not only can correct the influence of phasing and prephasing, but also can eliminate the pattern errors caused by the context base arrangement features, etc. to a certain extent. In addition, the file size of the input data is smaller than the file size of the corresponding image, and compared with the base recognition model in which the input data processed is an image, the base recognition using this model has significant advantages in terms of computing power consumption and calculation speed.
[0072] In certain preferred embodiments, n is greater than or equal to 2, and m1 and m2 are each independently greater than or equal to 1. In this way, input data including the amplicons of the target round sequencing and the multiple rounds of sequencing before and after it is input into the neural network-based base identifier, so that the spatial position relationship of the amplicons, the context, and the influence of different time points before and after (target round sequencing before and after the target round) on the current round base extension and recognition of the designated amplicon can be fully considered and corrected, so that the base type of the amplicon introduced into the target round sequencing can be accurately predicted.
[0073] In some embodiments, the so-called neural network-based base identifier is a single model. Specifically, the so-called neural network-based base identifier 1000 is a trained multi-layer neural network model (semantic segmentation model) that can achieve semantic segmentation tasks. Specifically, the semantic segmentation model is selected from at least one of a network with an encoder-decoder structure or a transformer-based network. In an embodiment of the present application, when the neural network-based base identifier is a single model, it is sometimes directly referred to as a semantic segmentation model.
[0074] In other embodiments, the so-called neural network-based base identifier is a cascade model, comprising two or more models connected in series. The so-called cascade model includes a first sub-model and a second sub-model connected in series, and the first sub-model and the second sub-model are independently selected from a semantic segmentation model and a machine learning model. The semantic segmentation model is selected from a network with an encoder-decoder structure or at least one of a transformer-based network, and the machine learning model is selected from at least one of a tree model. In a preferred example, the models constituting the cascade model include at least one semantic segmentation model. In this way, the use of the cascade model can quickly and efficiently consider the effects of space, context, etc. on the accuracy of the prediction results, and reduce the requirements for computing power.
[0075] For further information, see Figure 2 In some specific examples, the base recognition method includes: S50 respectively processes the input data of each round of sequencing of the amplicon from the n-m1th round to the n+m2th round through the first sub-model to generate the first prediction results of each designated round, and the so-called first prediction results of the designated round include the probability that the bases introduced into each amplicon by the sequencing in this round are A, C, T and G; and S52 processes the first prediction results of each designated round and the round information of each designated round through the second sub-model to generate the output. In a preferred example, the first sub-model is a semantic segmentation model. In this way, the use of this cascade model can effectively consider the influence of space, context, etc. on the accuracy of the prediction results, and it is fast and efficient.
[0076] Please refer to Figure 3 In some other specific examples, the base recognition method includes: S60 processing the input data of the designated amplicon from the n-m1th round to the n+m2th round through the first sub-model to generate the second prediction results of each designated round of the amplicon, and the second prediction results of each designated round of the amplicon include the probability that the bases introduced into the amplicon by sequencing in each designated round are A, C, T and G; and S62 processing the second prediction results of each designated round of each designated amplicon through the second sub-model to generate the output. In a preferred example, the second sub-model is a semantic segmentation model. In this way, the use of this cascade model can effectively consider the influence of space, context, etc. on the accuracy of the prediction results, and it is fast and efficient.
[0077] In certain embodiments, when the neural network-based base identifier is a cascade model, the cascade model includes not only a semantic segmentation model but also a machine learning model, and the so-called machine learning model is a gradient boosted decision tree GBDT, and the gradient boosted decision tree uses at least one of the LightGBM and XGBoost algorithms. Thus, in some tests, it was found that the use of such machine learning models in combination with semantic segmentation models can effectively consider the impact of space, context, etc. on the accuracy of prediction results, and it is fast and efficient.
[0078] The semantic segmentation model in each embodiment of the present application is, for example, a convolutional neural network (CNN), and specifically, can be selected from at least one of U-Net, DeepLab, SegFormer, PSPNet, FCN, GCN and their respective variants.
[0079] More specifically, in some embodiments, the semantic segmentation model is U-Net or SegFormer. Preferably, it is U-Net or SegFormer with an attention mechanism added, such as U-Net or SegFormer with a CBAM module (Convolutional Block Attention Module) or a SE module (Squeeze-and-Excitation) added to the encoding part, such as U-Net with a transformer-based multi-head attention mechanism added to the decoding part and the jump connection part. The inventors used the same training data to train and test these network structures and their variants, respectively. The training and test results show that the use of these models or their variants can obtain a prediction model with a high classification result accuracy.
[0080] U-Net (arXiv:1505.04597[cs.CV]) is a convolutional neural network (CNN) architecture for semantic segmentation, first proposed by Ronneberger et al. [Ronneberger O, Fischer P, Brox TU-net: Convolutional networks for biomedical image segmentation[C] / / Medical image computing and computer-assisted intervention-MICCAI 2015:18th international conference, Munich, Germany, October 5-9, 2015, proceedings, part III 18. SpringerInternational Publishing, 2015:234-241.]. U-Net consists of a symmetrical encoder-decoder structure. The encoder part is responsible for extracting input data features and obtaining high-level feature representations through step-by-step downsampling operations (such as convolution and maximum pooling). The decoder part is used to step-by-step upsampling and restore the spatial resolution of the input data to make it consistent with the input. To enhance resolution and preserve details, U-Net uses skip connections at each layer to pass features from the encoder to the decoder.
[0081] In some specific examples, in order to improve the performance of U-Net in semantic segmentation tasks, an attention mechanism can be added to the encoder or decoder, such as adding the SE module [Hu, J., Shen, L., & Sun, G. (2018). Squeeze-and-Excitation Networks. arXiv preprint arXiv: 1709.01507.], the SE module strengthens salient features and suppresses redundant information by calculating attention weights for each channel. Adding the SE module to the encoder part of U-Net allows the network to pay more attention to important channels and improve encoding efficiency. Another example is adding the CBAM module [Woo S, Park J, Lee JY, et al. Cbam: Convolutional block attention module [C] / / Proceedings of the European conference on computer vision (ECCV). 2018: 3-19.], the CBAM module combines channel attention and spatial attention, and makes the network's attention to important features more precise by weighting the information on channels and space. If the CBAM module is added to the encoding part, the network will extract input data features more effectively and optimize the features in space and channels. In addition, the U-Net variant can also introduce a transformer-based multi-head attention mechanism in the decoder and jump connection parts. Multi-Head Attention can model detail information in a wider context, allowing the decoder to restore details more effectively and achieve higher accuracy in segmentation tasks.
[0082] SegFormer (arXiv:2105.15203[cs.CV]) is a lightweight, Transformer-based semantic segmentation architecture designed for efficient and accurate semantic segmentation. SegFormer consists of two key components: encoder and decoder. The encoder consists of a Transformer encoder (such as Vision Transformer), which can capture long-range dependencies and generate multi-scale feature representations. The decoder of SegFormer directly fuses the multi-scale features generated by the encoder and generates the final segmentation result. SegFormer already has a built-in Transformer-based attention mechanism, and SegFormer with further added attention mechanisms can further enhance its performance. For example, SegFormer variants that add CBAM or SE modules to the encoder part can further highlight meaningful features while suppressing irrelevant features; for example, adding a multi-head attention mechanism to the decoder part can strengthen the interaction between feature maps. Multi-head attention can model the interactive relationship between features of different scales and improve the accuracy and resolution of segmentation results.
[0083] In some specific examples, such as in a network structure such as U-Net, the so-called neural network-based base identifier 100 or the semantic segmentation model 200 contained therein includes: an encoder 120 including multiple downsampling layers 102, each downsampling layer 102 including at least one pooling operation and at least one convolution operation, and at least a portion of the downsampling layers 102 have a CBAM module 1020 or a SE module 1022 added thereto; a decoder 140 including multiple upsampling layers 104 and the number of upsampling layers 104 is the same as the number of downsampling layers 102, each upsampling layer 104 including at least one deconvolution operation or a bilinear interpolation operation; and a jump connection 160 connecting the downsampling layer 102 and the corresponding upsampling layer 104.
[0084] Furthermore, in some specific examples, the encoder 120 also includes an input convolution layer 101, and the alternative representation of the input data generated by the input convolution layer 101 is used as the input of the first downsampling layer 102 of the encoder 120, and the input convolution layer 101 includes multiple convolution operations; and / or, the decoder 140 also includes an output convolution layer 105, and the output convolution layer 105 processes the alternative representation generated by the last upsampling layer 104 of the decoder 140 to generate the output.
[0085] Figure 4 A schematic diagram of the structure of a U-Net in which a CBAM module 1020 is added to the downsampling layer in an embodiment is shown. In the figure, “Down” represents the downsampling layer 102, “up” represents the upsampling layer 104, and the arrow from the downsampling layer to the upsampling layer represents the skip connection 160.
[0086] In some more specific examples, the neural network-based base identifier 100 or the segmentation model 200 further has one or more of the following technical features (a)-(e): (a) The encoder 120 includes four downsampling layers 102. (b) Each downsampling layer 102 includes a CBAM module 1020 or a SE module 1022 and a Down structure 1024 connected to the CBAM module 1020 or the SE module 1022; in a specific example, the Down structure 1024 includes one pooling and two convolution operations. (c) The CBAM module 1020 includes a channel attention module 10202 and a spatial attention module 10204 connected, the channel attention module 10202 includes a first pooling unit 10202a, an MLP unit 10202b and a first output layer 10202c, and the spatial attention module 10204 includes a second pooling unit 10204a, a convolution unit 10204b and a second output layer 10204c. In the channel attention module 10202, the input is subjected to global maximum pooling and global average pooling of the first pooling unit 10202a to generate two channel descriptors, and the two channel descriptors are processed by the shared MLP in the MLP unit 10202b to obtain channel weights, which are then output through the first output layer 10202c to obtain the result of weighting the input using the channel weights; in the spatial attention module 10204, the output from the first output layer 10202c is subjected to global maximum pooling and global average pooling of the second pooling unit 10204a to generate two spatial descriptors, which are processed by the convolution layer of the convolution unit 10204b to obtain spatial weights, which are then output through the second output layer 10204c to obtain the result of weighting the output of the first output layer 10202c using the spatial weights. (d) The SE module 1022 includes a channel attention module 10222, which includes a third pooling unit 10222a, a fully connected unit 10222b and a third output layer 10222c. A channel of the input is subjected to global average pooling by the third pooling unit 10222a to generate a corresponding channel descriptor, and these channel descriptors are processed by two fully connected layers and activation functions of the fully connected unit 10222b to obtain channel weights, and then the third output layer 10222c outputs the result of weighting the input using the channel weights. (e) Each upsampling layer 104 includes a bilinear interpolation or a deconvolution operation (Transposed Convolution, also called inverted convolution), and a splicing operation, which splices the output of the previous layer with the result of the corresponding downsampling layer 102 passed to the upsampling layer 104 through the jump connection 160 in the channel dimension.
[0087] Specifically, for example, in network structures such as U-Net, in (b), the Down structure of the downsampling layer refers to the encoding path of the convolutional neural network, which is used to extract high-level features of the input data. These layers obtain feature representations at different scales by gradually reducing the spatial resolution of the feature map (i.e., downsampling). Common components of the Down structure include convolution, pooling layer, batch normalization, and Dropout layer (often optional). Each downsampling layer or block usually contains two convolution operations (e.g., 3×3 convolution kernel), and the ReLU activation function is usually used. Each convolution extracts features of the image, thereby gradually building a more abstract representation. The stride of the convolution operation is usually 1 to ensure that the resolution of the feature map does not change in this step. After the convolution operation, a maximum pooling layer is usually used. The maximum pooling layer can set a 2×2 pooling kernel and use a stride of 2. This step reduces the resolution of the feature map by selecting the maximum value in the pooling area, thereby downsampling the feature map. The role of the maximum pooling layer is to reduce the spatial dimension of the feature map while maintaining the most important feature information, thereby improving the computational efficiency of the model. Sometimes, a batch normalization layer is added after the convolution operation. It stabilizes the training process and speeds up convergence by normalizing the mean and variance of the convolution output. Batch normalization helps reduce internal covariate shift and improve the expressiveness of the network. In addition, in some applications, a Dropout layer is added to the Down structure to reduce overfitting. Dropout helps improve the generalization ability of the model by randomly discarding some neurons.
[0088] In (e), bilinear interpolation is used for preliminary upsampling, which can stretch the feature map to a higher resolution than the original resolution. Bilinear interpolation is a non-learned, simple and fast upsampling method. Deconvolution is a learned upsampling method that generates a high-resolution feature map from a low-resolution feature map by applying the convolution layer in reverse. For example, in U-Net, the upsampled feature map generated by deconvolution is concatenated with the feature map of the corresponding layer in the encoding path (downsampling stage) in the channel dimension, so as to preserve low-level detail information and enhance the network's ability to recognize detailed features such as edges. In a certain comparative test, it was found that bilinear interpolation is fast, but it is not as effective as deconvolution when faced with complex data situations.
[0089] In some embodiments, for the cascade model, the first sub-model and the second sub-model are trained independently using non-overlapping training data. In this way, overfitting can be prevented, so that the trained model does not lose the generalization ability for new data or the generalization ability is insufficient. It is also convenient to train the sub-models in parallel and quickly obtain the trained cascade model.
[0090] In some embodiments, training a neural network-based base identifier or semantic segmentation model based on training data includes calculating the gradient of a loss function using back propagation to guide stochastic gradient descent to update model parameters to minimize the loss function, wherein the loss function is a hybrid loss function including at least one of cross entropy loss, dice loss, mean square error, and one or more custom loss functions, and the custom loss function can be a parameter commonly set for sequencing scenarios to evaluate sequencing results or intermediate results, such as sequencing error rate, pattern error feature parameters, etc. In a certain example, the custom loss function includes mismatch loss, which reflects the proportion or content of bases whose predicted results are inconsistent with the actual results.
[0091] In the relevant embodiments, the loss function is a function that measures the error between the predicted value and the true value. Given a training data set, the error between the predicted value and the true value is only related to the model parameters, so it is recorded as a function with the model parameters as parameters. In machine learning or deep learning, the function that measures the error is called a loss function. Optimization algorithms such as stochastic gradient descent (SGD, such as mini-batch gradient descent algorithm) are used to find numerical solutions and optimize the loss function by continuously iterating the model parameters. Back propagation (BP) is a common method used in conjunction with optimization algorithms such as SGD to train a network. Its basic idea can be summarized as the following steps: forward propagation (calculating the network output result), calculating the error (calculating the error between the network output result and the true result (the error is usually measured by the loss function)), back propagation error (calculating the gradient of the loss function to each parameter) and updating parameters (updating the network parameters according to the calculated gradient).
[0092] In one example, the optimization algorithm or optimizer used is SGD; during the model training process, SGD calculates the gradient by randomly selecting a part of the samples, and then updates the parameters of the network according to the gradient. In one example, during the training of the U-Net network, U-Net defines the structure and function of the network, SGD optimizes the parameters of U-Net, and uses multiple loss functions (mixed loss functions) during back propagation, and includes custom loss functions to guide the training direction of the network; custom loss functions are, for example, mismatch loss functions, which can be defined as the ratio of the number of base recognition results that are different from the training results and the true labels to the total number of base recognitions in the true labels.
[0093] In some specific examples, the hybrid loss function includes cross entropy loss, dice loss and mismatch loss, and the test found that making the relative weight of dice loss the second highest or the highest is conducive to training a model with higher accuracy of base recognition results. In some more specific examples, the weights of cross entropy loss, dice loss and mismatch loss in the hybrid loss function are 1:3:4, 1:4:4, 1:5:4, 1:6:4, 1:7:4, 1:7:5, etc., respectively, and all can train to obtain prediction models with better performance. It should be noted that the embodiments of the present application are limited to specific numerical values, and unless otherwise specified, fluctuations of ±10% of the original values are allowed or included.
[0094] In some examples, a so-called neural network-based base caller or semantic segmentation model is trained by supervised learning or semi-supervised learning.
[0095] The present application embodiment does not limit the way in which the training data used in the training model is obtained. The bases incorporated into the template nucleic acid in each round can be identified by conventional base recognition methods or software or tools to obtain the base recognition results of each round or to measure at least a portion of the sequence of the template nucleic acid. In some examples, in the training data, the base on the reference sequence corresponding to the base recognition result of the amplicon is used as the target value (the target value is sometimes also referred to as the true result or the correct answer or the true label in the present application embodiment).
[0096] In addition, in the process of constructing training data, eliminating sequences with poor sequencing quality or unreliable or relatively low-reliability alignment positions can improve the reliability of training data, and training based on highly reliable training data is conducive to training a prediction model that obtains accurate and reliable base recognition results. For example, in a certain example, for sequences that failed to successfully align to the reference genome or whose alignment results are unreliable or have low credibility, the bases in such sequences or positions are assigned as "N" or recorded as "N", and the bases or sequences recorded as N are not involved in subsequent training, which can improve the reliability of training data.
[0097] In some specific examples, m1 is equal to or greater than m2. In multiple tests, it is found that, especially in the cascade model, m1 values greater than or equal to m2 are often beneficial to reducing mode errors. For example, when m1 is 9, 7, 6, 5 or 3, and the corresponding m2 values are 5, 6, 4, 5 or 3, the prediction results of the model are good, especially the high-frequency mode errors are significantly reduced.
[0098] In gene sequencing, the types of errors can be divided into high-frequency pattern errors and non-high-frequency pattern errors according to their frequency and pattern. These two types of errors generally need to be processed in sequencing data analysis to ensure the accuracy of sequencing results.
[0099] High-frequency pattern errors generally refer to systematic errors that often occur in sequencing data. Such errors are often caused by the limitations of sequencing technology, the characteristics of reagents, or defects in data processing algorithms. High-frequency pattern errors often have the following characteristics: systematic, usually appearing multiple times under the same experimental conditions; technical dependence, different sequencing technologies will produce different types of high-frequency pattern errors; predictability, due to their systematicity, these errors are often predictable and can usually be corrected by specific methods. Common error types include base duplication errors: they are prone to occur in long homopolymer regions, such as measuring "AAAA" as "AAA" or "AAAAA"; sequence preference errors, sequencing technology inaccurately identifies certain bases or sequence fragments; and insertion / deletion errors (Indels), incorrectly inserting or deleting bases in the sequence.
[0100] Non-high-frequency pattern errors generally refer to errors that are uncommon or randomly appear in sequencing data. These errors are often caused by occasional technical problems, variations in sample processing, or random noise. Non-high-frequency pattern errors often have the following characteristics: randomness, no obvious systematicity or repeatability, and random distribution in the data; difficult to predict, due to their randomness, these errors are difficult to predict and systematically correct; sporadic, often caused by one-time technical problems or accidental processing errors. Common error types include random base errors, misreading of a single base, such as mistakenly identifying "A" as "G"; sporadic insertion / deletion errors, inserting or deleting bases without a specific pattern; noise-induced errors, random errors caused by experimental noise or environmental factors.
[0101] The embodiment of the present application does not limit the method for obtaining input data, that is, the method for obtaining the position information and intensity information of the amplicons on the surface.
[0102] In some embodiments, the surface is a patterned surface, for example, it is presented as a regular array of holes, the surface includes a labeling area and a reaction area, the spatial positional relationship between the labeling area and the reaction area is known and the signals from the labeling area and from the reaction area have obvious differences in the image, or the signal from the labeling area appears as a specific identifiable feature in the image, and multiple amplicons are respectively connected to multiple separate holes in the reaction area, and a template is constructed by processing at least one fluorescent channel image in the image collected by the first round of sequencing, and input data is obtained based on the template, including: identifying features corresponding to the labeling area on the fluorescent channel image to determine the position of the labeling area on the image, and determining the position information of the amplicons based on the position of the labeling area to construct the template; and mapping the position information of the amplicons on the template to the images collected by each designated round of sequencing, respectively, to respectively determine the position information and intensity information of the amplicons on the images collected by each designated round of sequencing.
[0103] Specifically, the trackline on the surface can be identified based on the signal from the marking area, such as a marking line (trackline), and then according to the positional relationship between the trackline preset when the surface layout is designed and the holes connecting the amplification clusters in the reaction area, the positions of all regularly arranged amplification clusters can be calculated directly based on the trackline position.
[0104] In other embodiments, a template is constructed by processing the images collected by the first round or the first p1 round of sequencing, and the input data is obtained based on the template, where p1 is a natural number greater than 0 and less than or equal to 4, including: identifying the bright spots on each image corresponding to the amplicons where the specified biochemical reaction has occurred, and merging these bright spots to obtain the constructed template; and mapping the position information of these amplicons on the template to the images collected by each specified round of sequencing, respectively, to respectively determine the position information and intensity information of these amplicons on the images collected by each specified round of sequencing. This method is suitable for obtaining the input data for sequencing based on imaging detection of random array surfaces or regular array surfaces. A certain embodiment uses the technical solution disclosed in CN112289381B to construct a template and determine the position of the amplicon that reacts on the specified round of images and the intensity value of the amplicon.
[0105] In some embodiments, a template is constructed by processing the images collected by the first p2 rounds of sequencing, and the input data is obtained based on the template, where p2 is a natural number greater than or equal to 6, including: detecting the base introduced into each unit position according to the intensity of each unit position on each image in each round to determine the detected base sequence of each unit position, the image includes multiple unit positions, the size of a unit position is less than or equal to the size of a pixel of the image, and the size of a feature corresponding to an amplicon in which a specified biochemical reaction has occurred on the image occupies one or more unit positions; clustering the unit positions based on the similarity of the detected base sequences at the unit positions, including classifying multiple unit positions of multiple base detection sequences that meet a preset level of similarity as corresponding to the same amplicon to construct a template, the template including the position information of the amplicon on the surface; and mapping the position information of the amplicon on the template to the images collected by each designated round of sequencing, respectively, to determine the position information and intensity information of the amplicon on the images collected by each designated round of sequencing. The method is suitable for obtaining input data for sequencing based on imaging detection of random array surfaces or regular array surfaces.
[0106] In some examples, the intensity information referred to is corrected intensity information. The correction may be selected from at least one of crosstalk correction and / or phase correction (phasing and prephasing).
[0107] The input data includes the position information and intensity information of the amplicon on the image, and the size of the input data is smaller than the size of the image to which it corresponds. Therefore, from a certain perspective, the input data can be said to be compressed image information or data after extraction or screening of image information, which can be expressed as a simplified image form or a non-image form, preferably, expressed as a data form that is convenient for computer or processor calculation and processing. In a preferred example, it is expressed as a non-image data form, such as written in a matrix, a multi-dimensional matrix, an array, a multi-dimensional array, etc., only recording or presenting the relative position information and intensity information of the amplicon on the image, so that compared with the input original image, the file size of the input data can be greatly reduced, the requirements for computing power and / or storage can be reduced, and it is also beneficial for the computer to quickly perform various operations or processing on it to quickly obtain the prediction results. After compression and / or extraction of image-specific information and conversion into other data forms, in some examples, the file size of the input data is less than or equal to half of the file size of the image to which it corresponds. On some high-density random or array surfaces, the file size of the input data is less than or equal to one-third of the file size of the image to which it corresponds, or even one-fifth of the size of the original image.
[0108] In some embodiments, the file size of the input data is less than or equal to half the file size of the image to which it corresponds. In some examples, especially for regular surfaces, the file size of the input data is less than or equal to one-third of the file size of the image to which it corresponds. In some tests, especially for high-density regular surfaces, the size of the input data is even less than or equal to one-quarter or one-fifth of the file size of the image to which it corresponds. In this way, compared with directly inputting image data, the storage or occupied space is significantly reduced and the running speed is significantly improved.
[0109] Specifically, in some examples, the input data is represented as multiple groups of matrices, one group of matrices includes multiple matrices, one group of matrices reflects the position information and intensity information of the amplicon on the image collected in one round of sequencing, one matrix contains multiple rows and multiple columns, one matrix reflects the information of the amplicon on the whole or one area of a fluorescent channel image in one round of sequencing, one element of the matrix corresponds to one amplicon, the row and column positions of the elements of the matrix reflect the position information of the corresponding amplicon on the corresponding image, and the values of the elements of the matrix reflect the intensity information of the corresponding amplicon presented on the image of a fluorescent channel of the round of sequencing. In some embodiments, the matrix is also referred to as a fluorescence brightness matrix. In this way, compared with the input image, the amount of information or size of the input data is greatly reduced, which is conducive to reducing the requirements for storage or computing power, and is conducive to improving the running calculation speed.
[0110] In some more specific examples, one piece of input data may correspond to multiple amplicons in an area or field of view (FOV), and one piece of input data, such as one or one group of "fluorescence brightness matrices", may correspond to the position and intensity information of amplicons corresponding to specified reactions in an image collected in one round of sequencing in one field of view. In this way, the size of the input data is significantly reduced compared to the input original image, which can reduce the requirements for computing power and / or storage.
[0111] Regarding the number of matrices included in a group and the dimensions of the matrices, it can be understood that a group of matrices corresponding to a group of images of a sequencing round of multiple fluorescent channels and a FOV, such as four fluorescent brightness matrices of amplicons from four fluorescent channels of a sequencing round of a FOV of four-color sequencing, three fluorescent brightness matrices of amplicons from three fluorescent channels of a sequencing round of a FOV of three-color sequencing, and two fluorescent brightness matrices of amplicons from two fluorescent channels of a sequencing round of a FOV of two-color high-throughput sequencing, can all be called a three-dimensional matrix. Combined with conventional knowledge, those skilled in the art can understand the specific meaning of the description involving matrices, the number of matrices, or the dimensions according to the description of the specific embodiments, including the context.
[0112] Figure 5A flow chart showing a neural network-based base identifier processing input data to predict base recognition results. Scheme 1 shows the case where the neural network-based base identifier is a single model, while Schemes 2.1 and 2.2 show the cases where two neural network-based base identifiers are cascade models. In addition, Scheme 2.1 shows that the input data first passes through the spatial crosstalk correction submodel (model 1 in Scheme 2.1), and its output then passes through the context crosstalk correction submodel (model 2 in Scheme 2.1), that is, the serial order or calling order of the cascade models used in Scheme 2.1 is to call the spatial crosstalk submodel first and then the context crosstalk correction submodel; while Scheme 2.2 shows that the input data first passes through the context crosstalk correction submodel (model 1 in Scheme 2.2), and its output then passes through the spatial crosstalk correction submodel (model 2 in Scheme 2.2), that is, the serial order or calling order of the cascade models used in Scheme 2.2 is the context crosstalk correction submodel first and the spatial crosstalk correction submodel later.
[0113] Furthermore, in some examples, the advantage of the input matrix over the input original image is not only in the difference in image and matrix size. For example, for the four images of a field of view collected from a regular surface in a round of sequencing of four-color fluorescence imaging sequencing, assuming that the size of each image is 2000*2000 pixels, and the size of the template point matrix (fluorescence brightness matrix) reflecting the position and intensity information of the amplicon on the image written in matrix form is 800*800, then the size is reduced to 0.4^2 times the original. Moreover, the brightness information corresponding to the 800*800 template points input into the matrix can be the brightness information corresponding to the sub-pixel level positioning position, such as the brightness obtained by bilinear interpolation or other interpolation methods, not the brightness value corresponding to a certain pixel in the image. Therefore, in terms of the amount of information, the 800*800*4 template brightness matrix information reflects the information of the 2000*2000*4 matrix of the four images plus the 800*800 position matrix. It can be said that the amount of information in the input matrix reflects the position information and intensity information of the amplicon determined directly or indirectly based on the image information including the information of the processed image. In this way, the input data not only contains the target information, but also has a significantly reduced size and is presented in a matrix form that is easy for the machine to run and calculate, which is further conducive to the rapid prediction of accurate and reliable base recognition results.
[0114] In some more specific examples, a matrix reflects the information of the amplicon on a block of a fluorescent channel image in a round of sequencing, and the input data also includes a matrix reflecting the position information of each block in the image from which it comes. In this way, the matrix corresponding to a fluorescent channel image is converted into a group of relatively small matrices, or a fluorescent channel image is converted into a group of blocks, the information of the amplicon in the simplified block is extracted into a matrix form, and these relatively small matrices are processed in parallel. Under the same hardware and software computing environment, the processing speed of the input data can be further improved, and the prediction results can be obtained more quickly.
[0115] Please refer to Figure 6 In a specific example, the image is converted into a set of block matrices, and the block matrices of different sizes are all filled with zeros to the same size as input, so the entire image is converted into a total of 3*3, that is, 9 blocks; and the length and width of the 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 in the lower right corner is numbered 9, and a layer of Pos(P) position encoding is filled with all values 9 to obtain the final input matrix.
[0116] Please refer to Figure 7 , a base recognition system 1000 of an embodiment of the present application that can implement all or part of the steps of the base recognition method in any of the above embodiments or examples, the base recognition system 1000 includes: a processing unit 1010, which is used to process input data of multiple amplicons through a neural network-based base recognizer 100 and generate an alternative representation of the input data, wherein the input data includes position information and intensity information of the amplicons on images collected from the n-m1th round to the n+m2th round of sequencing, and the so-called sequencing adopts multi-fluorescence channel sequencing based on surface imaging Technology, the amplicon is a nucleic acid molecule to be tested that contains multiple identical polynucleotide molecules, and the amplicon is connected to a surface, n is a natural number greater than or equal to 1 and n is greater than m1, m1 and m2 are each independently an integer greater than or equal to 0; an output unit 1030, used to process the alternative representation through an output layer to generate an output, wherein the output identifies the probability that the base introduced into each of the amplicons by the nth round of sequencing is A, C, T and G; and a base type determination unit 1050, determines the base type introduced into each amplicon by the nth round of sequencing based on the output.
[0117] It should be noted that the explanation or description of the technical features and beneficial effects of the base recognition method in any of the above-mentioned embodiments, examples or examples is also applicable to the base recognition system 1000, and will not be elaborated in detail here to avoid redundancy. For example, in some embodiments, n is greater than or equal to 2, and m1 and m2 are each independently greater than or equal to 1. In this way, the influence of the previous and next rounds of information on the base type of the specified amplicon incorporated into the current round can be further paid attention to.
[0118] In some embodiments, the so-called neural network-based base identifier is a single model after training, which is a neural network (semantic segmentation model) that can perform semantic segmentation tasks. The so-called semantic segmentation model can be selected from at least one of a network with an encoder-decoder structure or a transformer-based network.
[0119] In other embodiments, the so-called neural network-based base identifier is a trained cascade model, which includes a first sub-model and a second sub-model connected in series, and the first sub-model and the second sub-model are each independently selected from a semantic segmentation model and a machine learning model. The semantic segmentation model is selected from at least one of a network with an encoder-decoder structure or a transformer-based network, and the machine learning model refers to a traditional machine learning model, such as at least one selected from a tree model.
[0120] In some embodiments, the system 1000 includes: a first sub-model module 1012, which is used to process the input data of each round of sequencing from the n-m1th round to the n+m2th round of the amplicon through the first sub-model, so as to generate the first prediction results of the specified round respectively, and the first prediction results of the specified round include the probability that the bases introduced into each of the amplicon by the sequencing in this round are A, C, T and G; a second sub-model module 1014, which is used to process the first prediction results of each specified round and the round information of each specified round through the second sub-model to generate the output. In some specific examples, the first sub-model is a semantic segmentation model, and the so-called semantic segmentation model is selected from at least one of a network with an encoder-decoder structure or a transformer-based network.
[0121] In other embodiments, the system 1000 includes: a first sub-model module 1016, which is used to process the input data of the specified amplicon from the n-m1th round to the n+m2th round through the first sub-model to generate the second prediction results of each specified round of the amplicon, and the second prediction results of each specified round of the amplicon include the probability that the bases introduced into the amplicon by sequencing in each specified round are A, C, T and G; and a second sub-model module 1018, which processes the second prediction results of each specified round of each specified amplicon through the second sub-model to generate the output. In some specific examples, the second sub-model is a semantic segmentation model, and the so-called semantic segmentation model is selected from at least one of a network with an encoder-decoder structure or a transformer-based network.
[0122] Specifically, the semantic segmentation model is selected from at least one of U-Net, DeepLab, SegFormer, PSPNet, FCN, GCN and their respective variants.
[0123] In some embodiments involving a cascade model including a machine learning model, the so-called machine learning model generally refers to a traditional machine learning model, for example, the machine learning model is a gradient boosted decision tree GBDT, and the gradient boosted decision tree adopts at least one of the LightGBM and XGBoost algorithms.
[0124] In some embodiments, the neural network-based base identifier 100 in the system 1000 is a single semantic segmentation model or a cascade model including a semantic segmentation model, and the so-called semantic segmentation model is U-Net or SegFormer. Preferably, it is U-Net or SegFormer with an attention mechanism added; or it is U-Net with a CBAM module or SE module added to the encoding part. In another specific example, the semantic segmentation model is U-Net with a transformer-based multi-head attention mechanism added to the decoding part and the jump connection part.
[0125] In some embodiments, the semantic segmentation model in the single model or cascade model of the neural network-based base identifier 100 in the system 1000 includes: an encoder 120 including multiple downsampling layers 102, each downsampling layer 102 including at least one pooling operation and at least one convolution operation, and at least a portion of the downsampling layers 102 have a CBAM module 1020 or a SE module 1022 added; a decoder 140 including multiple upsampling layers 104 and the number of upsampling layers 104 is the same as the number of downsampling layers 102, each upsampling layer 104 including at least one deconvolution operation or a bilinear interpolation operation; and a skip connection 160 connecting the downsampling layer 102 and the corresponding upsampling layer 104.
[0126] Furthermore, in some specific examples, the encoder 120 also includes an input convolution layer 101, and the alternative representation of the input data generated by the input convolution layer 101 is used as the input of the first downsampling layer 102 of the encoder 120, and the input convolution layer 101 includes multiple convolution operations; and / or, the decoder 140 also includes an output convolution layer 105, and the output convolution layer 105 processes the alternative representation generated by the last upsampling layer 104 of the decoder 140 to generate the output.
[0127] In some more specific examples, the neural network-based base identifier 100 in the system 1000 or the semantic segmentation model 200 therein further has one or more of the following technical features (a)-(e): (a) The encoder 120 includes four downsampling layers 102. (b) Each downsampling layer 102 includes a CBAM module 1020 or a SE module 1022 and a Down structure 1024 connected to the CBAM module 1020 or the SE module 1022; in a specific example, the Down structure 1024 includes one pooling and two convolution operations. (c) The CBAM module 1020 includes a channel attention module 10202 and a spatial attention module 10204 connected, wherein the channel attention module 10202 includes a first pooling unit 10202a, an MLP unit 10202b and a first output layer 10202c, and the spatial attention module 10204 includes a second pooling unit 10204a, a convolution unit 10204b and a second output layer 10204c. In the channel attention module 10202, the input is subjected to global maximum pooling and global average pooling of the first pooling unit 10202a to generate two channel descriptors, and the two channel descriptors are processed by the shared MLP in the MLP unit 10202b to obtain channel weights, which are then output through the first output layer 10202c to obtain the result of weighting the input using the channel weights; in the spatial attention module 10204, the output from the first output layer 10202c is subjected to global maximum pooling and global average pooling of the second pooling unit 10204a to generate two spatial descriptors, which are processed by the convolution layer of the convolution unit 10204b to obtain spatial weights, which are then output through the second output layer 10204c to obtain the result of weighting the output of the first output layer 10202c using the spatial weights. (d) The SE module 1022 includes a channel attention module 10222, which includes a third pooling unit 10222a, a fully connected unit 10222b and a third output layer 10222c. A channel of the input is subjected to global average pooling by the third pooling unit 10222a to generate a corresponding channel descriptor, and these channel descriptors are processed by two fully connected layers and activation functions of the fully connected unit 10222b to obtain channel weights, and then the third output layer 10222c outputs the result of weighting the input using the channel weights. (e) Each upsampling layer 104 includes a bilinear interpolation operation or a deconvolution operation, and a splicing operation, which splices the output of the previous layer with the result of the corresponding downsampling layer 102 passed to the upsampling layer 104 through the skip connection 160 in the channel dimension.
[0128] In some embodiments, the neural network-based base caller 100 in the system 1000 is a cascade model including a first sub-model and a second sub-model, and the first sub-model and the second sub-model are trained independently using non-overlapping training data.
[0129] In some embodiments, training a neural network-based base identifier 100 or a semantic segmentation model 200 therein based on training data includes calculating the gradient of a loss function using back propagation to guide stochastic gradient descent to update model parameters to minimize the loss function, wherein the loss function is a hybrid loss function comprising at least one of cross entropy loss, dice loss, mean square error, and one or more custom loss functions, wherein the custom loss function includes a mismatch loss, and the mismatch loss reflects the proportion or content of bases whose predicted results are inconsistent with the true results.
[0130] In some embodiments, the hybrid loss function includes cross entropy loss, dice loss and mismatch loss, and the weight ratio of the three is 1:3:4, 1:4:4, 1:5:4, 1:6:4, 1:7:4 or 1:7:5.
[0131] In some embodiments, the neural network-based base identifier 100 or the semantic segmentation model 200 therein is trained by supervised learning or semi-supervised learning, and the training is performed using the bases on the reference sequence corresponding to the base recognition results of the amplicon as the true results.
[0132] In some specific examples, it was found that m1 being equal to or greater than m2 is beneficial to further reduce pattern errors, especially when the neural network-based base caller is a cascade model.
[0133] In some embodiments, the system 1000 further includes an input data acquisition unit 1008 for acquiring input data of the amplicon.
[0134] In some specific examples, the surface is presented as a regular array of holes, the surface includes a labeling area and a reaction area, the spatial positional relationship between the labeling area and the reaction area is known and the signal from the labeling area is presented as a specific feature on the image, and multiple amplicons are respectively connected to multiple separate holes in the reaction area. In the input data acquisition unit 1008, a template is constructed by processing at least one of the images collected by the first round of sequencing, and input data is obtained based on the template, including: identifying the feature corresponding to the labeling area on the image to determine the position of the labeling area, and determining the position information of the amplicons based on the position of the labeling area to obtain the template; and mapping the position information of the amplicons on the template to the images collected by each designated round of sequencing, respectively, to determine the position information and intensity information of the amplicons on the images collected by each designated round of sequencing.
[0135] In other specific examples, in the input data acquisition unit 1008, a template is constructed by processing images collected by the first round or the first p1 rounds of sequencing, and the input data is obtained based on the template, where p1 is a natural number greater than 0 and less than or equal to 4, including: identifying bright spots on each image corresponding to amplicons in which specified biochemical reactions have occurred, and merging these bright spots to obtain a template; and mapping the position information of these amplicons on the template to the images collected by each specified round of sequencing, respectively, to respectively determine the position information and intensity information of these amplicons on the images collected by each specified round of sequencing.
[0136] In some further specific examples, in the input data acquisition unit 1008, a template is constructed by processing the images collected by the first p2 rounds of sequencing, and input data is obtained based on the template, where p2 is a natural number greater than or equal to 6, including: detecting the base introduced into each unit position according to the intensity at the unit position on each image in each round to determine the detected base sequence of each unit position, the image comprising a plurality of unit positions, the size of a unit position being less than or equal to the size of a pixel of the image, and the size of a feature on the image corresponding to an amplicon in which a specified biochemical reaction has occurred occupying one or more unit positions; clustering the unit positions based on the similarity of the detected base sequences at the unit positions, including classifying a plurality of unit positions of a plurality of base detection sequences whose similarity meets a preset level as corresponding to the same amplicon to obtain a template, the template comprising position information of the amplicons on the surface; and mapping the position information of the amplicons on the template to the images collected by each designated round of sequencing respectively to respectively determine the position information and intensity information of the amplicons on the images collected by each designated round of sequencing.
[0137] In some embodiments, the intensity information is corrected intensity information, for example, an intensity value after at least one of crosstalk correction and / or phase correction.
[0138] In some embodiments, the file size of the input data is less than or equal to half of the file size of the image to which it corresponds. For example, the file size of the input data is less than or equal to one-third, one-quarter, or even one-fifth of the file size of the image to which it corresponds, especially for patterned surfaces (regular surfaces).
[0139] In some specific examples, the input data is represented as multiple groups of matrices, one group of matrices includes multiple matrices, one group of matrices reflects the position information and intensity information of a certain field of view amplicon on an image collected in a round of sequencing, a matrix contains multiple rows and multiple columns, a matrix reflects the information of the field of view amplicon on all or a block of a fluorescent channel image in a round of sequencing, an element of the matrix corresponds to an amplicon, the row and column positions of the elements of the matrix reflect the position information of the corresponding amplicon on the corresponding image, and the values of the elements of the matrix reflect the intensity information of the corresponding amplicon presented in an image of a fluorescent channel in this round of sequencing.
[0140] In some preferred examples, a matrix reflects the information of the field of view amplicon on a block of a fluorescent channel image in a round of sequencing, and the input data also includes a matrix reflecting the position information of each block in the image from which it comes.
[0141] A computer program product according to an embodiment of the present application includes instructions. When a computer executes part or all of the instructions, the method in any of the above embodiments is executed.
[0142] A computing device according to an embodiment of the present application includes a memory for storing data, including a computer executable program; and one or more processors for executing the computer executable program to implement the method in any of the above embodiments. In some examples, the processor includes a GPU.
[0143] The computer-readable storage medium of the embodiment of the present application is used to store a program for computer execution, and executing the program includes completing the method in any of the above embodiments. The computer-readable storage medium includes a read-only memory, a random access memory, a disk or an optical disk, etc.
[0144] The present application also provides a method for training a base identifier based on deep learning, the method comprising training a single neural network model or a cascade model including a neural network using training data having the same content and data form as the input data in any of the above embodiments, so as to obtain a trained neural network. The base recognition results of the so-called training data are known, and the base recognition results of the training data can be determined by a conventional base recognition method. Unless otherwise specified, the characteristics of the input data, the model training mode or method in any of the above base recognition method embodiments are applicable to the training method of the base identifier based on deep learning. The method for training a base identifier based on deep learning can obtain the base identifier based on a neural network in any of the above embodiments.
[0145] Figure 8 A schematic diagram showing the process of building a base caller based on a neural network is shown. Scheme 1 shows the process of building a single model, and Schemes 2.1 and 2.2 show the process of building two cascade models.
[0146] In some embodiments, an early stopping mechanism is introduced. For example, if the training does not achieve better results within 30 or 50 epochs (training cycles), the training is stopped and the optimal training result parameters are saved to improve the robustness of the network and prevent overfitting.
[0147] The following further examples describe specific operation modes or implementation processes that may be included in some of the above embodiments, but this should not be understood as limiting the scope of the subject matter of the present application to the following further examples or embodiments.
[0148] Model Training
[0149] The following example introduces the modeling steps. Here, it is assumed that the model needs to consider the information of m bases in the adjacent context, where m can be freely selected according to the platform characteristics. Here, we take the four-color fluorescence imaging array chip second-generation sequencing scenario as an example to introduce two different modeling schemes.
[0150] Data extraction and preprocessing may include the following steps:
[0151] 1) Select appropriate libraries and reference genomes. The best genome should be as large as possible, cover as many application samples as possible, and exclude polymorphic sites as much as possible, and complete sequencing on an array chip. The total number of sequencing rounds generally needs to be consistent with the longest sequencing round number of the corresponding instrument in actual application. In order to obtain more comprehensive training data, sequencing is best repeated multiple times on different instruments of the same model by different operators using different batches of reagents and chips to accumulate training data sets.
[0152] Taking four-color fluorescence sequencing as an example, each field of view (FOV) will obtain four pictures in each round of sequencing, which are fluorescence images taken under the four fluorescence channels of A, G, C, and T.
[0153] 2) Use existing or conventionally known base recognition tools to analyze and base recognize the sequencing data to obtain base recognition results, that is, fastq files that record all fluorescent cluster labels (IDs) and their corresponding base sequences.
[0154] 3) Compare the fastq file with the reference genome to obtain the comparison result, i.e., bam file or sam file.
[0155] 4) 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 for 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 for 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. 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 can be eliminated. For sequences that failed to successfully align to the reference genome or whose alignment results are unreliable, the position of the corresponding fluorescent cluster on the target value matrix can be recorded as "N", and the subsequent positions recorded as N will not participate in the training.
[0156] 5) According to the known array chip design layout, locate the center position of all holes (i.e., the area where the fluorescence cluster is located) on each round of each fluorescence image, and obtain the fluorescence intensity of the center position of all fluorescence clusters from the original fluorescence image based on the above positioning. In the four-color fluorescence sequencing scenario, each round of sequencing of each fluorescence cluster corresponds to four fluorescence intensity values of the four fluorescence channels A, G, C, and T. Here, the fluorescence intensity on the original fluorescence image corresponding to the center position of each fluorescence cluster is called "original fluorescence brightness".
[0157] 6) Optional operation: According to the characteristics of the original fluorescence brightness distribution on each image, perform background removal operation on the original fluorescence brightness to remove the influence of the background of the image. Here, the fluorescence brightness after background removal is called "background-removed fluorescence brightness".
[0158] 7) Optional operation: According to the background-free fluorescence brightness distribution characteristics of the n-1th and nth rounds, perform phasing correction on the background-free fluorescence brightness of the Nth round; according to the background-free fluorescence brightness distribution characteristics of the nth and n+1th rounds, further perform prephasing correction; and according to 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), correct the signal crosstalk of the fluorescence channels. Finally, the background-free fluorescence brightness after phasing, prephasing, and fluorescence crosstalk correction is called "corrected fluorescence brightness".
[0159] 8) The brightness matrix used as a feature parameter input into the deep learning model can be any one of the original fluorescence brightness, background-removed fluorescence brightness, and corrected fluorescence brightness. Here, it is collectively referred to as "fluorescence brightness". Each fluorescence cluster will obtain a fluorescence brightness value on each fluorescence image. For each fluorescence image, the fluorescence brightness corresponding to each fluorescence cluster is arranged into a matrix according to the actual spatial position of the fluorescence cluster. For example, the fluorescence brightness corresponding to the fluorescence cluster in the 2nd row and the 8th column on the chip is written at the [1,7] coordinate of the matrix (counting from 0). Therefore, for each fluorescence image, a matrix with the same number of rows and columns as the number of rows and columns of the hole arrangement on the chip surface will be obtained, which is called the "fluorescence brightness matrix" here.
[0160] Single Model
[0161] 1. Refer to the above steps to build a training data set. Take 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. The eigenvalue can be all the fluorescence brightness matrices from the n-m1th to the n+m2th rounds, a total of (m1+m2+1)*4 (including m1+m2+1 rounds, 4 fluorescence channels per round). m1 and m2 can be equal or unequal. The following takes m1=m2=m as an example.
[0162] 2. Use the above training data set to build a deep learning model. The way to evaluate the final model effect is to evaluate the error rate level of the sequence output by the model.
[0163] 3. In the process of building the model, there are many data selection and model parameter adjustment methods involved. Among them, the parts that are most relevant to sequencing and have a greater impact on the accuracy of the model prediction results after testing include:
[0164] When constructing a training data set, it is better to select data with high confidence in the alignment results for training. For example, when constructing the target value matrix in 4) above, if there is an insertion or deletion in the corresponding sequence in the sam or bam file, 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'.
[0165] In the subsequent training process, the position with the target value N may not be involved in the training. For example, the position corresponding to N may not be considered when calculating the loss function.
[0166] The loss function needs to be optimized according to the specific model. Tests have found that considering the parameters for evaluating sequencing quality in sequencing scenarios is conducive to obtaining a better model. For example, when calculating the loss function, in addition to considering the traditional loss function calculation method, you can also add parameters unique to the sequencing scenario, such as sequencing error rate, pattern error characteristic parameters, etc.
[0167] 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, model A can be used for rounds 0-50, model B for rounds 51-100, and so on.
[0168] In the embodiments of the present application, single model training is sometimes referred to as Scheme 1, and cascade model training is sometimes referred to as Scheme 2.
[0169] Cascade Model
[0170] 1. The main idea of Scheme 2 is to connect two or more sub-models in series. The following takes the case where the cascade model is a series connection of two sub-models as an example. Specifically, according to the main focus of the two sub-models or the main impact on the prediction results, the two sub-models are sometimes respectively referred to as the spatial crosstalk correction model and the context correction model. The order of the two sub-models is not restricted, and the spatial crosstalk can be corrected first, or the contextual influence can be corrected first. Generally, the spatial crosstalk correction model is a neural network, and the contextual influence correction model can choose traditional machine learning such as a tree model or a neural network. Here, the training of the cascade model of the spatial crosstalk correction model (model 1) and the contextual influence correction model (model 2) is taken as an example, see Figure 8 Solution 2.1.
[0171] 2. 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.
[0172] 3. Based on the training data set of model 1, deep learning model 1 is established. 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.
[0173] 4. Construct the training data set for model 2. One piece of data corresponds to the relevant data information of a 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 characteristic value is the base classification probability value corresponding to the nmth to n+mth rounds, a total of (2m+1)*4 values; in addition, the characteristic value can also include round number information (i.e., n value), parameters related to the size distribution relationship of the four base classification probabilities, and so on. It can be understood that when training model 2, the input of model 2 is the output of the trained model 1.
[0174] 5. Based on the training data set of model 2, train model 2. 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.
[0175] 6. You can also swap the order of Model 1 and Model 2 before building the model. That is, first build the training model 2 and then train the model 1. You only need to swap the fluorescence brightness and base classification probability in the above steps and re-build the model. That is, when training Model 1, the input feature value of Model 1 is the output of the trained Model 2. Please refer to Figure 8 Solution 2.2.
[0176] It should be noted that using completely independent and non-overlapping training data to train Model 1 and Model 2 respectively can prevent the occurrence of potential overfitting and help to ultimately obtain a more practical and universal cascade model.
[0177] Model prediction (base recognition)
[0178] For the model calling methods corresponding to the single model and cascade model in the above example, please refer to Figure 5 In some sequencing scenarios, the input data is the number of sequencing rounds and the fluorescence brightness matrix. Therefore, when it is necessary to consider the data of multiple rounds before and after, only the fluorescence brightness matrix of the multiple rounds before and after needs to be retained, and the original image does not need to be retained. This can greatly save the storage requirements of the online analysis (sequencing and analysis) system and improve the calculation speed of online analysis.
[0179] Fig. 9 The figure shows the process of using the trained U-Net to process input data to obtain base recognition results.
[0180] In addition, for patterned surfaces / chips with marking areas, the marking areas separate the reaction areas into multiple blocks. Under a given data processing calculation level, in some tests, it was found that if the matrix corresponding to the entire image is input at one time, the input matrix is too large, and the existence of crosspoints between blocks affects the network training speed and the accuracy of the training results. Therefore, the entire image matrix can be cut into matrices of corresponding sizes according to the actual block size, and additional position codes are given according to the position of the block in the entire image to reflect the position information.
[0181] For example, see Figure 6 , all matrices of different sizes are filled with zeros to the same size as input, and the entire image is converted into a total of 3*3, that is, 9 blocks, with different lengths and widths of blocks; after being split into 9 blocks, the edges of all blocks that are less than b*y are filled with 0 values to the size of b*y; finally, an additional position encoding layer is added according to the position number of the block in the whole image. For example, the block number in the lower right corner is 9, and a layer of Pos (P) position encoding is filled, and the value is all 9, to obtain the final input matrix. The obtained output result is cropped back to the original size according to the information of the matrix and then spliced, and finally the base recognition result (basecall result) of the whole image is obtained.
[0182] Similar processing can also be done when constructing training data for model training. For example, position coding is added during data preprocessing to reflect the position information of the current block in the entire image. By introducing such position information, the differences in light intensity at different block positions due to the optical system can be further eliminated or reduced, and the auxiliary network can overcome these differences during training.
[0183] Example 1
[0184] This example verifies the potential of deep learning models to correct spatial fluorescence crosstalk, and does not consider the impact of context on current base recognition. This example uses a fixed area in a high-density array chip sequencing image, uses a four-color fluorescent second-generation sequencing process, P150 (150+150 double-end sequencing), and the fluorescence brightness matrix uses the "corrected fluorescence brightness" matrix. The training data set samples are human genome samples.
[0185] In this embodiment, each piece of training data corresponds to the sequencing information corresponding to a certain round of sequencing in 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.
[0186] Network structure
[0187] Adopting the U-Net-based network structure, adding spatial attention and channel attention mechanisms, such as Fig.10 As shown. After the 32*4*400*320 (B, C, H, W) data X is input (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:
[0188] 1) First, it passes through an in_conv layer and a CBAM layer. The structures of the two layers are as follows Fig.11 , Fig.12 As shown in the figure, the in_conv layer includes a 3*3 convolution, which changes the size to 32*32*400*320, and then goes through normalization and ReLU activation function, and finally goes through a 3*3 convolution, normalization and ReLU activation function, and finally gets X0 of 32*32*400*320.
[0189] 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 the MLP, the data first passes through a 1*1 convolution, and the number of channels becomes 1 / 16 of the original. Then it passes through the activation function ReLU, and finally passes through a 1*1 convolution to restore the number of channels. Finally, the two data are added and passed through the Sigmoid activation function to get X 0C , and perform element-wise multiplication with X0 to obtain the final output X 0MID .
[0190] To help understand, for example, if the input is (N, C, H, W), then the output after global pooling is (N, C), and the specific values are the mean and maximum values of each channel. The input features are pooled to form two one-dimensional vectors. The two vectors are added after MLP operation to obtain the one-dimensional channel attention. Finally, this attention is multiplied with the input features to obtain the final output. It can be understood as calculating the weights of each channel and assigning the weights to the input features.
[0191] In the spatial attention of CBAM, for data X 0C The global tie and global maximum are calculated based on the channel, and then the two results are concatenated based on the channel, compressed into one channel after a 7*7 convolution, and finally 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 .
[0192] 2) Then, it passes through 4 layers of downsampling layers. The first three layers of downsampling layers each include a CBAM layer and a Down layer, and the last layer has only one Down layer. The Down layer structure is as follows: Fig.13 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.
[0193] Take the first layer as an example (the input is X 0FIN , the output is X 1FIN ):X 0FIN Input the Down layer, pass through a 2*2 maximum pooling layer with a step size of 2, 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 are performed, and finally pass through a 3*3 convolution, normalization and ReLU activation function, and finally get 32*64*200*160 X1.
[0194] X1 is input into CBAM, and after the steps described in 1), the final output X is obtained. 1FIN Input the next downsampling layer. The output structure of each layer is as follows: X 1FIN :32*64*200*160,X 2FIN :32*128*100*80,X 3FIN :32*256*50*40, X4:32*256*25*20.
[0195] 3) Then it goes through 4 upsampling layers (Up), the structure is as follows Fig.14 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 ). Each time the data passes through an upsampling layer, the number of channels C is halved (except for the last upsampling), and the height and width H, W are doubled. Take the first upsampling layer as an example (the input is X4, X 3FIN , the output is Y1):
[0196] The input X4 is bilinearly interpolated to a format of 32*256*50*40, and then X4 and X 3FIN The concatenation is done according to the channel dimension C, and the resulting format is 32*512*50*40. The result is then convolved with a 3*3 convolution, and the size is changed to 32*256*50*40, and then normalized and ReLU activated. Finally, it is convolved with a 3*3 convolution, normalized, and ReLU activated, and finally Y1 of 32*128*50*40 is obtained.
[0197] Y1 and X 2FIN Input the next upsampling layer to obtain the output result Y2, and so on until the output result Y4 is obtained.
[0198] 4) Finally, Y4 is input into a 1*1 convolution out_conv, and the number of output channels is the number of classifications, and the final prediction result Out is obtained: 32*5*400*320.
[0199] Input description: The camera collects ACGT images in each cycle under the same fov, extracts the hole coordinate information and light intensity information of the center block of each image, generates a two-dimensional matrix in the format of (High:381,Width:304) according to the hole position, and each element in the matrix represents the light intensity value of the corresponding hole. The four matrices are merged into a three-dimensional matrix of (4,High:381,Width:304) as training data. When inputting training data, the light intensity value will first be standardized to the range of 0-255, and then changed to 4*400*320 after padding to participate in the training of the input network model (the filling method is edge filling, and the right and bottom sides of the original matrix are mirrored to the specified size). Through the calculation of a large amount of data, the input data is standardized using the mean (0.260, 0.275, 0.273, 0.267) and variance (0.219, 0.210, 0.211, 0.213) of the input matrix. After the data size is standardized, the mean is 0 and the standard deviation is 1.
[0200] The data labels come from the base information of the reference genome in the comparison. ACGT is numbered 1234 and input into a 381*304 matrix according to the hole position, and then amplified to 400*320 through the same edge filling process.
[0201] Output description: The output result is a two-dimensional matrix (400*320), and the value of each element (1,2,3,4) represents the base (A,C,G,T) recognition result of the corresponding hole position.
[0202] When measuring the final training effect, the output result is cropped to remove the lower right corner area filled during training, and the size after cropping is 381*304. The unmatched points with a label median value of 0 made by the reference genome are removed, and the points of the output result are removed according to the same position information, and then the outlier ratio between the two is calculated to obtain the final base recognition error rate.
[0203] Training method description: Stochastic gradient descent (SGD) was used as the optimizer during training. The initial learning rate was set to 0.05, momentum to 0.9, weight_decay to 1e-4, batch size to 32, and a total of 300 epochs were trained to save the optimal training parameters. During the training process, the learning rate update strategy was used, and the learning rate was updated at each step. The loss function used in backpropagation is a hybrid function of cross entropy loss, dice loss, and custom miss_match loss. The loss weight ratio is, for example, 2:2:1 or 1:5:3. When calculating the loss, the weight of the background (pixel points with a value of 0) is reset to 0 and does not participate in the loss calculation. Only the loss function size of the four categories of ACGT is calculated. An early stopping strategy was set during training to prevent the network from overfitting. When the minimum loss of the verification result is still not updated within 30 epochs, the training is stopped and the model parameters of the epoch with the minimum output loss are saved.
[0204] The test data is 100 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 28% and the alignment rate was increased by 1.2%.
[0205] Example 2
[0206] This example is used to verify the potential of deep learning or machine learning models to correct the context for the current base recognition, without considering the effect of spatial fluorescence crosstalk on base recognition, that is, the spatial arrangement information of each fluorescence cluster is not input into the model for training. This example uses a fixed area in a high-density array chip sequencing image, 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.
[0207] Model establishment: The training data is based on a single fluorescent cluster. Each piece of training data represents the sequencing information corresponding to a fluorescent cluster in a certain round of sequencing, and may not contain the spatial location information of the fluorescent cluster. The training data is 80 FOV array chip sequencing data, P150 (150+150 double-end sequencing), from different experiments, using different reagents and chip batches.
[0208] Feature value: the corrected fluorescence brightness value corresponding to the current sequencing round of the fluorescent cluster and the three adjacent sequencing rounds before and after, as well as the sequencing round number corresponding to the current round. Target value: the reference sequence base after alignment corresponding to the current sequencing round of the fluorescent cluster, that is, the "standard answer" of the current sequencing round. Here, lightGBM is used to establish a machine learning model.
[0209] Model effect: 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 is reduced by 37% and the alignment rate is increased by 2.3%.
[0210] Example 3
[0211] This example verifies the effect of the complete algorithm / model. A fixed area in a high-density array chip sequencing image is used, a four-color fluorescent second-generation sequencing process is used, PE150 (double-end sequencing 150+150), the fluorescence brightness matrix uses the "corrected fluorescence brightness" matrix, and the training data set samples are human genome samples.
[0212] Model building: The modeling method and process can refer to the description of the previous model training section. Figure 8 Section 2.1 of the protocol.
[0213] The modeling method of Model 1 can refer to the relevant description of Example 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.
[0214] The modeling method of Model 2 can refer to the relevant description of Example 2. The training data is based on a single fluorescent cluster, and each piece of training data represents the sequencing information corresponding to a certain round of sequencing of a certain fluorescent cluster, and does not contain the spatial position information of the fluorescent cluster. The training data is 80 FOV array chip sequencing data, P150 (150+150 double-end sequencing), which comes from different experiments, using different reagents and chip batches. The 80 FOV training data used in Model 2 here is completely non-overlapping with the 1000 FOV training data used in Model 1. In addition, the training data (sequencing data) of Model 2 must first be processed by the trained Model 1 to obtain the base classification probability value, and then the base classification probability value corresponding to each fluorescent cluster is input into Model 2 as a feature parameter for training. The lightGBM model is used to construct Model 2 here.
[0215] Model effect: 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%.
[0216] In the description of this specification, the description of "one embodiment", "some embodiments", "illustrative embodiments", "examples", "certain examples", "specific examples" or "embodiments" 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.
[0217] In addition, each functional unit in each embodiment of the present specification 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 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.
[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 of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A base recognition method, characterized in that: include: Processing input data of multiple amplicons through a base identifier based on a neural network and generating an alternative representation of the input data, wherein the input data includes position information and intensity information of the amplicons on images collected from rounds n-m1 to n+m2 of sequencing, the sequencing adopts a multi-fluorescence channel sequencing technology based on surface imaging, the amplicons are nucleic acid molecules to be tested that include multiple identical polynucleotide molecules, the amplicons are connected to the surface, the file size of the input data is smaller than the file size of the image corresponding to it, n is a natural number greater than or equal to 1 and n is greater than m1, and m1 and m2 are each independently integers greater than or equal to 0; Processing the alternative representations through an output layer to generate an output, wherein the output identifies the probability that the base introduced into each of the amplicons by the nth round of sequencing is A, C, T, and G; and The base type introduced into each of the amplicons by the n-th round of sequencing is determined based on the output.
2. The method according to claim 1, characterized in that n is greater than or equal to 2, and m1 and m2 are each independently greater than or equal to 1.
3. The method according to claim 2, characterized in that The neural network-based base identifier is a trained semantic segmentation model, and the semantic segmentation model is selected from at least one of a network with an encoder-decoder structure or a transformer-based network.
4. The method according to claim 1 or 2, characterized in that: The neural network-based base identifier is a trained cascade model, the cascade model includes a first sub-model and a second sub-model connected in series, the first sub-model and the second sub-model are each independently selected from a semantic segmentation model and a machine learning model, the semantic segmentation model is selected from at least one of a network with an encoder-decoder structure or a transformer-based network, and the machine learning model is selected from at least one of a tree model; Optionally, the method comprises: Processing the input data of each round of sequencing of the amplicon from round n-m1 to round n+m2 by the first sub-model respectively, to generate a first prediction result of a specified round respectively, wherein the first prediction result of the specified round includes the probability that the base introduced into each amplicon by the sequencing in this round is A, C, T and G; Processing the first prediction result of each designated round and the round information of each designated round by the second sub-model to generate the output; Optionally, the first sub-model is a semantic segmentation model; Optionally, the method comprises: Processing the input data of the designated amplicon from rounds n-m1 to n+m2 by the first sub-model to generate the second prediction results of each designated round of the amplicon, wherein the second prediction results of each designated round of the amplicon include the probability that the base introduced into the amplicon by sequencing in each designated round is A, C, T and G; Processing the second prediction results of each designated round of each designated amplicon by the second sub-model to generate the output; Optionally, the second sub-model is a semantic segmentation model; Optionally, the semantic segmentation model is selected from at least one of U-Net, DeepLab, SegFormer, PSPNet, FCN, GCN and their respective variants; Optionally, the machine learning model is a gradient boosted decision tree GBDT, and the gradient boosted decision tree adopts at least one of LightGBM and XGBoost algorithms; Optionally, the semantic segmentation model is U-Net or SegFormer; preferably, it is U-Net or SegFormer with an attention mechanism added; preferably, it is U-Net with a CBAM module or SE module added to the encoding part; optionally, it is U-Net with a transformer-based multi-head attention mechanism added to the decoding part and the skip connection part; Optionally, the neural network-based base identifier or the semantic segmentation model comprises: An encoder comprising multiple downsampling layers, each downsampling layer comprising at least one pooling operation and at least one convolution operation, and at least some of the downsampling layers have a CBAM module or a SE module added; A decoder comprising a plurality of upsampling layers, wherein the number of upsampling layers is equal to the number of downsampling layers, each upsampling layer comprising at least one deconvolution operation or a bilinear interpolation operation; and Skip connections connecting downsampling layers and corresponding upsampling layers; Optionally, the encoder further comprises an input convolution layer, wherein the alternative representation of the input data generated by the input convolution layer is used as the input of the first downsampling layer of the encoder, and the input convolution layer comprises multiple convolution operations; and / or, the decoder further comprises an output convolution layer, wherein the output convolution layer processes the alternative representation generated by the last upsampling layer of the decoder to generate the output; Optionally, the neural network-based base caller or the segmentation model further has one or more of the following technical features (a)-(e): (a) The encoder comprises four downsampling layers; (b) Each of the downsampling layers includes a CBAM module or a SE module and a Down structure connected to the CBAM module or the SE module, and the Down structure includes one pooling and two convolution operations; (c) the CBAM module comprises a connected channel attention module and a spatial attention module, wherein the channel attention module comprises a first pooling unit, an MLP unit and a first output layer, and the spatial attention module comprises a second pooling unit, a convolution unit and a second output layer; In the channel attention module, the input is respectively subjected to global maximum pooling and global average pooling of the first pooling unit to generate two channel descriptors, the two channel descriptors are processed by the shared MLP in the MLP unit to obtain channel weights, and then the first output layer outputs a result of weighting the input using the channel weights; In the spatial attention module, the output from the first output layer is respectively subjected to global maximum pooling and global average pooling of the second pooling unit to generate two spatial descriptors, the two spatial descriptors are processed by the convolution layer of the convolution unit to obtain spatial weights, and then the second output layer outputs a result of weighting the output of the first output layer using the spatial weights; (d) The SE module includes a channel attention module, which includes a third pooling unit, a fully connected unit and a third output layer. A channel of the input is subjected to global average pooling by the third pooling unit to generate a corresponding channel descriptor, and these channel descriptors are processed by two fully connected layers and an activation function of the fully connected unit to obtain channel weights, and then the third output layer outputs the result of weighting the input using the channel weights; (e) each of the upsampling layers includes a bilinear interpolation operation or a deconvolution operation, and a splicing operation, which splices the output of the previous layer with the result of the corresponding downsampling layer transmitted to the upsampling layer through the jump connection in the channel dimension; Optionally, the first sub-model and the second sub-model are trained independently using non-overlapping training data; Optionally, training the neural network-based base identifier or the semantic segmentation model based on the training data comprises calculating the gradient of a loss function using back propagation to guide stochastic gradient descent to update model parameters to minimize the loss function, wherein: The loss function is a mixed loss function including at least one of cross entropy loss, dice loss, mean square error and one or more custom loss functions, wherein the custom loss function includes mismatch loss, and the mismatch loss reflects the proportion or content of bases whose predicted results are inconsistent with the true results; Optionally, the hybrid loss function includes cross entropy loss, dice loss and mismatch loss, and a weight ratio of the three is 1:3:4, 1:4:4, 1:5:4, 1:6:4, 1:7:4 or 1:7:5; Optionally, the neural network-based base identifier or the semantic segmentation model is trained by supervised learning or semi-supervised learning, and the training is performed using bases on a reference sequence corresponding to the base recognition results of the amplicon as true results; Optionally, m1 is equal to or greater than m2.
5. The method according to any one of claims 1 to 4, characterized in that: The surface is presented as a regular array of holes, the surface comprises a labeling area and a reaction area, the spatial positional relationship between the labeling area and the reaction area is known and the signal from the labeling area is presented as a specific feature on the image, the multiple amplicons are respectively connected to multiple separated holes in the reaction area, a template is constructed by processing at least one image among the images collected in the first round of sequencing, and the input data is obtained based on the template, include, Identify a feature corresponding to a marker region on the image to determine a position of the marker region, and determine position information of the amplicon based on the position of the marker region to obtain the template; as well as Mapping the position information of the amplicons on the template to the images collected by each designated round of sequencing, respectively, to respectively determine the position information and intensity information of the amplicons on the images collected by each designated round of sequencing; Optionally, a template is constructed by processing images collected in the first round or the first p1 rounds of sequencing, and the input data is obtained based on the template, p1 is a natural number greater than 0 and less than or equal to 4, including, Identifying bright spots on each image corresponding to amplicons where a specified biochemical reaction has occurred, and merging the bright spots to obtain the template; as well as Mapping the position information of the amplicons on the template to the images collected by each designated round of sequencing, respectively, to respectively determine the position information and intensity information of the amplicons on the images collected by each designated round of sequencing; Optionally, a template is constructed by processing the images collected by the first p2 rounds of sequencing, and the input data is obtained based on the template, where p2 is a natural number greater than or equal to 6, including: Detecting the base introduced into each unit position according to the intensity of each unit position on each image in each round to determine the detected base sequence of each unit position, wherein the image includes a plurality of unit positions, the size of a unit position is less than or equal to the size of a pixel of the image, and the size of a feature of an amplicon on the image corresponding to a specified biochemical reaction occurring occupies one or more unit positions; Clustering the unit positions based on the similarity of the detected base sequences at the unit positions, including classifying the unit positions of the plurality of base detection sequences whose similarity meets a preset level as corresponding to the same amplicon, to obtain the template, wherein the template includes the position information of the amplicons on the surface; and Mapping the position information of the amplicons on the template to the images collected by each designated round of sequencing, respectively, to respectively determine the position information and intensity information of the amplicons on the images collected by each designated round of sequencing; Optionally, the intensity information is corrected intensity information; optionally, the correction is selected from at least one of crosstalk correction and / or phase correction; Optionally, the file size of the input data is less than or equal to half of the file size of the image to which it corresponds; optionally, the file size of the input data is less than or equal to one third of the file size of the image to which it corresponds.
6. The method according to any one of claims 1 to 5, characterized in that: The input data is represented as multiple groups of matrices, one group of matrices includes multiple matrices, one group of matrices reflects the position information and intensity information of the amplicon on the image collected in one round of sequencing, one matrix includes multiple rows and multiple columns, one matrix reflects the information of the amplicon on the whole or a region of one fluorescent channel image in one round of sequencing, one element of the matrix corresponds to one amplicon, the row and column positions of the elements of the matrix reflect the position information of the corresponding amplicon on the corresponding image, and the values of the elements of the matrix reflect the intensity information of the corresponding amplicon presented on the image of one fluorescent channel in this round of sequencing; Optionally, a matrix reflects information about a block of an image of a fluorescent channel of the amplicon in a round of sequencing, and the input data further comprises a matrix reflecting position information of each block in the image from which it comes.
7. A base recognition system, characterized in that: include: A processing unit, for processing input data of a plurality of amplicons through a base identifier based on a neural network and generating an alternative representation of the input data, wherein the input data includes position information and intensity information of the amplicons on images collected from rounds n-m1 to n+m2 of sequencing, the sequencing adopts a multi-fluorescence channel sequencing technology based on surface imaging, the amplicons are nucleic acid molecules to be tested that include a plurality of identical polynucleotide molecules, the amplicons are connected to the surface, n is a natural number greater than or equal to 1 and n is greater than m1, and m1 and m2 are each independently integers greater than or equal to 0; an output unit, configured to process the alternative representations through an output layer to generate an output, wherein the output identifies the probability that the bases introduced into each of the amplicons by the nth round of sequencing are A, C, T, and G; and A base type determination unit determines the base type introduced into each of the amplicons by the nth round of sequencing based on the output.
8. A computer program product, characterized in that The method comprises instructions, and when a computer executes part or all of the instructions, the method according to any one of claims 1 to 6 is executed.
9. A computing device, characterized in that include: Memory for storing data, including computer executable programs; as well as One or more processors, configured to execute the computer executable program to implement the method of any one of claims 1-6; optionally, the processor comprises a GPU.
10. A computer-readable storage medium for storing a program for execution by a computer, wherein executing the program comprises completing the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Methods, apparatus, and computer products for constructing sequencing templates based on images
CN112289381B
Methods and systems for identifying bases in nucleic acids
CN113012757B
Method for determining read quality and sequencing method
CN117912550A
Method for determining mass fraction of read segment, sequencing method and device
CN117976042A
Methods and systems for analyzing image data
EP3077943B1
Cited By
System and method for automatically generating machine learning model
CN120220826A
System and method for automatically generating machine learning models
CN120220826B