A single-cell sequencing data clustering method and system based on similarity constraints
By constructing a joint non-negative matrix factorization model with similarity and dissimilarity constraints, combined with the Lagrange multiplier method and Karush-Kuhn-Tucher condition optimization, the problems of ignoring cell interactions and heterogeneity in single-cell sequencing data clustering are solved, and more accurate clustering and visualization are achieved.
Patent Information
- Application Number
- CN202411430702.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-10-14
AI Technical Summary
Existing single-cell sequencing data clustering methods ignore the complex interactions and heterogeneity between cells during the dimensionality reduction process, resulting in inaccurate clustering results.
By constructing a joint non-negative matrix factorization model with similarity and dissimilarity constraints, combined with the Lagrange multiplier method and Karush-Kuhn-Tucher conditions for optimization, the common coefficient matrix is extracted, and hierarchical clustering and visualization are performed.
The accuracy and visualization of single-cell sequencing data clustering are improved, ensuring that similar cells are clustered and different cells are separated, thereby enhancing data representation capabilities.
Smart Images

Figure CN119479819B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of single cell sequencing data clustering, in particular to a single cell sequencing data clustering method and system based on similarity constraints. BACKGROUND
[0002] Single cell RNA sequencing (scRNA-seq) technology is a key means to reveal the gene expression value at the level of a single cell. Unlike bulk sequencing technology based on the average value of the sequenced cell population, scRNA-seq technology can accurately reveal the whole genome gene expression of each single cell. In actual application, scRNA-seq usually needs to be processed by dimensionality reduction before clustering. The quantification method of gene expression data is various, such as Kallisto, Salmon, etc. The differences between different methods may lead to inconsistency of gene expression. Based on single method data, false positives may be introduced, thereby affecting the accuracy of clustering effect. Therefore, some scholars propose to use a joint non-negative matrix factorization model to integrate gene expression matrices obtained by different measurement methods. For example, some scholars propose to apply this model to single cell transcriptome data, and further take gene expression matrices from different quantification methods as inputs of the joint non-negative matrix factorization model to improve the accuracy and reliability of clustering analysis. However, the related technology oversimplifies the relationship model between cells, ignores the complex interaction and heterogeneity between cells, and causes the loss of correlation and shared structure information between cells in the dimensionality reduction process, thereby causing poor clustering performance of the algorithm. SUMMARY
[0003] In order to solve the above technical problems, the purpose of the present application is to provide a single cell sequencing data clustering method and system based on similarity constraints, which can realize better single cell sequencing data clustering effect by mining the joint similarity and non-similarity constraints of multiple gene expression matrices and improving the ability of the model to extract features.
[0004] The first technical solution adopted by the present application is: a single cell sequencing data clustering method based on similarity constraints, comprising the following steps:
[0005] Obtain Fastq sequencing files and perform quantitative analysis and data preprocessing to obtain a preprocessed gene expression matrix;
[0006] Extract similarity priori knowledge and non-similarity priori knowledge from the preprocessed gene expression matrix to construct a similarity matrix and a non-similarity matrix;
[0007] Construct a joint non-negative matrix factorization model according to the similarity matrix and the non-similarity matrix and perform dimensionality reduction processing to obtain a common coefficient matrix;
[0008] Hierarchical clustering and visualization processing are performed on the public coefficient matrix to obtain a single-cell sequencing data clustering result.
[0009] Further, the step of obtaining Fastq sequencing files and performing quantitative analysis and data preprocessing to obtain a preprocessed gene expression matrix specifically includes:
[0010] Fastq sequencing files are obtained based on the scRNA-seq data set;
[0011] The Fastq sequencing files are aligned and quantified by Salmon and Kalisto quantitative methods respectively to obtain a gene expression matrix, wherein the gene expression matrix includes a first gene expression matrix and a second gene expression matrix;
[0012] The gene expression matrix is subjected to redundant gene removal and normalization processing to obtain a preprocessed gene expression matrix.
[0013] Further, the step of extracting similarity priori knowledge and non-similarity priori knowledge from the preprocessed gene expression matrix to construct a similarity matrix and a non-similarity matrix specifically includes:
[0014] The cells in the preprocessed gene expression matrix are subjected to Euclidean distance calculation to construct an Euclidean distance square matrix, wherein the dimension of the Euclidean distance square matrix is the number of cells;
[0015] The Euclidean distance square matrix is subjected to conversion processing, wherein the first n smallest elements in each row of the Euclidean distance square matrix are retained, and the remaining elements are replaced with 0 to obtain a first converted Euclidean distance square matrix;
[0016] The first converted Euclidean distance square matrix is mapped by a Gaussian kernel function to obtain a first Euclidean distance weight value;
[0017] The cells in the first converted Euclidean distance square matrix are subjected to linear relationship calculation by a Pearson coefficient to obtain a first similarity coefficient;
[0018] The first Euclidean distance weight value and the first similarity coefficient are multiplied to obtain a similarity matrix, wherein the similarity matrix includes a first similarity matrix and a second similarity matrix;
[0019] The Euclidean distance square matrix is subjected to conversion processing, wherein the first n largest elements in each row of the Euclidean distance square matrix are retained, and the remaining elements are replaced with 0 to obtain a second converted Euclidean distance square matrix;
[0020] The second converted Euclidean distance square matrix is mapped by a 1-Gaussian kernel function to obtain a second Euclidean distance weight value;
[0021] The linear relationship between the cells in the second transformed Euclidean distance matrix is calculated by 1-Pearson coefficient to obtain the second similarity coefficient;
[0022] The second Euclidean distance weight value is multiplied by the second similarity coefficient to obtain a dissimilarity matrix, where the dissimilarity matrix includes the first dissimilarity matrix and the second dissimilarity matrix.
[0023] Furthermore, the step of constructing a joint non-negative matrix decomposition model based on the similarity matrix and the dissimilarity matrix and performing dimensionality reduction processing to obtain a common coefficient matrix specifically includes:
[0024] The first similarity matrix is fused with the second similarity matrix to obtain a similarity constraint;
[0025] The first dissimilarity matrix is fused with the second dissimilarity matrix to obtain a dissimilarity constraint;
[0026] Introducing sparse constraints, combining similarity constraints with dissimilarity constraints, and constructing a joint non-negative matrix factorization model;
[0027] Combining the Lagrange multiplier method with the Karush-Kuhn-Tucher condition, the joint non-negative matrix factorization model is optimized and dimensionally reduced to obtain the common coefficient matrix.
[0028] Furthermore, the objective function of the joint non-negative matrix factorization model is specifically expressed as follows:
[0029]
[0030] In the above formula, D1 represents the first gene expression matrix, D2 represents the second gene expression matrix, W1 and W2 represent the basic matrices obtained by decomposing D1 and D2 through the joint non-negative matrix decomposition model, H represents the shared coefficient matrix extracted from D1 and D2 through the joint non-negative matrix decomposition model, S represents the similarity constraint, and V represents the dissimilarity constraint. represents the square matrix composed of the Euclidean distances between cells, λ1 represents the balance function of the decomposition of the two gene expression matrices, and λ2, λ3 and λ4 represent regularization parameters.
[0031] Furthermore, the common coefficient matrix is updated. The expression of the update criterion of the common coefficient matrix is specifically as follows:
[0032]
[0033] In the above formula, D1 represents the first gene expression matrix, D2 represents the second gene expression matrix, W1 and W2 represent the basic matrices obtained by decomposing D1 and D2 through the joint non-negative matrix decomposition model, H represents the shared coefficient matrix extracted from D1 and D2 through the joint non-negative matrix decomposition model, S represents the similarity constraint, V represents the dissimilarity constraint, λ1 represents the balance function of the decomposition of the two gene expression matrices, λ3 and λ4 represent regularization parameters, represents the transposed matrix of the basic matrix obtained by decomposing the first gene expression matrix through the joint non-negative matrix factorization model, H represents the transposed matrix of the basic matrix obtained by decomposing the second gene expression matrix through the joint non-negative matrix factorization model, T Represents the transposed matrix of the shared coefficient matrix.
[0034] Furthermore, the step of performing hierarchical clustering and visualization processing on the common coefficient matrix to obtain the clustering results of the single-cell sequencing data specifically includes:
[0035] The common coefficient matrix was hierarchically clustered using a variance-based hierarchical clustering method to obtain preliminary clustering results for single-cell sequencing data.
[0036] The preliminary single-cell sequencing data clustering results were projected into two-dimensional space using the t-SNE visualization method to obtain the single-cell sequencing data clustering results.
[0037] The second technical solution adopted by the present invention is: a single-cell sequencing data clustering system based on similarity constraints, comprising:
[0038] The first module is used to obtain Fastq sequencing files and perform quantitative analysis and data preprocessing to obtain the preprocessed gene expression matrix;
[0039] The second module is used to extract similarity prior knowledge and dissimilarity prior knowledge from the preprocessed gene expression matrix and construct similarity matrix and dissimilarity matrix;
[0040] The third module is used to construct a joint non-negative matrix factorization model based on the similarity matrix and the dissimilarity matrix and perform dimensionality reduction processing to obtain a common coefficient matrix;
[0041] The fourth module is used to perform hierarchical clustering and visualization on the common coefficient matrix to obtain the clustering results of single-cell sequencing data.
[0042] The beneficial effects of the method and system of the present invention are as follows: the present invention obtains a Fastq sequencing file and performs quantitative analysis and data preprocessing to obtain a preprocessed gene expression matrix, further extracts similarity prior knowledge and dissimilarity prior knowledge from the preprocessed gene expression matrix, constructs a similarity matrix and a dissimilarity matrix, and promotes similar cells to be closer and dissimilar cells to be further away by mining the joint similarity and dissimilarity constraints of multiple gene expression matrices, thereby ensuring the accuracy of clustering and enhancing data representation. Then, a joint non-negative matrix decomposition model is constructed based on the similarity matrix and the dissimilarity matrix and dimensionality reduction processing is performed to obtain a common coefficient matrix. Finally, the common coefficient matrix is hierarchically clustered and visualized to obtain the clustering results of single-cell sequencing data. Coefficient constraints are imposed on the coefficient matrix of the joint non-negative matrix decomposition model to avoid redundant features affecting the output results, improve the ability of the model to extract features, construct a single-cell clustering visualization diagram, and enable intuitive observation of the distribution and clustering pattern of cell clusters. In the two-dimensional visualization diagram, similar cells can be clustered together and different cells can be separated from each other, thereby improving the clustering effect of single-cell sequencing data. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a flowchart of the steps of a single-cell sequencing data clustering method based on similarity constraints of the present invention;
[0044] Figure 2 This is a structural block diagram of a single-cell sequencing data clustering system based on similarity constraints of the present invention;
[0045] Figure 3 This is a schematic diagram of the visualization results of clustering of single-cell sequencing data provided by a specific embodiment of the present invention. DETAILED DESCRIPTION
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are provided for ease of description only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted based on the understanding of those skilled in the art.
[0047] First of all, it should be noted that dimensionality reduction is usually required before clustering. Dimensionality reduction plays a key role in this process, and it helps to analyze the complex structure and changes of single-cell data. Its main purpose is to convert high-dimensional data, which usually contains thousands of gene expression features, into a lower-dimensional representation while retaining the key information in the data as much as possible. This approach facilitates the visualization and interpretation of the data, enables the discovery of potential cell subpopulations, and understands the changes in cell state under different conditions. Non-negative matrix factorization (NMF) is a commonly used unsupervised machine learning dimensionality reduction algorithm, which is particularly suitable for extracting meaningful features from non-negative data matrices. The core idea of NMF is to decompose a non-negative data matrix into the product of two non-negative matrices, where one matrix represents the feature space and the other represents the sample weights. In the field of bioinformatics, NMF is widely used to process single-cell transcriptome data.
[0048] The traditional joint non-negative matrix factorization (JNMF) model currently applied to single-cell sequencing data ignores the underlying prior knowledge between multi-omics data, oversimplifies the relationship model between cells, and ignores the complex interactions and heterogeneity between cells. Furthermore, existing JNMF improvements do not consider the prior knowledge of similarities and dissimilarity between cells. This may cluster similar cells into different categories or dissimilar cells into the same category, resulting in inaccurate clustering results. To this end, we propose an algorithm based on JNMF that incorporates prior knowledge of cell similarity and dissimilarity, called the joint non-negative matrix factorization model with similarity and dissimilarity constraints (SDJNMF).
[0049] Based on this, refer to Figure 1 The present invention provides a single-cell sequencing data clustering method based on similarity constraints, which includes the following steps:
[0050] S100, obtaining Fastq sequencing files and performing quantitative analysis and data preprocessing to obtain a preprocessed gene expression matrix;
[0051] S110, obtain Fastq sequencing files based on scRNA-seq dataset;
[0052] In this example, the Fastq sequencing files of the required scRNA-seq dataset were downloaded from the GEO database. These Fastq files contain the base information of the DNA sequence and the quality score of each base during the sequencing process. This data can be used for various bioinformatics analyses, such as genome assembly, gene expression analysis, and SNP (single nucleotide polymorphism) detection.
[0053] S120, aligning and quantifying the Fastq sequencing file using a Salmon quantification method and a Kalisto quantification method, respectively, to obtain a gene expression matrix, wherein the gene expression matrix includes a first gene expression matrix and a second gene expression matrix;
[0054] In the present embodiment, according to the species of the downloaded single-cell sequencing data, the corresponding reference transcriptome file is downloaded. In Salmon and Kalisto software, the reference transcriptome file is used to build the index file required for Salmon. This step only needs to be performed once, and the same index file can be reused in subsequent analysis. Subsequently, Salmon and Kalisto software are run to specify the path of the reference transcriptome file, the path of the original sequencing data file and other relevant parameters, such as sample information file, technical repetitions, etc., and then Salmon and Kalisto software are run to compare and quantify, and the expression amount estimation results of the gene are generated. These results will be stored in text format, and for this reason, the text data needs to be converted into tabular data, so that subsequent cluster analysis, at this time, the gene expression matrix with two cells being identical but with different gene expressions, i.e. the first gene expression matrix and the second gene expression matrix, has been obtained.
[0055] S130, performing redundant gene removal and normalization processing on the gene expression matrix to obtain a preprocessed gene expression matrix.
[0056] In this embodiment, referring to the SC3 method, redundant genes in the gene expression matrix were removed to reduce the impact of redundant information on the clustering results. The data were then converted using a log2(x+1) processing method. Finally, the data were normalized to reduce the computational load. To meet the basic requirements of non-negative matrix decomposition, it is necessary to ensure that each value in the gene expression matrix is non-negative.
[0057] S200, extracting similarity prior knowledge and dissimilarity prior knowledge from the preprocessed gene expression matrix to construct a similarity matrix and a dissimilarity matrix;
[0058] Specifically, the Euclidean distance of cells in the pre-processed gene expression matrix is calculated to construct a Euclidean distance matrix, where the dimension of the Euclidean distance matrix is the number of cells.
[0059] The Euclidean distance matrix is transformed, the first n smallest elements in each row of the Euclidean distance matrix are retained, and the remaining elements are replaced by 0 to obtain a first transformed Euclidean distance matrix; the first transformed Euclidean distance matrix is mapped by a Gaussian kernel function to obtain a first Euclidean distance weight value; the linear relationship of the cells in the first transformed Euclidean distance matrix is calculated by the Pearson coefficient to obtain a first similarity coefficient; the first Euclidean distance weight value is multiplied by the first similarity coefficient to obtain a similarity matrix, wherein the similarity matrix includes the first similarity matrix and the second similarity matrix.
[0060] The Euclidean distance matrix is transformed, the largest first n elements in each row of the Euclidean distance matrix are retained, and the remaining elements are replaced by 0 to obtain a second transformed Euclidean distance matrix; the second transformed Euclidean distance matrix is mapped by a 1-Gaussian kernel function to obtain a second Euclidean distance weight value; the linear relationship of the cells in the second transformed Euclidean distance matrix is calculated by a 1-Pearson coefficient to obtain a second similarity coefficient; the second Euclidean distance weight value is multiplied by the second similarity coefficient to obtain a dissimilarity matrix, wherein the dissimilarity matrix includes the first dissimilarity matrix and the second dissimilarity matrix.
[0061] In this embodiment, the Euclidean distance between each cell in each gene expression matrix is first calculated separately. The larger the Euclidean distance, the smaller the similarity between cells. This is used to form a Euclidean distance matrix with the number of cells as the dimension. When calculating similarity, the present invention introduces the Pearson correlation coefficient and the Gaussian kernel function. Specifically, the three smallest values in each row of the Euclidean distance matrix are used as variables for the Pearson correlation coefficient and the Gaussian kernel function. The remaining values are converted to 0 to obtain the Euclidean distance matrix after the first conversion. The Gaussian kernel function is then multiplied by the Pearson correlation coefficient to obtain the product. The Gaussian kernel function maps the gene expression of cells into a high-dimensional space, making it linearly separable and can represent the weight of the Euclidean distance between cells. The Pearson coefficient can measure the linear relationship between two variables. Therefore, introducing the Pearson coefficient into the similarity matrix can better explore the correlation between cells. In summary, combining the Gaussian kernel function and the Pearson correlation coefficient for weighting can better calculate the similarity between cells. At this point, the similarity matrix is constructed. Similarly, when calculating dissimilarity, the Pearson correlation coefficient and Gaussian kernel function are also introduced. Specifically, the three largest values in each row of the Euclidean distance matrix are used as variables for the Pearson correlation coefficient and Gaussian kernel function, and the remaining values are converted to 0 to obtain the second converted Euclidean distance matrix. Since the calculated Pearson correlation coefficient and Gaussian kernel function are both positive numbers less than 1, (1-Gaussian kernel function) and (1-Pearson correlation coefficient) are then multiplied to obtain the product to form the dissimilarity matrix.
[0062] S300, constructing a joint non-negative matrix factorization model according to the similarity matrix and the dissimilarity matrix and performing dimension reduction processing to obtain a common coefficient matrix;
[0063] S310, fusing the first similarity matrix and the second similarity matrix to obtain a similarity constraint;
[0064] S320, fusing the first dissimilarity matrix and the second dissimilarity matrix to obtain a dissimilarity constraint;
[0065] In the embodiment, the similarity and dissimilarity matrices of the two gene expression matrices (i.e. the first gene expression matrix and the second gene expression matrix) are fused to construct the similarity constraint and the dissimilarity constraint. Specifically, if the values of the same position in the two similarity matrices are not both 0, the sum of the two values is taken as the value of the position of the joint similarity matrix, otherwise the value of the position of the joint similarity matrix is 0. Similarly, if the values of the same position in the two dissimilarity matrices are not both 0, the sum of the two values is taken as the value of the position of the joint similarity matrix, otherwise the value of the position of the joint similarity matrix is 0.
[0066] S330, introducing a sparsity constraint, combining the similarity constraint and the dissimilarity constraint, and constructing a joint non-negative matrix factorization model;
[0067] In the embodiment, based on the construction of the joint similarity and dissimilarity matrices described above, the common coefficient matrix of the joint non-negative matrix factorization model is subjected to a sparsity constraint to ensure that the cell characteristics are extracted in a sparse environment, and the objective function of the joint non-negative matrix factorization model is obtained, which is specifically as follows:
[0068]
[0069] In the above formula, D1 represents the first gene expression matrix, D2 represents the second gene expression matrix, W1 and W2 respectively represent the base matrices obtained by decomposing D1 and D2 by the joint non-negative matrix factorization model, H represents the shared coefficient matrix obtained by extracting D1 and D2 by the joint non-negative matrix factorization model, S represents the similarity constraint, V represents the dissimilarity constraint, represents a square matrix composed of the Euclidean distances between cells, λ1 represents a balance function of the decomposition of the two gene expression matrices, and λ2, λ3 and λ4 represent regularization parameters.
[0070] wherein the balance function of the decomposition of the two gene expression matrices is set as λ1 = |gene number of D1| / |gene number of D2|.
[0071] S340. Combining the Lagrange multiplier method with the Karush-Kuhn-Tucher condition, the joint non-negative matrix factorization model is optimized and dimensionally reduced to obtain a common coefficient matrix.
[0072] In this embodiment, the objective function is optimized using the Lagrange multiplier method combined with the Karush-Kuhn-Tucher condition to obtain the update criteria for the common coefficient matrix and the basic matrix, as shown below:
[0073]
[0074]
[0075] In the above formula, D1 represents the first gene expression matrix, D2 represents the second gene expression matrix, W1 and W2 represent the basic matrices obtained by decomposing D1 and D2 through the joint non-negative matrix decomposition model, H represents the shared coefficient matrix extracted from D1 and D2 through the joint non-negative matrix decomposition model, S represents the similarity constraint, V represents the dissimilarity constraint, λ1 represents the balance function of the decomposition of the two gene expression matrices, λ3 and λ4 represent regularization parameters, represents the transposed matrix of the basic matrix obtained by decomposing the first gene expression matrix through the joint non-negative matrix factorization model, H represents the transposed matrix of the basic matrix obtained by decomposing the second gene expression matrix through the joint non-negative matrix factorization model, T Represents the transposed matrix of the shared coefficient matrix.
[0076] S400: Perform hierarchical clustering and visualization on the common coefficient matrix to obtain clustering results of single-cell sequencing data.
[0077] S410, performing hierarchical clustering on the common coefficient matrix using a variance-based hierarchical clustering method to obtain preliminary single-cell sequencing data clustering results;
[0078] In this embodiment, hierarchical clustering is performed using the common coefficient matrix obtained by dimensionality reduction, and the hierarchical clustering method used in the embodiment of the present invention is the Ward method. The Ward method is a variance-based hierarchical clustering algorithm, the idea of which is to select clusters at each step whose merger can minimize the increase in total internal variance after the merger of two clusters. Specifically, Ward's method calculates the increase in variance between each pair of clusters and selects two clusters that minimize the increase in internal variance after the merger to merge. The advantage of this method is that it tends to form clusters of similar size, so it can effectively capture the structure and pattern in the data. In the process of performing hierarchical clustering, the Ward method gradually merges samples or features until all samples or features are aggregated into one cluster. This forms a hierarchical clustering structure that can be visualized through a tree diagram (dendrogram). In the tree diagram, branches at lower positions represent more similar samples or features, while branches at higher positions represent greater differences.
[0079] S420. Project the preliminary single-cell sequencing data clustering results into two-dimensional space using the t-SNE visualization method to obtain the single-cell sequencing data clustering results.
[0080] In this embodiment, after dimensionality reduction of the scRNA-seq data, a common coefficient matrix representing the expression pattern of cells in the latent space will be obtained. This matrix captures the key structures in the data and projects the cells into a low-dimensional space. In order to better understand these reduced-dimensional data, the embodiment of the present invention uses the t-SNE algorithm for visualization. t-SNE can map high-dimensional data to two-dimensional or three-dimensional space, maintaining the local structural relationship between data points. In this reduced-dimensional space, the similarities between cells are more intuitively represented, so that potential cell subtypes or gene expression patterns can be more clearly observed.
[0081] like Figure 3 As shown in Figure 2, by plotting a scatter plot of the t-SNE visualization results and coloring them according to cell type or sample attributes, the distribution and clustering patterns of cell clusters can be intuitively observed. This visualization not only helps discover structures and relationships in the data, but also provides important clues for subsequent biological interpretation and analysis.
[0082] Reference Figure 2 , a single-cell sequencing data clustering system based on similarity constraints, including:
[0083] The first module 201 is used to obtain Fastq sequencing files and perform quantitative analysis and data preprocessing to obtain a preprocessed gene expression matrix;
[0084] The second module 202 is used to extract similarity prior knowledge and dissimilarity prior knowledge from the pre-processed gene expression matrix to construct a similarity matrix and a dissimilarity matrix;
[0085] The third module 203 is used to construct a joint non-negative matrix factorization model based on the similarity matrix and the dissimilarity matrix and perform dimensionality reduction processing to obtain a common coefficient matrix;
[0086] The fourth module 204 is used to perform hierarchical clustering and visualization processing on the common coefficient matrix to obtain the clustering results of the single-cell sequencing data.
[0087] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0088] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A single-cell sequencing data clustering method based on similarity constraints, characterized in that: The following steps are involved: Obtain Fastq sequencing files and perform quantitative analysis and data preprocessing to obtain the preprocessed gene expression matrix; Calculating the Euclidean distance of cells in the preprocessed gene expression matrix to construct a Euclidean distance matrix, where the dimension of the Euclidean distance matrix is the number of cells; Perform transformation on the Euclidean distance matrix, retain the first n smallest elements in each row of the Euclidean distance matrix, and replace the remaining elements with 0 to obtain the Euclidean distance matrix after the first transformation; Mapping the first transformed Euclidean distance matrix through the Gaussian kernel function to obtain a first Euclidean distance weight value; The linear relationship between the cells in the first transformed Euclidean distance matrix is calculated using the Pearson coefficient to obtain the first similarity coefficient; Multiplying the first Euclidean distance weight value and the first similarity coefficient to obtain a similarity matrix, wherein the similarity matrix includes the first similarity matrix and the second similarity matrix; Transform the Euclidean distance matrix, retain the largest first n elements in each row of the Euclidean distance matrix, and replace the remaining elements with 0 to obtain the second transformed Euclidean distance matrix; The second transformed Euclidean distance matrix is mapped by a 1-Gaussian kernel function to obtain a second Euclidean distance weight value; The linear relationship between the cells in the second transformed Euclidean distance matrix is calculated by 1-Pearson coefficient to obtain the second similarity coefficient; Multiplying the second Euclidean distance weight value and the second similarity coefficient to obtain a dissimilarity matrix, wherein the dissimilarity matrix includes the first dissimilarity matrix and the second dissimilarity matrix; A joint non-negative matrix factorization model is constructed based on the similarity matrix and the dissimilarity matrix, and dimensionality reduction is performed to obtain a common coefficient matrix. Hierarchical clustering and visualization were performed on the common coefficient matrix to obtain the clustering results of single-cell sequencing data.
2. The single-cell sequencing data clustering method based on similarity constraints according to claim 1, characterized in that: The step of obtaining a Fastq sequencing file and performing quantitative analysis and data preprocessing to obtain a preprocessed gene expression matrix specifically includes: Obtain Fastq sequencing files based on scRNA-seq datasets; The Fastq sequencing files are aligned and quantified by the Salmon quantification method and the Kallisto quantification method, respectively, to obtain a gene expression matrix, wherein the gene expression matrix includes a first gene expression matrix and a second gene expression matrix; The gene expression matrix was subjected to redundant gene removal and normalization processing to obtain the preprocessed gene expression matrix.
3. The single-cell sequencing data clustering method based on similarity constraints according to claim 2, characterized in that: The step of constructing a joint non-negative matrix decomposition model based on the similarity matrix and the dissimilarity matrix and performing dimensionality reduction processing to obtain a common coefficient matrix specifically includes: The first similarity matrix is fused with the second similarity matrix to obtain a similarity constraint; The first dissimilarity matrix is fused with the second dissimilarity matrix to obtain a dissimilarity constraint; Introducing sparse constraints, combining similarity constraints with dissimilarity constraints, and constructing a joint non-negative matrix factorization model; Combining the Lagrange multiplier method with the Karush-Kuhn-Tucher condition, the joint non-negative matrix factorization model is optimized and dimensionally reduced to obtain the common coefficient matrix.
4. The single-cell sequencing data clustering method based on similarity constraints according to claim 3, characterized in that: The objective function of the joint non-negative matrix factorization model is specifically expressed as follows: In the above formula, represents the first gene expression matrix, represents the second gene expression matrix, 、 Respectively and The basic matrix obtained by decomposition of the joint non-negative matrix factorization model is express and The shared coefficient matrix extracted by the joint non-negative matrix decomposition model is represents the similarity constraint, represents the non-similarity constraint, represents a square matrix consisting of the Euclidean distances between cells, represents the balance function of the decomposition of two gene expression matrices, 、 and represents the regularization parameter.
5. The single-cell sequencing data clustering method based on similarity constraints according to claim 4, characterized in that: It also includes updating the common coefficient matrix. The expression of the update criterion of the common coefficient matrix is as follows: In the above formula, represents the first gene expression matrix, represents the second gene expression matrix, 、 Respectively and The basic matrix obtained by decomposition of the joint non-negative matrix factorization model is express and The shared coefficient matrix extracted by the joint non-negative matrix decomposition model is represents the similarity constraint, represents the non-similarity constraint, represents the balance function of the decomposition of two gene expression matrices, and represents the regularization parameter, represents the transposed matrix of the basic matrix obtained by decomposing the first gene expression matrix through the joint non-negative matrix factorization model, represents the transposed matrix of the basic matrix obtained by decomposing the second gene expression matrix through the joint non-negative matrix factorization model, Represents the transposed matrix of the shared coefficient matrix.
6. The single-cell sequencing data clustering method based on similarity constraints according to claim 5, characterized in that: The step of performing hierarchical clustering and visualization processing on the common coefficient matrix to obtain the clustering results of the single-cell sequencing data specifically includes: The common coefficient matrix was hierarchically clustered using a variance-based hierarchical clustering method to obtain preliminary clustering results for single-cell sequencing data. The preliminary single-cell sequencing data clustering results were projected into two-dimensional space using the t-SNE visualization method to obtain the single-cell sequencing data clustering results.
7. A single-cell sequencing data clustering system based on similarity constraints, characterized in that: Includes the following modules: The first module is used to obtain Fastq sequencing files and perform quantitative analysis and data preprocessing to obtain the preprocessed gene expression matrix; The second module is used to calculate the Euclidean distance of cells in the preprocessed gene expression matrix and construct a Euclidean distance matrix, where the dimension of the Euclidean distance matrix is the number of cells; Perform transformation on the Euclidean distance matrix, retain the first n smallest elements in each row of the Euclidean distance matrix, and replace the remaining elements with 0 to obtain the Euclidean distance matrix after the first transformation; Mapping the first transformed Euclidean distance matrix through the Gaussian kernel function to obtain a first Euclidean distance weight value; The linear relationship between the cells in the first transformed Euclidean distance matrix is calculated using the Pearson coefficient to obtain the first similarity coefficient; Multiplying the first Euclidean distance weight value and the first similarity coefficient to obtain a similarity matrix, wherein the similarity matrix includes the first similarity matrix and the second similarity matrix; Transform the Euclidean distance matrix, retain the largest first n elements in each row of the Euclidean distance matrix, and replace the remaining elements with 0 to obtain the second transformed Euclidean distance matrix; The second transformed Euclidean distance matrix is mapped by a 1-Gaussian kernel function to obtain a second Euclidean distance weight value; The linear relationship between the cells in the second transformed Euclidean distance matrix is calculated by 1-Pearson coefficient to obtain the second similarity coefficient; Multiplying the second Euclidean distance weight value and the second similarity coefficient to obtain a dissimilarity matrix, wherein the dissimilarity matrix includes the first dissimilarity matrix and the second dissimilarity matrix; The third module is used to construct a joint non-negative matrix factorization model based on the similarity matrix and the dissimilarity matrix and perform dimensionality reduction processing to obtain a common coefficient matrix; The fourth module is used to perform hierarchical clustering and visualization on the common coefficient matrix to obtain the clustering results of single-cell sequencing data.
Citation Information
Patent Citations
Single cell clustering method and system based on consistency matrix scoring
CN116741267A
Single-cell RNA sequencing data clustering method based on Transform model prediction
CN118380048A