Digital PCR instrument and droplet quality control method thereof
By using an abnormal area detection model and droplet classifier in a digital PCR instrument, abnormal droplet classifier can be quickly identified and eliminated, and the problems of slow droplet quality control speed and low accuracy in the prior art are solved, and more efficient droplet quality control is achieved.
Patent Information
- Application Number
- CN202311423415.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
AI Technical Summary
The existing micro droplet quality control methods of digital PCR instruments are slow and have low accuracy, making it difficult to effectively identify and eliminate abnormal micro droplets.
The pre-trained abnormal area detection model is used to obtain the abnormal image area from the droplet image, and the local image is input into the pre-trained droplet classifier for classification, and abnormal droplets are eliminated.
By quickly locking the abnormal image area, narrowing the abnormal droplet inspection range, improving the droplet quality control speed, reducing the error removal of normal droplets, and improving the quality control accuracy.
Smart Images

Figure CN119913025A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of molecular biology technology, and specifically to a digital PCR instrument and a droplet quality control method thereof. Background Art
[0002] The digital polymerase chain reaction (PCR) instrument is an emerging device for quantitative and precise detection of nucleic acids. The diluted nucleic acid template is distributed into a large number of different reaction units, so that each reaction unit has one or no nucleic acid; then, detectable fluorescence is added while PCR amplification is performed; when the amplification is completed, the number of fluorescence occurrences of each reaction unit is collected using statistical methods to quantitatively detect the nucleic acid concentration in the sample. In the digital PCR detection application, each droplet represents a reaction unit. By reading the fluorescence information of each reaction unit after the amplification is completed, and judging the positive and negative nature of the reaction unit based on the collected fluorescence signal, the detection result is calculated according to the Poisson distribution. Therefore, the accuracy of fluorescence signal detection is crucial for the digital PCR instrument. Unlike the flow fluorescence signal acquisition, the fluorescence signal is easily disturbed by the external environment when the charge coupled device (CCD) is used to collect the fluorescence signal. In particular, in the digital PCR system where droplets are prepared in a free tiling manner, droplets are prone to deformation, fusion and stacking, and their fluorescence signals are easily disturbed by the external environment, such as foreign particles, slight scratches in the tiling container, stains or dust on the channel filter, etc. Therefore, it is particularly necessary to carry out quality control of droplets.
[0003] Existing methods mainly use machine learning or deep learning to classify detected droplets in order to complete the quality control of droplets. However, this method requires screening a small number of abnormal droplets among tens of thousands to hundreds of thousands of droplets, which is not only slow but also easily leads to the erroneous elimination of normal droplets, and urgently needs to be improved. Summary of the invention
[0004] The embodiment of the present invention provides a digital PCR instrument and a droplet quality control method thereof, which are used to solve the problems of slow speed and low accuracy of the existing method.
[0005] In a first aspect, an embodiment of the present invention provides a digital PCR instrument, comprising: a sample carrying module, a reaction system preparation module, a droplet generation module, a PCR amplification module, a fluorescent signal detection module and a processing module;
[0006] The sample carrying module is used to accommodate the nucleic acid sample to be tested;
[0007] A reaction system preparation module is used to prepare the reaction mixture required for the PCR reaction;
[0008] A droplet generation module is used to mix the nucleic acid sample to be tested contained in the sample holding module and the reaction mixture prepared by the reaction system preparation module according to a preset ratio to form droplets;
[0009] A PCR amplification module, used to provide a microdroplet reaction temperature so that the PCR reaction can be amplified in the microdroplet;
[0010] A fluorescence signal detection module, used to detect the fluorescence signal generated by the PCR reaction;
[0011] A processing module, used to generate a droplet image according to the fluorescent signal detected by the fluorescent signal detection module, and perform droplet recognition on the droplet image to obtain droplet information of each droplet in the droplet image;
[0012] The abnormal image region is obtained from the droplet image using a pre-trained abnormal region detection model;
[0013] determining whether each droplet is located in an abnormal image region according to the droplet information of the droplet;
[0014] For each droplet located in the abnormal image region, a local image including the droplet is acquired from the droplet image;
[0015] Inputting each local image containing a droplet into a pre-trained droplet classifier to obtain a droplet classification result, the classification result including normal droplets and abnormal droplets;
[0016] Remove abnormal droplets.
[0017] In one embodiment, the droplet information includes the center position and radius of the droplet, and the processing module is used to obtain a local image containing the droplet from the droplet image, including:
[0018] A rectangular image area with the center of the droplet as the center and a side length of three times the droplet diameter is obtained from the droplet image, and the inscribed circle of the rectangular image area is used as a shielding mask to shield the rectangular edge area to form a local image corresponding to the droplet.
[0019] In one embodiment, the processing module is further configured to:
[0020] For abnormal droplets, the abnormal type of the abnormal droplets is identified and the number of the abnormal droplets is counted.
[0021] In one embodiment, the processing module is further configured to:
[0022] Acquire a droplet region mask corresponding to the droplet image, wherein the droplet region mask uses a first pixel value and a second pixel value to indicate a droplet imaging region and a non-droplet imaging region in the droplet image;
[0023] Traversing each droplet in the droplet image, and judging whether each droplet is located in a non-droplet imaging area according to the droplet information of each droplet;
[0024] Droplets located in non-droplet imaging areas are rejected.
[0025] In one embodiment, the processing module is used to obtain a droplet region mask corresponding to the droplet image, including:
[0026] Creating a droplet position mark map of the same size as the droplet image, wherein the pixel value in the droplet position mark map is the second pixel value;
[0027] In the droplet position marking map, a preset graphic is drawn with the center position of each droplet as the center to mark the droplet, and the pixel value of the drawn preset graphic is a first pixel value;
[0028] Creating a droplet scanning result image of the same size as the droplet image, wherein the pixel value in the droplet scanning result image is a first pixel value;
[0029] Scan preset rows around the droplet position mark map respectively, count the number of first pixel values in each row, and if the number of first pixel values is less than a preset threshold, set the pixel value of the corresponding row in the droplet scanning result map to the second pixel value to obtain a droplet scanning mask;
[0030] The droplet image is input into a pre-trained well plate edge segmentation model for segmentation, and a well plate edge mask corresponding to the droplet image is obtained, wherein the well plate edge mask uses a first pixel value and a second pixel value to indicate a well plate edge region and a non-well plate edge region in the droplet image;
[0031] The droplet scanning mask is subtracted from the well plate edge mask and the maximum contour area is extracted as the droplet area mask corresponding to the droplet image.
[0032] In a second aspect, an embodiment of the present invention provides a digital PCR droplet quality control method, comprising:
[0033] Generate a droplet image according to the detected fluorescent signal, perform droplet recognition on the droplet image, and obtain droplet information of each droplet in the droplet image;
[0034] The abnormal image region is obtained from the droplet image using a pre-trained abnormal region detection model;
[0035] determining whether each droplet is located in an abnormal image region according to the droplet information of the droplet;
[0036] For each droplet located in the abnormal image region, a local image including the droplet is acquired from the droplet image;
[0037] Inputting each local image containing a droplet into a pre-trained droplet classifier to obtain a droplet classification result, the classification result including normal droplets and abnormal droplets;
[0038] Remove abnormal droplets.
[0039] In one embodiment, the droplet information includes the center position and radius of the droplet, and obtaining a local image containing the droplet from the droplet image includes:
[0040] A rectangular image area with the center of the droplet as the center and a side length of three times the droplet diameter is obtained from the droplet image, and the inscribed circle of the rectangular image area is used as a shielding mask to shield the rectangular edge area to form a local image corresponding to the droplet.
[0041] In one embodiment, the method further comprises:
[0042] For abnormal droplets, the abnormal type of the abnormal droplets is identified and the number of the abnormal droplets is counted.
[0043] In one embodiment, the method further comprises:
[0044] Acquire a droplet region mask corresponding to the droplet image, wherein the droplet region mask uses a first pixel value and a second pixel value to indicate a droplet imaging region and a non-droplet imaging region in the droplet image;
[0045] Traversing each droplet in the droplet image, and judging whether each droplet is located in a non-droplet imaging area according to the droplet information of each droplet;
[0046] Droplets located in non-droplet imaging areas are rejected.
[0047] In one embodiment, obtaining a droplet region mask corresponding to the droplet image includes:
[0048] Creating a droplet position mark map of the same size as the droplet image, wherein the pixel value in the droplet position mark map is the second pixel value;
[0049] In the droplet position marking map, a preset graphic is drawn with the center position of each droplet as the center to mark the droplet, and the pixel value of the drawn preset graphic is a first pixel value;
[0050] Creating a droplet scanning result image of the same size as the droplet image, wherein the pixel value in the droplet scanning result image is a first pixel value;
[0051] Scan preset rows around the droplet position mark map respectively, count the number of first pixel values in each row, and if the number of first pixel values is less than a preset threshold, set the pixel value of the corresponding row in the droplet scanning result map to the second pixel value to obtain a droplet scanning mask;
[0052] The droplet image is input into a pre-trained well plate edge segmentation model for segmentation, and a well plate edge mask corresponding to the droplet image is obtained, wherein the well plate edge mask uses a first pixel value and a second pixel value to indicate a well plate edge region and a non-well plate edge region in the droplet image;
[0053] The droplet scanning mask is subtracted from the well plate edge mask and the maximum contour area is extracted as the droplet area mask corresponding to the droplet image.
[0054] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement a digital PCR droplet quality control method as described in any one of the second aspects.
[0055] The digital PCR instrument and the droplet quality control method provided by the embodiment of the present invention generate a droplet image according to the detected fluorescent signal, and perform droplet recognition on the droplet image to obtain the droplet information of each droplet in the droplet image; use a pre-trained abnormal region detection model to obtain the abnormal image region from the droplet image; determine whether each droplet is located in the abnormal image region according to its droplet information; for each droplet located in the abnormal image region, obtain a local image containing the droplet from the droplet image; input each local image containing the droplet into a pre-trained droplet classifier to obtain a droplet classification result, which includes normal droplets and abnormal droplets; remove abnormal droplets to achieve droplet quality control. The abnormal image region is quickly locked through abnormal region detection, and only the droplets in the abnormal image region are classified and checked, avoiding one-by-one checking of a large number of droplets in the droplet image, and narrowing the abnormal droplet checking range, which can not only improve the droplet quality control speed, but also effectively avoid the mistaken elimination of normal droplets, and improve the quality control accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0057] Figure 1 A schematic diagram of the structure of a digital PCR instrument provided in one embodiment of the present invention;
[0058] Figure 2 A flow chart of a digital PCR droplet quality control method provided by one embodiment of the present invention;
[0059] Figure 3 A flowchart of a digital PCR droplet quality control method provided by an embodiment of the present invention;
[0060] Figure 4 A schematic diagram showing a comparison before and after quality control provided by an embodiment of the present invention;
[0061] Figure 5 A flowchart of a digital PCR droplet quality control method provided by another embodiment of the present invention;
[0062] Figure 6 A schematic diagram of the quality control effect of droplet reflection provided by an embodiment of the present invention;
[0063] Figure 7 A schematic diagram of quality control effects for other sample situations provided by an embodiment of the present invention.
[0064] The above drawings have shown clear embodiments of the present invention, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0065] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0066] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0067] The serial numbers of the components in this document, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).
[0068] Please refer to Figure 1 The structure of the digital PCR instrument 100 is as follows: Figure 1As shown, it includes a sample holding module 101, a reaction system preparation module 102, a droplet generation module 103, a PCR amplification module 104, a fluorescent signal detection module 105 and a processing module 106.
[0069] Among them, the sample carrying module 101 is used to accommodate the nucleic acid sample to be tested, and the reaction system preparation module 102 is used to prepare the reaction mixture required for the PCR reaction. Specifically, the reaction system preparation module 102 will automatically mix different reagents in a specified proportion and ensure the quality and stability of the mixture. These reagents include PCR buffer, primers, probes, polymerase, etc. The droplet generation module 103 is used to mix the nucleic acid sample to be tested contained in the sample carrying module and the reaction mixture prepared by the reaction system preparation module according to a preset proportion and form droplets using microfluidics technology. Optionally, before generating droplets, the nucleic acid sample to be tested can also be removed from contaminants and purified. The droplet generation module 103 is a key module in the digital PCR instrument. It uses microfluidics technology to mix the sample and the reaction system in a certain proportion and form droplets of uniform size or tiny reaction areas. Each of these droplets contains all the components required for the PCR reaction. The PCR amplification module 104 is used to control the temperature cycle of the digital PCR reaction so that the PCR reaction is evenly amplified in the droplets. The PCR amplification module 104 generally includes two methods, namely, isothermal amplification and thermal cycle amplification, to ensure that the reaction is uniformly amplified in each droplet and generates a fluorescent signal. The fluorescent signal detection module 105 is used to detect the fluorescent signal generated by the PCR reaction. Specifically, the fluorescent signal detection module 105 can detect the intensity of the fluorescent signal by exciting the fluorescent molecules and using a specific optical system, and convert it into digital data. In this way, the fluorescent signal threshold in each droplet can be determined, and the number of target sequences in the sample can be calculated. The processing module 106 is used to perform data processing and analysis on the fluorescent signal detected by the fluorescent signal detection module 105. Specifically, the processing module 106 can calculate the number and concentration of the target sequence in the sample based on preset threshold values, standard curves and other parameters. At the same time, the module can also provide visualization and export functions of the results, which is convenient for users to conduct further analysis and interpretation.
[0070] It should be noted that Figure 1 The structure shown is for illustration only and may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1 Each component shown in the figure may be implemented by hardware and / or software. Figure 1 The digital PCR instrument shown can be used to execute the digital PCR channel droplet alignment method provided in any embodiment of the present invention.
[0071] The existing method of using machine learning or deep learning for droplet quality control is to complete the quality control of droplets by classifying all detected droplets. It is often necessary to screen a small number of abnormal droplets among tens of thousands to hundreds of thousands of droplets, which is not only slow but also easily leads to the erroneous elimination of normal droplets. In order to solve the problems existing in the prior art, the present application adopts the method of first detecting the abnormal area and then classifying and screening only the droplets in the abnormal area to narrow the scope of abnormal droplet screening, while avoiding the erroneous elimination of normal droplets. The following will use specific embodiments to describe the method provided by the present application in detail.
[0072] Please refer to Figure 2 , Figure 2 Flow chart of a digital PCR droplet quality control method provided by one embodiment of the present invention. Figure 2 As shown, the digital PCR droplet quality control method provided in this embodiment may include:
[0073] S201 . Generate a droplet image according to the detected fluorescent signal, perform droplet recognition on the droplet image, and obtain droplet information of each droplet in the droplet image.
[0074] In this embodiment, a droplet image of the target sample can be generated based on the fluorescent signal detected by the fluorescent signal detection module. After the droplet image is obtained, the droplet image can be subjected to droplet recognition based on an image processing method or a machine learning method to obtain the droplet center position and droplet radius of each droplet in the droplet image. The specific implementation method of droplet recognition is not limited in this embodiment.
[0075] S202: Acquire abnormal image regions from the droplet image using a pre-trained abnormal region detection model.
[0076] The abnormal region detection model in this embodiment can be trained based on the droplet image training samples with abnormal image regions marked. The abnormal region detection model is mainly used to locate the suspected abnormal droplet image region, and its construction and training process is as follows: first, a training data set is prepared, and droplet images under various reagent systems, different imaging qualities and imaging brightness are selected, and the abnormal image regions in each droplet image are manually marked with rectangular frames to form an abnormal region training data set; then, an abnormal region detection model is constructed, and the detection model can adopt the YOLO series model structure, for example; finally, the detection model is trained, and the constructed abnormal region detection model is trained using the prepared abnormal region training data set, and finally a trained abnormal region detection model is obtained.
[0077] By inputting the droplet image generated in step S201 into a pre-trained abnormal region detection model, the abnormal image region can be detected from the droplet image.
[0078] S203: Determine whether each droplet is located in an abnormal image region according to the droplet information of the droplet.
[0079] In an optional implementation, whether each droplet is located in the abnormal image region may be determined based on the center position of the droplet. As long as the center position of the droplet is located in the abnormal image region, the droplet is considered to be located in the abnormal image region.
[0080] In another optional embodiment, it is also possible to determine whether each droplet is located in the abnormal image area based on the droplet center position and droplet radius. The droplet is considered to be located in the abnormal image area only when the entire circular area with the droplet center position as the center and the droplet radius as the radius is located in the abnormal image area.
[0081] S204: For each droplet located in the abnormal image region, a local image including the droplet is acquired from the droplet image.
[0082] If a droplet falls into the abnormal image area, it is regarded as a suspected abnormal droplet, and its droplet information is recorded for subsequent droplet classification and screening. For each droplet located in the abnormal image area, a local image containing the droplet is obtained from the droplet image for droplet classification and screening. For example, a rectangular image area with the center of the droplet as the center and the diameter of the droplet as the side length can be selected as the local image of the droplet.
[0083] In order to improve the accuracy of subsequent droplet classification and screening, the acquired partial image should not only contain the information of the droplet to be identified, but also contain the image information of its neighboring areas, so as to accurately identify abnormal droplets. Therefore, in an optional embodiment, acquiring a partial image containing the droplet from the droplet image may specifically include: acquiring a rectangular image area centered at the center of the droplet and with a side length of 3 times the diameter of the droplet from the droplet image, and using the inscribed circle of the rectangular image area as a shielding mask to shield the rectangular edge area to form a partial image corresponding to the droplet.
[0084] S205 , inputting each local image containing a droplet into a pre-trained droplet classifier to obtain a droplet classification result, where the classification result includes normal droplets and abnormal droplets.
[0085] The droplet classifier in this embodiment can be trained based on droplet image training samples labeled with droplet categories (normal or abnormal). The droplet classifier is mainly used to determine the morphology of droplets and determine whether the droplets are normal droplets or abnormal droplets. The construction and training process is as follows: first, a training data set is prepared, and droplet images of various reagent systems, different imaging qualities and imaging brightness are selected. The droplet categories are manually annotated, mainly normal and abnormal droplets. For each image, according to the annotation information (droplet center position and droplet radius), a rectangular image area of 3 times the droplet diameter is extracted from the image, and the inscribed circle of this rectangular image area is used as a shielding mask to shield irrelevant information on the edge of the rectangle (so that the current image not only contains the information of the droplet to be identified, but also contains its neighboring image information, which is convenient for identifying abnormalities), forming a droplet type training data set; then a droplet classifier is constructed, and the classifier can use a classifier based on manual features or a classifier based on neural networks, for example, a classification model based on convolutional neural networks can be used; finally, the droplet classifier is trained, and the constructed droplet classifier is trained using the prepared droplet type training data set, and finally a trained droplet classifier is obtained.
[0086] By inputting the local image containing each suspected abnormal droplet obtained in step S204 into a pre-trained droplet classifier, it can be determined whether the droplet in the local image is a normal droplet or an abnormal droplet.
[0087] S206, removing abnormal droplets.
[0088] According to the classification result in step S205, normal droplets are retained for subsequent analysis and processing, and abnormal droplets are removed to achieve droplet quality control.
[0089] Furthermore, in order to facilitate subsequent abnormal location and analysis of digital PCR instrument problems, an abnormal droplet classifier can be constructed to identify the abnormal type of the abnormal droplets identified in step S205 and count the number of each abnormal droplet. That is, in an optional embodiment, for abnormal droplets, the abnormal type of the abnormal droplets can be further identified and their number can be counted for subsequent abnormal location and instrument problem analysis.
[0090] The overall process of the digital PCR droplet quality control method provided in this example can be found in Figure 3 , Figure 3 This is a flowchart of a digital PCR droplet quality control method provided by an embodiment of the present invention. Figure 3 As shown in FIG, the generated droplet image is used as the input image and input into the pre-trained abnormal region detection model for detection, and the suspected abnormal region in the input image is obtained, as shown in FIG. Figure 3For the droplet located in the abnormal area, the local image containing the droplet is extracted, that is, Figure 3 The microdroplet image shown in . It can be seen that the microdroplet image is a rectangular image area with the center of the microdroplet as the center and a side length of 3 times the diameter of the microdroplet. The inscribed circle of this rectangular image area is used as a mask to mask the edge area of the rectangle. The extracted microdroplet image is then input into a pre-trained microdroplet classifier to obtain the classification result of the microdroplet (normal or abnormal). Normal microdroplets are retained for subsequent analysis by the user; abnormal microdroplets are removed to complete the microdroplet quality control.
[0091] The quality control effect of the digital PCR droplet quality control method provided in this example can be found in Figure 4 , Figure 4 A schematic diagram of comparison before and after quality control provided by an embodiment of the present invention. Figure 4 The comparison of quality control effects on the droplet imaging area is shown. Figure 4 The left image in the middle is the original droplet image, and the right image is the image after droplet quality control, where red indicates the removed droplets and green indicates the retained normal droplets. As can be seen from the figure, through the above quality control method, some stacked droplets with affected fluorescence intensity are removed, and normal droplets are well retained. This targeted approach can quickly lock suspected abnormal areas and narrow the scope of abnormal droplet screening, while effectively avoiding the phenomenon of erroneous removal of normal droplets by other methods.
[0092] The digital PCR droplet quality control method provided in this embodiment generates a droplet image according to the detected fluorescence signal, and performs droplet recognition on the droplet image to obtain the droplet information of each droplet in the droplet image, and the droplet information includes the center position of the droplet and the radius of the droplet; uses a pre-trained abnormal region detection model to obtain the abnormal image region from the droplet image; determines whether each droplet is located in the abnormal image region according to its droplet information; for each droplet located in the abnormal image region, obtains a local image containing the droplet from the droplet image; inputs each local image containing the droplet into a pre-trained droplet classifier to obtain a droplet classification result, and the classification result includes normal droplets and abnormal droplets; removes abnormal droplets, and realizes droplet quality control. The abnormal image region is quickly locked by abnormal region detection, and only the droplets in the abnormal image region are classified and checked, avoiding one-by-one checking of a large number of droplets in the droplet image, and narrowing the abnormal droplet checking range, which can not only improve the droplet quality control speed, but also effectively avoid the mistaken elimination of normal droplets, and improve the quality control accuracy.
[0093] During the droplet preparation process, droplet reflections may be generated due to the droplet preparation container; when shooting the droplet image of the target sample, other sample droplets may also be photographed. These situations will affect the accuracy of digital PCR detection. The droplet image formed in the non-droplet imaging area may be a reflection of the real droplet, or it may be a mechanical positioning error in the imaging process, and the droplet image formed by shooting the droplets of non-current samples in other preparation containers into the current sample. The droplet images formed in these two situations are very similar to the imaging of real droplets, and the droplets cannot be judged by the droplet morphology. Therefore, it is impossible to perform droplet quality control by identifying the droplet morphology (normal or abnormal). The present application adopts a method of finding a mask for the real droplet imaging area for the processing of the non-droplet imaging area, and the droplets in the non-mask area are eliminated to complete the droplet quality control.
[0094] Based on the above embodiments, the digital PCR droplet quality control method provided in this embodiment may further include:
[0095] S207 , obtaining a droplet region mask corresponding to the droplet image, wherein the droplet region mask uses the first pixel value and the second pixel value to indicate a droplet imaging region and a non-droplet imaging region in the droplet image.
[0096] It is understandable that the droplet region mask can be used to indicate the droplet imaging region in the droplet image. The droplet region mask is the same size as the droplet image, for example, a pixel value of 255 can be used to indicate the droplet imaging region, and a pixel value of 0 can be used to indicate the non-droplet imaging region. The first pixel value and the second pixel value can be selected according to actual conditions, and they can be different. Usually, two pixel values with a larger difference can be selected for distinction.
[0097] In an optional embodiment, obtaining a droplet area mask corresponding to a droplet image may specifically include: creating a droplet position mark map of the same size as the droplet image, wherein the pixel value in the droplet position mark map is a second pixel value; drawing a preset graphic with each droplet center position as the center in the droplet position mark map for marking the droplets, wherein the pixel value of the drawn preset graphic is a first pixel value; creating a droplet scanning result map of the same size as the droplet image, wherein the pixel value in the droplet scanning result map is the first pixel value; scanning preset rows around the droplet position mark map, and counting the pixel values in each row. The number of first pixel values, if the number of first pixel values is less than a preset threshold value, the pixel value of the corresponding row in the droplet scanning result image is set to the second pixel value to obtain a droplet scanning mask; the droplet image is input into a pre-trained well plate edge segmentation model for segmentation to obtain a well plate edge mask corresponding to the droplet image, and the well plate edge mask uses the first pixel value and the second pixel value to indicate the well plate edge area and the non-well plate edge area in the droplet image respectively; the droplet scanning mask is subtracted from the well plate edge mask and the maximum contour area is extracted as the droplet area mask corresponding to the droplet image.
[0098] For example, a blank image with the same size as the input droplet image and all pixel values of 0 can be created, and then a rhombus (the pixel value of the rhombus area is 255) is drawn with the obtained droplet center position as the center, and the distance from the four vertices of the rhombus to the center is the droplet standard radius R, to form a droplet position mark map. It should be noted that in addition to the rhombus, the drawn shape can be other geometric shapes, such as a circle, a rectangle, etc. A blank image with the same size as the input droplet image and all pixel values of 255 is created as the droplet scanning result map. For the droplet position mark map, set the scan cutoff parameter N (N is a natural number greater than 0, for example, N can be set to 10), then scan N rows in the upper and lower directions of the droplet position mark map respectively, and scan N columns in the left and right directions of the droplet position mark map respectively, and count the number of non-zero pixels in each row (column) to obtain the frequency freq_n. If freq_n is less than the set scan frequency threshold freq_th, the pixel value of the corresponding row (column) in the droplet scanning result map is set to 0, and the droplet scanning mask can be obtained after the scanning is completed.
[0099] Before obtaining the orifice plate edge mask, it is necessary to first build and train the orifice plate edge segmentation model. The specific process is as follows: create a training data set, use images of orifice positions with or without droplets of different brightness, manually mark the outer contours of the orifices, and for images where the orifice contours are invisible, mark the main contour range of the droplets; build an orifice plate edge segmentation model, for example, it can be improved based on the convolutional neural network Unet, add BN layers and attention mechanisms, reduce the number of parameters, and form a new binary classification segmentation model as the orifice plate edge segmentation model; train the orifice plate edge segmentation model, use the created training data set to train the constructed orifice plate edge segmentation model, and obtain a trained orifice plate edge segmentation model. Then input the droplet image into the pre-trained orifice plate edge segmentation model for segmentation to obtain the orifice plate edge mask corresponding to the droplet image.
[0100] Finally, the acquired droplet scanning mask is subtracted from the acquired orifice plate edge mask, and the maximum contour area is extracted as the final droplet area mask.
[0101] S208 , traversing each droplet in the droplet image, and judging whether each droplet is located in a non-droplet imaging area according to the droplet information of each droplet.
[0102] The droplets in the droplet image are traversed according to the droplet information of each droplet in the droplet image, and it is determined whether the droplet is located in the droplet imaging area or the non-droplet imaging area according to the droplet center position of each droplet and the droplet imaging area and the non-droplet imaging area indicated by the droplet area mask.
[0103] S209, removing the droplets located in the non-droplet imaging area.
[0104] The mark of the droplet is retrieved in the droplet region mask according to the center position of the droplet. If the mark is the second pixel value (such as the pixel value is 0), it means that the droplet is located in the non-droplet imaging area and is removed.
[0105] The overall process of the digital PCR droplet quality control method provided in this example can be found in Figure 5 , Figure 5 This is a flowchart of a digital PCR droplet quality control method provided by another embodiment of the present invention. Figure 5 As shown, firstly, a droplet scanning mask and a well plate edge mask are generated based on the input droplet image, then a droplet area mask is generated according to the droplet scanning mask and the well plate edge mask, and finally the droplet area mask is used to remove the non-droplet area in the input droplet image.
[0106] In order to illustrate the quality control effect of the method provided in this embodiment, the droplet quality control is implemented for the case of droplet reflection and the case of capturing other samples. Figure 6 and Figure 7 , Figure 6 A schematic diagram of the quality control effect of droplet reflection provided by an embodiment of the present invention, Figure 7 A schematic diagram of quality control effects for other sample situations provided by an embodiment of the present invention. Figure 6 To improve the quality control of droplet reflection, Figure 6 The left image in the middle is the original droplet image, and the right image is the image after droplet quality control, where red indicates the rejected droplets and green indicates the retained normal droplets. Figure 6 It can be seen that the method provided in this embodiment has a good elimination effect on the case of droplet reflection, which will help to improve the precision and accuracy of digital PCR detection. Figure 7 To control the quality of other samples, Figure 7 The left image in the middle is the original droplet image, and the right image is the image after droplet quality control, where red indicates the rejected droplets and green indicates the retained normal droplets. Figure 7 It can be seen that in the case where other samples are photographed, the method provided in this embodiment has a good elimination effect, which will help to improve the precision and accuracy of digital PCR detection.
[0107] The digital PCR droplet quality control method provided in this embodiment, based on the above embodiment, further obtains the droplet area mask corresponding to the droplet image; traverses each droplet in the droplet image, and determines whether it is located in the non-droplet imaging area based on the droplet information of each droplet; eliminates the droplets located in the non-droplet imaging area, and completes the droplet quality control, which well solves the droplet quality control problems in the two situations of droplet reflection and shooting other samples, and helps to improve the precision and accuracy of digital PCR detection.
[0108] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement the technical solution of any of the above method embodiments.
[0109] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0110] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.
Claims
1. A digital PCR instrument, characterized in that: include: Sample carrying module, reaction system preparation module, droplet generation module, PCR amplification module, fluorescence signal detection module and processing module; The sample carrying module is used to accommodate the nucleic acid sample to be tested; The reaction system preparation module is used to prepare the reaction mixture required for the PCR reaction; The droplet generation module is used to mix the nucleic acid sample to be tested contained in the sample holding module and the reaction mixture prepared by the reaction system preparation module according to a preset ratio to form droplets; The PCR amplification module is used to provide a microdroplet reaction temperature so that the PCR reaction is amplified in the microdroplet; The fluorescent signal detection module is used to detect the fluorescent signal generated by the PCR reaction; The processing module is used to generate a droplet image according to the fluorescent signal detected by the fluorescent signal detection module, and perform droplet recognition on the droplet image to obtain droplet information of each droplet in the droplet image; Acquire an abnormal image region from the droplet image using a pre-trained abnormal region detection model; determining, based on the droplet information of each droplet, whether it is located in the abnormal image area; For each droplet located in the abnormal image region, acquiring a local image including the droplet from the droplet image; Inputting each local image containing a droplet into a pre-trained droplet classifier to obtain a droplet classification result, wherein the classification result includes normal droplets and abnormal droplets; Remove abnormal droplets.
2. The digital PCR instrument according to claim 1, characterized in that: The droplet information includes the center position and radius of the droplet, and the processing module is used to obtain a local image containing the droplet from the droplet image, including: A rectangular image area with the center of the droplet as the center and a side length of three times the droplet diameter is obtained from the droplet image, and the inscribed circle of the rectangular image area is used as a shielding mask to shield the rectangular edge area to form a local image corresponding to the droplet.
3. The digital PCR instrument according to claim 1, characterized in that: The processing module is also used for: For abnormal droplets, the abnormal type of the abnormal droplets is identified and the number of the abnormal droplets is counted.
4. The digital PCR instrument according to any one of claims 1 to 3, characterized in that: The processing module is also used for: Acquire a droplet region mask corresponding to the droplet image, wherein the droplet region mask uses a first pixel value and a second pixel value to indicate a droplet imaging region and a non-droplet imaging region in the droplet image; Traversing each droplet in the droplet image, and judging whether each droplet is located in the non-droplet imaging area according to the droplet information of each droplet; Droplets located in the non-droplet imaging area are rejected.
5. The digital PCR instrument according to claim 4, characterized in that: The processing module is used to obtain a droplet region mask corresponding to the droplet image, including: Creating a droplet position mark map of the same size as the droplet image, wherein the pixel value in the droplet position mark map is a second pixel value; In the droplet position marking map, a preset graphic is drawn with the center position of each droplet as the center to mark the droplet, and the pixel value of the drawn preset graphic is a first pixel value; Creating a droplet scanning result image of the same size as the droplet image, wherein the pixel value in the droplet scanning result image is a first pixel value; Scanning preset rows around the droplet position mark map respectively, counting the number of first pixel values in each row, and if the number of first pixel values is less than a preset threshold, setting the pixel value of the corresponding row in the droplet scanning result map to a second pixel value to obtain a droplet scanning mask; Inputting the droplet image into a pre-trained well plate edge segmentation model for segmentation, obtaining a well plate edge mask corresponding to the droplet image, wherein the well plate edge mask uses a first pixel value and a second pixel value to indicate a well plate edge region and a non-well plate edge region in the droplet image; The droplet scanning mask is subtracted from the orifice plate edge mask and the maximum contour area is extracted as the droplet area mask corresponding to the droplet image.
6. A digital PCR droplet quality control method, characterized in that: include: generating a droplet image according to the detected fluorescent signal, and performing droplet recognition on the droplet image to obtain droplet information of each droplet in the droplet image; Acquire an abnormal image region from the droplet image using a pre-trained abnormal region detection model; determining whether each droplet is located in the abnormal image region according to the droplet information of each droplet; For each droplet located in the abnormal image region, acquiring a local image including the droplet from the droplet image; Inputting each local image containing a droplet into a pre-trained droplet classifier to obtain a droplet classification result, wherein the classification result includes normal droplets and abnormal droplets; Remove abnormal droplets.
7. The method according to claim 6, characterized in that The droplet information includes the center position and radius of the droplet, and acquiring a local image including the droplet from the droplet image includes: A rectangular image area with the center of the droplet as the center and a side length of three times the droplet diameter is obtained from the droplet image, and the inscribed circle of the rectangular image area is used as a shielding mask to shield the rectangular edge area to form a local image corresponding to the droplet.
8. The method according to claim 6, characterized in that The method further comprises: For abnormal droplets, the abnormal type of the abnormal droplets is identified and the number of the abnormal droplets is counted.
9. The method according to any one of claims 6 to 8, characterized in that: The method further comprises: Acquire a droplet region mask corresponding to the droplet image, wherein the droplet region mask uses a first pixel value and a second pixel value to indicate a droplet imaging region and a non-droplet imaging region in the droplet image; Traversing each droplet in the droplet image, and judging whether each droplet is located in the non-droplet imaging area according to the droplet information of each droplet; Droplets located in the non-droplet imaging area are rejected.
10. The method according to claim 9, characterized in that The step of obtaining a droplet region mask corresponding to the droplet image includes: Creating a droplet position mark map of the same size as the droplet image, wherein the pixel value in the droplet position mark map is a second pixel value; In the droplet position marking map, a preset graphic is drawn with the center position of each droplet as the center to mark the droplet, and the pixel value of the drawn preset graphic is a first pixel value; Creating a droplet scanning result image of the same size as the droplet image, wherein the pixel value in the droplet scanning result image is a first pixel value; Scanning preset rows around the droplet position mark map respectively, counting the number of first pixel values in each row, and if the number of first pixel values is less than a preset threshold, setting the pixel value of the corresponding row in the droplet scanning result map to a second pixel value to obtain a droplet scanning mask; Inputting the droplet image into a pre-trained well plate edge segmentation model for segmentation, obtaining a well plate edge mask corresponding to the droplet image, wherein the well plate edge mask uses a first pixel value and a second pixel value to indicate a well plate edge region and a non-well plate edge region in the droplet image; The droplet scanning mask is subtracted from the orifice plate edge mask and the maximum contour area is extracted as the droplet area mask corresponding to the droplet image.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by the processor, they are used to implement the digital PCR droplet quality control method as described in any one of claims 6 to 10.