Base recognition method and system, gene sequencer and storage medium
Patent Information
- Application Number
- CN202280097564.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-02-28
AI Technical Summary
Existing base identification methods cannot accurately identify unbalanced base data to be sequenced, resulting in gene sequencing failure.
By acquiring images of the biochip in the red light channel and green light channel, base grouping, preliminary identification, brightness value adjustment and normalization processing are performed to achieve secondary identification of base categories and ensure the identification of missing data of base categories. Accurate identification.
It improves the accuracy of gene sequencing and can accurately identify base categories, especially when some base categories are missing, without affecting subsequent Q-value calculations.
Smart Images

Figure CN119546946A_ABST
Abstract
Description
Base recognition method and system, gene sequencer and storage medium Technical Field
[0001] The present invention relates to the field of gene sequencing, and in particular to a base recognition method and system, a gene sequencer and a storage medium. Background Art
[0002] Gene sequencing refers to the analysis of the base sequence of a specific DNA (deoxyribonucleic acid) fragment, specifically the arrangement of adenine (A), thymine (T), cytosine (C), and guanine (G). In typical sequencing requirements, the data provided is balanced for the four base types A, T, C, and G, meaning that each of these four base types accounts for roughly 25% of the total. However, in some sequencing requirements, the bases in the sequenced data are not balanced, for example, one or more base types are missing.
[0003] Existing base recognition methods usually target base-balanced data and are unable to accurately identify base-unbalanced sequencing data, resulting in gene sequencing failure.
[0004] Summary of the Invention
[0005] The technical problem to be solved by the present invention is to overcome the defect that the existing base recognition method cannot accurately identify the data to be sequenced with base imbalance, and to provide a base recognition method and system, a gene sequencer and a storage medium that can accurately identify the data to be sequenced with missing base categories.
[0006] The first aspect of the present invention provides a base recognition method comprising the following steps:
[0007] Acquire a first image of the biochip in a red light channel and a second image in a green light channel;
[0008] performing base clustering according to the first image and the second image, and preliminarily identifying the base category of each cluster;
[0009] adjusting the brightness values of the first image and the second image according to the base categories of all clusters;
[0010] performing normalization processing on the first image according to the maximum brightness value and the minimum brightness value of the first image, and performing normalization processing on the second image according to the maximum brightness value and the minimum brightness value of the second image;
[0011] The bases are clustered according to the normalized first and second images, and the base category of each cluster is identified again.
[0012] Optionally, the step of grouping bases according to the first image and the second image and preliminarily identifying the base type of each cluster specifically includes:
[0013] Calculating a two-dimensional histogram based on the first image and the second image; wherein coordinate axes of the two-dimensional histogram correspond to brightness values of the first image and the brightness values of the second image respectively;
[0014] Determining independent regions in the two-dimensional histogram to obtain base clustering results; wherein each independent region corresponds to a cluster;
[0015] Determine the radius and angle of each cluster based on the center position of each cluster;
[0016] The base category of each cluster was preliminarily identified based on its radius and angle.
[0017] Optionally, the step of adjusting the brightness values of the first image and the second image according to the base categories of all clusters specifically includes:
[0018] When there are at least two base categories in all clusters, if the first base is missing, the minimum brightness value of the first image and the minimum brightness value of the second image are restricted; wherein the radius of the cluster corresponding to the first base is smaller than a preset value; and / or,
[0019] When there are at least two base categories in all clusters, if the second base is missing, determining the maximum brightness value of the first image based on the maximum brightness value of the second image; wherein the radius of the cluster corresponding to the second base is greater than or equal to the preset value, and the angle of the cluster is less than or equal to the first angle threshold; and / or,
[0020] When there are at least two base categories for all clusters, if the third base is missing, the maximum brightness value of the second image is determined based on the maximum brightness value of the first image; wherein the radius of the cluster corresponding to the third base is greater than or equal to the preset value, and the angle of the cluster is greater than or equal to the second angle threshold.
[0021] Optionally, the step of clustering bases according to the normalized first image and the second image and re-identifying the base category of each cluster specifically includes:
[0022] Determining whether the base categories of all clusters include the first base; wherein the radius of the cluster corresponding to the first base is smaller than a preset value;
[0023] If so, calculating the radius of each point in the two-dimensional histogram, and determining the points with a radius smaller than a preset value as belonging to the cluster corresponding to the first base; identifying the base categories of other clusters;
[0024] If not, directly identify the base types of other groups.
[0025] Optionally, the preset value is determined according to the following steps:
[0026] Calculating a radius histogram according to the radius of each point in the two-dimensional histogram;
[0027] determining local maxima and local minima in the radius histogram;
[0028] Determine the two largest local maxima among all local maxima;
[0029] Find the smallest local minimum between the two largest local maxima;
[0030] The smallest local minimum value is determined as the preset value.
[0031] Optionally, if the base categories of all the initially identified clusters include at least two of the second base, the third base, and the fourth base, the step of identifying the base categories of other clusters specifically includes:
[0032] Calculate the angle of each point belonging to other clusters;
[0033] Calculating an angle histogram based on the angle of each point in the other clusters;
[0034] identifying base categories of other clusters according to the angle histogram;
[0035] Among them, the radius of the cluster corresponding to the second base is greater than or equal to a preset value, and the angle of the cluster is less than or equal to a first angle threshold, the radius of the cluster corresponding to the third base is greater than or equal to the preset value, and the angle of the cluster is greater than or equal to the second angle threshold, and the radius of the cluster corresponding to the fourth base is greater than or equal to the preset value, and the angle of the cluster is greater than the first angle threshold and less than the second angle threshold.
[0036] Optionally, the step of calculating the angle of each point belonging to other clusters specifically includes:
[0037] If the base categories of all clusters include the first base, the angle of each point in other clusters is calculated according to the center position of the cluster corresponding to the first base; wherein the radius of the cluster corresponding to the first base is smaller than a preset value.
[0038] Optionally, the step of identifying the base categories of other clusters according to the angle histogram specifically includes:
[0039] Determining the location of valleys in the angle histogram;
[0040] The base categories of other clusters are identified according to the positional relationship between each point in the angle histogram and the valley value.
[0041] Optionally, after the step of clustering bases according to the normalized first image and the second image and identifying the base category of each cluster again, the step further includes:
[0042] Each cluster is clustered according to the re-identified base category of each cluster to obtain the final base category of each cluster.
[0043] A second aspect of the present invention provides a base recognition system comprising:
[0044] An image acquisition module, configured to acquire a first image of the biochip in a red light channel and a second image in a green light channel;
[0045] a preliminary recognition module, configured to group bases into clusters based on the first image and the second image, and preliminarily identify the base type of each cluster;
[0046] an image processing module, configured to adjust the brightness values of the first image and the second image according to the base categories of all clusters;
[0047] a normalization module, configured to perform normalization processing on the first image according to a maximum brightness value and a minimum brightness value of the first image, and to perform normalization processing on the second image according to a maximum brightness value and a minimum brightness value of the second image;
[0048] The secondary recognition module is used to group the bases into clusters based on the normalized first image and the second image, and to identify the base category of each cluster again.
[0049] The third aspect of the present invention provides a gene sequencer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the base recognition method described in the first aspect when executing the computer program.
[0050] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the base recognition method as described in the first aspect.
[0051] The positive progress effect of the present invention is that: the base category is preliminarily identified based on the first image of the biochip in the red light channel and the second image in the green light channel, the brightness value of the first image and the brightness value of the second image are adjusted according to the base category of all clusters, and the first image is normalized according to the maximum brightness value and the minimum brightness value of the first image, and the second image is normalized according to the maximum brightness value and the minimum brightness value of the second image, and the base category is secondary identified based on the normalized first image and second image.
[0052] For sequencing data with some base classes missing, the base recognition method provided by the present invention can accurately identify base classes, thereby improving the accuracy of gene sequencing. Furthermore, even in the case of some base class missing, normalization can still be performed on the first and second images without affecting the subsequent calculation of the Q value, or quality factor. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] FIG1 is a flow chart of a base recognition method provided in Example 1 of the present invention.
[0054] FIG2 is a detailed flowchart of step S2 provided in Example 1 of the present invention.
[0055] FIG3 is a two-dimensional histogram provided by Example 1 of the present invention.
[0056] FIG4 is a two-dimensional histogram after an etching operation provided by Example 1 of the present invention.
[0057] FIG5 is a schematic diagram of coding provided by Example 1 of the present invention.
[0058] FIG6 is a detailed flowchart of step S5 provided in Example 1 of the present invention.
[0059] FIG7 is a radius histogram provided by Example 1 of the present invention.
[0060] FIG8 is a diagram showing the recognition effect of a first base provided in Example 1 of the present invention.
[0061] FIG9 is a diagram showing the final recognition effect of a base category provided in Example 1 of the present invention.
[0062] FIG10 is a structural block diagram of a base recognition system provided in Example 1 of the present invention.
[0063] FIG11 is a schematic structural diagram of a gene sequencer provided in Example 2 of the present invention. DETAILED DESCRIPTION
[0064] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0065] Example 1
[0066] Figure 1 is a flow chart of a base recognition method provided in this embodiment. The base recognition method can be performed by a base recognition system. The base recognition system can be implemented through software and / or hardware. The base recognition system can be part or all of a gene sequencer.
[0067] The following describes the base recognition method provided by this embodiment using a gene sequencer as the execution subject. As shown in Figure 1, the base recognition method provided by this embodiment may include the following steps S1 to S5:
[0068] Step S1: Acquire a first image of the biochip in a red light channel and a second image in a green light channel.
[0069] In a specific implementation, the gene sequencer has two laser tubes with red and green wavelengths, which are used to emit red excitation light and green excitation light respectively, to excite the four bases A, T, C and G in the DNA molecule. The biochip forms a first image in the red light channel and a second image in the green light channel. In the process of exciting the bases with the excitation light, these four bases can emit light or not by carrying different fluorescent dyes. In a specific example, the T base only appears in the second image, the C base only appears in the first image, the A base appears in both the first and second images, and the G base does not appear in both the first and second images. In another specific example, the C base only appears in the second image, the T base only appears in the first image, the G base appears in both the first and second images, and the A base does not appear in both the first and second images.
[0070] It should be noted that the aforementioned "appearance" and "absence" of an image are relative and can be determined specifically by grayscale value. For example, if the grayscale value of the first image corresponding to a T base is 0, and the grayscale value of the second image corresponding to the T base is 255, it can be determined that the T base appears in the second image but not in the first image. For another example, if the grayscale value of the first image corresponding to the T base is 2, and the grayscale value of the second image corresponding to the T base is 254, it can also be determined that the T base appears in the second image but not in the first image.
[0071] The above-mentioned biochip can also be called a gene chip or a DNA chip.
[0072] Step S2: cluster the bases according to the first image and the second image, and preliminarily identify the base type of each cluster.
[0073] In an optional embodiment, as shown in FIG2 , the above step S2 specifically includes the following steps S21 to S24:
[0074] Step S21 : Calculate a two-dimensional histogram based on the first image and the second image.
[0075] Wherein, the coordinate axes of the two-dimensional histogram correspond to the brightness value of the first image and the brightness value of the second image, respectively. In a specific implementation, the number of horizontal and vertical segments of the two-dimensional histogram can be the square root of the number of DNB points. Wherein, DNB (DNA Nanoballs) are DNA nanoball molecules, and there are regularly arranged sites (such as nanopores) on the biochip. The sites can be arranged in a rectangular shape on the biochip, and one site can be placed or adsorbed with a gene cluster (for example, a DNB or multiple DNA chains of the same sequence). The gene cluster is used as a template in the site, and multiple identical bases are added in each biochemical cycle. The base type of the site can be determined by the images (such as the first image and the second image) generated by different illumination combinations.
[0076] In the two-dimensional histogram shown in FIG3 , the abscissa axis corresponds to the brightness value of the first image, and the ordinate axis corresponds to the brightness value of the second image.
[0077] In a specific implementation, in order to improve the accuracy of the preliminary identification of base categories, the above-mentioned two-dimensional histogram can be denoised. Specifically, the above-mentioned two-dimensional histogram is sorted in order from large to small, and the density value at the P percentile of the total number of DNBs is found, and the positions in the two-dimensional histogram that are less than the density value are set to 0, thereby removing the discrete points in the two-dimensional histogram. Among them, the P percentile can be adjusted according to actual conditions, for example, P70 to P90 can be taken. In a specific example, the total number of DNBs is 100, the P percentile is P70, and the grayscale value at P70 is 10, then the positions less than 10 in the two-dimensional histogram are all set to 0, thereby obtaining a two-dimensional histogram that has been denoised.
[0078] In practice, to further improve the accuracy of preliminary base classification, an erosion operation can be performed on the denoised two-dimensional histogram. Specifically, all non-zero points in the two-dimensional histogram are set to 1 to obtain a mask, or template. The mask is then eroded to obtain the result shown in Figure 4.
[0079] Step S22: Determine independent regions in the two-dimensional histogram to obtain base clustering results, wherein each independent region corresponds to a cluster.
[0080] In a specific implementation, the independent regions can be determined based on the valleys of the two-dimensional histogram. In some examples, the independent regions can also be called clusters.
[0081] Step S23: Determine the radius and angle of each cluster according to the center position of each cluster.
[0082] In a specific implementation, the center of a clique can be determined based on the average of the horizontal coordinates and the average of the vertical coordinates of all points in a clique in a two-dimensional histogram. To improve calculation accuracy, the clique can be calibrated using eight-connectivity before calculating its center. Furthermore, by converting the coordinates of the two-dimensional histogram into polar coordinates, the radius and angle of the clique can be obtained.
[0083] Step S24: Preliminarily identify the base type of each cluster based on the radius and angle of each cluster.
[0084] In a specific implementation, if the radius of a cluster is less than a preset value, the base category of the cluster can be identified as the first base. If the radius of a cluster is greater than or equal to the preset value, and the angle is less than or equal to the first angle threshold, the base category of the cluster can be identified as the second base. If the radius of a cluster is greater than or equal to the preset value, and the angle is greater than or equal to the second angle threshold, the base category of the cluster can be identified as the third base. If the radius of a cluster is greater than or equal to the preset value, and the angle is greater than the first angle threshold and less than the second angle threshold, the base category of the cluster can be identified as the fourth base.
[0085] In other optional embodiments of step S2, the base clustering can also be performed using the DBScan (Density-Based Spatial Clustering of Application with Noise) method, which is a density clustering method based on high-density connected regions.
[0086] In an optional embodiment, the above step S2 further includes: encoding the base category. In a specific example, the first base is a G base, the second base is a C base, the third base is a T base, and the fourth base is an A base. The base category is encoded in binary, as shown in Figure 5, where the A base corresponds to the 0th bit, the C base corresponds to the 1st bit, the G base corresponds to the 3rd bit, and the T base corresponds to the 4th bit. Assuming that the base category preliminarily identified includes A base, C base, and T base, the binary encoding is 1011, and the corresponding flag value is 8+2+1=11. Assuming that the base category preliminarily identified includes C base and T base, the binary encoding is 1010, and the corresponding flag value is 8+2=10. In this embodiment, the base category of all groups preliminarily identified can be determined subsequently by the value of the flag.
[0087] Step S3: adjusting the brightness values of the first image and the second image according to the base categories of all clusters.
[0088] In a specific implementation of step S3, when there are at least two base types in all clusters:
[0089] If the first base is missing, the minimum brightness value of the first image and the minimum brightness value of the second image are restricted. The radius of the cluster corresponding to the first base is smaller than a preset value. Specifically, the minimum brightness value of the first image and the minimum brightness value of the second image can both be set to relatively small values, such as 0.
[0090] If the third base is missing, the maximum brightness value of the second image is determined based on the maximum brightness value of the first image. The radius of the cluster corresponding to the third base is greater than or equal to the preset value, and the angle of the cluster is greater than or equal to a second angle threshold. For example, the maximum brightness value of the first image can be used as the maximum brightness value of the second image.
[0091] If the second base is missing, the maximum brightness value of the first image is determined based on the maximum brightness value of the second image. The radius of the cluster corresponding to the second base is greater than or equal to the preset value, and the angle of the cluster is less than or equal to the first angle threshold. For example, the maximum brightness value of the second image can be used as the maximum brightness value of the first image.
[0092] It should be noted that if the fourth base is missing, no processing is performed on the maximum brightness value and the minimum brightness value of the first image and the maximum brightness value and the minimum brightness value of the second image.
[0093] It should also be noted that, when the base category of all clusters is one, the following steps S4 and S5 do not need to be performed.
[0094] Step S4: normalize the first image according to the maximum brightness value and the minimum brightness value of the first image, and normalize the second image according to the maximum brightness value and the minimum brightness value of the second image.
[0095] In an optional implementation of step S4, the first image is normalized according to the following formula:
[0096] out_data_H P =(in_data_H P -minH) / (maxH-minH)
[0097] Among them, in_data_H P is the brightness value of point P in the first image, minH is the minimum brightness value of the first image, maxH is the maximum brightness value of the first image, out_data_H P is the normalized brightness value of point P in the first image, where point P is any point in the first image.
[0098] The second image is normalized according to the following formula:
[0099] out_data_L Q =(in_data_L Q -minL) / (maxL-minL)
[0100] Among them, in_data_L Q is the brightness value of point Q in the second image, minL is the minimum brightness value of the second image, maxL is the maximum brightness value of the second image, out_data_L Q is the brightness value of point Q in the second image after normalization, where point Q is any point in the second image.
[0101] Step S5: performing base clustering based on the normalized first image and the second image, and identifying the base category of each cluster again.
[0102] In a specific implementation, as shown in FIG6 , step S5 may include the following steps S51 to S53:
[0103] Step S51: Determine whether the base categories of all clusters include the first base, if so, execute step S52, if not, execute step S53. The radius of the cluster corresponding to the first base is smaller than a preset value.
[0104] Step S52: Calculate the radius of each point in the two-dimensional histogram, and determine the points with a radius smaller than a preset value as belonging to the cluster corresponding to the first base.
[0105] In a specific implementation, the radius R of a point M in the two-dimensional histogram can be calculated according to the following formula: M :
[0106]
[0107] Among them, x M is the horizontal coordinate of point M, y M is the vertical coordinate of point M.
[0108] In an optional implementation manner, the preset value is determined according to the following steps S52a to S52e:
[0109] Step S52a: Calculate a radius histogram according to the radius of each point in the two-dimensional histogram.
[0110] In a specific implementation, the radius histogram of some points in the two-dimensional histogram can be calculated. In a specific example, the radius histogram between the P1 quantile and the P99 quantile is calculated. Furthermore, the radius histogram can be subjected to multi-point smoothing to remove burrs in the radius histogram.
[0111] Step S52b: Determine the local maximum and local minimum in the radius histogram.
[0112] In a specific implementation, whether a point is a local maximum can be determined by whether all its adjacent points are smaller than the point. If so, the point is determined to be a local maximum. Similarly, whether a point is a local minimum can be determined by whether all its adjacent points are larger than the point. If so, the point is determined to be a local minimum.
[0113] Step S52c: determine the two largest local maxima among all local maxima.
[0114] In a specific implementation, the interval between the two largest local maxima can be limited to avoid incorrect determination of the preset value due to abnormal distribution of the radius histogram. In a specific example, the interval between the two largest local maxima must be greater than Nth, where Nth can be set according to the number of horizontal and vertical segments N of the radius histogram. For example, if N=128, Nth is set to 128*20%.
[0115] Step S52d: Find the smallest local minimum between the two largest local maximums.
[0116] Step S52e: determine the minimum local minimum value as the preset value.
[0117] FIG7 is used to illustrate a radius histogram. As shown in FIG7 , the horizontal axis represents the angle, the vertical axis represents the radius, the two largest local maxima are peak pos1 and peak pos2, and the smallest local minimum found between peak pos1 and peak pos2 is valley pos3. In this example, valley pos3 is determined to be the preset value. In the two-dimensional histogram shown in FIG8 , points with a radius less than the preset value are determined to belong to the cluster corresponding to the first base. Among them, the cluster corresponding to the circular independent area in FIG8 is the first base.
[0118] Step S53: Identify the base types of other clusters, wherein the other clusters include the cluster corresponding to the second base, the cluster corresponding to the third base, and the cluster corresponding to the fourth base.
[0119] In this embodiment, when the base categories of all the initially identified clusters are at least two and include the first base, the cluster corresponding to the first base is identified first, and then the clusters corresponding to other bases are identified.
[0120] In an optional embodiment, if the base categories of all the initially identified groups include at least two of the second base, the third base, and the fourth base, the above step S53 specifically includes the following steps S53a to S53c:
[0121] Step S53a: Calculate the angle of each point belonging to other clusters.
[0122] In an optional embodiment of step S53a, if the base categories of all clusters include the first base, the angle of each point in the other clusters is calculated based on the center position of the cluster corresponding to the first base. Assuming that the first base is a G base, specifically, the angle θ of the point j in the other clusters is calculated according to the following formula j :
[0123]
[0124] Among them, x j is the horizontal coordinate of point j in the two-dimensional histogram, y j is the ordinate of point j in the two-dimensional histogram, centerGH is the abscissa of the center position of the cluster corresponding to the G base, and centerGL is the ordinate of the center position of the cluster corresponding to the G base. It should be noted that if x j <0, then let θ j =θ j +180.
[0125] In another optional implementation of step S53a, if the base categories of all clusters do not include the first base, the angle is directly calculated based on the horizontal and vertical coordinates of each point in the other clusters in the two-dimensional histogram.
[0126] Step S53b: Calculate an angle histogram according to the angle of each point in the other clusters.
[0127] In a specific implementation, in order to improve the accuracy of base recognition, the angle histogram may be subjected to multi-point smoothing processing to obtain a smoothed angle histogram.
[0128] Step S53c: Identify the base categories of other clusters based on the angle histogram.
[0129] Among them, the radius of the cluster corresponding to the second base is greater than or equal to a preset value, and the angle of the cluster is less than or equal to a first angle threshold, the radius of the cluster corresponding to the third base is greater than or equal to the preset value, and the angle of the cluster is greater than or equal to the second angle threshold, and the radius of the cluster corresponding to the fourth base is greater than or equal to the preset value, and the angle of the cluster is greater than the first angle threshold and less than the second angle threshold.
[0130] In an optional embodiment, the base categories of other clusters are identified based on the valley values in the angle histogram. The above step S53c specifically includes: determining the position of the valley values in the angle histogram, and identifying the base categories of other clusters based on the positional relationship between each point in the angle histogram and the valley values.
[0131] In this embodiment, if the base categories of all clusters preliminarily identified include two of the second base, the third base, and the fourth base, there is one valley value in the above angle histogram; if the base categories of all clusters preliminarily identified include three of the second base, the third base, and the fourth base, there are two valley values in the above angle histogram.
[0132] Figure 9 is used to illustrate the final recognition result of a base category. In the two-dimensional histogram shown in Figure 9, there are three clusters, corresponding to the base categories of G base, C base and T base respectively.
[0133] In another optional embodiment, the base categories of other clusters are identified based on the peak value in the angle histogram. The above step S53c specifically includes: determining the position of the peak value in the angle histogram, and identifying the base categories of other clusters based on the positional relationship between each point in the angle histogram and the peak value.
[0134] In this embodiment, if the base categories of all the clusters preliminarily identified include two of the second base, the third base, and the fourth base, there are 2 peaks in the above angle histogram; if the base categories of all the clusters preliminarily identified include three of the second base, the third base, and the fourth base, there are 3 peaks in the above angle histogram.
[0135] It should be noted that if the base categories of all the initially identified groups include one of the second base, the third base and the fourth base, the above step S53 specifically includes: taking the initially identified base category as the basis, and no secondary identification of the base category is required.
[0136] To further improve the accuracy of base recognition, after step S5, the method may further include: performing cluster analysis on each cluster based on the base category of each cluster that has been re-recognized, so as to obtain the final base category of each cluster. Specifically, a GMM (Gaussian Mixture Model) clustering method may be used to perform cluster analysis on each cluster, so as to obtain the final base category of each cluster.
[0137] This embodiment further provides a base recognition system 60 , as shown in FIG10 , including an image acquisition module 61 , a preliminary recognition module 62 , an image processing module 63 , a normalization module 64 and a secondary recognition module 65 .
[0138] The image acquisition module 61 is used to acquire a first image of the biochip in a red light channel and a second image in a green light channel.
[0139] The preliminary identification module 62 is used to group the bases into clusters according to the first image and the second image, and preliminarily identify the base type of each cluster.
[0140] The image processing module 63 is configured to adjust the brightness values of the first image and the second image according to the base categories of all clusters.
[0141] The normalization module 64 is configured to perform normalization processing on the first image according to the maximum brightness value and the minimum brightness value of the first image, and to perform normalization processing on the second image according to the maximum brightness value and the minimum brightness value of the second image.
[0142] The secondary recognition module 65 is used to group the bases into clusters according to the normalized first image and the second image, and to recognize the base category of each cluster again.
[0143] In an optional embodiment, the preliminary identification module specifically includes:
[0144] a first calculation unit, configured to calculate a two-dimensional histogram based on the first image and the second image; wherein coordinate axes of the two-dimensional histogram correspond to brightness values of the first image and the second image, respectively;
[0145] a first determining unit, configured to determine independent regions in the two-dimensional histogram to obtain base clustering results, wherein each independent region corresponds to a cluster;
[0146] a second determining unit, configured to determine the radius and angle of each cluster according to the center position of each cluster;
[0147] and a first identification unit for preliminarily identifying the base category of each cluster according to the radius and angle of each cluster.
[0148] In an optional embodiment, the above-mentioned image processing module is specifically used to limit the minimum brightness value of the first image and the minimum brightness value of the second image if the first base is missing when there are at least two base categories in all clusters; wherein the radius of the cluster corresponding to the first base is smaller than a preset value.
[0149] In an optional embodiment, the above-mentioned image processing module is specifically used to determine the maximum brightness value of the first image based on the maximum brightness value of the second image when the base categories of all clusters are at least two and if the second base is missing; wherein the radius of the cluster corresponding to the second base is greater than or equal to the preset value, and the angle of the cluster is less than or equal to the first angle threshold.
[0150] In an optional embodiment, the above-mentioned image processing module is specifically used to determine the maximum brightness value of the second image based on the maximum brightness value of the first image when the base categories of all clusters are at least two and if the third base is missing; wherein the radius of the cluster corresponding to the third base is greater than or equal to the preset value, and the angle of the cluster is greater than or equal to the second angle threshold.
[0151] In an optional embodiment, the secondary recognition module specifically includes a judgment unit, a second calculation unit and a second recognition unit.
[0152] The determination unit is configured to determine whether the first base is included in the base categories of all clusters, and to sequentially call the second calculation unit and the second recognition unit if the first base is included, and to directly call the second recognition unit if the first base is included in the base categories of all clusters. The radius of the cluster corresponding to the first base is smaller than a preset value.
[0153] The second calculation unit is configured to calculate the radius of each point in the two-dimensional histogram, and determine a point whose radius is smaller than a preset value as belonging to the cluster corresponding to the first base.
[0154] The second recognition unit is used to identify the base types of other groups.
[0155] In an optional embodiment, the above-mentioned base recognition system also includes a preset value determination module, which is used to calculate a radius histogram based on the radius of each point in the two-dimensional histogram; determine the local maximum and local minimum in the radius histogram; determine the two largest local maxima among all local maxima; find the smallest local minimum between the two largest local maxima; and determine the smallest local minimum as the preset value.
[0156] In an optional embodiment, if the base categories of all clusters initially identified include at least two of the second base, the third base, and the fourth base, the above-mentioned second identification unit is specifically used to calculate the angle of each point belonging to other clusters; calculate the angle histogram based on the angle of each point in the other clusters; and identify the base categories of other clusters based on the angle histogram. Wherein, the radius of the cluster corresponding to the second base is greater than or equal to the preset value, and the angle of the cluster is less than or equal to the first angle threshold, the radius of the cluster corresponding to the third base is greater than or equal to the preset value, and the angle of the cluster is greater than or equal to the second angle threshold, the radius of the cluster corresponding to the fourth base is greater than or equal to the preset value, and the angle of the cluster is greater than the first angle threshold and less than the second angle threshold.
[0157] It should be noted that the base recognition system in this embodiment can be a separate chip, chip module or gene sequencer, or a chip or chip module integrated into a gene sequencer.
[0158] The modules / units included in the base recognition system described in this embodiment may be software modules / units or hardware modules / units, or may be partially software modules / units and partially hardware modules / units.
[0159] Example 2
[0160] FIG11 is a schematic diagram of the structure of a gene sequencer provided in this embodiment. The gene sequencer includes at least one processor and a memory in communication with the at least one processor. The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the base recognition method of Example 1. The gene sequencer 3 shown in FIG11 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present invention.
[0161] The components of the gene sequencer 3 may include, but are not limited to: the at least one processor 4 mentioned above, the at least one memory 5 mentioned above, and a bus 6 connecting different system components (including the memory 5 and the processor 4).
[0162] The bus 6 includes a data bus, an address bus, and a control bus.
[0163] The memory 5 may include a volatile memory, such as a random access memory (RAM) 51 and / or a cache memory 52 , and may further include a read-only memory (ROM) 53 .
[0164] The memory 5 may also include a program / utility 55 having a set (at least one) of program modules 54, such program modules 54 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0165] The processor 4 executes various functional applications and data processing, such as the above-mentioned base calling method, by running the computer program stored in the memory 5 .
[0166] The gene sequencer 3 can also communicate with one or more external devices 7 (such as a keyboard, pointing device, etc.). Such communication can be carried out through an input / output (I / O) interface 8. In addition, the gene sequencer 3 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 9. As shown in Figure 11, the network adapter 9 communicates with other modules of the gene sequencer 3 through the bus 6. It should be understood that although not shown in Figure 11, other hardware and / or software modules can be used in conjunction with the gene sequencer 3, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0167] It should be noted that although the detailed description above mentions several units / modules or subunits / modules of the gene sequencer, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more units / modules described above can be embodied in a single unit / module. Conversely, the features and functions of a single unit / module described above can be further divided and embodied by multiple units / modules.
[0168] Example 3
[0169] This embodiment provides a computer-readable storage medium storing a computer program, which implements the base calling method of embodiment 1 when executed by a processor.
[0170] The readable storage medium may include, but is not limited to, a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0171] In a possible implementation, the present invention may also be implemented in the form of a program product, which includes program code. When the program product is run on a gene sequencer, the program code is used to enable the gene sequencer to execute the base recognition method of Example 1.
[0172] The program code for executing the present invention can be written in any combination of one or more programming languages, and the program code can be executed completely on the gene sequencer, partially on the gene sequencer, as an independent software package, partially on the gene sequencer and partially on a remote device, or completely on the remote device.
[0173] Although specific embodiments of the present invention have been described above, those skilled in the art will appreciate that these are merely illustrative and that the scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, and such changes and modifications are intended to fall within the scope of the present invention.
Claims
1. A base recognition method, characterized in that: The following steps are involved: Acquire a first image of the biochip in a red light channel and a second image in a green light channel; performing base clustering according to the first image and the second image, and preliminarily identifying the base category of each cluster; adjusting the brightness values of the first image and the second image according to the base categories of all clusters; performing normalization processing on the first image according to the maximum brightness value and the minimum brightness value of the first image, and performing normalization processing on the second image according to the maximum brightness value and the minimum brightness value of the second image; The bases are clustered according to the normalized first and second images, and the base category of each cluster is identified again.
2. The base recognition method according to claim 1, wherein The step of grouping bases according to the first image and the second image and preliminarily identifying the base type of each group specifically includes: Calculating a two-dimensional histogram based on the first image and the second image; wherein coordinate axes of the two-dimensional histogram correspond to brightness values of the first image and the brightness values of the second image respectively; Determining independent regions in the two-dimensional histogram to obtain base clustering results; wherein each independent region corresponds to a cluster; Determine the radius and angle of each cluster based on the center position of each cluster; The base category of each cluster was preliminarily identified based on its radius and angle.
3. The base recognition method according to claim 2, wherein The step of adjusting the brightness values of the first image and the second image according to the base categories of all clusters specifically includes: When there are at least two base categories in all clusters, if the first base is missing, the minimum brightness value of the first image and the minimum brightness value of the second image are restricted; wherein the radius of the cluster corresponding to the first base is smaller than a preset value; and / or, When there are at least two base categories in all clusters, if the second base is missing, determining the maximum brightness value of the first image based on the maximum brightness value of the second image; wherein the radius of the cluster corresponding to the second base is greater than or equal to the preset value, and the angle of the cluster is less than or equal to the first angle threshold; and / or, When there are at least two base categories for all clusters, if the third base is missing, the maximum brightness value of the second image is determined based on the maximum brightness value of the first image; wherein the radius of the cluster corresponding to the third base is greater than or equal to the preset value, and the angle of the cluster is greater than or equal to the second angle threshold.
4. The base recognition method according to claim 2, wherein The step of clustering bases according to the normalized first image and the second image and identifying the base category of each cluster again specifically includes: Determining whether the base categories of all clusters include the first base; wherein the radius of the cluster corresponding to the first base is smaller than a preset value; If so, calculating the radius of each point in the two-dimensional histogram, and determining the points with a radius smaller than a preset value as belonging to the cluster corresponding to the first base; identifying the base categories of other clusters; If not, directly identify the base types of other groups.
5. The base recognition method according to claim 3 or 4, wherein The preset value is determined according to the following steps: Calculating a radius histogram according to the radius of each point in the two-dimensional histogram; determining local maxima and local minima in the radius histogram; Determine the two largest local maxima among all local maxima; Find the smallest local minimum between the two largest local maxima; The smallest local minimum value is determined as the preset value.
6. The base recognition method according to claim 4, wherein If the base categories of all the initially identified groups include at least two of the second base, the third base, and the fourth base, the step of identifying the base categories of other groups specifically includes: Calculate the angle of each point belonging to other clusters; Calculating an angle histogram based on the angle of each point in the other clusters; identifying base categories of other clusters according to the angle histogram; Among them, the radius of the cluster corresponding to the second base is greater than or equal to a preset value, and the angle of the cluster is less than or equal to a first angle threshold, the radius of the cluster corresponding to the third base is greater than or equal to the preset value, and the angle of the cluster is greater than or equal to the second angle threshold, and the radius of the cluster corresponding to the fourth base is greater than or equal to the preset value, and the angle of the cluster is greater than the first angle threshold and less than the second angle threshold.
7. The base recognition method according to claim 6, wherein The step of calculating the angle of each point belonging to other clusters specifically includes: If the base categories of all clusters include the first base, the angle of each point in other clusters is calculated according to the center position of the cluster corresponding to the first base; The radius of the cluster corresponding to the first base is smaller than a preset value.
8. The base recognition method according to claim 6, wherein The step of identifying the base categories of other groups according to the angle histogram specifically includes: Determining the location of valleys in the angle histogram; The base categories of other clusters are identified according to the positional relationship between each point in the angle histogram and the valley value.
9. The base recognition method according to claim 1, wherein After the step of clustering bases according to the normalized first image and the second image and identifying the base category of each cluster again, the method further includes: Each cluster is clustered according to the re-identified base category of each cluster to obtain the final base category of each cluster.
10. A base recognition system, characterized in that: include: An image acquisition module, configured to acquire a first image of the biochip in a red light channel and a second image in a green light channel; a preliminary recognition module, configured to group bases into clusters based on the first image and the second image, and preliminarily identify the base type of each cluster; an image processing module, configured to adjust the brightness values of the first image and the second image according to the base categories of all clusters; a normalization module, configured to perform normalization processing on the first image according to a maximum brightness value and a minimum brightness value of the first image, and to perform normalization processing on the second image according to a maximum brightness value and a minimum brightness value of the second image; The secondary recognition module is used to group the bases into clusters based on the normalized first image and the second image, and to identify the base category of each cluster again.
11. A gene sequencer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the base recognition method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the base recognition method according to any one of claims 1 to 9 is implemented.