Single-cell data batch effect correction method based on generative adversarial network

By generating an adversarial network, the batch effect of single-cell data is corrected by using variational inference and batch labels, the problems of large memory consumption and degradation of correction performance in the prior art are solved, and efficient batch effect correction and the accuracy of clustering results are improved.

CN116825186BActive Publication Date: 2025-08-29NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310723261.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2025-08-29
Estimated Expiration
2043-06-19

AI Technical Summary

Technical Problem

The existing single-cell data batch effect correction methods require a lot of memory and time when facing large data sets, and the correction performance decreases with the increase in data volume and batch number. The correction performance of the existing deep learning methods is not excellent enough.

Method used

Using a method based on generative adversarial network, the posterior distribution is estimated through variational inference, the generative model is used to reconstruct low-dimensional representation vectors and add batch labels. Combined with the discriminator, the reconstructed data ability is improved, and the star-generating adversarial network is used to correct single-cell data of different batches.

Benefits of technology

It effectively reduces the batch effect, improves the degree of data mixing and the accuracy of clustering results, retains the differences between different cell types, and significantly improves the effect of data correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116825186B_ABST
    Figure CN116825186B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method for correcting batch effects of single-cell data based on a generative adversarial network, comprising: sequencing single-cell data to obtain a high-dimensional single-cell gene expression count matrix; performing computational learning on the high-dimensional single-cell gene expression count matrix based on a recognition model in a variational inference manner to approximate the posterior distribution, and using randomly generated Gaussian noise and the distribution mean and distribution variance of the high-dimensional single-cell data to approximate the potential low-dimensional representation distribution, thereby obtaining an approximate low-dimensional representation vector; reconstructing the low-dimensional representation vector based on a generative model to obtain single-cell reconstructed original data; wherein, when the generative model reconstructs the low-dimensional representation vector, a batch label is added to the low-dimensional representation vector to remove the batch effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of novel biotechnology, and in particular to a method for correcting batch effects of single-cell data based on a generative adversarial network. Background Art

[0002] Single-cell RNA sequencing (scRNA-seq) is a high-throughput sequencing technology for transcriptomes at the individual cell level. The single-cell data obtained through sequencing can reveal the genetic structure and gene expression status of individual cells, which is of great significance for discovering and analyzing cellular heterogeneity, exploring meaningful biological changes, and studying the correlations between cells. Studying and analyzing single-cell data can help discover disease markers, pinpoint the root causes of diseases, and improve diagnostic efficiency. Currently, single-cell data has been widely applied in various fields such as oncology, microbiology, and developmental biology, and has achieved great success in clinical research.

[0003] Due to factors such as experimental environments, sequencing samples, and sequencing technologies used in different batches, the collected data may vary to a certain extent. This variation is called batch effect. Batch effect is a type of noise that can easily obscure true biological differences and misclassify data from the same cell type into different clusters during cluster analysis, leading to misleading conclusions and seriously affecting the accuracy of downstream analytical tasks.

[0004] Currently, traditional batch effect correction and data integration methods for single-cell data require enormous amounts of memory and long runtimes when applied to large datasets. Furthermore, as the amount of data and the number of batches increase, the correction performance of these methods also decreases. In recent years, deep learning, with its adaptability to massive amounts of data and ability to automatically extract features, has been widely applied in various fields, including image recognition and natural language processing.

[0005] Existing studies have achieved batch effect correction of single-cell data based on deep learning, but the correction performance of these methods is not good enough and there is still much room for improvement.

[0006] To address the above issues, no effective solutions have been proposed so far.

[0007] It should be noted that the above technical background is merely provided to provide a clear and complete description of the technical solutions of the present invention and to facilitate understanding by those skilled in the art. Simply because these solutions are described in the technical background section of the present invention, it should not be assumed that the above technical solutions are well known to those skilled in the art. Summary of the Invention

[0008] The purpose of this specification is to provide a single-cell data batch effect correction method based on a generative adversarial network to solve the above problems.

[0009] This specification provides a method for correcting batch effects of single-cell data based on a generative adversarial network, the method comprising:

[0010] Sequencing the single-cell data to obtain a high-dimensional single-cell gene expression count matrix;

[0011] The high-dimensional single-cell gene expression count matrix is ​​computationally learned based on a recognition model using variational inference to approximate the posterior distribution, and the potential low-dimensional representation distribution is approximated using randomly generated Gaussian noise and the distribution mean and distribution variance of the high-dimensional single-cell data to obtain an approximate low-dimensional representation vector;

[0012] Reconstructing the low-dimensional representation vector based on a generative model to obtain single-cell reconstructed raw data;

[0013] When the generative model reconstructs the low-dimensional representation vector, a batch label is added to the low-dimensional representation vector to remove the batch effect;

[0014] The generator in the generative adversarial network is incorporated into the recognition model to generate a new generative model, and the new generative model is used to discriminate the high-dimensional single-cell gene expression count matrix and the single-cell reconstructed raw data, thereby improving the ability of the generative model to reconstruct data.

[0015] Preferably, the process of reconstructing the low-dimensional representation vector includes:

[0016] Single-cell data are fitted by a negative binomial distribution, and dropout events are fitted using a zero-inflated model, thereby reducing the probability of dropout events and reducing the deviation between the single-cell reconstructed original data and the single-cell data.

[0017] Preferably, the process of fitting the single cell data based on the zero-inflated model and the negative binomial distribution model includes:

[0018] The negative binomial distribution model is divided into cases where dropout events occur and cases where no dropout events occur. The generative model is then used to fit the three parameters of the zero-inflated and negative binomial distribution models respectively: the probability of a dropout event, the dispersion of the negative binomial distribution, and the expression mean.

[0019] Preferably, the process of the discriminator in the generative adversarial network performing the discrimination includes:

[0020] The generator in the generative adversarial network updates the network parameters according to the score of the discriminator, thereby generating the single-cell reconstructed original data that is close to the real single-cell data.

[0021] Preferably, in the process of obtaining the approximate low-dimensional representation vector:

[0022] Based on the star-shaped generative adversarial network, a target batch is selected from multiple batches of the single-cell data, and the single-cell data of the remaining batches are uniformly mapped to the data distribution space where the target batch is located through the generator, thereby correcting the batch effect between different batches of the single-cell data.

[0023] Preferably, in the process of the star-shaped generative adversarial network correcting the batch effect between different batches of the single-cell data:

[0024] Pre-clustering is performed in the target batch, and data from other batches are divided into cell clusters closest to the target batch, thereby obtaining cell type pre-labels for multiple batches of data.

[0025] Preferably, after the pre-clustering is performed, a plurality of different cell clusters are obtained, and then the center positions of the cell clusters are calculated based on the sample means in the plurality of cell clusters.

[0026] Preferably, when processing the remaining batches of data, the distance between each batch of samples and the center of the cell cluster of the target batch is calculated separately, and the data is divided into the cell cluster of the target batch that is closest.

[0027] Preferably, when the pre-labels are obtained through the pre-clustering, the pre-labels are used as reference labels, thereby constraining the generator and preventing the conversion process from changing the cell type of the data.

[0028] Preferably, when the pre-labels are obtained by the pre-clustering, a cell type recognition model is separately constructed to predict the cell type labels of the data.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] 1. The present invention adopts variational inference through the variational autoencoder in the recognition model, uses randomly generated Gaussian noise and the learned distribution mean and distribution variance to approximate the potential low-dimensional representation distribution, and obtains an approximate low-dimensional representation vector.

[0031] 2. The present invention uses a zero-inflated negative binomial distribution model to sequence single-cell data to reduce the probability of dropout events.

[0032] 3. The present invention adds batch labels to supplement batch information, so that the generation model can remove the potential low-dimensional representation vector of the batch effect, and the recognition model can learn the potential low-dimensional representation after removing the batch effect from the original data containing the batch effect.

[0033] 4. The present invention uses a discriminator to identify input data and calculate the corresponding discriminant score. The generator does not directly access the input original data, but updates the network parameters based on the discriminant score of the discriminator. Therefore, the generator expects that the generated imitation data can obtain a higher discriminant score, so as to improve the ability of the generative model to reconstruct data, so that the generative model can generate reconstructed data that is more similar to the original data.

[0034] 5. The present invention selects one batch as the target batch and uniformly maps the data to the data distribution space of the target batch. By unifying the batch style of the data, the purpose of correcting the batch effect between different batches of data is achieved.

[0035] 6. The present invention calculates the center position of the cell cluster based on the mean of the samples in the cell cluster, calculates the distance between the samples in each batch and the cluster center of the target batch separately, and divides the data into the cluster closest to the target batch to directly obtain accurate cell type pre-labeling.

[0036] 7. The present invention separately constructs a cell type recognition model when pre-clustering to obtain the pre-labels to predict the cell type labels of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0038] Figure 1 This is an overall flow chart of the single-cell data batch effect correction method based on the generative adversarial network provided in the embodiments of this specification;

[0039] Figure 2 This is a model framework diagram for dimensionality reduction and correction of high-dimensional and sparse single-cell data in the single-cell data batch effect correction method based on a generative adversarial network provided in the embodiments of this specification;

[0040] Figure 3 This is a model framework diagram for correcting batch effects in low-dimensional representations in a single-cell data batch effect correction method based on a generative adversarial network provided in an embodiment of this specification;

[0041] Figure 4 Schematic diagram of a pre-clustering algorithm for a single-cell data batch effect correction method based on a generative adversarial network provided in an embodiment of this specification;

[0042] Figure 5 Schematic diagram of the distribution of cells before and after correction in the single-cell data batch effect correction method based on a generative adversarial network provided in an embodiment of this specification;

[0043] Figure 6 This is a structural diagram of the generative adversarial network (GAN) for the single-cell data batch effect correction method based on the generative adversarial network provided in the embodiments of this specification.

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

[0045] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.

[0046] In the description of the present invention, it should be noted that the terms "upper", "middle", "lower", "inside", "outside", "front", "back" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or component referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. The terms "first", "second" and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. The following describes an implementation method of the present invention based on its overall structure.

[0047] Reference Figures 1 to 6 As shown, the embodiment of the present application provides a method for correcting batch effects of single-cell data based on a generative adversarial network, comprising:

[0048] Sequencing single-cell data to obtain a high-dimensional single-cell gene expression count matrix;

[0049] The high-dimensional single-cell gene expression count matrix is ​​computationally learned based on the recognition model using variational inference to approximate the posterior distribution. The potential low-dimensional representation distribution is approximated using randomly generated Gaussian noise and the mean and variance of the high-dimensional single-cell data to obtain an approximate low-dimensional representation vector.

[0050] Reconstructing the low-dimensional representation vector based on a generative model to obtain single-cell reconstructed raw data;

[0051] When the generative model reconstructs the low-dimensional representation vector, a batch label is added to the low-dimensional representation vector to remove the batch effect;

[0052] The generator in the generative adversarial network is incorporated into the recognition model to generate a new generative model, which is used to discriminate and score the high-dimensional single-cell gene expression count matrix and the single-cell reconstructed raw data, thereby improving the ability of the generative model to reconstruct data.

[0053] The variational autoencoder model is a generative model based on variational Bayesian inference. Specifically, the recognition model learned by variational Bayesian inference is used. To approximate the difficult-to-calculate posterior distribution p θ (z|x). Because traditional autoencoders lack randomness in the latent low-dimensional representations they learn, they are merely low-dimensional representation models and cannot be applied to generative tasks. Variational autoencoders, on the other hand, use random Gaussian noise to randomly sample data from the approximate distribution space of the low-dimensional representations. Therefore, they can be used to generate diverse data.

[0054] The existing generative adversarial networks and variational autoencoders each have their own advantages in generation mode. The images generated by generative adversarial networks are generally clearer than those generated by variational autoencoders, but generative adversarial networks cannot complete the dimensionality reduction task, while variational autoencoders can obtain the potential low-dimensional representation of the data.

[0055] The star-shaped generative adversarial network consists of only a generator and a discriminator. The generator inputs the source domain data x and the target domain label d, where the target domain label is encoded using a one-hot encoding method. The target domain label is used to convert the source domain data into simulated target domain data, and it is expected that the discriminator cannot distinguish between the real target domain data and the simulated target domain data; the discriminator determines whether the input data is real data or simulated data, and calculates the discriminant score of the data.

[0056] In this application, the generative model is merged with the generative adversarial network, and the discriminator is used to improve the ability of the generative model to reconstruct data, so that the generative model can generate reconstructed data that is more similar to the original data.

[0057] This application proposes a model for dimensionality reduction and correction of high-dimensional, sparse single-cell data. The variational autoencoder in this model consists of a recognition model q(z|x) and a generative model p(x|z, b). The recognition model fits the true posterior distribution based on variational inference. The recognition model corresponds to the encoder in the variational autoencoder model. Here, x is the original high-dimensional data, and z is the potential low-dimensional representation of the original high-dimensional data x.

[0058] according to Figure 2 It can be seen that a high-dimensional single-cell gene expression count matrix x is input to the recognition model. Using randomly generated Gaussian noise and the learned distribution mean μ′ and distribution variance σ′ 2 Approximately estimate the potential low-dimensional distribution p(z), and further obtain an approximate low-dimensional representation vector z=μ′+σ′⊙∈, where ∈ is random Gaussian noise and obeys the standard normal distribution.

[0059] After analyzing the process of variational inference, we further conclude that minimizing the difference between the recognition model q(z|x) and the true posterior distribution p(x|z) is equivalent to maximizing the variational lower bound. The formula definition of the variational lower bound is: where L(x) is the variational lower bound for variational inference; KL(q(z|x)||p(z|x)) is the difference between the approximate distribution and the underlying low-dimensional representation; and p(x|z) is the reconstructed data distribution learned by the generative model.

[0060] The optimization goal of the above recognition model is to reduce the difference between the approximate distribution q(z|x) and the potential low-dimensional representation prior distribution p(z), that is, to minimize the inverse of the previous term of the variational lower bound KL(q(z|x)||p(z|x)). It is worth noting that the KL divergence is followed by a prior distribution p(z), so the loss function of the recognition model is expressed as:

[0061] Among them, μ is the mean of the approximate distribution learned by the recognition model; σ 2 is the variance of the approximate distribution learned by the recognition model.

[0062] During specific research, single-cell data may generate some missing values ​​due to dropout events in the sequencing process. These missing values ​​may contain non-true zero values, resulting in zero inflation in the data distribution.

[0063] Preferably, the process of reconstructing the low-dimensional representation vector includes:

[0064] Single-cell data are fitted by a negative binomial distribution, and dropout events are fitted using a zero-inflated model, thereby reducing the probability of dropout events and reducing the deviation between the single-cell reconstructed original data and the single-cell data.

[0065] It is worth noting that during the sequencing of single-cell data, dropout events can occur due to factors such as sampling technology and the number of transcript samples, further leading to a large number of zero expression values ​​in the high-dimensional single-cell gene expression count matrix. According to the findings of those skilled in the art in actual operations, there are two types of zero expression: one is true zero expression, that is, the target gene in the cell sample is not expressed and therefore not detected; the other is false zero expression, that is, the partial gene expression is missing due to dropout events, resulting in the gene expression value not being detected. The presence of missing values ​​produces inaccurate dimensionality reduction results, that is, an inaccurate low-dimensional representation vector is obtained.

[0066] The value of each site in the single-cell gene expression count matrix is ​​the expression count of the target gene detected in the cell, so the single-cell data is discrete data. The definition of Poisson distribution is: Where k is the count value in the gene expression matrix and λ is the parameter of the Poisson distribution.

[0067] In the above definition, the expectation and variance of the Poisson distribution are both equal to λ, and λ is fixed. However, in the gene expression matrix, the sample mean and sample variance are usually not equal. As the sample expression level increases, the gap between the sample mean and sample variance also increases. Therefore, the distribution of single-cell data does not fully conform to the properties of the Poisson distribution.

[0068] To overcome the above problems, the Poisson distribution model is improved in this application. That is, in the process of fitting the single-cell data using the discrete Poisson distribution, it is preferred to use the negative binomial distribution to process the single-cell data. The definition of the negative binomial distribution is: Where r is the dispersion parameter of the negative binomial distribution; p is the probability of the expression value; x is the true expression value; and Γ is the Gamma distribution.

[0069] Preferably, the negative binomial distribution model is divided into cases where dropout events occur and cases where no dropout events occur. Then, the generative model is used to fit the three parameters of the zero-inflated and negative binomial distribution models: the probability of dropout events occurring π, the dispersion of the negative binomial distribution θ, and the expression mean μ. The definition of the zero-inflated negative binomial distribution model is obtained as follows:

[0070] f ZINB (x;π,μ,θ)=πδ0(x)+(1-π)fNB (x; μ, θ),

[0071] Where: f ZINB (x; π, μ, θ) is the zero-inflated negative binomial distribution model; δ0(x) is the Dirac function; π is the probability of a dropout event; θ is the dispersion of the negative binomial distribution; μ is the mean expression; f NB (x; μ, θ) is the negative binomial distribution model; Γ is the gamma distribution.

[0072] In the above embodiment, there are two cases of zero expression: one is the true zero expression, and the other is the false zero expression. In this embodiment, the zero-inflated negative binomial distribution model is mainly divided into two parts. The first part is to fit the zero expression in the data, and substitute x=0 into f ZINB (x;π,μ,θ)=πδ0(x)+(1-π)f NB The model formula for obtaining zero expression in (x; μ, θ) is: Correspondingly, the first term fits the erroneous zero expression, and the second term fits the true zero expression. The second part fits the non-zero expression in the data, and substitutes x≠0 into f ZINB (x;π,μ,θ)=πδ0(x)+(1-π)f NB (x; μ, θ) to obtain the model formula of non-zero expression:

[0073]

[0074] The original data contains batch effects, but the resulting latent low-dimensional representation does not. Therefore, when the latent low-dimensional representation is reconstructed, the recognition model cannot fit the latent low-dimensional representation z that contains batch effects. To address the batch effects in the original data, the generative model adds a batch label b when reconstructing the data. With this added batch information, the generative model p(x|z, b) can reconstruct the batch-effect-free latent low-dimensional representation z back to the original data that contains batch effects.

[0075] In a generative adversarial network, the goal of the generator is to generate simulated data that is consistent with the distribution of the original data, while the goal of the generative model is to reconstruct the low-dimensional representation into reconstructed data that approximates the distribution of the original data. Therefore, the goal of the generator is consistent with that of the generative model of a variational autoencoder. This application combines a variational autoencoder model with a generative adversarial network model. Furthermore, the generative model is merged with the generative adversarial network, and a discriminator is used to improve the generative model's ability to reconstruct data, enabling the generative model to generate reconstructed data that is more similar to the original data.

[0076] The adversarial loss definition of the generative adversarial network model is:

[0077]

[0078] Among them, L adv To combat losses; D src is the discriminant score calculated by the discriminator; x is the original data; z is the potential low-dimensional representation; b is the batch label; p(x|z,b)——the data reconstructed by the generative model.

[0079] In a generative adversarial network, the discriminator identifies input data and calculates a score. A higher score indicates that the discriminator believes the input data is closer to the real data distribution; a lower score indicates that the discriminator believes the input data is closer to the fake data distribution. In other words, the discriminator aims to distinguish between real and fake data, giving real data a higher score and fake data a lower score.

[0080] The generator aims to generate fake data that is similar to real data and deceive the discriminator, making it unable to distinguish between real and fake data. The generator does not directly access the original input data, but updates the network parameters based on the discriminator's discriminant score. Therefore, the generator expects the generated fake data to receive a higher discriminant score.

[0081] In this example, the present invention is further described in detail based on the analysis of a human peripheral blood mononuclear cell dataset, a human pancreatic cell dataset, a human peripheral blood mononuclear cell dataset obtained by multiple different sequencing technologies, and a mouse brain dataset.

[0082] First, we need to set the parameters. The recognition model consists of three layers of fully connected networks, where the number of neurons in the first two layers is 256 and 128 respectively. The third layer consists of two fully connected networks, and the number of neurons is consistent with the dimension of the potential low-dimensional representation, so as to learn the distribution mean μ′ and distribution variance σ′ of the potential low-dimensional representation. 2 , the output of each fully connected network uses the Rectified Linear Unit activation function. The Rectified Linear Unit activation function is:

[0083] f(x)=max(x,0).

[0084] To prevent feature covariates from shifting and reduce the risk of vanishing gradients, batch normalization is used between every two fully connected layers. To reduce the risk of model overfitting, a dropout layer is used between every two fully connected layers, with a dropout rate set to 0.1.

[0085] The discriminator consists of three fully connected layers. The first two layers have 256 and 128 neurons, respectively. The third layer consists of two fully connected layers, each with 1 neuron and the number of batches. These layers output the discriminant score and the predicted batch label, respectively. The activation function used in the discriminator is ReLU, and a dropout layer is added between every two layers, with a dropout rate of 0.2.

[0086] In this application, the inventors set the learning rates of the discriminator and the variational autoencoder to 0.001; during the small batch learning process, the batch size was set to 128.

[0087] In the process of preprocessing single-cell data, the first step is to clean the single-cell data set. Useless cell samples and redundant gene features are filtered out. The commonly used filtering method is to filter cell samples with a small number of gene expressions and gene features that are almost not expressed. In this embodiment, cells with a total number of genes less than 200 and genes expressed in no more than 3 cells are filtered out. The second step is normalization at the cellular level. The commonly used normalization method is to divide the expression count of each gene in each cell by the sequencing depth, multiply it by 10,000, and then use the logarithmic function to convert the count value to a natural logarithmic scale. Since the lowest count value is 0, add 1 to all count values ​​to ensure that the normalized value is not less than 0. The conversion formula is: in is the transformed x. The third step is to screen for highly variable genes. When analyzing single-cell data, it is necessary to screen out gene features with significant changes. The more significant the changes in the features, the more conducive it is to distinguish different cells. These genes are called highly variable genes (HVGs). A common screening method is to screen genes with relatively large variance and mean as highly variable genes, and use highly variable genes as gene features to identify cells. The remaining gene features will be discarded. In this example, the top 2000 genes are screened as highly variable genes.

[0088] Table 1: Human peripheral blood mononuclear cell dataset

[0089]

[0090] The human peripheral blood mononuclear cell dataset was used to merge and annotate cell types using the method of Polański et al. The dataset contains two batches of data obtained by the 3′ method and the 5′ method. There are 8098 cells in the data obtained by the 3′ method and 7378 cells in the data obtained by the 5′ method. The merged dataset contains 15476 cells and 33694 genes.

[0091] according to Figure 3As can be seen, there are significant batch differences between the data obtained by the 3′ and 5′ methods. There are also large gaps between the data for the same cell type. By integrating, marker genes for different cell types are essentially clustered together in a single cell cluster, making cell type classification and annotation more convenient.

[0092] The inventors of this application calculated the integration coefficient LISI of the original data and the data corrected by the dimensionality reduction and correction model using high-dimensional sparse single-cell data. LISI is divided into batch coefficient iLISI and cell type coefficient cLISI according to the reference target label. The higher the iLISI, the higher the degree of mixing of data from different batches, that is, the higher the degree of batch effect correction; the lower the cLISI, the lower the degree of data mixing between different cell types. In an ideal correction result, it is generally expected that data from different batches are evenly mixed together, that is, the iLISI should be as high as possible, while different cell types are completely separated and retain significant differences, that is, the cLISI should be as low as possible. In this embodiment, the average iLISI calculated from the original data is 1.0081, and the average cLISI is 1.0426; the average iLISI calculated from the data corrected using the generative adversarial network model is 1.7733, and the average cLISI is 1.0810. From the above data comparison, it can be seen that the average cLISI has only undergone minor changes, while the average iLISI has increased significantly. That is, while the degree of data mixing between different cell types remains stable, the degree of data mixing between different batches increases significantly.

[0093] Furthermore, the data was divided into multiple clusters by clustering and assigned cluster labels. The ARI and NMI of the clustering results were calculated by comparing the differences between the assigned cluster labels and the true cell type labels. The ARI obtained by clustering the original data was 0.3915 and the NMI was 0.6774; the ARI obtained by clustering the data corrected by the generative adversarial network model was 0.6605 and the NMI was 0.7710. It is worth noting that ARI is the adjusted Rand coefficient, which mainly measures the difference between the cluster labels of the clustering results and the true labels. NMI is the normalized mutual information, which mainly measures the similarity between the cluster labels of the clustering results and the true labels.

[0094] Based on the above data, we can see that after correcting the generative adversarial network model, the degree of data mixing was greatly improved, batch effects were reduced, and the differences between different cell types were preserved after correction, significantly improving the accuracy of the clustering results.

[0095] Correction analysis was performed for single-cell data with inconsistent cell type composition. The dataset used was a human pancreatic islet cell dataset, which includes data collected by five different authors from different sequencing batches. The combined dataset contained 16,293 cells and 34,290 genes, representing 28 different cell types. The combined dataset contained 28,986 cells and 24,946 genes, encompassing a total of 10 different cell types.

[0096] The inventors of this application tested the dataset in Table 2 using a generative adversarial network and combined it with the UMAP algorithm to visualize the original data and the corrected distribution.

[0097] according to Figure 5 Before data correction, there were some batch differences between the data obtained from the five different sequencing technologies. In other words, the data from different batches were not completely mixed. After correction, the data obtained from the five different sequencing technologies were mixed relatively evenly.

[0098] Table 2: Detailed information of the human pancreatic islet cell dataset

[0099]

[0100] In actual practice by those skilled in the art, before data correction, the ARI obtained by clustering the original data was 0.3264 and the NMI was 0.6268; after the data was corrected using the dimensionality reduction and correction model for high-dimensional sparse single-cell data, the ARI obtained by clustering was 0.5665 and the NMI was 0.7012. The dimensionality reduction and correction model for high-dimensional sparse single-cell data is the model used in the actual processing of the single-cell data batch effect correction method based on the generative adversarial network claimed by the inventors of this application. The aforementioned dimensionality reduction and correction model for high-dimensional sparse single-cell data can be named scVGAN.

[0101] The above data analysis shows that dimensionality reduction and calibration of high-dimensional, sparse single-cell data can significantly reduce batch effects and preserve differences between different cell types. Furthermore, after calibration, the accuracy of cluster analysis results can be improved.

[0102] The inventors calculated that, before data correction, the average batch coefficient calculated for the raw data was 1.7227, and the average cell type coefficient was 1.4681. After correcting the data using a dimensionality reduction and correction model for high-dimensional, sparse, single-cell data, the average batch coefficient was 3.7878, and the average cell type coefficient was 1.4258. This correction significantly reduced the batch effect in the data while preserving the differences between cell types.

[0103] According to Table 2, in this embodiment, single-cell data collected by various sequencing technologies are corrected. The data uses a human peripheral blood mononuclear cell dataset obtained by various sequencing technologies. Seven different sequencing technologies were used to obtain the data, namely 10xChromium, CEL-Seq2, Drop-seq, Seq-Well, Smart-seq2 and inDrops, and the 10xChromium sequencing technology is subdivided into 10xChromium (v2), 10xChromium (v2) A, 10xChromium (v2) B,

[0104] The merged dataset of 10xChromium (v3) contains 28,986 cells and 24,946 genes, of which 10 are different cell types. Most cell types are basically the same in different batches of data.

[0105] Table 3: Human peripheral blood mononuclear cell dataset

[0106]

[0107] Based on the data in Table 3, before data correction, the average batch coefficient calculated for the raw data was 1.7227, and the average cell type coefficient was 1.4681. After correction using the dimensionality reduction and correction model for high-dimensional, sparse, single-cell data, the average batch coefficient calculated was 3.7878, and the average cell type coefficient was 1.4258. This significantly reduces batch effects, and the accuracy of cluster analysis results from the corrected data is significantly improved.

[0108] Table 4: Data of the cerebral cortex and hippocampus of adult mice

[0109]

[0110] According to Table 4 above, in this embodiment, for large-scale single-cell data set calibration, data from the cerebral cortex and hippocampus of adult mice are mainly used. The data set is divided into 15 batches, each batch representing data from a different region, namely the anterior cingulate gyrus (ACA), agranular insular area (AI), auditory area (AUD), entorhinal area (ENT), hippocampus (HIP), primary motor area (MOp), secondary motor area (Mos_FRP), subiculum (PAR-POST-PRE-SUB-ProS), prefrontal area (PL-ILA-ORB), posterior parietal association area (PTLp), retrosplenial area (RSP), primary somatosensory area (SSp), supplementary somatosensory area (SSs-GU-VISC-AIp), lateral area (TEa-PERI-ECT) and visual area (VIS). There are a total of 1,169,213 cells and 27,824 genes in the merged data set.

[0111] The experimental results show that before correcting for batch effects, the average batch coefficient calculated for the original data was 3.2738, and the average cell type coefficient was 1.0772. After correcting the data using the dimensionality reduction and correction model for high-dimensional, sparse, single-cell data, the average batch coefficient calculated was 3.0312, and the average cell type coefficient was 1.0597. These experimental results indicate that batch effects have been effectively corrected.

[0112] Preferably, in the process of obtaining an approximate low-dimensional representation vector: based on a star-shaped generative adversarial network, a target batch is selected from multiple batches of single-cell data, and the single-cell data of the remaining batches are uniformly mapped to the data distribution space where the target batch is located through a generator, thereby correcting the batch effect between different batches of single-cell data.

[0113] like Figure 3 ,Batch effects are corrected for low-dimensional representations using a star-shaped generative adversarial network, thereby obtaining single-cell data with a unified batch style.,It is worth noting that in the correction process, the batch is used as the domain, and any batch is selected as the target domain.

[0114] Specifically, the generator inputs the original domain data x real And the batch label b of the target domain to be converted trg . Convert it into a simulated target domain data x fake =G(x real , b trg ). The discriminator inputs the real target domain data x real and the simulated target domain data x fake . The input data is judged. The batch label of the input data is input at the same time. It can be known that the definition of the adversarial loss is: L in the formulaadv is the adversarial loss; Dsrc is the discriminant score calculated by the discriminator; x is the source domain data; b is the batch label of the target domain; G(x,b) is the imitation target domain data transformed by the generator.

[0115] In this embodiment, the generator can not only calculate the discriminant score D of the input data src , and can predict the domain label D of the input data cls The goal of the discriminator is to maximize the adversarial loss, that is, to minimize the inverse of the adversarial loss. The formula of the discriminator loss function is:

[0116] For the input of batch labels, cross entropy is used to measure the difference between the predicted batch labels and the actual batch labels, which is calculated as follows: In the formula Batch label prediction loss for real data; b org is the source domain batch label; x real is the real source domain data; D cls (x real ) is the batch label of the source domain data predicted by the discriminator. The inventors of this application introduced the gradient penalty L in the discriminator. gp .

[0117] To sum up, the loss function of the discriminator is defined as: In the formula is the prediction loss of the real data The coefficient of λ pg is the gradient penalty coefficient; L gp is the gradient penalty.

[0118] In this embodiment, the target of the generator is the target domain label b of the input trg The source domain data x real Converted into simulated target domain data x fake , and expect to simulate data x fake is similar enough to the real data so that the discriminator cannot distinguish the real data x real and simulated data x fake , thus obtaining a higher discrimination score.

[0119] Specifically, the loss function formula of the generator is defined as: Among them, L G is the generator loss function; b is the batch label; G(x,b) is the imitation data transformed by the generator. During the transformation process, the generator can predict the batch label of the imitation data as the batch label of the target domain. The loss function of the batch label prediction of the imitation data is: In the formula Batch label prediction loss for fake data; b trg is the batch label of the target domain; G(x, b trg ) is the simulated target domain data transformed by the generator; D cls (G(x,b trg )) is the batch label of the imitation target domain data predicted by the discriminator.

[0120] It is worth noting that in order to ensure that the key target features are preserved in the transformed data, the generator needs to be cycle consistent. That is, the generator can reconstruct the simulated target domain data into the source domain data using the source domain labels. The cycle consistency loss is calculated as the absolute difference between the source domain data and the reconstructed data. The cycle consistency loss function is: Where L rec is a cycle-consistent loss function; G(G(x, b trg ), b org ) is the generator that reconstructs the imitated target domain data into the source domain data according to the source domain label.

[0121] To sum up, the loss function of the generator is: Where λ rec is the coefficient of reconstruction loss; is the coefficient of the discriminator's prediction loss for the domain labels of the forged data.

[0122] Preferably, in the process of correcting batch effects between single-cell data of different batches using a star-shaped generative adversarial network: pre-clustering is performed in the target batch, and data from other batches are divided into cell clusters closest to the target batch, thereby obtaining cell type pre-labels for multiple batches of data.

[0123] Specifically, the distance between data of the same cell type in different batches is smaller than the distance between data of different cell types in the same batch. In other words, the differences between cell types are greater than the differences between batches. More preferably, after pre-clustering, multiple different cell clusters are obtained, and the center positions of the cell clusters are calculated based on the sample means of the multiple cell clusters.

[0124] In the process of this embodiment, according to Figure 4 It can be seen that a batch is selected as the target batch, multiple different cell clusters are obtained through pre-clustering, and the center positions of the cell clusters are calculated. For the data of the remaining batches, preferably, the distance between the samples of each batch and the center of the cell cluster of the target batch is calculated separately, and the data is divided into the cell clusters closest to the target batch by calculating the distance between the samples in each batch and the cluster center of the target batch.

[0125] By processing the distances between the cell clusters of the target batch and the cell clusters of the remaining batches and the cell clusters of the target batch, cell type pre-labels can be well obtained.

[0126] To reduce the impact of these cell type-inconsistent samples on the results, this application also assigns training weights to each sample based on its distance from the cell cluster center. That is, samples with consistent cell types from the target batch are necessarily closer to the nearest cluster in the target batch than samples with inconsistent cell types. Therefore, samples closer to the cluster center in the target batch are assigned a larger training weight, while samples farther away are assigned a smaller training weight.

[0127] Specifically, the sample distance of each batch is first standardized, and then the weight value is set between 0 and 1 by normalization. The calculation formula of the distance weight is: Where: d x∈B is the inverse of the distance between the samples in batch B and the cluster center of the target batch; μ B is d in batch B x∈B The mean of B is d in batch B x∈B The standard deviation of ; ε is a very small constant; For distance The minimum value of For distance The maximum value of .

[0128] Preferably, when the pre-label is obtained by pre-clustering, the pre-label is used as a reference label to constrain the generator and prevent the transformation process from changing the cell type of the data. The cell type pre-label obtained by the pre-clustering algorithm is used as a reference label to constrain the generator, and it is expected that the cell type labels predicted from the data before and after transformation are consistent with the cell type pre-label, thereby preventing the transformation process from changing the cell type of the data.

[0129] It is understandable that when converting single-cell data from different batches, the cell types in the data are unknown. In this case, the data may be randomly mapped to other cell types in the data distribution space of the target batch, resulting in incorrect correction.

[0130] Furthermore, according to other embodiments of the present application, the discriminator's goal is to determine whether the data is real data and predict the batch label of the data. Therefore, the cell type recognition model is inconsistent with the recognition goal of the discriminator and cannot share network parameters with the discriminator.

[0131] Preferably, when the pre-labels are obtained by pre-clustering, a cell type recognition model is separately constructed to predict the cell type labels of the data. The prediction results are converted into probability vectors of the corresponding clusters using a softmax algorithm, which is defined as: The cell type recognition model uses cross entropy as the loss function, which is defined as: In the above two definitions, c is the cell type pre-label obtained by the pre-clustering algorithm; C(x) is the prediction result of the cell type recognition model.

[0132] It's worth noting that the cell type recognition model is similar to the discriminator. Both models directly access real data and pass predictions to the generator. The generator adjusts network parameters based on the predictions. Therefore, the cell type recognition model uses the same training method as the discriminator and is trained simultaneously with it.

[0133] In summary, in the discriminator, the cell type recognition model needs to predict the cell type of the real data and expects the predicted label of the real data to be consistent with the pre-label. In the generator, the generator expects the simulated data after the model conversion to retain the original cell type characteristics. The generator also expects the cell type recognition model's predicted label for the simulated data to be consistent with the pre-label result. The final loss function of the discriminator and generator is:

[0134] Where, is the final loss function of the discriminator; is the final loss function of the generator; L D is the discriminator adversarial loss; L G Adversarial loss for the generator; The batch label prediction loss for real data; Batch label prediction loss for real data The coefficient of Predicting the cell type labels for real data; Prediction loss for cell type labels of real data The coefficient of L gp is the gradient penalty; pg is the gradient penalty coefficient; The batch label prediction loss for the fake data; Batch label prediction loss for fake data The coefficient of Predicting loss for cell type labels of artificial data; Predicting loss for cell type labels of artificial data The coefficient of L rec is the cycle consistency loss; λ rec is the cycle consistency loss Lrec In this embodiment, the coefficient of and are all set to 1. and are all set to 0.5, λ pg Set to 10, λ rec Set to 10.

[0135] Although different specific embodiments are mentioned in this application, this application is not limited to the situations described in industry standards or embodiments. Some industry standards or slightly modified implementations based on customized methods or implementations described in the embodiments can also achieve the same, equivalent, or similar implementation effects as the above embodiments, or predictable implementation effects after modification. Examples that apply these modified or modified data acquisition, processing, output, judgment methods, etc. can still fall within the scope of optional implementation schemes of this application.

[0136] Although the present application has been described through embodiments, those skilled in the art will appreciate that there are many modifications and variations to the present application without departing from the spirit of the present application. It is intended that the appended embodiments include these modifications and variations without departing from the present application.

Claims

1. A single-cell data batch effect correction method based on generative adversarial networks, characterized by: The method comprises: Sequencing the single-cell data to obtain a high-dimensional single-cell gene expression count matrix; The high-dimensional single-cell gene expression count matrix is ​​computationally learned based on a recognition model using variational inference to approximate the posterior distribution, and the potential low-dimensional representation distribution is approximated using randomly generated Gaussian noise and the distribution mean and distribution variance of the high-dimensional single-cell data to obtain an approximate low-dimensional representation vector; Reconstructing the low-dimensional representation vector based on a generative model to obtain single-cell reconstructed raw data; When the generative model reconstructs the low-dimensional representation vector, a batch label is added to the low-dimensional representation vector to remove the batch effect; In the process of obtaining the approximate low-dimensional representation vector: Based on the star-shaped generative adversarial network, a target batch is selected from multiple batches of the single-cell data, and the single-cell data of the remaining batches are uniformly mapped to the data distribution space of the target batch through the generator, thereby correcting the batch effect between the single-cell data of different batches; The generator in the generative adversarial network is incorporated into the recognition model to generate a new generative model, and the new generative model is used to discriminate the high-dimensional single-cell gene expression count matrix and the single-cell reconstructed raw data, thereby improving the ability of the generative model to reconstruct data.

2. The method for correcting batch effects of single-cell data based on generative adversarial networks according to claim 1, characterized in that: The process of reconstructing the low-dimensional representation vector includes: Single-cell data are fitted by a negative binomial distribution, and dropout events are fitted using a zero-inflated model, thereby reducing the probability of dropout events and reducing the deviation between the single-cell reconstructed original data and the single-cell data.

3. The single-cell data batch effect correction method based on generative adversarial network according to claim 2, characterized in that The process of fitting the single cell data based on the zero-inflated model and the negative binomial distribution model includes: The negative binomial distribution model is divided into cases where dropout events occur and cases where no dropout events occur. The generative model is then used to fit the three parameters of the zero-inflated and negative binomial distribution models respectively: the probability of a dropout event, the dispersion of the negative binomial distribution, and the expression mean.

4. The method for correcting batch effects of single-cell data based on generative adversarial networks according to claim 1, characterized in that: The process of the discriminator in the generative adversarial network performing the discrimination includes: The generator in the generative adversarial network updates the network parameters according to the score of the discriminator, thereby generating the single-cell reconstructed original data that is close to the real single-cell data.

5. The method for correcting batch effects of single-cell data based on generative adversarial networks according to claim 1, characterized in that In the process of correcting the batch effect between different batches of the single-cell data by the star-shaped generative adversarial network: Pre-clustering is performed in the target batch, and data from other batches are divided into cell clusters closest to the target batch, thereby obtaining cell type pre-labels for multiple batches of data.

6. The method for correcting batch effects of single-cell data based on generative adversarial networks according to claim 5, characterized in that: After the pre-clustering, a plurality of different cell clusters are obtained, and then the center positions of the cell clusters are calculated based on the sample means in the plurality of cell clusters.

7. The method for correcting batch effects of single-cell data based on generative adversarial networks according to claim 6, characterized in that: When processing the remaining batches of data, the distance between each batch of samples and the center of the cell cluster of the target batch is calculated separately, and the data is divided into the cell cluster of the target batch that is closest to the sample.

8. The method for correcting batch effects of single-cell data based on a generative adversarial network according to claim 7, characterized in that: When the pre-labels are obtained through the pre-clustering, the pre-labels are used as reference labels, thereby constraining the generator and preventing the conversion process from changing the cell type of the data.

9. The method for correcting batch effects of single-cell data based on a generative adversarial network according to claim 8, characterized in that: When the pre-labels are obtained through the pre-clustering, a cell type recognition model is separately constructed to predict the cell type labels of the data.

Citation Information

Patent Citations

  • Cell type identification method aiming at single cell chromatin open sequencing data

    CN114913923A

  • GANs for Latent Space Visualizations

    US20220319675A1