PCA (Principal Component Analysis) dimension reduction method for scRNA-seq sequencing data with added masks
The PCA dimensionality reduction method with a mask for scRNA-seq data addresses the neglect of low-expressed gene connections by using SVD and a mask to filter genes, ensuring effective data reduction and improved cell subtype identification.
Patent Information
- Application Number
- CN202411262514.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Current dimensionality reduction methods for scRNA-seq sequencing data focus on linear relationships between highly expressed genes, neglecting potential connections between low-expressed genes, leading to loss of important information.
A PCA dimensionality reduction method with an added mask that uses singular value decomposition to identify significant eigenvalues and eigenvectors, applies a mask to filter low-variable genes, and performs point multiplication with the original matrix to retain original information, using the Leiden clustering method for visualization.
Effectively reduces data dimensionality while preserving important information, enhancing the identification of cell subtypes by maintaining connections between low-expressed genes.
Smart Images

Figure CN119252341A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of bioinformatics, and more specifically, to a PCA dimensionality reduction method for scRNA-seq sequencing data with an added mask. Background Art
[0002] ScRNA-seq sequencing is an important genomics technology that can perform high-throughput sequencing of single cells to reveal differences and diversity between cells. Dimensionality reduction is an important step in scRNA-seq sequencing data analysis, which aims to convert high-dimensional data into low-dimensional representations in order to better understand and interpret the data.
[0003] With the development of scRNA-seq sequencing technology, the number of cells measured in each study or experiment has increased significantly, ranging from a few hundred to hundreds of thousands of cells, or even more. Among them, the identification of cell subtypes is a very important basic application of scRNA-seq sequencing technology. However, since scRNA-seq sequencing data usually involves many cells, and the number of genes in each cell may be tens of thousands, scRNA-seq sequencing data is a high-dimensional complex data. In order to effectively perform various processing and analysis on scRNA-seq sequencing data, especially the identification of cell subtypes, it is usually necessary to first reduce the dimension of scRNA-seq sequencing data. PCA is a commonly used dimensionality reduction technique, which maps high-dimensional data to low-dimensional space by finding the principal components (main directions) in the data set. The principal component is a low-dimensional space that maximizes the variance of high-dimensional data. The core idea of PCA is to represent the principal components of the data by the eigenvalues and eigenvectors of the covariance matrix of high-dimensional data.
[0004] However, scRNA-seq sequencing data has the characteristics of high latitude and high sparsity, and feature selection is often required before PCA dimensionality reduction to screen out highly expressed genes. However, current dimensionality reduction methods focus on mining the linear relationship between highly expressed genes, ignoring the potential connections between low-expressed genes. Although reducing the gene expression matrix composed of highly expressed genes can achieve better dimensionality reduction effects, it will also lose the potential connections between low-expressed genes.
[0005] Therefore, the present invention aims to provide a PCA dimensionality reduction method for scRNA-seq sequencing data with an added mask to solve the above problems. Summary of the invention
[0006] The purpose of the present invention is to provide a PCA dimensionality reduction method for scRNA-seq sequencing data with an added mask. The present invention performs singular value decomposition on a data matrix by using an SVD method to obtain corresponding eigenvalues and eigenvectors, and uses the eigenvectors corresponding to the screened eigenvalues with a relatively large proportion to perform point multiplication with the original matrix to obtain a data matrix after dimension reduction, and in order to better find the projection direction of distinguishing data, a processed mask matrix is first used, the mask matrix masks out low-variable cells, and then the corresponding eigenvalues and eigenvectors are obtained according to the mask matrix. However, in order not to lose the original information, the present invention uses the obtained eigenvectors to perform point multiplication with the original data matrix to obtain a dimension reduction matrix, which can better reduce the dimension without losing the original information.
[0007] The above technical objectives of the present invention are achieved through the following technical solutions: A PCA dimensionality reduction method for scRNA-seq sequencing data with added mask, comprising the following steps:
[0008] S1. Collect public data sets from the NCBI website and perform quality control and feature selection to obtain the original gene expression matrix;
[0009] S2, add a mask to filter and mask low variable genes in the original gene expression matrix to obtain a mask matrix;
[0010] S3, singular value decomposition, using SVD decomposition to obtain the reduced dimension matrix according to the mask matrix;
[0011] S4, PCA dimensionality reduction, multiplying the eigenvalue of the dimensionality reduction matrix with the original gene expression matrix to obtain the dimensionality reduction result;
[0012] S5. Cluster visualization, clustering is performed using the Leiden method and visualization is performed using the T-SNE method.
[0013] The present invention is further configured as follows: the data preprocessing in step S1 includes normalization processing, scaling processing and feature selection processing respectively.
[0014] The present invention is further configured as follows: the specific process of adding a mask in step S2 is: first, through feature selection, low variable genes are screened out from the original gene expression matrix, and the genes are set to 0, thereby constructing a mask matrix.
[0015] The present invention is further configured as follows: the specific process of singular value decomposition in step S3 is: using the SVD method to perform singular value decomposition on the mask matrix to obtain corresponding eigenvalues and eigenvectors, and then using the eigenvectors corresponding to the screened eigenvalues with a larger proportion to perform dot multiplication with the original gene expression matrix to obtain a reduced dimension matrix.
[0016] The present invention is further configured as follows: the specific process of PCA dimensionality reduction in step S4 is: multiplying the original gene expression matrix with the dimensionality reduction matrix to obtain a dimensionality reduction result for retaining the information covered by the mask.
[0017] The present invention is further configured as follows: the specific process of cluster visualization in step S5 is: taking the dimension reduction result as input, clustering the data using the Leiden clustering method, and coloring the visualization result using the cell type label.
[0018] In summary, the present invention has the following beneficial effects:
[0019] The present invention uses the SVD method to perform singular value decomposition on the data matrix to obtain the corresponding eigenvalues and eigenvectors, and uses the eigenvectors corresponding to the screened eigenvalues with a relatively large proportion to perform point multiplication with the original matrix to obtain the data matrix after dimension reduction. In order to better find the projection direction of distinguishing data, a processed mask matrix is first used to cover up the low-variable cells, and then the corresponding eigenvalues and eigenvectors are obtained according to the mask matrix. However, in order not to lose the original information, the present invention uses the obtained eigenvectors to perform point multiplication with the original data matrix to obtain a reduced dimension matrix, which can better reduce the dimension without losing the original information. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic diagram of a mask PCA method in an embodiment of the present invention;
[0021] Figure 2 It is a flow chart of the mask PCA method in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following is combined with Figure 1-2 The present invention is described in further detail.
[0023] Embodiment: A PCA dimensionality reduction method for scRNA-seq sequencing data with added mask, comprising the following steps:
[0024] S1. Collect data and perform preprocessing for quality control and feature selection. According to the data set provided by TabulaMuris, mouse cell data from 12 organs were collected, including a large amount of unannotated cell data. This example abandoned the unannotated cell data and selected 55,656 cells with cell annotations in the provided data set for analysis. For all selected scRNA-seq data sets, normalization, scaling and feature selection preprocessing were performed. More specifically, for each selected data set, the gene expression matrix X was used, where Xij is the unique molecular identification (UMI, 10X) of gene i detected in cell j, and logarithmic normalization was used, which is the default normalization method in Scanpy.
[0025] S2. Masks were added. For each dataset, the top 2000 highly variable genes were selected by implementing the “sc.pp.highly_variable_genes” function in Scanpy.
[0026] S3. Singular value decomposition. In order to integrate and analyze more than two organ data sets, this embodiment selects highly variable genes in each organ, replaces low-expression genes with 0 values, and uses the SVD method to calculate the dimension reduction matrix. The specific process is as follows:
[0027] Assuming that matrix A is an m*n matrix, the SVD of A is defined as:
[0028] A=U∑V T
[0029] Among them, U is an m*m matrix, Σ is an m*n matrix, all elements except the main diagonal are 0, and each element on the main diagonal is called a singular value, and V is an n*n matrix. Both U and V are unitary matrices (UT=U-1).
[0030] Then solve the three matrices U, Σ, and V. First, perform matrix multiplication on AT and A (transposed matrix of A), and then you will get the n*n square matrix ATA. When ATA is a square matrix, you can perform eigendecomposition to get eigenvalues and eigenvectors that satisfy:
[0031] (A T A)v i =λ i v i
[0032] Get n eigenvalues λ and n eigenvectors v of the matrix ATA. All eigenvectors of ATA are stretched into an n*n matrix v, which is the V matrix in SVD and is generally called the right singular matrix of A.
[0033] Then perform matrix multiplication on A and AT (transposed matrix of A), and we will get the m*m square matrix AAT. Perform eigendecomposition on the AAT square matrix, and the eigenvalues and eigenvectors satisfy:
[0034] (AA T )v i =λ i v i
[0035] In this way, we get the m eigenvalues and corresponding eigenvectors u of the AAT matrix, and stretch all the eigenvectors of ATA into an m*m matrix u, which is the U matrix in SVD and is called the left singular matrix of A.
[0036] S4, PCA dimensionality reduction, according to the eigenvalue of the dimension reduction matrix multiplied by the original gene expression matrix, the dimension reduction result is obtained, which can retain the information covered by the mask for subsequent analysis;
[0037] S5. Cluster visualization: use the dimensionality reduction result as input, cluster the data using the Leiden clustering method, and use the cell type label to color the visualization results, and select the most appropriate dimension through ARI and NMI.
[0038] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.
Claims
1. A PCA dimensionality reduction method for scRNA-seq sequencing data with added mask, characterized by: The following steps are involved: S1. Collect public data sets from the NCBI website and perform quality control and feature selection to obtain the original gene expression matrix; S2, add a mask to filter and mask low variable genes in the original gene expression matrix to obtain a mask matrix; S3, singular value decomposition, using SVD decomposition to obtain the dimension reduction matrix according to the mask matrix; S4, PCA dimensionality reduction, multiplying the eigenvalue of the dimensionality reduction matrix with the original gene expression matrix to obtain the dimensionality reduction result; S5. Cluster visualization, clustering is performed using the Leiden method and visualization is performed using the T-SNE method.
2. The PCA dimensionality reduction method for scRNA-seq sequencing data with added mask according to claim 1, characterized in that: The data preprocessing in step S1 includes normalization processing, scaling processing and feature selection processing.
3. The PCA dimensionality reduction method for scRNA-seq sequencing data with added mask according to claim 1, characterized in that: The specific process of adding the mask in step S2 is as follows: first, through feature selection, low-variable genes are screened out from the original gene expression matrix and set to 0, thereby constructing a mask matrix.
4. The PCA dimensionality reduction method for scRNA-seq sequencing data with added mask according to claim 1, characterized in that: The specific process of singular value decomposition in step S3 is: use the SVD method to perform singular value decomposition on the mask matrix to obtain corresponding eigenvalues and eigenvectors, and then use the eigenvectors corresponding to the screened eigenvalues with a larger proportion to perform dot multiplication with the original gene expression matrix to obtain a reduced dimension matrix.
5. The PCA dimensionality reduction method for scRNA-seq sequencing data with added mask according to claim 1, characterized in that: The specific process of PCA dimensionality reduction in step S4 is: multiplying the original gene expression matrix with the dimensionality reduction matrix to obtain a dimensionality reduction result for retaining the information covered by the mask.
6. The PCA dimensionality reduction method for scRNA-seq sequencing data with added mask according to claim 1, characterized in that: The specific process of cluster visualization in step S5 is: taking the dimension reduction result as input, clustering the data using the Leiden clustering method, and coloring the visualization result using the cell type label.
Citation Information
Patent Citations
ScRNA-seq data dimension reduction method based on graph neural network
CN116386729A
Techniques for placing objects using neural networks
CN116502684A
Missing value filling method and system for single cell sequencing data
CN116631509A
