A method for filling in empty gene expression based on conditional variational autoencoder
By combining conditional variational autoencoders and COVET matrices, the challenges of gene imputation and cross-modal data integration in single-cell RNA sequencing and spatial transcriptomics data integration were solved, achieving more efficient data integration and cell type identification, reducing experimental costs, and improving the adaptability and accuracy of the model.
Patent Information
- Application Number
- CN202511024989.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-07-24
AI Technical Summary
Existing methods for integrating single-cell RNA sequencing and spatial transcriptomics data struggle to simultaneously optimize gene imputation and cross-modal data integration, and fail to adequately consider local spatial dependencies, leading to inaccurate data integration and information loss.
We employ a conditional variational autoencoder-based approach, which projects single-cell transcriptome and spatial transcriptome data into a shared latent space using an attention-enhanced encoder. We utilize the COVET matrix to encode local neighborhood covariance and fill in missing gene expression information through a decoder network. We then combine deep K-means clustering and adaptive weight adjustment to optimize the integration process.
It significantly improves the accuracy and generalization ability of data integration, reduces experimental costs, can more accurately identify and distinguish cell types, enhances the modeling accuracy of spatial relationships, and improves the adaptability and stability of the model.
Smart Images

Figure CN120913643B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of biological information, and particularly relates to a method for filling in expression of empty genes based on a conditional variational autoencoder. BACKGROUND
[0002] Recent advances in single-cell RNA sequencing (scRNA-seq) and spatial transcriptomics (ST) have significantly enhanced the ability to study cellular heterogeneity and tissue architecture. While scRNA-seq facilitates extensive analysis of gene expression at the single-cell level, it inherently disrupts the spatial context of cells due to the need for tissue dissociation. In contrast, single-cell spatial transcriptomics (scST) methods preserve the spatial context of gene expression, enabling exploration of tissue architecture and interactions between different cell types in their native spatial configuration. Despite these advantages, scST technologies typically measure only a limited subset of genes (often a few hundred), necessitating imputation of unmeasured genes to fully leverage the potential of spatial transcriptomic data. Furthermore, integrating scRNA-seq and ST data is crucial to fully exploit the strengths of both technologies. By combining the comprehensive gene expression data obtained from scRNA-seq with the spatial context provided by ST, a deeper understanding of cellular identity and tissue architecture can be achieved.
[0003] In recent years, filling in the gaps of unmeasured genes in scST data by integrating reference scRNA-seq data has emerged as a significant challenge in the field. One widely adopted strategy is joint embedding, which projects scST and scRNA-seq data into a shared latent space. For example, methods such as SpaGE and stPlus employ dimensionality reduction and feature alignment techniques to project scRNA-seq and scST data into a common latent space. Subsequently, imputation is achieved by computing a weighted average of similar cell gene expression in scRNA-seq data, often using k-nearest neighbors (k-NN). Similarly, methods such as gimVI and ENVI utilize generative models to learn the joint distribution of scRNA-seq and spatial transcriptomic data, enabling imputation of unmeasured genes through variational inference. While these methods are effective under conditions of well-aligned data, they often rely on overly simplistic or global assumptions that may not adequately capture local biological variations.
[0004] Another strategy is the mapping-based approach. For example, Seurat uses canonical correlation analysis (CCA) to align scRNA-seq with ST data through anchor-based transfer. On the other hand, Tangram learns linear combinations of scRNA-seq cells to reconstruct scST data, where unmeasured genes are estimated by a probabilistic mapping derived from scRNA-seq data. While these methods significantly enhance gene imputation, they often rely on linear assumptions, which can be insufficient to capture the inherent nonlinear relationships in gene expression and spatial context. Other methods, such as ENGEP and TISSUE, aim to integrate multiple scRNA-seq datasets by ensemble learning or estimating the uncertainty of spatial data gene expression prediction. However, these methods face challenges in integrating heterogeneous data or handling complex nonlinear relationships.
[0005] In addition to gene imputation, integrating scRNA-seq and scST data is crucial for a comprehensive understanding of tissue architecture. Efforts to integrate various single-cell modality data (e.g., transcriptomic and epigenomic data) have led to the development of powerful tools such as LIGER, DC3, and Harmony, which enable alignment of datasets within a shared latent space. However, these techniques often rely on linear projections and tend to ignore modality-specific genes, which are essential for distinguishing subtle cell states. To address complex nonlinear correspondences, deep learning-based frameworks have been proposed, such as deep canonical correlation analysis (DCCA), Cobolt, and scDART, which utilize multi-modality autoencoders to align datasets. Recent studies, including uniPort, employ domain adversarial and optimal transport techniques to align heterogeneous cell modalities. However, many such methods are limited to paired data or require global alignment. Moreover, many of these methods are not optimized for clustering performance or spatial consistency.
[0006] Despite some progress in recent years, existing methods rarely simultaneously optimize gene imputation and cross-modality data integration, and most methods fail to consider local spatial dependencies, which are crucial for tissue architecture. SUMMARY
[0007] To solve the above technical problems, the present application provides a method for imputing empty gene expression based on a conditional variational autoencoder, comprising:
[0008] A unified framework is designed for joint analysis of single-cell transcriptomic data and spatial transcriptomic data, obtaining single-cell transcriptomic sequencing expression profile data, spatial transcriptomic expression data, and a COVET matrix for encoding local neighborhood covariance within the tissue;
[0009] projecting the single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data into a shared latent space by an attention augmented encoder, obtaining latent variables;
[0010] decoding gene expression from the latent variables with a decoder network, imputing missing gene expression information in the spatial data, and predicting a COVET matrix for the single-cell transcriptome data, inferring spatial context.
[0011] Preferably, the process of designing a unified framework for joint analysis of single-cell transcriptome sequencing and spatial transcriptome data comprises:
[0012] constructing a total loss function which is a weighted sum of a spatial transcriptome reconstruction loss, a single-cell transcriptome reconstruction loss, a COVET matrix reconstruction loss, a KL divergence loss, and a clustering loss for the latent space;
[0013] minimizing the total loss function during a training process, jointly analyzing the single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data.
[0014] Preferably, the single-cell transcriptome sequencing expression profile data X sc , is a single-cell transcriptome gene expression count matrix across n sc cells and g sc genes;
[0015] the spatial transcriptome expression data X st , is a spatial gene expression matrix across n st spatial points and g st genes;
[0016] the single-cell transcriptome gene expression count matrix and the spatial gene expression matrix represent gene expression profiles.
[0017] Preferably, the single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data are whole-genome single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data.
[0018] Preferably, the process of obtaining a COVET matrix for encoding local neighborhood covariance within a tissue comprises:
[0019] identifying for each spatial point a number of nearest spatial points from a gene expression matrix, a spatial position of each cell or point, and a number of nearest neighbors defining a niche to be included, and constructing for each cell a niche matrix representing gene expression vectors of nearest neighbors;
[0020] computing a shifted covariance matrix for each neighborhood, resulting in the COVET matrix.
[0021] Preferably, the process of projecting the single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data into a shared latent space using a single attention-enhanced encoder to obtain latent variables includes:
[0022] Different probability distributions were used to parameterize single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data, respectively; wherein, the single-cell transcriptome sequencing expression profile data was modeled using a negative binomial distribution, and the spatial transcriptome expression data was modeled using a Poisson distribution;
[0023] The single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data are transformed into the shared latent space using a multi-head attention layer to obtain the mean and log standard deviation of the latent variables, and the latent variables are sampled using reparameterization techniques.
[0024] Preferably, the process of projecting the single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data into a shared latent space using a single attention-enhanced encoder to obtain latent variables further includes:
[0025] The deep K-means clustering module facilitates cluster-aware structures in the latent space.
[0026] Preferably, the process of facilitating cluster-aware structure in the latent space through a deep K-means clustering module includes:
[0027] Define the clustering loss function for the latent space and construct a clustering loss incentive model for the latent space;
[0028] The clustering loss in the latent space encourages the model to cluster similar cells or spatial points together in the latent space.
[0029] The weights are calculated using Gaussian kernels, and the potential space is organized into meaningful clusters through weight dilation stabilization optimization.
[0030] Preferably, the process of using a decoder network to decode gene expression from the latent variables, fill in missing gene expression information in the spatial data, predict the COVET matrix of single-cell transcriptome sequencing, and infer spatial context includes:
[0031] Gene expression profiles are reconstructed from the latent variables using an expression decoder. For single-cell transcriptome sequencing expression profile data, gene counts are modeled using a negative binomial distribution and parameters for each gene are predicted.
[0032] For spatial transcriptome expression data, a Poisson distribution is used to model gene expression counts and predict rate parameters;
[0033] The COVET matrix is reconstructed from the latent variables by a COVET decoder, and the training target is to minimize the error between the predicted matrix square root and the matrix square root of the true COVET matrix.
[0034] Compared with the prior art, the present application has the following advantages and technical effects:
[0035] The method of the present application successfully integrates single-cell transcriptome sequencing (scRNA-seq) data and spatial transcriptomic data into a shared latent space. This innovative integration method overcomes the difficulty of collaborative analysis of the two data modalities in traditional methods. Through the combination of multi-head attention mechanism and conditional variational autoencoder (CVAE), the model can simultaneously encode gene expression and spatial information, thereby realizing the spatial context prediction of single-cell data and the filling of missing genes in spatial data.
[0036] Through the construction of a shared latent space, the model can efficiently process data of two modalities, avoiding information loss in the data conversion and alignment process. Experiments show that compared with traditional methods, SpateCV improves the accuracy of data integration by about 30%.
[0037] The method of the present application significantly enhances the ability to fill in missing data. For missing gene expression information in spatial transcriptomic data, SpateCV can fill in the full transcriptome gene expression information by referring to single-cell data.
[0038] The present application introduces a COVET matrix to encode the microenvironment information of cells or spatial points. By calculating the offset covariance matrix of each neighborhood, the model can accurately capture the spatial relationship between cells. This unique spatial relationship modeling method not only preserves the algebraic properties of the standard covariance matrix (such as positive semi-definiteness), but also highlights the unique features of each niche. Through the introduction of the COVET matrix, the model significantly improves the accuracy of spatial relationship modeling. The introduction of the clustering loss of the latent space ensures the consistency of the same cell type in the latent space, enabling the model to more accurately identify and distinguish different cell types.
[0039] The present application enhances the generalization ability of the model through the deep K-Means term and the adaptive weight adjustment mechanism. The model not only adapts to the characteristics of different data sets, but also dynamically balances the objectives of different loss functions during training, thereby achieving better learning effect.
[0040] The generalization ability of SpateCV on different datasets is significantly improved by adaptive weight adjustment and the introduction of deep K-Means terms. Experiments show that the accuracy of the model in cross-dataset testing is improved by about 20%, indicating good adaptability and stability.
[0041] The adaptive weight adjustment mechanism of the present application enables the model to more flexibly balance different objectives during training, avoiding the problem of unstable training caused by fixed loss function weights.
[0042] The present application reduces the need for experimental repetition and supplementary experiments by filling in the missing gene expression information in spatial data, thereby significantly reducing experimental costs.
[0043] The present application can more efficiently integrate and analyze single-cell and spatial transcriptome data, providing a more powerful tool for biomedical research. Through precise spatial relationship modeling and cell type identification, researchers can more quickly discover cell-cell interactions and disease mechanisms, accelerating the drug development process. BRIEF DESCRIPTION OF DRAWINGS
[0044] The accompanying drawings, which form a part of this application, are intended to provide further understanding of the application and are incorporated herein in their entirety, and the illustrative embodiments thereof and description thereof serve to explain the application. In the drawings:
[0045] Fig. 1 The method flowchart of the embodiment of the present application is shown in the figure;
[0046] Fig. 2 The performance comparison diagram of the method and other methods of the embodiment of the present application on twelve benchmark datasets is shown in the figure;
[0047] Fig. 3 The topological consistency diagram between the real spatial transcriptome data of the embodiment of the present application and the filled data generated by the baseline method is shown in the figure. DETAILED DESCRIPTION
[0048] It should be noted that the embodiments and features in the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0049] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.
[0050] As Figs. 1-3As shown, the embodiment provides a method for filling in idle gene expression based on conditional variational autoencoder, comprising:
[0051] A unified framework for joint analysis of single-cell transcriptome data and spatial transcriptome data is designed, and single-cell transcriptome sequencing expression profile data, spatial transcriptome expression data and COVET matrix for encoding local neighborhood covariance in tissue are obtained.
[0052] The single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data are projected into a shared latent space by an attention-enhanced encoder, and latent variables are obtained.
[0053] Gene expression is decoded from the latent variables by a decoder network, missing gene expression information in the spatial data is filled in, and the COVET matrix of the single-cell transcriptome data is predicted to infer the spatial context.
[0054] Further, the unified framework for joint analysis of single-cell transcriptome sequencing and spatial transcriptome data proposed in the embodiment is named SpateCV, which can realize the filling and data integration of undetected genes. The framework integrates conditional variational autoencoder architecture, multi-head attention mechanism and deep K-means clustering module. It is trained on both spatial data sets and single-cell data sets to optimize a single latent space.
[0055] Specifically, the single attention-enhanced encoder in the embodiment projects the two modalities into a shared latent space, wherein the clustering loss function of the latent space ensures the consistency of the same type of cells in the latent space, thereby promoting the integration of the two modalities. The framework of the embodiment contains two decoder networks for reconstructing gene expression and COVET matrix, respectively. The nonlinear network architecture can capture the complex interactions between genes. After training, the embodiment can decode gene expression from the latent representation to fill in the missing genes in the spatial data. It can also predict the COVET matrix of single-cell transcriptome sequencing to infer its spatial context.
[0056] Further, the process of designing a unified framework for joint analysis of single-cell transcriptome sequencing and spatial transcriptome data includes:
[0057] A total loss function is constructed, which is a weighted sum of spatial transcriptome reconstruction loss, single-cell transcriptome reconstruction loss, COVET matrix reconstruction loss, KL divergence loss and clustering loss of latent space.
[0058] The total loss function is minimized during the training process, and the single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data are jointly analyzed.
[0059] Specifically, the total loss function of SpateCV is the spatial transcriptome reconstruction loss Single-cell transcriptome reconstruction loss COVET matrix reconstruction loss KL divergence loss and clustering loss of latent space The final goal is to minimize this total loss during the training process, expressed as:
[0060]
[0061] Each term is weighted by a corresponding coefficient (e.g., spatial_coeff, sc_coeff, etc.), and adaptive weighting can be selectively applied during the training process to flexibly balance different objectives throughout the learning process.
[0062] Further, the single-cell transcriptome sequencing expression profile data X sc , is a single-cell transcriptome gene expression count matrix across n sc cells and g sc genes;
[0063] The spatial transcriptome expression data X st , is a spatial gene expression matrix across n st spatial points and g st genes;
[0064] The single-cell transcriptome gene expression count matrix and the spatial gene expression matrix represent gene expression profiles.
[0065] Further, the single-cell transcriptome sequencing expression profile data, the spatial transcriptome expression data are whole-genome single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data.
[0066] Further, the process of obtaining the COVET matrix for encoding the local neighborhood covariance within the tissue comprises:
[0067] According to the gene expression matrix, the spatial position of each cell or point, and the number of nearest neighbors defined to be included in the niche, a number of nearest spatial points are identified for each spatial point, and a niche matrix is constructed for each cell, the niche matrix representing the gene expression vectors of the nearest neighbors;
[0068] The offset covariance matrix of each neighborhood is calculated to obtain the COVET matrix.
[0069] Specifically, in order to encode the cell environment, the present embodiment uses a COVET matrix C st representing the gene expression covariance matrix of the nearest neighbors of each spatial point.
[0070] The inputs to COVET include:
[0071] (1) a gene expression matrix X st ;
[0072] (2) the spatial location of each cell or point;
[0073] (3) a parameter k that defines the number of nearest neighbors to include in the niche. For each spatial point, the model identifies its k nearest neighbors based on its spatial proximity and constructs a niche matrix E i for each cell that represents the gene expression vectors of the nearest neighbors. This results in a tensor where each E i contains the gene expression data of the i-th point's neighborhood.
[0074] To transform these niche matrices into an effective representation of the cellular microenvironment, the model computes a shifted covariance matrix for each neighborhood. The formula for the shifted covariance matrix is:
[0075]
[0076] is the global average gene expression. The COVET matrix represents the characteristics of each niche relative to the entire population, which enables the model to highlight the unique features of each niche while maintaining the algebraic properties of the standard covariance matrix, such as positive semi-definiteness. This matrix is the core of the model's understanding of the spatial relationships between cells or spatial points.
[0077] Further, a process of obtaining latent variables by projecting single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data into a shared latent space through a single-attention enhanced encoder includes:
[0078] The single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data are parameterized using different probability distributions, respectively; wherein the single-cell transcriptome sequencing expression profile data is modeled using a negative binomial distribution, and the spatial transcriptome expression data is modeled using a Poisson distribution;
[0079] The single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data are converted into a shared latent space using a multi-head attention layer to obtain the mean and log standard deviation of the latent variables, and the latent variables are sampled through a reparameterization trick.
[0080] In particular, to reduce the impact of technical noise, the embodiment parameterizes different probability distributions for each modality. By default, the negative binomial distribution is used to model single-cell data to account for the dropout phenomenon of gene expression; by default, the Poisson distribution is used to model spatial data to reflect the high capture rate based on fluorescence in situ hybridization (FISH) technology. The embodiment implements joint analysis of single-cell transcriptome sequencing and spatial data through end-to-end deep learning for variational inference, which can be used for data integration, missing gene expression filling, and can be extended to more downstream analysis.
[0081] In particular, the encoder in the embodiment uses a multi-head attention layer to convert single-cell transcriptome and spatial data into a shared latent space, enabling the model to focus on different features of different modality input data. The input of the encoder is single-cell transcriptome or spatial data, and an auxiliary variable c is used to indicate the modality: c = 1 for single-cell transcriptome data and c = 0 for spatial data. The encoder outputs the mean μ z and the logarithmic standard deviation σ z of the latent variable z. The latent variable z is sampled from the Gaussian distribution
[0082]
[0083] The latent variable z compactly encodes gene expression and spatial context, constituting the backbone of gene filling and spatial context prediction.
[0084] Further, the process of projecting single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data into a shared latent space by a single-attention enhanced encoder also includes:
[0085] Promote cluster-aware structure in the latent space through a deep K-means clustering module.
[0086] Further, the process of promoting cluster-aware structure in the latent space through a deep K-means clustering module includes:
[0087] Define a clustering loss function for the latent space, and construct a clustering loss for the latent space to encourage the model;
[0088] Encourage similar cells or spatial points to be clustered together in the latent space through the clustering loss for the latent space;
[0089] Organize the latent space into meaningful clusters by calculating weights through a Gaussian kernel and stabilizing optimization through inflated weights.
[0090] In particular, the deep K-Means term promotes cluster-aware structure in the latent space. The clustering loss in the latent space encourages the model to group similar cells or spatial points together in the latent space, thus ensuring consistency of the same cell type structure. The clustering loss in the latent space is defined as:
[0091]
[0092] where Z i represents the latent representation of the i-th cell or spatial point, V j is the j-th cluster center, f(Z i , V j ) is the Euclidean distance between the latent representation of the i-th cell and the j-th center. The temperature parameter τ is set to 0.1. The weight w ij is computed by a Gaussian kernel to smooth the gradient descent process, with the formula:
[0093]
[0094] The optimization is stabilized by inflating the weights:
[0095]
[0096] where α = 2 is a hyperparameter that controls the degree of inflation. The clustering loss in the latent space thus ensures that the latent space is organized into meaningful clusters, facilitating better interpretation of the learned representation.
[0097] Further, the decoder network is utilized to decode gene expression from the latent variables, filling in the missing gene expression information in the spatial data, and predicting the COVET matrix of the single-cell transcriptome sequencing, the process of inferring the spatial context includes:
[0098] By reconstructing the gene expression profile from the latent variables by the expression decoder, for the single-cell transcriptome sequencing expression profile data, the gene counts are modeled by a negative binomial distribution and the parameters of each gene are predicted;
[0099] For the spatial transcriptome expression data, the gene expression counts are modeled by a Poisson distribution and the rate parameters are predicted;
[0100] By reconstructing the COVET matrix from the latent variables by the COVET decoder, the output layer of the COVET matrix is parameterized as the lower triangular Cholesky factor of the covariance matrix, and the training objective is to minimize the error between the square root of the predicted matrix and the square root of the real COVET matrix.
[0101] In particular, the decoder consists of two parts: the expression decoder and the COVET decoder. The expression decoder reconstructs the gene expression profiles from the latent representation z. For single-cell transcriptome data, the gene counts are modeled with a negative binomial distribution
[0102]
[0103] and predict the parameters r (number of failures) and p (probability of success) for each gene. For spatial data, the gene expression counts are modeled with a Poisson distribution:
[0104]
[0105] where λ is the rate parameter predicted by the decoder.
[0106] The COVET decoder reconstructs the COVET matrix from the latent variables. Its output layer parameterizes the lower triangular Cholesky factor of the covariance matrix, which corresponds to the matrix square root (MSQR) of the COVET matrix. The training objective is to minimize the error between the predicted MSQR and the MSQR of the true COVET matrix.
[0107] The method of the present embodiment successfully integrates single-cell transcriptome sequencing (scRNA-seq) data and spatial transcriptomic data into a shared latent space. This innovative integration approach overcomes the difficulty of analyzing the two data modalities collaboratively in traditional methods. Through the combination of multi-head attention mechanism and conditional variational autoencoder (CVAE), the model can simultaneously encode gene expression and spatial information, thereby achieving spatial context prediction for single-cell data and filling in missing genes in spatial data.
[0108] Through the construction of a shared latent space, the present embodiment enables efficient processing of data of the two modalities, avoiding information loss in the data conversion and alignment process. Experiments show that compared with traditional methods, SpateCV improves the accuracy of data integration by about 30%.
[0109] The method of the present embodiment significantly enhances the ability to fill in missing data. For missing gene expression information in spatial transcriptomic data, SpateCV can fill in the full transcriptome gene expression information by referring to single-cell data.
[0110] The COVET matrix is introduced to encode the microenvironment information of cells or spatial points. By calculating the offset covariance matrix of each neighborhood, the model can accurately capture the spatial relationship between cells. This unique spatial relationship modeling method not only preserves the algebraic properties of the standard covariance matrix (such as positive semi-definiteness), but also highlights the unique characteristics of each niche. The introduction of the COVET matrix significantly improves the accuracy of spatial relationship modeling. The introduction of the clustering loss in the latent space ensures the consistency of the same cell type in the latent space, enabling the model to more accurately identify and distinguish different cell types.
[0111] The deep K-Means term and adaptive weight adjustment mechanism enhance the generalization ability of the model. The model not only adapts to the characteristics of different datasets, but also dynamically balances the objectives of different loss functions during training, achieving better learning results.
[0112] The introduction of adaptive weight adjustment and deep K-Means term significantly improves the generalization ability of SpateCV on different datasets. Experiments show that the accuracy of the model in cross-dataset testing has increased by about 20%, indicating its good adaptability and stability.
[0113] The adaptive weight adjustment mechanism allows the model to more flexibly balance different objectives during training, avoiding the instability problem caused by fixed loss function weights.
[0114] By filling in the missing gene expression information in spatial data, the need for experimental repetition and additional experiments is reduced, significantly reducing experimental costs.
[0115] This embodiment can more efficiently integrate and analyze single-cell and spatial transcriptome data, providing a more powerful tool for biomedical research. Through precise spatial relationship modeling and cell type recognition, researchers can more quickly discover cell-cell interactions and disease mechanisms, accelerating the process of drug development.
[0116] The following will further illustrate this embodiment by combining two specific tasks. The data sets used are only used to illustrate this embodiment, and are not used to limit the scope of use of this embodiment.
[0117] I. Benchmark experiment;
[0118] 1. Data set preparation and cross-validation:
[0119] Data set source:
[0120] Twelve representative spatial transcriptomic (ST) datasets were selected, covering different tissue types and cell numbers, to comprehensively evaluate the performance of the SpateCV model in filling missing gene expressions.
[0121] Cross-validation design:
[0122] Five-fold cross-validation was performed on each dataset. Each dataset was divided into five subsets, with four subsets used for training the model and the remaining subset used for testing the model's performance. This process was repeated five times, each time selecting a different subset as the test set to ensure the stability and reliability of the evaluation results.
[0123] 2. Model training and performance evaluation:
[0124] Training process:
[0125] The SpateCV model was trained on each training subset. The model integrates single-cell transcriptome sequencing (scRNA-seq) data and spatial transcriptomic data into a shared latent space through a conditional variational autoencoder (CVAE) and a multi-head attention mechanism, and fills in missing gene expressions.
[0126] Model parameters were optimized by minimizing the total loss function, including spatial transcriptome reconstruction loss, single-cell transcriptome reconstruction loss, COVET matrix reconstruction loss, KL divergence loss, and clustering loss in the latent space.
[0127] Performance evaluation indicators:
[0128] The following four indicators were used to quantify the filling accuracy:
[0129] Pearson Correlation Coefficient (PCC): measures the linear correlation between predicted and true values.
[0130] Structural Similarity Index Measure (SSIM): evaluates the structural similarity between predicted and true spatial expression patterns.
[0131] Root Mean Square Error (RMSE): quantifies the error size between predicted and true values.
[0132] Jensen–Shannon Divergence (JS): measures the probability distribution difference between predicted and true values.
[0133] Comparison methods:
[0134] The performance of SpateCV was compared with seven baseline methods, including Tangram, gimVI, stPlus, SpaGE, uniPort, and ENVI, all of which were evaluated using their default parameters.
[0135] 3. Experimental Results and Analysis:
[0136] Filling accuracy assessment:
[0137] like Fig. 2 As shown, SpateCV achieved the highest PCC values on seven out of twelve datasets and ranked second on dataset 8. On dataset 4, SpateCV's performance was comparable to leading methods such as Tangram and uniPort.
[0138] SpateCV’s robust performance on moderately sparse and dense datasets highlights its robustness.
[0139] Cell topology preservation assessment:
[0140] To evaluate the effectiveness of SpateCV in preserving cellular topological similarity between real and imputed datasets, this embodiment applies the Leiden clustering algorithm to imputed and real spatial transcriptome data and evaluates the results using the following four clustering metrics:
[0141] Adjusted Mutual Information (AMI)
[0142] Adjusted Rand Index (ARI)
[0143] Homogeneity
[0144] Normalized Mutual Information (NMI)
[0145] like Fig. 3 As shown, SpateCV exhibits high consistency in preserving the clustering results of real spatial transcriptomes, thus demonstrating its ability to preserve cellular tissue structure.
[0146] However, SpateCV did not achieve the highest score on all datasets. For example, dataset 2 contains only 175 cells, which are sparsely distributed, resulting in insufficient spatial information between cells. This lack of neighboring cell information poses a challenge for SpateCV in accurately filling in unmeasured genes, thus affecting the reconstruction of cell topology and increasing the deviation between clustering results and actual cell organization.
[0147] The method of the present embodiment performs well in filling in missing gene expression in spatial transcriptome data, especially on moderately sparse and dense datasets. Although there is a certain performance decline on extremely sparse datasets, the overall performance is still better than or comparable to existing methods. In addition, it also performs well in preserving cell topology, although there are challenges on some sparse datasets. These results show that the method of the present embodiment is a powerful and robust tool that can effectively integrate single-cell and spatial transcriptome data to provide important support for biomedical research.
[0148] II. Analysis of MERFISH data of mouse primary motor cortex
[0149] 1. Data preparation and preprocessing:
[0150] Data source: The mouse brain MOp dataset was analyzed using the image-based spatial transcriptomics method MERFISH, which contains expression information of 254 genes in 5,551 single cells, and the cells are divided into 23 cell types. The data was downloaded from the Brain Image Library (https: / / doi.org / 10.35077 / g.8).
[0151] As reference data, single-nucleus transcriptome sequencing (snRNA-seq) data of mouse MOp region was used, containing gene expression information of 13,516 cells covering 20 cell types.
[0152] Data preprocessing: Cells corresponding to "SMC", "L6 IT Car3" and "L4 / 5 IT" cell types were removed from the MERFISH dataset to ensure consistency with the cell types of the snRNA-seq dataset.
[0153] Highly variable genes, cell type differentially expressed genes and specific genes of interest in the snRNA-seq data were selected as prediction targets. After deduplication, a total of 1,938 genes were determined as prediction targets.
[0154] 2. Model training:
[0155] Training data:
[0156] The SpateCV model was trained using 247 genes common to the MERFISH and snRNA-seq datasets as training data.
[0157] Model training process:
[0158] The SpateCV model was used to encode and decode the training data to generate representations in the shared latent space.
[0159] The model parameters are optimized by minimizing the total loss function, including the spatial transcriptomic reconstruction loss, single-cell transcriptomic reconstruction loss, COVET matrix reconstruction loss, KL divergence loss, and clustering loss of latent space.
[0160] 3. Performance evaluation:
[0161] Evaluation method:
[0162] The error between the imputed values and the true values is evaluated using the Mean Absolute Error (MAE).
[0163] 4. Case study:
[0164] Gene expression imputation:
[0165] Select cortical cell type-specific marker genes (such as Osr1, Otof, Slc17a6, etc.) as test genes to visualize the predicted spatial gene expression patterns.
[0166] The imputation accuracy is quantified using the Mean Absolute Error (MAE). SpateCV outperforms or is equal to existing methods such as ENVI, stPlus, and SpaGE on multiple test marker genes.
[0167] For low-abundance or high-variance genes (such as Aqp4 and Gramd3), SpateCV outperforms Tangram and gimVI in imputation accuracy.
[0168] Downstream analysis:
[0169] Using the C-SIDE tool, 42 spatially differentially expressed genes (FDR threshold less than 1%) are detected from the original MERFISH data.
[0170] When the imputed non-MERFISH genes are added, the number of detected spatially differentially expressed genes increases to 90.
[0171] SpateCV successfully captures the spatial heterogeneity of Gfap (a marker for astrocytes), indicating its ability to detect subtle spatial changes in glial cell activity.
[0172] SpateCV accurately predicts the spatial expression of Prdm8 (involved in neural differentiation and development), highlighting its sensitivity to cell type-specific spatial changes.
[0173] Specific gene case analysis:
[0174] Hepacam (a marker for astrocytes): SpateCV accurately restores the astrocyte expression of Hepacam.
[0175] Slc17a7 (excitatory marker gene): SpateCV accurately captured the spatial expression of Slc17a7 in L5 IT neurons.
[0176] SpateCV performs well in filling in expression information of unmeasured genes in spatial transcriptomic data, preserving cell topologies, and supporting downstream analyses. Despite challenges on certain sparse datasets, it provides accurate predictions in most cases, offering a powerful tool for integrated analysis of single-cell and spatial transcriptomic data.
[0177] The above merely provides the preferred embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for imputation of dropout gene expression based on conditional variational autoencoder, characterized in that, The method comprises: designing a unified framework for joint analysis of single-cell transcriptome data and spatial transcriptome data, obtaining single-cell transcriptome sequencing expression profile data, spatial transcriptome expression data, and a COVET matrix for encoding local neighborhood covariance within a tissue; projecting the single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data into a shared latent space through an attention-enhanced encoder to obtain latent variables; decoding gene expression from the latent variables using a decoder network, filling in missing gene expression information in the spatial data, and predicting the COVET matrix of the single-cell transcriptome data to infer spatial context; The process of obtaining the COVET matrix for encoding local neighborhood covariance within a tissue comprises: identifying a number of nearest spatial points for each spatial point according to a gene expression matrix, the spatial position of each cell or point, and the number of nearest neighbors defined to be included in a niche, and constructing a niche matrix for each cell, which represents the gene expression vectors of the nearest neighbors; calculating the offset covariance matrix of each neighborhood to obtain the COVET matrix; The process of decoding gene expression from the latent variables using a decoder network, filling in missing gene expression information in the spatial data, and predicting the COVET matrix of the single-cell transcriptome sequencing to infer spatial context comprises: reconstructing the gene expression profile from the latent variables through an expression decoder, for single-cell transcriptome sequencing expression profile data, gene counts are modeled using a negative binomial distribution and the parameters of each gene are predicted; for spatial transcriptome expression data, gene expression counts are modeled using a Poisson distribution and the rate parameter is predicted; reconstructing the COVET matrix from the latent variables through a COVET decoder, the output layer of the COVET decoder parameterizes the lower triangular Cholesky factor of the covariance matrix, and the training target is to minimize the error between the matrix square root of the predicted matrix and the matrix square root of the true COVET matrix.
2. The method of claim 1, wherein the process of designing a unified framework for joint analysis of single-cell transcriptome sequencing and spatial transcriptome data comprises: constructing a total loss function, which is a weighted sum of spatial transcriptome reconstruction loss, single-cell transcriptome reconstruction loss, COVET matrix reconstruction loss, KL divergence loss, and clustering loss of latent space; minimizing the total loss function during the training process to jointly analyze the single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data.
3. The method of claim 1, wherein The single-cell transcriptome sequencing expression profile data , is a single-cell transcriptome gene expression count matrix across cells and genes; the spatial transcriptomic expression data , is a spatial gene expression matrix across spatial points and genes; the single-cell transcriptome gene expression count matrix and the spatial gene expression matrix represent gene expression profiles.
4. The method of claim 1, wherein the single-cell transcriptome sequencing expression profile data and the spatial transcriptome expression data are whole-genome single-cell transcriptome sequencing expression profile data and spatial transcriptome expression data.
5. The method of claim 1, wherein projecting the single-cell transcriptomic expression profile data and the spatial transcriptomic expression data into a shared latent space through a single-attention augmented encoder, the process of obtaining latent variables comprises: respectively adopting different probability distributions to parameterize the single-cell transcriptomic expression profile data and the spatial transcriptomic expression data; wherein the single-cell transcriptomic expression profile data is modeled using a negative binomial distribution, and the spatial transcriptomic expression data is modeled using a Poisson distribution; using a multi-head attention layer to convert the single-cell transcriptomic expression profile data and the spatial transcriptomic expression data into the shared latent space, obtaining the mean and log standard deviation of the latent variables, and sampling the latent variables through a reparameterization trick.
6. The method of claim 1, wherein, projecting the single-cell transcriptomic expression profile data and the spatial transcriptomic expression data into a shared latent space through a single-attention augmented encoder, the process of obtaining latent variables further comprises: promoting a cluster-aware structure in the latent space through a deep K-means clustering module.
7. The method of claim 6, wherein, the process of promoting a cluster-aware structure in the latent space through a deep K-means clustering module comprises: defining a clustering loss function of the latent space, constructing a clustering loss encouraging model of the latent space; grouping similar cells or spatial points together in the latent space through the clustering loss encouraging model of the latent space; organizing the latent space into meaningful clusters by calculating weights through a Gaussian kernel and stabilizing optimization through inflated weights.