Cell type deconvolution modeling method and system based on sparse auto-encoder
The processing of single-cell RNA sequencing data through sparse autoencoder model solves the problems of high computational complexity and low prediction accuracy in the prior art, and achieves fast and efficient cell type deconvolution analysis, reveals the molecular mechanism of the disease, and provides support for personalized medical care.
Patent Information
- Application Number
- CN202510500840.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-08-01
AI Technical Summary
Existing cell type deconvolution methods have high computational complexity and low prediction accuracy when processing high-dimensional data, making it difficult to perform large-sample analysis of clinical archived samples in routine laboratories.
The sparse autoencoder model is used to process single-cell RNA sequencing data through encoder and decoder, and the total loss function is constructed using the KL divergence function and reconstruction error, model parameters are optimized, and predicted cell type proportion and reconstruction bulk transcriptome data are generated.
It realizes fast and efficient bioinformatics analysis, improves the accuracy and algorithmic efficiency of cell type prediction, can automatically learn characteristics from bulk transcriptome data, reveals the molecular mechanisms of disease occurrence and development, and provides a basis for personalized medical care.
Smart Images

Figure CN120409553A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of artificial intelligence and bioinformatics, and particularly relates to a method and system for cell type deconvolution modeling based on a sparse autoencoder. Background Art
[0002] Single-cell RNA sequencing (scRNA-seq) technology can reveal the heterogeneity between different cell populations and is a powerful tool for studying gene expression changes at the cell level. However, the strict requirements for sample preparation and the high cost of sequencing in single-cell RNA sequencing make it impossible to perform large-sample analysis on clinical archived samples in a conventional laboratory. To fully exploit the existing bulk transcriptome data with rich clinical information, cell type deconvolution methods have emerged.
[0003] Existing cell type deconvolution methods mainly rely on traditional machine learning algorithms such as linear regression and support vector machines. These methods have problems such as high computational complexity and low prediction accuracy when dealing with high-dimensional data. For example, when linear regression deals with high-dimensional data, the computational complexity is as high as O(n3), and the prediction accuracy is less than 70%. Summary of the Invention
[0004] Based on the technical problems existing in the background art, the present invention proposes a method and system for cell type deconvolution modeling based on a sparse autoencoder, which solves the problems of low cell type prediction accuracy and low algorithm efficiency in the prior art, and realizes fast and efficient bioinformatics analysis.
[0005] A method for cell type deconvolution modeling based on a sparse autoencoder proposed by the present invention inputs single-cell RNA sequencing data into a trained sparse autoencoder model to obtain predicted cell types;
[0006] The training process of the sparse autoencoder model is as follows:
[0007] Use single-cell RNA sequencing data to generate simulated bulk transcriptome data to construct a training set;
[0008] Construct a sparse autoencoder model. The simulated bulk transcriptome data generates predicted cell type proportions through the encoder, and the predicted cell type proportions generate reconstructed bulk transcriptome data through the decoder;
[0009] Based on the KL divergence function, reconstruction error, and prediction error, construct a total loss function to optimize the trainable parameters in the sparse autoencoder model.
[0010] Further, in using single-cell RNA sequencing data to generate simulated bulk transcriptome data, it includes:
[0011] Unify the data of the dataset downloaded from GEO into the data frame format, and extract the cell type names and gene names;
[0012] Use the np.random.dirichlet() function to generate random numbers that conform to the Dirichlet distribution as cell fractions according to the number of cell types in the single-cell data and the given parameters.
[0013] When sparse is set to True, the generated cell fractions need to be partially set to zero and renormalized to simulate special sample situations.
[0014] Calculate the cell numbers and sample, convert the updated cell ratios into a DataFrame, set the column names as cell types, and create an AnnData object with the sampled data, the updated cell ratios, and gene names. Finally, save the generated simulated data to an H5AD file.
[0015] Furthermore, in calculating the cell numbers and sampling, it specifically includes:
[0016] Calculate the expected cell numbers of each cell type in the simulated bulk data, multiply the preset total cell number by the fraction of the simulated cell type, and then round down to get an integer value;
[0017] Recalculate the ratios of cell types according to the expected cell numbers of each cell type to ensure that the total cell number is the preset total cell number;
[0018] Create a matrix of all zeros to store the sampled simulated bulk data, where the number of rows is equal to the sample number "samplenum", and the number of columns is equal to the number of genes in the single-cell data. The sample number "samplenum" is the preset number of samples for generating bulk;
[0019] Loop through each sample and its corresponding preset total cell number. In each sample, loop through all cell types;
[0020] Randomly sample with replacement the indices of the cell expression data of the preset total cell number from the original single-cell data of the corresponding cell type, and accumulate the gene expression values of the sampled cells into the corresponding sample to obtain the updated data and the sampled data.
[0021] Furthermore, the datasets downloaded from GEO are GSE132465 and GSE178341, and the two datasets are used to generate simulated Bulk data; then they are used as validation sets for each other.
[0022] Furthermore, by means of Monocle2 analysis, based on the single-cell data of the GSE132465 dataset, specific cell types were screened and analyzed to reveal the differentiation trajectories of cells during development and the roles of the selected gene expressions.
[0023] Furthermore, the sparse autoencoder model includes an encoder and a decoder, and the encoder and decoder are symmetric deep neural networks;
[0024] The encoder is used to map the simulated bulk transcriptome data to the latent representation space;
[0025] The decoder is used to map the predicted cell type proportions back to the original input space of the simulated bulk transcriptome data to obtain the reconstructed bulk transcriptome data.
[0026] Furthermore, the KL divergence function D KL is used as the sparse penalty term, specifically:
[0027]
[0028] where p is the preset sparsity target value and q is the actual activation value of the neuron.
[0029] Furthermore, the total loss function loss is as follows:
[0030]
[0031] where MAE is the mean absolute error, X is the real single-cell RNA sequencing data, is the predicted cell type proportion, B is the simulated bulk transcriptome data, is the reconstructed bulk transcriptome data, w is the sparsity weight, s is the total number of hidden layers of the neuron, j is the hidden layer index of the neuron, and · represents the product.
[0032] A cell type deconvolution modeling system based on a sparse autoencoder inputs single-cell RNA sequencing data into a trained sparse autoencoder model to obtain the predicted cell types;
[0033] The training process of the sparse autoencoder model includes a dataset construction module, a model construction module, and a loss construction module:
[0034] The dataset construction module is used to generate simulated bulk transcriptome data using single-cell RNA sequencing data to construct a training set;
[0035] The model construction module is used to construct a sparse autoencoder model. The encoder generates predicted cell types from the simulated bulk transcriptome data, and the decoder generates the reconstructed bulk transcriptome data from the predicted cell types;
[0036] The loss construction module is used to construct a total loss function based on the KL divergence function, reconstruction error, and prediction error to optimize the trainable parameters in the sparse autoencoder model.
[0037] Furthermore, the dataset construction module includes a download and conversion module, a random generation module, and a sampling and update module;
[0038] The download and conversion module is used to uniformly convert the dataset data downloaded from GEO into a data frame format and extract the cell type names and gene names;
[0039] The random generation module uses the np.random.dirichlet() function to generate random numbers that conform to the Dirichlet distribution as cell fractions according to the number of cell types in the single-cell data and the given parameters;
[0040] The sampling and update module is used to calculate the cell numbers and sample, convert the updated cell proportions into a DataFrame, set the column name as the cell type, and at the same time create an AnnData object with the sampled data, the updated cell proportions, and gene names, and finally save the generated simulated data to an H5AD file.
[0041] Furthermore, in the sampling and update module for calculating cell numbers and sampling, specifically:
[0042] Calculate the expected number of cells of each cell type in the simulated bulk data, multiply the preset total number of cells by the fraction of the simulated cell type, and then round down to get an integer value;
[0043] Recalculate the proportions of cell types based on the expected number of cells of each cell type to ensure that the total number of cells is the preset total number of cells;
[0044] Create a matrix of all zeros to store the sampled simulated bulk data, where the number of rows is equal to the number of samples "samplenum", and the number of columns is equal to the number of genes in the single-cell data, and the number of samples "samplenum" is the preset number of samples for generating bulk;
[0045] Loop through each sample and its corresponding preset total number of cells. In each sample, loop through all cell types;
[0046] Randomly sample with replacement the indices of the cell expression data of the preset total number of cells from the original single-cell data of the corresponding cell type, and accumulate the gene expression values of the sampled cells into the corresponding sample to obtain the updated data and the sampled data.
[0047] Furthermore, based on the single-cell data of the GSE132465 dataset, specific cell types (such as B cell subtypes) were screened and analyzed by means of Monocle2 analysis.
[0048] The single-cell data was input into Monocle2 to create the required CellDataSet for modeling. By estimating the size factor and dispersion, the mRNA differences between cells were normalized, laying a foundation for subsequent differential analysis.
[0049] During the process of selecting trajectory-defining genes, visualization, and constructing trajectories, the "dpFeature" method was adopted to select 2,000 genes with q-values less than 0.01 as sorting genes.
[0050] Combined with the cell type-specific gene expression data predicted by the sparse autoencoder model of the present invention, the screened differential genes were analyzed.
[0051] The advantages of a cell type deconvolution modeling method and system based on a sparse autoencoder provided by the present invention are as follows: In this embodiment, a large number of simulated bulk transcriptome data (as samples) are generated based on single-cell RNA sequencing data, providing rich samples for model training; by introducing a sparsity penalty term (KL divergence function) and reconstruction error optimization, it is possible to reduce the data dimension while retaining important information, reduce noise interference, and thus accelerate the model training speed; the sparse autoencoder model can automatically learn features from bulk transcriptome data without relying on external reference GEPs, automatically learn features through single-cell data, and is not affected by the absence of cell types and gene labels in the reference matrix, and can flexibly process different types of bulk transcriptome data; it can not only predict the cell type proportion, but also predict the specific gene expression of each cell type, reveal the differential gene expression between cell types, and further reveal the molecular mechanism of disease occurrence and development, providing an important basis for personalized medicine, while solving the problems of low accuracy of cell type prediction and low algorithm efficiency existing in the prior art, and realizing fast and efficient bioinformatics analysis; through the sparse autoencoder model, the mean absolute error (MAE) on the colorectal cancer dataset is reduced to 0.0342, which is about 15% higher than the traditional method. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a structural schematic diagram of the present invention;
[0053] Figure 2 It is a schematic diagram of the cell proportion distribution of the simulated bulk data generated by GSE132465 data, and the mean error of the six cell type proportions is less than 1%.
[0054] Figure 3 Schematic diagram for evaluating the performance of the sparse autoencoder model on the rectal cancer dataset GSE132465. The CCC value of the SAE is 0.85, which is a 9% improvement compared to TAPE (0.78), and the p-value < 0.01 (t-test).
[0055] Figure 4a Schematic diagram of the cell type deconvolution results for testing the sparse autoencoder model on the independent dataset GSE35452;
[0056] Figure 4b Schematic diagram of the cell type deconvolution results for testing the sparse autoencoder model on the independent dataset GSE45404;
[0057] Figure 4c Schematic diagram of the cell type deconvolution results for testing the sparse autoencoder model on the independent dataset GSE119409;
[0058] Figure 5 Schematic diagram of randomly dividing GSE119409, GSE45404, and GSE35452 into radiotherapy response groups and non-response groups respectively, and predicting cell type-specific gene expression through the sparse autoencoder model. Specific implementation manner
[0059] Next, the technical solution of the present invention will be described in detail through specific embodiments. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific implementations disclosed below.
[0060] As Figures 1 to 5 shown, a cell type deconvolution modeling method based on a sparse autoencoder proposed by the present invention inputs single-cell RNA sequencing data into a trained sparse autoencoder model (SAE) to obtain the predicted cell type proportions;
[0061] In the cell type deconvolution task, the sparse autoencoder model outputs the predicted cell type proportions. By inputting single-cell RNA sequencing data into the trained sparse autoencoder model, the predicted cell types are obtained for analyzing the proportion of different cell types in the sample. At the same time, the decoder in the model maps the predicted cell type proportions back to the original input space of the simulated bulk transcriptome data to obtain the reconstructed bulk transcriptome data for evaluating the reconstruction ability and performance of the model, such as calculating the reconstruction error, etc., to optimize the model parameters.
[0062] The training process of the sparse autoencoder model is as follows:
[0063] S1. Generate simulated bulk transcriptome data using single-cell RNA sequencing data to construct a training set;
[0064] Unify the data of the datasets downloaded from GEO into the data frame format, and extract the cell type names and gene names; for example, the GSE132465 and GSE178341 datasets can be downloaded from GEO, and the two datasets are used to generate simulated Bulk data; then they are used as each other's validation sets, for example, after training with GSE132465, use GSE178341 for validation. Vice versa.
[0065] Use the np.random.dirichlet() function to generate random numbers that conform to the Dirichlet distribution as cell fractions according to the number of cell types in the single-cell data and the given parameter (samplenum);
[0066] Calculate the expected number of cells of each cell type in the simulated bulk data, multiply the preset total number of cells by the fraction of the simulated cell type, and then round down to get an integer value;
[0067] Recalculate the proportion of cell types according to the expected number of cells of each cell type to ensure that the total number of cells is the preset total number of cells;
[0068] Create a matrix of all zeros to store the sampled simulated bulk data, where the number of rows is equal to the sample number "samplenum", and the number of columns is equal to the number of genes in the single-cell data;
[0069] Loop through each sample and its corresponding preset total number of cells. In each sample, loop through all cell types;
[0070] Randomly sample with replacement the indexes of the cell expression data of the preset total number of cells from the original single-cell data of the corresponding cell type, and accumulate the gene expression values of the sampled cells into the corresponding samples;
[0071] Convert the updated cell proportions into a DataFrame, set the column name as the cell type, and at the same time create an AnnData object with the sampled data, the updated cell proportions and the gene names, and finally save the generated simulated data to an H5AD file.
[0072] S2. Construct a sparse autoencoder model. The simulated bulk transcriptome data generates predicted cell type proportions through the encoder, and the predicted cell type proportions generate the reconstructed bulk transcriptome data through the decoder;
[0073] The sparse autoencoder model includes an encoder and a decoder. The encoder and decoder are symmetric deep neural networks. The input data is mapped from Fe to the latent representation space. Fe is the low-dimensional compact representation of the input data; Fd is the inverse function of Fe, which restores the original input data by mapping the latent representation back to the original input space; that is, the encoder maps the high-dimensional gene expression data to the low-dimensional cell type percentage data; the decoder reconstructs the original gene expression data using the inferred cell type percentage data:
[0074]
[0075] Among them, F e (B) is the low-dimensional compact representation of the input data, is the predicted cell type proportion, that is, F e (B) is the predicted cell type proportion of the low-dimensional compact representation. On the contrary, Fd is the decoder, which is the inverse function of Fe and restores the original input data by mapping the latent representation back to the original input space. S is the explicit matrix form of Fd, that is, S = Fd. From a functional perspective, S is the matrix that the decoder Fd depends on when transforming the input data so that it is mapped back to the original input space to reconstruct the original gene expression data.
[0076] S3. Construct a total loss function based on the KL divergence function, reconstruction error, and prediction error to optimize the trainable parameters in the sparse autoencoder model.
[0077] In this embodiment, the KL divergence function D KL is introduced as a penalty term:
[0078]
[0079] Among them, p is the preset sparsity target value, and q is the actual activation value of the neuron.
[0080] In this embodiment, the sparsity target value p can be set to 0.01 (recommended range 0.005 - 0.05), which represents the expected average activation degree of the hidden layer neurons; the sparsity weight is set to 0.5 (recommended range 0.1 - 1.0), which is used to manage the intensity of sparsity and represents the weight of the sparsity penalty term in the total cost function.
[0081] The optimization objective of the encoder parameters is to minimize the sum of the MAE (mean absolute error) between the predicted cell type proportion and the true cell type proportion and the sparsity penalty loss; the parameters of the decoder aim to minimize the mean absolute error between the reconstructed bulk transcriptome data and the original simulated bulk transcriptome data. Therefore, the total loss function of this embodiment is specifically:
[0082]
[0083] Among them, MAE is the mean absolute error, X is the true single-cell RNA sequencing data, is the predicted cell type proportion, B is the simulated bulk transcriptome data, is the reconstructed bulk transcriptome data, w is the sparsity weight, s is the total number of hidden layers of neurons, represents the product, j is the index of the hidden layer of neurons, represents the summation from the first hidden layer to the s-th hidden layer.
[0084] In the model training of steps S1 to S3, this embodiment uses a python development environment, such as python-3.8.17 and pytorch-1.13.0+cu117, for model training. Input single-cell RNA-seq data and set 8 parameters: scdata (address of single-cell data), outname (output file name after simulation generation), prior (preset cell type proportion, default is equal proportion for each cell type), n (preset total number of cells, default is 500), samplenum (preset number of samples for generating bulk, default is 5000), random state (preset random seed for reproducibility), sparse (whether the generated samples are sparse), sparseprob (sparsity ratio).
[0085] Among them, the training batch size is 128, and the number of iterations is 5000 times. The learning rate is set to 0.001, the sparsity target value is set to 0.01, and the sparsity weight is set to 0.05.
[0086] Optimize the model parameters by minimizing the total loss function to train the sparse autoencoder model. The mean absolute error (MAE) and the concordance correlation coefficient (CCC) (see formulas ⑤ and ⑥) are two optimization objectives of the sparse autoencoder model. The smaller the MAE value, the better the performance; the closer the CCC value is to 1, the better the performance.
[0087]
[0088] Among them, X i,j represents the element in the i-th row and j-th column of matrix X, X′ i,j represents another matrix X i,j corresponding to X ′ in the i-th row and j-th column of the element, x1, x2 represent the cell type proportion vectors, σ1 is the standard deviation of variable x1, σ2 is the standard deviation of variable x2, μ1 is the mean of variable x1, and μ2 is the mean of variable x2.
[0089] Figure 2As shown, the cell proportion distribution of the simulated bulk transcriptome data generated using the GSE132465 dataset shows that the mean proportion scores of cell types in the 5000 generated samples are the same and all six cell types are present without omission, meeting the algorithm's expectations.
[0090] In this embodiment, the sparse autoencoder model is evaluated for performance using the rectal cancer dataset GSE132465. As Figure 3 shown in Table 1, the mean absolute error (MAE) of the sparse autoencoder model on the colorectal cancer dataset GSE132465 is lower than that of TAPE and Scaden using deep neural networks. Its CCC is better than TAPE and slightly worse than Scaden. In PBMC (peripheral blood mononuclear cell) data, the MAE and CCC values of the sparse autoencoder model are better than TAPE, while Scaden performs best on PBMC data. Therefore, it can be concluded that the sparse autoencoder model is better than TAPE in terms of MAE and CCC values, proving that the performance of the sparse autoencoder model in this embodiment is more superior.
[0091] Table 1
[0092]
[0093] It can be directly obtained from Table 1 that through the sparse autoencoder model, the mean absolute error (MAE) on the colorectal cancer dataset is reduced to 0.0342, and through experiments, it is improved by about 15% compared with traditional methods.
[0094] Finally, the cell type deconvolution of the sparse autoencoder model is tested on the independent datasets GSE119409, GSE35452, and GSE45404 to analyze the cell type proportions and expression differences between responders and non-responders. The t-test is used to determine whether there are significant statistical differences between the mean cell type scores of the responder group and the non-responder group. As Figures 4a to 4c shown, box plots of the deconvolved cell type proportions of responders and non-responders in the GSE35452 ( Figure 4a ), GSE45404 ( Figure 4b ), and GSE119409 ( Figure 4c ) datasets. Except for the stromal cells in GSE45404, all cell types in the three datasets show significance, indicating that the inter-group differences obtained in this embodiment are real differences.
[0095] Among them, the response or non-response labels were randomly assigned to each sample 100 times, and the proportion of cell types randomly assigned to each group was observed to verify whether the differences between groups were real differences. Using the colorectal cancer single-cell data in GSE132465 as a reference (training dataset), the cell-specific gene expression of each sample in the real bulk data GSE119409, GSE35452, and GSE45404 was predicted; the limma software package was used to perform differential gene expression analysis between radiotherapy responders and non-responders on the deconvolution results.
[0096] A significant hypergeometric distribution test was performed on the overlapping genes between the differential gene lists of the three datasets (GSE119409, GSE35452, and GSE45404) to confirm the biological relevance of the differentially expressed genes obtained by deconvolution between responders and non-responders;
[0097] As Figure 5 , GSE119409, GSE45404, and GSE35452 were randomly divided into radiotherapy responder groups and non-responder groups, respectively; the cell type-specific gene expression was predicted by a sparse autoencoder model, and the differential genes (|logFC|>2, P.adj<0.05) were calculated and repeated 10 times. The results showed that the logFC values of the random groups were mostly less than those of the real groups (the logFC values of the random groups were the average values of multiple times), which indicated that there were obvious differences in the radiotherapy responder groups of the real grouping, proving that the results of this example were real.
[0098] Among them, |logFC|, that is, log Fold Change, represents the logarithmic fold change. It reflects the difference multiple of gene expression levels between two groups of samples (for example, the experimental group and the control group). The logarithm is used to better handle the data distribution and facilitate comparison.
[0099] P.adj, that is, Adjusted P-value, represents the corrected P-value. The P-value is the probability used to judge whether the observed difference is caused by random factors.
[0100] The condition of "|logFC|>2, P.adj<0.05" is used to screen out those genes with significant differences in expression levels (large difference multiples and statistical significance) between the two groups of samples. These genes may play important roles in biological processes or the occurrence and development of diseases.
[0101] Based on the single-cell data of the GSE132465 dataset, screening and analysis were carried out for specific cell types (such as B cell subtypes). First, the single-cell data was input into Monocle2 to create the required CellDataSet object for modeling. By estimating the size factor and dispersion, the mRNA differences between cells were normalized, laying the foundation for subsequent differential analysis. Among them, the size factor helps to normalize the mRNA differences recovered between cells.
[0102] In the process of selecting trajectory-defining genes, visualization, and constructing trajectories, the "dpFeature" method was adopted. 2000 genes with q-values less than 0.01 were selected as sorting genes. Assuming that the trajectory has a tree-like structure, cells start from the root, move along the main trunk, make fate decisions when encountering branch points, and finally reach the leaf nodes. The simulated time value of each cell is determined by its distance back to the root. Among them, the "dpFeature" method is an unsupervised feature selection tool for single-cell RNA sequencing data, mainly used to identify informative genes from clusters of cell states.
[0103] Combined with the cell type-specific gene expression data predicted by the sparse autoencoder model in this embodiment, the differential genes screened were analyzed and it was found that some genes such as USB1, CR2, PHF5A, IER3IP1, DNTTIP1, PCYT2, CWH43, and PXMP4, etc., showed significant changes in gene expression during cell differentiation.
[0104] Among them, PHF5A is often upregulated in colorectal cancer samples and is associated with poor cancer prognosis. It can promote the proliferation and metastasis of CRC cells both in vitro and in vivo. It plays a key role in promoting cancer progression by regulating dysregulated alternative splicing (AS) targets and pathways. Although its underlying mechanism has not been fully clarified, its importance as a potential therapeutic target has been demonstrated.
[0105] High expression of DNTTIP1 is associated with poor overall survival of CRC patients and is also a differential gene for chemotherapy response, with important prognostic value.
[0106] Although PCYT2 has not been clearly demonstrated to be directly related to colorectal cancer, a significant positive correlation was found between cancer progression and GroP (phosphoglycerol) modification, and PCYT2 plays a major role in GroP modification, and its expression is positively correlated with cancer cell migration, indicating its potential impact during cancer development.
[0107] PXMP4 is upregulated in colorectal cancer tissues, is related to tumor differentiation degree and lymph node metastasis, and can promote the proliferation, migration, and invasion of colorectal cancer cells.
[0108] CR2 showed significant differences in samples with or without radiotherapy response, and its gene expression also showed large changes with cell differentiation, which strongly suggested that CR2 might be a key gene for radiotherapy response in colorectal cancer.
[0109] In this embodiment, a large number of simulated bulk transcriptome data (as samples) were generated based on single-cell RNA sequencing data, providing rich samples for model training; by introducing a sparsity penalty term (KL divergence function) and reconstruction error optimization, it was possible to reduce the data dimension while retaining important information, reduce noise interference, and thus accelerate the model training speed; compared with traditional cell type deconvolution methods (such as CIBERSORTx), the sparse autoencoder model proposed in this embodiment could automatically learn features from bulk transcriptome data without relying on external reference GEPs, learn features automatically through single-cell data, was not affected by the absence of cell types and gene labels in the reference matrix, and could flexibly process different types of bulk transcriptome data; it could not only predict the proportion of cell types, but also predict the specific gene expression of each cell type, reveal the differential gene expression between cell types, and further reveal the molecular mechanism of disease occurrence and development, providing an important basis for personalized medicine, while solving the problems of low accuracy of cell type prediction and low algorithm efficiency in the prior art, and achieving fast and efficient bioinformatics analysis.
[0110] As mentioned above, only the specific embodiments of the present invention are preferred, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and all should be covered by the protection scope of the present invention.
Claims
1. A method for cell type deconvolution modeling based on a sparse autoencoder, characterized in that, Input the single-cell RNA sequencing data into the trained sparse autoencoder model to obtain the predicted cell types; The training process of the sparse autoencoder model is as follows: Use the single-cell RNA sequencing data to generate simulated bulk transcriptome data to construct a training set; Construct a sparse autoencoder model. The simulated bulk transcriptome data is used to generate the predicted cell type proportions through the encoder, and the predicted cell type proportions are used to generate the reconstructed bulk transcriptome data through the decoder; Construct a total loss function based on the KL divergence function, reconstruction error, and prediction error to optimize the trainable parameters in the sparse autoencoder model.
2. The method for cell type deconvolution modeling based on sparse autoencoders according to claim 1, wherein In generating the simulated bulk transcriptome data using the single-cell RNA sequencing data, it includes: Unify the data of the dataset downloaded from GEO into the data frame format, and extract the cell type names and gene names; Use the np.random.dirichlet() function to generate random numbers that conform to the Dirichlet distribution as cell fractions according to the number of cell types in the single-cell data and the given parameters; Calculate the cell numbers and sample, convert the updated cell proportions into a DataFrame, set the column name as the cell type, and at the same time create an AnnData object with the sampled data, updated cell proportions, and gene names, and finally save the generated simulated data to an H5AD file.
3. The method for cell type deconvolution modeling based on a sparse autoencoder according to claim 2, wherein In calculating the cell numbers and sampling, it specifically includes: Calculate the expected cell numbers of each cell type in the simulated bulk data by multiplying the preset total cell number by the fraction of the simulated cell type and then rounding down to get an integer value; Recalculate the proportions of the cell types according to the expected cell numbers of each cell type to ensure that the total cell number is the preset total cell number; 4. The cell type deconvolution modeling method based on sparse autoencoder according to claim 2, wherein Create a matrix of all zeros to store the sampled simulated bulk data. The number of rows is equal to the sample number "samplenum", and the number of columns is equal to the number of genes in the single-cell data. The sample number "samplenum" is the preset number of samples for generating bulk; 5. The cell type deconvolution modeling method based on sparse autoencoders according to claim 4, wherein 6. The cell type deconvolution modeling method based on sparse autoencoder according to claim 1, wherein Loop through each sample and its corresponding preset total cell number. In each sample, loop through all cell types; Randomly sample with replacement the indexes of the cell expression data of the preset total cell number from the original single-cell data of the corresponding cell type, and accumulate the gene expression values of the sampled cells into the corresponding sample to obtain the updated data and the sampled data. The datasets downloaded from GEO are GSE132465 and GSE178341. The two datasets are used to generate simulated bulk data; then they are used as validation sets for each other. Through the Monocle2 analysis method, based on the single-cell data of the GSE132465 dataset, specific cell types are screened and analyzed to reveal the differentiation trajectories of cells during development and the roles of the screened gene expressions. The sparse autoencoder model includes an encoder and a decoder. The encoder and decoder are symmetric deep neural networks; The encoder is used to map the simulated bulk transcriptome data to the latent representation space; The decoder is used to map the predicted cell type proportions back to the original input space of the simulated bulk transcriptome data to obtain the reconstructed bulk transcriptome data.
7. The method for cell type deconvolution modeling based on sparse autoencoder according to claim 1, wherein KL divergence function D KL As a sparse penalty term, specifically: Among them, p is a preset sparsity target value (ranging from 0 to 1), and q is the actual activation value of the neuron.
8. The cell type deconvolution modeling method based on sparse autoencoder according to claim 1, characterized in that The total loss function loss is as follows: Among them, MAE is the mean absolute error, X is the true single-cell RNA sequencing data, is the predicted cell type proportion, B is the simulated bulk transcriptome data, is the reconstructed bulk transcriptome data, w is the sparsity weight, s is the total number of hidden layers of neurons, j is the index of the hidden layer of neurons, and · represents the product.
9. A cell type deconvolution modeling system based on a sparse autoencoder, characterized in that, Input the single-cell RNA sequencing data into the trained sparse autoencoder model to obtain the predicted cell types; The training process of the sparse autoencoder model includes a dataset construction module, a model construction module, and a loss construction module: The dataset construction module is used to generate simulated bulk transcriptome data using single-cell RNA sequencing data to construct a training set; The model construction module is used to construct a sparse autoencoder model. The encoder generates predicted cell types from the simulated bulk transcriptome data, and the decoder generates the reconstructed bulk transcriptome data from the predicted cell types; The loss construction module is used to construct a total loss function based on the KL divergence function, reconstruction error, and prediction error to optimize the trainable parameters in the sparse autoencoder model.
10. The cell type deconvolution modeling system based on a sparse autoencoder according to claim 9, characterized in that The dataset construction module includes a download and conversion module, a random generation module, and a sampling and update module; The download and conversion module is used to uniformly convert the dataset data downloaded from GEO into a data frame format and extract the cell type names and gene names; The random generation module uses the np.random.dirichlet() function to generate random numbers that conform to the Dirichlet distribution as cell fractions according to the number of cell types in the single-cell data and the given parameters; The sampling and update module is used to calculate the cell numbers and sample, convert the updated cell proportions into a DataFrame, set the column name as the cell type, and at the same time create an AnnData object with the sampled data, updated cell proportions, and gene names, and finally save the generated simulated data to an H5AD file.
Citation Information
Cited By
Single cell time sequence data simulation and completion method and system
CN121938457A