Single-cell clustering method and system based on consistency matrix score
By using consistency matrix scoring and SCM-tom distance metric, the optimal preprocessing and dimensionality reduction methods are identified, solving the flexibility and accuracy issues of single-cell clustering algorithms and achieving more efficient single-cell data clustering.
Patent Information
- Application Number
- CN202310713091.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2043-06-15
AI Technical Summary
Existing single-cell clustering algorithms suffer from limitations such as simplistic and inflexible data preprocessing and dimensionality reduction methods on different datasets, lack of reasonable metrics, and coarse Euclidean distance calculations leading to the loss of effective distance information, making accurate clustering difficult.
A consistency matrix scoring method is adopted, which identifies the optimal combination of preprocessing and dimensionality reduction by f-value scoring. The SCM-tom distance metric is designed, and the optimal distance is obtained by utilizing the topological information between cells to construct the final clustering result.
It improves the accuracy of single-cell clustering, solves the sensitivity problem of different datasets, and enhances the clustering effect, which is significantly better than traditional methods.
Smart Images

Figure CN116741267B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of single cell clustering method, and particularly relates to a single cell clustering method and system based on consistency matrix score. BACKGROUND
[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.
[0003] Single cell sequencing (scRNA-seq) technology obtains transcriptome information at single cell resolution, enabling people to observe cells with higher precision and better identify rare cell types, which can play a huge role in disease research involving cell heterogeneity such as tumor research, neurological diseases, and immune diseases, and can effectively help the present application to explore the characteristics, fate and functional structure of cells. Clustering is one of the most commonly used basic analysis methods in single cell RNA sequencing data analysis, which can realize the classification of single cells, which plays a very important role in single cell research of complex organ tissues, diagnosis and treatment of clinical diseases, etc. Therefore, accurate clustering of single cell data has important research significance in the field of bioinformatics. As a kind of unsupervised algorithm, it can extract effective features in the data and distinguish the similarity between different samples under the premise that the true label of the data is unknown, and samples with similar features are classified into the same cluster, thereby realizing the classification of samples.
[0004] Looking back at the past single cell clustering algorithms, most of the existing clustering algorithms have the following problems:
[0005] 1. Most of the current single cell clustering algorithms, for different data sets, the key operations such as data preprocessing and dimensionality reduction performed are fixed and single. However, in actual application, the sensitivity of different data sets to preprocessing methods and dimensionality reduction methods is very different.
[0006] 2. Lack of a reasonable index to provide a reference for selecting a combination of data-specific preprocessing and dimensionality reduction methods for different data sets.
[0007] 3. The irrationality of the distance calculation between two cells. SC3 uses the Euclidean distance measurement method to calculate the distance between cells in the consistency matrix. However, this distance calculation method is too rough and difficult to capture all the difference patterns of cell features, which will inevitably cause the loss of effective distance information. SUMMARY
[0008] In order to solve the technical problems in the background art, the present application provides a single cell clustering method and system based on consistency matrix scoring, which identifies the optimal combination of preprocessing and dimension reduction method through the score value, so as to realize the selection of the optimal preprocessing and dimension reduction method combination with data specificity. The optimal distance measurement with data specificity is obtained through the topological structure information between cells by fully utilizing the indirect distance of cells, and the clustering accuracy is improved.
[0009] In order to achieve the above purpose, the present application adopts the following technical solutions:
[0010] The first aspect of the present application provides a single cell clustering method based on consistency matrix scoring, comprising the following steps:
[0011] Obtaining gene expression data;
[0012] After combined dimension reduction based on the gene expression data, a plurality of consistency matrices are obtained, and clustering is performed on each consistency matrix to obtain the corresponding clustering result;
[0013] Combining the consistency matrix and its corresponding clustering result, the f-value of each consistency matrix is calculated by using a scoring method, and the consistency matrix corresponding to the highest f-value is the optimal consistency matrix; wherein the combination of the consistency matrix and its corresponding clustering result, the f-value of each consistency matrix is calculated by using a scoring method, specifically including:
[0014] The inter-class distance and intra-class distance of each row in the consistency matrix are calculated; the corresponding f-value is obtained based on the inter-class distance and intra-class distance of each row, and the f-values of the rows are integrated together to obtain the f-value of the consistency matrix;
[0015] Based on the obtained optimal consistency matrix, a distance matrix between cells is constructed, and hierarchical clustering is performed on the distance matrix between cells to obtain the final clustering result.
[0016] The second aspect of the present application provides a single cell clustering system based on consistency matrix scoring, comprising:
[0017] A data acquisition module for acquiring gene expression data;
[0018] After combined dimension reduction based on the gene expression data, a plurality of consistency matrices are obtained, and clustering is performed on each consistency matrix to obtain the corresponding clustering result;
[0019] A consistency matrix scoring module is used to combine the consistency matrix and the corresponding clustering result, and to calculate the f-value of each consistency matrix by using a scoring method, and the consistency matrix corresponding to the highest f-value is the optimal consistency matrix.
[0020] The inter-class distance and the intra-class distance of each row in the consistency matrix are calculated, the corresponding f-value is obtained based on the inter-class distance and the intra-class distance of each row, and the f-values of the rows are integrated to obtain the f-value of the consistency matrix.
[0021] A clustering module is used to construct the distance matrix between cells based on the obtained optimal consistency matrix, and to obtain the final clustering result by using hierarchical clustering on the distance matrix between cells.
[0022] The third aspect of the present application provides a computer readable storage medium.
[0023] A computer readable storage medium has a computer program stored thereon, and the program is executed by a processor to implement the steps in the single cell clustering method based on consistency matrix scoring.
[0024] The fourth aspect of the present application provides a computer device.
[0025] A computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the program to implement the steps in the single cell clustering method based on consistency matrix scoring.
[0026] Compared with the prior art, the present application has the following advantages:
[0027] 1. The present application designs an f-value scoring mechanism based on a consistency matrix, calculates the f-value of each combination, and identifies the optimal combination of preprocessing and dimension reduction by using the scoring value, so as to select the optimal combination of preprocessing and dimension reduction with data specificity. The problem that most of the current single cell clustering algorithms use a single fixed data preprocessing and dimension reduction operation for all data is solved.
[0028] 2. The present application designs a new distance metric SCM-tom based on the optimal consistency matrix, replaces the commonly used Euclidean distance metric, fully utilizes the indirect distance between cells, and obtains the optimal distance metric with data specificity through the topological structure information between cells, which is called SCM-tom distance.
[0029] Advantages of the additional aspects of the application will become apparent in the following description. BRIEF DESCRIPTION OF DRAWINGS
[0030] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application.
[0031] Figure 1 is a flow chart of a single cell clustering method based on consistency matrix scoring provided by an embodiment of the application;
[0032] Figure 2 is an accuracy rate column chart of f-value under different e values and p values provided by an embodiment of the application;
[0033] Figure 3 is an ARI value comparison chart of SCM-tom and SCM-eu provided by an embodiment of the application;
[0034] Figure 4 is an ARI value comparison chart of the algorithm of the application and other popular algorithms on different data sets provided by an embodiment of the application. DETAILED DESCRIPTION
[0035] The application will be further described below with reference to the drawings and embodiments.
[0036] It should be noted that the following detailed description is illustrative only and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0037] It should be noted that the terms used herein are only intended to describe specific embodiments and are not intended to limit exemplary embodiments according to the present application. As used herein, the singular form is intended to include the plural form unless the context clearly indicates otherwise, and it should also be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of the features, steps, operations, devices, components and / or combinations thereof.
[0038] Embodiment one
[0039] As shown in Figure 1 The present embodiment provides a single cell clustering method based on consistency matrix scoring, which comprises the following steps:
[0040] Step 1: Obtain the original gene expression matrix;
[0041] Step 2: Preprocess the original gene expression matrix;
[0042] In step 2, the pre-processing of the original gene expression matrix includes:
[0043] Before data processing, considering the existence of data redundancy, the SCM pre-processes the gene expression matrix by gene filtering. The information contained in the under-expressed genes is less, and the over-expressed genes are universal, so the genes with gene expression rate outside the set range are removed.
[0044] In this embodiment, the set range is below 6% and above 94%.
[0045] Then, the filtered gene expression matrix is pre-processed in the following way:
[0046] Given a gene expression matrix X G×N = {x ij}, containing G genes and N cells. Where x ij represents the expression of the i-th gene in the j-th cell.
[0047] (1) Log transformation:
[0048] The gene expression matrix is Log transformed by adding a pseudo count of 1:
[0049] x' ij = log2(x ij + 1)
[0050] (2) No transformation:
[0051] This transformation means that no pre-processing is done on the original data, and the original gene expression matrix is used as input for downstream analysis.
[0052] x' ij = x ij
[0053] (3) Z-score transformation:
[0054] Also known as standard deviation standardization, after Z-score processing, the data gradually obeys the standard normal distribution.
[0055]
[0056] Where μ i and σ i represent the mean and standard deviation of the i-th row of the gene expression matrix, respectively.
[0057] After the above three pretreatment methods, three processed gene expression matrices can be obtained. Then, the Euclidean distance, Pearson distance and Spearman distance between cells are calculated for each pretreated expression matrix, so each expression matrix can obtain three distance matrices.
[0058] Step 3: Dimensionality reduction is performed on the pretreated gene expression matrix.
[0059] Similar to data preprocessing, dimensionality reduction is also an indispensable step in downstream analysis of single-cell transcriptome.
[0060] In this embodiment, the user's choice of dimensionality reduction method is expanded, providing three dimensionality reduction methods, namely the pairwise combination of principal component analysis (PCA), UMAP and Laplacian Eigenmaps (LE) (PCA+UMAP, LE+UMAP and LE+PCA).
[0061] Among them, principal component analysis (PCA) is a method of finding an r-dimensional basis that best reflects the differences between data.
[0062] UMAP method is a recently proposed algorithm based on Riemannian geometry and algebraic topology, which is used for dimensionality reduction and data visualization analysis.
[0063] Laplacian Eigenmaps (LE) algorithm is a manifold dimensionality reduction algorithm that preserves the local features of data. Its main idea is to preserve the structure between local sample points in the low-dimensional space as much as possible.
[0064] The three distance matrices obtained are respectively subjected to a dimensionality reduction combination (one combination contains two dimensionality reduction methods).
[0065] After each dimensionality reduction of each distance matrix, d1, d2,..., d D dimensions (4%-7% of the original dimension) are retained. Then, each distance matrix after a dimensionality reduction combination can obtain 2xd D dimensionality reduction results.
[0066] Since this embodiment involves three distance matrices, after a dimensionality reduction combination of the three distance matrices, a total of 3x2xd D dimensionality reduction results are obtained.
[0067] Subsequently, k-means clustering is used to cluster each dimensionality reduction result, obtaining a total of 3x2xd D clustering results, and a consensus clustering method is used to integrate all clustering results obtained by k-means into a consensus matrix.
[0068] For a single clustering result, Consistent Clustering converts it into a 0-1 binary matrix with a dimension of N×N (where N is the total number of cells).
[0069] Suppose there exists a clustering result R = {r1, r2, ..., r} N In the clustering result R = {r1, r2, ..., r}, if the i-th cell and the j-th cell belong to the same cluster, then the clustering result R = {r1, r2, ..., r} is the same. N The corresponding binary matrix W N×N ={w ij The value in the i-th row and j-th column of the binary representation is 1; if the two cells do not belong to the same class, the binary representation W... N×N The corresponding value is 0.
[0070]
[0071] Where, r i and r j and represent the category labels of the i-th cell and the j-th cell in the clustering result R, respectively.
[0072] Using the above methods, a single clustering result can be transformed into a 0-1 matrix.
[0073] Then, the 3×2×d obtained after k-means... D Each clustering result is converted into a corresponding 0-1 matrix, and the average of these matrices yields the final consistency matrix Y.
[0074]
[0075] Among them, W i Let be the binary matrix corresponding to the i-th clustering result.
[0076] In summary, a single expression matrix can yield a single consistency matrix under a dimensionality reduction combination. Since this method incorporates a combination of three dimensionality reduction methods, each expression matrix yields a total of three consistency matrices after dimensionality reduction under these three combinations. Furthermore, because SCM obtains three preprocessed expression matrices, this invention ultimately obtains a total of nine consistency matrices. Based on these nine consistency matrices, this method calculates the Euclidean distance between each pair of cells and employs hierarchical clustering, ultimately obtaining nine corresponding clustering results.
[0077] Step 4: Select the optimal consensus matrix
[0078] A good clustering result typically requires small intra-class distances and large inter-class distances, and the consistency matrix can, to some extent, reflect the similarity between cells. Similarly, a good consistency matrix usually corresponds to small intra-class variances and large inter-class variances, which also means that it can output better clustering results.
[0079] In this embodiment, a total of 9 consistency matrices and 9 corresponding clustering results were obtained.
[0080] To some extent, the values Y in the consistency matrix Y N×N ={Y ij}(Y ij The value ∈[0,1] represents the similarity between cells i and j. The larger the value, the greater the probability that the two cells belong to the same cluster.
[0081] Therefore, a scoring method was designed and its score f-value was calculated to measure the quality of the consistency matrix. Given a consistency matrix Y... N×N ={y ij The f-value of the consistency matrix, along with its corresponding clustering result R, can be calculated using the following steps.
[0082] Step 1: Calculate the f-value of each row in the consistency matrix Y
[0083] Each row in the consistency matrix interacts to influence the final clustering result. Therefore, this invention first calculates the f-value of each row in the consistency matrix.
[0084] First, this invention calculates the inter-class distance in the i-th row of the consistency matrix Y:
[0085]
[0086] Where, n j is the number of cells in the j-th cluster in the clustering result R; k is the number of clusters in the clustering result R; It is the mean of the i-th row in the consistency matrix Y; It is the mean of the i-th row in the consistency matrix Y in the j-th cluster of the clustering result R.
[0087] Then, calculate the intra-class distance in the i-th row of the consistency matrix Y:
[0088]
[0089] var_i(i) = var_a(i) - var_b(i)
[0090] Where N is the number of rows in the consistency matrix Y, i.e., the total number of cells; Y ijrepresents the value in the i-th row and j-th column of the consensus matrix Y; var_a(i) represents the distance sum.
[0091] Finally, the f-value of the i-th row in the consensus matrix Y can be obtained by the following formula:
[0092]
[0093] df1 = k - 1, df2 = N - k
[0094] where df1 and df2 are the degrees of freedom of var_b(i) and var_i(i), respectively.
[0095] Step 2: Calculate the f-value of the consensus matrix
[0096] Through the above steps, the f-value of each row in the consensus matrix is obtained. Considering that the f-values of the rows may be too discrete, the f-values of the rows are integrated together to obtain the f-value of the consensus matrix by the following calculation method:
[0097]
[0098] where the default value of λ is 0.5, and the default value of a is 5.
[0099] From the above calculation method, the higher the f-value of the consensus matrix, the smaller the intra-class distance of the cells in the consensus matrix, and the larger the inter-class distance, which means that the difference fluctuations are mostly from the cells between different classes and less from the cells within the same class. In short, the higher the f-value of the consensus matrix, the better the clustering effect of the consensus matrix. Therefore, the consensus matrix with the highest f-value corresponds to the best combination of preprocessing and dimensionality reduction method.
[0100] Step 5: Reconstruct the SCM-tom distance matrix
[0101] The traditional method calculates the distance between cells in the consensus matrix using the Euclidean distance measurement method. However, this distance calculation method is too rough and cannot capture all the difference patterns between cells, resulting in the loss of effective distance information. Therefore, a new distance measurement method based on the topology between nodes (cells) is designed to reconstruct the distance between cells. In fact, when capturing the distance information between two cells, only focusing on their direct distance is not conducive to the overall distance information, so the indirect distance with other cells should also be considered. Based on the above consideration, a new distance measurement is constructed for the consensus matrix, and the specific calculation method is as follows.
[0102] Consistency matrix Y N×N The value in Y can represent the similarity between the ith cell and the jth cell, and the value range is 0-1, so the consistency matrix is taken as the initial intercell correlation coefficient matrix S:
[0103] S ij =Y ij
[0104] Where Y ij represents the probability that the ith cell and the jth cell belong to the same cluster.
[0105] Then, the β index is introduced to increase the difference between the correlation coefficients, thereby constructing the adjacency matrix A={α ij}
[0106] α ij =S ij β
[0107] Where α ij is the β correlation between the ith cell and the jth cell; the default value of β in this embodiment is 8. Therefore, the connectivity k j of each cell can be obtained by the present application:
[0108]
[0109] Where k j represents the sum of the β correlation between the jth cell and other cells.
[0110] Considering that there is not only direct connectivity between two cells, but also indirect connectivity between them and other cells, which will also affect the connectivity relationship between the two. Therefore, the indirect connectivity with other cells also needs to be considered to avoid false positive destruction of the accuracy of the connectivity relationship between the two. Based on the adjacency matrix, a topological overlap matrix Ω={ω ij} is also generated.
[0111]
[0112] The topological overlap matrix focuses on the first-order connectivity and the secondary connectivity, and more accurately describes the topological correlation relationship between two cells. To some extent, ω ij represents the topological correlation between the ith cell and the jth cell. Finally, the distance matrix D={d ij} is obtained.
[0113] d ij =1-ω ij
[0114] From the above calculation, when ω ijThe greater the value is, the closer the distance between the two cells is. ij The distance between the i-th cell and the j-th cell, the value of which ranges between 0 and 1, and the greater the value is, the greater the topological difference between the two cells is.
[0115] Then, the user constructs the distance matrix between the cells based on the selected optimal consistency matrix, and obtains the final clustering result by using hierarchical clustering on the obtained distance matrix.
[0116] In order to evaluate the effectiveness of the new method, the present application collects 10 commonly used public scRNA-seq data sets, and the real cell type labels of these data are known. Among them, Biase, Deng, Darmanis, Muraro, Usoskin, Romanov, Zeisel, Lake, Buettner and Baron-mouse data sets. In addition, the present application uses ARI (Adjusted Rand index) value as the evaluation standard of clustering effect. The value ranges between [-1, 1], and the closer the ARI value is to 1, the closer the clustering result is to the real label.
[0117] (1) Accuracy evaluation of f-value
[0118] The present application sets the accuracy as an index to test the effectiveness of f-value, mainly by investigating whether the combination of the pretreatment and dimension reduction method corresponding to the maximum f-value is in the optimal combination.
[0119] First of all, the setting of ARI effective interval. Given a data set, under different combinations of pretreatment and dimension reduction methods, a total of 9 consistency matrices and their corresponding clustering results can be obtained. Then, the ARI values of the 9 clustering results are calculated respectively, and the maximum value ari_max is found. Considering that part of the ARI values are relatively close, the present application sets a reasonable error value e.
[0120] Finally, the ARI effective interval is set to [ari_max-e, ari_max]. In addition, the clustering results of some combinations correspond to ARI values outside the effective interval, but their ARI values in the 9 combinations are far ahead in the ranking, which to some extent also shows that the clustering effect of the combination is still good. Based on the above two considerations, the present embodiment includes the combination in the optimal combination, whose ARI value is in the effective interval or whose ranking is in the top p (p is a selectable parameter) of the 9 combinations.
[0121] Calculate the f-value of the consistency matrix corresponding to the nine combinations respectively, and run each data set for 50 times. Detect whether the combination pointed by the maximum f-value is in the optimal combination or not. If yes, the count value is added by one, otherwise, it is 0. Observe the count value under N=50 times, and the accuracy ACC of f-value can be obtained according to the following formula:
[0122]
[0123] The accuracy of f-value under different e (0.05, 0.03, 0.01) and p (3, 2) values is tested on 10 data sets (see Figure 2 ). It can be found that when the e error value of ARI is set to 0.01 and the optimal combination ranking threshold p is set to 2, although the optimal combination condition is very strict, the accuracy of Darmanis, Buettner and Baron-mouse data sets is still 1, and the accuracy of Usoskin, Biase and Lake data sets is also above 0.9. When p is adjusted to 3, the accuracy of Usoskin, Biase, Lake and Muraro data sets also rises to 1. Among them, the accuracy of Muraro data set rises from 0.64 to 1, which shows that although the ARI value of the combination pointing to the highest f-value in Muraro data set is greater than 0.01, the ranking of the combination in the nine combinations is also stable in the top three, which side by side verifies the strong effectiveness of f-value in selecting the optimal combination of preprocessing and dimension reduction method.
[0124] In summary, f-value shows significantly superior performance on most data sets, which can well assist users to select the optimal combination of preprocessing and dimension reduction method in a small error range.
[0125] (2) Effectiveness evaluation of reconstructed distance
[0126] Based on the optimal consistency matrix, the distance matrix obtained by the new distance measurement (SCM-tom) and the traditional method commonly used Euclidean distance (SCM-eu) is adopted by hierarchical clustering, and the obtained ARI values are compared (see Figure 3 ). It can be found that SCM-tom performs better than Euclidean distance in most data sets. Compared with SCM-eu of Euclidean distance, SCM-tom has a significant improvement in Muraro, Baron-mouse, Deng and Romanov data sets, with an improvement of 11.79%-27.89%. Among them, the improvement in Muraro data set is more than 20%. At the same time, there is also obvious improvement in Lake, Zeisel and Darmanis data sets.
[0127] (3) Clustering results compared with other popular algorithms
[0128] Compared with other clustering algorithms (see Figure 4 ), the ARI values obtained by the present application are almost the first in all data sets. Specifically, the ARI values of SCM-tom in Baron-mouse, Darmanis, Muraro, Deng and Romanov data sets are significantly higher than those of all other clustering algorithms, which are increased by 21.95%-145.40%, 10.17%-171.05%, 27.79%-325.79%, 8.02%-129.16%, and 37.63%-99.35% compared with other clustering algorithms, respectively; the clustering results on Biase data set, Buettner data set, Lake data set, Zeisel data set and Usoskin data set are also obviously better than those of all other algorithms.
[0129] In particular, compared with the SC3 clustering algorithm, the present application fully demonstrates its clustering superiority in most data sets. For example, in the Buettner data set, the ARI value obtained by using the SC3 clustering algorithm is less than 0.01, while the ARI value of SCM-tom is 0.89; in the Muraro data set, the ARI value obtained by using the SC3 algorithm is 0.73, while the ARI value of SCM-tom algorithm is increased to 0.94; in the Romanov data set, the ARI value of SCM-tom is all above 0.6, while the ARI value of SC3 is only 0.46, and the ARI values of other clustering algorithms are mostly distributed around 0.3.
[0130] In summary, the present application not only considers the algorithm sensitivity of different data sets, selects the optimal combination of preprocessing and dimension reduction method, but also provides an effective distance measure for the corresponding optimal consistency matrix, fully utilizes the distance information between cells, and greatly improves the clustering effect.
[0131] Example 2
[0132] The present application provides a single cell clustering system based on consistency matrix score, comprising:
[0133] A data acquisition module for acquiring gene expression data;
[0134] After combination and dimension reduction based on the gene expression data, a plurality of consistency matrices are obtained, each consistency matrix is clustered to obtain a corresponding clustering result;
[0135] a consistency matrix scoring module, which is configured to combine the consistency matrix and the corresponding clustering result thereof, and calculate the f-value of each consistency matrix by using a scoring method, wherein the consistency matrix corresponding to the highest f-value is the optimal consistency matrix; wherein the combination of the consistency matrix and the corresponding clustering result thereof, and the calculation of the f-value of each consistency matrix by using the scoring method specifically include:
[0136] calculating the inter-class distance and the intra-class distance of each row in the consistency matrix; obtaining the corresponding f-value based on the inter-class distance and the intra-class distance of each row, and integrating the f-values of the rows to obtain the f-value of the consistency matrix;
[0137] a clustering module, which is configured to construct the distance matrix between cells based on the obtained optimal consistency matrix, and obtain the final clustering result by using hierarchical clustering on the distance matrix between cells.
[0138] Embodiment Three
[0139] The embodiment provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the steps in the single cell clustering method based on consistency matrix scoring.
[0140] Embodiment Four
[0141] The embodiment provides a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the single cell clustering method based on consistency matrix scoring when executing the program.
[0142] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer usable program code.
[0143] The embodiments of methods, apparatuses (systems) and computer program products according to the present application can be described in the general context of method steps and processes, which can be implemented in one embodiment by a program of instructions on a computer-readable storage medium executed by a computer or other programmable apparatus. The apparatuses can be specially constructed for executing the embodiments of methods, apparatuses (systems) and computer program products according to the present application or can include a computer or other programmable apparatus. Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow or block. Figure 1 The apparatus that carries out the functions specified in one or more flows and / or blocks.
[0144] The computer program instructions can also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow or block. Figure 1 The apparatus that carries out the functions specified in one or more flows and / or blocks.
[0145] The computer program instructions can also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow or block. Figure 1 The apparatus that carries out the functions specified in one or more flows and / or blocks.
[0146] A person of ordinary skill in the art can understand that all or part of the above-mentioned method embodiments can be implemented by computer program instructions, and the program can be stored in a computer readable storage medium. When the program is executed, it can include the flow of each method embodiment described above. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc.
[0147] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for single cell clustering based on consensus matrix score, characterized in that, Includes the following steps: Obtain gene expression data; After performing dimensionality reduction based on gene expression data, multiple consistency matrices are obtained. Each consistency matrix is then clustered to obtain the corresponding clustering results. The consistency matrix and the corresponding clustering result are combined, and a scoring method is used to calculate the f- value The consistency matrix with the highest f-value score is the optimal consistency matrix; wherein the consistency matrix and the corresponding clustering result are combined, and a scoring method is used to calculate the f-value , and specifically includes: Calculate the inter-class distance and intra-class distance of each row in the consistency matrix; obtain the corresponding f-value inter-class distance and intra-class distance of each row based on the inter-class distance and intra-class distance of each row f-value integrate together to obtain the f-value inter-class distance and intra-class distance of the consistency matrix Based on the obtained optimal consistency matrix, a distance matrix between cells is constructed, and hierarchical clustering is applied to the distance matrix between cells to obtain the final clustering result; the construction of the distance matrix between cells includes: The optimal consistency matrix is used as the initial inter-cell correlation coefficient matrix; Introduction The difference between the exponential increase correlation coefficients is introduced, thereby constructing an adjacency matrix; The connectivity and topological overlap matrix of each cell are obtained based on the adjacency matrix, and the distance matrix between cells is obtained based on the topological overlap matrix.
2. The consensus matrix score based single cell clustering method of claim 1, wherein, After acquiring gene expression data, data preprocessing is performed, specifically including: Gene expression data were filtered to remove genes whose expression rates were outside the set range; After gene filtering, the Euclidean distance, Pearson distance, and Spearman distance between cells were calculated for each preprocessed expression matrix.
3. The single-cell clustering method based on consistency matrix scoring as described in claim 1, characterized in that, The formulas for the inter-class distance and intra-class distance in each row of the consistency matrix are as follows: The formula for the inter-class distance in each row of the consistency matrix is: in, It is the clustering result The Middle The number of cells in each cluster; It is the clustering result The number of clusters; It is a consistency matrix The Middle The mean of the rows; It is a consistency matrix The Middle Rows in clustering results The first in The mean of each cluster; The formula for the intra-class distance in each row of the consistency matrix is: in, It is a consistency matrix The number of rows is the total number of cells; Representing the consistency matrix The Middle row and number The value of the column; Represents the total distance.
4. The single-cell clustering method based on consistency matrix scoring as described in claim 1, characterized in that, When the The cell and the first The greater the topological correlation between cells, the closer the corresponding two cells are.
5. The single-cell clustering method based on consistency matrix scoring as described in claim 1, characterized in that, The combined dimensionality reduction of gene expression data includes three methods: PCA+UMAP, LE+UMAP, and LE+PCA, which are pairwise combinations of principal component analysis.
6. The single-cell clustering method based on consistency matrix scoring as described in claim 1, characterized in that, After obtaining the corresponding clustering results, each clustering result is converted into a 0-1 binary matrix. The conversion process is as follows: Suppose there exists a clustering result In the middle, the first The cell and the first If all cells belong to the same category, then in this clustering result... The corresponding binary matrix The first in Okay, number The value in the column is 1; if the two cells do not belong to the same class, the binary value is 1. The corresponding value is 0.
7. A single-cell clustering system based on consistency matrix scoring, characterized in that, include: The data acquisition module is used to acquire gene expression data; After performing dimensionality reduction based on gene expression data, multiple consistency matrices are obtained. Each consistency matrix is then clustered to obtain the corresponding clustering results. The consistency matrix scoring module combines the consistency matrix with its corresponding clustering results and uses a scoring method to calculate the score for each consistency matrix. f-value ,Highest f-value The consistency matrix corresponding to the score is the optimal consistency matrix; wherein, the consistency matrix is calculated using a scoring method by combining the consistency matrix and its corresponding clustering results. f-value Specifically, it includes: Calculate the inter-class distance and intra-class distance for each row of the consistency matrix; based on the inter-class distance and intra-class distance of each row, obtain the corresponding... f-value , will each row f-value Integrating them together, we obtain the consistency matrix. f-value ; A clustering module is used to construct a distance matrix between cells based on the obtained optimal consistency matrix, and to perform hierarchical clustering on the distance matrix between cells to obtain the final clustering result; the construction of the distance matrix between cells includes: The optimal consistency matrix is used as the initial inter-cell correlation coefficient matrix; Introduction The exponential increases the difference between correlation coefficients, thereby constructing an adjacency matrix; The connectivity and topological overlap matrix of each cell are obtained based on the adjacency matrix, and the distance matrix between cells is obtained based on the topological overlap matrix.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in single-cell clustering based on consistency matrix scoring as described in any one of claims 1-6.
9. A computer device, 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 program, it implements the steps in single-cell clustering based on consistency matrix scoring as described in any one of claims 1-6.
Citation Information
Patent Citations
Single-cell transcriptome sequencing data clustering method and system based on multi-objective evolution
CN113257364A
Clustering analysis method for single-cell omics data
CN115527610A