A single cell clustering method, device, equipment and readable storage medium

By constructing the distribution Q and target distribution P, combined with the low-pass filter graph convolution module, the clustering method of single-cell RNA sequencing data is optimized, and the lack of cell structure information and poor clustering effect in the existing technology is solved, and better clustering effect is achieved.

CN114334013BActive Publication Date: 2025-03-21WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111671817.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-03-21
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing single-cell RNA sequencing data clustering methods lack the mining of cell structure information and are not clustered when processing large, high-dimensional and/or noisy data.

Method used

By constructing the distribution Q and the target distribution P, the first and second loss functions are constructed, and the sample feature matrix and connection matrix after dimensionality reduction are passed into the low-pass filter graph convolution module to obtain the probability matrix, thereby optimizing the clustering results.

Benefits of technology

This method can better retain the structural information of the data, and the feature representation after dimensionality reduction is smoother, thereby achieving better clustering effect on high-dimensional data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114334013B_ABST
    Figure CN114334013B_ABST
Patent Text Reader

Abstract

The present invention provides a single-cell clustering method, device, equipment and readable storage medium. The method includes: constructing distribution Q and target distribution P based on the similarity between single-cell sample points and cluster centers; constructing a first loss function based on distribution Q and target distribution P; reducing the dimension of the sample feature matrix to obtain a sample feature matrix after dimension reduction; passing the sample feature matrix and connection matrix after dimension reduction into a low-pass filter graph convolution module to obtain a probability matrix; constructing a second loss function based on the target distribution P and the probability matrix; obtaining a new probability matrix according to the first loss function and the second loss function; and obtaining the clustering results of the single-cell sample points from the new probability matrix. Through the present invention, the feature representation of the same cluster class becomes smoother during the transmission of the sample feature matrix after dimension reduction in the low-pass filter graph convolution module, so that the clustering results of the single-cell sample points obtained from the new probability matrix are better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data clustering, and in particular to a single cell clustering method, device, equipment and readable storage medium. Background Art

[0002] Single-cell RNA sequencing (scRNA-seq) technology sequences the RNA of each cell to obtain the expression levels of all genes in the cell. In scRNA-seq data, the expression level of each gene in the cell can be regarded as a feature of the cell, and the key step in mining biological information from scRNA-seq data is to cluster cells with similar life states and biological functions into a cluster.

[0003] With the development of deep learning, some deep learning-based clustering methods have been proposed. However, the current clustering methods lack the mining of structural information between cells, and the clustering effect is poor when faced with large, high-dimensional and / or noisy scRNA-seq data. Summary of the invention

[0004] The main purpose of the present invention is to provide a single-cell clustering method, device, equipment and readable storage medium, aiming to optimize the clustering method to obtain a better clustering effect.

[0005] In a first aspect, the present invention provides a single cell clustering method, the single cell clustering method comprising:

[0006] Construct distribution Q and target distribution P based on the similarity between single-cell sample points and cluster centers;

[0007] Construct a first loss function based on distribution Q and target distribution P;

[0008] Reduce the dimension of the sample feature matrix to obtain the sample feature matrix after dimension reduction;

[0009] The sample feature matrix and connection matrix after dimensionality reduction are passed into the low-pass filter graph convolution module to obtain the probability matrix;

[0010] Construct a second loss function based on the target distribution P and the probability matrix;

[0011] Obtain a new probability matrix according to the first loss function and the second loss function;

[0012] Obtain the clustering results of single-cell sample points from the new probability matrix.

[0013] Optionally, before the step of constructing the distribution Q and the target distribution P based on the similarity between the single cell sample point and the cluster center, the method further includes:

[0014] Get sample feature matrix;

[0015] The K nearest neighbor classification algorithm is used to construct the sample feature matrix and obtain the connection matrix;

[0016] The sample matrix and the connection matrix are passed into the initial graph autoencoder module to obtain the reconstructed sample feature matrix and the reconstructed connection matrix;

[0017] The initial graph autoencoder module is trained according to the sample feature matrix, the connection matrix, the reconstructed sample feature matrix and the reconstructed connection matrix to obtain a graph autoencoder module;

[0018] The sample matrix and connection matrix are passed into the graph autoencoder module, and the cluster centers are obtained through K-means clustering.

[0019] Calculate the similarity between single cell sample points and cluster centers.

[0020] Optionally, the step of training the initial graph autoencoder module according to the sample feature matrix, the connection matrix, the reconstructed sample feature matrix and the reconstructed connection matrix to obtain the graph autoencoder module includes:

[0021] A third loss function is obtained based on the sample feature matrix and the reconstructed sample feature matrix;

[0022] A fourth loss function is obtained based on the connection matrix and the reconstructed connection matrix;

[0023] The initial graph autoencoder module is trained according to the third loss function and the fourth loss function to obtain a graph autoencoder module.

[0024] Optionally, the step of constructing the distribution Q and the target distribution P based on the similarity between the single cell sample point and the cluster center includes:

[0025] The distribution Q is obtained based on the similarity between the single cell sample point and the cluster center, where Q = [q ie ], q ie is a single cell sample point h i and cluster center u e similarity;

[0026] Based on the distribution Q, the target distribution P is obtained, where P = [p ie ], f e =∑ i q ie , f e is the frequency of cluster e, p ie is a single cell sample point h i and cluster center u e Target similarity.

[0027] Optionally, the step of constructing a first loss function based on the distribution Q and the target distribution P includes:

[0028] Construct the first loss function L clu is the KL divergence between distribution Q and target distribution P, where q ie is a single cell sample point h i and cluster center u e The similarity, p ie is a single cell sample point h i and cluster center u e Target similarity.

[0029] Optionally, the step of reducing the dimension of the sample feature matrix to obtain the sample feature matrix after the dimension reduction includes:

[0030] Use a fully connected neural network to reduce the n*d-dimensional sample feature matrix to an n*m-dimensional sample feature matrix, where Z (0) =ReLU(WX+b), ReLU is a nonlinear activation function, W is a weight matrix, b is a bias term, X is a sample matrix, Z (0) is the sample feature matrix after dimensionality reduction.

[0031] Optionally, the step of passing the reduced-dimensional sample feature matrix and the connection matrix into a low-pass filter graph convolution module to obtain a probability matrix includes:

[0032] The reduced sample feature matrix and connection matrix are passed into the low-pass filter graph convolution module for propagation. The propagation formula is as follows:

[0033]

[0034] Among them, Z (k) is the sample feature matrix of the kth layer, α k , β k And ω k is the k-th layer hyperparameter, Z (0) is the sample feature matrix after dimensionality reduction, A is the connection matrix, It is the degree matrix after constructing the sample feature matrix plus an N-order unit matrix, I N is the N-order identity matrix, W1 (k) and W2 (k) is the learnable parameter matrix of the kth layer;

[0035] The last layer in the propagation is input into the fully connected layer, and then passed through the softmax layer to obtain the probability matrix Z, where Z = softmax(W (K+1) Z (K+1) +b (K+1) ), Z (K+1)is the last layer in the propagation, b (K+1) is the bias term of the last layer in the propagation, W (K+1) is the learnable parameter matrix of the last layer in propagation.

[0036] In a second aspect, the present invention further provides a single cell clustering device, the single cell clustering device comprising:

[0037] The first construction module is used to construct the distribution Q and the target distribution P based on the similarity between the single cell sample point and the cluster center;

[0038] A second construction module is used to construct a first loss function based on the distribution Q and the target distribution P;

[0039] A dimension reduction module is used to reduce the dimension of the sample feature matrix to obtain the sample feature matrix after dimension reduction;

[0040] The transmission module is used to pass the sample feature matrix and connection matrix after dimension reduction into the low-pass filter graph convolution module to obtain the probability matrix;

[0041] A third construction module is used to construct a second loss function based on the target distribution P and the probability matrix;

[0042] A training module, used for obtaining a new probability matrix according to a first loss function and a second loss function;

[0043] The acquisition module is used to obtain the clustering results of single-cell sample points from the new probability matrix.

[0044] In a third aspect, the present invention also provides a single-cell clustering device, comprising a processor, a memory, and a single-cell clustering program stored in the memory and executable by the processor, wherein when the single-cell clustering program is executed by the processor, the steps of the single-cell clustering method as described above are implemented.

[0045] In a fourth aspect, the present invention further provides a readable storage medium, on which a single-cell clustering program is stored, wherein when the single-cell clustering program is executed by a processor, the steps of the single-cell clustering method as described above are implemented.

[0046] In the present invention, distribution Q and target distribution P are constructed based on the similarity between single-cell sample points and cluster centers; a first loss function is constructed based on distribution Q and target distribution P; the sample feature matrix is ​​reduced in dimension to obtain a sample feature matrix after dimension reduction; the sample feature matrix after dimension reduction and the connection matrix are passed into a low-pass filter graph convolution module to obtain a probability matrix; a second loss function is constructed based on the target distribution P and the probability matrix; a new probability matrix is ​​obtained according to the first loss function and the second loss function; and the clustering results of the single-cell sample points are obtained from the new probability matrix. Through the present invention, a first loss function is constructed based on the distribution Q and the target distribution P, and then the sample feature matrix and the connection matrix after dimensionality reduction are passed into the low-pass filter graph convolution module to obtain a probability matrix, and a second loss function is constructed based on the target distribution P and the probability matrix. A new probability matrix is ​​obtained according to the first loss function and the second loss function. The low-pass filter graph convolution module uses the information of neighboring single cells, so that when the clustering task is carried out on large, complex, and high-dimensional data, the data can maintain the structural information of the data, and the feature representation of the same cluster of the sample feature matrix after dimensionality reduction becomes smoother during the transmission of the low-pass filter graph convolution module, so that the clustering results of single-cell sample points obtained from the new probability matrix are better. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Schematic diagram of the hardware structure of a single-cell clustering device involved in an embodiment of the present invention;

[0048] Figure 2 This is a schematic diagram of a process of an embodiment of a single cell clustering method of the present invention;

[0049] Figure 3 This is a system architecture diagram of an embodiment of a single cell clustering method of the present invention;

[0050] Figure 4 Schematic diagram of functional modules of an embodiment of a single-cell clustering device of the present invention.

[0051] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0053] In a first aspect, an embodiment of the present invention provides a single-cell clustering device, which may be a device having a data processing function, such as a personal computer (PC), a notebook computer, or a server.

[0054] Reference Figure 1 , Figure 1It is a schematic diagram of the hardware structure of the single-cell clustering device involved in the embodiment of the present invention. In the embodiment of the present invention, the single-cell clustering device may include a processor 1001 (such as a central processing unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as wireless fidelity WIreless-FIdelity, WI-FI interface); the memory 1005 may be a high-speed random access memory (random access memory, RAM), or a stable memory (non-volatile memory), such as a disk storage, and the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001. Those skilled in the art will understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation of the present invention, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.

[0055] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a single cell clustering program. The processor 1001 may call the single cell clustering program stored in the memory 1005 and execute the single cell clustering method provided in the embodiment of the present invention.

[0056] In a second aspect, an embodiment of the present invention provides a single-cell clustering method.

[0057] In one embodiment, referring to Figure 2 , Figure 2 FIG. 1 is a flow chart of an embodiment of a single cell clustering method of the present invention. Figure 2 As shown, the single cell clustering method includes:

[0058] Step S10, constructing distribution Q and target distribution P based on the similarity between single cell sample points and cluster centers;

[0059] In this embodiment, refer to Figure 3 , Figure 3 FIG. 1 is a system architecture diagram of an embodiment of a single cell clustering method of the present invention. Figure 3As shown in the self-supervision module, conditional probability is used to represent the similarity q between each single cell sample point and the cluster center, thereby constructing the distribution Q. Based on the distribution Q, the target distribution P can be calculated. Where Q = [q ie ], P = [p ie ].

[0060] Furthermore, in one embodiment, step S10 includes:

[0061] The distribution Q is obtained based on the similarity between the single cell sample point and the cluster center, where Q = [q ie ], q ie is a single cell sample point h i and cluster center u e similarity;

[0062] Based on the distribution Q, the target distribution P is obtained, where P = [p ie ], f e =∑ i q ie , f e is the frequency of cluster e, p ie is a single cell sample point h i and cluster center u e Target similarity.

[0063] In this embodiment, t distribution is used as the kernel function to calculate the single cell sample point h i and cluster center u e The similarity q ie , Where v is the degree of freedom of the t distribution. Based on the distribution Q, the target distribution P is calculated, where P = [p ie ], f e =∑ i q ie , f e is the frequency of cluster e, p ie is a single cell sample point h i and cluster center u e Target similarity.

[0064] Step S20, constructing a first loss function based on the distribution Q and the target distribution P;

[0065] In this embodiment, a first loss function is constructed based on the distribution Q and the target distribution P, which is the KL divergence of the distribution Q and the target distribution P. The KL divergence is used to measure the difference between the distribution Q and the target distribution P.

[0066] Furthermore, in one embodiment, step S20 includes:

[0067] Construct the first loss function L clu is the KL divergence between distribution Q and target distribution P, where q ie is a single cell sample point h i and cluster center u e The similarity, p ie is a single cell sample point h i and cluster center u e Target similarity.

[0068] In this embodiment, KL divergence (Kullback–Leibler divergence), also known as relative entropy, is a method for describing the difference between two probability distributions P and Q. Construct the first loss function L clu is the KL divergence between distribution Q and target distribution P, that is q ie is a single cell sample point h i and cluster center u e The similarity, p ie is a single cell sample point h i and cluster center u e Target similarity.

[0069] Step S30, reducing the dimension of the sample feature matrix to obtain a sample feature matrix after dimension reduction;

[0070] In this embodiment, a fully connected neural network is used to reduce the dimension of the sample feature matrix to obtain a sample feature matrix after dimension reduction.

[0071] Furthermore, in one embodiment, step S30 includes:

[0072] Use a fully connected neural network to reduce the n*d-dimensional sample feature matrix to an n*m-dimensional sample feature matrix, where Z (0) =ReLU(WX+b), ReLU is a nonlinear activation function, W is a weight matrix, b is a bias term, X is a sample matrix, Z (0) is the sample feature matrix after dimensionality reduction.

[0073] In this embodiment, the fully connected neural network (DNN) includes an input layer, a hidden layer, and an output layer. A DNN structure has only one input layer and one output layer, and the layers between the input layer and the output layer are all hidden layers. Each layer of the neural network has a number of neurons. The neurons between layers are interconnected, the neurons within the layer are not connected to each other, and the neurons in the next layer are connected to all the neurons in the previous layer. The neurons in the DNN are composed of five parts: input, weight, bias, activation function, and output. A fully connected neural network is used to reduce the n*2000-dimensional sample feature matrix to an n*512-dimensional sample feature matrix, where Z(0) =ReLU(WX+b), ReLU is a nonlinear activation function, W is a weight matrix, b is a bias term, X is a sample matrix, Z (0) It is easy to imagine that the parameters in this embodiment are only for reference and are not limited here.

[0074] Step S40, passing the sample feature matrix and the connection matrix after dimension reduction into a low-pass filter graph convolution module to obtain a probability matrix;

[0075] In this embodiment, continue to refer to Figure 3 , the sample feature matrix Z after dimensionality reduction (0) The connection matrix A is passed into the low-pass filter graph convolution module for propagation, and the last layer passes through the softmax layer to obtain the n*c probability matrix Z.

[0076] Furthermore, in one embodiment, step S40 includes:

[0077] The reduced sample feature matrix and connection matrix are passed into the low-pass filter graph convolution module for propagation. The propagation formula is as follows:

[0078]

[0079] Among them, Z (k) is the sample feature matrix of the kth layer, α k , β k And ω k is the k-th layer hyperparameter, Z (0) is the sample feature matrix after dimensionality reduction, A is the connection matrix, It is the degree matrix after constructing the sample feature matrix plus an N-order unit matrix, I N is the N-order identity matrix, W1 (k) and W2 (k) is the learnable parameter matrix of the kth layer;

[0080] The last layer in the propagation is input into the fully connected layer, and then passed through the softmax layer to obtain the probability matrix Z, where Z = softmax(W (K+1) Z (K+1) +b (K+1) ), Z (K+1) is the last layer in the propagation, b (K+1) is the bias term of the last layer in the propagation, W (K+1) is the learnable parameter matrix of the last layer in propagation.

[0081] In this embodiment, the low-pass filter graph convolution module is modified based on the ChebNet model, and the frequency response function in the spectral domain is: Replace with low pass filter Then the identity mapping and initial residual connection are used. The sample feature matrix Z after dimensionality reduction is (0) And the connection matrix A is passed into the low-pass filter graph convolution module for propagation. The propagation formula is as follows:

[0082]

[0083] Among them, Z (k) is the sample feature matrix of the kth layer, α k , β k And ω k is the k-th layer hyperparameter. In this embodiment, α k =0.3, Z (0) is the sample feature matrix after dimensionality reduction, A is the connection matrix, D~ is the degree matrix after the sample feature matrix is ​​constructed plus an N-order unit matrix, I N is the N-order identity matrix, W1 (k) and W2 (k) is the learnable parameter matrix of the kth layer.

[0084] The last layer in the propagation is input into the fully connected layer, and then through the softmax layer to obtain the probability matrix Z, where Z = softmax(W (K+1) Z (K+1) +b (K+1) ), Z (K+1) is the last layer in the propagation, b (K+1) is the bias term of the last layer in the propagation, W (K+1) is the learnable parameter matrix of the last layer in propagation.

[0085] Step S50, constructing a second loss function based on the target distribution P and the probability matrix;

[0086] In this embodiment, the second loss function L is constructed gcn is the KL divergence between the target distribution P and the probability matrix Z. The target distribution P is used to supervise the update of the probability matrix Z to integrate the integrated structural information between cells. z ij is an element in the probability matrix Z.

[0087] Step S60, obtaining a new probability matrix according to the first loss function and the second loss function;

[0088] In this embodiment, the loss function L=0.1×L is minimized using the gradient descent method according to the first loss function and the second loss function. clu +0.01×L gcnIn the process of minimizing the loss function, the self-supervision module and the low-pass filter graph convolution module are continuously trained in a loop. For example, the number of cycles is 500. After the loss function is minimized, a new probability matrix is ​​obtained.

[0089] Step S70, obtaining the clustering results of the single-cell sample points from the new probability matrix.

[0090] In this embodiment, the clustering results of the single-cell sample points in the new probability matrix, that is, for the single-cell sample point i, the cluster category corresponding to the maximum probability is taken as the clustering result of the single-cell sample point i, where the label of the clustering result of the single-cell sample point is z ij ∈Z, represents the probability that a single cell sample point i is in cluster e.

[0091] In this embodiment, a distribution Q and a target distribution P are constructed based on the similarity between the single-cell sample point and the cluster center; a first loss function is constructed based on the distribution Q and the target distribution P; the sample feature matrix is ​​reduced in dimension to obtain a reduced-dimensional sample feature matrix; the reduced-dimensional sample feature matrix and the connection matrix are passed into a low-pass filter graph convolution module to obtain a probability matrix; a second loss function is constructed based on the target distribution P and the probability matrix; a new probability matrix is ​​obtained based on the first loss function and the second loss function; and the clustering results of the single-cell sample points are obtained from the new probability matrix. Through this embodiment, a first loss function is constructed based on the distribution Q and the target distribution P, and then the sample feature matrix and the connection matrix after dimensionality reduction are passed into the low-pass filter graph convolution module to obtain a probability matrix, and a second loss function is constructed based on the target distribution P and the probability matrix. A new probability matrix is ​​obtained according to the first loss function and the second loss function. The low-pass filter graph convolution module utilizes the information of neighboring single cells, so that when the clustering task is carried out on large, complex, and high-dimensional data, the data can maintain the structural information of the data, and the feature representation of the same cluster of the sample feature matrix after dimensionality reduction becomes smoother during the transmission process of the low-pass filter graph convolution module, so that the clustering results of single-cell sample points obtained from the new probability matrix are better.

[0092] Furthermore, in one embodiment, before step S10, the method further includes:

[0093] Get sample feature matrix;

[0094] The K nearest neighbor classification algorithm is used to construct the sample feature matrix and obtain the connection matrix;

[0095] The sample matrix and the connection matrix are passed into the initial graph autoencoder module to obtain the reconstructed sample feature matrix and the reconstructed connection matrix;

[0096] The initial graph autoencoder module is trained according to the sample feature matrix, the connection matrix, the reconstructed sample feature matrix and the reconstructed connection matrix to obtain a graph autoencoder module;

[0097] The sample matrix and connection matrix are passed into the graph autoencoder module, and the cluster centers are obtained through K-means clustering.

[0098] Calculate the similarity between single cell sample points and cluster centers.

[0099] In this embodiment, N single-cell sequencing data are selected from the single-cell RNA sequencing data set to obtain a sample feature matrix X, where X = [x1, x2, ..., x N ] T , T is the transposition. For single cell sample point i and single cell sample point j, their similarity can be expressed as In the formula, |x i | is the feature vector x i The module of |x j | is the feature vector x j For a dataset of N cells, its similarity matrix S∈R N×N .

[0100] For a single-cell sample point i, KNN (K nearest neighbor classification algorithm) is used to select the first k single-cell sample points closest to the single-cell sample point i, that is, the single-cell sample points with the highest similarity, as the neighboring points of the single-cell sample point i to construct the graph, that is, to construct the connection matrix A of the graph, where A∈R N×N , if single cell sample point i and single cell sample point j are neighbors, then a ij Set to 1, if single-cell sample point i and single-cell sample point j are not neighbors, then a ij Set to 0, k is the maximum value between 0.01×N and 20, that is, if 0.01×N is greater than 20, k is 0.01×N, and if 0.01×N is not greater than 20, k is 20. It is easy to imagine that the parameters in this embodiment are for reference only and are not limited here.

[0101] Continue to refer to Figure 3 , the sample matrix and the connection matrix are passed into the initial graph autoencoder module. In the decoding part of the initial graph autoencoder module, the propagation formula is In the formula, I N is the N-order identity matrix, X (h) is the sample matrix of layer h, W (h) is the learnable parameter matrix of layer h. The sample feature matrix obtained in the last layer of the decoder of the initial graph autoencoder module is the reconstructed sample feature matrix Based on the reconstructed sample feature matrix Perform inner product operation to obtain the reconstructed connection matrix in, A third loss function is obtained according to the sample feature matrix and the reconstructed sample feature matrix, a fourth loss function is obtained according to the connection matrix and the reconstructed connection matrix, and the initial graph autoencoder module is trained according to the third loss function and the fourth loss function to obtain a graph autoencoder module.

[0102] The sample matrix and the connection matrix are passed into the graph autoencoder module. In the encoding part of the graph autoencoder module, the propagation formula is in, Add an N-order unit matrix to the constructed degree matrix, Add an N-order identity matrix to the connection matrix, X (h-1) is the sample matrix of the h-1 layer, W (h-1) is the learnable parameter matrix of the h-1 layer. In the encoder part of the graph autoencoder module, the dimension selected is d-512-256-64-10, where d is the number of sample features 2000, so the hidden variable X of the h-th layer is (h) is a matrix of N×10. The cluster centers are obtained by K-means clustering, and the cluster centers constitute a set U, U = [u1, u2, u3, ..., u c , ] T , where the set U is a c×10 matrix and c is the preset number of clusters.

[0103] The similarity q between the single cell sample point i and the cluster center e is calculated using the t distribution as the kernel function. ie ,in, h i Represents single cell sample point i, u e represents the cluster center of class e, and v is the degrees of freedom of the t distribution.

[0104] Furthermore, in one embodiment, the step of training the initial graph autoencoder module according to the sample feature matrix, the connection matrix, the reconstructed sample feature matrix and the reconstructed connection matrix to obtain the graph autoencoder module includes:

[0105] A third loss function is obtained based on the sample feature matrix and the reconstructed sample feature matrix;

[0106] A fourth loss function is obtained based on the connection matrix and the reconstructed connection matrix;

[0107] The initial graph autoencoder module is trained according to the third loss function and the fourth loss function to obtain a graph autoencoder module.

[0108] In this embodiment, the third loss function L is obtained based on the sample feature matrix and the reconstructed sample feature matrix. res-c in, x ij is the element in the sample feature matrix X, is the element in the reconstructed sample feature matrix.

[0109] Based on the connection matrix and the reconstructed connection matrix, the fourth loss function L is obtained. res-g ,in, a ij are the elements in the connection matrix, is the element in the reconstructed connection matrix.

[0110] Use gradient descent to minimize the loss function L res =L res-c +0.0001×L res-g In the process of minimizing the loss function, the initial graph autoencoder module is continuously trained in a loop. For example, the number of loops is 500. After the loss function is minimized, the graph autoencoder module is obtained.

[0111] In a third aspect, an embodiment of the present invention further provides a single-cell clustering device.

[0112] Further, in one embodiment, referring to Figure 4 , Figure 4 FIG. 1 is a schematic diagram of the functional modules of an embodiment of a single cell clustering device of the present invention. Figure 4 As shown, the single-cell clustering device comprises:

[0113] A first construction module 10 is used to construct a distribution Q and a target distribution P based on the similarity between the single cell sample point and the cluster center;

[0114] A second construction module 20, configured to construct a first loss function based on the distribution Q and the target distribution P;

[0115] A dimension reduction module 30 is used to reduce the dimension of the sample feature matrix to obtain a sample feature matrix after dimension reduction;

[0116] A transmission module 40 is used to transmit the sample feature matrix and the connection matrix after dimension reduction to the low-pass filter graph convolution module to obtain a probability matrix;

[0117] A third construction module 50, configured to construct a second loss function based on the target distribution P and the probability matrix;

[0118] A training module 60, configured to obtain a new probability matrix according to the first loss function and the second loss function;

[0119] The acquisition module 70 is used to acquire the clustering results of the single cell sample points from the new probability matrix.

[0120] Furthermore, in one embodiment, the single cell clustering device further includes a computing module for:

[0121] Get sample feature matrix;

[0122] The K nearest neighbor classification algorithm is used to construct the sample feature matrix and obtain the connection matrix;

[0123] The sample matrix and the connection matrix are passed into the initial graph autoencoder module to obtain the reconstructed sample feature matrix and the reconstructed connection matrix;

[0124] The initial graph autoencoder module is trained according to the sample feature matrix, the connection matrix, the reconstructed sample feature matrix and the reconstructed connection matrix to obtain a graph autoencoder module;

[0125] The sample matrix and connection matrix are passed into the graph autoencoder module, and the cluster centers are obtained through K-means clustering.

[0126] Calculate the similarity between single cell sample points and cluster centers.

[0127] Furthermore, in one embodiment, the calculation module is also used for:

[0128] A third loss function is obtained based on the sample feature matrix and the reconstructed sample feature matrix;

[0129] A fourth loss function is obtained based on the connection matrix and the reconstructed connection matrix;

[0130] The initial graph autoencoder module is trained according to the third loss function and the fourth loss function to obtain a graph autoencoder module.

[0131] Furthermore, in one embodiment, the first construction module 10 is used to:

[0132] The distribution Q is obtained based on the similarity between the single cell sample point and the cluster center, where Q = [q ie ], q ie is a single cell sample point h i and cluster center u e similarity;

[0133] Based on the distribution Q, the target distribution P is obtained, where P = [p ie ], f e =∑ i q ie , f e is the frequency of cluster e, p ie is a single cell sample point h i and cluster center u e Target similarity.

[0134] Furthermore, in one embodiment, the second construction module 20 is used to:

[0135] Construct the first loss function L clu is the KL divergence between distribution Q and target distribution P, where q ie is a single cell sample point h i and cluster center u e The similarity, p ie is a single cell sample point h i and cluster center u e Target similarity.

[0136] Furthermore, in one embodiment, the dimension reduction module 30 is used to:

[0137] Use a fully connected neural network to reduce the n*d-dimensional sample feature matrix to an n*m-dimensional sample feature matrix, where Z (0) =ReLU(WX+b), ReLU is a nonlinear activation function, W is a weight matrix, b is a bias term, X is a sample matrix, Z (0) is the sample feature matrix after dimensionality reduction.

[0138] Furthermore, in one embodiment, the transmission module 40 is used to:

[0139] The reduced sample feature matrix and connection matrix are passed into the low-pass filter graph convolution module for propagation. The propagation formula is as follows:

[0140]

[0141] Among them, Z (k) is the sample feature matrix of the kth layer, α k , β k And ω k is the k-th layer hyperparameter, Z (0) is the sample feature matrix after dimensionality reduction, A is the connection matrix, It is the degree matrix after constructing the sample feature matrix plus an N-order unit matrix, I N is the N-order identity matrix, W1 (k) and W2 (k) is the learnable parameter matrix of the kth layer;

[0142] The last layer in the propagation is input into the fully connected layer, and then passed through the softmax layer to obtain the probability matrix Z, where Z = softmax(W (K+1) Z (K+1) +b (K+1) ), Z (K+1) is the last layer in the propagation, b (K+1) is the bias term of the last layer in the propagation, W (K+1) is the learnable parameter matrix of the last layer in propagation.

[0143] Among them, the functional implementation of each module in the above-mentioned single-cell clustering device corresponds to each step in the above-mentioned single-cell clustering method embodiment, and its functions and implementation processes are no longer repeated here one by one.

[0144] In a fourth aspect, an embodiment of the present invention further provides a readable storage medium.

[0145] The readable storage medium of the present invention stores a single-cell clustering program, wherein when the single-cell clustering program is executed by a processor, the steps of the single-cell clustering method as described above are implemented.

[0146] Among them, the method implemented when the single-cell clustering program is executed can refer to the various embodiments of the single-cell clustering method of the present invention, and will not be repeated here.

[0147] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0148] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present invention.

[0150] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A single cell clustering method, characterized in that: The single cell clustering method comprises: Construct distribution Q and target distribution P based on the similarity between single-cell sample points and cluster centers; Construct a first loss function based on distribution Q and target distribution P; Reduce the dimension of the sample feature matrix to obtain the sample feature matrix after dimension reduction; The sample feature matrix and connection matrix after dimensionality reduction are passed into the low-pass filter graph convolution module to obtain the probability matrix; Construct a second loss function based on the target distribution P and the probability matrix; Obtain a new probability matrix according to the first loss function and the second loss function; Obtain the clustering results of single-cell sample points from the new probability matrix; The step of passing the reduced-dimensional sample feature matrix and the connection matrix into the low-pass filter graph convolution module to obtain the probability matrix includes: The reduced sample feature matrix and connection matrix are passed into the low-pass filter graph convolution module for propagation. The propagation formula is as follows: in, is the sample feature matrix of the kth layer, , as well as is the k-th layer hyperparameter, is the sample feature matrix after dimensionality reduction, A is the connection matrix, It is the degree matrix after constructing the sample feature matrix plus an N-order unit matrix. is the N-th order identity matrix, and is the learnable parameter matrix of the kth layer; The last layer in the propagation is input into the fully connected layer, and then passed through the softmax layer to obtain the probability matrix Z, where , is the last layer in the propagation. is the bias term of the last layer in the propagation, is the learnable parameter matrix of the last layer in propagation.

2. The single cell clustering method according to claim 1, characterized in that Before the step of constructing the distribution Q and the target distribution P based on the similarity between the single cell sample point and the cluster center, the method further includes: Get sample feature matrix; The K nearest neighbor classification algorithm is used to construct the sample feature matrix and obtain the connection matrix; The sample matrix and the connection matrix are passed into the initial graph autoencoder module to obtain the reconstructed sample feature matrix and the reconstructed connection matrix; The initial graph autoencoder module is trained according to the sample feature matrix, the connection matrix, the reconstructed sample feature matrix and the reconstructed connection matrix to obtain a graph autoencoder module; The sample matrix and connection matrix are passed into the graph autoencoder module, and the cluster centers are obtained through K-means clustering. Calculate the similarity between single cell sample points and cluster centers.

3. The single cell clustering method according to claim 2, characterized in that: The step of training the initial graph autoencoder module according to the sample feature matrix, the connection matrix, the reconstructed sample feature matrix and the reconstructed connection matrix to obtain the graph autoencoder module includes: A third loss function is obtained based on the sample feature matrix and the reconstructed sample feature matrix; A fourth loss function is obtained based on the connection matrix and the reconstructed connection matrix; The initial graph autoencoder module is trained according to the third loss function and the fourth loss function to obtain a graph autoencoder module.

4. The single cell clustering method according to claim 1, characterized in that: The step of constructing the distribution Q and the target distribution P based on the similarity between the single cell sample point and the cluster center includes: The distribution Q is obtained based on the similarity between the single-cell sample point and the cluster center, where , Single cell sample point Cluster Center similarity; Based on the distribution Q, we get the target distribution P, where: , , , is the frequency of cluster e, Single cell sample point Cluster Center Target similarity.

5. The single cell clustering method according to claim 1, characterized in that: The step of constructing a first loss function based on the distribution Q and the target distribution P includes: Construct the first loss function is the KL divergence between distribution Q and target distribution P, where , Single cell sample point Cluster Center The similarity of Single cell sample point Cluster Center Target similarity.

6. The single cell clustering method according to claim 1, characterized in that: The step of reducing the dimension of the sample feature matrix to obtain the reduced-dimensional sample feature matrix includes: Use a fully connected neural network to reduce the n*d-dimensional sample feature matrix to an n*m-dimensional sample feature matrix, where , ReLU is a nonlinear activation function, W is a weight matrix, b is a bias term, X is a sample matrix, is the sample feature matrix after dimensionality reduction.

7. A single cell clustering device, characterized in that: The single cell clustering device comprises: The first construction module is used to construct the distribution Q and the target distribution P based on the similarity between the single cell sample point and the cluster center; A second construction module is used to construct a first loss function based on the distribution Q and the target distribution P; A dimension reduction module is used to reduce the dimension of the sample feature matrix to obtain the sample feature matrix after dimension reduction; The transmission module is used to pass the sample feature matrix and connection matrix after dimension reduction into the low-pass filter graph convolution module to obtain the probability matrix; A third construction module is used to construct a second loss function based on the target distribution P and the probability matrix; A training module, used for obtaining a new probability matrix according to a first loss function and a second loss function; An acquisition module is used to obtain the clustering results of single-cell sample points from the new probability matrix; The step of passing the reduced-dimensional sample feature matrix and the connection matrix into the low-pass filter graph convolution module to obtain the probability matrix includes: The reduced sample feature matrix and connection matrix are passed into the low-pass filter graph convolution module for propagation. The propagation formula is as follows: in, is the sample feature matrix of the kth layer, , as well as is the k-th layer hyperparameter, is the sample feature matrix after dimensionality reduction, A is the connection matrix, It is the degree matrix after constructing the sample feature matrix plus an N-order unit matrix. is the N-th order identity matrix, and is the learnable parameter matrix of the kth layer; The last layer in the propagation is input into the fully connected layer, and then passed through the softmax layer to obtain the probability matrix Z, where , is the last layer in the propagation. is the bias term of the last layer in the propagation, is the learnable parameter matrix of the last layer in propagation.

8. A single cell clustering device, characterized in that: The single-cell clustering device includes a processor, a memory, and a single-cell clustering program stored in the memory and executable by the processor, wherein when the single-cell clustering program is executed by the processor, the steps of the single-cell clustering method as described in any one of claims 1 to 6 are implemented.

9. A readable storage medium, characterized in that: The readable storage medium stores a single-cell clustering program, wherein when the single-cell clustering program is executed by a processor, the steps of the single-cell clustering method according to any one of claims 1 to 6 are implemented.