A method and system for inferring expression patterns of cell subpopulations in spatial transcriptomes
By performing quality control on scRNA-seq data and constructing a variational neural network, the expression patterns of cell subpopulations are generated, and combined with spatial transcriptome data for deconvolution, the problems of low efficiency and information loss of deconvolution methods in the existing technology are solved. , achieving a more accurate estimation of cell subpopulation distribution.
Patent Information
- Application Number
- CN202210552099.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-05-20
AI Technical Summary
When inferring the expression patterns of cell subpopulations in the spatial transcriptome, the existing deconvolution method is limited by the large scale and noise of the original scRNA-seq data, resulting in slow running speed and poor effect. Direct downsampling will lose a large amount of interesting data. value information.
By performing quality control and preprocessing on scRNA-seq data, a variational neural network is constructed to learn the latent variable distribution of the expression matrix of cell subpopulations, and samples are generated from the trained distribution to generate expression patterns, which are then deconvoluted using spatial transcriptome data. product to obtain the maximum posterior estimate of the cell subpopulation in the spatial domain.
Improving the running speed and accuracy of the deconvolution method ensures that a large amount of information is retained while reducing the dimensionality, and the distribution of cell subpopulations in tissue sections is accurately estimated.
Smart Images

Figure CN114944194B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of bioinformatics spatial transcriptome sequencing data analysis, and in particular relates to a method and system for inferring cell subpopulation expression patterns within a spatial transcriptome. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] Spatial transcriptomics is an interdisciplinary subject between life science and computer science. Breakthroughs in this field have brought new discoveries to the study of diseases and biological processes. However, due to the limitations of current sequencing technology: spatial transcriptomics technology can measure the location where transcripts are produced, but cannot distinguish which cell produced the transcripts. Single-cell technology (scRNA-seq) can obtain transcripts for each cell, although spatial information will be lost.
[0004] Some analysis tools integrate single-cell data and spatial transcriptome data, and propose deconvolution methods, that is, each sampling point (spot or bead) is regarded as a mixture of multiple cell types. It builds a model based on the expression pattern of cell subpopulations in single cells, takes the experimental data of each spot in the spatial transcriptome as input, and produces the maximum a posteriori estimate of the distribution of cell subpopulations in space under the gene expression distribution of a given spot.
[0005] The inventors found that the current deconvolution method has very high requirements for the expression patterns of cell subpopulations. The original scRNA-seq data is large in scale and noisy, which will lead to slow operation speed and mediocre effect of the deconvolution method. Direct downsampling in the data will lose a lot of valuable information.
[0006] Therefore, it is very necessary to develop a method to obtain the expression pattern of cell subpopulations to solve the above problems. Summary of the invention
[0007] The purpose of the present invention is to provide a method and system for inferring the expression patterns of cell subpopulations in a spatial transcriptome, so that the single-cell reference data required for the deconvolution method in the spatial transcriptome can retain a large amount of relevant information while reducing the dimension, thereby improving the running speed and accuracy of the deconvolution method.
[0008] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0009] In a first aspect, a method of inferring expression patterns of cell subpopulations in a spatial transcriptome of the present invention comprises:
[0010] Perform quality control and preprocessing on the scRNA-seq dataset to obtain the cell subpopulation expression matrix;
[0011] Standardize and normalize the cell subpopulation expression matrix;
[0012] Construct a variational neural network to learn the latent variable distribution of the expression matrix of each cell subset in the scRNA-seq dataset;
[0013] Sampling from the trained latent variable distribution to generate expression patterns of cell subpopulations;
[0014] Based on the expression patterns of the cell subpopulations, the expression patterns of all spatial domains in the spatial transcriptome tissue slices are deconvoluted to obtain the maximum a posteriori estimate of the distribution of the cell subpopulations in the spatial domain.
[0015] Preferably, the quality control and preprocessing of the scRNA-seq data set includes: filtering cells with too low gene content and genes and mitochondrial genes that are not expressed in the cells, and screening out highly expressed genes.
[0016] Preferably, the method for standardizing and normalizing the cell subpopulation expression matrix is as follows:
[0017] X i =log(X i +1), i∈C
[0018]
[0019] Where X i Represents the expression matrix of each cell subset. The standardization method is log normalization method, and the normalization method is min-max normalization method. The expression matrix X′ i The value range is [0, 1].
[0020] Preferably, a variational neural network is constructed to learn the latent variable distribution of the expression matrix of each cell subpopulation in the scRNA-seq dataset as follows:
[0021] For a preprocessed single-cell transcriptome gene expression matrix X i First, we input an encoder consisting of a fully connected layer, and the output is μ and σ; then we get the Gaussian distribution Norm (μ, σ 2 ) is sampled to obtain the latent variable Z, and finally a decoder consisting of a fully connected layer is used to generate the final reference data;
[0022] The neural network formula is as follows:
[0023] E = ReLU(X i WE )
[0024] μ=ReLU(X i W μ )
[0025] σ=ReLU(X i W σ )
[0026] Z = Sample [Norm (μ, σ 2 )]
[0027] D = ReLU(ZW D )
[0028]
[0029] Where E and D represent the hidden layers of the encoder and decoder respectively; μ and σ represent the parameters of the Gaussian distribution in the latent space; Z represents the latent variable; X′ i Represents the reconstructed expression matrix of cell subset i.
[0030] Preferably, the above method also includes the steps of: setting an activation function, a loss function and a re-parameterization method.
[0031] Preferably, the loss function expression is:
[0032]
[0033] Among them, α is used to represent ||X i -X′ i || 2 and % of.
[0034] Preferably, the expression for reparameterizing the latent variable z is:
[0035] Z = Sample [Norm (μ, σ 2 )]=μ+εσ
[0036] Among them, ε~Norm(0,1).
[0037] In a second aspect, a system for inferring expression patterns of cell subpopulations in a spatial transcriptome of the present invention comprises:
[0038] The quality control and preprocessing module is configured to: perform quality control and preprocess the scRNA-seq dataset to obtain a cell subpopulation expression matrix;
[0039] The standardization and normalization module is configured to: standardize and normalize the cell subpopulation expression matrix;
[0040] The latent variable distribution learning module is configured to: construct a variational neural network to learn the latent variable distribution of the expression matrix of each cell subpopulation in the scRNA-seq dataset;
[0041] The expression pattern generation module is configured to: sample from the trained latent variable distribution to generate the expression pattern of the cell subpopulation;
[0042] The deconvolution module is configured to: deconvolute the expression patterns of all spatial domains in the spatial transcriptome tissue slice based on the expression patterns of the cell subpopulations, and obtain the maximum a posteriori estimate of the distribution of the cell subpopulations in the spatial domain.
[0043] One or more of the above technical solutions have the following beneficial effects:
[0044] The present invention uses a variational autoencoder to accurately obtain the expression pattern of each cell subpopulation in the scRNA-seq dataset, so that the deconvolution method in the spatial transcriptome can accurately obtain the maximum a posteriori estimate of the distribution of cell subpopulations in space under the gene expression distribution of a given spot.
[0045] The present invention reduces the dimension of the single-cell reference data required by the deconvolution method in the spatial transcriptome while retaining a large amount of relevant information, thereby improving the running speed and accuracy of the deconvolution method and making the distribution of cells in tissue sections more accurate.
[0046] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0048] Figure 1 It is a structural diagram of the variational autoencoder of the present invention; DETAILED DESCRIPTION
[0049] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0050] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0051] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0052] Specific embodiments of the present invention are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments invented are merely examples of the present invention, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present invention. Therefore, the specific structural and functional details invented herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present invention in a variety of ways with substantially any suitable detailed structure.
[0053] In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other.
[0054] Embodiment 1
[0055] Embodiment 1 of the present invention provides a method for inferring the expression pattern of cell subpopulations in a spatial transcriptome. The method can be applied in the fields of spatial transcriptomics, single-cell transcriptomics, etc., and can be combined with a variational autoencoder to accurately obtain the expression pattern of a cell subpopulation, and then use a deconvolution method to give a maximum a posteriori estimate of the distribution of the cell subpopulation in space. The method includes the following steps:
[0056] Step 1: Quality control of the scRNA-seq data set. In this example, the kidney cell data of mice aged 18 months in the Tabula-muris data set was selected, which is an expression matrix consisting of 3138 cells and 20138 genes, denoted as X. Quality control was performed on it to filter out cells with too low gene content and genes that were not expressed in the cells, and to screen out genes with high expression. After preprocessing, the expression matrix X consisted of 2771 cells and 3000 highly variable genes.
[0057] Step 2: Standardize and normalize the cell subpopulation expression matrix. Tabula-muris gives the cell subpopulation C to which each cell belongs. In this embodiment, the cell subpopulation with less than 25 cells is eliminated, and the cell subpopulation expression matrix X is normalized. i (i∈C) performs log standardization and min-max normalization, as shown in the step formula:
[0058] X i =log(Xi +1), i∈C
[0059]
[0060] Step 3: Construct a variational autoencoder (VAE) to learn the latent variable distribution of the cell subpopulation expression matrix in the scRNA-seq dataset. In this embodiment, the variational autoencoder is a type of neural network that learns the cell expression pattern through the connection between nodes, describes the observation of latent variables in the form of Gaussian distribution, and finally reconstructs the cell subpopulation expression pattern through latent variables. In this embodiment, for a gene expression matrix X of a single cell transcriptome, i , first passes through an encoder consisting of a fully connected layer, whose output is μ and σ, and then from the Gaussian distribution Norm (μ, σ 2 ) is sampled to obtain the latent variable Z, and finally a decoder composed of a fully connected layer is used to generate the final reference data.
[0061] E = ReLU(X i W E )
[0062] μ=ReLU(X i W μ )
[0063] σ=ReLU(X i W σ )
[0064] Z = Sample [Norm (μ, σ 2 )]
[0065] D = ReLU(ZW D )
[0066]
[0067] Wherein, E and D represent the hidden layers of the encoder and decoder respectively, and their dimensions are 400 in this embodiment; W E and W D They represent the weight parameters of the fully connected layer respectively; μ and σ represent the parameters of the Gaussian distribution in the latent space; Z represents the latent variable, and its dimension is 20 in this embodiment; X′ i Represents the reconstructed expression matrix of cell subset i.
[0068] Furthermore, since the input values of the standardized expression matrix are all between 0 and 1, the hidden layer uses the ReLU activation function and the output layer uses the sigmoid function. The loss function of VAE can be expressed as:
[0069] Loss = Ez~q(z|x) [logp(x|z)]+KL(N(μ,σ 2 )||N(O, I))The first term is also called reconstruction loss, that is, reconstruction loss. The model in this paper adopts L2 loss, that is:
[0070] ||X i -X′ i || 2
[0071] The second term is KL loss, which is used to reflect the degree of fit between the reconstructed expression pattern and the original cell subpopulation expression pattern. It can be expressed in VAE as:
[0072]
[0073] Therefore, the final loss function is expressed as:
[0074]
[0075] α is used to represent the proportion of reconstruction loss and KL loss, and is set to 2 in this embodiment. During back propagation, since the sampling operation is not differentiable, we need to reparameterize the latent variable z.
[0076] Since Z~N(μ,σ 2 ), we can make:
[0077] Z = Sample [Norm (μ, σ 2 )]=μ+εσ
[0078] where ε~Norm(0,1). With this trick, the gradient can be directly back-propagated through μ and σ.
[0079] Step 4: Sampling in the trained cell subpopulation latent variable distribution to generate the expression pattern of the cell subpopulation, specifically: for each cell subpopulation with a cell number greater than 25, as the input of the variational autoencoder, in this embodiment, the maximum number of iterations is set to 1000, and the learning rate is 10 -3 , when the KL loss value is less than 10 -5 The training stops when . The output results are downsampled to a dimension of 25 to obtain the standard reference cell subsets.
[0080] Step 5: Based on the expression pattern of the cell subpopulation, the expression pattern of all spots in the spatial transcriptome tissue section is deconvoluted to obtain the maximum a posteriori estimate of the distribution of the cell subpopulation in space, specifically: In this embodiment, the FFPE_Kidney spatial transcriptome data Y obtained by 10X Visium sequencing technology has 3124 spots on the tissue, with 19465 genes, and there are 2675 genes that intersect with the cell subpopulation obtained in step S4. The tissue section is divided into regions by the spatial clustering method, and X' and Y are used as the input of the deconvolution method, and the output is the proportion of each cell subpopulation in X' in each region.
[0081] It should be noted that the spatial clustering method can adopt methods such as Seurat, BayesSpace and SpaGCN, and the deconvolution method can adopt SPOTlight, spacexr and stereoScope methods. These methods are well known and are within the scope of protection of this patent.
[0082] Embodiment 2
[0083] The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method in the above-mentioned embodiment 1 when executing the program.
[0084] Embodiment 3
[0085] The purpose of this embodiment is to provide a computer-readable storage medium.
[0086] A computer-readable storage medium stores a computer program, which, when executed by a processor, performs the steps of the method in the first embodiment.
[0087] Embodiment 4
[0088] The purpose of this embodiment is to provide a system for inferring the expression patterns of cell subpopulations within a spatial transcriptome, including:
[0089] The quality control and preprocessing module is configured to: perform quality control and preprocessing on scRNA-seq datasets;
[0090] The standardization and normalization module is configured to: standardize and normalize the cell subpopulation expression matrix;
[0091] The latent variable distribution learning module is configured to: construct a variational neural network to learn the latent variable distribution of the expression matrix of each cell subpopulation in the scRNA-seq dataset;
[0092] The expression pattern generation module is configured to: sample from the trained latent variable distribution to generate the expression pattern of the cell subpopulation;
[0093] The deconvolution module is configured to: deconvolute the expression patterns of all spatial domains in the spatial transcriptome tissue slice based on the expression patterns of the cell subpopulations, and obtain the maximum a posteriori estimate of the distribution of the cell subpopulations in the spatial domain.
[0094] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present disclosure.
[0095] Those skilled in the art should understand that the modules or steps of the present disclosure can be implemented by a general computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present disclosure is not limited to any specific combination of hardware and software.
[0096] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
[0097] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A method for inferring expression patterns of cell subpopulations within a spatial transcriptome, characterized in that: include: Perform quality control and preprocessing on the scRNA-seq dataset to obtain the cell subpopulation expression matrix; Construct a variational neural network to learn the latent variable distribution of the expression matrix of each cell subpopulation in the scRNA-seq dataset; Sampling from the trained latent variable distribution to generate expression patterns of cell subpopulations; Based on the expression patterns of the cell subpopulations, the expression patterns of all spatial domains in the spatial transcriptome tissue sections were deconvoluted to obtain the maximum a posteriori estimation of the distribution of cell subpopulations in the spatial domain. Specifically, the FFPE_Kidney spatial transcriptome data Y obtained by 10X Visium sequencing technology was used to divide the tissue sections into regions using the spatial clustering method. and Y as the input of the deconvolution method, outputting the The proportion of each cell subpopulation in the The quality control and preprocessing of the scRNA-seq dataset include: filtering cells with too low gene content and genes and mitochondrial genes that are not expressed in the cells, and screening out highly expressed genes; The variational neural network is constructed to learn the latent variable distribution of the expression matrix of each cell subpopulation in the scRNA-seq dataset as follows: For a preprocessed single-cell transcriptome gene expression matrix , first input a layer of encoder consisting of a fully connected layer, the output is and ; Then from the Gaussian distribution The latent variable Z is obtained by sampling, and finally the final reference data is generated through a decoder composed of a fully connected layer; The formula of variational neural network is as follows: in, and denote the hidden layers of the encoder and decoder respectively; and Parameters representing the Gaussian distribution of the latent space; represents a latent variable; Indicates cell subpopulations Reconstructed expression matrix; Set the activation function, loss function and reparameterization method; the loss function expression is: in, Used to indicate and % of the total.
2. The method for inferring cell subpopulation expression patterns within a spatial transcriptome according to claim 1, characterized in that: The expression for reparameterizing the latent variable z is: in, .
3. A system for inferring expression patterns of cell subpopulations within a spatial transcriptome, characterized in that include: The quality control and preprocessing module is configured to: perform quality control and preprocess the scRNA-seq dataset to obtain the cell subpopulation expression matrix; The latent variable distribution learning module is configured to: build a variational neural network to learn the latent variable distribution of the expression matrix of each cell subpopulation in the scRNA-seq dataset; The expression pattern generation module is configured to: sample from the trained latent variable distribution to generate the expression pattern of the cell subpopulation; The deconvolution module is configured to: deconvolve the expression patterns of all spatial domains in the spatial transcriptome tissue slice based on the expression patterns of the cell subpopulations, and obtain the maximum a posteriori estimate of the distribution of cell subpopulations in the spatial domain. Specifically, the FFPE_Kidney spatial transcriptome data Y obtained by 10X Visium sequencing technology is used to divide the tissue slice into regions through spatial clustering method. and Y as the input of the deconvolution method, outputting the The proportion of each cell subpopulation in the The quality control and preprocessing of the scRNA-seq dataset include: filtering cells with too low gene content and genes and mitochondrial genes that are not expressed in the cells, and screening out highly expressed genes; The variational neural network is constructed to learn the latent variable distribution of the expression matrix of each cell subpopulation in the scRNA-seq dataset as follows: For a preprocessed single-cell transcriptome gene expression matrix , first input a layer of encoder consisting of a fully connected layer, the output is and ; Then from the Gaussian distribution The latent variable Z is obtained by sampling, and finally the final reference data is generated through a decoder composed of a fully connected layer; The formula of variational neural network is as follows: in, and denote the hidden layers of the encoder and decoder respectively; and Parameters representing the Gaussian distribution of the latent space; represents a latent variable; Indicates cell subpopulations Reconstructed expression matrix; Set the activation function, loss function and reparameterization method; the loss function expression is: in, Used to indicate and % of the total.
4. A computing device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method described in any one of claims 1 to 2 are implemented.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 2 are executed.
