Method for detecting abnormal area on image, method for processing abnormal area on image for base identification and related equipment
By analyzing the position and grayscale values of the nucleic acid template on the image, identifying and processing abnormal regions, the problems of sequencing images and signal masking are solved, and the accuracy and reliability of gene sequencing are improved.
Patent Information
- Application Number
- CN202411990489.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-18
AI Technical Summary
During high-precision gene sequencing, abnormal situations on the sequencing chip (such as dust, dirt, substrate shedding and abnormal adsorption) lead to blurred sequencing images, signal masking and base recognition errors.
By obtaining the image to be detected by imaging the nucleic acid template on the solid phase substrate surface, analyzing the pixel grayscale value of the pixel where the nucleic acid template is located on the image, determining whether there is a signal, forming an abnormal region, and during the base recognition process, the pixel grayscale value in the abnormal region is reset to zero, and the labeled base type is unknown.
Effectively identifying and processing abnormal regions improves the accuracy and reliability of sequencing data and reduces base recognition errors.
Smart Images

Figure CN119851270A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of sequencing image data processing, and in particular to a method and related equipment for detecting abnormal areas on an image, processing the abnormal areas on the image for base recognition. Background Art
[0002] In the process of high-precision gene sequencing, it is necessary to accurately identify and analyze the tiny spot signals (hundreds of nanometers) on the sequencing chip. However, in the actual sequencing process, there are often various interferences and abnormalities, such as dust and dirt on the chip surface, substrate shedding and abnormal adsorption in the chip, and fluid bubbles. These abnormalities can cause a variety of problems such as blurred sequencing images, signal masking, and base recognition errors.
[0003] Therefore, in order to reduce the impact of abnormal image areas on sequencing throughput and sequencing accuracy, it is necessary to identify and process abnormal areas on the image. Summary of the invention
[0004] In view of the above problems, the present application provides a method and related equipment for detecting abnormal areas on an image and processing the abnormal areas on the image for base recognition, which overcomes the above problems or at least partially solves the above problems. The technical solution is as follows:
[0005] An embodiment of the present application provides a method for detecting abnormal areas on an image, the method comprising:
[0006] Acquiring an image to be tested, where the image to be tested is generated by imaging when sequencing a nucleic acid template on a surface of a solid substrate;
[0007] Determine the position of the nucleic acid template on the image to be tested;
[0008] Based on the position of the nucleic acid template on the image to be tested, determining the pixel gray value of the pixel where the position of the nucleic acid template on the image to be tested is located;
[0009] Determine whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel gray value;
[0010] The area formed by the position where the nucleic acid template has no signal on the image to be tested is regarded as the abnormal area of the image to be tested;
[0011] The signal is generated during the sequencing of the nucleic acid template.
[0012] An embodiment of the present application provides a method for detecting abnormal areas on an image, the method comprising:
[0013] Acquire an image to be tested, where the image to be tested is generated by imaging when sequencing a nucleic acid template on the surface of a solid phase substrate, and the signal generated when sequencing the nucleic acid template appears as a bright spot on the image to be tested, and the brightness of the image to be tested is related to the pixel grayscale value of the bright spot;
[0014] Divide the image to be inspected into multiple image blocks;
[0015] Determine an evaluation value for each image block;
[0016] Determining whether the image block belongs to an abnormal area of the image to be detected based on the evaluation value of the image block;
[0017] The evaluation value is related to the brightness of the image block.
[0018] An embodiment of the present application provides a method for processing an abnormal area on an image to perform base recognition, the method comprising:
[0019] The abnormal region on the image is determined after being detected according to any of the above methods for detecting the abnormal region on the image;
[0020] Determine the position of the nucleic acid template within the abnormal region of the image to be detected;
[0021] When performing base recognition based on the image to be tested, the pixel grayscale value of the position where the nucleic acid template is located in the abnormal area on the image to be tested is reset to zero and the base type corresponding to the position where the nucleic acid template is located in the abnormal area is recognized as an unknown base.
[0022] A computer-readable storage medium stores a program, which, when executed by a processor, implements the above-mentioned method for detecting abnormal areas on an image, and / or a method for processing abnormal areas on an image to perform base recognition.
[0023] A system comprising:
[0024] The computer-readable storage medium described above; and
[0025] At least one processor is configured to execute a program stored in a computer-readable storage medium.
[0026] An electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the above-mentioned method for detecting abnormal areas on an image, and / or the method for processing abnormal areas on an image to perform base recognition.
[0027] A computer program product includes a first instruction for realizing detection of abnormal areas on an image and / or a second instruction for realizing processing of abnormal areas on an image for base recognition. When the first instruction is executed by a computer, the computer executes the above-mentioned method for detecting abnormal areas on an image, and when the second instruction is executed by the computer, the computer executes the above-mentioned method for processing abnormal areas on an image for base recognition.
[0028] By means of the above technical scheme, the present application provides a method and related equipment for detecting abnormal areas on an image, processing abnormal areas on an image for base recognition, and the method includes: first, obtaining an image to be detected by imaging a nucleic acid template on the surface of a solid substrate, analyzing the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be detected and / or the brightness of the image block on the image to be detected to identify the abnormal area; secondly, when processing the abnormal area on the image, the pixel grayscale value of the position of the nucleic acid template in the abnormal area is reset to zero, and the type of base of the nucleic acid template incorporated into the abnormal area during the sequencing process is identified as unknown, thereby ensuring the accuracy of subsequent base recognition. It can be seen that the present application can effectively identify and process abnormal areas, thereby improving the accuracy and reliability of sequencing data.
[0029] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0031] Figure 1 A schematic diagram showing a flow chart of an implementation of a method for detecting abnormal areas on an image provided in an embodiment of the present application;
[0032] Figure 2 A schematic diagram showing a flow chart of another implementation of a method for detecting abnormal areas on an image provided in an embodiment of the present application;
[0033] Figure 3 A schematic diagram showing a flow chart of another implementation of a method for detecting abnormal areas on an image provided in an embodiment of the present application;
[0034] Figure 4A schematic diagram showing a flow chart of another implementation of a method for detecting abnormal areas on an image provided in an embodiment of the present application;
[0035] Figure 5 A schematic diagram of the layout of structural elements of an image to be inspected provided in an embodiment of the present application is shown;
[0036] Figure 6 A schematic flow chart of an implementation of a method for processing an abnormal region on an image to perform base recognition provided in an embodiment of the present application is shown;
[0037] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0038] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0039] It should be noted that the term "solid phase substrate" can be any solid support that can be used to fix nucleic acid sequences, such as nylon membranes, glass slides, plastics, silicon wafers, magnetic beads, etc. Unless otherwise specified, the surface of the sequencing chip and the surface of the solid phase substrate can be expressed interchangeably.
[0040] The term "sequencing", also known as "nucleic acid sequencing" or "gene sequencing", is an interchangeable term, and refers to the determination of the base types and arrangement order in a nucleic acid sequence; it includes sequencing by synthesis (sequencing by synthesis, SBS) and / or sequencing by ligation (sequencing by ligation, SBL), etc., including DNA sequencing and / or RNA sequencing, including long fragment sequencing and / or short fragment sequencing, the so-called long fragment and short fragment are relative, such as nucleic acid molecules longer than 1Kb, 2Kb, 5Kb or 10Kb can be called long fragments, and those shorter than 1Kb or 800bp can be called short fragments; it includes double-end sequencing, single-end sequencing and / or paired-end sequencing, etc., the so-called double-end sequencing or paired-end sequencing can refer to the reading of any two segments or two parts of the same nucleic acid template that are not completely overlapped; the so-called sequencing includes the process of binding nucleotides or nucleotide analogs to the nucleic acid template and collecting the corresponding signals emitted after the nucleotides or nucleotide analogs are bound to the nucleic acid template.
[0041] Sequencing generally includes multiple rounds of processes to achieve the determination of the order of multiple nucleotides / bases on a nucleic acid template. In the embodiments of the present application, each round of "the process to achieve the determination of the order of multiple nucleotides / bases on a nucleic acid template" is referred to as a "round of sequencing". "One round of sequencing" (cycle) is also called a "sequencing round", which can be defined as a base extension of four nucleotides / bases. In other words, "one round of sequencing" can be defined as the completion of the determination of the base type at any specified position on the nucleic acid template. For sequencing platforms that achieve sequencing based on polymerization or ligation reactions, one round of sequencing includes the process of achieving the binding of four nucleotides (including nucleotide analogs) to the so-called nucleic acid template once and collecting the corresponding signals emitted; for platforms that achieve sequencing based on polymerization reactions, the reaction system includes reaction substrate nucleotides or nucleotide analogs, polymerases and nucleic acid templates. A sequence (sequencing primer) is bound to the nucleic acid template. Based on the base pairing principle and the principle of polymerization reaction, the added reaction substrate nucleotides or nucleotide analogs are connected to the sequencing primer under the catalysis of the polymerase to achieve the binding of the nucleotide or nucleotide analog to a specific position of the nucleic acid template, that is, the nucleic acid template is bound to the substrate nucleotides or nucleotide analogs. N-nucleotide or nucleotide analogs are incorporated into the nucleic acid template; generally, one round of sequencing may include one or more base extensions (repeat), for example, four nucleotides are added to the reaction system in sequence, base extensions and corresponding reaction signals are collected respectively, and one round of sequencing includes four base extensions; for another example, any combination of four nucleotides is added to the reaction system, such as two-by-two combinations or one-by-three combinations, two combinations are respectively subjected to base extensions and corresponding reaction signal collection, and one round of sequencing includes two base extensions; for another example, four nucleotides are added to the reaction system at the same time for base extension and reaction signal collection, and one round of sequencing includes one base extension.
[0042] The term "nucleic acid template" can represent a polymer form of nucleotides of any length, and can include ribonucleotides, deoxyribonucleotides, analogs thereof, or mixtures thereof. The term can refer to single-stranded or double-stranded polynucleotides. The nucleotides in the nucleic acid template can include naturally occurring nucleotides and functionally alternative analogs thereof. Examples of analogs can hybridize with nucleic acids in a sequence-specific manner, or can be used as templates for replication of specific nucleotide sequences. Naturally occurring nucleotides typically have a main chain comprising a phosphodiester bond. The analog structure can have an alternative main chain connection including any kind known in the art. Naturally occurring nucleotides typically have deoxyribose (e.g., found in DNA) or ribose (e.g., found in RNA). The analog structure can have an alternative sugar moiety including any kind known in the art. Nucleotides can include natural bases, and the bases in natural DNA can include one or more of adenine, thymine, cytosine, and / or guanine, and the bases of natural RNA can include one or more of adenine, uracil, cytosine, and / or guanine. Nucleotides may also include any unnatural bases or base analogs, such as locked nucleic acids (LNA) and bridged nucleic acids (BNA).
[0043] The term "template image" may be, for example, an image constructed by performing one or more rounds of sequencing of a nucleic acid template to characterize the position of the nucleic acid template on the surface of a solid substrate, which includes the position information of each nucleic acid template on the surface of the solid substrate. The method for constructing a template image can refer to Chinese patent CN112288783B.
[0044] In the second or third generation sequencing technology, it is crucial to accurately identify and analyze the tiny spot signals (hundreds of nanometers) generated on the surface of the sequencing chip during the sequencing process. For example, the tiny spot signals are the fluorescent signals generated by the fluorescent groups carried by the bases incorporated into the nucleic acid template during the sequencing process through the excitation light. However, in the actual sequencing process, problems such as dust and dirt on the surface of the sequencing chip, substrate shedding in the sequencing chip, abnormal adsorption and fluid bubbles are often encountered. These problems cause abnormal images of the sequencing chip during the sequencing process, such as blurred images or signals on the image being masked, which in turn causes information recognition errors. Image abnormalities may lead to base recognition errors, including base type recognition errors and deviations in sequencing quality scores. These errors and deviations, especially base type recognition errors with high sequencing quality scores, will have a negative impact on subsequent bioinformatics analysis and ultimately lead to deviations in analysis results. Therefore, after detecting abnormal image areas, further processing must be performed to minimize the impact of abnormal areas on sequencing data and ensure the accuracy and reliability of sequencing data analysis.
[0045] Based on this, in the embodiment of the present application, a method for detecting abnormal areas on an image and processing the abnormal areas on the image for base recognition is provided. First, by acquiring the image to be detected obtained by imaging the nucleic acid template on the surface of the solid phase substrate, the abnormal areas on the image to be detected are identified by analyzing the pixel grayscale value of the pixel where the position of the nucleic acid template on the image to be detected and / or the brightness of the image block on the image to be detected. These abnormal areas are usually manifested as, for example, black spots, white spots or blurred areas. Secondly, when processing these abnormal areas, the pixel grayscale value of the position of the nucleic acid template in the abnormal area is reset to zero, and the type of the base of the nucleic acid template incorporated into the abnormal area during the sequencing process is marked as unknown, thereby ensuring the accuracy of subsequent base recognition. It can be seen that the present application can effectively identify and process abnormal areas, significantly improving the accuracy and reliability of sequencing data.
[0046] like Figure 1 As shown, a flow chart of an implementation of a method for detecting abnormal areas on an image provided in an embodiment of the present application is provided, and the method may include:
[0047] S100, obtaining an image to be tested, where the image to be tested is generated by imaging when sequencing a nucleic acid template on a surface of a solid substrate.
[0048] In which, the nucleic acid template is combined with a sequencing primer (e.g., oligonucleotide) fixed on the surface of a solid phase substrate. During the sequencing process, such as the sequencing process based on sequencing by synthesis (SBS), under the action of DNA polymerase and under conditions suitable for polymerase chain reaction, nucleotides or nucleotide analogs with fluorescent groups and cleavable blocking groups are incorporated into the nucleic acid template, thereby extending the sequencing primer by a single base, exciting the fluorescent groups on the nucleotides or nucleotide analogs to produce fluorescent signals, and imaging the surface of the solid phase substrate using an optical imaging system, collecting the fluorescent signals on the surface of the solid phase substrate and forming an image. Based on the image, the type of base incorporated into the nucleic acid template can be obtained. After multiple rounds of sequencing and sequentially reading the incorporated base types, the nucleotide sequence of the nucleic acid template can be obtained. The image to be tested is an image formed by imaging the surface of the solid phase substrate using an optical imaging system and collecting the fluorescent signals on the surface of the solid phase substrate during the sequencing process. The fluorescent signals are usually shown as bright spots or peaks on the image. That is, the bright spot or bright spot on the image to be detected corresponds to the fluorescent signal at the position where the nucleic acid template on the surface of the solid substrate is located.
[0049] S110, determining the position of the nucleic acid template on the image to be tested.
[0050] Exemplarily, the position of the nucleic acid template on the image to be tested can be determined by using known nucleic acid template coordinates or special marks designed according to the surface of the solid substrate. Exemplarily, the position of the nucleic acid template on the image to be tested can be represented in the form of two-dimensional coordinates to indicate the exact position of the nucleic acid template in the two-dimensional data matrix presented by the image to be tested.
[0051] S120 . Based on the position of the nucleic acid template on the image to be tested, determine the pixel grayscale value of the pixel where the position of the nucleic acid template on the image to be tested is located.
[0052] Specifically, the embodiments of the present application may use image processing technology to extract the pixel grayscale value (Intensity) of the position where the nucleic acid template is located in the image to be tested, wherein the pixel grayscale value is used to characterize the brightness information of the pixel corresponding to the position where the nucleic acid template is located in the image to be tested.
[0053] S130. Determine whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel gray value, wherein the signal is generated during sequencing of the nucleic acid template.
[0054] Exemplarily, the embodiments of the present application can determine whether the grayscale difference between the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and the pixel grayscale values of its neighboring pixels exceeds a preset grayscale threshold. If so, it is determined that there is a signal at the position of the nucleic acid template on the image to be tested; otherwise, it is determined that there is no signal at the position of the nucleic acid template on the image to be tested.
[0055] S140 , taking the area formed at the position where the nucleic acid template has no signal on the image to be tested as the abnormal area of the image to be tested.
[0056] Specifically, if no signal is detected at a position corresponding to the nucleic acid template on the image to be inspected, the position is included in the abnormal area of the image to be inspected.
[0057] The embodiments of the present application obtain an image to be tested by imaging the surface of a solid substrate during the nucleic acid sequencing process, identify the position of the nucleic acid template in the image to be tested, and determine the presence or absence of a signal based on the grayscale value of the pixels at these positions, and mark the located signal-free areas as abnormal areas, which helps to automatically identify signal absence or erroneous signals and improve the accuracy and reliability of sequencing data.
[0058] In some embodiments, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining the position of the nucleic acid template on the image to be tested may specifically include:
[0059] Acquire a template image, which is an image for characterizing the position of the nucleic acid template on the surface of a solid phase substrate based on one or more rounds of sequencing of the nucleic acid template; map the position of the nucleic acid template to the image to be tested to determine the position of the nucleic acid template on the image to be tested. Exemplarily, the embodiment of the present application can use SBS sequencing technology to sequence the nucleic acid template on the solid phase substrate. During the sequencing process, the fluorescent group carried by the nucleotide or nucleotide analog incorporated into the nucleic acid template will generate a fluorescent signal under the excitation of the excitation light. The fluorescent signal is collected and formed by an optical imaging system, and the position of the nucleic acid template on the surface of the solid phase substrate can be determined based on the fluorescent signal on the image. After one or more rounds of sequencing, the bright spots or bright spots on the image obtained by merging the bright spots or bright spots on the image obtained by one or more rounds of sequencing can obtain a template image, which is used to represent the position of the nucleic acid template on the surface of the solid phase substrate. Then, the template image is analyzed using image processing technology to detect and mark the position coordinates of each bright spot or bright spot of the corresponding nucleic acid template. Finally, the position coordinates marked in the template image are mapped to the image to be tested using image registration technology to ensure that the position corresponding to each nucleic acid template is accurately found in the image to be tested.
[0060] The embodiment of the present application generates a template image by performing one or more rounds of sequencing on the nucleic acid template, and can accurately mark the position of the nucleic acid template on the surface of the solid phase substrate. Then, the position information is mapped to a new image to be tested, so as to identify the exact position of the nucleic acid template in the image to be tested, and quickly identify abnormal areas of the image to be tested.
[0061] In some embodiments, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining the position of the nucleic acid template on the image to be tested may specifically include:
[0062] Determine the position of the marker element on the image to be tested; and determine the position of the nucleic acid template on the image to be tested based on the position of the marker element.
[0063] The marking elements are visual reference lines or patterns used for positioning and calibration in the image.
[0064] Specifically, the embodiment of the present application can use an image processing algorithm to identify the position of the marker element in the image to be tested. Using the identified marker element as a reference point, the precise position coordinates of the marker element in the image to be tested are calculated. Since the position of the nucleic acid template is usually known relative to the position of the marker element, the position of the nucleic acid template on the image to be tested is derived based on the position of the marker element on the image to be tested using the known positional relationship between the nucleic acid template and the marker element.
[0065] The embodiment of the present application can improve the accuracy of nucleic acid template positioning on the image by first locating the marker elements on the image to be tested, and then using these known positions to accurately deduce the position of the nucleic acid template, thereby making it easier to identify and analyze abnormal areas. At the same time, this precise positioning can reduce errors in the analysis process and ensure that abnormal area detection is more reliable and effective.
[0066] In some embodiments, the marking element includes at least one of a track line and a cross star.
[0067] Tracklines are continuous lines used to mark specific paths or locations in an image. Tracklines can provide a benchmark for image analysis and help determine the relative positions of other elements or areas in an image.
[0068] Among them, the cross star is a mark similar to a "+" and is usually used to mark key locations in an image. The cross star provides a clear intersection point that can help accurately locate specific areas in an image.
[0069] The embodiment of the present application can accurately deduce the position of the nucleic acid template in the image by finding the position coordinates of the trajectory line or the cross star on the image to be tested, which helps to ensure the accuracy and consistency of subsequent identification of abnormal areas.
[0070] In some embodiments, the marking elements may adopt various geometric forms, such as points, lines and surfaces (geometric figures), to meet different application requirements and visual recognition requirements. In addition to the traditional track lines and cross stars, the marking elements may also be independent bright spot marks of other shapes, colors or patterns, marks similar to a circular ring "O", marks similar to a triangle "△", marks similar to a polygon, etc.
[0071] Among them, the independent highlight mark is a mark symbol used to highlight specific information or areas.
[0072] Among them, the ring mark is a mark shaped like an "O", which is usually used to emphasize specific areas. It can provide clear visual guidance in the image and is easy to identify and locate.
[0073] Among them, the triangle mark is a mark with a shape similar to "△", which is usually used to indicate a direction or a specific point of interest.
[0074] Among them, polygonal marks can be designed into different shapes as needed, such as pentagons, hexagons, etc., which are suitable for the identification of complex images.
[0075] The embodiments of the present application can accurately locate specific points in an image by using marking elements of different shapes. At the same time, the marking elements can not only help improve the readability of the image, but also provide reference points during the imaging process to assist the device in focusing and evaluating the imaging quality, thereby more accurately deducing the position of the nucleic acid template in the image and ensuring the accuracy and consistency of subsequent identification of abnormal areas.
[0076] In some embodiments, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the image to be inspected includes one or more corresponding groups of sequencing images generated by performing one or more rounds of sequencing on the nucleic acid template.
[0077] The region formed at the position where the nucleic acid template has no signal on the image to be tested is taken as the abnormal region of the image to be tested, which may specifically include:
[0078] The region formed at the position where no signal of the nucleic acid template exists in one or more sets of sequencing images is regarded as an abnormal region.
[0079] In the process of sequencing nucleic acid templates, the optical imaging system collects the fluorescence signals generated in each cycle of sequencing to obtain sequencing images, and these sequencing images are combined to form one or more sets of sequencing images. Each set of images corresponds to the situation where a specified nucleotide or nucleotide analog is incorporated into a specific position of the nucleic acid template.
[0080] Specifically, the embodiments of the present application can determine the positions where no signals of the nucleic acid templates exist in one or more groups of sequencing images by comparing the signal conditions of the positions of the nucleic acid templates in one or more groups of sequencing images, that is, determine the positions where the nucleic acid templates fail to show signals in the sequencing images in different sequencing rounds, and mark the areas formed by these positions as abnormal areas.
[0081] The embodiments of the present application can effectively identify and exclude abnormal positions that may be caused by mutations, damage or experimental errors by comparing the signal distribution in multiple rounds of sequencing images, thereby improving the accuracy of abnormal area identification.
[0082] In some embodiments, in the above Figure 1 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel gray value may specifically include:
[0083] Determine the difference between the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and the pixel grayscale values of its surrounding neighborhood pixels; compare the difference with a first threshold; and determine whether there is a signal at the position of the nucleic acid template on the image to be tested based on the comparison result.
[0084] Specifically, the embodiments of the present application can determine whether there is a signal at the position by determining the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and calculating the difference in pixel grayscale values between the pixel grayscale value of the pixel and the surrounding neighboring pixels.
[0085] Furthermore, the embodiment of the present application can compare the calculated difference with a preset first threshold value. If the difference is greater than or equal to the first threshold value, it is judged that there is a signal at the position of the nucleic acid template on the image to be tested, and it is recorded as 1; if the difference is less than the first threshold value, it is judged that there is no signal at the position of the nucleic acid template on the image to be tested, and it is recorded as 0.
[0086] In some embodiments, the neighborhood includes an N*M neighborhood, where N and M are both odd numbers, and N≥3, M≥3. For example, the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and its surrounding neighborhood pixels include edge points or corner points in a 3*3 or 5*5 neighborhood.
[0087] The embodiment of the present application calculates the difference between the pixel grayscale value of the position of the nucleic acid template on the image to be tested and the grayscale value of its neighboring pixels, and compares the difference with a set threshold to determine whether there is a signal at that position. This can effectively identify the signal area of the nucleic acid template on the image, improve the accuracy and sensitivity of abnormal area detection, and thus more accurately identify abnormal areas that may be contained in the image.
[0088] In some embodiments, based on Figure 1 The method shown, such as Figure 2 As shown, a flow chart of another implementation of the method for detecting abnormal areas on an image provided in an embodiment of the present application is provided, and the method may further include:
[0089] S200: Divide the image to be inspected into a plurality of image blocks.
[0090] Specifically, the embodiment of the present application can divide the image to be inspected into multiple image blocks of the same size according to a preset image block size (for example, 100*100 pixels).
[0091] S210: Determine an evaluation value of each image block, wherein the evaluation value is related to the brightness of the image block.
[0092] Specifically, the embodiment of the present application can calculate the average grayscale value of all pixels in each image block, and then use the average grayscale value to further calculate the evaluation value of the image block.
[0093] S220: Determine whether the image block belongs to an abnormal area of the image to be detected based on the evaluation value of the image block.
[0094] Specifically, the embodiment of the present application can pre-set an abnormality determination threshold, and determine whether the image block belongs to the abnormal area of the image to be detected based on the comparison result between the evaluation value of the image block and the threshold. Exemplarily, the abnormality determination threshold range can be determined based on the global image brightness of the image to be detected.
[0095] The embodiment of the present application divides the image to be inspected into multiple image blocks, evaluates the brightness of each block to determine its evaluation value, and judges whether the image block is abnormal based on these evaluation values. It can effectively identify areas with abnormal brightness in the image, thereby improving the accuracy of abnormal area detection, helping to quickly locate defects or abnormal signals in the image, and enhancing the reliability and efficiency of subsequent image analysis.
[0096] In some embodiments, in the above Figure 2 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining the evaluation value of each image block may specifically include:
[0097] The brightness variance and the brightness mean of each image block are determined, and an evaluation value is determined based on the brightness variance and the brightness mean.
[0098] Specifically, for each image block, the embodiment of the present application calculates the average value of the grayscale value of each pixel in the image block to obtain the brightness mean (mean), and then calculates the mean of the sum of the squares of the differences between each pixel in the image block and the brightness mean to obtain the brightness variance (dev) of the image block.
[0099] The evaluation value is usually expressed as the ratio of brightness variance to brightness mean, that is, evaluation value = brightness variance / brightness mean. The evaluation value can help normalize the impact of uneven brightness, making the evaluation value more stable in image blocks of different brightness.
[0100] The embodiment of the present application can effectively distinguish normal areas and abnormal areas in the image by determining the brightness variance and brightness mean of each image block and calculating the evaluation value. The brightness mean provides the overall brightness level of the image block, while the brightness variance measures the degree of brightness fluctuation. When the evaluation value is low, it usually means that the brightness fluctuation of the image block is small, which may be an abnormal area. By calculating the evaluation value of each image block, the embodiment of the present application helps to identify areas in the image to be inspected that have uniform brightness but lack detailed changes, so that subsequent image analysis can more accurately locate and mark abnormal areas, thereby improving the reliability and accuracy of detection.
[0101] In some embodiments, in the above Figure 2 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, judging whether the image block belongs to the abnormal area of the image to be detected based on the evaluation value of the image block may specifically include:
[0102] The evaluation value of the image block is compared with a second threshold value, wherein the second threshold value is determined according to the global image brightness of the image to be inspected.
[0103] Based on the comparison result, it is determined whether the image block belongs to the abnormal area of the image to be detected.
[0104] Exemplarily, the embodiment of the present application can pre-calculate the brightness mean of all pixels of the entire image to be inspected to obtain the global image brightness of the image to be inspected. The second threshold value can be adjusted according to the sensitivity requirements of the specific application. For example, the second threshold value can be a certain proportion of the global brightness mean value or plus or minus a fixed value.
[0105] Exemplarily, the embodiment of the present application can pre-calculate the brightness standard deviation of all pixels of the entire image to be inspected to obtain the global image brightness of the image to be inspected. The second threshold value can be adjusted according to the sensitivity requirements of the specific application. For example, the second threshold value can be a certain proportion of the global brightness standard deviation or plus or minus a fixed value.
[0106] In the embodiment of the present application, the evaluation value of each image block can be compared with a set second threshold value. If the evaluation value of the image block is lower than the second threshold value, the image block is judged to belong to the abnormal area of the image to be detected. If the evaluation value of the image block is higher than or equal to the second threshold value, the image block is judged to belong to the non-abnormal area of the image to be detected.
[0107] The embodiment of the present application uses the global image brightness to dynamically adjust the second threshold value, thereby adapting to different lighting conditions, ensuring that the recognition of abnormal areas is neither invalidated by changes in overall brightness nor misled by high-brightness or low-brightness areas. In this way, image blocks with evaluation values lower than the second threshold value will be marked as abnormal, improving the accuracy and flexibility of abnormality detection.
[0108] In some embodiments, in the above Figure 2 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the image to be inspected includes one or more corresponding groups of sequencing images generated by performing one or more rounds of sequencing on the nucleic acid template.
[0109] If the evaluation value of the image block is lower than the second threshold, the method further comprises:
[0110] Determining whether an evaluation value of the image block in one or more groups of sequencing images is lower than a second threshold;
[0111] If so, it is determined that the image block belongs to the abnormal area of the image to be detected.
[0112] When sequencing nucleic acid templates, one or more sets of sequencing images are generated. In these sequencing images, the evaluation value of each image block is used to evaluate its brightness change and consistency. First, the evaluation value of each image block is compared with a second threshold set based on global brightness. If the evaluation value of an image block is lower than this threshold, it indicates that it may be abnormal in the sequencing image.
[0113] In order to further confirm the anomaly, the embodiment of the present application will check the performance of the image block with an abnormality in any sequencing image in other sequencing images. If the image block shows an evaluation value lower than the second threshold in one or more groups of sequencing images, this indicates that the image block consistently presents abnormal characteristics in different sequencing processes. In this way, multiple rounds of sequencing provide additional evidence, making anomaly detection more reliable and accurate.
[0114] The embodiment of the present application can not only identify accidental anomalies that may occur in a single round of sequencing by verifying whether the evaluation value of the image block in one or more groups of sequencing images is lower than the second threshold, but also verify the persistence and consistency of the anomalies through multiple rounds of sequencing, thereby ensuring the accuracy and stability of the detection of abnormal image areas.
[0115] In some embodiments, in the above Figure 2 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the embodiment of the present application can perform an image dilation operation on the abnormal area to expand the boundary of the abnormal area.
[0116] Specifically, after detecting the abnormal area of the image to be inspected, the embodiment of the present application performs an image dilation operation on the abnormal area to expand the boundary pixels of the abnormal area to the surrounding areas, covering the surrounding adjacent pixels, so that the boundary of the abnormal area expands outward.
[0117] The embodiment of the present application exaggerates the border of the abnormal region through the image dilation operation, so that the abnormal region can be more clearly displayed, thereby avoiding missing potential abnormalities near the border. In addition, the dilation can connect the adjacent scattered abnormal points to form a more complete abnormal region, which helps to ensure the accuracy of subsequent base recognition.
[0118] like Figure 3 As shown, a flow chart of another implementation of a method for detecting abnormal areas on an image provided in an embodiment of the present application is provided, and the method may include:
[0119] S300, obtaining an image to be tested, which is generated by imaging when sequencing a nucleic acid template on a solid substrate surface. The signal generated when sequencing the nucleic acid template appears as a bright spot on the image to be tested, and the brightness of the image to be tested is related to the pixel grayscale value of the bright spot.
[0120] In which, the nucleic acid template is combined with a sequencing primer (e.g., oligonucleotide) fixed on the surface of a solid phase substrate. During the sequencing process, such as the sequencing process based on sequencing by synthesis (SBS), under the action of DNA polymerase and under conditions suitable for polymerase chain reaction, nucleotides or nucleotide analogs with fluorescent groups and cleavable blocking groups are incorporated into the nucleic acid template, thereby extending the sequencing primer by a single base, exciting the fluorescent groups on the nucleotides or nucleotide analogs to produce fluorescent signals, and imaging the surface of the solid phase substrate using an optical imaging system, collecting the fluorescent signals on the surface of the solid phase substrate and forming an image. Based on the image, the type of base incorporated into the nucleic acid template can be obtained. After multiple rounds of sequencing and sequentially reading the incorporated base types, the nucleotide sequence of the nucleic acid template can be obtained. The image to be tested is an image formed by imaging the surface of the solid phase substrate using an optical imaging system and collecting the fluorescent signals on the surface of the solid phase substrate during the sequencing process. The fluorescent signals are usually shown as bright spots or peaks on the image. That is, the bright spot or bright spot on the image to be detected corresponds to the fluorescent signal at the position where the nucleic acid template on the surface of the solid substrate is located.
[0121] S310: Divide the image to be inspected into multiple image blocks.
[0122] Specifically, the embodiment of the present application can divide the image to be inspected into multiple image blocks of the same size according to a preset image block size (for example, 100*100 pixels).
[0123] S320: Determine an evaluation value of each image block, wherein the evaluation value is related to the brightness of the image block.
[0124] Specifically, the embodiment of the present application can calculate the average grayscale value of all pixels in each image block, and then use the average grayscale value to further calculate the evaluation value of the image block.
[0125] S330 : judging whether the image block belongs to an abnormal area of the image to be detected based on the evaluation value of the image block.
[0126] Specifically, the embodiment of the present application can pre-set an abnormality determination threshold, and determine whether the image block belongs to the abnormal area of the image to be detected based on the comparison result between the evaluation value of the image block and the threshold. In some embodiments, the abnormality determination threshold range can be determined based on the global image brightness of the image to be detected.
[0127] The embodiment of the present application divides the image to be inspected into multiple image blocks, evaluates the brightness of each block to determine its evaluation value, and judges whether the image block is abnormal based on these evaluation values. It can effectively identify areas with abnormal brightness in the image, thereby improving the accuracy of abnormal area detection, helping to quickly locate defects or abnormal signals in the image, and enhancing the reliability and efficiency of subsequent image analysis.
[0128] In some embodiments, in the above Figure 3 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining the evaluation value of each image block may specifically include:
[0129] The brightness variance and the brightness mean of each image block are determined, and an evaluation value is determined based on the brightness variance and the brightness mean.
[0130] Specifically, for each image block, the embodiment of the present application calculates the average value of the grayscale value of each pixel in the image block to obtain the brightness mean (mean), and then calculates the mean of the sum of the squares of the differences between each pixel in the image block and the brightness mean to obtain the brightness variance (dev) of the image block.
[0131] The evaluation value is usually expressed as the ratio of brightness variance to brightness mean, that is, evaluation value = brightness variance / brightness mean. The evaluation value can help normalize the impact of uneven brightness, making the evaluation value more stable in image blocks of different brightness.
[0132] The embodiment of the present application can effectively distinguish normal areas and abnormal areas in the image by determining the brightness variance and brightness mean of each image block and calculating the evaluation value. The brightness mean provides the overall brightness level of the image block, while the brightness variance measures the degree of brightness fluctuation. When the evaluation value is low, it usually means that the brightness fluctuation of the image block is small, which may be an abnormal area. By calculating the evaluation value of each image block, the embodiment of the present application helps to identify areas in the image to be inspected that have uniform brightness but lack detailed changes, so that subsequent image analysis can more accurately locate and mark abnormal areas, thereby improving the reliability and accuracy of detection.
[0133] In some embodiments, in the above Figure 3 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, judging whether the image block belongs to the abnormal area of the image to be detected based on the evaluation value of the image block may specifically include:
[0134] The evaluation value of the image block is compared with a second threshold value, wherein the second threshold value is determined according to the global image brightness of the image to be inspected.
[0135] Based on the comparison result, it is determined whether the image block belongs to the abnormal area of the image to be detected.
[0136] Exemplarily, the embodiment of the present application can pre-calculate the brightness mean of all pixels of the entire image to be inspected to obtain the global image brightness of the image to be inspected. The second threshold value can be adjusted according to the sensitivity requirements of the specific application. For example, the second threshold value can be a certain proportion of the global brightness mean value or plus or minus a fixed value.
[0137] Exemplarily, the embodiment of the present application can pre-calculate the brightness standard deviation of all pixels of the entire image to be inspected to obtain the global image brightness of the image to be inspected. The second threshold value can be adjusted according to the sensitivity requirements of the specific application. For example, the second threshold value can be a certain proportion of the global brightness standard deviation or plus or minus a fixed value.
[0138] In the embodiment of the present application, the evaluation value of each image block can be compared with a set second threshold value. If the evaluation value of the image block is lower than the second threshold value, the image block is judged to belong to the abnormal area of the image to be detected. If the evaluation value of the image block is higher than or equal to the second threshold value, the image block is judged to belong to the non-abnormal area of the image to be detected.
[0139] The embodiment of the present application uses the global image brightness to dynamically adjust the second threshold value, thereby adapting to different lighting conditions, ensuring that the recognition of abnormal areas is neither invalidated by changes in overall brightness nor misled by high-brightness or low-brightness areas. In this way, image blocks with evaluation values lower than the second threshold value will be marked as abnormal, improving the accuracy and flexibility of abnormality detection.
[0140] In some embodiments, in the above Figure 3 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the image to be inspected includes one or more corresponding groups of sequencing images generated by performing one or more rounds of sequencing on the nucleic acid template.
[0141] If the evaluation value of the image block is lower than the second threshold, the method further comprises:
[0142] Determining whether an evaluation value of the image block in one or more groups of sequencing images is lower than a second threshold;
[0143] If so, it is determined that the image block belongs to the abnormal area of the image to be detected.
[0144] When sequencing nucleic acid templates, one or more sets of sequencing images are generated. In these sequencing images, the evaluation value of each image block is used to evaluate its brightness change and consistency. First, the evaluation value of each image block is compared with a second threshold set based on global brightness. If the evaluation value of an image block is lower than this threshold, it indicates that it may be abnormal in the sequencing image.
[0145] In order to further confirm the anomaly, the embodiment of the present application will check the performance of the image block with an abnormality in any sequencing image in other sequencing images. If the image block shows an evaluation value lower than the second threshold in one or more groups of sequencing images, this indicates that the image block consistently presents abnormal characteristics in different sequencing processes. In this way, multiple rounds of sequencing provide additional evidence, making anomaly detection more reliable and accurate.
[0146] The embodiment of the present application can not only identify accidental anomalies that may occur in a single round of sequencing by verifying whether the evaluation value of the image block in one or more groups of sequencing images is lower than the second threshold, but also verify the persistence and consistency of the anomalies through multiple rounds of sequencing, thereby ensuring the accuracy and stability of the detection of abnormal image areas.
[0147] In some embodiments, in the above Figure 3 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the embodiment of the present application can perform an image dilation operation on the abnormal area to expand the boundary of the abnormal area.
[0148] Specifically, after detecting the abnormal area of the image to be inspected, the embodiment of the present application performs an image dilation operation on the abnormal area to expand the boundary pixels of the abnormal area to the surrounding areas, covering the surrounding adjacent pixels, so that the boundary of the abnormal area expands outward.
[0149] The embodiment of the present application exaggerates the border of the abnormal region through the image dilation operation, so that the abnormal region can be more clearly displayed, thereby avoiding missing potential abnormalities near the border. In addition, the dilation can connect the adjacent scattered abnormal points to form a more complete abnormal region, which helps to ensure the accuracy of subsequent base recognition.
[0150] In some embodiments, based on Figure 3 The method shown, such as Figure 4 As shown, a flow chart of another implementation of the method for detecting abnormal areas on an image provided in an embodiment of the present application is provided, and the method may further include:
[0151] S400: Determine the position of the nucleic acid template on the image to be tested.
[0152] Exemplarily, the position of the nucleic acid template on the image to be tested can be determined by using known nucleic acid template coordinates or special marks designed according to the surface of the solid substrate. Exemplarily, the position of the nucleic acid template on the image to be tested can be represented in the form of two-dimensional coordinates to indicate the exact position of the nucleic acid template in the two-dimensional data matrix presented by the image to be tested.
[0153] S410 , based on the position of the nucleic acid template on the image to be tested, determine the pixel grayscale value of the pixel where the position of the nucleic acid template on the image to be tested is located.
[0154] Specifically, the embodiments of the present application may use image processing technology to extract the pixel grayscale value (Intensity) of the position where the nucleic acid template is located in the image to be tested, wherein the pixel grayscale value is used to characterize the brightness information of the pixel corresponding to the position where the nucleic acid template is located in the image to be tested.
[0155] S420, determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel grayscale value.
[0156] Exemplarily, the embodiments of the present application can determine whether the grayscale difference between the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and the pixel grayscale values of its neighboring pixels exceeds a preset grayscale threshold. If so, it is determined that there is a signal at the position of the nucleic acid template on the image to be tested; otherwise, it is determined that there is no signal at the position of the nucleic acid template on the image to be tested.
[0157] S430, taking the area formed at the position where the nucleic acid template has no signal on the image to be tested as the abnormal area of the image to be tested.
[0158] Specifically, if no signal is detected at a position corresponding to the nucleic acid template on the image to be inspected, the position is included in the abnormal area of the image to be inspected.
[0159] The embodiments of the present application obtain an image to be tested by imaging the surface of a solid substrate during the nucleic acid sequencing process, identify the position of the nucleic acid template in the image to be tested, and determine the presence or absence of a signal based on the grayscale value of the pixels at these positions, and mark the located signal-free areas as abnormal areas, which helps to automatically identify signal absence or erroneous signals and improve the accuracy and reliability of sequencing data.
[0160] In some embodiments, in the above Figure 4 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining the position of the nucleic acid template on the image to be tested may specifically include:
[0161] Acquire a template image, which is an image for characterizing the position of the nucleic acid template on the surface of a solid phase substrate based on one or more rounds of sequencing of the nucleic acid template; map the position of the nucleic acid template to the image to be tested to determine the position of the nucleic acid template on the image to be tested. Exemplarily, the embodiment of the present application can use SBS sequencing technology to sequence the nucleic acid template on the solid phase substrate. During the sequencing process, the fluorescent group carried by the nucleotide or nucleotide analog incorporated into the nucleic acid template will generate a fluorescent signal under the excitation of the excitation light. The fluorescent signal is collected and formed by an optical imaging system, and the position of the nucleic acid template on the surface of the solid phase substrate can be determined based on the fluorescent signal on the image. After one or more rounds of sequencing, the bright spots or bright spots on the image obtained by merging the bright spots or bright spots on the image obtained by one or more rounds of sequencing can obtain a template image, which is used to represent the position of the nucleic acid template on the surface of the solid phase substrate. Then, the template image is analyzed using image processing technology to detect and mark the position coordinates of each bright spot or bright spot of the corresponding nucleic acid template. Finally, the position coordinates marked in the template image are mapped to the image to be tested using image registration technology to ensure that the position corresponding to each nucleic acid template is accurately found in the image to be tested.
[0162] The embodiment of the present application generates a template image by performing one or more rounds of sequencing on the nucleic acid template, and can accurately mark the position of the nucleic acid template on the surface of the solid phase substrate. Then, the position information is mapped to a new image to be tested, so as to identify the exact position of the nucleic acid template in the image to be tested, and quickly identify abnormal areas of the image to be tested.
[0163] In some embodiments, in the above Figure 4 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining the position of the nucleic acid template on the image to be tested may specifically include:
[0164] Determine the position of the marker element on the image to be tested; and determine the position of the nucleic acid template on the image to be tested based on the position of the marker element.
[0165] The marking elements are visual reference lines or patterns used for positioning and calibration in the image.
[0166] Specifically, the embodiment of the present application can use an image processing algorithm to identify the position of the marker element in the image to be tested. Using the identified marker element as a reference point, the precise position coordinates of the marker element in the image to be tested are calculated. Since the position of the nucleic acid template is usually known relative to the position of the marker element, the position of the nucleic acid template on the image to be tested is derived based on the position of the marker element on the image to be tested using the known positional relationship between the nucleic acid template and the marker element.
[0167] The embodiment of the present application can improve the accuracy of nucleic acid template positioning on the image by first locating the marker elements on the image to be tested, and then using these known positions to accurately deduce the position of the nucleic acid template, thereby making it easier to identify and analyze abnormal areas. At the same time, this precise positioning can reduce errors in the analysis process and ensure that abnormal area detection is more reliable and effective.
[0168] In some embodiments, the marking element includes at least one of a track line and a cross star.
[0169] Tracklines are continuous lines used to mark specific paths or locations in an image. Tracklines can provide a benchmark for image analysis and help determine the relative positions of other elements or areas in an image.
[0170] Among them, the cross star is a mark similar to a "+" and is usually used to mark key locations in an image. The cross star provides a clear intersection point that can help accurately locate specific areas in an image.
[0171] The embodiment of the present application can accurately deduce the position of the nucleic acid template in the image by finding the position coordinates of the trajectory line or the cross star on the image to be tested, which helps to ensure the accuracy and consistency of subsequent identification of abnormal areas.
[0172] In some embodiments, the marking elements may adopt various geometric forms, such as points, lines and surfaces (geometric figures), to meet different application requirements and visual recognition requirements. In addition to the traditional track lines and cross stars, the marking elements may also be independent bright spot marks of other shapes, colors or patterns, marks similar to a circular ring "O", marks similar to a triangle "△", marks similar to a polygon, etc.
[0173] Among them, the independent highlight mark is a mark symbol used to highlight specific information or areas.
[0174] Among them, the ring mark is a mark shaped like an "O", which is usually used to emphasize specific areas. It can provide clear visual guidance in the image and is easy to identify and locate.
[0175] Among them, the triangle mark is a mark with a shape similar to "△", which is usually used to indicate a direction or a specific point of interest.
[0176] Among them, polygonal marks can be designed into different shapes as needed, such as pentagons, hexagons, etc., which are suitable for the identification of complex images.
[0177] The embodiments of the present application can accurately locate specific points in an image by using marking elements of different shapes. At the same time, the marking elements can not only help improve the readability of the image, but also provide reference points during the imaging process to assist the device in focusing and evaluating the imaging quality, thereby more accurately deducing the position of the nucleic acid template in the image and ensuring the accuracy and consistency of subsequent identification of abnormal areas.
[0178] In some embodiments, in the above Figure 4 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the image to be inspected includes one or more corresponding groups of sequencing images generated during one or more rounds of sequencing of the nucleic acid template.
[0179] The region formed at the position where the nucleic acid template has no signal on the image to be tested is taken as the abnormal region of the image to be tested, which may specifically include:
[0180] The region formed at the position where no signal of the nucleic acid template exists in one or more sets of sequencing images is regarded as an abnormal region.
[0181] In the process of sequencing nucleic acid templates, the optical imaging system collects the fluorescence signals generated in each cycle of sequencing to obtain sequencing images, and these sequencing images are combined to form one or more sets of sequencing images. Each set of images corresponds to the incorporation of nucleotides or nucleotide analogs into specific positions of the nucleic acid template.
[0182] Specifically, the embodiments of the present application can determine the positions where no signals of the nucleic acid templates exist in one or more groups of sequencing images by comparing the signal conditions of the positions of the nucleic acid templates in one or more groups of sequencing images, that is, determine the positions where the nucleic acid templates fail to show signals in the sequencing images in different sequencing rounds, and mark the areas formed by these positions as abnormal areas.
[0183] The embodiments of the present application can effectively identify and exclude abnormal positions that may be caused by mutations, damage or experimental errors by comparing the signal distribution in multiple rounds of sequencing images, thereby improving the accuracy of abnormal area identification.
[0184] In some embodiments, in the above Figure 4 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel gray value may specifically include:
[0185] Determine the difference between the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and the pixel grayscale values of its surrounding neighborhood pixels; compare the difference with a first threshold; and determine whether there is a signal at the position of the nucleic acid template on the image to be tested based on the comparison result.
[0186] Specifically, the embodiments of the present application can determine whether there is a signal at the position by determining the grayscale value of the pixel where the nucleic acid template is located on the image to be tested and calculating the grayscale value difference between the pixel and the surrounding neighboring pixels.
[0187] Furthermore, the embodiment of the present application can compare the calculated difference with a preset first threshold value. If the difference is greater than or equal to the first threshold value, it is judged that there is a signal at the position of the nucleic acid template on the image to be tested, and it is recorded as 1; if the difference is less than the first threshold value, it is judged that there is no signal at the position of the nucleic acid template on the image to be tested, and it is recorded as 0.
[0188] In some embodiments, the neighborhood includes an N*M neighborhood, where N and M are both odd numbers, and N≥3, M≥3. For example, the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and its surrounding neighborhood pixels include edge points or corner points in a 3*3 or 5*5 neighborhood.
[0189] The embodiment of the present application calculates the difference between the pixel grayscale value of the position of the nucleic acid template on the image to be tested and the grayscale value of its neighboring pixels, and compares the difference with a set threshold to determine whether there is a signal at that position. This can effectively identify the signal area of the nucleic acid template on the image, improve the accuracy and sensitivity of abnormal area detection, and thus more accurately identify abnormal areas that may be contained in the image.
[0190] Abnormal areas in the image (such as high-brightness noise, low-brightness black holes, bubble blur, etc.) will interfere with the base calling process. These abnormalities will cause the inability to extract information normally, with the following specific impacts:
[0191] Interference of coordinate information: Figure 5 FIG. 1 is a schematic diagram of the layout of structural elements of an image to be inspected provided by an embodiment of the present application. In the image processing process, it is necessary to extract, for example, trajectory lines ( Figure 5 The black line in the figure) Figure 5 The coordinate information of the red dot in the figure is used to calculate the sequencing block (block, represented by Figure 5 The coordinates of the nucleic acid template within the rectangular area formed by the four red dots in the image. If the crossPoint falls within the abnormal area of the image, its coordinates may deviate. This will cause errors in the calculation of coordinates of other normal areas, thereby affecting the accuracy of the extracted grayscale information, where the grayscale information includes grayscale value / pixel grayscale value (Intensity, referred to as Ints).
[0192] Interference of grayscale information: Once the coordinate information of the nucleic acid template is obtained, the grayscale information of all signals corresponding to the nucleic acid template on the solid substrate surface needs to be extracted. If the signal is located in an abnormal area, the Ints of the extracted signal will be inaccurate.
[0193] Since the Ints of the extracted signal need to be used for correction in the subsequent steps, incorrect Ints will have a negative impact on the correction of normal data. The correction includes:
[0194] Crosstalk correction: Correction of signal interference between different channels. If the Ints of a channel is wrong due to an abnormal area, it will affect the crosstalk correction of other channels.
[0195] Phasing correction: Correction of signal time delay between different cycles. If the Ints of a cycle is abnormal, it will interfere with phasing correction.
[0196] Normalization: Normalize all Ints data in the image. Abnormal areas will cause Ints errors in some areas, which will affect the normalization and thus affect the correction of normal areas.
[0197] In summary, abnormal areas in the image will not only lead to incorrect nucleic acid template coordinates and Ints, but also amplify their impact during the correction process, ultimately leading to more data errors in normal areas and affecting the overall base calling accuracy. Therefore, after detecting abnormal areas in the image, measures need to be taken to limit their impact, prevent the abnormality from expanding, and eliminate their interference with base recognition.
[0198] like Figure 6 As shown, a flow chart of an implementation of a method for processing an abnormal area on an image to perform base recognition provided in an embodiment of the present application is provided, and the method includes:
[0199] S600: An abnormal region on an image is detected and determined according to any of the above methods for detecting an abnormal region on an image.
[0200] S610: Determine the position of the nucleic acid template in the abnormal area of the image to be detected.
[0201] Illustratively, the embodiments of the present application can utilize known nucleic acid template coordinates to directly mark these coordinates on the image to be detected, thereby determining whether the coordinates of the nucleic acid template are located within the abnormal area of the image to be detected, and further confirming the specific positions of these nucleic acid template coordinates located within the abnormal area.
[0202] Illustratively, an embodiment of the present invention can determine the position of the nucleic acid template in the image to be detected by identifying special marks designed on the surface of the solid substrate, and then check whether the position overlaps with the abnormal area to identify the overlapping part as the position of the nucleic acid template in the abnormal area on the image to be detected.
[0203] S620: When performing base recognition based on the image to be tested, the grayscale value of the pixel at the position where the nucleic acid template is located in the abnormal area on the image to be tested is reset to zero, and the base type corresponding to the position where the nucleic acid template is located in the abnormal area is recognized as an unknown base.
[0204] Specifically, when performing base recognition based on the image to be tested, if the nucleic acid template is in the abnormal area of the image, the grayscale value of the pixel at the corresponding position will be directly set to zero. In addition, an additional mark can be made for these positions to ensure that the impact of these zero values on other normal data is minimized during the correction process. When the base is finally determined, these marks are used to identify the bases at these positions as "unknown bases" (indicated by "N"), indicating that the base recognition at this position has failed.
[0205] Furthermore, in the embodiment of the present application, the grayscale value of the relevant position of the detected abnormal area is set to zero, which helps to avoid interference with the calculation and results of other normal data during the data correction process. Each position of the nucleic acid template will have a corresponding mark. Even if these positions may be assigned conventional grayscale values and a base is identified during the correction process, the role of the mark is to ensure that it is forcibly identified as "N" in this case. Since "N" represents an unknown base, it will be ignored in subsequent data analysis, so it will not increase the overall error rate.
[0206] In the process of image processing, the embodiment of the present application detects and determines the abnormal area on the image, then identifies the position of the nucleic acid template in the abnormal area, sets the pixel gray value of these positions to zero, and marks the corresponding base type as an unknown base (N), thereby helping to reduce the interference of the abnormal area on the normal data during the base recognition process and ensuring the accuracy and reliability of the base recognition results. At the same time, by minimizing the impact of the abnormal area, it is possible to more effectively focus on the valid data during the base recognition process, thereby improving the quality of the overall analysis.
[0207] In some embodiments, the embodiments of the present application can choose to prioritize data volume or accuracy based on the data processing priority strategy. For example, if an abnormal area is found in an image acquired through a channel of an optical imaging system, while images acquired through other channels of the optical imaging system are normal, under the accuracy priority strategy, the grayscale value of the signal contained in the portion corresponding to the abnormal area in all images can be set to zero, that is, the information contained in the portion of the normal image corresponding to the abnormal area is ignored.
[0208] For ease of understanding, here we use an example to illustrate the data quantity priority strategy and accuracy priority strategy: Assume that in a round of multi-channel sequencing, one channel (for example, the red channel) shows an abnormal area, while other channels (such as green and blue channels) are normal. If the data quantity priority strategy is selected, it means to keep as much available data as possible, that is, only the grayscale value of the abnormal area in the red channel is set to zero, and the data of other normal channels are retained. In this way, normal base recognition can continue on other channels, maximizing the use of available data. Finally, the bases in the abnormal area in the red channel are marked as "N", while the base recognition results of other normal channels are still valid. If the accuracy priority strategy is selected, it means to minimize data errors, even if this may result in a reduction in data volume, that is, all grayscale values corresponding to the abnormal area in all channels are set to zero. This ensures that the abnormality on any channel will not interfere with the base recognition of other channels. Finally, the bases corresponding to the position of the abnormal area in all channels are marked as "N" to avoid misidentification due to asynchronous or cross-interference.
[0209] The embodiment of the present application can flexibly decide how to handle abnormal regions according to the base recognition target and data environment through the selection of data quantity priority strategy and accuracy priority strategy to achieve the best base recognition result. Which strategy to choose often depends on the base recognition requirements for data integrity and accuracy.
[0210] In some embodiments, in the above Figure 6 On the basis of one or more corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the image to be inspected includes trajectory lines, the trajectory lines include a plurality of first trajectory lines in a first direction and a plurality of second trajectory lines in a second direction, wherein the first direction and the second direction are non-parallel, and the intersection point of the first trajectory line and the second trajectory line is defined as a crosspoint;
[0211] Determining the position of the nucleic acid template in the abnormal area of the image to be tested may specifically include:
[0212] Determine the crosspoint coordinates in the abnormal area; calculate the coordinates of the position of the nucleic acid template in the abnormal area based on the crosspoint coordinates in the abnormal area to determine the position of the nucleic acid template in the abnormal area on the image to be tested.
[0213] In the image to be inspected, there are trajectory lines of a certain structure: several trajectory lines in the first direction and several trajectory lines in the second direction. The first direction and the second direction are not parallel, so they intersect. Each intersection point is called a "crosspoint". Using the identified crosspoint coordinates, the exact position coordinates of the nucleic acid template in the abnormal area are further calculated. These position coordinates help determine the specific position of the nucleic acid template in the abnormal area of the image.
[0214] Specifically, the embodiment of the present application can identify all the trajectory lines in the first direction and the second direction in the image to be inspected through image processing techniques such as edge detection and line detection (such as Hough transform). After identifying the trajectory line, calculate the intersection of the trajectory line in the first direction and the trajectory line in the second direction. Check all calculated crosspoint coordinates and check whether each crosspoint coordinate is within the boundary of the abnormal area, so as to determine which intersections are located in the marked abnormal area.
[0215] In some embodiments, the embodiments of the present application use mathematical methods (such as solving a system of linear equations) to calculate the crosspoint coordinates of each pair of intersecting trajectory lines.
[0216] The embodiment of the present application can accurately determine the coordinates of the nucleic acid template in the abnormal area by identifying the intersection point (crosspoint) position of the cross-track line, thereby facilitating base recognition in the image to be tested, and accurately processing the position of the nucleic acid template in the abnormal area on the image to be tested, making base recognition more reliable and efficient.
[0217] In some embodiments, the embodiments of the present application can use the known crosspoint coordinates of the non-abnormal area on the image to be inspected to determine the crosspoint coordinates in the abnormal area through similarity calculation.
[0218] Since the distribution of crosspoints in a field of view (Fov) usually has certain regularities, the crosspoint positions in the abnormal area can be more accurately derived by using these known regularities.
[0219] based on Figure 5 The structural element layout of the image to be inspected is shown in the embodiment of the present application. All trajectory lines in the image can be first identified and calculated ( Figure 5 The black line in Figure 5 By selecting four adjacent intersection points, a rectangular area is formed, namely the sequencing block (block, composed of Figure 5The four adjacent intersection points are used to determine the positions of all spots (spots represent reaction sites on the surface of the sequencing chip. Reaction sites can be, for example, surface-modified nanopores or protrusions for fixing nucleic acid templates) in the sequencing block.
[0220] It is understandable that for edge and corner sequencing blocks, there are usually only two or one intersection points. In this case, the other intersection points within these sequencing blocks are inferred by using the inner adjacent intersection points of these intersection points. By knowing the number of spots between two intersection points on the same line, the positions of all spots on this line can be located. In addition, using the positions of spots on two parallel trajectory lines (including horizontal and vertical lines), the coordinates of all spots in the sequencing block can be further inferred.
[0221] In actual applications, spots are arranged in arrays on the surface of sequencing chips, such as triangular arrays, hexagonal arrays, or other shapes. The specific calculation methods may be different. However, the core idea is to use the known number of intersections (such as 4, 2, or 1) to calculate the coordinates of spots within the sequencing block.
[0222] The embodiments of the present application make use of the regularity of similarity in images and utilize the known crosspoint coordinates of the non-abnormal area on the image to be tested to accurately calculate the crosspoint coordinates in the abnormal area, and then accurately determine the position of the nucleic acid template in the abnormal area on the image to be tested, which helps to reduce the interference of the abnormal area on the normal data in the subsequent base recognition process.
[0223] In addition, the images of adjacent cycles and adjacent channels are highly similar because they are taken at the same physical location and the distortion and chromatic aberration are eliminated after correction. The embodiment of the present application can extract the crosspoint coordinates from these normal images as a reference to infer the crosspoint in the abnormal area.
[0224] In some embodiments, the embodiments of the present application can determine the crosspoint coordinate set in the image to be tested; obtain the reference crosspoint coordinate set in the sequencing image generated by the sequencing round before the sequencing round in which the image to be tested is located; use the crosspoint coordinate set in the image to be tested and the reference crosspoint coordinate set to calculate the crosspoint coordinate offset; determine the crosspoint coordinates located in the abnormal area based on the reference crosspoint coordinate set and the crosspoint coordinate offset.
[0225] Specifically, the embodiment of the present application can identify and determine all the crosspoint coordinates in the image to be tested. By obtaining the sequencing image generated by the previous sequencing round adjacent to the current image to be tested, the crosspoint coordinates therein are extracted and integrated into a reference crosspoint coordinate set. The sequencing images of the previous round are generally considered to be free of abnormalities, or have fewer abnormalities. The crosspoint coordinate set in the image to be tested is compared and matched with the reference crosspoint coordinate set to calculate the offset of each crosspoint. This offset reflects the displacement of the crosspoint in the image due to abnormalities or other factors. Using the reference crosspoint coordinate set and the calculated offset, the crosspoint coordinates in the abnormal area are calculated. In this way, even in the abnormal area, the crosspoint can still be accurately located based on the known reference point and offset value.
[0226] The embodiment of the present application calculates the crosspoint offset in the abnormal area by comparing the intersection coordinates in the image to be tested and the image of the previous sequencing round, thereby accurately locating the crosspoint coordinates in the abnormal area, and then accurately determining the position of the nucleic acid template in the abnormal area on the image to be tested, thereby reducing the interference of the abnormal area on normal data during the base recognition process.
[0227] In some embodiments, the embodiments of the present application can calculate the coordinate difference between a reference crosspoint in a reference crosspoint coordinate set and its corresponding crosspoint in a crosspoint coordinate set in the image to be inspected; and use the coordinate difference with the highest frequency as the crosspoint coordinate offset.
[0228] Since abnormal areas may cause abnormal offsets of certain crosspoints, selecting the coordinate difference with the highest frequency can filter out these abnormal values, thereby determining an offset that is more representative of the overall change of the image, to ensure that when determining the crosspoint coordinates located in the abnormal area, the most stable and reliable offset value is used, thereby accurately locating the crosspoint coordinates in the abnormal area.
[0229] For ease of understanding, an example is given here to illustrate: For each different channel (A, C, G, Tchannel), extract the crosspoint coordinate set on the image, which is recorded as AcrossPoint, CcrossPoint, GcrossPoint and TcrossPoint respectively. There are 24 crosspoint coordinates on each image. Select the crosspoint coordinate set of a normal sequencing round cycN before cycM as a reference. The crosspoint of cycN is recorded as crossPointN. For cycN and cycM, calculate the coordinate difference between the corresponding crosspoint in the crossPointN and crossPointM sets, recorded as crossPointN-crossPointM. Count all coordinate differences and find the difference with the highest frequency as the translation between the two images, that is, offset. Use the calculated translation offset to correct the crosspoint in the image to be inspected, so as to recalculate the coordinates in crossPointM in the manner of crossPointM = crossPointN -offset. It should be noted that CrossPointM can be the coordinate of a single channel or the collection of crosspoint coordinates of all channels. Through these steps, even if there are large-area problems such as bubble anomalies in the cycM image, the accuracy and consistency of subsequent base recognition can still be ensured through normal data and offset correction from the previous sequencing round.
[0230] Although operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.
[0231] It should be understood that the various steps described in the method implementation of the present application can be performed in different orders and / or performed in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.
[0232] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the method for detecting abnormal areas on an image and / or the method for processing abnormal areas on an image for base recognition are implemented.
[0233] An embodiment of the present application provides a system, comprising: the above-mentioned computer-readable storage medium; and at least one processor, configured to execute a program stored in the computer-readable storage medium.
[0234] like Figure 7 As shown, an embodiment of the present application provides an electronic device 1000, which includes at least one processor 1001, and at least one memory 1002 and a bus 1003 connected to the processor 1001; wherein the processor 1001 and the memory 1002 communicate with each other through the bus 1003; the processor 1001 is used to call the program instructions in the memory 1002 to execute the above-mentioned method for detecting abnormal areas on an image, and / or, a method for processing abnormal areas on an image to perform base recognition.
[0235] The electronic devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0236] An embodiment of the present application provides a computer program product, including a first instruction for implementing detection of abnormal areas on an image and / or a second instruction for implementing processing of abnormal areas on an image for base recognition. When the first instruction is executed by a computer, the computer executes the above-mentioned method for detecting abnormal areas on an image, and when the second instruction is executed by the computer, the computer executes the above-mentioned method for processing abnormal areas on an image for base recognition.
[0237] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to identify abnormal areas by analyzing the pixel grayscale value and image block brightness, and the grayscale value of the abnormal area is set to zero, and the base is identified as unknown to eliminate abnormal signal interference and improve the accuracy of base sequencing.
[0238] The present application is described with reference to the flowcharts and / or block diagrams of the methods, computer-readable storage media, systems, electronic devices, and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0239] In a typical configuration, an electronic device includes one or more processors (CPU), a memory, and a bus. The electronic device may also include an input / output interface, a network interface, and the like.
[0240] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
[0241] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0242] In the description of the present application, it should be understood that the terms "up", "down", "front", "back", "left" and "right" etc. indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present application and simplifying the description. They do not indicate or imply that the positions or elements referred to must have specific directions, be constructed and operate in specific directions. Therefore, they should not be understood as limitations of the present application.
[0243] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0244] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0245] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the present application.
Claims
1. A method for detecting abnormal areas on an image, characterized in that: Acquiring an image to be tested, wherein the image to be tested is generated by imaging when sequencing a nucleic acid template on a surface of a solid substrate; Determining the position of the nucleic acid template on the image to be tested; Based on the position of the nucleic acid template on the image to be tested, determining the pixel gray value of the pixel where the position of the nucleic acid template on the image to be tested is located; Determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel grayscale value; The area formed by the position where the nucleic acid template has no signal on the image to be tested is used as the abnormal area of the image to be tested; The signal is generated during the sequencing of the nucleic acid template.
2. The method for detecting abnormal areas on an image according to claim 1, characterized in that: The step of determining the position of the nucleic acid template on the image to be tested includes: Acquire a template image, wherein the template image is an image constructed based on one or more rounds of sequencing of the nucleic acid template and is used to characterize the position of the nucleic acid template on the surface of the solid substrate; Mapping the position of the nucleic acid template to the image to be tested to determine the position of the nucleic acid template on the image to be tested; Optionally, determining the position of the nucleic acid template on the image to be tested includes: Determine the position of the marking element on the image to be inspected; Determining the position of the nucleic acid template on the image to be tested based on the position of the marking element; Optionally, the marking element includes at least one of a trajectory line and a cross star; Optionally, the image to be inspected includes one or more sets of corresponding sequencing images generated by performing one or more rounds of sequencing on the nucleic acid template; The step of taking the region formed by the position where the nucleic acid template has no signal on the image to be tested as the abnormal region of the image to be tested includes: The region formed by the position where no signal of the nucleic acid template exists in the one or more sets of sequencing images is regarded as an abnormal region; Optionally, determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel grayscale value includes: Determine the difference between the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and the pixel grayscale values of the pixels in its surrounding neighborhood; comparing the difference with a first threshold; Determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the comparison result; Optionally, judging whether there is a signal at the position of the nucleic acid template on the image to be tested based on the comparison result includes: If the difference is less than a first threshold, it is determined that there is no signal at the position of the nucleic acid template on the image to be tested; Optionally, the neighborhood includes an N*M neighborhood, Where N and M are both odd numbers, and N≥3, M≥3; Optionally, the method further comprises: Dividing the image to be inspected into a plurality of image blocks; Determine the evaluation value of each image block; Determining whether the image block belongs to the abnormal area of the image to be detected based on the evaluation value of the image block; The evaluation value is related to the brightness of the image block; Optionally, determining the evaluation value of each image block includes: Determine a brightness variance and a brightness mean of each image block, and determine the evaluation value based on the brightness variance and the brightness mean; Optionally, judging whether the image block belongs to the abnormal area of the image to be detected based on the evaluation value of the image block includes: comparing the evaluation value of the image block with a second threshold; Determining whether the image block belongs to the abnormal area of the image to be inspected based on the comparison result; The second threshold is determined according to the global image brightness of the image to be inspected; Optionally, judging whether the image block belongs to the abnormal area of the image to be detected based on the comparison result includes: If the evaluation value of the image block is lower than the second threshold, the image block is judged to belong to the abnormal area of the image to be detected; Optionally, the image to be inspected includes one or more sets of corresponding sequencing images generated by performing one or more rounds of sequencing on the nucleic acid template; If the evaluation value of the image block is lower than the second threshold, the method further comprises: Determining whether the evaluation value of the image block in the one or more groups of sequencing images is lower than the second threshold; If yes, it is determined that the image block belongs to the abnormal area of the image to be inspected; Optionally, an image dilation operation is performed on the abnormal region to expand the boundary of the abnormal region.
3. A method for detecting abnormal areas on an image, characterized in that: Acquire an image to be tested, wherein the image to be tested is generated by imaging when sequencing a nucleic acid template on a surface of a solid substrate, and a signal generated when sequencing the nucleic acid template appears as a bright spot on the image to be tested, and the brightness of the image to be tested is related to the pixel grayscale value of the bright spot; Dividing the image to be inspected into a plurality of image blocks; Determine the evaluation value of each image block; Determining whether the image block belongs to the abnormal area of the image to be detected based on the evaluation value of the image block; The evaluation value is related to the brightness of the image block.
4. The method for detecting abnormal areas on an image according to claim 3, characterized in that: Determining the evaluation value of each image block includes: Determine the brightness variance and the brightness mean of each image block, and determine the evaluation value based on the brightness variance and the brightness mean; Optionally, judging whether the image block belongs to the abnormal area of the image to be detected based on the evaluation value of the image block includes: comparing the evaluation value of the image block with a second threshold; Determining whether the image block belongs to the abnormal area of the image to be inspected based on the comparison result; The second threshold is determined according to the global image brightness of the image to be inspected; Optionally, judging whether the image block belongs to the abnormal area of the image to be detected based on the comparison result includes: If the evaluation value of the image block is lower than the second threshold, the image block is judged to belong to the abnormal area of the image to be detected; Optionally, the image to be inspected includes one or more sets of corresponding sequencing images generated by performing one or more rounds of sequencing on the nucleic acid template; If the evaluation value of the image block is lower than the second threshold, the method further comprises: Determining whether the evaluation value of the image block in the one or more groups of sequencing images is lower than the second threshold; If yes, it is determined that the image block belongs to the abnormal area of the image to be inspected; Optionally, performing an image dilation operation on the abnormal region to expand the boundary of the abnormal region; Optionally, the method further comprises: Determining the position of the nucleic acid template on the image to be tested; Based on the position of the nucleic acid template on the image to be tested, determining the pixel gray value of the pixel where the position of the nucleic acid template on the image to be tested is located; Determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel grayscale value; The area formed by the position where the nucleic acid template has no signal on the image to be tested is used as the abnormal area of the image to be tested; Optionally, determining the position of the nucleic acid template on the image to be tested includes: Acquire a template image, wherein the template image is an image constructed based on one or more rounds of sequencing of the nucleic acid template and is used to characterize the position of the nucleic acid template on the surface of the solid substrate; Mapping the position of the nucleic acid template on the template image to the image to be tested to determine the position of the nucleic acid template on the image to be tested; Optionally, determining the position of the nucleic acid template on the image to be tested includes: Determine the position of the marking element on the image to be inspected; Determining the position of the nucleic acid template on the image to be tested based on the position of the marking element; Optionally, the marking element includes at least one of a trajectory line and a cross star; Optionally, the image to be inspected includes one or more corresponding sets of sequencing images generated during one or more rounds of sequencing of the nucleic acid template; The step of taking the region formed by the position where the nucleic acid template has no signal on the image to be tested as the abnormal region of the image to be tested includes: The region formed by the position where no signal of the nucleic acid template exists in the one or more sets of sequencing images is regarded as an abnormal region; Optionally, determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the pixel grayscale value includes: Determine the difference between the pixel grayscale value of the pixel where the nucleic acid template is located on the image to be tested and the pixel grayscale values of the pixels in its surrounding neighborhood; comparing the difference with a first threshold; Determining whether there is a signal at the position of the nucleic acid template on the image to be tested based on the comparison result; Optionally, judging whether there is a signal at the position of the nucleic acid template on the image to be tested based on the comparison result includes: If the difference is less than a first threshold, it is determined that there is no signal at the position of the nucleic acid template on the image to be tested; Optionally, the neighborhood includes an N*M neighborhood, Wherein N and M are both odd numbers, and N≥3, M≥3.
5. A method for processing abnormal areas on an image for base recognition, characterized in that: The abnormal area on the image is determined after being detected by the method according to any one of claims 1 to 4; Determining the position of the nucleic acid template in the abnormal area of the image to be detected; When performing base recognition based on the image to be tested, the pixel grayscale value of the position where the nucleic acid template is located in the abnormal area on the image to be tested is reset to zero and the base type corresponding to the position where the nucleic acid template is located in the abnormal area is recognized as an unknown base.
6. The method for processing abnormal regions on an image for base recognition according to claim 5, characterized in that: The image to be inspected includes trajectory lines, the trajectory lines include a plurality of first trajectory lines in a first direction and a plurality of second trajectory lines in a second direction, wherein the first direction and the second direction are non-parallel, and an intersection point between the first trajectory line and the second trajectory line is defined as a crosspoint; Determining the position of the nucleic acid template in the abnormal area of the image to be detected includes: Determine the crosspoint coordinates located within the abnormal area; Based on the crosspoint coordinates in the abnormal region, the coordinates of the position of the nucleic acid template in the abnormal region are calculated to determine the position of the nucleic acid template in the abnormal region on the image to be tested; Optionally, determining the crosspoint coordinates located within the abnormal area includes: Determine the crosspoint coordinates in the abnormal area by similarity calculation using the known crosspoint coordinates of the non-abnormal area on the image to be inspected; Optionally, determining the crosspoint coordinates located within the abnormal area further comprises: Determine a crosspoint coordinate set in the image to be inspected; Obtaining a reference crosspoint coordinate set in a sequencing image generated in a sequencing round before the sequencing round in which the image to be tested is located; Calculating a crosspoint coordinate offset using the crosspoint coordinate set in the image to be inspected and the reference crosspoint coordinate set; Determine the crosspoint coordinates located in the abnormal area based on the reference crosspoint coordinate set and the crosspoint coordinate offset; Optionally, the calculating the crosspoint coordinate offset by using the crosspoint coordinate set in the image to be inspected and the reference crosspoint coordinate set includes: Calculating the coordinate difference between a reference crosspoint in the reference crosspoint coordinate set and its corresponding crosspoint in the crosspoint coordinate set in the image to be inspected; The coordinate difference with the highest frequency is used as the crosspoint coordinate offset.
7. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
8. A system, characterized in that: include: The computer readable storage medium of claim 7; and At least one processor is configured to execute a program stored in the computer-readable storage medium.
9. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises a first instruction for realizing detecting abnormal regions on an image and / or a second instruction for realizing processing abnormal regions on an image for base recognition, wherein the first instruction enables the computer to execute the method for detecting abnormal regions on an image as described in any one of claims 1 to 4 when the computer executes the program, and the second instruction enables the computer to execute the method for processing abnormal regions on an image for base recognition as described in any one of claims 5 or 6 when the computer executes the program.
Citation Information
Patent Citations
Methods and apparatus for constructing sequencing templates from images, and for base identification.
CN112288783B