A method and system for contamination-aware adaptive background subtraction for dense fluorescent cluster array-based genetic sequencing
Patent Information
- Application Number
- CN202611200466.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2026-07-13
- Filing Date
- 2026-08-10
- Publication Date
- 2026-09-08
AI Technical Summary
[0007]为了提高高密度基因测序的测序质量,以及更为具体的,为了解决高密度测序场景中的荧光簇信号背景过度扣减的问题,本发明提供了一种用于密集荧光簇阵列基因测序的污染感知自适应背景减扣方法及系统
[0050](1) The gene sequencing signal extraction method of the present invention, through the combination of multiple criteria such as geometry, variance, and azimuth angle and logical control, can accurately identify whether the background candidate pixel set has been contaminated by neighboring clusters. When contamination is detected, unreliable plane fitting is abandoned, and a backoff strategy is used to obtain the background intensity value, which solves the problem of excessive subtraction of gene sequencing fluorescence signal and significantly improves the signal fidelity under dense arrays. In practical applications, it has been verified that, for a certain tile in a certain SBS sequencing, compared with the method of directly obtaining the background intensity value by plane fitting, the gene sequencing signal extraction method of the present invention can recover about 18,700 real clusters that were mistakenly eliminated.
Smart Images

Figure CN122714291A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gene sequencing signal processing, specifically to a method and system for extracting raw signals from dense fluorescent cluster array gene sequencing in next-generation sequencing (NGS / SBS). Background Technology
[0002] Next-generation sequencing (NGS), particularly technologies like Illumina's Sequencing by Synthesis (SBS), is currently the most mainstream gene sequencing method in life science research and clinical diagnostics. Its core process involves randomly fragmenting the DNA fragment to be tested, adding adapters to both ends, fixing it on a solid surface, and then performing bridge PCR amplification to form hundreds of millions of fluorescent DNA clusters. Each cluster contains a large number of identical copies of the DNA template, making it a key structure for amplifying single-molecule signals.
[0003] Gene sequencing is essentially a combination of cycle-driven chemical reactions and microscopic imaging. In each sequencing cycle, the sequencing system introduces fluorescently labeled nucleotides (dNTPs), with different nucleotides carrying different colored fluorescent labels. These nucleotides are incorporated into the nascent DNA strand by DNA polymerase, and due to the design of the reversible terminator, only one base is incorporated per reaction. Subsequently, the flow cell is imaged using a high-resolution fluorescence microscope to capture the emission signal of each DNA cluster at a specific wavelength. After image acquisition, the system removes the fluorescent and terminator groups, preparing for the next sequencing cycle. After dozens to hundreds of cycles, the base sequence of each cluster can be read by extracting the actual fluorescence intensity from the acquired images.
[0004] In the NGS sequencing process, image acquisition involves imaging the luminescence signals of DNA clusters using a microscope. The imaging of these fluorescence signals follows the point spread function (PSF). Intensity extraction involves extracting the true fluorescence intensity from the raw fluorescence image data output from the microscopic imaging stage. This provides the downstream base calling step with the intensity value signal of each cluster as quantitative input, ultimately achieving the assembly and output of the final base sequencing file. Each read corresponds to one original DNA cluster.
[0005] To accurately extract the true fluorescence intensity of each cluster against complex imaging backgrounds, local background subtraction is required for the raw fluorescence signal of each DNA cluster. Existing methods generally employ local plane fitting for local background estimation. Although this method performs well in sparse arrays, as the loading density of DNA clusters continues to increase, the inter-cluster spacing has shrunk to a scale comparable to the spot size of the point spread function. Under the current trend of high-density sequencing, the above methods suffer from the following problems:
[0006] When the nearest neighbor clusters of the target cluster are located in close and specific spatial geometric positions, the PSF tails of the neighbor clusters will inevitably leak into the background candidate loop. Therefore, directly fitting the background of the original fluorescence signal to a plane will produce a strong tilt in the neighbor direction. When this tilted plane is pushed back to the center of the target cluster, it will give an artificially high background estimate, resulting in excessive background subtraction. This excessive subtraction will cause the score of a single cluster cycle to drop to -100 to -300, and after accumulating over multiple cycles, it will be incorrectly rejected as a weak signal by the downstream quality filter, resulting in a decline in sequencing quality. Summary of the Invention
[0007] To improve the sequencing quality of high-density gene sequencing, and more specifically, to address the problem of excessive background subtraction of fluorescent cluster signals in high-density sequencing scenarios, this invention provides a contamination-aware adaptive background subtraction method and system for dense fluorescent cluster array gene sequencing.
[0008] The specific technical solution of this invention is as follows:
[0009] In a first aspect, the present invention provides a method for extracting gene sequencing signals for dense fluorescent cluster arrays, comprising the following steps:
[0010] Step S1: Obtain the raw fluorescence image of gene sequencing, and pre-select an image block composed of multiple pixels in the raw fluorescence image as the image block corresponding to the target cluster, with the preset position of the target cluster in the raw fluorescence image as the center.
[0011] Step S2: Pre-select a background candidate pixel set from the image block corresponding to the target cluster, wherein the pixels in the background candidate pixel set are more than a first threshold away from the preset position of the target cluster, and the pixels in the background candidate pixel set are not less than the first threshold away from the position of any neighboring cluster.
[0012] Step S3: Based on the background candidate pixel set, determine the background intensity value corresponding to each of the multiple pixels in the image block corresponding to the target cluster; wherein, the background intensity value is determined based on whether the background candidate pixel set is contaminated by the fluorescence signal of neighboring clusters;
[0013] Step S4: Based on the background intensity value, obtain the image patch of the target cluster after background intensity correction;
[0014] Step S5: Weighted summation of the intensity values corresponding to multiple pixels in the image block after background intensity correction to obtain the fluorescence signal intensity value of the target cluster.
[0015] Further, in step S3, determining the background intensity value based on whether the background candidate pixel set is contaminated by the fluorescence signal of neighboring clusters includes:
[0016] When the background candidate pixel set is not contaminated by the fluorescence signal of neighboring clusters, the background candidate pixel set is fitted with a plane to construct a background plane model, and the background intensity value is determined based on the background plane model.
[0017] When the background candidate pixel is contaminated by the fluorescence signal of the neighboring cluster, a predefined backoff strategy is adopted to obtain the background intensity value.
[0018] Furthermore, the predefined fallback strategy includes:
[0019] (A) Skip the background estimation step, and set the background intensity value to 0;
[0020] (B) Use the median or lower quantile of the intensity values corresponding to each pixel in the background candidate pixel set as the background intensity value;
[0021] (C) Use pixels that are relatively larger in distance from the target cluster to form a new background candidate pixel set, replace the original background candidate pixel set with the new background candidate pixel set until the new background candidate pixel set is not contaminated by the fluorescence signal of the neighboring cluster, and construct a background plane model based on the background candidate pixel set that is not contaminated by the fluorescence signal of the neighboring cluster, and determine the background intensity value according to the background plane model.
[0022] (D) Use the truncated low quantile of the intensity value corresponding to each pixel in the background candidate pixel set as the background intensity value;
[0023] (E) Use the pre-estimated global background value as the background intensity value.
[0024] Further, the backoff strategy is selected based on a continuous metric of the background candidate pixel set being contaminated by the fluorescence signals of neighboring clusters, including:
[0025] The continuous metric value is calculated according to the following formula:
[0026] ;
[0027] In the formula, d_min represents the straight-line distance from the center of the target cluster to the center of the nearest neighbor cluster; r_ex represents the exclusion radius of the target cluster, which is 1.5px; σ_PSF represents the standard deviation of the point spread function of the fluorescence signal of the target cluster, which is 1.8px.
[0028] The above formula can be linearly expressed as: contamination_score = exp(-((d_min - r_ex)^2) / (2*sigma_PSF^2)).
[0029] in:
[0030] When the continuous metric value is less than 1, fallback strategy C is selected;
[0031] When the continuous metric value is 1~2, select rollback strategy B;
[0032] When the continuous metric value exceeds 2, rollback strategy A is selected.
[0033] Further, in step S3, determining the background intensity value based on whether the background candidate pixel set is contaminated by the fluorescence signal of neighboring clusters includes:
[0034] The background candidate pixel set is determined to be contaminated by the fluorescence signal of the neighboring clusters based on at least one of the following criteria:
[0035] Criterion (a): Calculate the minimum distance d_min between the target cluster and its neighboring clusters. If d_min falls within the interval [r1, r2], the cluster is considered contaminated. Here, r1 is the neighbor exclusion radius, which is 0.5 to 1.5 times the point spread function σ_PSF of the fluorescence signal; r2 is the outer diameter of the background ring, which is 2 to 3 times the point spread function σ_PSF of the fluorescence signal.
[0036] Criterion (b): Calculate the statistical dispersion of the background candidate pixel set. If the statistical dispersion of the background candidate pixel set is greater than a preset threshold, it is judged to be contaminated. Wherein, the statistical dispersion is variance, standard deviation or interquartile range.
[0037] Criterion (c): The average intensity of pixels in different sectors of the annular region on which the background candidate pixel set is based. If the ratio of the maximum value to the minimum value of the average intensity exceeds a preset threshold, it is judged to be contaminated.
[0038] Criterion (d): If the number of pixels in the background candidate pixel set is less than the preset minimum number of pixels, it is judged as polluted.
[0039] Furthermore, in step S5, the weights for the weighted summation of the intensity values corresponding to multiple pixels in the image block after background intensity correction are obtained based on the Gaussian kernel function.
[0040] Further, in step S2, the pixels of the annular region centered on the preset position of the target cluster are selected to form the background candidate pixel set, and the annular region is at least 2px away from the preset position of the target cluster.
[0041] Furthermore, in step S1, before pre-selecting the image blocks corresponding to the target cluster, the following steps are also performed:
[0042] Global background pre-subtraction is performed on the original fluorescence image. The global background pre-subtraction is achieved by estimating the large-scale background using a large-scale Gaussian filter and subtracting the large-scale background. The standard deviation of the Gaussian filter is σ≥10.
[0043] Secondly, the present invention provides a gene sequencing signal extraction system for dense fluorescent cluster arrays, characterized in that it comprises:
[0044] The image acquisition module is used to extract image patches from the original fluorescence image with the target cluster centered at a preset location.
[0045] A background filtering module is used to determine a set of candidate background pixels in the image block;
[0046] The background estimation module determines the background intensity value of each pixel in the image block corresponding to the target cluster based on whether the background candidate pixel set is contaminated by the fluorescence signal of the neighboring cluster.
[0047] The signal extraction module obtains the background intensity corrected image block of the target cluster based on the background intensity value, and performs a weighted summation of the intensity values corresponding to multiple pixels in the background intensity corrected image block to obtain the intensity extraction value of the target cluster.
[0048] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of the above-described gene sequencing signal extraction method.
[0049] Compared with the prior art, the present invention has the following technical effects:
[0050] (1) The gene sequencing signal extraction method of the present invention, through the combination of multiple criteria such as geometry, variance, and azimuth angle and logical control, can accurately identify whether the background candidate pixel set has been contaminated by neighboring clusters. When contamination is detected, unreliable plane fitting is abandoned, and a backoff strategy is used to obtain the background intensity value, which solves the problem of excessive subtraction of gene sequencing fluorescence signal and significantly improves the signal fidelity under dense arrays. In practical applications, it has been verified that, for a certain tile in a certain SBS sequencing, compared with the method of directly obtaining the background intensity value by plane fitting, the gene sequencing signal extraction method of the present invention can recover about 18,700 real clusters that were mistakenly eliminated.
[0051] (2) The gene sequencing signal extraction method of the present invention measures the cleanliness of the background by calculating continuous measurement values. The background candidate pixel set formed in the relatively clean background area is captured by using planar extrapolation to obtain the background intensity value, which can more accurately restore the actual background value of the target DNA cluster center. In addition, the present invention achieves spatial adaptive optimization of obtaining the background intensity value through this method.
[0052] (3) The gene sequencing signal extraction method of the present invention exhibits strong adaptability when facing clusters with different levels of contamination through a hierarchical backoff strategy. For example, when the continuous metric value exceeds 2, background estimation is skipped to ensure that the signal extraction does not produce extreme outliers; when the continuous metric value is 1 to 2, the median or lower quantile of the intensity values corresponding to each pixel in the background candidate pixel set is used as the background intensity value, effectively resisting the interference of residual outliers; when the continuous metric value is less than 1, the background intensity value is obtained by using planar extrapolation to obtain accurate background intensity values without interference. The gene sequencing signal extraction method of the present invention enhances the robustness and generalization ability in complex scenarios. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below:
[0054] Figure 1 A flowchart illustrating a gene sequencing signal extraction method for a dense fluorescent cluster array, provided as an example of an embodiment of the present invention;
[0055] Figure 2 A Python pseudocode diagram illustrating the combined use guidelines provided for the exemplary embodiments of the present invention;
[0056] Figure 3 This is a schematic diagram of a gene sequencing signal extraction system for a dense fluorescent cluster array, provided as an example of an embodiment of the present invention. Detailed Implementation
[0057] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0058] In the following description, several embodiments of this application are provided. Different embodiments can be substituted or combined. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0059] To improve the sequencing quality and accuracy of high-density gene sequencing, and more specifically, to address the problem of excessive background subtraction of fluorescent cluster signals in high-density sequencing scenarios, thereby resolving the sequencing quality degradation caused by excessive background subtraction, this embodiment refers to... Figure 1 This paper provides a method for extracting gene sequencing signals for dense fluorescent cluster arrays.
[0060] Explained, in the inherent workflow of gene sequencing, fluorescence images of multiple DNA clusters in each sequencing cycle are captured using a high-resolution fluorescence microscope. These fluorescence images serve as raw fluorescence images from which signals are extracted. The number of samples sequenced simultaneously in each sequencing cycle represents the number of DNA clusters obtainable from the raw fluorescence images of that cycle. In next-generation sequencing technologies, millions to hundreds of millions of sequences can be sequenced in parallel in a single run. Each raw fluorescence image contains a large number of DNA clusters. Each DNA cluster is then used as a target cluster, and its fluorescence intensity signal is extracted.
[0061] like Figure 1 The method shown is a contamination-aware adaptive background subtraction method for gene sequencing of dense fluorescent cluster arrays, used for gene sequencing signal extraction from dense fluorescent cluster arrays, and includes the following steps:
[0062] Step S1: Obtain the raw fluorescence image of gene sequencing, and pre-select an image block composed of multiple pixels in the raw fluorescence image as the image block corresponding to the target cluster, with the preset position of the target cluster in the raw fluorescence image as the center.
[0063] Illustratively, in order to extract the intensity value of the fluorescence signal of a specific DNA target cluster from the raw fluorescence image obtained from gene sequencing, step S1 first selects the pixel with the strongest fluorescence intensity from the raw fluorescence image as the center position of the target cluster. For example, the position of this pixel is defined as (x0, y0), and this (x0, y0) position is used as the preset position of the target cluster. Next, pixels within a certain range centered on this (x0, y0) position are selected to form an image block, which serves as the image block corresponding to the target cluster. In one embodiment, for example, an image block composed of all pixels within an 11×11 pixel range centered on this (x0, y0) position is selected as the image block corresponding to the target cluster.
[0064] In one embodiment, before pre-selecting the image patch corresponding to the target cluster, a global background pre-subtraction can be performed on the original fluorescence image. This global background pre-subtraction is achieved by estimating the large-scale background using a large-scale Gaussian filter and subtracting the large-scale background. The standard deviation of the Gaussian filter is σ≥10. Explained, the large-scale background refers to the slowly changing background light in the image that does not belong to any specific DNA cluster. The large-scale background in the original fluorescence image is calculated using a large-scale Gaussian filter algorithm (σ≥10), and then subtracted from the large-scale background to complete the global background pre-subtraction step. Subsequently, the image patch corresponding to the pre-selected target cluster is then selected. It is worth noting that the global background pre-subtraction requires defining the standard deviation of the Gaussian filter as σ≥10. Furthermore, the specific execution process of the large-scale Gaussian filter algorithm falls within the scope of existing technology and will not be elaborated here.
[0065] Step S2: Pre-select a background candidate pixel set from the image block corresponding to the target cluster, wherein the pixels in the background candidate pixel set are at a preset position greater than a first threshold from the target cluster, and the pixels in the background candidate pixel set are at a position not less than the first threshold from any neighboring cluster.
[0066] In one embodiment, in step S2, pixels in a circular region centered on a preset position of the target cluster are selected to form the background candidate pixel set. The circular region is at least 2 pixels away from the preset position of the target cluster. For example, taking the position (x0, y0) of the target cluster as defined above as the center, a circular region 2 to 4 pixels away from the center is selected. Among all pixels in this circular region, pixels whose distance from any neighboring cluster is less than a first threshold are removed. All remaining pixels are used as the background candidate pixel set. For example, the first threshold is set to 1.5 pixels. By setting the first threshold, pixels within a 1.5-pixel radius of known neighboring clusters are excluded, thus avoiding neighbor core contamination. It is known that the position of the neighboring cluster, similar to that of the target cluster, is the preset position of the neighboring cluster at the point of strongest brightness.
[0067] Step S3: Based on the background candidate pixel set, determine the background intensity value corresponding to each of the multiple pixels in the image block corresponding to the target cluster; wherein, the background intensity value is determined based on whether the background candidate pixel set is contaminated by the fluorescence signal of the neighboring cluster.
[0068] In one embodiment, step S3, determining the background intensity value based on whether the background candidate pixel set is contaminated by the fluorescence signal of neighboring clusters, includes:
[0069] Step S31: Determine whether the background candidate pixel set is contaminated by the fluorescence signal of the neighboring clusters according to at least one of the following criteria:
[0070] Based on the geometric criterion of nearest neighbor distance, criterion (a): calculate the minimum distance d_min between the target cluster and its neighboring clusters. If d_min falls within the interval [r1, r2], it is judged as contaminated; where r1 is the neighbor exclusion radius, which is 0.5 to 1.5 times the point spread function σ_PSF of the fluorescence signal; and r2 is the outer diameter of the background ring, which is 2 to 3 times the point spread function σ_PSF of the fluorescence signal.
[0071] Based on the statistical criteria of the background candidate pixel set, criterion (b): calculate the statistical dispersion of the background candidate pixel set. If the statistical dispersion of the background candidate pixel set is greater than a preset threshold, it is judged to be contaminated; wherein, the statistical dispersion is variance, standard deviation or interquartile range.
[0072] Based on the asymmetry criterion of the azimuth distribution of the background candidate pixel set, criterion (c): the average intensity of pixels in different sectors of the annular region on which the background candidate pixel set is based is calculated, and whether the pixel set is contaminated is determined according to whether the ratio of the maximum value to the minimum value of the average intensity exceeds a preset threshold; for example, in one embodiment, the preset threshold is 2, and if the ratio of the maximum value to the minimum value of the average intensity exceeds 2.0, the pixel set is determined to be contaminated.
[0073] The coverage criterion based on the effective background pixel count of the background candidate pixel set is as follows: if the number of pixels in the background candidate pixel set is less than the preset minimum pixel count, it is judged to be contaminated; for example, in one embodiment, the preset threshold is 15, and if the number of pixels in the background candidate pixel set is less than 15, it is judged to be contaminated.
[0074] In a specific embodiment of the method for determining whether the background candidate pixel set is contaminated by the fluorescence signal of neighboring clusters, four criteria are used in combination, such as... Figure 2 As shown in the Python pseudocode example, this can improve detection sensitivity.
[0075] In one embodiment, step S3, determining the background intensity value based on whether the background candidate pixel set is contaminated by the fluorescence signal of neighboring clusters, includes:
[0076] Step S32: When the background candidate pixel set is not contaminated by the fluorescence signal of neighboring clusters, perform plane fitting on the background candidate pixel set to construct a background plane model, and determine the background intensity value based on the background plane model.
[0077] Illustratively, a background planar model is fitted to all pixels in the background candidate pixel set:
[0078] ;
[0079] In the formula, Indicates the position as The background light intensity (brightness) of the pixel at that location; A, B, and C are the coordinates of the pixel; A, B, and C are the fitting coefficients of the background candidate pixel set. A, B, and C are calculated by fitting the background candidate pixel set, thereby determining the tilt angle of the background plane and the background light signal intensity of the background plane at each pixel of the image block of the target cluster.
[0080] Step S33: When the background candidate pixel is contaminated by the fluorescence signal of the neighboring cluster, a predefined backoff strategy is adopted to obtain the background intensity value.
[0081] In one embodiment, the predefined fallback strategy includes:
[0082] (A) Skip the local background estimation step, that is, set the background intensity value to 0;
[0083] (B) Use the median or lower quantile of the intensity values corresponding to each pixel in the background candidate pixel set as the background intensity value;
[0084] (C) Use pixels that are relatively larger in distance from the target cluster to form a new background candidate pixel set, replace the original background candidate pixel set with the new background candidate pixel set until the new background candidate pixel set is not contaminated by the fluorescence signal of the neighboring cluster, and obtain the background intensity value based on the background candidate pixel set that is not contaminated by the fluorescence signal of the neighboring cluster.
[0085] (D) Use the truncated low quantile of the intensity value corresponding to each pixel in the background candidate pixel set as the background intensity value;
[0086] (E) Use the pre-estimated global background value as the background intensity value.
[0087] In one embodiment, selecting the backoff strategy based on a continuous metric of the background candidate pixel set being contaminated by the fluorescence signals of neighboring clusters includes:
[0088] The continuous metric value is calculated according to the following formula:
[0089] ;
[0090] In the formula, d_min represents the straight-line distance from the center of the target cluster to the center of the nearest neighbor cluster; r_ex represents the exclusion radius of the target cluster, which is 1.5px; σ_PSF represents the standard deviation of the point spread function of the fluorescence signal of the target cluster, which is 1.8px.
[0091] The above formula can be linearly expressed as: contamination_score = exp(-((d_min - r_ex)^2) / (2*sigma_PSF^2)).
[0092] When the continuous metric value is less than 1, the fallback strategy C is selected.
[0093] Backtracking strategy C is a background plane extrapolation method. It continuously extrapolates to select a clean set of background candidate pixels, thereby constructing a background plane model within this clean set and obtaining the background intensity value. This method can obtain accurate background intensity values without interference. However, this method is only suitable for scenarios with low disorder between DNA clusters, where the intensity is measured using continuous metrics.
[0094] When the continuous metric value is 1 to 2, rollback strategy B is selected.
[0095] Backtracking strategy B calculates the median and lower quantile of the background candidate pixel set as the background intensity value. This method is suitable for scenes with high levels of contamination.
[0096] When the continuous metric value exceeds 2, rollback strategy A is selected.
[0097] Rollback strategy A sets the background intensity value to 0. This method is suitable for scenarios with severe contamination. In such scenarios, directly not deducting the background intensity value (setting the background intensity value to 0) better ensures the quality of the data obtained from signal extraction in gene sequencing, which is beneficial to the accuracy of gene sequencing.
[0098] Step S4: Based on the background intensity value, obtain the image block of the target cluster after background intensity correction.
[0099] Explained, according to step S3, a background intensity value is obtained. Then, in order to obtain the true intensity value of each pixel in the corresponding image block of the target cluster, the background intensity value of each pixel is subtracted to obtain the image block with background intensity correction.
[0100] Step S5: Weighted summation of the intensity values corresponding to multiple pixels in the image block after background intensity correction to obtain the fluorescence signal intensity value of the target cluster.
[0101] In one embodiment, in step S5, the weights for the weighted summation of the intensity values corresponding to multiple pixels in the background intensity-corrected image block are obtained based on the Gaussian kernel function.
[0102] Explained, for the fluorescence imaging of the target cluster acquired by the microscope, the image follows the point spread function (PSF), meaning that the target cluster under the microscope is an image of a bright spot in the center and dark around the edges. The fluorescence signal intensity varies at different pixels within this spot. In step S5, the actual intensity value of the spot is obtained by weighted summation of the intensity values at different pixels, which is the intensity value of the fluorescence signal of the target cluster forming the spot. The weights for the weighted summation are obtained based on the Gaussian kernel function of the spot. The Gaussian kernel function is a two-dimensional weight matrix with a heavier center and lighter edges. The expression for calculating the weights using the Gaussian function is:
[0103]
[0104] In the formula, (i0, j0) is the center position of the target cluster, and (i, j) are the positions of different pixels in the image patch; σ kernel This is a bandwidth parameter used to control the smoothness of the kernel function. In practical applications, W(i,j) can be normalized as needed to make the sum of the weights equal to 1.
[0105] For example, the standard deviation σ of the Gaussian kernel function is set to 0.5 to 1.0 times the σ_PSF of the point spread function of the target cluster fluorescence. For instance, the σ_PSF of the point spread function of the target cluster fluorescence is 1.8px. In practice, the value can be finely adjusted according to the radius.
[0106] To verify the superior performance of the gene sequencing signal extraction method of this invention, a control experiment was conducted on a tile of a certain SBS sequencing dataset using approximately 124,000 PF cluster templates provided by the reference system. The results are shown in Table 1. After forming a background candidate pixel set according to the above method, this invention uses criterion (c) to determine whether the image is contaminated. When contamination is detected, unreliable plane fitting is abandoned, and a predefined backoff strategy is used to obtain the background intensity value, thereby obtaining the image patch after background intensity correction and the fluorescence signal intensity value of the target cluster based on the correction. Comparative Example 1 involves directly performing plane fitting on the background candidate pixel set to obtain the background intensity value without setting a contamination judgment step. Comparative Example 2 disables plane fitting and directly uses a Gaussian kernel function to weighted sum the intensity values of the target cluster image patch. Comparative Example 3 sets the radius of the neighboring cluster from 1.5px to 4px and sets the background intensity value to 0.
[0107] Table 1. Comparison of core indicators of the control experiment and its fluorescence signal extraction results
[0108] The present invention 47,726 67.18 91.49 6,070 About 18.7K real clusters were wrongly reduced Comparative Example 1 47,808 67.23 91.16 5,032 8 million clusters were wrongly reduced Comparative Example 2 51,125 64.44 91.55 2,755 Some real clusters can be recovered, but full_high decreased significantly Comparative Example 3 52,896 29.72 89.06 87 align% decreased significantly
[0109] In Table 1, reads represents the total number of reads aligned to the reference genome; align% represents the proportion of reads that can be uniquely aligned; ident% represents the average consistency of the aligned sequences; and full_high represents the number of high-quality sequences that pass the downstream base calling quality filter.
[0110] Experimental results show that, compared with the method of directly fitting the plane to obtain the background intensity value, the gene sequencing signal extraction method of this invention can recover approximately 18,700 falsely identified clusters. This gene sequencing signal extraction method solves the problem of excessive subtraction of gene sequencing fluorescence signals and significantly improves signal fidelity in dense arrays.
[0111] It should be noted that the "recovery of approximately 18,700 wrongly killed real clusters" mentioned in this paragraph is statistically obtained based on the PF template of the reference system and the REJECTED stratification mechanism, and is used to illustrate the loss of real clusters caused by over-reduction; reads, align%, ident%, and full_high in Table 1 are the core quality indicators of the control experiment, and the two have different statistical calibers.
[0112] In another embodiment, reference is made to Figure 3 A contamination-aware adaptive background deduction system for dense fluorescent cluster array gene sequencing is provided, comprising:
[0113] The image acquisition module is used to extract image patches from the original fluorescence image with the target cluster centered at a preset location.
[0114] A background filtering module is used to determine a set of candidate background pixels in the image block;
[0115] The background estimation module determines the background intensity value of each pixel in the image block corresponding to the target cluster based on whether the background candidate pixel set is contaminated by the fluorescence signal of the neighboring cluster.
[0116] The signal extraction module obtains the background intensity corrected image block of the target cluster based on the background intensity value, and performs a weighted summation of the intensity values corresponding to multiple pixels in the background intensity corrected image block to obtain the intensity extraction value of the target cluster.
[0117] The specific settings of this system are based on the gene sequencing signal extraction method described above. Corresponding modules are configured to implement the steps outlined in that method. The system's performance is described in the aforementioned method.
[0118] In another embodiment, based on the above method, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described gene sequencing signal extraction method.
[0119] In another embodiment, based on the above method, a data processing system is provided, including a processor and a memory, wherein:
[0120] The memory stores computer programs;
[0121] The processor is used to execute the computer program to implement the steps of the gene sequencing signal extraction method described above.
[0122] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0123] In the above embodiments, the description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0124] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0125] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure.
Claims
1. A contamination-sensing adaptive background reduction method for dense fluorescent cluster array gene sequencing, characterized in that: Includes the following steps: Step S1: Obtain the raw fluorescence image of gene sequencing, and pre-select an image block composed of multiple pixels in the raw fluorescence image as the image block corresponding to the target cluster, with the preset position of the target cluster in the raw fluorescence image as the center. Step S2: Pre-select a background candidate pixel set from the image block corresponding to the target cluster, wherein the pixels in the background candidate pixel set are more than a first threshold away from the preset position of the target cluster, and the pixels in the background candidate pixel set are not less than the first threshold away from the position of any neighboring cluster. Step S3: Based on the background candidate pixel set, determine the background intensity value corresponding to each of the multiple pixels in the image block corresponding to the target cluster; wherein, the background intensity value is determined based on whether the background candidate pixel set is contaminated by the fluorescence signal of the neighboring cluster. Step S4: Based on the background intensity value, obtain the image patch of the target cluster after background intensity correction; Step S5: Weighted summation of the intensity values corresponding to multiple pixels in the image block after background intensity correction to obtain the fluorescence signal intensity value of the target cluster.
2. The pollution perception adaptive background reduction method as described in claim 1, characterized in that: In step S3, the background intensity value is determined based on whether the background candidate pixel set is contaminated by the fluorescence signal of neighboring clusters, including: When the background candidate pixel set is not contaminated by the fluorescence signal of neighboring clusters, the background candidate pixel set is fitted with a plane to construct a background plane model, and the background intensity value is determined based on the background plane model. When the background candidate pixel is contaminated by the fluorescence signal of the neighboring cluster, a predefined backoff strategy is adopted to obtain the background intensity value.
3. The pollution perception adaptive background reduction method as described in claim 2, characterized in that: The predefined fallback strategy includes: (A) Skip the background estimation step, and set the background intensity value to 0; (B) Use the median or lower quantile of the intensity values corresponding to each pixel in the background candidate pixel set as the background intensity value; (C) Use pixels that are relatively larger in distance from the target cluster to form a new background candidate pixel set, replace the original background candidate pixel set with the new background candidate pixel set until the new background candidate pixel set is not contaminated by the fluorescence signal of the neighboring cluster, and construct a background plane model based on the background candidate pixel set that is not contaminated by the fluorescence signal of the neighboring cluster, and determine the background intensity value according to the background plane model. (D) Use the truncated low quantile of the intensity value corresponding to each pixel in the background candidate pixel set as the background intensity value; (E) Use the pre-estimated global background value as the background intensity value.
4. The pollution perception adaptive background reduction method as described in claim 3, characterized in that: The backoff strategy is selected based on a continuous metric of the background candidate pixel set being contaminated by the fluorescence signals of neighboring clusters, including: The continuous metric value is calculated according to the following formula: ; In the formula, d_min represents the straight-line distance from the center of the target cluster to the center of the nearest neighbor cluster; r_ex represents the exclusion radius of the target cluster, which is 1.5px; σ_PSF represents the standard deviation of the point spread function of the fluorescence signal of the target cluster, which is 1.8px. When the continuous metric value is less than 1, fallback strategy C is selected; When the continuous metric value is 1~2, select rollback strategy B; When the continuous metric value exceeds 2, rollback strategy A is selected.
5. The pollution perception adaptive background reduction method as described in claim 1, characterized in that: In step S3, determining the background intensity value based on whether the background candidate pixel set is contaminated by the fluorescence signal of neighboring clusters includes: The background candidate pixel set is determined to be contaminated by the fluorescence signal of the neighboring clusters based on at least one of the following criteria: Criterion (a): Calculate the minimum distance d_min between the target cluster and its neighboring clusters. If d_min falls within the interval [r1, r2], the cluster is considered contaminated. Here, r1 is the neighbor exclusion radius, which is 0.5 to 1.5 times the point spread function σ_PSF of the fluorescence signal; r2 is the outer diameter of the background ring, which is 2 to 3 times the point spread function σ_PSF of the fluorescence signal. Criterion (b): Calculate the statistical dispersion of the background candidate pixel set. If the statistical dispersion of the background candidate pixel set is greater than a preset threshold, it is judged to be contaminated. Wherein, the statistical dispersion is variance, standard deviation or interquartile range. Criterion (c): The average intensity of pixels in different sectors of the annular region on which the background candidate pixel set is based. If the ratio of the maximum value to the minimum value of the average intensity exceeds a preset threshold, it is judged to be contaminated. Criterion (d): If the number of pixels in the background candidate pixel set is less than the preset minimum number of pixels, it is judged as polluted.
6. The pollution perception adaptive background reduction method as described in claim 1, characterized in that: In step S5, the weights for the weighted summation of the intensity values corresponding to multiple pixels in the image block after background intensity correction are obtained based on the Gaussian kernel function.
7. The pollution perception adaptive background reduction method as described in claim 1, characterized in that: In step S2, the pixels of the annular region centered on the preset position of the target cluster are selected to form the background candidate pixel set, and the annular region is at least 2px away from the preset position of the target cluster.
8. The pollution perception adaptive background reduction method as described in claim 1, characterized in that: In step S1, before pre-selecting the image patch corresponding to the target cluster, the following steps are also performed: Global background pre-subtraction is performed on the original fluorescence image. The global background pre-subtraction is achieved by estimating the large-scale background using a large-scale Gaussian filter and subtracting the large-scale background. The standard deviation of the Gaussian filter is σ≥10.
9. A contamination-sensing adaptive background deduction system for dense fluorescent cluster array gene sequencing, characterized in that, include: The image acquisition module is used to extract image patches from the original fluorescence image with the target cluster centered at a preset location. A background filtering module is used to determine a set of candidate background pixels in the image block; The background estimation module determines the background intensity value of each pixel in the image block corresponding to the target cluster based on whether the background candidate pixel set is contaminated by the fluorescence signal of the neighboring cluster. The signal extraction module obtains the background intensity corrected image block of the target cluster based on the background intensity value, and performs a weighted summation of the intensity values corresponding to multiple pixels in the background intensity corrected image block to obtain the intensity extraction value of the target cluster.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.