Single-gene perturbation prediction and classification method and system based on contrastive learning
Patent Information
- Application Number
- CN202611055376.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-09
AI Technical Summary
[0005]鉴于上述的分析,本发明实施例旨在提供一种基于对比学习的单基因扰动预测和分类方法及系统,用以解决现有技术中基因扰动预测依赖实际实验而导致预测成本高、预测效率低的问题,以及缺少扰动条件识别机制的问题
[0016]与现有技术相比,本发明至少可实现如下有益效果之一:
Smart Images

Figure CN122889061A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gene data expression technology, and in particular to a method and system for predicting and classifying single-gene perturbations based on contrastive learning. Background Technology
[0002] Gene interference experiments are an important means of revealing gene function and regulatory mechanisms, but traditional experimental procedures are complex, costly, and time-consuming, making them difficult to carry out on a large scale.
[0003] With the development of artificial intelligence and single-cell omics, researchers have begun to use machine learning models to predict cellular transcriptomic responses to gene perturbations, constructing "virtual cells" in a virtual environment to learn the mapping relationship between gene expression and perturbation. This method can simulate real perturbation effects without actual experiments, significantly reducing experimental costs and time. However, the current model prediction accuracy is still insufficient, lacking a perturbation classification mechanism based on virtual cells to accurately distinguish gene expression patterns under different perturbation conditions. Accurate identification of different perturbation conditions is key to improving the model's biological explanatory power and can provide important computational support for gene regulation research, drug target screening, and personalized medicine.
[0004] Therefore, there is an urgent need for a method and system for single-gene perturbation prediction and classification based on contrastive learning, which enables efficient and low-cost prediction of virtual gene perturbation experiments and accurate identification of cellular perturbation conditions. Summary of the Invention
[0005] In view of the above analysis, the present invention aims to provide a single-gene perturbation prediction and classification method and system based on contrastive learning, in order to solve the problems of high prediction cost and low prediction efficiency caused by gene perturbation prediction relying on actual experiments in the prior art, as well as the lack of perturbation condition identification mechanism.
[0006] On one hand, embodiments of the present invention provide a single-gene perturbation prediction and classification method based on contrastive learning, including: Obtain the target raw transcriptome and the corresponding single-gene perturbation condition or target perturbation transcriptome; Feature mapping is performed on the target original transcriptome and the corresponding single-gene perturbation condition or the target perturbation transcriptome to obtain the corresponding target original gene expression vector, perturbation feature vector or target perturbation gene expression vector; Based on the target original gene expression vector and the corresponding perturbation feature vector, the perturbation prediction branch of the trained prediction-classification model is used to perform perturbation prediction to obtain the corresponding predicted perturbation transcriptome. Alternatively, based on the expression vector of the target perturbation gene, the perturbation condition can be classified using the perturbation classification branch of the trained prediction-classification model to determine the predicted perturbation condition corresponding to the target perturbation transcriptome.
[0007] Further, the perturbation prediction branch includes an inference network layer and a generation network layer; based on the target original gene expression vector and the corresponding perturbation feature vector, perturbation prediction is performed using the perturbation prediction branch of the trained prediction-classification model to obtain the corresponding predicted perturbation transcriptome, including: The target original gene expression vector and the corresponding perturbation feature vector are input into the inference network layer for latent vector extraction to generate the corresponding target latent vector. The target latent vector is input into the generator network layer for vector reconstruction to generate the corresponding predicted perturbation transcriptome.
[0008] Further, the perturbation prediction branch and the perturbation classification branch, after training, are obtained through the following steps: A training sample dataset comprising multiple collection batches of sample cells is obtained; wherein, the sample cells include unperturbed sample cells and perturbed sample cells; the training sample dataset includes the sample transcriptome corresponding to each unperturbed sample cell, the sample transcriptome corresponding to each perturbed sample cell, and the single-gene perturbation condition; Based on the transcriptome corresponding to each sample cell, all sample cells in each collection batch are matched to determine several sample cell groups; wherein, each sample cell group includes the sample undisturbed cells and several sample perturbed cells that were successfully matched; Batch effect correction is performed on the training sample dataset based on all the sample cell groups to obtain the corresponding corrected sample dataset; wherein, the corrected sample dataset includes the corrected transcriptome corresponding to each of the sample cells; The perturbation prediction branch and the perturbation classification branch are trained using the calibration sample dataset to obtain the trained perturbation prediction branch and the perturbation classification branch.
[0009] Furthermore, based on the transcriptome corresponding to each sample cell, all sample cells in each collection batch are matched to determine several sample cell groups, including: Each unperturbed cell in the sample and the transcriptome corresponding to the perturbed cell in the sample are mapped into a compact feature vector; For each collection batch, the sample cell group is determined by matching the compact feature vectors corresponding to all undisturbed cells and the perturbed cells in the sample.
[0010] Further, the sample cell group is determined by matching the compact feature vectors corresponding to all undisturbed cells and the perturbed cells of the sample, including: For each of the sample perturbed cells, calculate the cell similarity between the compact feature vector corresponding to the sample perturbed cell and the compact feature vector corresponding to each of the sample undisturbed cells; For each of the sample perturbed cells, the sample undisturbed cells that are successfully matched with the corresponding perturbed cells are determined based on the similarity of all the cells in the sample. Each sample's unperturbed cells and all the corresponding successfully matched perturbed cells constitute the sample cell group.
[0011] Further, batch effect correction is performed on the training sample dataset based on all the said sample cell groups to obtain the corresponding corrected sample dataset, including: Based on the cell groups of all the collected batches, all the sample cells are clustered to determine the anchor cells; Calculate the batch offset for each collection batch based on the sample transcriptome corresponding to the anchor cells; For each sample cell, the sample transcriptome is corrected by batch offset based on the corresponding batch offset to obtain the corrected transcriptome for each sample cell.
[0012] Further, the perturbation prediction branch that has been trained is obtained through the following steps: For each of the sample perturbed cells, the corresponding single-gene perturbing condition and the corrected transcriptome corresponding to the successfully matched sample unperturbed cells are input into the prediction-classification model to obtain the predicted perturbed transcriptome corresponding to the sample perturbed cells; The perturbation prediction branch is trained based on the corrected transcriptome and the predicted perturbation transcriptome corresponding to all the sample perturbation cells to obtain the trained perturbation prediction branch.
[0013] Furthermore, the training sample dataset also includes single-gene perturbation conditions corresponding to each perturbed cell in the sample; the perturbation classification branch after training is obtained through the following steps: Based on the single-gene perturbation condition corresponding to each of the sample perturbation cells, determine the corresponding positive sample cell and negative sample cell sets from all the sample perturbation cells in the calibration sample dataset; Using classification loss function and contrastive loss function, the perturbation classification branch is trained based on all the perturbation cells of the samples and the corresponding sets of positive and negative sample cells, to obtain the trained perturbation classification branch.
[0014] Furthermore, the contrastive loss function is expressed as: In the formula, Indicates the first The normalized expression feature vectors corresponding to the disturbed cells in the sample. Indicates the first The normalized expression feature vector corresponding to the positive sample cell for each of the perturbed sample cells. Indicates the first The set of negative sample cells corresponding to the nth sample perturbation cell is the nth sample perturbation cell. The normalized expression feature vector corresponding to each of the sample perturbed cells. Indicates the temperature coefficient. Indicates the first The number of sample perturbation cells in the negative sample cell set corresponding to each sample perturbation cell.
[0015] On the other hand, embodiments of the present invention provide a single-gene perturbation prediction and classification system based on contrastive learning, comprising: The cell acquisition module is used to acquire the target raw transcriptome and the corresponding single-gene perturbation condition or target perturbation transcriptome; The cell processing module is used to perform feature mapping on the target original transcriptome and the corresponding single-gene perturbation condition or the target perturbed transcriptome to obtain the corresponding target original gene expression vector, perturbation feature vector or target perturbed gene expression vector. The perturbation prediction module is used to perform perturbation prediction based on the target original gene expression vector and the corresponding perturbation feature vector, using the perturbation prediction branch of the trained prediction-classification model, to obtain the corresponding predicted perturbation transcriptome. The perturbation classification module is used to classify perturbation conditions based on the expression vector of the target perturbation gene using the perturbation classification branch of the trained prediction-classification model, and to determine the predicted perturbation conditions corresponding to the target perturbation transcriptome.
[0016] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects: 1. Utilizing the perturbation prediction branch of the trained prediction-classification model, perturbation simulation is performed on the target original transcriptome based on single-gene perturbation conditions, and corresponding predicted perturbation transcriptomes are generated. This achieves efficient and low-cost virtual gene perturbation experiment prediction, and completes the simulation prediction of the cellular transcriptome response caused by single-gene perturbation. It can generate perturbation transcriptomes that are highly consistent with the real perturbation without the need for actual experiments, so as to analyze the impact of single-gene perturbation on transcriptome changes, thereby significantly reducing experimental costs and cycle time.
[0017] 2. By utilizing the perturbation classification branch of the trained prediction-classification model, perturbation conditions are classified based on the target perturbation transcriptome, achieving accurate identification of cellular perturbation conditions; by training the perturbation classification branch through contrastive learning, the accuracy of perturbation condition identification is effectively improved.
[0018] 3. By matching sample cells in the training sample dataset, the sample cell groups are determined, and batch effect correction is completed. This effectively distinguishes cell differences caused by batch noise and perturbation conditions, achieving accurate correction between different collection batches of the training sample dataset. The correction sample dataset is then used to train the prediction-classification model, enabling the prediction-classification model to more accurately identify transcriptomic changes caused by perturbation conditions and the differences between transcriptomic changes caused by different perturbation conditions. This improves the accuracy of the predicted perturbation transcriptome generated by the perturbation prediction branch performing perturbation simulation and the accuracy of the predicted perturbation conditions determined by the perturbation classification branch performing perturbation condition classification.
[0019] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0020] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Figure 1 This is a flowchart illustrating a single-gene perturbation prediction and classification method based on contrastive learning in an embodiment of the present invention. Figure 2 This is a schematic diagram of the main modules of a single-gene perturbation prediction and classification system based on contrastive learning in an embodiment of the present invention. Detailed Implementation
[0021] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0022] A specific embodiment of the present invention discloses a single-gene perturbation prediction and classification method based on contrastive learning, such as... Figure 1 As shown, it includes: Step S1: Obtain the target original transcriptome and the corresponding single-gene perturbation condition or target perturbation transcriptome.
[0023] The target original transcriptome and the corresponding single-gene perturbation conditions or the current perturbation transcriptome are obtained. In this embodiment, the original transcriptome is a single-cell transcriptome. The target original transcriptome and the corresponding single-gene perturbation conditions are obtained through step S11, or the target perturbation transcriptome is obtained through step S12.
[0024] Step S11: Obtain the target original transcriptome and the corresponding single-gene perturbation conditions.
[0025] In this embodiment, the target original transcriptome is characterized by a gene expression matrix consisting of each gene and the total number of UMIs corresponding to each gene in a real or virtual cell to be perturbed, which can be obtained through relevant biological experiments in the prior art and used as the target original transcriptome. In other embodiments, the reference genome sequence corresponding to the cell to be perturbed can be queried through the authoritative NCBI RefSeq or Ensembl professional databases and used as the target original transcriptome. Alternatively, the target original transcriptome can be obtained by simulating virtual cells using virtual cell generation technology in the prior art, including each gene and the total number of UMIs corresponding to each gene.
[0026] In this embodiment, the single-gene perturbation condition refers to a certain perturbation operation that needs to be simulated, such as knockout of the target gene, mutation of the target gene, or overexpression of the target gene, which can be set according to the needs of perturbation simulation.
[0027] Step S12: Obtain the target perturbed transcriptome.
[0028] In this embodiment, the target original transcriptome and the corresponding target perturbed transcriptome are obtained through any one of steps S121 and S122.
[0029] Step S121: Obtain multiple target transcriptomes and identify the target perturbed transcriptome.
[0030] In this embodiment, multiple target transcriptomes are obtained, each characterized by a gene expression matrix. Simultaneously, perturbation tags corresponding to each target transcriptome are obtained, including both unperturbed and perturbed tags. Each target transcriptome with a perturbed tag is designated as a target perturbed transcriptome.
[0031] In other embodiments, if a perturbation tag corresponding to each target transcriptome is not obtained while multiple target transcriptomes are obtained, then each target transcriptome is treated as a target perturbation transcriptome.
[0032] Step S122: Obtain the target unperturbed cells or the target original transcriptome, and perform perturbation treatment based on the target unperturbed cells or the target original transcriptome to obtain the corresponding target perturbed transcriptome.
[0033] In this embodiment, a real or virtual target undisturbed cell is obtained, and then the corresponding target raw transcriptome is obtained. The principle is the same as that of obtaining the cell to be disturbed and the target raw transcriptome in step S11, and will not be repeated here.
[0034] After subjecting unperturbed target cells to a certain perturbation treatment, corresponding perturbed target cells are obtained, wherein the perturbation conditions are unknown. The gene expression matrix corresponding to the perturbed target cells is obtained through relevant biological experiments in existing technologies, serving as the perturbed target transcriptome. The perturbation treatment of the unperturbed target cells can be a real experiment or can utilize other existing models that simulate perturbation.
[0035] In other embodiments, the target raw transcriptome is obtained, and the cells corresponding to the target raw transcriptome are queried in reverse using NCBI RefSeq (a highly authoritative database) and Ensembl professional database. These cells are then used as the target unperturbed cells and perturbed to obtain the corresponding target perturbed transcriptome.
[0036] In other embodiments, a corresponding target perturbation transcriptome can also be generated based on the target original transcriptome using other models of simulated perturbation in the prior art.
[0037] Step S2: Perform feature mapping on the target original transcriptome and the corresponding single-gene perturbation condition or the target perturbed transcriptome to obtain the corresponding target original gene expression vector, perturbation feature vector or target perturbed gene expression vector.
[0038] Feature mapping is performed on the target original transcriptome and the corresponding single-gene perturbation condition or the target perturbed transcriptome to obtain the corresponding target original gene expression vector, perturbation feature vector, or target perturbed gene expression vector. In this embodiment, the prediction-classification model includes a cell processing branch. The cell processing branch performs feature mapping on the target original transcriptome and the corresponding single-gene perturbation condition to obtain the corresponding target original gene expression vector and perturbation feature vector, specifically including step S21. Alternatively, the cell processing branch performs feature mapping on the target perturbed transcriptome to obtain the corresponding target perturbed gene expression vector, specifically including step S22.
[0039] Step S21: Input the target original transcriptome and single-gene perturbation conditions into the cell processing branch for feature mapping to obtain the corresponding target original gene expression vector and perturbation feature vector.
[0040] In this embodiment, the cell processing branch includes a cell processing layer and a condition processing layer. The target original transcriptome is input into the cell processing layer, and the corresponding target original gene expression vector is obtained through step S211. The single gene perturbation condition is input into the condition processing layer, and the corresponding perturbation feature vector is obtained through step S212.
[0041] Step S211: Input the target raw transcriptome into the cell processing layer for feature extraction to generate the corresponding target raw gene expression vector.
[0042] In this embodiment, the cell processing layer includes a feature extraction module. The target original transcriptome is input into the cell processing layer, and the feature extraction module is used to extract features to generate a compact feature vector corresponding to the target original transcriptome, including step S2111.
[0043] Step S2111: Use the feature extraction module to extract features from the target raw transcriptome and generate the corresponding compact feature vector.
[0044] The feature extraction module is used to extract features from the target raw transcriptome to obtain the corresponding compact feature vector. In this embodiment, the feature extraction module is built based on the SE (State Encoder) model trained on large-scale single-cell data. For example, the State Embedding Model (SE) module of the STATE architecture is used as the SE model.
[0045] First, the gene expression matrix of the target raw transcriptome is standardized based on the standard UMI total number to obtain a standardized expression matrix. This completes the normalization process of the target raw transcriptome, eliminating the influence of uneven cell sequencing depth. For example, the standardized expression matrix... The matrix elements are represented as In the formula, The first gene expression matrix represents the... The nth matrix element, i.e., the nth matrix element The total number of UMIs corresponding to each gene This represents the total number of genes in the gene expression matrix. This represents the total number of standard UMIs, which can be set based on experience, for example... .
[0046] Secondly, the normalized expression matrix is logarithmically compressed using the `log1p` function in Python to obtain the corresponding compressed expression matrix. This eliminates the influence of numerical ranges, ensuring a balanced contribution from all genes and correcting the extreme rightward skewness of the single-cell normalized expression matrix. This mitigates the dominant role of highly expressed genes in the analysis, making the expression data closer to a normal distribution. This step not only reduces the influence of extreme values but can also be used for sample cell processing, ensuring that gene expression values under different perturbation conditions are on the same order of magnitude. This makes downstream analyses (such as cell clustering, perturbation effect comparison, or differential expression analysis) more reliable and consistent.
[0047] Then, based on the ordered list of Highly Variable Genes (HVG gene list) obtained from SE model training, expression values are extracted from the compressed expression matrix to obtain the corresponding high-dimensional expression vector. For example, the HVG gene list obtained during training includes 2048 highly expressed genes. The compressed expression matrix and the HVG gene list are compared and sorted one by one according to gene name. Following the gene order in the HVG gene list, for each gene in the HVG gene list, if a gene in the compressed expression matrix is identical to that gene in the HVG gene list, the corresponding matrix element is retained as the gene expression value at that position. If no gene in the compressed expression matrix is identical to that gene in the HVG gene list, the corresponding gene expression value is set to 0. If a gene in the compressed expression matrix is completely different from any gene in the HVG gene list, the corresponding matrix element is removed. All gene expression values are combined to form a vector consistent with the gene order in the HVG gene list, which serves as the high-dimensional expression vector corresponding to the target transcriptome.
[0048] Finally, the high-dimensional expression vector corresponding to the target original transcriptome is input into the SE model, and the Transformer encoder of the SE model is used for feature extraction. The high-dimensional expression vector is mapped to a low-dimensional latent space to obtain a latent vector representation (state embedding) that can characterize the physiological state of the cell. This latent vector is used as a compact feature vector corresponding to the target original transcriptome, so as to efficiently represent the overall expression pattern of the target original transcriptome in a low-dimensional feature space. For example, the 2048-dimensional high-dimensional expression vector of the target original transcriptome is mapped to a 256-dimensional compact feature vector.
[0049] In this embodiment, the compact feature vector corresponding to the target original transcriptome is directly used as the target original gene expression vector.
[0050] In other embodiments, the cell processing layer further includes a batch correction module, and after step S2111, it further includes: S2112: Use the batch correction module to perform batch offset correction on the compact feature vector corresponding to the target original transcriptome, and use the corrected compact feature vector as the target original gene expression vector.
[0051] The batch offset correction module is used to perform batch offset correction on the compact feature vector corresponding to the target original transcriptome. The corrected compact feature vector is then used as the target original gene expression vector. For example, In the formula, This represents the compact feature vector before correction corresponding to the target original transcriptome. This represents the corrected compact feature vector corresponding to the target original transcriptome, i.e., the target original gene expression vector. This indicates the batch offset corresponding to the target original transcriptome.
[0052] In this embodiment, the batch offset corresponding to each collection batch is determined during the prediction-classification model training process, and the corresponding batch offset is found based on the collection batch label corresponding to the target original transcriptome.
[0053] In other embodiments, during the prediction-classification model training process, the batch offset corresponding to each collection batch and each cell subtype is determined. Based on the collection batch label and cell subtype corresponding to the target original transcriptome, the corresponding batch offset is found. The cell subtype to which the target original transcriptome belongs can be obtained simultaneously when acquiring the target original transcriptome, or it can be calculated based on the compact feature vector corresponding to the target original transcriptome and the compact feature vector corresponding to each anchor cell. The cell subtype of the anchor cell corresponding to the maximum cell similarity is taken as the cell subtype to which the target original transcriptome belongs.
[0054] By extracting features from the target raw transcriptome through the cell processing layer, single-cell transcriptome data from different sequencing batches and under gene perturbation conditions can be standardized and feature consistency processed, thereby constructing a highly comparable and structurally unified "virtual cell" representation. Through the SE model, a compact feature vector that can characterize the physiological state of the cell is obtained, realizing efficient representation of the overall expression pattern of each cell in a low-dimensional feature space.
[0055] Step S212: Input the single-gene perturbation condition into the condition processing layer for feature encoding to generate the corresponding perturbation feature vector.
[0056] In this embodiment, the single-gene perturbation condition includes the target gene and the perturbation operation type on the target gene. The single-gene perturbation condition corresponding to the cell to be perturbed is feature-encoded to generate the corresponding perturbation feature vector.
[0057] First, the target gene is one-hot encoded to obtain the corresponding perturbation target encoding vector.
[0058] One-hot encoding of the target gene yields the corresponding perturbation target encoding vector. For example, operable target genes include... The species is determined by its length. The vector represents the perturbation target coding vector. For example, the operable target genes include four types: TP53, EGFR, PTEN, and MYC. If the target gene included in the single-gene perturbation condition is TP53, then the corresponding perturbation target coding vector is... .
[0059] Secondly, the perturbation operation type is vectorized to obtain the corresponding perturbation operation encoding vector.
[0060] The perturbation operation types are vectorized to obtain the corresponding perturbation operation encoding vectors. In this embodiment, the perturbation operations that can be performed include gene knockout (KO), gene mutation (MUT), and overexpression (OE). The input condition processing layer includes an embedding layer, and embedding technology is used to vectorize the perturbation operation types included in the single-gene perturbation conditions to generate the corresponding perturbation operation encoding vectors.
[0061] Then, the perturbation target encoding vector and the perturbation operation encoding vector are concatenated to form the perturbation feature vector.
[0062] The perturbation target encoding vector and the perturbation operation encoding vector are concatenated dimensionally to form the perturbation feature vector corresponding to the single gene perturbation condition. In this embodiment, the perturbation feature vector is stored as a Vector.
[0063] Step S22: Input the target perturbation transcriptome into the cell processing branch for feature mapping to obtain the corresponding target perturbation gene expression vector.
[0064] The target perturbation transcriptome is input into the cell processing branch for feature mapping to obtain the corresponding target perturbation gene expression vector. It can be understood that the target perturbation transcriptome can be processed in the same way as the target original transcriptome to obtain the corresponding target perturbation gene expression vector. The principle is the same as step S211, and will not be repeated here.
[0065] It should be noted that if step S1 obtains the target original transcriptome and the corresponding single-gene perturbation conditions, then step S21 is followed to obtain the corresponding target original gene expression vector and perturbation feature vector. Then, step S3 is performed, based on the perturbation feature vector corresponding to the single-gene perturbation conditions, using the perturbation prediction branch of the prediction-classification model to perform perturbation simulation prediction on the target original gene expression vector corresponding to the target original transcriptome, to obtain the corresponding predicted perturbation transcriptome. If step S1 obtains the target perturbation transcriptome, then step S22 is followed to obtain the corresponding target perturbation gene expression vector. Then, step S3 is performed, based on the target perturbation gene expression vector corresponding to the target perturbation transcriptome, using the perturbation classification branch of the prediction-classification model to perform perturbation condition classification on the target perturbation gene expression vector corresponding to the target perturbation transcriptome, to achieve accurate identification of cell perturbation conditions. If step S1 obtains the target original transcriptome and the corresponding single-gene perturbation conditions, as well as the target perturbed transcriptome, then step S2 obtains the corresponding target original gene expression vector, perturbation feature vector, and target perturbed gene expression vector. Then, step S3 is entered based on the target original gene expression vector and the perturbation feature vector, and step S4 is entered based on the target perturbed gene expression vector.
[0066] Step S3: Based on the target original gene expression vector and the corresponding perturbation feature vector, perform perturbation prediction using the perturbation prediction branch of the trained prediction-classification model to obtain the corresponding predicted perturbation transcriptome.
[0067] Based on the target original gene expression vector and the corresponding perturbation feature vector, the perturbation prediction branch is used to perform perturbation prediction to obtain the corresponding predicted perturbation transcriptome. In this embodiment, during the training process of the prediction-classification model, the perturbation prediction branch learns the nonlinear mapping relationship between gene expression and perturbation conditions. The target original gene expression vector and perturbation feature vector are input into the perturbation prediction branch to perform perturbation prediction and generate the corresponding predicted perturbation transcriptome, thereby realizing high-dimensional prediction from the target original transcriptome, single-gene perturbation conditions to the predicted perturbation transcriptome.
[0068] In this embodiment, the perturbation prediction branch adopts the CAVE model (Conditional Variational AutoEncoder). The trained perturbation prediction branch includes an inference network layer and a generation network layer. Step S3 obtains the predicted perturbation transcriptome through steps S31-S32.
[0069] Step S31: Input the target original gene expression vector and the corresponding perturbation feature vector into the inference network layer to extract latent vectors and generate the corresponding target latent vectors.
[0070] The target original gene expression vector and perturbation feature vector are input into the inference network layer for latent vector extraction, generating the corresponding target latent vector.
[0071] First, the original target gene expression vector and the perturbation feature vector are concatenated to obtain the total inference vector. This total inference vector is then input into multiple fully connected layers of the inference network for layer-by-layer dimensionality reduction mapping, outputting two low-dimensional vectors of the same dimension: the latent distribution mean and the log-variance. The dimension of the low-dimensional vector can be set empirically or determined during training.
[0072] Secondly, the target latent vector is calculated based on the random noise and the latent distribution mean and log-variance. For example, standard normal noise is used for the random noise, and the target latent vector is expressed as... In the formula, Represents the total inference vector The corresponding target latent vector, Represents the total inference vector The corresponding hidden distribution mean, Represents the total inference vector The corresponding log-variance, This represents standard normal noise. , Represents a unit vector. The noise dimension is the same as the dimension of the latent distribution mean. Indicates a normal distribution. This indicates element-wise multiplication. Represents the original gene expression vector of the target. This represents the perturbation eigenvector.
[0073] The inference network layer maps the input target original gene expression vector and perturbation feature vector to a latent representation, capturing the global features of the cell state (represented by the target original gene expression vector) and the perturbation pattern (represented by the perturbation feature vector) in the process.
[0074] Step S32: Input the target latent vector into the generator network layer for vector reconstruction to generate the corresponding predicted perturbation transcriptome.
[0075] The target latent vector is input into the generator network layer for vector reconstruction, generating the corresponding predicted perturbation transcriptome.
[0076] The target latent vector and the perturbation feature vector are concatenated in terms of dimensions to obtain the total generated vector. The total generated vector is then input into the multi-layer fully connected layers of the generator network for layer-by-layer dimensionality-increasing mapping to generate a fixed-dimensional prediction vector.
[0077] In this embodiment, the predicted vector dimension is set to be the same as the target original gene expression vector. The elements of the predicted vector are not actual UMI values. The generation network layer also includes a feature recovery layer. Based on the SE model of the cell processing layer, the predicted vector is inversely mapped to obtain a vector with the same number and order of genes as the HVG gene list, which serves as the corresponding predicted perturbation transcriptome. For example, if the HVG gene list includes 2048 sequentially arranged high-expression vectors, then the inverse mapping generates a 2048-dimensional vector.
[0078] In other embodiments, the prediction vector dimension can be set to be the same as the number of genes in the HVG gene list, and the vector elements are not actual UMI values. For example, the prediction vector dimension can be 2048 dimensions, and the vector elements can be inversely normalized according to the standard UMI total to obtain the corresponding predicted perturbed transcriptome. For example, Indicates the predicted perturbed transcriptome number 1 The total number of reconstructed UMIs corresponding to each gene Represents the first in the prediction vector vector elements, This represents the total number of standard UMIs. In other embodiments, the prediction vector dimension can be set to be the same as the number of genes in the HVG gene list, and each element of the prediction vector can be the actual UMI value.
[0079] By generating network layers and using target latent vectors to predict transcriptome response predictions under specific perturbation conditions (characterized by perturbation feature vectors), a mapping from perturbation conditions to high-dimensional gene expression profiles is achieved.
[0080] In other embodiments, the perturbation prediction branch employs a graph neural network (GNN) structure, comprising an MLP layer, multiple GNN convolutional layers, and multiple fully connected layers. Genes are used as graph nodes, and during the training of the prediction-classification model, the feature vector corresponding to each node and the connection relationships between nodes are determined to form an adjacency matrix. Step S3 obtains the predicted perturbation transcriptome through steps S33-S35.
[0081] Step S33: Input the target original gene expression vector and perturbation feature vector into the MLP layer for feature concatenation to generate the total convolution matrix.
[0082] The original target gene expression vector and the perturbation feature vector are concatenated dimensionally and then input into an MLP layer including a small MLP (Multilayer Perceptron) for transformation and fusion to generate a global representation. The global representation is replicated according to the number of graph nodes to form a global representation matrix. Then, the feature matrix formed by the feature vectors of all graph nodes is concatenated with the global representation matrix node by node to generate the total convolution matrix. For example, the total convolution matrix is represented as follows: In the formula, Indicates matrix concatenation. The feature matrix graph represents the feature vectors formed by the feature vectors of all graph nodes. Represents the target original gene expression vector and perturbation eigenvectors The corresponding global representation matrix, Indicates the number of nodes in the graph. The dimension of the feature vector of a graph node. This represents the dimension of the global representation. For example, if there are 15 nodes, each node has a 3-dimensional feature vector, and the global representation is a 10-dimensional vector, then the size of the global representation matrix is... The size of the feature matrix is The total size of the convolution matrix is .
[0083] Step S34: Input the total convolution matrix into a multi-layer GNN convolutional layer to aggregate neighborhood information and generate the corresponding deep node representation.
[0084] Based on the total convolutional matrix and adjacency matrix, convolutional processing is performed layer by layer. Neighbor message passing is completed according to edge connections, achieving neighborhood information aggregation. The features output by the last GNN convolutional layer are used as the representation of the corresponding deep nodes. For example, the features output by each layer are represented as follows: ,in, , The numbers represent the order of the numbers. GNN convolutional layer, the first Features output by the GNN convolutional layer Represents the adjacency matrix. This indicates convolution processing. It can be understood that the first GNN convolutional layer performs convolution based on the total convolution matrix and the adjacency matrix.
[0085] Step S35: Input the deep node representation into the multilayer fully connected layer for layer-by-layer dimensionality-increasing mapping to generate a fixed-dimensional prediction vector and determine the corresponding predicted perturbation transcriptome.
[0086] The deep node representations are input into a multi-layer fully connected layer for layer-by-layer dimensionality-increasing mapping to generate a fixed-dimensional prediction vector. In this embodiment, the prediction vector dimension is set to be the same as the target original gene expression vector, and the vector elements are not the actual UMI values. The perturbation prediction branch also includes a feature recovery layer, which performs inverse mapping on the prediction vector to obtain a vector with the same number and order of genes as the HVG gene list, which serves as the corresponding predicted perturbation transcriptome. In other embodiments, the prediction vector dimension can also be set to be the same as the number of genes in the HVG gene list, and the vector elements can be inversely normalized according to the standard UMI total to obtain the corresponding predicted perturbation transcriptome.
[0087] By inputting the target original gene expression vector and perturbation feature vector into the perturbation prediction branch based on a graph neural network structure, information is propagated through multi-layer graph convolution and neighbor node information is aggregated, thereby accurately identifying the correlation between gene expression-dependent structures and perturbation responses. Thanks to the strong expressive power of large models, this module can process large-scale single-cell data and effectively achieve high-dimensional prediction of complex perturbation effects, providing a solid computational foundation for cell state analysis, perturbation mechanism research, and intervention strategy design.
[0088] In other embodiments, gene completion can be performed on the predicted perturbation transcriptome based on the normalized expression matrix corresponding to the target original transcriptome to form a predicted perturbation complete transcriptome. For example, based on the normalized expression matrix and the predicted perturbation transcriptome, the total number of perturbation UMIs corresponding to each gene in the original transcriptome is determined, including: if the gene is a highly expressed gene, i.e., the gene exists in the HVG gene list, then the total number of UMIs corresponding to that gene is extracted from the predicted perturbation transcriptome as the total number of perturbation UMIs corresponding to that gene; if the gene is not a highly expressed gene, then the total number of UMIs corresponding to that gene is extracted from the normalized expression matrix corresponding to that gene in the original transcriptome as the corresponding total number of perturbation UMIs. A matrix is constructed according to the order of all genes included in the original transcriptome and the total number of perturbation UMIs corresponding to each gene to serve as the predicted perturbation complete transcriptome.
[0089] Furthermore, differential expression analysis can be performed between the predicted perturbed transcriptome and the target original transcriptome obtained in step S2 to compare the gene expression levels of the two groups and screen for genes with significantly upregulated or downregulated total UMIs, i.e., DEG differentially expressed genes. Pathway enrichment analysis can also be performed based on the differential expression analysis. Pathway cluster analysis can be performed on all DEG differentially expressed genes and their corresponding total UMIs to identify significantly upregulated and significantly repressed pathways. For example, based on gene domain knowledge, the genes included in each pathway can be determined. If the ratio of the sum of the total UMIs of all genes within a pathway in the predicted perturbed transcriptome to the sum of the total UMIs in the target original transcriptome is greater than 1.2, then the pathway is considered a significantly upregulated pathway.
[0090] Furthermore, the target original transcriptome and the predicted perturbation transcriptome obtained in step S3 can be input into the perturbation classification branch of the prediction-classification model to determine the corresponding prediction perturbation conditions. The reliability of the predicted perturbation transcriptome can be evaluated based on the consistency between the prediction perturbation conditions and the single-gene perturbation conditions.
[0091] Step S4: Based on the target perturbation gene expression vector, use the perturbation classification branch of the trained prediction-classification model to classify the perturbation conditions and determine the predicted perturbation conditions corresponding to the target perturbation transcriptome.
[0092] The expression vector of the target perturbation gene is input into the perturbation classification branch for perturbation condition classification, generating the predicted perturbation conditions corresponding to the target perturbation transcriptome. In this embodiment, the perturbation classification branch can be constructed using an MLP structure, a graph neural network structure, or other existing models with classification capabilities. During the training process of the prediction-classification model, the perturbation classification branch is trained based on contrastive learning, learning the gene expression model corresponding to the perturbation transcriptome under different perturbation conditions, enabling the trained perturbation classification branch to recognize different perturbation conditions.
[0093] Taking the perturbation classification branch using an MLP structure as an example, the trained perturbation classification branch includes a backbone MLP layer and a classification head. The target perturbation gene expression vector is input into the perturbation classification branch to obtain the corresponding predicted perturbation conditions. This involves: performing multi-layer linear + activation mapping and L2 normalization on the target perturbation gene expression vector through the embedding layer of the backbone MLP layer to obtain a normalized expression feature vector. This normalized expression feature vector is then input into the classification head, and the predicted probabilities for each perturbation condition category are obtained through the FC layer and the Softmax function of the classification head. In this embodiment, the perturbation condition category corresponding to the maximum predicted probability is selected as the predicted perturbation condition for the target perturbation transcriptome. For example, the perturbation condition categories are TP53-KO, EGFR-KO, EGFR-MUT, PTEN-MUT, and MYC-OE, with predicted probabilities of... Then the predicted perturbation condition is PTEN-MUT.
[0094] Furthermore, in this embodiment, the trained perturbation prediction branch and perturbation classification branch are obtained through steps A-D, which are used to implement steps S3 and S4. During the training process of the perturbation prediction branch and perturbation classification branch, the batch offset corresponding to each acquisition batch is determined, which is used to construct the cell processing branch.
[0095] Step A: Obtain a training sample dataset including multiple batches of sample cells; wherein, the sample cells include unperturbed sample cells and perturbed sample cells; the training sample dataset includes the sample transcriptome corresponding to each unperturbed sample cell, the sample transcriptome corresponding to each perturbed sample cell, and the single-gene perturbation condition.
[0096] A training sample dataset is obtained, comprising sample cells from multiple collection batches. The sample cells include unperturbed sample cells and perturbed sample cells. The training sample dataset includes the sample transcriptome corresponding to each unperturbed sample cell, the sample transcriptome corresponding to each perturbed sample cell, and the single-gene perturbation condition.
[0097] In this embodiment, various real or virtual cells and their corresponding perturbation tags and batch identifiers can be obtained. Cells with perturbation tags are designated as perturbed sample cells, and cells with unperturbed tags are designated as unperturbed sample cells. Furthermore, referring to step S1, the transcriptome corresponding to each sample cell is obtained as the sample transcriptome.
[0098] In other embodiments, transcriptomes corresponding to various real or virtual cells can be directly obtained as sample transcriptomes. A perturbation label and batch identifier for each transcriptome can be acquired, and a corresponding sample cell can be constructed for each sample transcriptome. It is understood that this is not the construction of physical sample cells, but rather a data differentiation or description for the training sample dataset. Sample cells constructed from sample transcriptomes with a perturbation label are designated as perturbed sample cells, and cells constructed from sample transcriptomes with an unperturbed label are designated as unperturbed sample cells.
[0099] Step B: Based on the sample transcriptome corresponding to each sample cell, match all sample cells in each collection batch to determine several sample cell groups; wherein, each sample cell group includes the sample undisturbed cells and several sample perturbed cells that were successfully matched.
[0100] Based on the transcriptome corresponding to each sample cell, all sample cells in each collection batch are matched to determine several sample cell groups. Each sample cell group includes undisturbed sample cells and several successfully matched disturbed sample cells, specifically including steps B1-B2.
[0101] Step B1: Map each sample unperturbed cell and the sample transcriptome corresponding to the sample perturbed cells into a compact feature vector.
[0102] The transcriptome of each sample's undisturbed cells and the sample's perturbed cells is mapped to a compact feature vector. The specific principle is the same as in step S2111, and will not be repeated here.
[0103] Step B2: For each collection batch, the sample cell group is determined by matching the compact feature vectors corresponding to all undisturbed cells and perturbed cells in the sample.
[0104] For each collection batch, the sample cell group corresponding to the collection batch is determined by matching the compact feature vectors corresponding to all undisturbed cells and perturbed cells in the collection batch, specifically including steps B21-B23.
[0105] Step B21: For each of the sample perturbed cells, calculate the cell similarity between the compact feature vector corresponding to the sample perturbed cell and the compact feature vector corresponding to each of the sample unperturbed cells.
[0106] For each perturbed cell in a sample, the cell similarity is calculated between the compact feature vector corresponding to the perturbed cell and the compact feature vector corresponding to the unperturbed cell in each sample. In this embodiment, for each perturbed cell, the cosine similarity function is used to calculate the cosine similarity between the compact feature vector corresponding to the perturbed cell and the compact feature vector corresponding to the unperturbed cell in each sample, and this cosine similarity is used as the corresponding cell similarity. In other embodiments, Euclidean distance or other methods can also be used to characterize cell similarity.
[0107] For example, the first The sample of disturbed cells and the first The cosine similarity of the unperturbed cells in each sample is represented as follows: In the formula, Indicates the first The compact feature vector corresponding to each sample perturbed cell Indicates the first The compact feature vector corresponding to each sample of undisturbed cells The Euclidean norm of a vector.
[0108] Step B22: For each of the sample perturbed cells, determine the sample unperturbed cells that are successfully matched with the sample perturbed cells based on the corresponding similarity among all the cells.
[0109] For each sample perturbed cell, the sample undisturbed cells that are successfully matched with the sample perturbed cell are determined based on the similarity of all corresponding cells. In this embodiment, for each sample perturbed cell, the maximum value is selected from all cell similarities corresponding to the sample perturbed cell, and the sample perturbed cell corresponding to the maximum value is taken as the sample undisturbed cell that is successfully matched with the sample perturbed cell.
[0110] Furthermore, if the maximum similarity of all cells is lower than the similarity threshold (e.g., 0.85), a low confidence level can be indicated. Alternatively, a known original transcriptome can be selected as the sample undisturbed cells to expand the training sample dataset. Then, the sample undisturbed cells are re-matched to re-determine the successfully matched sample undisturbed cells. The known original transcriptome can be the transcriptome of undisturbed cells already obtained in biological experiments, the reference genome sequence provided by the authoritative NCBIRefSeq or Ensembl professional databases, or the transcriptome corresponding to virtual cells; there are no restrictions here.
[0111] Iterate through all the perturbed cells in the batch and determine the unperturbed cells corresponding to each perturbed cell. Understandably, one perturbed cell corresponds to one unperturbed cell, but one unperturbed cell may correspond to zero, one or more perturbed cells.
[0112] Step B23: Each unperturbed cell in the sample and all the perturbed cells in the corresponding successfully matched sample constitute the sample cell group.
[0113] Each undisturbed cell in a sample and all perturbed cells that successfully match that undisturbed cell form a sample cell group. This process is repeated for all undisturbed cells in the entire batch to determine all sample cell groups. It is understood that if a sample undisturbed cell has no corresponding perturbed cell, then there is no need to construct a corresponding sample cell group.
[0114] Based on steps B21-B23, traverse all collection batches to determine the sample cell population corresponding to each collection batch.
[0115] Step C: Perform batch effect correction on the training sample dataset based on all the sample cell groups to obtain the corresponding corrected sample dataset; wherein, the corrected sample dataset includes the corrected transcriptome corresponding to each sample cell.
[0116] Batch effect refers to non-biological systematic differences caused by multiple sequencing runs of the same type of sample, different sequencing platforms, different experimental dates, different reagents, or different operators. These differences can mask true biological differences and interfere with clustering, differential analysis, etc. In this embodiment, batch effect correction is performed on the transcriptome of each sample in the training sample dataset based on all sample cell groups to obtain a corresponding corrected sample dataset, which is then used to train the prediction-classification model, ensuring that the model focuses on true biological differences. The corrected sample dataset includes the corrected transcriptome of each sample cell after batch effect correction, specifically including steps C1-C3.
[0117] Step C1: Cluster all sample cells according to the sample cell groups of all the collected batches to determine the anchor cells.
[0118] Based on the sample cell groups from all collection batches, all sample cells are clustered to determine anchor cells. In this embodiment, anchor cells include precise anchor cells. Precise anchor cells are determined by clustering all undisturbed cells from all sample cell groups. For example, the K-Means clustering algorithm is used to cluster the compact feature vectors of all undisturbed cells, forming multiple clusters. Clusters containing undisturbed cells from at least two collection batches are selected as valid clusters. The undisturbed cells corresponding to the compact feature vectors of the cluster centers of each valid cluster are designated as precise anchor cells.
[0119] In other embodiments, cell clustering can be performed on all undisturbed cells and all perturbed cells in all sample cell groups to form multiple clusters. Clusters that include at least two collection batches of undisturbed cells and at least one perturbed cell successfully matched with each undisturbed cell are selected as effective clusters. The undisturbed cell corresponding to the compact feature vector of the cluster center of each effective cluster is used as the precise anchor cell. Specifically, if the sample cell corresponding to the compact feature vector of the cluster center is a perturbed cell, the compact feature vector is removed, and the cluster center of the effective cluster is redefined. The undisturbed cell corresponding to the compact feature vector of the redefined cluster center is used as the precise anchor cell. If the sample cell corresponding to the compact feature vector of the redefined cluster center is still a perturbed cell, the undisturbed cell successfully matched with the perturbed cell corresponding to the original cluster center is used as the precise anchor cell.
[0120] In other embodiments, the anchor cells also include backup anchor cells. For undisturbed sample cells that have not formed effective clusters, the similarity between the undisturbed sample cell and the corresponding cell of each precise anchor cell is calculated. If the similarity of each cell is greater than the subtype similarity threshold, then the undisturbed sample cell is used as a backup anchor cell. It is understood that undisturbed sample cells that have not formed effective clusters include undisturbed sample cells that do not have a corresponding sample cell group.
[0121] Understandably, if the cell subtype corresponding to each sample cell is also obtained when acquiring the sample cells, then the sample cells for each cell subtype are clustered separately to determine the precise anchor cells corresponding to each cell subtype. For undisturbed sample cells that do not have a corresponding sample cell group or do not form an effective cluster, if a precise anchor cell for the corresponding cell subtype already exists, then proceed to step C2; if no precise anchor cell for the corresponding cell subtype exists, then reserve anchor cells are determined based on the similarity between the undisturbed sample cell and the corresponding cells of each precise anchor cell.
[0122] Step C2: Calculate the batch offset for each collection batch based on the sample transcriptome corresponding to the anchor cells.
[0123] The batch offset for each collection batch is calculated based on the transcriptome of the sample corresponding to the anchor cell.
[0124] In this embodiment, based on the compact feature vector corresponding to the transcriptome of the anchor cell, the vector difference between the compact feature vector corresponding to the undisturbed cell of each sample in each collection batch and the compact feature vector corresponding to the anchor cell is calculated. The mean of all vector differences corresponding to the collection batch is used as the batch offset corresponding to the collection batch. Further, each anchor cell is treated as an independent cell subtype, and step C2 includes steps C21-C23.
[0125] Step C21: For each collection batch, calculate the first batch offset corresponding to each cell subtype based on the unperturbed cells in the samples with valid clusters.
[0126] For unperturbed cells in a sample that form a valid cluster, calculate the vector difference between the unperturbed cells and the precise anchor cells corresponding to that valid cluster. For example, the vector difference is expressed as... In the formula, This represents the compact feature vector corresponding to the transcriptome of the sample corresponding to the unperturbed cells. This represents a compact feature vector corresponding to the transcriptome of the sample corresponding to the precise anchor cell. and Perform element-by-element subtraction to obtain the corresponding vector difference. .
[0127] If multiple samples of undisturbed cells in a certain acquisition batch belong to the same effective cluster, the mean of the vector differences corresponding to these multiple samples of undisturbed cells is used as the first batch offset for that acquisition batch and that cell subtype (i.e., the cell subtype corresponding to the precise anchor cell of the effective cluster).
[0128] If multiple samples of undisturbed cells in a certain collection batch do not belong to the same effective cluster, then the vector difference corresponding to the undisturbed cells is used as the first batch offset corresponding to the collection batch and the cell subtype.
[0129] For each collection batch, iterate through all undisturbed cells in the samples that have valid clusters, and determine the first batch offset for each cell subtype included in the collection batch.
[0130] Step C22: For each collection batch, calculate the second batch offset for each cell subtype based on the unperturbed cells in the samples where no valid clusters exist.
[0131] For undisturbed cells in samples that do not have effective clusters, calculate the cell similarity between the undisturbed cells in the sample and each precise anchor cell. Select the precise anchor cell corresponding to the maximum value, and further calculate the vector difference between the undisturbed cells in the sample and the precise anchor cell.
[0132] If multiple samples of undisturbed cells without effective clusters in a certain acquisition batch correspond to the same precise anchor cell, then the mean of the vector differences corresponding to the multiple samples of undisturbed cells is used as the second batch offset for that acquisition batch and that cell subtype (i.e., the cell subtype corresponding to the same precise anchor cell).
[0133] If a certain collection batch includes multiple samples of undisturbed cells that do not have effective clusters, corresponding to different precise anchor cells, then for each sample of undisturbed cells that does not have effective clusters, based on the precise anchor cell and vector difference corresponding to the sample of undisturbed cells, the offset of the second batch corresponding to the collection batch and the cell subtype (i.e. the cell subtype corresponding to the precise anchor cell corresponding to the sample of undisturbed cells) is determined.
[0134] In other embodiments, for undisturbed cells in samples without effective clusters, the cell similarity between the undisturbed cell and each precise anchor cell and each backup anchor cell is calculated. The precise anchor cell or backup anchor cell corresponding to the maximum value is selected, and the vector difference between the undisturbed cell and the precise anchor cell or backup anchor cell is further calculated. If multiple undisturbed cells in a certain acquisition batch that do not have effective clusters correspond to the same precise anchor cell or the same backup anchor cell, the average of the vector differences between these multiple undisturbed cells is used as the second batch offset for the acquisition batch and the cell subtype. If multiple undisturbed cells in a certain acquisition batch that do not have effective clusters correspond to different precise anchor cells or backup anchor cells, for each undisturbed cell without effective clusters, the second batch offset for the acquisition batch and the cell subtype is determined based on the precise anchor cell or backup anchor cell corresponding to the undisturbed cell and the vector difference.
[0135] For each collection batch, iterate through all undisturbed cells in the samples that do not have valid clusters, and determine the second batch offset corresponding to each cell subtype included in the collection batch.
[0136] Step C23: Determine the batch offset corresponding to the collection batch based on the first batch offset and the second batch offset corresponding to all cell subtypes in each collection batch.
[0137] In this embodiment, a corresponding batch offset is determined for each cell subtype in each collection batch. Specifically, if a cell subtype has both a corresponding first batch offset and a second batch offset, the first batch offset and the second batch offset are weighted and summed to obtain the corresponding batch offset for that cell subtype. For example, In the formula, , These represent the weighting coefficients corresponding to the first batch offset and the second batch offset, respectively, for example, 0.6 and 0.4. , The first batch offset and the second batch offset are represented sequentially. If a cell subtype only has a corresponding first batch offset or second batch offset, then the existing first batch offset or second batch offset is used as the batch offset corresponding to that cell subtype.
[0138] In other embodiments, the same batch offset is determined for all sample cells in each collection batch. Specifically, a weighted sum is taken from all first-batch offsets and all second-batch offsets corresponding to that collection batch, and this sum is used as the batch offset for that collection batch. For example, the batch offset for a collection batch is expressed as follows: In the formula, , These represent the weighting coefficients corresponding to the first batch offset and the second batch offset, respectively. This indicates the number corresponding to this collection batch. The first batch offset, This indicates the number of offsets in the first batch corresponding to this collection batch. This indicates the number corresponding to this collection batch. The second batch offset. This indicates the number of offsets in the second batch corresponding to this collection batch.
[0139] Understandably, if all sample cells in each acquisition batch have the same batch offset, it is not necessary to treat each anchor cell as an independent cell subtype. For example, the vector difference between each sample undisturbed cell in the acquisition batch and the corresponding precise anchor cell can be calculated, and the mean of all vector differences can be used as the batch offset for the acquisition batch.
[0140] Furthermore, after step C23, the batch offsets can be corrected based on the transcriptome of the sample perturbed cells corresponding to the anchor cells. For example, for the batch offset of a certain cell subtype in a given collection batch, if multiple unperturbed cells correspond to that cell subtype (i.e., multiple unperturbed cells correspond to anchor cells that are also anchor cells for that cell subtype), then, based on the single-gene perturbation condition, the sample perturbed cells corresponding to each unperturbed cell are compared with the sample perturbed cells corresponding to the anchor cells. For sample perturbed cells with the same single-gene perturbation condition, the corresponding perturbation-vector difference is calculated. The batch offset for that collection batch and that cell subtype is corrected based on each perturbation-vector difference. The corrected batch offset is expressed as follows: In the formula, This indicates the batch offset before correction for this collection batch and this cell subtype. , These represent the weight coefficients corresponding to the vector difference determined based on the precise anchor cell and the backup anchor cell, respectively. They can be obtained by using... , ; This indicates the number of samples collected for this batch and the cell subtype. A perturbation-vector difference based on precisely anchored cells. This represents the number of perturbation-vector differences determined based on precise anchor cells; This indicates the number of samples collected for this batch and the cell subtype. A perturbation-vector difference determined based on backup anchor cells, This represents the number of perturbation-vector differences determined based on the backup anchor cells. Taking any single perturbation-vector difference determined based on the precise anchor cells as an example, it is represented as... ,in, The single-gene perturbation condition corresponding to the unperturbed cells in the sample is: The compact feature vector corresponding to the sample perturbed cells. The single-gene perturbation condition corresponding to the precise anchor cell is also... The compact feature vector corresponding to the sample perturbation cell.
[0141] Among them, sample perturbation cells with the same single-gene perturbation conditions refer to two sample perturbation cells whose single-gene perturbation conditions include the same target gene and the same perturbation operation type for the target gene. In other embodiments, sample perturbation cells with the same single-gene perturbation conditions can also be determined based on the perturbation feature vectors corresponding to each single-gene perturbation condition. The corresponding vector distance (e.g., Euclidean distance) is calculated based on the perturbation feature vectors corresponding to each single-gene perturbation condition. If the vector distance between two single-gene perturbation conditions is less than a distance threshold, then the two single-gene perturbation conditions are considered to be the same.
[0142] Furthermore, the prediction-classification model also includes a cell processing branch for performing normalization, feature extraction, and batch effect correction on the transcriptome input to the prediction-classification model. The cell processing branch includes a cell processing layer and a conditional processing layer. The cell processing layer includes a batch correction module, which includes the batch offset determined in step C. This batch offset is used to correct the batch offset of the input compact feature vector during the application of the prediction-classification model. It is understood that during the application of the prediction-classification model, if the sample cells in the training sample dataset are updated, steps A, B, and C1-C2 can be executed separately to redetermine the batch offset corresponding to each collection batch or the batch offset corresponding to each collection batch and each cell subtype.
[0143] Step C3: For the sample transcriptome corresponding to each sample cell, perform batch offset correction based on the corresponding batch offset to obtain the corrected transcriptome corresponding to each sample cell.
[0144] For each sample cell's corresponding transcriptome, based on the corresponding batch offset, batch offset correction is performed on the compact feature vector corresponding to the sample transcriptome to obtain the corrected compact feature vector, which serves as the corrected transcriptome for that sample cell. The principle is the same as the batch offset correction in step S2112, and will not be repeated here. It can be understood that at this point, the corresponding cell subtype has been determined for each sample of unperturbed cells and each sample of perturbed cells based on steps C1-C2.
[0145] By using anchor cells determined based on sample cell groups, batch offsets are calculated to correct batch offsets in the transcriptome of each sample. This can accurately classify offsets caused solely by batch reasons, preserve perturbation effects, provide an independent batch noise estimation benchmark (i.e., batch offset), and make batch effect correction more stable.
[0146] Step D: Train the perturbation prediction branch and the perturbation classification branch using the calibration sample dataset to obtain the trained perturbation prediction branch and the perturbation classification branch.
[0147] In this embodiment, the prediction-classification model includes a perturbation prediction branch and a perturbation classification branch. The perturbation prediction branch and the perturbation classification branch are trained using a calibration sample dataset. The trained perturbation prediction branch is obtained through steps D1-D2, and the trained perturbation classification branch is obtained through steps D3-D4.
[0148] Step D1: For each of the sample perturbed cells, input the corresponding single-gene perturbing condition and the corrected transcriptome corresponding to the successfully matched sample unperturbed cells into the prediction-classification model to obtain the predicted perturbed transcriptome corresponding to the sample perturbed cells.
[0149] For each perturbed cell sample, the corresponding single-gene perturbation condition and the corrected transcriptome corresponding to the successfully matched unperturbed cells are input into the prediction-classification model to obtain the perturbed transcriptome corresponding to the perturbed cells. In this embodiment, the corrected transcriptome (i.e., the corrected compact feature vector corresponding to the unperturbed cells) and the perturbed feature vector corresponding to the single-gene perturbation condition of the perturbed cells are input into the perturbed prediction branch for perturbation reconstruction to generate the corresponding predicted perturbed transcriptome. The principle is the same as in step S3, and will not be repeated here.
[0150] It is understandable that the predicted perturbation transcriptome characterization obtained in step D1, based on the unperturbed cells of the sample and the transcriptome response after perturbation under single-gene perturbation conditions, has the same cellular basis (unperturbed cells of the sample) and undergoes the same perturbation treatment (characterized under single-gene perturbation conditions) as the perturbed sample cells.
[0151] Step D2: Based on the corrected transcriptome and the predicted perturbation transcriptome corresponding to all the sample perturbation cells, train the perturbation prediction branch to obtain the trained perturbation prediction branch.
[0152] Based on the corrected transcriptome and predicted perturbation transcriptome corresponding to all perturbed cells in the samples, the perturbation prediction branch is trained to obtain a trained perturbation prediction branch. Specifically, for each perturbed cell sample, using the corresponding corrected transcriptome as the true value and the predicted perturbation transcriptome obtained in step D1 as the predicted value, the corresponding prediction loss value is calculated. Backward gradient propagation is performed based on the prediction loss value to update the model parameters corresponding to the perturbation prediction branch until the training stopping condition is met, thus obtaining a trained perturbation prediction branch. For example, the corresponding prediction loss value is calculated based on the MSE loss function, and the model parameters corresponding to the perturbation prediction branch are updated using backward gradient propagation until the training update count is reached, thus obtaining a trained perturbation prediction branch. In other embodiments, other loss functions, model parameter update methods, and training stopping conditions can also be used, which are not limited here.
[0153] Step D3: Based on the single-gene perturbation condition corresponding to each of the sample perturbation cells, determine the corresponding positive and negative sample cell sets from all the sample perturbation cells in the calibration sample dataset.
[0154] Based on the single-gene perturbation condition corresponding to each sample perturbation cell, the corresponding positive and negative sample cell sets are determined from all sample perturbation cells in the calibration sample dataset. In this embodiment, for each sample perturbation cell, other sample perturbation cells with the same single-gene perturbation condition are searched from the calibration sample dataset and designated as the positive sample cells corresponding to that sample perturbation cell. Other sample perturbation cells with different single-gene perturbation conditions are searched and designated as negative sample cells. All negative sample cells corresponding to that sample perturbation cell constitute the negative sample cell set corresponding to that sample perturbation cell.
[0155] Furthermore, if there are multiple other sample perturbation cells with the same single-gene perturbation conditions, the cell with the lowest similarity to the perturbation cell in that sample is selected as the positive sample cell corresponding to that perturbation cell.
[0156] Step D4: Using the classification loss function and the contrastive loss function, the perturbation classification branch is trained based on all the perturbation cells of the samples and the corresponding sets of positive sample cells and negative sample cells to obtain the trained perturbation classification branch.
[0157] Using classification loss function and contrastive loss function, the perturbation classification branch is trained based on all sample perturbation cells and the corresponding positive sample cells and negative sample cell sets to obtain the trained perturbation classification branch. Taking the perturbation classification branch using MLP structure as an example, the perturbation classification branch includes a backbone MLP layer and a classification head. Step D4 includes steps D41-D43.
[0158] Step D41: Input the corrected transcriptome corresponding to each sample perturbed cell, the corrected transcriptome corresponding to each positive sample cell, and the corrected transcriptome corresponding to each negative sample cell into the backbone MLP layer to obtain the corresponding normalized expression feature vector.
[0159] The corrected transcriptomes corresponding to each sample perturbed cell, the corrected transcriptomes corresponding to each positive sample cell, and the corrected transcriptomes corresponding to each negative sample cell are input into the backbone MLP layer, and multilayer linear + activation mapping and L2 normalization are performed respectively to obtain the corresponding normalized expression feature vectors.
[0160] Step D42: Input each normalized expression feature vector into the classification head to obtain the corresponding prediction probability. Based on the prediction probability and the single-gene perturbation condition corresponding to each normalized expression feature vector, calculate the corresponding classification loss value using the classification loss function.
[0161] Each normalized expression feature vector is input into the classification head. Through the FC layer and Softmax function of the classification head, the predicted probability of each perturbation condition category corresponding to each normalized expression feature vector is obtained. Based on the predicted probability of each normalized expression feature vector and the single-gene perturbation condition corresponding to the normalized expression feature vector, the corresponding classification loss value is calculated using the classification loss function.
[0162] First, based on the perturbation condition category, the single-gene perturbation condition corresponding to each sample of perturbed cells is one-hot encoded. For example, the perturbation condition categories are TP53-KO, EGFR-KO, EGFR-MUT, PTEN-MUT, and MYC-OE. If the target gene of a particular sample of perturbed cells is TP53 and the perturbation operation type is gene knockout (KO), then the encoding label corresponding to the single-gene perturbation condition of that sample of perturbed cells is: It is understandable that positive and negative sample cells are determined from perturbed sample cells in the training sample dataset, and the corresponding encoding labels can be determined based on the same principle.
[0163] Secondly, each normalized representation feature vector is input into the classification head. Through the FC layer and Softmax function of the classification head, the predicted probability of each perturbation condition category corresponding to each normalized representation feature vector is obtained.
[0164] Then, using the classification loss function, the corresponding single-sample classification loss value is calculated based on the encoded label and predicted probability corresponding to each normalized representation feature vector. For example, the classification loss function is the CE loss function. Taking positive sample cells as an example, the corresponding single-sample classification loss value is expressed as follows: In the formula, Indicates the first The normalized expression feature vector corresponding to the positive sample cells for each sample perturbed cell. express The corresponding encoded tag A number, express The corresponding predicted probability of the first A number, This indicates the number of disturbance condition categories.
[0165] Finally, the classification loss value is calculated based on all individual sample classification loss values. In this embodiment, a sample perturbed cell, its corresponding positive sample cells, and its negative sample cell set are considered as a sample batch. The classification loss value for each batch is calculated based on all individual sample classification loss values. For example, the classification loss value is expressed as... In the formula, Indicates the first in this batch The single-sample classification loss value, This indicates the number of single-sample classification loss values corresponding to this batch.
[0166] Step D43: Calculate the corresponding contrastive loss value using the contrastive loss function based on each normalized representation feature vector.
[0167] Based on each normalized feature vector, the corresponding contrastive loss value is calculated using a contrastive loss function. In this embodiment, the InfoNCE Loss function is used, and the contrastive loss value is expressed as follows: In the formula, Indicates the first The normalized expression feature vector corresponding to each sample of perturbed cells. Indicates the first The normalized expression feature vector corresponding to the positive sample cells for each sample perturbed cell. Indicates the first The set of negative sample cells corresponding to the nth sample perturbed cell. The normalized expression feature vector corresponding to each sample of perturbed cells. This indicates a temperature coefficient, such as 0.07, used to control the differentiation level. Indicates the first The number of sample perturbation cells in the negative sample cell set corresponding to each sample perturbation cell.
[0168] In other embodiments, the contrastive loss function is the Triplet Loss function, and the contrastive loss value is expressed as: In the formula, Indicates the first The normalized expression feature vector corresponding to each sample of perturbed cells. Indicates the first The normalized expression feature vector corresponding to the positive sample cells for each sample perturbed cell. Indicates the first The set of negative sample cells corresponding to the nth sample perturbed cell. The normalized expression feature vector corresponding to each sample of perturbed cells. The L2 norm of a vector. This represents the margin boundary hyperparameter, for example .
[0169] Step D44: Update the model parameters of the perturbation classification branch based on the classification loss value and the contrastive loss value to obtain the trained perturbation classification branch.
[0170] The model parameters of the perturbation classification branch are updated based on the classification loss and contrastive loss values to obtain the trained perturbation classification branch. Specifically, for each sample perturbation cell, the classification branch loss is calculated based on the classification loss and contrastive loss values. For example, the classification branch loss is expressed as... In the formula, Represents the classification loss value. Indicates the comparison loss value, for example or , This represents the weight coefficient corresponding to the contrastive loss value, for example, 0.3, used to balance the classification loss value and the contrastive loss value. Backward gradient propagation is performed based on the classification branch loss to update the model parameters corresponding to the perturbation classification branch until the training stopping condition is met, resulting in the trained perturbation classification branch. The model parameter update method and training stopping condition can be set according to existing model training techniques and are not restricted here.
[0171] By introducing a positive-negative sample pairing mechanism, cell expression (i.e., compact feature vector) under the same perturbation (i.e., the same single-gene perturbation condition) is used as a positive sample, and cell expression under different perturbations is used as a negative sample. By optimizing the contrastive loss function, the expressive power of the representation space (represented by normalized expression feature vectors) is enhanced, and the discriminative power of the classification head of the perturbation classification branch in the representation space is strengthened. The overall architecture works synergistically, enabling the model to more accurately identify, distinguish, and reconstruct the differences in expression patterns caused by different gene perturbations in the virtual cell space (represented by the transcriptome).
[0172] In this embodiment, the perturbation prediction branch obtained in steps D1-D2 and the perturbation classification branch obtained in steps D3-D4 constitute the trained prediction-classification model.
[0173] In other embodiments, step D is followed by: Step E: Fine-tune and update the perturbation prediction branch and perturbation classification branch after training, and use the fine-tuned and updated perturbation prediction branch and perturbation classification branch to form the trained prediction-classification model.
[0174] The perturbation prediction branch obtained through steps D1-D2 and the perturbation classification branch obtained through steps D3-D4 are cross-trained. The perturbation prediction branch and the perturbation classification branch are fine-tuned and updated. The fine-tuned and updated perturbation prediction branch and perturbation classification branch constitute the trained prediction-classification model.
[0175] First, obtain the fine-tuning sample dataset and construct the corresponding fine-tuning correction dataset. The fine-tuning correction dataset includes the corrected transcriptome corresponding to multiple fine-tuning sample cells. The fine-tuning sample cells include unperturbed cells and perturbed sample cells. The principle is the same as in step A, and will not be repeated here.
[0176] Secondly, the corrected transcriptome corresponding to the unperturbed cells and the random perturbation conditions are input into the perturbation prediction branch to generate the corresponding predicted perturbation transcriptome. The predicted perturbation transcriptome is then input into the perturbation classification branch to determine the corresponding predicted perturbation conditions. The perturbation prediction branch is then fine-tuned based on the random perturbation conditions and the predicted perturbation conditions. The random perturbation conditions have the same meaning as the single-gene perturbation conditions, except that the target gene and the type of perturbation operation on the target gene can be arbitrarily set.
[0177] Next, the corrected transcriptomes corresponding to the perturbed cells and the corrected transcriptomes corresponding to the successfully matched undisturbed cells are input into the perturbed classification branch to determine the predicted perturbed conditions corresponding to the perturbed cells; the undisturbed cells and the predicted perturbed conditions are input into the perturbed prediction branch to generate the corresponding predicted perturbed transcriptomes, and the perturbed classification branch is fine-tuned based on the corrected transcriptomes corresponding to the perturbed cells and the predicted perturbed transcriptomes.
[0178] Understandably, the perturbation prediction branch and the perturbation classification branch can be fine-tuned sequentially or alternately to obtain the fine-tuned and updated perturbation prediction branch and perturbation classification branch, until the fine-tuning stopping condition is met, and the final perturbation prediction branch and perturbation classification branch constitute the trained prediction-classification model.
[0179] This invention provides a single-gene perturbation prediction and classification system based on contrastive learning, such as... Figure 2 As shown, it includes: The cell acquisition module is used to acquire the target raw transcriptome and the corresponding single-gene perturbation condition or target perturbation transcriptome; The cell processing module is used to perform feature mapping on the target original transcriptome and the corresponding single-gene perturbation condition or the target perturbed transcriptome to obtain the corresponding target original gene expression vector, perturbation feature vector or target perturbed gene expression vector. The perturbation prediction module is used to perform perturbation prediction based on the target original gene expression vector and the corresponding perturbation feature vector, using the perturbation prediction branch of the trained prediction-classification model, to obtain the corresponding predicted perturbation transcriptome. The perturbation classification module is used to classify perturbation conditions based on the expression vector of the target perturbation gene using the perturbation classification branch of the trained prediction-classification model, and to determine the predicted perturbation conditions corresponding to the target perturbation transcriptome.
[0180] The above-described method and system embodiments are based on the same principles, and their related aspects can be referenced from each other to achieve the same technical effects. For specific implementation processes, please refer to the foregoing embodiments, which will not be repeated here.
[0181] In summary, the single-gene perturbation prediction and classification method and system based on contrastive learning according to embodiments of the present invention has at least one of the following beneficial effects: 1. Utilizing the perturbation prediction branch of the trained prediction-classification model, perturbation simulation is performed on the target original transcriptome based on single-gene perturbation conditions, and corresponding predicted perturbation transcriptomes are generated. This achieves efficient and low-cost virtual gene perturbation experiment prediction, and completes the simulation prediction of the cellular transcriptome response caused by single-gene perturbation. It can generate perturbation transcriptomes that are highly consistent with the real perturbation without the need for actual experiments, so as to analyze the impact of single-gene perturbation on transcriptome changes, thereby significantly reducing experimental costs and cycle time.
[0182] 2. By utilizing the perturbation classification branch of the trained prediction-classification model, perturbation conditions are classified based on the target perturbation transcriptome, achieving accurate identification of cellular perturbation conditions; by training the perturbation classification branch through comparative learning, the accuracy of perturbation condition identification is effectively improved.
[0183] 3. By matching sample cells in the training sample dataset, the sample cell groups are determined, and batch effect correction is completed. This effectively distinguishes cell differences caused by batch noise and perturbation conditions, achieving accurate correction between different collection batches of the training sample dataset. The correction sample dataset is then used to train the prediction-classification model, enabling the prediction-classification model to more accurately identify transcriptomic changes caused by perturbation conditions and the differences between transcriptomic changes caused by different perturbation conditions. This improves the accuracy of the predicted perturbation transcriptome generated by the perturbation prediction branch performing perturbation simulation and the accuracy of the predicted perturbation conditions determined by the perturbation classification branch performing perturbation condition classification.
[0184] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0185] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A single-gene perturbation prediction and classification method based on contrastive learning, characterized in that, include: Obtain the target raw transcriptome and the corresponding single-gene perturbation condition or target perturbation transcriptome; Feature mapping is performed on the target original transcriptome and the corresponding single-gene perturbation condition or the target perturbation transcriptome to obtain the corresponding target original gene expression vector, perturbation feature vector or target perturbation gene expression vector; Based on the target original gene expression vector and the corresponding perturbation feature vector, the perturbation prediction branch of the trained prediction-classification model is used to perform perturbation prediction to obtain the corresponding predicted perturbation transcriptome. Alternatively, based on the expression vector of the target perturbation gene, the perturbation condition can be classified using the perturbation classification branch of the trained prediction-classification model to determine the predicted perturbation condition corresponding to the target perturbation transcriptome.
2. The method according to claim 1, characterized in that, The perturbation prediction branch includes an inference network layer and a generation network layer; based on the target original gene expression vector and the corresponding perturbation feature vector, the perturbation prediction branch of the trained prediction-classification model is used to perform perturbation prediction to obtain the corresponding predicted perturbation transcriptome, including: The target original gene expression vector and the corresponding perturbation feature vector are input into the inference network layer for latent vector extraction to generate the corresponding target latent vector. The target latent vector is input into the generator network layer for vector reconstruction to generate the corresponding predicted perturbation transcriptome.
3. The method according to claim 1, characterized in that, The perturbation prediction branch and the perturbation classification branch, which have been trained, are obtained through the following steps: A training sample dataset comprising multiple collection batches of sample cells is obtained; wherein, the sample cells include unperturbed sample cells and perturbed sample cells; the training sample dataset includes the sample transcriptome corresponding to each unperturbed sample cell, the sample transcriptome corresponding to each perturbed sample cell, and the single-gene perturbation condition; Based on the transcriptome corresponding to each sample cell, all sample cells in each collection batch are matched to determine several sample cell groups; wherein, each sample cell group includes the sample undisturbed cells and several sample perturbed cells that were successfully matched; Batch effect correction is performed on the training sample dataset based on all the sample cell groups to obtain the corresponding corrected sample dataset; wherein, the corrected sample dataset includes the corrected transcriptome corresponding to each of the sample cells; The perturbation prediction branch and the perturbation classification branch are trained using the calibration sample dataset to obtain the trained perturbation prediction branch and the perturbation classification branch.
4. The method according to claim 3, characterized in that, Based on the transcriptome corresponding to each sample cell, all sample cells in each collection batch are matched to determine several sample cell groups, including: Each unperturbed cell in the sample and the transcriptome corresponding to the perturbed cell in the sample are mapped into a compact feature vector; For each collection batch, the sample cell group is determined by matching the compact feature vectors corresponding to all undisturbed cells and the perturbed cells in the sample.
5. The method according to claim 4, characterized in that, The sample cell group is determined by matching the compact feature vectors corresponding to all undisturbed cells and perturbed cells in the samples, including: For each of the sample perturbed cells, calculate the cell similarity between the compact feature vector corresponding to the sample perturbed cell and the compact feature vector corresponding to each of the sample undisturbed cells; For each of the sample perturbed cells, the sample undisturbed cells that are successfully matched with the corresponding perturbed cells are determined based on the similarity of all the cells in the sample. Each sample's unperturbed cells and all the corresponding successfully matched perturbed cells constitute the sample cell group.
6. The method according to claim 3, characterized in that, Batch effect correction is performed on the training sample dataset based on all the aforementioned sample cell groups to obtain the corresponding corrected sample dataset, including: Based on the cell groups of all the collected batches, all the sample cells are clustered to determine the anchor cells; Calculate the batch offset for each collection batch based on the sample transcriptome corresponding to the anchor cells; For each sample cell, the sample transcriptome is corrected by batch offset based on the corresponding batch offset to obtain the corrected transcriptome for each sample cell.
7. The method according to claim 3, characterized in that, The perturbation prediction branch, after training, is obtained through the following steps: For each of the sample perturbed cells, the corresponding single-gene perturbing condition and the corrected transcriptome corresponding to the successfully matched sample unperturbed cells are input into the prediction-classification model to obtain the predicted perturbed transcriptome corresponding to the sample perturbed cells; The perturbation prediction branch is trained based on the corrected transcriptome and the predicted perturbation transcriptome corresponding to all the sample perturbation cells to obtain the trained perturbation prediction branch.
8. The method according to claim 3, characterized in that, The perturbation classification branch is obtained through the following steps: Based on the single-gene perturbation condition corresponding to each of the sample perturbation cells, determine the corresponding positive sample cell and negative sample cell sets from all the sample perturbation cells in the calibration sample dataset; Using classification loss function and contrastive loss function, the perturbation classification branch is trained based on all the perturbation cells of the samples and the corresponding sets of positive and negative sample cells, to obtain the trained perturbation classification branch.
9. The method according to claim 8, characterized in that, The contrastive loss function is expressed as follows: In the formula, Indicates the first The normalized expression feature vectors corresponding to the disturbed cells in the sample. Indicates the first The normalized expression feature vector corresponding to the positive sample cell for each of the disturbed sample cells. Indicates the first The set of negative sample cells corresponding to the nth sample perturbation cell. The normalized expression feature vector corresponding to each of the sample perturbed cells. Indicates the temperature coefficient. Indicates the first The number of sample perturbation cells in the negative sample cell set corresponding to each sample perturbation cell.
10. A single-gene perturbation prediction and classification system based on contrastive learning, characterized in that, include: The cell acquisition module is used to acquire the target raw transcriptome and the corresponding single-gene perturbation condition or target perturbation transcriptome; The cell processing module is used to perform feature mapping on the target original transcriptome and the corresponding single-gene perturbation condition or the target perturbed transcriptome to obtain the corresponding target original gene expression vector, perturbation feature vector or target perturbed gene expression vector. The perturbation prediction module is used to perform perturbation prediction based on the target original gene expression vector and the corresponding perturbation feature vector, using the perturbation prediction branch of the trained prediction-classification model, to obtain the corresponding predicted perturbation transcriptome. The perturbation classification module is used to classify perturbation conditions based on the expression vector of the target perturbation gene using the perturbation classification branch of the trained prediction-classification model, and to determine the predicted perturbation conditions corresponding to the target perturbation transcriptome.