Single-cell RNA sequencing data clustering method based on graph transformer
By constructing a cell-specific signal network based on graph transformer and performing graph neural network analysis, the problem of difficulty in capturing intercellular heterogeneity in the prior art is solved, and the accuracy of cell clustering and the application scope of the model are improved.
Patent Information
- Application Number
- CN202411687929.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Existing graph neural networks are difficult to accurately capture heterogeneity information between cells in single-cell RNA sequencing data analysis, resulting in a decrease in the accuracy of the model in predicting cell types, functions, or status.
Using a graph transformer-based method, a cell-specific signal network is constructed, and a cell-specific graph representation is learned through graph neural networks, thereby obtaining the node embedding matrix of the cell-specific signal network and performing cell clustering based on graph representation.
By revealing intercellular heterogeneity, expanding the application scope of the model, and improving the accuracy and robustness of cell clustering, it provides rich information for subsequent biological analysis and research.
Smart Images

Figure CN119626347A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to deep learning and bioinformatics technology, and in particular to a single-cell RNA sequencing data clustering method based on graph transformer. Background Art
[0002] As one of the most popular bio-omics technologies, single-cell RNA sequencing (scRNA-seq) can study cell states, communications, and heterogeneity at single-cell resolution. The first step in scRNA-seq analysis is to use cell clustering to identify the cell types contained in the biological system. With the development of deep learning algorithms, graph neural networks (GNNs) have been widely used in scRNA-seq data analysis to extract feature vectors for each cell and perform cell clustering. With its powerful graph representation learning capabilities, it has become an important method in the field of biological network and single-cell data analysis.
[0003] Currently, there are many algorithms for inferring cell-specific networks from scRNA-seq data, such as CSN, c-CSN, locCSN, etc. The first step of these algorithms is to build a cell network (or a heterogeneous network containing cells), and then use GNN to learn the node embedding of each cell in the network. This method is better at utilizing the correlation between cells. Simple connection relationships cannot fully reflect the real differences between cells. This will cause GNN to be unable to accurately capture and represent these heterogeneous information when updating node representations. It is difficult to distinguish whether the correlation between genes is direct or indirect, and it is also impossible to identify which specific molecular interaction the correlation originates from. This causes the existing network to contain a large number of overestimated indirect correlations, which is not easy to capture the potential heterogeneity between different cells, resulting in a decrease in the accuracy of the model in predicting cell types, functions or states, and will limit the scope of application of the model. Summary of the invention
[0004] The purpose of the present invention is to provide a single-cell RNA sequencing data clustering method based on graph transformer to solve the above-mentioned shortcomings in the prior art.
[0005] In order to achieve the above object, the present invention provides the following technical solution: a single-cell RNA sequencing data clustering method based on graph transformer, comprising the following steps:
[0006] S1. First, construct a cell-specific signaling network based on scRNA-seq data;
[0007] S2, then train the same graph neural network with the cell-specific signaling network to learn the cell-specific graph representation, thereby obtaining the node embedding matrix of the cell-specific signaling network;
[0008] S3. Finally, the graph embedding vector of the cell-specific network is obtained according to the node embedding matrix, and the cell clustering based on the graph representation is performed based on the graph embedding to obtain the clustering result.
[0009] Furthermore, S1 first constructs a cell-specific signaling network based on scRNA-seq data, including the following steps:
[0010] S11. Construct a human molecular interaction reference network: collect 4 known human molecular interaction information from 24 databases, retain high-confidence predictions shared by at least 2 databases for the collected interaction information, and establish a reference network integrating multidimensional molecular interactions based on the above interactions;
[0011] S12. Data preprocessing: The scRNA-seq data were preprocessed using the Python scanpy package to obtain the genes and gene expression levels of each cell;
[0012] S13. Screening the activated genes of each cell: sorting the genes of each cell from high to low according to the expression level, and screening the genes with the top 5% expression levels as the activated genes of each cell;
[0013] S14. Extract cell-specific subnetworks from the reference network to form a cell-specific signaling network: for the activated genes of each cell, extract the interactions of the associated activated genes from the reference network described in S11 to form a cell-specific signaling network.
[0014] Furthermore, the interaction information described in S11 includes ligand-receptor interaction, protein-protein interaction, transcription factor-target gene interaction and biological pathway.
[0015] Furthermore, the preprocessing described in S12 includes filtering genes and cells with missing values exceeding 99%, normalizing the gene expression of different cells and performing logarithmic transformation on the gene expression.
[0016] Further, S2 then trains the same graph neural network with the cell-specific signaling network to learn the cell-specific graph representation, thereby obtaining a node embedding matrix of the cell-specific signaling network, comprising the following steps:
[0017] S21. Construct a graph autoencoder based on graph transformer: the encoder receives two types of inputs, namely, the adjacency matrix of the single-cell network and the feature matrix of the node; the encoder comprises two layers, the input dimension of the first layer is the dimension of the feature vector of the node in the cell-specific signaling network, the output dimension is 32 dimensions, and a ReLU activation function is used; the input and output dimensions of the second layer are both 32 dimensions, and a Sigmoid activation function is used. The encoder can capture the local and global topological structures in the cell-specific signaling network, thereby generating a 32-dimensional node embedding for each node;
[0018] S22. Decoder construction: predicting and reconstructing the connection relationship in the cell-specific signaling network by calculating the inner product between node embeddings, the decoder can reproduce the input cell-specific signaling network so that the topology of the output network is consistent with the input cell-specific signaling network;
[0019] S23. Loss function optimization: During the learning process, the model parameters are optimized through the loss function. The loss function measures the difference between the network reconstructed by the decoder and the input cell-specific signal network, and minimizes the difference to obtain the node embedding matrix of each cell network.
[0020] Furthermore, the prediction and reconstruction of the connection relationship in the gene network described in S22 adopts the InnerProductDecoder function based on PyTorch.
[0021] Furthermore, S3 finally obtains the graph embedding vector of the cell-specific network according to the node embedding matrix, performs graph-representation-based cell clustering based on the graph embedding, and obtains the clustering result, including the following steps:
[0022] S31. Based on the embedding matrix of each cell network node, all elements except the maximum element in each row are changed to 0, and then the 2D matrix is flattened into a 1D vector as the graph embedding vector of each cell.
[0023] S32, then integrate the graph embedding vectors of all cells to form a graph embedding matrix, and cluster the graph embedding matrix after preprocessing.
[0024] Furthermore, the graph embedding matrix in S32 contains graph representation features of each cell.
[0025] Furthermore, the preprocessing in S32 is to first delete the columns of all zeros in the matrix, and then use the principal component analysis method to embed the graph into the matrix for dimensionality reduction.
[0026] Furthermore, the clustering in S32 adopts Louvain clustering method or K-means clustering method.
[0027] Compared with the prior art, the graph transformer-based single-cell RNA sequencing data clustering method provided by the present invention constructs a specific network for each cell and then uses GNN to learn the specific graph embedding of each cell to reveal the heterogeneity between cells and expand the application scope of the model.
[0028] A specific signaling network is constructed for each cell based on its unique gene expression pattern and regulatory characteristics. The specific network of each cell reflects its unique biological state and potential functional characteristics.
[0029] By using the powerful learning ability of GNN to capture the complex information in the graph structure, including the connections and attributes between cells, each cell can be mapped to a specific position in a high-dimensional space. This position (i.e., the cell-specific graph embedding) accurately reflects its biological characteristics and heterogeneity with other cells.
[0030] This new cell clustering method not only improves the accuracy and robustness of clustering, but also provides rich information for subsequent biological analysis and research. For example, by comparing the specific graph embeddings of different cells, potential cell subpopulations or new cell types can be revealed; by analyzing the embedding distance between cells, the interactions and regulatory relationships between them can be inferred. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0032] Figure 1 A schematic diagram of the overall process of the clustering method provided by an embodiment of the present invention;
[0033] Figure 2 Four types of molecular interaction database diagrams are provided for the embodiments of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0035] Example:
[0036] See also Figure 1-Figure 2 , a single-cell RNA sequencing data clustering method based on graph transformer, comprising the following steps:
[0037] S1. First, construct a cell-specific signaling network based on scRNA-seq data;
[0038] S11. Construct a human molecular interaction reference network: Collect 4 known human molecular interaction information from 24 databases, including ligand-receptor interaction, protein-protein interaction, transcription factor-target gene interaction and biological signaling pathway; perform quality control on the collected interactions, retain high-confidence predictions shared by at least 2 databases; and build a reference network integrating multidimensional molecular interactions based on these interactions. It is worth mentioning that since there may be multiple interactions between two molecules, this reference network belongs to a multi-graph model, that is, there may be multiple edges between two nodes.
[0039] Data are collected from 24 carefully selected databases that cover a wide range of molecular interaction information, including but not limited to public databases, professional databases, and research results databases, ensuring the diversity and authority of data sources to improve the reliability and comprehensiveness of the data.
[0040] See also Figure 2 The 24 databases include ligand-receptor, protein-protein, transcription factor-target gene and signal pathway related databases, among which the ligand-receptor related databases include NicheNet, CellTalkDB, CellPhoneDB and Lewi Lab UCSD; the protein-protein related databases include STRING, IntAct, BioGRID, DIP, MINT, HPRD, BIND and HuRI; the transcription factor-target gene related databases include TRRUST, TFLink, hTFtarget, HTRIdb and RegNetWork; the signal pathway related databases include KEGG, Reactome, CTD, PathBank, INOH, HumanCyc and Pathway Commons.
[0041] Ligand-receptor interaction describes the interaction between ligands (such as hormones, neurotransmitters, etc.) and receptors (such as proteins on the cell membrane); protein-protein interaction describes the physical contact and interaction between proteins, which play a key role in cell function; transcription factor-target gene interaction describes the interaction between transcription factors (such as RNA polymerase, transcription activators, etc.) and target genes (genes regulated by them); biological signaling pathways describe a series of molecular events and interactions that form specific signal transduction or metabolic pathways in cells.
[0042] S12. Data preprocessing: The scRNA-seq data were preprocessed using the Python scanpy package, including filtering out genes and cells with more than 99% missing values, normalizing gene expression in different cells, and performing logarithmic transformation on gene expression.
[0043] Filtering out genes and cells with too many missing values can ensure the accuracy and reliability of subsequent analysis; there may be significant differences in gene expression levels in different cells, and normalization can eliminate such differences, making comparisons between different cells more fair; logarithmic transformation can stabilize variance, making data analysis more stable and reliable.
[0044] S13. Screening the activated genes of each cell: sorting the genes of each cell from high to low according to the expression level, and screening the top 5% of genes with the highest expression level as the activated genes of each cell.
[0045] By identifying the most highly expressed genes, it is possible to identify genes that are critical to cell function in the current state. Each cell has its own unique set of activated genes, which helps to personalize cell function analysis.
[0046] S14. Extract cell-specific subnetworks from the reference network to form a cell-specific signaling network: For the activated genes of each cell, extract the interactions associated with these genes from the reference network to form a cell-specific signaling network.
[0047] This process is implemented through the depth-first search (DFS) algorithm, which includes the following steps:
[0048] First, an empty cell-specific signaling network (subgraph) is created for each cell; the list of activated genes for each cell is iterated.
[0049] Then a depth-first search (DFS) is performed: for each activated gene, it is marked as visited and added to the cell-specific signaling network of the current cell, and all unvisited neighbor nodes of the gene (i.e., molecules that interact with it) are recursively visited and added to the subgraph while being marked as visited. The above process is repeated until all nodes reachable from the current activated gene are visited and added.
[0050] When all the paths starting from the currently activated gene have been explored, we backtrack to the last activated gene and continue the DFS process to store the cell-specific signaling network of each cell for subsequent analysis.
[0051] By extracting relevant interactions from the reference network for the activated genes of each cell, we can construct a cell-specific subnetwork that reflects the specific state of the cell. By analyzing these subnetworks, we can reveal the signal transduction and regulatory mechanisms of cells in specific states, providing important clues for understanding cell function. In disease states, certain interactions in cell-specific subnetworks may become abnormal, which provides a new perspective for disease diagnosis and treatment.
[0052] S2, then train the same graph neural network with the cell-specific signaling network to learn the cell-specific graph representation, thereby obtaining the node embedding matrix of the cell-specific signaling network;
[0053] Traditional methods usually use a single network (network nodes represent cells) to train the GNN model, and then use node embedding to cluster cells. In this method, a large number of cell-specific networks are innovatively used to train the same GNN to learn the unique graph representation of each cell and reveal the heterogeneity between cells based on the graph representation. The specific implementation relies on the distributed computing framework PyTorch and uses GPU to accelerate model training:
[0054] S21. Construct a graph autoencoder based on graph transformer: the encoder receives two types of inputs: the adjacency matrix of the single-cell network and the feature matrix of the node; the encoder contains two layers, the input dimension of the first layer is the dimension of the feature vector of the node in the cell-specific signaling network, the output dimension is 32 dimensions, and the ReLU activation function is used; the input and output dimensions of the second layer are both 32 dimensions, and the Sigmoid activation function is used. The encoder can capture the local and global topological structures in the cell-specific signaling network, thereby generating a 32-dimensional node embedding for each node;
[0055] The encoder receives two key inputs - the adjacency matrix of the single-cell network and the feature matrix of the nodes. The adjacency matrix is an intuitive reflection of the interaction between cells, while the feature matrix contains the gene expression or other biological feature information of each cell. This input method enables the model to comprehensively consider the connection information between cells and the characteristics of the cells themselves, so as to more accurately capture the complexity of the cell network. The encoder adopts a two-layer structure, each layer contains specific input and output dimensions and activation functions. The first layer is responsible for mapping the high-dimensional node feature vector (i.e., the characteristics of the nodes in the cell-specific signaling network) to a 32-dimensional low-dimensional space. This step not only reduces the dimensionality of the data, but also helps to capture the local topological structure in the network, such as close interactions between cells. The second layer further processes these low-dimensional features to learn more global network structure information, such as long-range associations or functional modules between cells. The choice of ReLU and Sigmoid activation functions helps the model handle nonlinear relationships and enhances the expressiveness and generalization capabilities of the model.
[0056] Through the processing of the encoder, each node (i.e., cell) generates a 32-dimensional node embedding. These embedding vectors not only contain the gene expression or other biological characteristics of the cell itself, but also incorporate the interaction relationship between cells. These embedding vectors provide a powerful tool for subsequent cell clustering, classification, disease diagnosis, etc.
[0057] S22. Decoder construction: By calculating the inner product between node embeddings, the connection relationship in the cell-specific signaling network is predicted and reconstructed. The decoder can reproduce the input cell-specific signaling network so that the topology of the output network is consistent with the input cell-specific signaling network.
[0058] The decoder predicts and reconstructs the connections in the cell-specific signaling network by calculating the inner product between node embeddings. This method uses the similarity between embedding vectors to infer the interactions between cells, thereby reconstructing the input network. This reconstruction process not only helps to verify the effectiveness of the encoder, but also can further explore the potential connections and relationships in the cell network.
[0059] The goal of the decoder is to reproduce the input cell-specific signaling network as much as possible, so that the topology of the output network is consistent with the input network. This consistency helps the model learn more biologically meaningful graph representations, providing a reliable basis for subsequent analysis. At the same time, by maintaining the consistency of the network, the model can better capture the heterogeneity between cells and provide strong support for cell classification and disease diagnosis.
[0060] S23. Loss function optimization: During the learning process, the model parameters are optimized through the loss function. The loss function measures the difference between the network reconstructed by the decoder and the input cell-specific signal network, and minimizes the difference to obtain the node embedding matrix of each cell network.
[0061] The loss function is a key indicator to measure the difference between the network reconstructed by the decoder and the input network. By minimizing this difference, the model is able to learn a more representative graph representation. This step is the core of model training and directly determines the performance and effect of the model. By optimizing the loss function, the model can continuously adjust its parameters to more accurately capture the topological structure and characteristics of the cell network.
[0062] The process of optimizing the loss function is not only to improve the reconstruction ability of the model, but more importantly, to mine biologically meaningful graph representations through this process. These representations can reveal key information such as cell heterogeneity, functional modules, disease-related pathways, etc., and provide strong support for subsequent cell classification, disease diagnosis, drug development, etc.
[0063] Through reasonable loss function design and optimization algorithm selection, the stability of the model during training can be ensured. This helps to avoid the problem of overfitting or underfitting of the model, improve the generalization ability and robustness of the model, and at the same time, the stable model can better adapt to different cell data sets and experimental conditions, providing possibilities for a wider range of applications.
[0064] S3. Finally, the graph embedding vector of the cell-specific network is obtained according to the node embedding matrix, and the cell clustering based on the graph representation is performed based on the graph embedding to obtain the clustering result.
[0065] S31. Based on the node embedding matrix of each cell network, all elements except the largest element in each row are changed to 0, and then the 2-dimensional matrix is flattened into a 1-dimensional vector as the graph embedding vector of each cell. Assuming that the data contains M genes, the dimension of the node embedding matrix of each cell is (M×32), and then the sum of the elements in each row of the node embedding matrix is calculated to obtain an M-dimensional graph embedding vector.
[0066] Assuming that the data contains M genes, the dimension of the node embedding matrix of each cell is (M×32). This matrix is actually a feature matrix, in which each row represents a gene and each column represents a 32-dimensional embedding vector component. In order to transform the characteristics of the cell from a high-dimensional space to a low-dimensional space while retaining key information, the sum of the elements in each row of the node embedding matrix is calculated to obtain an M-dimensional graph embedding vector. This vector is actually a compression and refinement of the original feature matrix, which retains the overall contribution of each gene to all embedded components.
[0067] Let the node embedding matrix be E, whose size is M×32, where E ij represents the element in the i-th row and j-th column of the matrix E (i.e., the j-th embedding component of the i-th gene). The graph embedding vector is denoted as G, whose size is M×1, and the graph embedding vector is expressed as:
[0068] For i = 1, 2, ... M,
[0069] This expression means that for each element G of the graph embedding vector G i They are obtained by adding all elements in the i-th row of the node embedding matrix E (i.e., all embedding components of the i-th gene).
[0070] By calculating the sum of the elements in each row, the gene feature information originally scattered in 32 embedded components is fused into a single dimension. This fusion method helps to simplify the subsequent calculation process while retaining sufficient biological information for clustering analysis.
[0071] S32. Finally, the M-dimensional graph embedding vectors of all N cells are integrated to form a (N×M)-dimensional graph embedding matrix. The graph embedding matrix contains the graph representation features of each cell, but because the number of features is often large, the principal component analysis (PCA) is used to reduce the matrix to (N×50) before clustering. Finally, if the number of cell types contained in the scRNA-seq data cannot be determined, the Louvain method that can automatically retrieve the optimal number of clusters is used to cluster the reduced-dimensional graph embedding matrix; if the number of cell types is known, K-means clustering is used to reduce the dimension of the graph embedding matrix.
[0072] After obtaining the M-dimensional graph embedding vector of each cell, it is integrated to form an (N×M)-dimensional graph embedding matrix. This matrix contains the graph representation features of all cells and is the basis for clustering analysis.
[0073] Since the number of features in the graph embedding matrix is often large (i.e., the M value is large), direct clustering analysis may face problems such as large amount of calculation and unstable results. Therefore, before clustering, the columns of all zeros in the matrix are first deleted (which do not contribute to intercellular heterogeneity), and then the principal component analysis (PCA) is used to reduce the dimension of the matrix to (N×50). PCA is a commonly used data dimensionality reduction technique that removes redundant information by retaining the main components in the data (i.e., the direction with the largest variance), thereby simplifying the data structure and improving computational efficiency.
[0074] After PCA dimensionality reduction, a low-dimensional but information-rich graph embedding matrix is obtained. This matrix not only retains the main feature information in the original data, but also greatly reduces the complexity and time cost of calculation, providing strong support for the subsequent use of Louvain method or K-means method for cell clustering.
[0075] When the number of cell types contained in the scRNA-seq data cannot be determined, the Louvain method is used for clustering. The Louvain method is a community discovery algorithm based on modularity optimization, which can automatically retrieve the optimal number of clusters. This method does not require the number of clusters to be specified in advance, so it is particularly suitable for situations where the number of cell types is unknown. Through the Louvain method, a set of clear and stable cell clustering results can be obtained, providing a favorable basis for subsequent biological analysis and interpretation.
[0076] When the number of cell types is known, the K-means method is used for clustering. The K-means method is a commonly used clustering algorithm that minimizes the sum of squared errors within clusters by assigning data points to K clusters. This method is simple to understand and computationally efficient, and is particularly suitable for situations where the number of clusters is known. The K-means method can obtain clustering results that match the known number of cell types, thereby verifying and explaining the heterogeneity and biological characteristics between cells.
[0077] Embodiment 2:
[0078] This embodiment provides a technical solution based on the first embodiment: Step S23 loss function optimization, the specific implementation method is:
[0079] Let G i represents the i-th input cell-specific signaling network, where i = 1, 2, ..., N.
[0080] Let f(θ; G i ) represents the decoder model, where θ is the model parameter, G i is the input network.
[0081] set up Represents the reconstruction network generated by the decoder.
[0082] Defining the loss function To measure the difference between the reconstructed network and the original network:
[0083]
[0084] Where V i It is network G i The node set, s uv (Gi) represents the network G i Similarity measure between nodes u and v.
[0085] The optimization problem can be expressed as:
[0086]
[0087] where theta * is the model parameter that minimizes the loss function.
[0088] During the optimization process, the parameters are updated using gradient descent or other optimization algorithms:
[0089]
[0090] Where η is the learning rate, t is the number of iterations, is the gradient of the loss function with respect to the model parameters.
[0091] Finally, the decoder can output the node embedding matrix Zi of each cell network, where Zi is the result of the decoder converting G i Mapped to the latent space.
[0092] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
Claims
1. A single-cell RNA sequencing data clustering method based on graph transformer, characterized in that: The steps include: S1. First, construct a cell-specific signaling network based on scRNA-seq data; S2, then train the same graph neural network with the cell-specific signaling network to learn the cell-specific graph representation, thereby obtaining the node embedding matrix of the cell-specific signaling network; S3. Finally, the graph embedding vector of the cell-specific network is obtained according to the node embedding matrix, and the cell clustering based on the graph representation is performed based on the graph embedding to obtain the clustering result.
2. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 1, characterized in that: S1 first constructs a cell-specific signaling network based on scRNA-seq data, including the following steps: S11. Construct a human molecular interaction reference network: collect 4 known human molecular interaction information from 24 databases, retain high-confidence predictions shared by at least 2 databases for the collected interaction information, and establish a reference network integrating multidimensional molecular interactions based on the above interactions; S12. Data preprocessing: The scRNA-seq data were preprocessed using the Python scanpy package to obtain the genes and gene expression levels of each cell; S13. Screening the activated genes of each cell: sorting the genes of each cell from high to low according to the expression level, and screening the genes with the top 5% expression levels as the activated genes of each cell; S14. Extract cell-specific subnetworks from the reference network to form a cell-specific signaling network: for the activated genes of each cell, extract the interactions of the associated activated genes from the reference network described in S11 to form a cell-specific signaling network.
3. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 2, characterized in that: The interaction information described in S11 includes ligand-receptor interaction, protein-protein interaction, transcription factor-target gene interaction and biological signaling pathway.
4. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 2, characterized in that: The preprocessing described in S12 includes filtering genes and cells with missing values exceeding 99%, normalizing the gene expression of different cells and performing logarithmic transformation on the gene expression.
5. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 1, characterized in that: S2 then trains the same graph neural network with the cell-specific signaling network to learn the cell-specific graph representation, thereby obtaining a node embedding matrix of the cell-specific signaling network, including the following steps: S21. Construct a graph autoencoder based on graph transformer: the encoder receives two types of inputs, namely, the adjacency matrix of the single-cell network and the feature matrix of the node; the encoder comprises two layers, the input dimension of the first layer is the dimension of the feature vector of the node in the cell-specific signaling network, the output dimension is 32 dimensions, and a ReLU activation function is used; the input and output dimensions of the second layer are both 32 dimensions, and a Sigmoid activation function is used. The encoder can capture the local and global topological structures in the cell-specific signaling network, thereby generating a 32-dimensional node embedding for each node; S22. Decoder construction: predicting and reconstructing the connection relationship in the cell-specific signaling network by calculating the inner product between node embeddings, the decoder can reproduce the input cell-specific signaling network so that the topology of the output network is consistent with the input cell-specific signaling network; S23. Loss function optimization: During the learning process, the model parameters are optimized through the loss function. The loss function measures the difference between the network reconstructed by the decoder and the input cell-specific signal network, and minimizes the difference to obtain the node embedding matrix of each cell network.
6. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 5, characterized in that: The prediction and reconstruction of the connection relationship in the gene network described in S22 uses the InnerProductDecoder function based on PyTorch.
7. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 1, characterized in that: S3 finally obtains the graph embedding vector of the cell-specific network according to the node embedding matrix, performs graph-represented cell clustering based on the graph embedding, and obtains the clustering result, including the following steps: S31, based on the embedding matrix of each cell network node, change all elements except the maximum element of each row to 0, and then flatten the 2D matrix into a 1D vector as the graph embedding vector of each cell; S32, then integrate the graph embedding vectors of all cells to form a graph embedding matrix, and cluster the graph embedding matrix after preprocessing.
8. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 7, characterized in that: S32 The graph embedding matrix contains the graph representation features of each cell.
9. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 7, characterized in that: The preprocessing step in S32 includes: first deleting the columns of all zeros in the matrix, and then using the principal component analysis method to embed the graph into the matrix for dimensionality reduction.
10. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 7, characterized in that: The clustering method used in S32 is the Louvain clustering method or the K-means clustering method.
Citation Information
Patent Citations
Single-cell RNA sequencing data clustering method and system based on graph auto-encoder
CN117437979A
Single-cell RNA sequencing data clustering method based on depth map embedded clustering
CN117711493A
Single cell data relation sequencing clustering method based on generative adversarial network
CN119007826A
Cited By
Single cell signal path reconstruction method, system, equipment and medium
CN121565265A