Single-cell RNA (Ribonucleic Acid) sequencing data clustering method
By combining the attention fusion and self-supervision strategies of the ZINB autoencoding module and the graph autoencoding module in single-cell RNA sequencing data clustering, the problem of smooth transition of the clustering method when there are too many layers is solved, and the clustering performance is improved. and robustness, achieving effective fusion of gene expression and cell structure information.
Patent Information
- Application Number
- CN202410787672.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-06-18
AI Technical Summary
Existing single-cell RNA sequencing data clustering methods are prone to smooth transitions when there are too many layers, and key patterns of gene expression are lost, resulting in poor clustering performance.
The ZINB-based autoencoding module and the graph autoencoding module are connected layer by layer through the attention fusion mechanism, combined with the self-supervision strategy, to fuse gene expression information and cell structure information into the same representation, through end-to-end clustering training and synchronization Optimize and generate high-quality cluster prediction models.
It improves the clustering performance of single-cell RNA sequencing data, captures high-order structural relationships and content information, and enhances the robustness and accuracy of clustering.
Smart Images

Figure CN118675623A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of RNA sequencing data clustering, and in particular to a single-cell RNA sequencing data clustering method. Background Art
[0002] Cell clustering is one of the most important tasks in single-cell RNA sequencing data analysis. However, due to the limitations of sequencing technology, single-cell RNA sequencing data has high sparsity and complex noise patterns. Traditional clustering methods such as kmeans and hierarchical clustering rely on similarity metrics and cannot meet the requirements of single-cell data clustering.
[0003] In order to better reveal the specific expression patterns of scRNA-seq data, deep embedding clustering algorithms have been proposed and used for cell type identification and clustering tasks, such as DESC, scDCC, scDeepCluster, etc.
[0004] These methods usually use an autoencoder to learn the latent representation of the data and the cluster assignment. However, these methods only focus on learning the data itself and ignore the relationship between cells, that is, the structural information of the data. Due to the sparsity of single-cell data, it is not ideal to learn the latent representation only from gene expression information to guide cell clustering. The structural information of cells (that is, the relationship between cells) must be embedded in the deep clustering method. Based on this idea, people have proposed deep graph embedding clustering algorithms to solve the problem of cell clustering, such as cGNN, scGAE, scDSC, etc. They usually use graph autoencoders to capture cell structure information to guide clustering. However, these methods are often prone to transition smoothness when there are many layers, thereby losing the key patterns of gene expression, and ultimately leading to poor cell clustering effects.
[0005] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0006] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a single-cell RNA sequencing data clustering method, aiming to solve the problem that the existing clustering methods based on cell RNA sequencing data are prone to transition smooth when there are too many layers, thereby losing the key patterns of gene expression and resulting in poor clustering performance.
[0007] The first aspect of the present invention provides a single-cell RNA sequencing data clustering method, comprising: obtaining single-cell RNA sequencing data, preprocessing the single-cell RNA sequencing data to obtain a single-cell RNA gene expression matrix X; constructing a cell-cell graph adjacency matrix A based on the single-cell RNA gene expression matrix X using a KNN method; constructing a ZINB-based autoencoder module and a graph autoencoder module; connecting the ZINB-based autoencoder module and the graph autoencoder module layer by layer through an attention fusion mechanism, and integrating the feature representation of gene expression information and the cell structure information through this layer-by-layer embedding operation. The invention relates to a method for efficiently fusing the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A into the same representation; integrating the ZINB-based autoencoder module and the graph autoencoder module into a unified framework through a self-supervised strategy; performing end-to-end clustering training and synchronous optimization on the two modules based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to obtain a clustering prediction model; processing the single-cell RNA sequencing data to be clustered, obtaining the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to be clustered, inputting them into the clustering prediction model, outputting an embedded representation, obtaining the predicted cell category according to the embedded representation and completing clustering.
[0008] Optionally, in a first implementation of the first aspect of the present invention, constructing a ZINB-based autoencoder module comprises the following steps: the autoencoder module is composed of a mutually symmetrical encoder and decoder, the encoder of the autoencoder module has a total of L layers, the single cell RNA gene expression matrix X is used as the initial input of the autoencoder module, and the input of the lth layer is H l-1 , then its output is expressed as: H l =φ(W l H l-1 +b i ), where φ is the activation function, W l represents the weight of the lth layer, b i Represents the bias vector of the lth layer; three independent fully connected layers are connected to the last layer of the decoder to estimate the three parameters of ZINB: probability parameter π, dispersion parameter θ and mean parameter μ, so as to integrate the ZINB model into the autoencoder module; ZINB distribution uses the three parameters to simulate the single-cell RNA sequencing data and reconstruct its data distribution: ZINB(X|π,μ,θ)=πδ0(X)+(1-π)NB(X|μ,θ); The final loss function of the ZINB-based autoencoder module is defined as the negative log-likelihood estimate of the ZINB distribution:
[0009] Optionally, in a second implementation of the first aspect of the present invention, the step of constructing a graph autoencoder module includes: the graph autoencoder module is composed of several layers of graph convolutional networks as a backbone network; the graph autoencoder module has a total of L layers, the cell-cell graph adjacency matrix A is used as the initial input of the first layer of the graph autoencoder module, and the input of the lth layer is Z l-1 , then its output is expressed as: Where I is the unit diagonal matrix, is the degree matrix, U l-1 Represents the weight of the l-1th layer, normalized adjacency matrix Z l-1 Propagate and get the new representation Z l .
[0010] Optionally, in a third implementation of the first aspect of the present invention, the ZINB-based autoencoder module and the graph autoencoder module are connected layer by layer through an attention fusion mechanism, and the step of effectively fusing the feature representation of gene expression information and the cell structure information into the same representation through this layer-by-layer embedding operation includes: performing layer-by-layer heterogeneous structure fusion embedding on the output of the ZINB-based autoencoder module and the output of the graph autoencoder module through an attention fusion module to obtain an integrated representation that integrates structure information and content information: R l-1 =F att (αH l-1 +(1-α)Z l-1 ), where α is an adjustable weight parameter, F att represents the attention fusion operation; uses integration to represent R l-1 As input to graph convolutional networks to learn high-level discriminative information and generate new representations
[0011] Optionally, in a fourth implementation of the first aspect of the present invention, the ZINB-based autoencoder module and the graph autoencoder module are integrated into a unified framework through a self-supervision strategy, and the two modules are subjected to end-to-end clustering training and synchronous optimization based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A, and the step of obtaining the clustering prediction model includes: outputting the intermediate layer of the ZINB-based autoencoder module Perform k-means clustering to obtain a set of initial cluster centers Where k is the number of clusters; the embedding representation is calculated using Student′st distribution and cluster centers The soft allocation between is as follows: where h i is the embedding representation The i-th sample of , λ represents the degrees of freedom of Student's t distribution, and the soft distribution q ij ∈Q, Q is the soft cluster distribution; on the basis of the soft cluster distribution Q, an auxiliary target distribution is set to supervise the learning of the soft cluster distribution, and the clustering is improved by learning the high confidence distribution of the target distribution. The soft cluster frequency is used to calculate the target distribution. The calculation method is as follows: in is the soft clustering frequency, the target distribution p ij ∈P; use the KL divergence loss between the soft clustering distribution Q and the target distribution P as the optimization target to obtain higher quality clustering: The target distribution P is used to supervise the learning of the graph self-encoding module: Among them, z ij ∈Z pre , Through the above two loss functions, the optimization objective is integrated into a target distribution P, making the learned representation suitable for clustering tasks.
[0012] The second aspect of the present invention provides a single-cell RNA sequencing data clustering device, comprising: a first data processing module, used to obtain single-cell RNA sequencing data, pre-process the single-cell RNA sequencing data, and obtain a single-cell RNA gene expression matrix X; a second data processing module, used to construct a cell-cell graph adjacency matrix A based on the single-cell RNA gene expression matrix X using a KNN method; a construction module, used to construct a ZINB-based autoencoder module and a graph autoencoder module; a fusion module, used to connect the ZINB-based autoencoder module and the graph autoencoder module layer by layer through an attention fusion mechanism, and embed the characteristics of gene expression information layer by layer through this layer-by-layer embedding operation. The feature representation and cell structure information are effectively integrated into the same representation; a training module is used to integrate the ZINB-based autoencoder module and the graph autoencoder module into a unified framework through a self-supervised strategy, and end-to-end clustering training and synchronous optimization are performed on the two modules based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to obtain a clustering prediction model; a clustering module is used to process the single-cell RNA sequencing data to be clustered to obtain the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to be clustered, input them into the clustering prediction model, output an embedded representation, obtain the predicted cell category according to the embedded representation and complete clustering.
[0013] The third aspect of the present invention provides a single-cell RNA sequencing data clustering device, comprising: a memory and at least one processor, wherein the memory stores computer-readable instructions, and the memory and the at least one processor are interconnected via lines; the at least one processor calls the computer-readable instructions in the memory so that the single-cell RNA sequencing data clustering device performs each step of the single-cell RNA sequencing data clustering method as described above.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable storage medium is run on a computer, the computer executes the various steps of the single-cell RNA sequencing data clustering method as described above.
[0015] Beneficial effects: The present invention provides a single-cell RNA sequencing data clustering method, which captures the high-order structural relationship in the single-cell RNA sequencing data through a multi-layer graph convolutional network (GCN) in a graph autoencoder module; in order to alleviate the problem of smooth transition of the graph GCN, a ZINB-based autoencoder module is introduced to extract the content information of the single-cell RNA sequencing data and learn the potential representation of the gene expression data; then the above two modules are fused and embedded layer by layer through an attention fusion mechanism, and used as the input of each layer of the GCN to guide the final clustering direction. Therefore, the method of the present invention improves the clustering performance by cross-fusing gene expression information and cell structure information. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A flowchart of a single-cell RNA sequencing data clustering method provided in an embodiment of the present invention.
[0017] Figure 2 Schematic diagram of the principle of the single-cell RNA sequencing data clustering method of the present invention.
[0018] Figure 3 Schematic diagram of cluster analysis evaluation index comparison between the method of the present invention (scASDC) and other six baseline methods on four data sets.
[0019] Figure 4 This is a schematic diagram showing the comparison of the dimensionality reduction visualization results of the final embedding representation using UMAP on the QS Limb Muscle dataset using the method of the present invention and other baseline methods.
[0020] Figure 5 A schematic diagram of the structure of a single-cell RNA sequencing data clustering device provided in an embodiment of the present invention.
[0021] Figure 6 A schematic diagram of the structure of a single-cell RNA sequencing data clustering device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] An embodiment of the present invention provides a method for clustering single-cell RNA sequencing data. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] See also Figure 1 , Figure 1 A flow chart of a preferred embodiment of a single-cell RNA sequencing data clustering method provided by the present invention is shown in the figure, which includes the steps of:
[0024] S10, acquiring single-cell RNA sequencing data, and preprocessing the single-cell RNA sequencing data to obtain a single-cell RNA gene expression matrix X;
[0025] S20, constructing a cell-cell graph adjacency matrix A using a KNN method according to the single-cell RNA gene expression matrix X;
[0026] S30, constructing a ZINB-based self-encoding module and a graph self-encoding module;
[0027] S40, connecting the ZINB-based autoencoder module and the graph autoencoder module layer by layer through an attention fusion mechanism, and effectively integrating the feature representation of gene expression information and cell structure information into the same representation through this layer-by-layer embedding operation;
[0028] S50, integrating the ZINB-based autoencoder module and the graph autoencoder module into a unified framework through a self-supervisory strategy, performing end-to-end clustering training and synchronous optimization on the two modules based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A, and obtaining a clustering prediction model;
[0029] S60, after processing the single-cell RNA sequencing data to be clustered, the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to be clustered are obtained, which are input into the clustering prediction model, and an embedded representation is output. The predicted cell category is obtained according to the embedded representation and clustering is completed.
[0030] Specifically, if Figure 2 As shown, the present invention uses the preprocessed single-cell RNA sequencing data matrix X as the input of the ZINB-based autoencoder module, which can learn a mapping from the data space to the low-dimensional feature space, capture the content information in the data, and obtain a low-dimensional potential representation containing feature information. The gene expression matrix and data distribution can be reconstructed through ZINB decoding; at the same time, the present invention constructs a cell-cell graph adjacency matrix A based on the single-cell RNA sequencing data matrix X, and uses it as the initial input of the graph autoencoder module. The module is composed of a multi-layer graph convolutional network, which can effectively extract high-order structural information between cells; value It should be noted that the present invention creatively connects the above two modules layer by layer through the attention fusion mechanism and serves as the input of each layer of the graph convolutional network. Through this layer-by-layer embedding operation, the feature representation and structural information of gene expression information can be effectively fused into the same representation; finally, the ZINB-based autoencoder module and the graph autoencoder module are integrated into a unified framework through a self-supervisory strategy, and the two modules are effectively end-to-end clustered and optimized synchronously to obtain a clustering prediction model; based on the clustering prediction model, the gene expression information and the cell structure information are cross-fused to improve the clustering performance. Therefore, the method of the present invention can learn the effective potential representation of cells and genes. This potential representation contains both the content information and the structural information of the original single-cell RNA sequencing data, and has better robustness in downstream analysis tasks such as single-cell clustering.
[0031] In some embodiments, after obtaining single-cell RNA sequencing data, the scRNA-seq gene expression count matrix is used. As input, n is the number of cells and g is the number of genes, and the scanpy toolkit is used to Data screening and preprocessing are performed. First, genes that are not expressed in cells are filtered out, that is, The first step is to reduce the high dropout rate in scRNA-seq data by filling the columns with all zeros (the phenomenon that some genes are not detected in some cells); secondly, the discrete gene expression data is converted into continuous data to ensure the stability of the size factor, that is, the data is normalized, which is defined as follows:
[0032] in Represents the median of the total expression of all cells; finally, the normalized discrete value of each gene is calculated, sorted, and the first p highly variable genes with high information content are used for research; finally, the preprocessed single-cell RNA gene expression matrix is obtained Where n represents the number of cells, is the representation of the i-th cell, and p represents the number of genes.
[0033] In some embodiments, after obtaining the single-cell RNA gene expression matrix X, the KNN method is used to construct a cell-cell graph adjacency matrix Used to capture structural information in the data. In the KNN graph, each node represents a cell, and the edges between nodes represent the relationship between cells. First, the heat kernel method is used to calculate the similarity between cells: Where t represents the variance scale parameter. Then, using the similarity between all cells calculated above, the top k cells with the highest similarity for each cell are extracted and connected, that is: Get the cell-cell graph adjacency matrix
[0034] In some embodiments, for single-cell clustering tasks, it is important to learn an effective data representation to simulate the data distribution of single-cell RNA sequencing data. The present invention uses a ZINB-based autoencoder module for feature extraction and data reconstruction. The zero-inflated negative binomial (ZINB) distribution can effectively simulate highly sparse and over-dispersed count data, and is used to capture the overall probability structure of scRNA-seq data. In this embodiment, the autoencoder module is composed of a mutually symmetrical encoder and decoder. Specifically, assuming that the autoencoder encoding module has L layers, the input of the lth layer is H l-1 , then its output can be expressed as: H l =φ(W l Hx -1 +b i ), where the activation function φ can be flexibly selected according to the specific application. The present invention selects the ReLU function as the activation function, W l represents the weight of the lth layer, b i It is worth noting that the input H0 of the first layer is the preprocessed single-cell RNA sequencing data matrix X, and the output H of the Lth layer is L is the reconstructed gene expression matrix X, whose dimension is the same as the original input matrix X.
[0035] Different from traditional autoencoders, in order to capture the global probability structure of the data, this embodiment integrates the ZINB model into the decoder of the autoencoder module. Specifically, this embodiment connects three independent fully connected layers to the last layer of the autoencoder module to estimate the three parameters of the ZINB distribution: probability parameter π, dispersion parameter θ and mean parameter μ: Among them, the size factor S i It is obtained by dividing the sum of the total expression of each cell by the total expression of the reference cell (usually the cell with the median or average expression), which is calculated in the data preprocessing stage. π, W μ , W θ Represents the weight parameter. The ZINB distribution uses the above three parameters to simulate the original scRNA-seq data and reconstruct its data distribution: ZINB(x|π,μ,θ)=πδ0(X)+(1-π)NB(x|μ,θ),
[0036] Furthermore, in order to guide the model to learn a more effective representation, this embodiment hopes that the reconstructed ZINB distribution is as close as possible to the original data distribution. Therefore, this embodiment defines the final loss function of the ZINB-based autoencoder module as the negative log-likelihood estimate of the ZINB distribution:
[0037]
[0038] In some embodiments, although the ZINB-based autoencoder module can learn useful representations from gene expression data and reconstruct the data distribution of the gene expression matrix, it ignores the structural information between cells. This embodiment introduces a graph autoencoder module to solve this problem. The module consists of several layers of graph convolutional networks (GCN) as the backbone network. The graph convolutional network takes the graph structure as input, which can effectively extract the structural information in the data and perform heterogeneous structural fusion of content information and structural information. Specifically, this embodiment first constructs a cell-cell graph adjacency matrix A through KNN as the initial input of GCN. Assume that the graph autoencoder encoding module has a total of L layers, and the input of the lth layer is Z l-1 , then its output can be expressed as: Where I is the unit diagonal matrix, is the degree matrix, U l-1 Represents the weight of the l-1th layer, normalized adjacency matrix Z l-1 Propagate and get the new representation Z l .
[0039] In some implementations, in order to obtain a richer representation, this embodiment uses an attention fusion module to perform layer-by-layer heterogeneous structure fusion embedding on the output of the ZINB-based autoencoder and the output of the graph autoencoder to obtain a more robust integrated representation R that integrates structural information and content information. l-1 , R l-1 =F att (αH l-1 +(1-α)Z l-1 ), where α is an adjustable weight parameter, F att In order to allow the network to learn richer representations and reduce noise interference, the present invention uses an integrated representation Rl-1 As input to GCN to learn high-order discriminative information and generate new representations: It is worth noting that the input R0 of the first layer of the graph autoencoder module is the preprocessed single-cell RNA sequencing data matrix X.
[0040] In the representation learned by GCN, select the middle layer For subsequent clustering, a softmax operation is performed on the intermediate layer to predict the probability distribution of single-cell data: Among them, the obtained representation z ij ∈Z pre It can be regarded as the probability that the i-th sample belongs to the j-th cluster center, which is used for end-to-end model learning and training of the subsequent self-supervised module.
[0041] Furthermore, in order to guide the model training direction and make the learned representation more credible, this embodiment uses the following two reconstruction errors as the loss function of the graph autoencoder module: in The output Z of the last layer of the graph autoencoder module is converted into L Convert to reconstructed adjacency matrix By minimizing the formula This allows the graph self-encoding module to capture more effective structural information, which is beneficial to improving subsequent clustering performance. The minimum value of the graph self-encoding module is expected to be Z L Some expression information of the original single-cell RNA sequencing data can be retained, so that the final data representation still contains some original specific expression patterns of the single-cell data.
[0042] In this embodiment, the two modules, the ZINB-based self-encoding module and the graph self-encoding module, can learn the content information and structural information of the data respectively, and how to fuse and embed the outputs of the two modules is a very important issue. It is a simple approach to simply add the two outputs to obtain a fused representation, but this approach will lose some important expression patterns or structural information. Therefore, this embodiment uses an attention mechanism to fuse the content information and structural information, and reduce noise to obtain a richer representation. In simple terms, the attention mechanism maps the query and a set of key-value pairs to obtain an output, where the query, key value, and output are all vectors. Specifically, we calculate the dot product of the query and the key, and apply the softmax function to obtain the relevant weight of the value, and multiply the value by this weight to obtain the final result. In order to simplify the calculation, a set of key-value pairs is calculated simultaneously each time during the actual operation process, and the vector calculation is converted into a matrix operation. The specific calculation method of the attention mechanism is as follows: Attention(Q, K, V) = softmax(QK T )V, where Q, K, and V are the query matrix, key matrix, and value matrix, respectively. On this basis, the present invention further introduces a multi-head attention mechanism, which can simultaneously focus on the information of each subspace at different positions of the data, so that the obtained attention fusion representation contains richer and more robust information.
[0043] Specifically, the present invention operates Q, K, and V with different attention operations M times, and then executes the attention function in parallel, connects them and projects them again to obtain the final result, where the i-th attention operation is expressed as follows: in, It is the transformation matrix, which is responsible for projecting the corresponding three matrices respectively.
[0044] Assume that the attention module has L layers in total, and the output of its lth layer is:
[0045] R l =F att (Q, K, V) = F att (W q Y l-1 , W k Y l-1 , W v Y l-1 )=W·Concat(head1,...,head M ), where Y l-1 =αH l-1 +(1-α)Z l-1 , W q ,W k , W vis a transformation matrix, W is a weight matrix, and Concat(·) represents a matrix concatenation operation.
[0046] In some embodiments, the ultimate goal of model training is to obtain better cell clustering effect, so it is necessary to introduce a self-supervision module to supervise the model and make the final learned intermediate layer output It is a clustering representation that is as optimal as possible. This module mainly contains three important distributions: soft clustering distribution Q, target distribution P, and probability distribution Z for clustering. These three distributions are calculated during the training process and change continuously as the training progresses to obtain a representation that is more suitable for clustering. Therefore, this module is called a self-supervised module.
[0047] Specifically, the present invention firstly outputs the intermediate layer of the self-encoding module based on ZINB. Perform K-means clustering to obtain a set of initial cluster centers Where k is the number of clusters, which is explicitly given before training; then the embedding representation needs to be calculated and cluster centers The soft assignment between the two is calculated by using Student's t distribution. For the i-th sample and the j-th cluster center, the soft assignment q ij ∈Q (which can be understood as the probability that the i-th sample is assigned to the j-th cluster) is calculated as follows:
[0048] Among them, h i is the embedding representation The ith sample of , λ represents the degree of freedom of Student's t distribution, which is a modifiable parameter and is set to 1 in the present invention.
[0049] On the basis of the soft clustering distribution Q, the present invention also requires an auxiliary target distribution to supervise the learning of the soft clustering distribution, and improves clustering by learning high-confidence classification of the target distribution. A suitable target distribution is critical to the final clustering quality.
[0050] The present invention uses soft clustering frequency to calculate a target distribution p with higher confidence. ij ∈P, which is calculated as follows:
[0051] in, is the soft clustering frequency.
[0052] In order to make the distributions Q and P closer, the present invention uses the KL divergence loss between the two distributions as the optimization target of this part to obtain higher quality clustering:
[0053]
[0054] This self-supervised strategy can guide the ZINB-based autoencoder module to learn a data representation that is more suitable for clustering, while the representation learned by the graph autoencoder module contains richer content and structural information. We can also adopt the same self-supervision strategy and use the target distribution P to supervise the learning of the graph self-encoding module:
[0055] Among them, z ij ∈Z pre ,pass and For these two loss functions, we integrate the optimization objectives into a distribution P, making the learned representation more suitable for clustering tasks.
[0056] Based on this, the total loss function of the entire model of the present invention is as follows:
[0057] Among them, λ1, λ2, λ3, λ4, and λ5 are hyperparameters that measure the importance of each loss function.
[0058] In the present invention, the ZINB-based autoencoder module and the graph autoencoder module are integrated into a unified framework through the above self-supervision strategy, and the two modules are end-to-end clustered and trained and synchronously optimized based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to obtain a clustering prediction model; after processing the single-cell RNA sequencing data to be clustered, the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to be clustered are obtained, which are input into the clustering prediction model, and the embedded representation Z is output. pre , find Z pre The index of the maximum value in each row (or each sample) is the category of each cell predicted by the model, and the predicted label is obtained to complete the clustering operation.
[0059] In summary, the present invention proposes an attention-enhanced single-cell RNA sequencing data clustering method, which introduces a ZINB-based autoencoder module to extract the content information of the data. The module captures the content information in the data by learning the mapping from the data space to the low-dimensional feature space, and reconstructs the gene expression matrix and data distribution through ZINB decoding. This method can effectively simulate highly sparse and over-dispersed count data, thereby better capturing the overall probability structure of single-cell RNA sequencing data; secondly, the present invention designs a graph autoencoder module, which uses a graph convolutional network to capture high-order structural information between cells. By processing the cell-cell graph with a graph convolutional network, the structural information between cells can be effectively extracted, thereby heterogeneously merging the content information and the structural information. Third, the present invention designs an attention fusion mechanism, which fuses the ZINB-based autoencoder module and the graph autoencoder module layer by layer to guide the final clustering direction. This layer-by-layer embedding operation can effectively fuse the feature representation and structural information of gene expression information into the same representation, thereby enhancing the clustering performance. Finally, the present invention adopts a self-supervised strategy to integrate the ZINB-based autoencoder module and the graph autoencoder module into a unified framework, and effectively performs end-to-end clustering training and synchronous optimization on the two modules, thereby improving the clustering performance.
[0060] In a deep learning environment based on PyTorch, we experimentally compared the capabilities and robustness of the method (scASDC) of the present invention with other mainstream algorithms (DESC, SDCN, scDeepCluster, DCA, scDSC, DEC). The experimental data set is shown in Table 1. This embodiment collects 4 real and public single-cell RNA sequencing data sets on multiple platforms. These data sets mainly come from different tissues of humans and mice, including Pollen (tissue), Adam (kidney), QSLimb Muscle (limb muscle), QSDiaphragm (diaphragm), of which two 'QS' data sets come from the mouse single-cell RNA sequencing data generated by Smart-seq2 sequencing in Stanford University research, and Pollen (SRP041736) and Adam (GSE94333) data sets are from the National Center for Biotechnology Information of the United States https: / / www.ncbi.nlm.nih.gov / ). We conducted a detailed evaluation of each set of data through clustering performance evaluation indicators and chart analysis.
[0061] Table 1 Single-cell RNA sequencing data information
[0062] Dataset Cell number Number of genes Number of categories platform Pollen 301 21721 11 SMARTer QS Limb Muscle 1090 23341 6 Smart-seq2 Adam 3660 23797 8 Drop-seq QSDiaphragm 870 23341 5 Smart-seq2
[0063] When evaluating unsupervised clustering algorithms, NMI (Normalized Mutual Information) and ARI (Adjusted Rand Index) are two commonly used indicators to measure the similarity between clustering results and true labels. The following will introduce their definitions and calculation formulas in detail:
[0064] 1.NMI (Normalized Mutual Information)
[0065] NMI is an indicator used to evaluate clustering quality. It is based on the concept of information theory and measures the normalized value of the mutual information between the clustering results and the true labels.
[0066] The calculation formula of NMI is as follows: Among them, C represents the cluster set of clustering results, |C| represents the number of clusters, K represents the number of categories of true labels, and n ij represents the number of samples that belong to both cluster i and true label j, n i· represents the number of samples in cluster i, n ·j represents the number of samples in the true label j, and N represents the total number of samples.
[0067] 2. ARI (Adjusted Rand Index)
[0068] ARI is an indicator used to compare the similarity between two clustering results, taking into account the consistency between paired samples in the clustering results.
[0069] The calculation formula of ARI is as follows:
[0070] Among them, a i represents the number of sample pairs that belong to the same cluster in the lth clustering result, b j represents the number of sample pairs that belong to the same category in the jth true label, n ij Indicates the number of sample pairs that are simultaneously assigned to the i-th clustering result and the j-th true label. It represents the number of combinations of selecting k elements from n elements, and N is the total number of samples. Both of the above indicators are values between 0 and 1. The higher the value, the higher the similarity between the clustering result and the true label.
[0071] Figure 3 The following is a schematic diagram showing the comparison of cluster analysis evaluation indicators of the proposed method (scASDC) and other six baseline methods on four data sets. Each method was run 10 times and the average value was taken. Figure 3 It can be seen that the clustering performance of the method of the present invention is optimal or suboptimal in the four data sets.
[0072] Figure 4This is a schematic diagram comparing the dimensionality reduction visualization results of the final embedding representation using UMAP by the method of the present invention and other baseline methods on the QSLimb Muscle dataset. The results show that compared with traditional single-cell RNA sequencing data analysis methods, the method of the present invention exhibits stronger capabilities and excellent performance in cell clustering and has significant robustness.
[0073] The above describes the single-cell RNA sequencing data clustering method in the embodiment of the present invention. The following describes the single-cell RNA sequencing data clustering device in the embodiment of the present invention. Figure 5 In one embodiment of the present invention, a single-cell RNA sequencing data clustering device includes:
[0074] A first data processing module 10 is used to obtain single-cell RNA sequencing data, pre-process the single-cell RNA sequencing data, and obtain a single-cell RNA gene expression matrix X;
[0075] A second data processing module 20 is used to construct a cell-cell graph adjacency matrix A using a KNN method according to the single-cell RNA gene expression matrix X;
[0076] A construction module 30 is used to construct a ZINB-based self-encoding module and a graph self-encoding module;
[0077] A fusion module 40, used to connect the ZINB-based autoencoder module and the graph autoencoder module layer by layer through an attention fusion mechanism, and effectively fuse the feature representation of gene expression information and cell structure information into the same representation through this layer-by-layer embedding operation;
[0078] A training module 50 is used to integrate the ZINB-based autoencoder module and the graph autoencoder module into a unified framework through a self-supervisory strategy, and perform end-to-end clustering training and synchronous optimization on the two modules based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to obtain a clustering prediction model;
[0079] The clustering module 60 is used to process the single-cell RNA sequencing data to be clustered to obtain the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to be clustered, input them into the clustering prediction model, output the embedded representation, obtain the predicted cell category according to the embedded representation and complete the clustering.
[0080] above Figure 5 The single-cell RNA sequencing data clustering device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The single-cell RNA sequencing data clustering device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0081] Figure 6 1 is a schematic diagram of the structure of a single-cell RNA sequencing data clustering device provided by an embodiment of the present invention. The single-cell RNA sequencing data clustering device 100 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 11 (for example, one or more processors) and a memory 12, and one or more storage media 13 (for example, one or more massive storage devices) storing application programs 133 or data 132. Among them, the memory 12 and the storage medium 13 can be short-term storage or permanent storage. The program stored in the storage medium 13 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the single-cell RNA sequencing data clustering device 100. Furthermore, the processor 11 can be configured to communicate with the storage medium 13 to execute a series of instruction operations in the storage medium 13 on the prediction device 100 of the super-resolution gene expression map.
[0082] The single-cell RNA sequencing data clustering device 100 may also include one or more power supplies 14, one or more wired or wireless network interfaces 15, one or more input and output interfaces 16, and / or one or more operating systems 131, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 6 The device structure shown does not constitute a limitation on the single-cell RNA sequencing data clustering device 100 , and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0083] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the single-cell RNA sequencing data clustering method.
[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0086] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A single-cell RNA sequencing data clustering method, characterized in that: Includes steps: Acquire single-cell RNA sequencing data, and preprocess the single-cell RNA sequencing data to obtain a single-cell RNA gene expression matrix X; According to the single cell RNA gene expression matrix X, a cell-cell graph adjacency matrix A is constructed using a KNN method; Construct a ZINB-based self-encoding module and a graph self-encoding module; The ZINB-based autoencoder module and the graph autoencoder module are connected layer by layer through an attention fusion mechanism, and the feature representation of gene expression information and cell structure information are effectively fused into the same representation through this layer-by-layer embedding operation; The ZINB-based autoencoder module and the graph autoencoder module are integrated into a unified framework through a self-supervised strategy, and the two modules are end-to-end clustered trained and synchronously optimized based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to obtain a clustering prediction model; After processing the single-cell RNA sequencing data to be clustered, the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to be clustered are obtained, which are input into the clustering prediction model, and an embedded representation is output. According to the embedded representation, the predicted cell category is obtained and clustering is completed.
2. The single-cell RNA sequencing data clustering method according to claim 1, characterized in that: The steps to construct a ZINB-based autoencoder module are as follows: The autoencoder module is composed of a mutually symmetrical encoder and decoder. The encoder of the autoencoder module has L layers. The single-cell RNA gene expression matrix X is used as the initial input of the autoencoder module. The input of the lth layer is H l-1 , then its output is expressed as: H l =φ(W l H l-1 +b l ), where φ is the activation function, W l represents the weight of the lth layer, b i Represents the bias vector of the lth layer; The last layer of the decoder is connected to three independent fully connected layers, which are used to estimate the three parameters of ZINB: probability parameter π, dispersion parameter θ and mean parameter μ, so as to integrate the ZINB model into the autoencoder module. The ZINB distribution uses the three parameters to simulate the single-cell RNA sequencing data and reconstruct its data distribution: ZINB(X|π,μ,θ)=πδ0(X)+(1-π)NB(X|μ,θ); The final loss function of the ZINB-based autoencoder module is defined as the negative log-likelihood estimate of the ZINB distribution:
3. The single-cell RNA sequencing data clustering method according to claim 2, characterized in that: The steps to build a graph autoencoder module include: The graph autoencoder module is composed of several layers of graph convolutional networks as the backbone network; The graph autoencoder module has a total of L layers. The cell-cell graph adjacency matrix A is used as the initial input of the first layer of the graph autoencoder module. The input of the lth layer is Z l-1 , then its output is expressed as: Where I is the unit diagonal matrix, is the degree matrix, U l-1 Represents the weight of the l-1th layer, normalized adjacency matrix Z l-1 Propagate and get the new representation Z l .
4. The single-cell RNA sequencing data clustering method according to claim 3, characterized in that: The steps of connecting the ZINB-based autoencoder module and the graph autoencoder module layer by layer through an attention fusion mechanism, and effectively fusing the feature representation of gene expression information and cell structure information into the same representation through this layer-by-layer embedding operation include: The output of the ZINB-based autoencoder module and the output of the graph autoencoder module are embedded in a layer-by-layer heterogeneous structure fusion through an attention fusion module to obtain an integrated representation that integrates structural information and content information: l-1 =F att (αH l-1 +(1-α)Z l-1 ), where α is an adjustable weight parameter, F att represents the attention fusion operation; Using integrated representation R l-1 As input to graph convolutional networks to learn high-level discriminative information and generate new representations 5. The single-cell RNA sequencing data clustering method according to claim 4, characterized in that: The ZINB-based autoencoder module and the graph autoencoder module are integrated into a unified framework through a self-supervised strategy, and the two modules are end-to-end clustered trained and synchronously optimized based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A. The steps of obtaining the cluster prediction model include: Output of the intermediate layer of the ZINB-based autoencoder module Perform k-means clustering to obtain a set of initial cluster centers Where k is the number of clusters; Calculate the embedding representation using Student′st distribution and cluster centers The soft allocation between is as follows: where h i is the embedding representation The i-th sample of , λ represents the degrees of freedom of Student's t distribution, and the soft distribution q ij ∈Q, Q is the soft cluster distribution; On the basis of the soft cluster distribution Q, an auxiliary target distribution is set to supervise the learning of the soft cluster distribution. The clustering is improved by learning the high confidence distribution of the target distribution. The target distribution is calculated using the soft cluster frequency. The calculation method is as follows: in is the soft clustering frequency, the target distribution p ij ∈P; Use the KL divergence loss between the soft clustering distribution Q and the target distribution P as the optimization target to obtain higher quality clustering: The target distribution P is used to supervise the learning of the graph self-encoding module: Among them, z ij ∈Z pre , Through the above two loss functions, the optimization objective is integrated into a target distribution P, making the learned representation suitable for clustering tasks.
6. A single-cell RNA sequencing data clustering device, characterized in that: include: A first data processing module is used to obtain single-cell RNA sequencing data, pre-process the single-cell RNA sequencing data, and obtain a single-cell RNA gene expression matrix X; A second data processing module is used to construct a cell-cell graph adjacency matrix A using a KNN method according to the single-cell RNA gene expression matrix X; Construction module, used to construct ZINB-based autoencoding module and graph autoencoding module; A fusion module, used to connect the ZINB-based autoencoder module and the graph autoencoder module layer by layer through an attention fusion mechanism, and effectively fuse the feature representation of gene expression information and cell structure information into the same representation through this layer-by-layer embedding operation; A training module, used to integrate the ZINB-based autoencoder module and the graph autoencoder module into a unified framework through a self-supervised strategy, and perform end-to-end clustering training and synchronous optimization on the two modules based on the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to obtain a clustering prediction model; The clustering module is used to process the single-cell RNA sequencing data to be clustered to obtain the single-cell RNA gene expression matrix X and the cell-cell graph adjacency matrix A to be clustered, input them into the clustering prediction model, output the embedded representation, obtain the predicted cell category according to the embedded representation and complete the clustering.
7. A single-cell RNA sequencing data clustering device, characterized in that: comprising a memory and at least one processor, wherein the memory has computer-readable instructions stored therein; The at least one processor calls the computer-readable instructions in the memory to execute the various steps of the single-cell RNA sequencing data clustering method as described in any one of claims 1-5.
8. A computer-readable storage medium having computer-readable instructions stored thereon, characterized in that: When the computer-readable instructions are executed by a processor, the various steps of the single-cell RNA sequencing data clustering method as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Single-cell RNA-seq data clustering method based on dual self-supervision
CN114022693A
Node deep clustering method based on joint learning
CN115511000A
RNA hierarchical embedding clustering method based on graph convolutional neural network
CN116665786A
Metadata and image feature collaborative perception semi-supervised longitudinal federated learning method
CN117038053A
Micro-expression recognition method based on attention feature fusion of facial key points
CN117576753A
Cited By
Single cell transcriptome data clustering method based on graph contrast representation learning
CN119339811A
ScRNA-seq data feature learning method based on graph automatic encoder
CN119400249A
Single cell data depth clustering method and device based on double auto-encoders, and medium
CN120877877A
A single-cell data deep clustering method and device based on a double autoencoder and a medium
CN120877877B
Single cell clustering system based on reinforcement learning driving
CN122392652A
