Bacterial colony heterogeneous data separation method, apparatus and device, and storage medium

By combining outlier detection, pruning optimization, and spectral clustering methods, this approach solves the problem that traditional microbial detection methods cannot resolve single-cell differences, achieving efficient and accurate microbial heterogeneity analysis, and is suitable for high-resolution detection of live cells.

CN120833856APending Publication Date: 2025-10-24SUQIAN COLLEGE
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510908075.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Traditional microbial detection methods cannot resolve differences at the single-cell or subpopulation level, resulting in the loss of important biological information. Raman spectroscopy has a low signal-to-noise ratio and inaccurate analysis results in large-scale data acquisition, making it difficult to effectively distinguish between microbial heterogeneity and noise signals.

Method used

Combining outlier detection, pruning optimization, spectral clustering, and quantification, outliers are identified through hierarchical clustering and denoised. The silhouette coefficient and CH index are used to evaluate the spectral clustering results, and kernel functions such as the Gaussian kernel function are used for spectral clustering to determine the optimal number of clusters.

Benefits of technology

It achieves efficient and accurate microbial heterogeneity analysis, removes noise interference, ensures the stability and reliability of clustering results, and is suitable for various microbial heterogeneity detection scenarios, including live cell analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120833856A_ABST
    Figure CN120833856A_ABST
Patent Text Reader

Abstract

The invention provides a bacterial colony heterogeneous data separation method and device, equipment and a storage medium. Relates to the technical field of microbial colony heterogeneous data separation. The method comprises the following steps: performing hierarchical clustering on microbe single-cell Raman spectrum data to identify outliers; based on the outliers, performing de-noising processing on the single-cell Raman spectrum data of the microorganisms to obtain de-noised data; performing spectral clustering based on the de-noised data to obtain a spectral clustering result; wherein the spectral clustering result is used for identifying or marking bacterial colony cells in different growth periods; and evaluating the spectral clustering result by using a contour coefficient and a CH index to determine an optimal clustering number, and performing spectral clustering on the de-noised data based on optimal clustering data to obtain a final clustering result. According to the method, outlier detection, pruning optimization, spectral clustering and quantitative evaluation are combined, so that the precision and stability of microbe heterogeneity analysis are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of microbial colony heterogeneity data separation, and particularly relates to a colony heterogeneity data separation method, device, equipment and storage medium. BACKGROUND

[0002] Microbial colony heterogeneity detection is an important content in modern microbiology research, and has important significance in revealing microbial growth dynamics, metabolic activity and colony internal structure. The heterogeneity of the colony is manifested as the difference in gene expression, metabolic activity or phenotypic characteristics, which directly affects the key fields such as pathogenic bacteria drug resistance, industrial fermentation efficiency and environmental microbial function. However, the traditional microbial detection method (such as plate counting, PCR amplification) can only provide population average data, and cannot analyze the differences at the single cell or subpopulation level, resulting in the loss of important biological information. For example, in the detection of clinically resistant bacteria, ignoring a small number of resistant subpopulations may delay treatment; in synthetic biology, unrecognised metabolically heterogeneous cells will reduce the efficiency of product synthesis. Therefore, developing high-resolution, non-destructive microbial heterogeneity detection technology has great scientific and industrial value.

[0003] Molecular biology techniques, such as fluorescent labeling and genome sequencing, can be used to study microbial heterogeneity at the single cell level. However, these methods are costly, time-consuming, and require complex sample pretreatment. Raman spectroscopy technology has become an ideal tool for microbial heterogeneity research due to its non-labeling, non-destructive detection and strong chemical specificity.

[0004] Although Raman spectroscopy technology provides a new way for microbial heterogeneity detection, it still faces challenges in practical application. For example, Raman spectroscopy signals are easily disturbed by noise, especially in large-scale data collection, which often results in inaccurate data analysis results due to the complexity of the spectrum and low signal-to-noise ratio. In addition, traditional Raman spectroscopy data analysis methods rely heavily on human experience, making it difficult to effectively distinguish subtle differences between microbial heterogeneity and noise signals. SUMMARY

[0005] The present application provides a colony heterogeneity data separation method, device, equipment and storage medium, which is used for efficiently and accurately analyzing the heterogeneity data of microbial colonies, especially suitable for Raman spectroscopy data. By combining outlier detection, pruning optimization, spectral clustering and quantitative evaluation, the accuracy and stability of microbial heterogeneity analysis are significantly improved.

[0006] In a first aspect, the present application provides a colony heterogeneity data separation method, comprising:

[0007] obtaining microbial single cell Raman spectroscopy data, performing hierarchical clustering on the microbial single cell Raman spectroscopy data, and identifying outliers;

[0008] Based on the outlier, the single cell Raman spectrum data of the microorganism is denoised to obtain denoised data;

[0009] Based on the denoised data, spectral clustering is performed to obtain a spectral clustering result; wherein the spectral clustering result is used to identify or mark the colony cells of different growth periods;

[0010] The spectral clustering result is evaluated by using the contour coefficient and CH index to determine the optimal clustering number, and the denoised data is subjected to spectral clustering based on the optimal clustering data to obtain a final clustering result.

[0011] In a possible design, the single cell Raman spectrum data of the microorganism is subjected to hierarchical clustering to identify outliers, including:

[0012] Each data point in the single cell Raman spectrum data of the microorganism is regarded as an independent clustering cluster, and a distance matrix is constructed to record the spatial distance between all data points, the microorganism being a clinical pathogenic bacterium, an industrial fermentation bacterium or an environmental microorganism, and the distance calculation method of the distance matrix being Euclidean distance, Manhattan distance or cosine similarity;

[0013] Single-linkage technology is used as the linkage criterion of hierarchical clustering to calculate the single-linkage distance between all pairs of clustering clusters in the single cell Raman spectrum data of the microorganism to update the distance matrix, the single-linkage technology constructing a cluster by calculating the minimum distance between clustering clusters; the calculation formula of the single-linkage distance between the pair of clustering clusters is:

[0014]

[0015] In the formula, d single (C1,C2) is the single-linkage distance between the pair of clustering clusters, min is the minimum value function, C1 and C2 are two microbial colony sets respectively, and S1 and S2 are the Raman spectra of two single cells;

[0016] A single data point is taken as an initial clustering cluster, the two clustering clusters closest in distance are gradually merged, and the distance matrix is updated until all data points are merged into one clustering cluster, and a hierarchical clustering tree is constructed;

[0017] By analyzing the structure of the hierarchical clustering tree, outliers are identified, the outliers being data points merged at a low level or data points forming independent long branches at the bottom of the hierarchical clustering tree.

[0018] In a possible design, based on the outliers, the single cell Raman spectrum data of the microorganism is denoised to obtain denoised data, including:

[0019] The connectivity of outliers is analyzed based on the minimum spanning tree constructed by hierarchical cluster analysis. When the distance between an outlier and the nearest cluster exceeds 70% of the average nearest neighbor distance of samples in the cluster, it is marked as a potential outlier.

[0020] Calculate the signal-to-noise ratio of the characteristic spectrum of potential outliers;

[0021] When the characteristic spectrum signal-to-noise ratio of the potential outlier point is lower than 40% of the characteristic spectrum signal-to-noise ratio of the data points in other clusters, the potential outlier point is determined to be a noise point and removed from the microbial single-cell Raman spectrum data, and the fuzzy C-means algorithm is used to optimize the membership of the remaining data points to obtain denoised data.

[0022] In one possible design, the characteristic spectrum signal-to-noise ratio of a potential outlier is calculated using the following formula:

[0023]

[0024] Where CS_SNR is the characteristic spectrum signal-to-noise ratio, max is the maximum function, min is the minimum function, S x1 、S x2 The spectral intensity values ​​of the starting and ending spectral points of the characteristic spectral segment, S x3 、S x4 x1 and x2 are the starting and ending spectral points, respectively, and x3 and x4 are the starting and ending spectral points, respectively.

[0025] In one possible design, the characteristic spectral band is generally 400 cm -1 -2000cm -1 ; Select 1800cm for the silent zone range -1 -2000cm -1 .

[0026] In one possible design, performing spectral clustering based on the denoised data to obtain a spectral clustering result includes:

[0027] A similarity matrix is ​​constructed, and a spectral clustering kernel function is used to calculate the similarity between data points in the denoised data; the spectral clustering kernel function is selected from a Gaussian kernel function, a polynomial kernel function, a linear kernel function or a sigmoid kernel function; when the spectral clustering kernel function selects a Gaussian kernel function, the calculation formula of the Gaussian kernel function is:

[0028]

[0029] Where, ||S1-S2|| 2 is the square of the Euclidean distance between two single-cell Raman spectra S1 and S2, σ is the bandwidth parameter of the kernel function, KRBF (S1,S2) is a Gaussian kernel function, exp is an experience function;

[0030] generating a Laplacian matrix of a graph based on the similarity matrix;

[0031] performing eigenvalue decomposition on the Laplacian matrix, extracting the first k eigenvectors to construct a low-dimensional feature space;

[0032] In the low-dimensional feature space, the denoised data is clustered by using a clustering algorithm, and microbial colony cells in different growth periods are labeled to obtain a spectral clustering result.

[0033] In one possible design, the spectral clustering result is evaluated by using a silhouette coefficient and a CH index to determine an optimal clustering number, including:

[0034] determining a comprehensive evaluation value according to the silhouette coefficient and the CH index;

[0035] According to the clustering number of the current spectral clustering result, the clustering number is gradually increased or decreased, and the spectral clustering result after adjusting the clustering number each time is evaluated according to the comprehensive evaluation value, and when the comprehensive evaluation value reaches a local maximum value, the clustering number corresponding to the current comprehensive evaluation value is taken as the optimal clustering number.

[0036] In one possible design, determining a comprehensive evaluation value according to the silhouette coefficient and the CH index includes:

[0037] The silhouette coefficient is calculated by the following formula:

[0038]

[0039] In the formula, S(i) is the silhouette coefficient of data point i, A(i) is the average distance from data point i to other points in the same cluster, and B(i) is the average distance from data point i to the nearest cluster center. The closer S(i) is to 1, the better the clustering effect of data point i is. When S(i) is closer to 0, it indicates that data point i is closer to the cluster boundary. When S(i) is negative, it indicates that data point i may be misclassified;

[0040] The CH index is calculated by the following formula:

[0041]

[0042] In the formula, CH is the CH index, VB is the inter-cluster variance, VW is the intra-cluster variance, k is the number of clustering clusters, and N is the total number of data points.

[0043] Based on the silhouette coefficient and the CH index, a comprehensive evaluation value Q is calculated by the following formula:

[0044] Q=w1·S+w2·CH (6)

[0045] In the formula, w1 and w2 are the weights of the silhouette coefficient and the CH index respectively, and S is the average silhouette coefficient value.

[0046] In a second aspect, the present application provides a colony heterogeneity data separation device, the device comprising:

[0047] An outlier identification module configured to obtain microbial single-cell Raman spectrum data, perform hierarchical clustering on the microbial single-cell Raman spectrum data, and identify outliers.

[0048] A data denoising module configured to perform denoising processing on the microbial single-cell Raman spectrum data based on the outliers to obtain denoised data.

[0049] A spectral clustering module configured to perform spectral clustering based on the denoised data to obtain a spectral clustering result; wherein the spectral clustering result is used to identify or label colony cells in different growth periods.

[0050] A cluster evaluation module configured to evaluate the spectral clustering result using a silhouette coefficient and a CH index to determine an optimal cluster number, perform spectral clustering on the denoised data based on the optimal cluster data to obtain a final clustering result.

[0051] In a third aspect, the embodiments of the present application provide an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the colony heterogeneity data separation method as described in the above first aspect and various possible designs of the first aspect.

[0052] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, the computer readable storage medium stores computer execution instructions, when the processor executes the computer execution instructions, the colony heterogeneity data separation method as described in the above first aspect and various possible designs of the first aspect is implemented.

[0053] In a fifth aspect, the embodiments of the present application provide a computer program product, comprising a computer program, when the computer program is executed by a processor, the colony heterogeneity data separation method as described in the above first aspect and various possible designs of the first aspect is implemented.

[0054] The colony heterogeneity data separation method, device, equipment and storage medium provided by the present application have at least the following beneficial effects:

[0055] (1) Efficient denoising: using single-chain technology and signal-to-noise ratio analysis, effectively removing noise interference in SCRS data, separating microbial heterogeneity data.

[0056] (2) Precise separation: Through spectral clustering technology, high-resolution classification of different growth stages of colony cells is achieved.

[0057] (3) Quantitative evaluation: Introducing profile coefficient and CH index ensures the stability and reliability of clustering results.

[0058] (4) Wide applicability: Dynamic pruning strategy reduces noise interference and improves clustering stability. Unsupervised modeling of SCRS data can be directly performed without prior labels, and is suitable for various microbial heterogeneity detection scenarios.

[0059] (5) Non-destructive: Based on Raman spectroscopy, no labeling or sample destruction is required, and it is suitable for live cell analysis.

[0060] The present application provides strong technical support for microbial heterogeneity research, and has wide application prospects in the fields of clinical pathogenic bacteria detection, industrial fermentation optimization, and environmental microbial function analysis. BRIEF DESCRIPTION OF DRAWINGS

[0061] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0062] Figure 1 A simple flowchart of a colony heterogeneity data separation method provided for the embodiments of the present application;

[0063] Figure 2 A specific flowchart of a colony heterogeneity data separation method provided for the embodiments of the present application;

[0064] Figure 3 An outlier detection diagram based on hierarchical clustering single-chain technology provided for the embodiments of the present application;

[0065] Figure 4 A feature spectrum signal-to-noise ratio analysis diagram of SCRS data provided for the embodiments of the present application; wherein (a) is a SCRS data stacking diagram; (b) is a feature spectrum signal-to-noise ratio box plot;

[0066] Figure 5The spectral clustering effect analysis diagram of different kernel functions in spectral clustering provided by the embodiment of the present application on SCRS data; wherein, (a), the clustering result of the linear kernel function space clustering; (b), the clustering result of the Gaussian kernel function space clustering; (c), the clustering result of the polynomial kernel function space clustering; (d), the clustering result of the Sigmoid kernel function function space clustering; (e), the clustering result of the linear kernel function nonlinear distribution; (f), the clustering result of the Gaussian kernel function nonlinear distribution; (g), the clustering result of the polynomial kernel function nonlinear distribution; (h), the clustering result of the Sigmoid kernel function function nonlinear distribution;

[0067] Figure 6 The colony heterogeneous data clustering result analysis and quantitative evaluation schematic diagram based on HNFS clustering provided by the embodiment of the present application; wherein, (a), the colony SCRS distribution; (b), the data statistics of three cell growth periods; (c), the clustering analysis and quantitative evaluation of SCRS;

[0068] Figure 7 The structural diagram of the colony heterogeneous data separation device provided by the embodiment of the present application.

[0069] Through the above-mentioned drawings, the specific embodiments of the present application have been shown, and more detailed descriptions will be given hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application by any means, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0070] The exemplary embodiments will be described in detail herein with reference to the accompanying drawings. In the following description, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application, as detailed in the appended claims.

[0071] In the technical solution of the present application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data comply with relevant laws and regulations and do not violate public order and good customs.

[0072] It should be noted that in the embodiments of the present application, some existing industry solutions, components, models, etc. may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0073] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described again in some examples. The embodiments of the present application will be described below with reference to the drawings.

[0074] The embodiments of the present application provide a colony heterogeneous data separation method, as shown in the following figure. Figure 1 The embodiments of the present application provide a simple flowchart of the colony heterogeneous data separation method. The colony heterogeneous data separation method can be configured in an electronic module (such as a processor) for implementation. In implementation, the input single cell Raman spectrum (SCRS) data of microorganisms is initialized, a distance matrix is calculated, and a hierarchical structure is constructed. All data points are traversed. If the traversal is completed, a tree diagram is generated and outlier points are output. If the traversal is not completed, pruning judgment is entered. In pruning judgment, if it is determined to be an outlier noise, the heterogeneous data processing flow is entered. If it is determined to be an intra-cluster point, a similarity matrix is constructed for the intra-cluster point. The Laplacian matrix is calculated based on the similarity matrix. Eigenvalue decomposition is performed on the Laplacian matrix. Clustering is performed using the eigenvector. Finally, heterogeneous data statistics are carried out to complete the analysis.

[0075] Specifically, as shown in the following figure, the colony heterogeneous data separation method provided by the embodiments of the present application is a specific flowchart of the colony heterogeneous data separation method. The colony heterogeneous data separation method includes the following steps S100-S500. Figure 2

[0076] S100: Obtain single cell Raman spectrum data of microorganisms, and perform hierarchical clustering on the single cell Raman spectrum data of microorganisms to identify outlier points.

[0077] Step S100 detects outliers of the input Raman spectrum data by using the single chain technology of hierarchical clustering (Hierarchical, abbreviated as HCA), effectively removes noise data, and improves the accuracy of subsequent clustering analysis.

[0078] In some embodiments, in order to obtain high-quality single cell Raman spectrum (SCRS) data, a culture and data acquisition scheme of microbial single cells is designed. In this embodiment, the culture time is set to 1-16 hours, and the inoculation is performed once an hour. Two groups are used for experiments: one group is used for optical density detection (OD 600 measurement), and the growth period of microbial cells is determined by monitoring the optical density change, and is used as a guide basis for Raman spectrum detection; the other group is used for real-time acquisition of single cell Raman spectrum. In the Raman spectrum acquisition, according to the tolerance of different microbial cells, the laser power is set to 3-5nW, and the excitation time of each cell is 2-5s, so as to ensure the stability and reliability of the Raman signal, and at the same time avoid damage to the cells. ​

[0079] The collected SCRS data is initialized as an independent cluster, and a distance matrix is constructed to record the spatial distance between all data points, providing a basis for subsequent outlier detection.

[0080] In some embodiments, the outliers are identified by the following steps S101-S104:

[0081] S101: Initialize data.

[0082] The microbial single-cell Raman spectrum data is regarded as an independent cluster, and a distance matrix is constructed to record the spatial distance between all data points.

[0083] As an example, the microbial single cell can be a clinical pathogen, an industrial fermentation bacterium, and an environmental microorganism, etc.

[0084] As an example, the distance calculation method applicable to the constructed distance matrix can be Euclidean distance, Manhattan distance, and cosine similarity, etc.

[0085] S102: Calculate the distance matrix.

[0086] Single-linkage technique is used as the linkage criterion for hierarchical clustering to calculate the distance or similarity between all pairs of points in the data set.

[0087] Single-linkage technique is a method of constructing clusters by calculating the shortest distance between data points. In hierarchical clustering, single-linkage technique is sensitive to outliers because single-chain clustering tends to create "chain-like" clusters connected by widely spaced spectral points, making it easy to identify outliers.

[0088] As an example, let C1 and C2 be two microbial SCRS colony sets, and the single-linkage comparison distance is the minimum distance between SCRS (nearest neighbor strategy), and its calculation formula is:

[0089]

[0090] In the formula, d single (C1,C2) is the single-chain distance between the cluster pair, min is the minimum value function, C1 and C2 are two microbial colony sets, and S1 and S2 are two single-cell Raman spectra.

[0091] S103: Construct a hierarchical clustering tree.

[0092] Take a single data point as the initial cluster, gradually merge the two clusters with the closest distance, and update the distance matrix until all data points are merged into one cluster.

[0093] S104: Identify outliers.

[0094] Outliers can also be abnormal points or noise points by analyzing the cluster tree structure to identify outliers.

[0095] As an example, outliers are usually represented as points merged at a lower level, or points forming an independent long branch at the bottom of the cluster tree.

[0096] As shown in Figure 3 , it is an outlier detection diagram based on single-chain technology of hierarchical clustering, which belongs to t-SNE (t-distributed Stochastic Neighbor Embedding) dimensionality reduction scatter plot (two-dimensional plot) for showing the distribution of high-dimensional S CRS data after dimensionality reduction. Figure 3 The horizontal axis tSNE1 and the vertical axis tSNE2 represent the coordinates of high-dimensional spectral data after dimensionality reduction to two dimensions, reflecting the similarity between data points, and the closer the distance, the more similar the spectral characteristics. The square mark is 1 and the triangle mark is 2, representing two types of cluster clusters, i.e. data points and identified outliers. A detected outlier is marked with a circle in the figure, which is far away from other clusters and isolated in distribution, and is identified as an outlier by single-chain hierarchical clustering. The single-chain method is sensitive to outliers and easy to identify isolated small clusters.

[0097] S200: Based on outliers, denoising processing is performed on the microbial single-cell Raman spectrum data to obtain denoised data.

[0098] Step S200 further analyzes the detected outliers, selects to remove noise points or retains effective data points with heterogeneity characteristics by a characteristic spectrum signal-to-noise ratio evaluation method, to obtain denoised data to execute subsequent process steps.

[0099] In some embodiments, the denoised data is obtained by steps S201-S204 as follows:

[0100] S201: Set a pruning threshold.

[0101] Based on the minimum spanning tree (MST) constructed by HCA, the connectivity of outliers is analyzed. According to the distance between outliers and other clusters, a threshold is set to mark the points with a distance exceeding the threshold as potential outliers.

[0102] It should be noted that the minimum spanning tree is a topological structure in graph theory, the nodes are original data points, and the edges are distances between data points, which need to satisfy the connection of all nodes and the minimum total edge weight, and do not involve cluster merging, only describe the direct connection relationship of points, so the minimum spanning tree can be constructed by the above step S101.

[0103] As an example, the MST constructed based on HCA can set the pruning threshold as follows: when the distance between the outlier and the nearest cluster exceeds 70% of the average nearest neighbor distance of the intra-cluster samples, it is marked as a potential outlier.

[0104] S202: Calculate the characteristic spectral signal-to-noise ratio (CS_SNR).

[0105] The signal-to-noise ratio of the spectral signal of the potential outlier is calculated, and the point with a signal-to-noise ratio significantly lower than that of other points in the cluster is determined as a noise point.

[0106] In some embodiments, the characteristic spectral signal-to-noise ratio is used to quantify the evaluation of spectral data quality, and the CS_SNR calculation formula is shown in (2):

[0107]

[0108] In the formula, CS_SNR is the characteristic spectral signal-to-noise ratio, max is the maximum function, min is the minimum function, S x1 , S x2 are the spectral intensity values of the start and end spectral points of the characteristic spectral band, respectively, x3 , S x4 are the spectral intensity values of the start and end spectral points of the silent zone, respectively, x1 and x2 are the start and end spectral points, respectively, and x3 and x4 are the start and end spectral points, respectively.

[0109] As an example, the maximum spectral intensity of the characteristic spectral band (x1 to x2) is subtracted from the minimum spectral intensity as the signal intensity of SCRS, and the maximum spectral intensity of the silent zone (x3 to x4) is subtracted from the minimum spectral intensity as the noise intensity of SCRS.

[0110] As an example, the silent zone range can be selected as 1800 cm -1 -2000 cm -1 .

[0111] As an example, when the CS_SNR of the potential outlier is lower than 40% of the other cluster points, the potential outlier can be determined as a noise point.

[0112] S203: Prune the noise points.

[0113] The outlier is pruned and determined according to the signal-to-noise ratio analysis result, and the points determined as noise are removed from the data set.

[0114] S204: Keep the effective outliers.

[0115] If the signal-to-noise ratio of the outlier is similar to that of other points in the cluster, the point is considered as part of the heterogeneity and is kept. The retained outliers include outliers that are not identified as potential outliers and points that are not determined as noise points by the potential outliers.

[0116] Furthermore, the fuzzy C-means (FCM) algorithm is used to optimize the membership of the remaining data points to ensure that the pruned data retains the true heterogeneity information.

[0117] like Figure 4 The following is a characteristic spectrum signal-to-noise ratio analysis diagram of SCRS data. Figure 4 (a) is a stacked graph of SCRS data, with the horizontal axis being Raman shift (unit: cm -1 ), representing the spectral wavelength range of molecular vibration / rotation characteristics, 400 cm -1 -1800cm -1 Covers the characteristic peaks of common biomolecules (such as nucleic acids, proteins, and lipids). The vertical axis is the spectral intensity (in arbitrary units of au), which reflects the strength of the Raman scattering signal. Figure 4 Middle (a) shows the Raman spectral characteristics of different single cells by stacking multiple spectral curves. The peak and valley differences of the curves reflect the heterogeneity of spectral signals between cells.

[0118] Figure 4 (b) shows a boxplot of the characteristic spectral signal-to-noise ratio. The horizontal axis represents the clusters, represented by Cluster 1 and Cluster 2, representing the two microbial cell populations classified in step S100. The vertical axis represents the characteristic spectral signal-to-noise ratio (SNR intensity), which reflects the quality of the spectral signal. The higher the SNR, the less noise there is in the signal. Figure 4 The boxes in (b) represent the interquartile range (25%-75% of the data distribution). Longer boxes indicate greater dispersion. The center line represents the median, reflecting the central tendency of the population SNR. The whiskers represent the furthest points from non-outliers. Outliers are marked by discrete dots; no outliers are clearly visible in the figure. Cluster 1 has a significantly higher SNR than Cluster 2, indicating differences in spectral signal quality between the two cell types.

[0119] S300: performing spectral clustering based on the denoised data to obtain spectral clustering results; wherein the spectral clustering results are used to identify or mark colony cells in different growth stages.

[0120] Step S300 uses spectral clustering technology to finely classify the denoised SCRS data to achieve heterogeneous separation of colony cells at different growth stages.

[0121] Spectral clustering transforms the clustering problem into the optimal partitioning problem of a graph. Compared with other traditional clustering algorithms, spectral clustering can cluster SCRS data sample spaces of arbitrary shapes and easily converge to the global optimum. By constructing a sparse similarity graph, it exhibits faster computational speed for high-dimensional SCRS datasets.

[0122] In some embodiments, step S300 includes the following steps S301-304:

[0123] S301: Constructing a similarity matrix.

[0124] The kernel function in spectral clustering is used to construct a similarity matrix, which can capture the local relationship between the SCRS data points. The similarity between the SCRS data points is calculated by the kernel function, which is used to generate the similarity matrix.

[0125] As an example, the spectral clustering kernel function can use Gaussian kernel function (RBF), polynomial kernel function, linear kernel function and sigmoid kernel function, etc.

[0126] As shown in Figure 5 , it is a spectral clustering effect analysis diagram of different kernel functions of spectral clustering on SCRS data. Among them, (a) is the clustering result of linear kernel function space clustering, (b) is the clustering result of Gaussian kernel function space clustering, (c) is the clustering result of polynomial kernel function space clustering, (d) is the clustering result of Sigmoid kernel function function space clustering, (e) is the clustering result of linear kernel function nonlinear distribution, (f) is the clustering result of Gaussian kernel function nonlinear distribution, (g) is the clustering result of polynomial kernel function nonlinear distribution, (h) is the clustering result of Sigmoid kernel function function nonlinear distribution. Figure 5 The horizontal axis tSNE1 and the vertical axis tSNE2 of each subgraph in the figure represent the two-dimensional coordinates of the reduced high-dimensional data, and the distance is close, which represents the similarity of high-dimensional features. Figure 5 The data shown in (a)-(d) in the figure is in "discrete block" distribution (such as several independent clusters), which verifies the clustering ability of the corresponding kernel function for simple separated clusters. Figure 5 (e)-(f) in the figure: the data presents a complex structure such as "ring, nested", such as (e) for double ring, (f) for single ring, which verifies the clustering ability of the corresponding kernel function for manifold / nonlinear structure.

[0127] In some embodiments, for two single cell Raman spectra S1 and S2, the Gaussian kernel function K RBF of spectral clustering is calculated as:

[0128]

[0129] In the formula, ||S1-S2||2 2 is the square of the Euclidean distance between the two spectra, and σ is the bandwidth parameter of the kernel function. For SCRS data, the distance can be calculated as the sum of the squares of all corresponding Raman intensity differences.

[0130] S302: Calculate the graph Laplacian matrix.

[0131] The Laplacian matrix of the graph is generated based on the similarity matrix, and the characteristics of the SCRS data are revealed through the intrinsic geometric structure of the graph.

[0132] S303: Eigen decomposition and dimension reduction.

[0133] Eigenvalue decomposition is performed on the Laplacian matrix, and the first k eigenvectors are extracted to construct a low-dimensional embedding space.

[0134] As an example, t-SNE (t-Distributed Stochastic Neighbor Embedding) or UMAP (Uniform Manifold Approximation and Projection) algorithm can be used to extract K eigenvectors.

[0135] As an example, K can be selected as 2-10, i.e., 2-10 microbial SCRS features are extracted.

[0136] S304: Clustering analysis.

[0137] Traditional clustering algorithms are applied in the low-dimensional feature space to cluster the SCRS data and label the colony cells in different growth stages.

[0138] As an example, traditional clustering methods such as K-means or DBSCAN can be used to cluster the low-dimensional data and identify microbial subgroups in different growth stages.

[0139] S400: The spectral clustering results are evaluated using the silhouette coefficient and CH index to determine the optimal number of clusters, and the denoised data is subjected to spectral clustering based on the optimal clustering data to obtain the final clustering results.

[0140] To verify the effectiveness of the clustering results and quantitatively evaluate the quality of the clustering results, the present application introduces two commonly used internal evaluation methods, namely the silhouette coefficient (Silhouette Coefficient) and the CH index (Calinski-Harabasz Index), which are used to evaluate the internal compactness and cluster separation of the clustering results, as well as the global separation and compactness.

[0141] In some embodiments, S400 includes steps S401-S402.

[0142] S401: Determine the internal evaluation system evaluation index of the clustering results.

[0143] As an example, the silhouette coefficient measures the rationality of data points in clustering by calculating the aggregation and separation of each data point. Its formula is:

[0144]

[0145] wherein A(i) is the average distance from data point i to other points in the same cluster, and B(i) is the average distance from data point i to the nearest cluster center. When S(i) is close to 1, it indicates that the clustering effect of data point i is good; when S(i) is close to 0, it indicates that the data point may be located at the cluster boundary; and when S(i) is negative, it indicates that the data point may be misclassified. By calculating the average silhouette coefficient of all data points, the compactness and separation between clusters of the entire clustering result can be evaluated.

[0146] As an example, the CH index evaluates the global separation and compactness of clustering by calculating the ratio of the variance between clusters and the variance within clusters, and the calculation formula is:

[0147]

[0148] wherein VB is the variance between clusters, VW is the variance within clusters, k is the number of clustering clusters, and N is the total number of data points. A higher CH index indicates that the separation between clusters is strong, the compactness within clusters is high, and the clustering result is better.

[0149] As an example, in order to comprehensively evaluate the influence of the silhouette coefficient and the CH index, according to the distribution characteristics of the spectral data and the logical relationship of the two evaluation methods, the present application sets a weight coefficient for the two, so as to comprehensively quantify the quality of the clustering result. The weight can be adjusted according to actual needs, for example, set to 1:1.5, that is, the weight of the CH index is higher. The calculation formula of the comprehensive evaluation value Q is:

[0150] Q = w1·S + w2·S (6)

[0151] wherein w1 and w2 are the weights of the silhouette coefficient and the CH index respectively, S is the average silhouette coefficient value, and CH is the CH index value. By calculating the Q value, the overall quality of the clustering result can be quantitatively evaluated, which provides a basis for subsequent clustering granularity adjustment.

[0152] S402: dynamically adjusting the clustering granularity and evaluating the clustering result.

[0153] In order to optimize the quality of the clustering result, the present application dynamically adjusts the clustering granularity, determines the best clustering granularity, that is, the number of clusters or the number of colony cell classifications in different growth periods, according to the comprehensive quantitative evaluation value Q. By adjusting the clustering granularity, the heterogeneity of colony cells in different growth periods can be more accurately captured, and the biological significance and practical application value of the clustering result can be ensured.

[0154] The specific steps are as follows:

[0155] S4021: dynamically adjusting the number of clusters.

[0156] Taking the initial number of clusters as a parameter, gradually increase or decrease the number of clusters, and evaluate the clustering results after each adjustment according to the comprehensive quantitative evaluation value Q calculated in Step 1. When the Q value reaches a local maximum value, it indicates that the current clustering granularity can achieve the best intra-cluster compactness and inter-cluster separation, thereby determining the optimal number of clusters.

[0157] As an example, in the process of clustering Raman spectrum data of colony cells, assuming that the initial number of clusters is k = 1, gradually increase k to 4, and by calculating the Q value corresponding to each k value, draw a trend chart of Q value change with the number of clusters. When the Q value reaches a local maximum value at a certain number of clusters (for example, k = 3), it is determined that the optimal clustering granularity is 3, indicating that the colony cells can be divided into 3 growth periods.

[0158] As shown in Figure 6 , it is a schematic diagram of the analysis results and quantitative evaluation of microbial colony single cell Raman spectrum (SCRS) data based on HNFS clustering. Figure 6 (a) in FIG. 1 shows the distribution of colony SCRS, which is visualized by t-SNE dimensionality reduction. Different labels (1h, 3h, etc.) represent colony cells at different culture times, showing the distribution of spectral data in two-dimensional space. Figure 6 (b) in FIG. 1 shows the data statistics of three cell growth periods, which is a growth curve showing the distribution ratio change of lag phase, log phase and stationary phase with culture time. Figure 6 (c) in FIG. 1 shows the clustering analysis and quantitative evaluation of SCRS, which superimposes the clustering boundary (ellipse) and quantitative indicators (such as Calinski-Harabasz index, C-H (a.u.), contour coefficient, S-C (a.u.)) on the t-SNE dimensionality reduction map to verify the clustering effect.

[0159] S4022: Cluster result evaluation.

[0160] To further verify the biological rationality of the clustering results, the clustering results and OD 600 measured microbial cell growth periods are compared and counted, and used as an analysis standard for the accuracy of the HNFS clustering-based colony heterogeneous data separation method.

[0161] Further, according to the evaluation of the clustering results, the differences in physiological characteristics or metabolic activities of the colony cells corresponding to different clustering clusters are verified to ensure the biological consistency of the clustering results.

[0162] The embodiments of the present application also provide a colony heterogeneous data separation device, as shown in Figure 7 , the colony heterogeneous data separation device comprises:

[0163] The outlier identification module 701 is configured to obtain the single-cell Raman spectrum data of microorganisms, perform hierarchical clustering on the single-cell Raman spectrum data of microorganisms, and identify outliers.

[0164] The data denoising module 702 is configured to perform denoising processing on the single-cell Raman spectrum data of microorganisms based on the outliers to obtain denoised data.

[0165] The spectral clustering module 703 is configured to perform spectral clustering on the denoised data to obtain a spectral clustering result, wherein the spectral clustering result is used to identify or label colony cells in different growth periods.

[0166] The cluster evaluation module 704 is configured to evaluate the spectral clustering result by using a silhouette coefficient and a CH index to determine an optimal cluster number, perform spectral clustering on the denoised data based on the optimal cluster data, and obtain a final clustering result.

[0167] In some embodiments, the outlier identification module is further configured to:

[0168] Each data point in the single-cell Raman spectrum data of microorganisms is regarded as an independent cluster, and a distance matrix is constructed to record the spatial distance between all data points, wherein the microorganisms are clinical pathogenic bacteria, industrial fermentation bacteria, or environmental microorganisms, and the distance matrix is calculated in a Euclidean distance, Manhattan distance, or cosine similarity manner.

[0169] A single-linkage technique is used as a linkage criterion for hierarchical clustering, and the single-linkage distance between all cluster pairs in the single-cell Raman spectrum data of microorganisms is calculated to update the distance matrix, wherein the single-linkage technique constructs clusters by calculating the minimum distance between clusters, and the calculation formula of the single-linkage distance between cluster pairs is:

[0170]

[0171] In the formula, d single (C1,C2) is the single-linkage distance between cluster pairs, min is a minimum value function, C1 and C2 are two microbial colony sets, and S1 and S2 are the Raman spectra of two single cells.

[0172] An individual data point is taken as an initial cluster, the two clusters with the closest distance are gradually merged, and the distance matrix is updated until all data points are merged into one cluster, and a hierarchical clustering tree is constructed.

[0173] Outliers are identified by analyzing the structure of the hierarchical clustering tree, wherein the outliers are data points that are merged at a low level or data points that form an independent long branch at the bottom of the hierarchical clustering tree.

[0174] In some embodiments, the data denoising module is further configured to:

[0175] constructing a minimum spanning tree based on hierarchical clustering analysis, analyzing the connectivity of outliers, and marking potential outliers when the distance of an outlier to the nearest cluster exceeds 70% of the average nearest neighbor distance of samples within the cluster;

[0176] calculating the characteristic spectral signal-to-noise ratio of the potential outliers;

[0177] determining the potential outliers as noise points and removing them from the microbial single-cell Raman spectrum data when the characteristic spectral signal-to-noise ratio of the potential outliers is lower than 40% of the characteristic spectral signal-to-noise ratio of data points within other clustering clusters, and optimizing the membership of the remaining data points using a fuzzy C-means algorithm to obtain denoised data.

[0178] In some embodiments, the data denoising module is further configured to calculate the characteristic spectral signal-to-noise ratio of the potential outliers by the following formula:

[0179]

[0180] where CS_SNR is the characteristic spectral signal-to-noise ratio, max is the maximum function, min is the minimum function, S x1 , S x2 are the spectral intensity values of the starting and ending spectral points of the characteristic spectral segment, respectively, x3 , S x4 are the spectral intensity values of the starting and ending spectral points of the silent region spectral segment, respectively, x1 and x2 are the starting and ending spectral points, respectively, and x3 and x4 are the starting and ending spectral points, respectively.

[0181] In some embodiments, the spectral clustering module is further configured to:

[0182] constructing a similarity matrix and calculating the similarity between data points in the denoised data using a spectral clustering kernel function; the spectral clustering kernel function is selected from a Gaussian kernel function, a polynomial kernel function, a linear kernel function, or a sigmoid kernel function; when the spectral clustering kernel function is a Gaussian kernel function, the calculation formula of the Gaussian kernel function is:

[0183]

[0184] where ||S1-S2||2 2 is the square of the Euclidean distance between two single-cell Raman spectra S1 and S2, σ is the bandwidth parameter of the kernel function, K RBF (S1, S2) is the Gaussian kernel function, and exp is the exponential function;

[0185] generating a Laplacian matrix of a graph based on the similarity matrix;

[0186] Eigenvalue decomposition is performed on the Laplacian matrix, and the first k eigenvectors are extracted to construct a low-dimensional feature space;

[0187] In the low-dimensional feature space, a clustering algorithm is used to cluster the denoised data, and microbial colony cells in different growth periods are labeled to obtain a spectral clustering result.

[0188] In some embodiments, the cluster evaluation module is further configured to:

[0189] determine a comprehensive evaluation value according to the silhouette coefficient and the CH index;

[0190] According to the number of clusters in the current spectral clustering result, the number of clusters is gradually increased or decreased, and the spectral clustering result after adjusting the number of clusters each time is evaluated according to the comprehensive evaluation value, and when the comprehensive evaluation value reaches a local maximum value, the number of clusters corresponding to the current comprehensive evaluation value is taken as the optimal number of clusters.

[0191] In some embodiments, the cluster evaluation module is further configured to:

[0192] The silhouette coefficient is calculated by the following formula:

[0193]

[0194] In the formula, S(i) is the silhouette coefficient of data point i, A(i) is the average distance from data point i to other points in the same cluster, and B(i) is the average distance from data point i to the nearest cluster center. The closer S(i) is to 1, the better the clustering effect of data point i is. When S(i) is close to 0, it indicates that data point i is close to the cluster boundary. When S(i) is negative, it indicates that data point i may be misclassified;

[0195] The CH index is calculated by the following formula:

[0196]

[0197] In the formula, CH is the CH index, VB is the inter-cluster variance, VW is the intra-cluster variance, k is the number of clusters, and N is the total number of data points.

[0198] Based on the silhouette coefficient and the CH index, the comprehensive evaluation value Q is calculated by the following formula:

[0199] Q = w1·S + w2·CH (6)

[0200] In the formula, w1 and w2 are the weights of the silhouette coefficient and the CH index, respectively, and S is the average silhouette coefficient value.

[0201] An electronic device is provided. The electronic device can include a processor, a memory, wherein the processor and the memory can communicate; for example, the processor and the memory communicate through a communication bus.

[0202] The processor executes computer-executed instructions stored in the memory, so that the processor executes the solutions in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0203] The communication bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries and read-only libraries). The memory can include random access memory (RAM), and can also include non-volatile memory.

[0204] The electronic device provided by the embodiments of the present application can be a terminal device of the above embodiments.

[0205] The embodiments of the present application also provide a computer readable storage medium, which stores computer instructions, and when the computer instructions run on a computer, the computer executes the technical solutions of the above-mentioned colony heterogeneity data separation method.

[0206] The embodiments of the present application also provide a computer program product, which includes a computer program stored in a computer readable storage medium, and at least one processor can read the computer program from the computer readable storage medium, and when the at least one processor executes the computer program, the technical solutions of the above-mentioned colony heterogeneity data separation method can be realized.

[0207] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the embodiments of the device described above are merely schematic. For example, the division of the modules is merely logical function division. There can be another division manner for the actual implementation. For example, a plurality of modules or a function can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.

[0208] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to implement the embodiments of the present application.

[0209] In addition, each function module in each embodiment of the present application can be integrated in one processing unit, or each module can be physically present separately, or two or more modules can be integrated in one unit. The unit formed by the above modules can be realized in the form of hardware, or in the form of hardware plus software function unit.

[0210] The integrated modules realized in the form of software function modules can be stored in a computer readable storage medium. The software function modules stored in the storage medium include a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the method of each embodiment of the present application.

[0211] It should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor. The steps of the method disclosed in the present application can be directly embodied as a hardware processor to execute, or be executed by a combination of hardware and software modules in the processor.

[0212] The memory can include a high-speed RAM memory, and can also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0213] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0214] The storage medium can be realized by any type of volatile or nonvolatile storage devices or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk, or an optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0215] An exemplary storage medium is coupled to the processor so that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be a part of the processor. The processor and the storage medium can be located in an application specific integrated circuits (ASIC). Of course, the processor and the storage medium can exist as discrete components in the electrical control unit or the host device.

[0216] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction-related hardware. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the foregoing storage medium includes a ROM, a RAM, a magnetic disk, or an optical disk, and various media that can store program codes.

[0217] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for separating colony heterogeneity data, comprising: The method comprises: obtaining microbial single-cell Raman spectrum data, performing hierarchical clustering on the microbial single-cell Raman spectrum data, and identifying outliers; based on the outliers, performing denoising processing on the microbial single-cell Raman spectrum data to obtain denoised data; based on the denoised data, performing spectral clustering to obtain a spectral clustering result; wherein the spectral clustering result is used to identify or label colony cells in different growth periods; using a contour coefficient and a CH index to evaluate the spectral clustering result to determine an optimal clustering number, performing spectral clustering on the denoised data based on the optimal clustering data to obtain a final clustering result.

2. The colony heterogeneity data separation method of claim 1, wherein, The hierarchical clustering of the microbial single-cell Raman spectrum data identifies outliers, comprising: regarding each data point in the microbial single-cell Raman spectrum data as an independent clustering cluster, constructing a distance matrix to record the spatial distance between all data points, wherein the microbial single-cell is a clinical pathogenic bacterium, an industrial fermentation bacterium or an environmental microorganism, and the distance matrix uses Euclidean distance, Manhattan distance or cosine similarity for distance calculation; using single-link technology as the linking criterion for hierarchical clustering, calculating the single-link distance between all pairs of clustering clusters in the microbial single-cell Raman spectrum data to update the distance matrix, wherein the single-link technology constructs a cluster by calculating the minimum distance between clustering clusters; the calculation formula of the single-link distance between pairs of clustering clusters is: where d single (C1,C2) is the single-strand distance between the clustering pairs, min is the minimum function, C1 and C2 are the two microbial bacterial collections, and S1 and S2 are the two single-cell Raman spectra, respectively. taking a single data point as an initial clustering cluster, gradually merging the two clustering clusters with the closest distance, and updating the distance matrix, until all data points are merged into one clustering cluster, thereby constructing a hierarchical clustering tree; by analyzing the structure of the hierarchical clustering tree, identifying outliers, wherein the outliers are data points that are merged at a low level or data points that form an independent long branch at the bottom of the hierarchical clustering tree.

3. The colony heterogeneity data separation method of claim 2, wherein, Based on the outliers, the denoising processing is performed on the microbial single-cell Raman spectrum data to obtain denoised data, comprising: based on the minimum spanning tree constructed by hierarchical clustering analysis, analyzing the connectivity of the outliers, and when the distance between an outlier and the nearest cluster exceeds 70% of the average nearest neighbor distance of the samples in the cluster, marking the outlier as a potential outlier; calculating the characteristic spectral signal-to-noise ratio of the potential outlier; when the characteristic spectral signal-to-noise ratio of the potential outlier is lower than 40% of the characteristic spectral signal-to-noise ratio of the data points in other clustering clusters, the potential outlier is determined as a noise point and is removed from the microbial single-cell Raman spectrum data, and the membership of the remaining data points is optimized by using a fuzzy C-means algorithm to obtain denoised data.

4. The colony heterogeneity data separation method of claim 3, wherein, The characteristic spectral signal-to-noise ratio of the potential outlier is calculated by the following formula: In the formula, CS_SNR is a characteristic spectrum signal-to-noise ratio, max is a maximum function, min is a minimum function, S x1 , S x2 respectively are starting and ending spectrum point spectrum intensity values of the characteristic spectrum segment x3 , S x4 respectively are starting and ending spectrum point spectrum intensity values of the silent zone spectrum segment, x1 and x2 respectively are starting and ending spectrum points, and x3 and x4 respectively are starting and ending spectrum points.

5. The method of claim 1, wherein the step of separating the colony-heterogeneity data comprises: Based on the denoised data, spectral clustering is performed to obtain a spectral clustering result, comprising: constructing a similarity matrix, and calculating the similarity between data points in the denoised data by using a spectral clustering kernel function; the spectral clustering kernel function is selected from a Gaussian kernel function, a polynomial kernel function, a linear kernel function or a sigmoid kernel function; when the spectral clustering kernel function selects a Gaussian kernel function, the calculation formula of the Gaussian kernel function is: where ||S1-S2||2 2 is the squared Euclidean distance between two single-cell Raman spectra S1and S2, σ is a bandwidth parameter of the kernel function, K RBF (S1,S2) is a Gaussian kernel function, and exp is an exponential function. generating a Laplacian matrix of a graph based on the similarity matrix; performing eigenvalue decomposition on the Laplacian matrix, extracting the first k eigenvectors to construct a low-dimensional feature space; In the low-dimensional feature space, the denoised data is clustered by using a clustering algorithm to label microbial colony cells in different growth periods, and a spectral clustering result is obtained.

6. The colony heterogeneity data separation method of claim 1, wherein, The spectral clustering result is evaluated by using a silhouette coefficient and a CH index to determine an optimal clustering number, including: An overall evaluation value is determined according to the silhouette coefficient and the CH index; According to the clustering number of the current spectral clustering result, the clustering number is gradually increased or decreased, and the spectral clustering result after each adjustment of the clustering number is evaluated according to the overall evaluation value, and when the overall evaluation value reaches a local maximum value, the clustering number corresponding to the current overall evaluation value is taken as the optimal clustering number.

7. The colony heterogeneity data separation method of claim 6, wherein, The overall evaluation value is determined according to the silhouette coefficient and the CH index, including: The silhouette coefficient is calculated by the following formula: In the formula, S(i) is the silhouette coefficient of data point i, A(i) is the average distance from data point i to other points in the same cluster, and B(i) is the average distance from data point i to the nearest cluster center. The closer S(i) is to 1, the better the clustering effect of data point i is. The closer S(i) is to 0, the closer data point i is to the cluster boundary. When S(i) is negative, data point i may be misclassified. The CH index is calculated by the following formula: In the formula, CH is the CH index, VB is the inter-cluster variance, VW is the intra-cluster variance, k is the number of clustering clusters, and N is the total number of data points. Based on the silhouette coefficient and the CH index, the overall evaluation value Q is calculated by the following formula: Q = w1·S + w2·CH (6) In the formula, w1 and w2 are the weights of the silhouette coefficient and the CH index respectively, and S is the average silhouette coefficient value.

8. A colony heterogeneity data separation apparatus, comprising: The device includes: An outlier identification module configured to obtain microbial single-cell Raman spectrum data, perform hierarchical clustering on the microbial single-cell Raman spectrum data, and identify outliers; A data denoising module configured to perform denoising processing on the microbial single-cell Raman spectrum data based on the outliers to obtain denoised data; A spectral clustering module configured to perform spectral clustering based on the denoised data to obtain a spectral clustering result, wherein the spectral clustering result is used to identify or label colony cells in different growth periods; A clustering evaluation module configured to evaluate the spectral clustering result by using a silhouette coefficient and a CH index to determine an optimal clustering number, perform spectral clustering on the denoised data based on the optimal clustering data to obtain a final clustering result.

9. An electronic device, comprising: including: A processor and a memory in communication with the processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the colony heterogeneous data separation method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the colony heterogeneous data separation method according to any one of claims 1-7.

Citation Information

Cited By

  • Source-considered deep and large reservoir suspended matter inversion model configuration method and device

    CN122245486A