Single-cell RNA sequencing data clustering method based on graph transformer

By constructing a cell-specific signal network and using the graph neural network of graph transformer to learn cell-specific graph representations, the problem of difficult to capture heterogeneity in single-cell RNA sequencing data analysis is solved, and more accurate cell clustering and wider application are achieved.

CN119626347BActive Publication Date: 2025-08-12ACADEMY OF MILITARY MEDICAL SCIENCES
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411687929.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-08-12
Estimated Expiration
2044-11-25

AI Technical Summary

Technical Problem

The prior art is difficult to accurately capture heterogeneity between cells in single-cell RNA sequencing data analysis, resulting in a decrease in the prediction accuracy of cell type, function or status, and the scope of application of the model is limited.

Method used

Cell-specific signal network is constructed, and a graph neural network of graph transformer is used to learn cell-specific graph representations. Cell clustering is performed through node embedding matrix to reveal heterogeneity between cells.

Benefits of technology

It improves the accuracy and robustness of cell clustering, provides rich information for subsequent biological analysis, expands the application scope of the model, can reveal potential cell subpopulations or cell types, and infer cell interactions and regulatory relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119626347B_ABST
    Figure CN119626347B_ABST
Patent Text Reader

Abstract

The present invention discloses a graph transformer-based single-cell RNA sequencing data clustering method, which relates to the fields of deep learning and bioinformatics. The method comprises the following steps: first, constructing a cell-specific signaling network based on scRNA-seq data; then training the same graph neural network with the cell-specific signaling network to learn a cell-specific graph representation, thereby obtaining a node embedding matrix of the cell-specific signaling network; and finally, performing graph-representation-based cell clustering according to the node embedding matrix. The graph transformer-based single-cell RNA sequencing data clustering method constructs a specific network for each cell and then uses a GNN to learn the specific graph embedding of each cell to reveal the heterogeneity between cells and expand the application scope of the model. 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to deep learning and bioinformatics, 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 bioinformatics technologies, single-cell RNA sequencing (scRNA-seq) enables the study of cellular states, communication, and heterogeneity at single-cell resolution. The first step in scRNA-seq analysis is to identify the cell types within a biological system using cell clustering. 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, GNNs have become a key 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 true 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 type, function or status, 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 address the above-mentioned deficiencies in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a single-cell RNA sequencing data clustering method based on a graph transformer, comprising the following steps:

[0006] S1. First, construct a cell-specific signaling network based on scRNA-seq data;

[0007] S2. Then, the same graph neural network is trained 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 cell clustering based on graph representation is performed based on the graph embedding to obtain the clustering result.

[0009] Furthermore, as described in S1, a cell-specific signaling network is first constructed based on scRNA-seq data, including the following steps:

[0010] S11. Construction of a human molecular interaction reference network: Collect information on four known human molecular interactions from 24 databases, retain high-confidence predictions shared by at least two databases, and build a reference network integrating multidimensional molecular interactions based on these 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 top 5% of the 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 in S12 includes filtering genes and cells with missing values exceeding 99%, normalizing gene expression in different cells, and performing logarithmic transformation on gene expression.

[0016] Furthermore, S2 further 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 a 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 comprises two layers, the first layer has an input dimension equal to the dimension of the feature vector of the node in the cell-specific signaling network, and an output dimension of 32 dimensions, using a ReLU activation function; the second layer has both an input and output dimension of 32 dimensions, using a Sigmoid activation function. The encoder is capable of capturing 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 connectivity relationships in the cell-specific signaling network by computing the inner product between node embeddings. The decoder is capable of reproducing 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 this 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 largest 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, the graph embedding vectors of all cells are integrated to form a graph embedding matrix, and the graph embedding matrix is preprocessed and clustered.

[0024] Furthermore, the graph embedding matrix in S32 contains the 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 the Louvain clustering method or the K-means clustering method.

[0027] Compared with the existing technology, 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. Each cell's specific network reflects its unique biological state and potential functional characteristics.

[0029] By leveraging the powerful learning ability of GNN to capture 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 clustering accuracy and robustness, 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 distances 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 following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described 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, including the following steps:

[0037] S1. First, construct a cell-specific signaling network based on scRNA-seq data;

[0038] S11. Constructing a human molecular interaction reference network: Four known human molecular interaction information types were collected from 24 databases, including ligand-receptor interactions, protein-protein interactions, transcription factor-target gene interactions, and biological signaling pathways. Quality control was performed on the collected interactions, retaining high-confidence predictions shared by at least two databases. Based on these interactions, a reference network integrating multidimensional molecular interactions was established. It is worth noting that because two molecules can have multiple interactions, this reference network is a multigraph model, meaning that multiple edges can exist 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 signaling 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 signaling pathway related databases include KEGG, Reactome, CTD, PathBank, INOH, HumanCyc and Pathway Commons.

[0041] Ligand-receptor interactions describe the interactions between ligands (such as hormones, neurotransmitters, etc.) and receptors (such as proteins on the cell membrane); protein-protein interactions describe the physical contact and interactions between proteins, which play a key role in cell function; transcription factor-target gene interactions describe the interactions 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 within 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: Sort the genes of each cell by expression level from high to low, and screen 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, we can identify genes that are critical for cell function in the current state. Each cell has its own unique set of activated genes, which allows for personalized cell function analysis.

[0046] S14. Extract cell-specific subnetworks from the reference network to form a cell-specific signaling network: For each cell's activated genes, extract the interactions associated with these genes from the reference network to form a cell-specific signaling network.

[0047] This process is implemented using 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 traversed.

[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. All unvisited neighbor nodes of the gene (i.e., molecules that interact with it) are recursively visited and added to the subgraph, marking them as visited. The above process is repeated until all nodes reachable from the current activated gene have been 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 cell-specific subnetworks that reflect the specific state of the cell. By analyzing these subnetworks, we can reveal the signal transmission 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, the same graph neural network is trained 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 typically train GNN models using a single network (with nodes representing cells) and then cluster cells using node embeddings. This method innovatively uses a large number of cell-specific networks to train a single GNN, learning a unique graph representation for each cell and revealing intercellular heterogeneity based on this graph representation. This implementation relies on the distributed computing framework PyTorch and utilizes GPUs to accelerate model training:

[0054] S21. Construct a graph autoencoder based on a graph transformer: The encoder receives two types of input: the adjacency matrix of the single-cell network and the feature matrix of the node. The encoder consists of 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, and the output dimension is 32-dimensional, using the ReLU activation function. The input and output dimensions of the second layer are both 32-dimensional, using the Sigmoid activation function. The encoder can capture the local and global topological structure 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 interactions 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, thereby more accurately capturing 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 (that is, 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 connections or functional modules between cells. The choice of ReLU and Sigmoid activation functions helps the model handle nonlinear relationships and enhance the model's expressiveness and generalization capabilities.

[0056] Through the encoder's processing, each node (i.e., cell) generates a 32-dimensional node embedding. These embeddings not only capture the cell's own gene expression and other biological characteristics, but also incorporate intercellular interactions. These embeddings provide powerful tools for subsequent cell clustering, classification, disease diagnosis, and more.

[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 connectivity within a cell-specific signaling network by computing the inner product between node embeddings. This approach leverages the similarity between embedding vectors to infer interactions between cells, thereby reconstructing the input network. This reconstruction not only helps validate the encoder's effectiveness but also enables further exploration of potential connections and relationships within the cellular network.

[0059] The decoder's goal is to reproduce the input cell-specific signaling network as closely as possible, ensuring that the output network's topology is consistent with the input network. This consistency helps the model learn more biologically meaningful graph representations, providing a reliable basis for subsequent analysis. By maintaining network consistency, the model can better capture intercellular heterogeneity, providing 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 this difference to obtain the node embedding matrix of each cell network.

[0061] The loss function is a key metric that measures the difference between the network reconstructed by the decoder and the input network. By minimizing this difference, the model learns a more representative graph representation. This step is the core of model training and directly determines its performance and effectiveness. By optimizing the loss function, the model continuously adjusts its parameters to more accurately capture the topological structure and characteristics of the cellular network.

[0062] The process of optimizing the loss function not only improves the model's reconstruction capabilities but, more importantly, uncovers biologically meaningful graph representations. These representations can reveal key information such as cellular heterogeneity, functional modules, and disease-related pathways, providing strong support for subsequent cell classification, disease diagnosis, and drug development.

[0063] By designing a reasonable loss function and optimizing the algorithm, we can ensure the stability of the model during training. This helps avoid overfitting or underfitting, improves the model's generalization and robustness, and enables a more robust model to adapt to different cell datasets and experimental conditions, opening up the possibility 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 cell clustering based on 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, set all elements except the largest element in each row to 0. Then flatten the 2-dimensional matrix into a 1-dimensional vector, which serves as the graph embedding vector for each cell. Assuming the data contains M genes, the dimension of the node embedding matrix for each cell is (M × 32). Then, calculate the sum of the elements in each row of the node embedding matrix to obtain an M-dimensional graph embedding vector.

[0066] Assuming the data contains M genes, the dimension of the node embedding matrix for each cell is (M × 32). This matrix is actually a feature matrix, where each row represents a gene and each column represents a 32-dimensional embedding vector component. To transform cell features 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, preserving the overall contribution of each gene to all embedding 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 cluster analysis.

[0071] S32. Finally, the M-dimensional graph embedding vectors of all N cells are integrated to form an (N × M)-dimensional graph embedding matrix. The graph embedding matrix contains the graph representation features of each cell. However, because the number of features is often large, principal component analysis (PCA) is used to reduce the matrix to (N × 50) dimensions before clustering. Finally, if the number of cell types in the scRNA-seq data is uncertain, the Louvain method, which automatically retrieves the optimal number of clusters, is used to cluster the reduced graph embedding matrix. If the number of cell types is known, K-means clustering is used to cluster the reduced graph embedding matrix.

[0072] After obtaining the M-dimensional graph embedding vector for each cell, we integrate them 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] Because graph embedding matrices often have a large number of features (i.e., a large M value), direct clustering analysis can lead to computational overhead and unstable results. Therefore, before clustering, we first remove all zero columns from the matrix (which do not contribute to inter-cell heterogeneity). Then, we use principal component analysis (PCA) to reduce the matrix's dimensionality to (N × 50). PCA is a commonly used data dimensionality reduction technique that removes redundant information by retaining the principal components (i.e., the directions with the highest variance) in the data, 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 features of the original data, but also greatly reduces the computational complexity and time cost, providing strong support for subsequent cell clustering using the Louvain method or K-means method.

[0075] When the number of cell types in scRNA-seq data is uncertain, clustering using the Louvain method is recommended. The Louvain method is a community discovery algorithm based on modularity optimization that automatically retrieves the optimal number of clusters. This method does not require a predefined number of clusters, making it particularly suitable for cases where the number of cell types is unknown. The Louvain method produces clear and stable cell clustering results, providing a valuable 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, making it particularly suitable when the number of clusters is known. The K-means method can produce clustering results that match the known number of cell types, thereby validating and explaining intercellular heterogeneity and biological characteristics.

[0077] Example 2:

[0078] This embodiment provides a technical solution based on the first embodiment: Step S23 loss function optimization, the specific implementation method is as follows:

[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] Define 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, 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 obtained by the decoder converting G i Mapped to the latent space.

[0092] The above description is merely illustrative of certain exemplary embodiments of the present invention. It goes without saying that those skilled in the art will be able to modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and description are illustrative in nature and should not be construed as limiting the scope of protection of the claims.

Claims

1. A graph transformer-based clustering method for single-cell RNA sequencing data, characterized by: The steps include: S1. First, construct a cell-specific signaling network based on scRNA-seq data, including the following steps: S11. Construction of a human molecular interaction reference network: Collect information on four known human molecular interactions from 24 databases, retain high-confidence predictions shared by at least two databases, and build a reference network integrating multidimensional molecular interactions based on the above interaction information; 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: Sort the genes of each cell by expression level from high to low, and select the top 5% of the expressed genes as the activated genes of each cell; S14. Extracting cell-specific subnetworks from the reference network to form a cell-specific signaling network: for each cell's activated gene, extracting the interactions of the associated activated genes from the reference network described in S11 to form a cell-specific signaling network; S2. Training 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, including the following steps: S21. Construct a graph autoencoder based on a 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 comprises two layers, the first layer has an input dimension equal to the dimension of the feature vector of the node in the cell-specific signaling network, and an output dimension of 32 dimensions, using a ReLU activation function; the second layer has both an input and output dimension of 32 dimensions, using a Sigmoid activation function. The encoder is capable of capturing 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 connectivity relationships in the cell-specific signaling network by computing the inner product between node embeddings. The decoder is capable of reproducing 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 this difference to obtain the node embedding matrix of each cell network. S3. Finally, the graph embedding vector of the cell-specific network is obtained according to the node embedding matrix, and cell clustering based on 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 The interaction information described in S11 includes ligand-receptor interaction, protein-protein interaction, transcription factor-target gene interaction and biological signaling pathway.

3. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 1, characterized in that The preprocessing described in S12 includes filtering genes and cells with missing values exceeding 99%, normalizing gene expression in different cells, and performing logarithmic transformation on gene expression.

4. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 1, 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.

5. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 1, characterized in that Finally, the graph embedding vector of the cell-specific network is obtained according to the node embedding matrix, and cell clustering based on the graph representation is performed based on the graph embedding to obtain the clustering result, which includes the following steps: S31. Based on the embedding matrix of each cell network node, all elements except the largest 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; S32. Then, the graph embedding vectors of all cells are integrated to form a graph embedding matrix, and the graph embedding matrix is preprocessed and clustered.

6. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 5, characterized in that The graph embedding matrix S32 contains the graph representation features of each cell.

7. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 5, 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.

8. The single-cell RNA sequencing data clustering method based on graph transformer according to claim 5, 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 data relation sequencing clustering method based on generative adversarial network

    CN119007826A