Cell type automatic annotation method for single-cell chromatin openness data

CN120656560BActive Publication Date: 2026-10-30NANKAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510778939.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2026-10-30
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

[0005]然而现有方法仍存在重大局限:

Benefits of technology

[0017](1)精确注释性能:本发明比较了和基线模型在数据内部的注释性能,本发明将每个数据集的细胞随机分为五折,每次使用四折数据训练模型,对剩余一折进行细胞类型注释。本发明在全部六个数据集上均接近最优表现,通过单侧配对Wilcoxon符号秩检验证实,本发明在所有指标上均显著优于基线方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120656560B_ABST
    Figure CN120656560B_ABST
Patent Text Reader

Abstract

The application discloses a cell type automatic annotation method for single-cell chromatin openness data, comprising the following steps: step 1, data preprocessing based on TF-IDF; step 2, type balancing processing of a training set; step 3, using the processed training set obtained in step 2 to train MLP through contrast learning to obtain the trained MLP; step 4, multi-level annotation using low-dimensional representation: obtaining the low-dimensional representation of cells by using the trained MLP, and then obtaining a first soft label annotation matrix, a second soft label annotation matrix and a cell type recognition result according to the low-dimensional representation of each cell; and then calculating the cell type specific chromatin accessible peak according to the second soft label annotation matrix, and integrating the first soft label annotation matrix, the second soft label annotation matrix and the cell type recognition result to obtain the final annotation result. The annotation performance is accurate, and rare cell types can be annotated and unknown cell types can be recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bioinformatics, specifically to an automatic cell type annotation method for open chromatin data of single cells. Background Technology

[0002] Currently, single-cell sequencing technology has made significant progress, greatly deepening our understanding of cellular heterogeneity in various biological systems. Among them, single-cell chromatin openness sequencing (scCAS) technology captures the chromatin landscape that regulates transcription by analyzing the open state of chromatin. Its rapid development has provided a new perspective for studying epigenomic heterogeneity and complex mechanisms of gene regulation at single-cell resolution.

[0003] Many downstream analyses of scCAS data (such as differential open peak analysis, cell type-specific motif analysis, and transcription factor activity inference) typically require accurate cell type annotation beforehand. Traditional mainstream annotation methods involve clustering cells and then manually labeling them based on marker gene-related peaks. However, with the continuous expansion of scCAS data scale driven by high-throughput sequencing technology, traditional manual annotation is not only time-consuming and labor-intensive, but also presents computational feasibility challenges for large-scale datasets. These difficulties highlight the urgent need for automated cell annotation methods—methods that can efficiently utilize already labeled datasets to accurately annotate newly generated data.

[0004] While numerous automated annotation methods have been developed for single-cell transcriptome data, their performance on scCAS data is significantly reduced due to the inherent high noise and extreme sparsity. To address the unique challenges of scCAS data, researchers have recently developed several dedicated methods. For example, Chen et al. proposed EpiAnno, the first dedicated scCAS method, which uses a Bayesian neural network to embed cells into a latent space for annotation; SANGO, developed by Zeng et al., integrates DNA sequence information and has become the most advanced scCAS cell annotation method to date. In addition, traditional machine learning methods such as Support Vector Machine (SVM), Random Forest (RF), and K-Nearest Neighbors (KNN) have also demonstrated excellent and robust performance in cell annotation.

[0005] However, existing methods still have significant limitations:

[0006] 1. Poor stability of heterogeneous datasets. With the surge in scCAS datasets spanning multiple tissues and sequencing technologies, existing methods struggle to maintain stable performance on heterogeneous datasets, especially for annotation of rare cell types.

[0007] 2. Failure to uncover complex intercellular similarities. scCAS data often implicitly contain complex intercellular similarities, and these features are crucial for capturing subtle intercellular relationships and accurate annotation.

[0008] 3. Lack of ability to identify unknown cell types. When unknown cell types not covered in the training set appear in the test set (such discoveries can reveal unknown cell differentiation and lineage relationships), existing scCAS-specific cell type annotation methods lack the ability to identify new cells.

[0009] 4. Lack of interpretability. Most methods lack interpretability, hindering researchers from analyzing cell function and underlying biological mechanisms from annotation results. Summary of the Invention

[0010] To address the shortcomings of existing technologies, the technical problem this invention aims to solve is to provide an automatic cell type annotation method for open chromatin data of single cells.

[0011] The technical solution of this invention to solve the aforementioned technical problem is to provide an automatic cell type annotation method for single-cell chromatin open data, characterized in that the method includes the following steps:

[0012] Step 1: TF-IDF-based data preprocessing: First, preprocess the given cell type label C... train Encoded as data label y train and will include cell type tag C train The original training set of scCAS and C without cell type labels train The original set of scCAS to be annotated and the scCAS counting matrix n0 represents the total number of sample cells after merging, p0 represents the initial peak count, and after further noise reduction, the filtered matrix is ​​obtained. p represents the number of peaks after filtering; then, TF-IDF transformation is used to weight the peaks, followed by normalization to obtain the preprocessed dataset.

[0013] Step 2, Type balancing of the training set: This involves processing the preprocessed dataset X obtained in Step 1. processed Split the dataset to obtain the training set. and the collection to be annotated n train n represents the total number of cells in the training set. target This represents the total number of sample cells in the set to be annotated; then, the training set is processed using a training set type balancing technique to obtain the processed training set. n train_processed This represents the total number of cells in the training set after processing.

[0014] Step 3: Use the processed training set X obtained in Step 2. train_processedThe MLP is trained by contrastive learning to obtain the trained MLP;

[0015] Step 4: Multi-level annotation using low-dimensional representations: Obtain low-dimensional representations of cells using the trained MLP, and then obtain the first soft-label annotation matrix based on the low-dimensional representations of each cell. Second soft tag annotation matrix And cell type identification results; then based on the second soft tag annotation matrix Calculate the cell type-specific chromatin accessible peaks and simultaneously annotate the first soft tag matrix. Second soft tag annotation matrix The results are integrated with cell type identification results to obtain the final annotation result C. target .

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0017] (1) Accurate Annotation Performance: This invention compares the annotation performance of the baseline model with that of the data. In this invention, cells in each dataset are randomly divided into five folds. The model is trained using four folds of data each time, and cell type annotations are performed on the remaining fold. This invention achieves near-optimal performance on all six datasets. This is confirmed by a one-sided paired Wilcoxon signed-rank test, demonstrating that this invention significantly outperforms the baseline method on all metrics.

[0018] (2) Rare cell type annotation: This invention further performs a specific evaluation of the rare cell types with the smallest proportion in the six datasets (using rare cells as positive samples and the remaining cells as negative samples), and compares it with SANGO. Although the overall performance is comparable to SANGO in some datasets (such as Heart), this invention shows a significant advantage in rare cell type annotation.

[0019] (3) Unknown cell type identification: To simulate the presence of unknown cell types in the test set, this invention first divides the dataset into a training set (80%) and a test set (20%). Then, specific cell types are removed from the training set, ensuring they only appear in the test set. When different cell types are considered unknown, this invention demonstrates high recall across all experimental datasets, indicating its ability to successfully identify all cells belonging to unknown cell types.

[0020] (4) Interpretability: To verify whether the cell type-specific peaks identified in this invention can reveal biological mechanisms, this invention systematically analyzed the cell type-specific peaks of the ThymusA dataset (containing four cell types closely related to immune system diseases: thymocytes, vascular endothelial cells, antigen-presenting cells, and thymic epithelial cells). Based on various downstream analyses, this invention can provide important clues for genetic and cellular mechanism research, deepening our understanding of complex biological processes specific to cell type.

[0021] (5) Performance of annotation on heterogeneous datasets: The present invention further constructed cross-batch datasets, cross-tissue datasets and cross-species datasets for experiments. In multiple tasks, the present invention showed superior performance, which fully demonstrated its flexibility in real-world cell annotation tasks.

[0022] (6) Running time: The annotation time of the method of the present invention is significantly shorter than that of EpiAnno and SANGO for datasets of different sizes. Attached Figure Description

[0023] Figure 1 This is an overall flowchart of the present invention;

[0024] Figure 2 The results of the five-fold cross-validation comparison experiment on the dataset of Embodiment 1 of the present invention are shown below;

[0025] Figure 3 This is the result of a cross-batch comparison experiment in Example 1 of the present invention;

[0026] Figure 4 These are the results of cross-tissue and cross-species comparative experiments in Example 1 of the present invention;

[0027] Figure 5 The results of the unknown cell type identification comparison experiment in Example 1 of the present invention are shown. Detailed Implementation

[0028] Specific embodiments of the present invention are given below. These specific embodiments are only used to further illustrate the present invention in detail and do not limit the scope of protection of the present invention.

[0029] This invention provides an automatic cell type annotation method (hereinafter referred to as the method) for single-cell chromatin open data, characterized by comprising the following steps:

[0030] Step 1: TF-IDF-based data preprocessing: First, preprocess the given cell type label C... train Encoded as data label y train and will include cell type tag C train The original training set of scCAS and C without cell type labels trainThe original set of scCAS to be annotated and the scCAS counting matrix n0 represents the total number of cells in the merged sample, and p0 represents the initial number of peaks (cell chromatin-reachable peaks). After further noise reduction, the filtered matrix is ​​obtained. p represents the number of peaks after filtering; then, TF-IDF (Term Frequency-Inverse Document Frequency) transformation is used to weight the peaks, followed by normalization to obtain the preprocessed dataset.

[0031] Preferably, in step 1, noise reduction is achieved by filtering the counting matrix X. raw Less than 1% of the cells have open peaks.

[0032] Preferably, in step 1, the specific calculation process for TF-IDF conversion is as follows:

[0033]

[0034] Preferably, in step 1, normalization specifically involves:

[0035]

[0036] Step 2, Type balancing of the training set: This involves processing the preprocessed dataset X obtained in Step 1. processed Split the dataset to obtain the training set. and the collection to be annotated n train n represents the total number of cells in the training set. target This represents the total number of sample cells in the set to be annotated; then, to address the common type imbalance problem in the scCAS dataset, a training set type balancing technique is used to process the training set, resulting in the processed training set. n train_processed This represents the total number of cells in the training set after processing.

[0037] Preferably, in step 2, the training set type balancing technique specifically involves: first, setting a threshold K; then, for cell types with more than K cells, downsampling is performed to reduce their cell count to K; for cell types with fewer than K cells, an oversampling technique based on a masking strategy is used to generate synthetic cells to supplement K; thereby obtaining the processed training set X. train_processed .

[0038] Preferably, in step 2, the oversampling technique is to randomly set 15% of the non-zero elements to zero.

[0039] Step 3: Use the processed training set X obtained in Step 2. train_processedThe MLP (Multilayer Perceptron) is trained by contrastive learning to obtain the trained MLP, which can effectively learn the low-dimensional representation of each cell.

[0040] Preferably, in step 3, contrastive learning is a representation learning method based on similarity metrics. By constructing positive and negative sample pairs, contrastive learning can learn a low-dimensional representation of the data. In the contrastive learning framework, a positive and negative sample pair construction method is used: for the processed training set X... train_processed Peak data x of the i-th cell i Select the peak data of a cell whose cell type is the same as the i-th cell. Construct positive sample pairs for the i-th cell Simultaneously, a peak data of a cell whose cell type is different from the i-th cell type is randomly selected. Construct negative sample pairs for the i-th cell For the processed training set X train_processed Each cell in the array is constructed using a positive and negative sample pair method, ultimately yielding n. train n positive sample pairs and n train One negative sample pair.

[0041] Preferably, in step 3, the loss function Loss of the MLP based on positive and negative sample pairs is:

[0042]

[0043] In equation (3), This represents the low-dimensional representation of the i-th cell. This represents the low-dimensional representation of the cells in the positive sample pair of the i-th cell. Let represent the low-dimensional representation of the cells in the negative sample pair of the i-th cell; cos(·) represents the cosine similarity, calculated as follows:

[0044]

[0045] Preferably, in step 3, in the low-dimensional space, cells of the same type will aggregate together, while cells of different types will be clearly separated.

[0046] Step 4: Multi-level annotation using low-dimensional representations: Obtain low-dimensional representations of cells using the trained MLP, and then obtain the first soft-label annotation matrix based on the low-dimensional representations of each cell. Second soft tag annotation matrix And cell type identification results; then based on the second soft tag annotation matrix Calculate the cell type-specific chromatin accessible peaks and simultaneously annotate the first soft tag matrix. Second soft tag annotation matrix The results are integrated with cell type identification results to obtain the final annotation result C. target Cell type-specific chromatin accessibility peaks and final annotation results C target As the final output.

[0047] Preferably, in step 4, the first soft tag annotation matrix is ​​obtained. The specific steps are as follows:

[0048] A1. Process the training set X obtained in step 2. tarain_processed And the annotated set X target The inputs are fed into the trained MLP to obtain the low-dimensional representations of the processed training set. and the low-dimensional representation of the set to be annotated d represents the dimension of the low-dimensional representation;

[0049] A2. Low-dimensional representation of the processed training set Calculate the algebraic centroid of the k-th class of cells. Stack the K centroid vectors into a centroid matrix

[0050]

[0051] In equations (5) and (6), The low-dimensional representation of the processed training set The set of indices belonging to the k-th cell type, where K represents the number of cell types in the training set;

[0052] A3. Low-dimensional representation of the set to be annotated For each test cell, calculate the relationship between each test cell and its centroid matrix. Cosine similarity of each centroid:

[0053]

[0054] Then perform normalization:

[0055]

[0056] Then Consider the probability that the i-th test cell belongs to the k-th class; then use all probabilities Generate a cosine similarity matrix and use it as the first soft tag annotation matrix.

[0057] Preferably, in step 4, the second soft tag annotation matrix is ​​obtained. The specific steps are as follows:

[0058] B1. Take the training set X obtained in step 2. trainThe input is fed into the trained MLP to obtain a low-dimensional representation of the training set. For the low-dimensional representation of the training set Specific cells The training set X is obtained by applying the K-nearest neighbor graph construction strategy. train Adjacency matrix A train ;

[0059] Preferably, in step B1, the low-dimensional representation of the training set... Specific cells Find the m nearest cells based on cosine similarity; these m cells are considered as cells. The neighbor, recorded as Redefining the training set X train Adjacency matrix A train Adjacency matrix A train elements in for:

[0060]

[0061] Simultaneously, the union of the low-dimensional representation of the training set and the low-dimensional representation of the set to be annotated is used. Applying the same K-nearest neighbor graph construction strategy, another adjacency matrix is ​​obtained.

[0062] B2. Transform the adjacency matrix A train and adjacency matrix A all Add them together, then binarize the result to obtain the final adjacency matrix.

[0063] B3. The final adjacency matrix A final The training set X obtained in step 2 train Step 2 yields the set of annotations X. target and the data label y obtained in step 1 train The input is fed into a Graph Convolutional Network (GCN) for semi-supervised learning to obtain the second soft-label annotation matrix.

[0064] Preferably, in step 4, the specific steps for obtaining the cell type identification result are as follows:

[0065] C1. Take the training set X obtained in step 2. tarain The input is fed into the trained MLP to obtain a low-dimensional representation of the training set. Low-dimensional representation of the training set Divide the data into K distinct training subsets based on K different known cell types.

[0066] C2. Use each training subset separately. Calculate the convex hull S for each cell type in low-dimensional space. k :

[0067]

[0068] In equation (10), λ j The coefficients that constitute the dot-convex combination, x k,j The low-dimensional representation of the j-th cell in the space associated with cell type k;

[0069] C3. Low-dimensional representation of annotation sets For each cell in the array, determine whether it is located within the convex hull of a known cell type; if it is, it is considered a cell of a known cell type; if it is not, it is considered a cell of an unknown cell type, and so on, to obtain the cell type identification results for all cells.

[0070] Preferably, in step 4, the cell type-specific chromatin accessibility peaks are obtained by using a second soft-label annotation matrix. The cell type-specific chromatin accessibility peaks were calculated based on mutual information (MI). The specific steps are as follows:

[0071] Construct a feature selector F∈{0,1} for GCN nodes p and define the feature subset X F The feature selector filters relevant features in the following ways:

[0072]

[0073] In equation (11), This represents the feature in the i-th cell that is not masked by F;

[0074] Then, by maximizing mutual information, the feature selector F is optimized to obtain the optimized feature selector F. t The specific optimization method is as follows:

[0075]

[0076] In equation (12), the conditional entropy is defined as follows:

[0077]

[0078] Then, the annotation set X obtained in step 2 is... target Divide the data into K distinct subsets to be annotated based on K different known cell types. Then, for each known cell type, the corresponding subset to be annotated Apply the optimized feature selector F t The cell type-specific peak selection results are obtained; then the Sigmoid function is used to normalize the cell type-specific peak selection results to obtain the importance score of the cell type-specific peaks, and the top K peaks with the highest importance are selected as cell type-specific chromatin accessible peaks.

[0079] Preferably, in step 4, the final annotation result C is obtained. target Specifically: the first soft tag annotation matrix Second soft tag annotation matrix Adding them together yields the final soft tag annotation matrix. For the set to be annotated X target Each cell i in the matrix is ​​annotated with a final soft label. The i-th row vector The final label of cell i is determined by the maximum value in the vector. The cell type corresponding to this maximum value is the most likely type of cell i. Then, a vector is generated using the most likely types of all cells as the output result y. target ∈R K Then, output the result y. target After decoding, the initial annotation result C is obtained. target_raw Then, in the initial annotation result C... target_raw In the process, based on the cell type identification results, the annotation results for cells with unknown cell types are replaced with "unknown," resulting in the final annotation result C. target .

[0080] Example 1:

[0081] This invention was compared with six baseline cell type annotation methods. The six baseline cell type annotation methods include two methods specifically designed for scCAS data and four traditional machine learning methods.

[0082] The two scCAS-specific methods are as follows:

[0083] SANGO: SANGO encodes the peak genomic sequence into a low-dimensional embedding, then iteratively reconstructs the peak statistical features of cells through a fully connected network, and annotates the query cells based on a graph Transformer network. Follow the GitHub tutorial (https: / / github.com / biomed-AI / SANGO#Tutorial) and run with default parameters.

[0084] EpiAnno: EpiAnno is a probabilistic generative model that combines a Bayesian neural network for supervised annotation of scCAS data. Experiments were performed following the steps provided in the GitHub code (https: / / github.com / xychen16 / EpiAnno / blob / master / code / demo.ipynb) using default parameters.

[0085] Four traditional machine learning methods include:

[0086] Support Vector Machine (SVM): SVM is a supervised learning algorithm that classifies data by finding the optimal hyperplane. Based on recent benchmark research recommendations, the sklearn.svm module from scikit-learn is used, and a linear kernel function is selected.

[0087] Random Forest (RF): RF is an ensemble learning method that constructs multiple decision trees and outputs the mode of their classification results. The experiments use the sklearn.ensemble.RandomForestClassifier class from scikit-learn, with default parameters.

[0088] K-Nearest Neighbors (KNN): KNN is a simple instance-based algorithm that classifies objects based on the majority label of their nearest neighbors in the feature space. Using the sklearn.neighbors.KNeighborsClassifier class from scikit-learn, we set n_neighbors=9 and n_neighbors=50 respectively, corresponding to the KNN9 and KNN50 models.

[0089] To evaluate the model's performance in identifying unknown cell types, a Support Vector Machine (SVM) with a rejection option was employed. This algorithm has been proven in recent benchmark studies to accurately identify unknown cell types. Following the recommendations of the benchmark studies, a posterior probability threshold of 0.7 was set, and cells with a probability below this threshold were labeled as new types.

[0090] In this embodiment, 11 scCAS datasets were systematically collected, covering different species, platforms, data sizes, dimensions, types of imbalance, and proportions of major cell types, in order to conduct a comprehensive benchmark assessment.

[0091] Human Tissue Datasets: Two sets of human tissue cell data were collected, including: the Melanoma dataset (Melanoma) containing 598 cells from a SOX10 gene knockout melanoma cell line, taken from short-term culture samples from two patients; and the Spleen and Thymus datasets (SpleenA, ThymusA), generated using sci-ATAC-seq3 technology, with data from human fetal samples. These two datasets have higher cell counts and peak counts, allowing for a more comprehensive evaluation of annotation performance on complex datasets.

[0092] Mouse tissue datasets: To explore the applicability of the method to data from different species and sources, six datasets (ThymusB, Liver, Heart, LungA, LungB, and SplenB) were collected from the mouse sci-ATAC-seq atlas. These data were generated using the combined index detection technique (sci-ATAC-seq), and the degree of imbalance in cell number and type varies, providing a diverse testing environment for evaluation.

[0093] Cross-species annotation experimental dataset: To conduct cross-species cell type annotation experiments, additional human and mouse brain tissue datasets were collected: The human brain dataset mainly contains 130,418 cells, taken from post-mortem brain tissue of Alzheimer's patients and cognitively healthy controls, covering all major brain cell types; the mouse brain dataset comes from the mouse sci-ATAC-seq atlas and includes cerebellar cells from 8-week-old mice. To facilitate cross-species comparisons, subtypes of excitatory and inhibitory neurons in the mouse data were merged (because these undefined subtypes cannot be directly correlated with human data).

[0094] The specific comparative experiments mainly include five-fold cross-validation experiments on datasets, cross-batch experiments using batch labels within the datasets, cell annotation experiments on cross-tissue and cross-species data, and experiments on the identification of unknown cell types.

[0095] Hyperparameters set during the implementation of this invention:

[0096] An MLP (Multi-Level Processing) was used in the low-dimensional representation learning stage. This MLP consists of two fully connected layers. The input layer receives cell feature vectors, the size of which corresponds to the dimension of the input features. The first fully connected layer projects the input into a hidden space with 144 neurons, followed by sigmoid activation and L2 normalization to ensure stability and better representation learning performance. The second fully connected layer further transforms the hidden representations into a 64-dimensional output space, corresponding to the learned low-dimensional cell embeddings.

[0097] The similarity between cell embeddings in sample pairs is calculated using a cosine similarity function. This similarity serves as the fundamental metric for contrastive learning, enabling the model to effectively distinguish between similar and dissimilar cell states. The model is optimized using the Adam optimizer with an initial learning rate of 0.001, and a learning rate scheduler is implemented to reduce the learning rate to 0.1 times its original value after 30 epochs to improve convergence. A mini-batch strategy is employed during training, with the batch size set to 10% of the positive sample pair dataset size. Furthermore, an early stopping mechanism based on loss values ​​is implemented: training is terminated if the loss value falls below 0.05, or if the average loss change over five consecutive epochs is less than 0.0001, to prevent overfitting and ensure computational efficiency.

[0098] A Graph Convolutional Network (GCN) was used in the graph learning phase. This GCN model consists of three graph convolutional layers. The first layer, GCNConv, transforms the input features into a 128-dimensional hidden space. The second layer, GCNConv, further reduces the feature dimension to 64 dimensions. The third layer, GCNConv, outputs a dimension corresponding to the number of cell types. Each graph convolution is followed by a ReLU activation function for non-linear transformation, and the final output is processed by a softmax function to obtain the classification probability. The model is optimized using the Adam optimizer with an initial learning rate of 0.0001.

[0099] from Figure 2 As can be seen, this invention achieves state-of-the-art performance on all six datasets. One-sided paired Wilcoxon signed-rank tests on these metrics demonstrate that this invention significantly outperforms the baseline method on all indicators.

[0100] from Figure 3 , 4 As can be seen, this invention still demonstrates certain advantages across all metrics in annotation tasks involving heterogeneous datasets across batches, organizations, and species.

[0101] from Figure 5 As can be seen, in the unknown cell type identification experiment, the present invention exhibited a high recall rate on all datasets, indicating that it could successfully identify all cells belonging to the unknown cell type. In the F1 score metric, which considers both recall and precision, the present invention consistently demonstrated superior overall performance.

[0102] Any aspects not covered in this invention are applicable to existing technologies.

Claims

1. A method for automatic cell type annotation of single-cell chromatin open data, characterized in that, The method includes the following steps: Step 1: TF-IDF-based data preprocessing: First, preprocess the given cell type label C... train Encoded as data label y train and will include cell type tag C train The original training set of scCAS and C without cell type labels train The original set of scCAS to be annotated and the scCAS counting matrix n0 represents the total number of sample cells after merging, p0 represents the initial peak count, and after further noise reduction, the filtered matrix is ​​obtained. p represents the number of peaks after filtering; then, TF-IDF transformation is used to weight the peaks, followed by normalization to obtain the preprocessed dataset. Step 2, Type balancing of the training set: This involves processing the preprocessed dataset X obtained in Step 1. processed Split the dataset to obtain the training set. and the collection to be annotated n train n represents the total number of cells in the training set. target This represents the total number of sample cells in the set to be annotated; then, the training set is processed using a training set type balancing technique to obtain the processed training set. n train_processed This represents the total number of cells in the training set after processing. Step 3: Use the processed training set X obtained in Step 2. train_processed The MLP is trained by contrastive learning to obtain the trained MLP; Step 4: Multi-level annotation using low-dimensional representations: Obtain low-dimensional representations of cells using the trained MLP, and then obtain the first soft-label annotation matrix based on the low-dimensional representations of each cell. Second soft tag annotation matrix And cell type identification results; then based on the second soft tag annotation matrix Calculate the cell type-specific chromatin accessible peaks and simultaneously annotate the first soft tag matrix. Second soft tag annotation matrix The results are integrated with cell type identification results to obtain the final annotation result C. target .

2. As described in claim 1, characterized in that, In step 1, noise reduction is achieved by filtering the counting matrix X. raw Less than 1% of cells have open peaks; In step 1, the specific calculation process for TF-IDF conversion is as follows: In step 1, normalization specifically involves:

3. As described in claim 1, characterized in that, In step 2, the training set type balancing technique specifically involves: first, setting a threshold K; then, for cell types with more than K cells, downsampling is performed to reduce their cell count to K; for cell types with fewer than K cells, an oversampling technique based on a masking strategy is used to generate synthetic cells to supplement K; thus obtaining the processed training set X. train_processed ; In step 2, the oversampling technique is to randomly set 15% of the non-zero elements to zero.

4. As described in claim 1, characterized in that, In step 3, within the contrastive learning framework, a positive-negative sample pair construction method is used: for the processed training set X... train_processed Peak data x of the i-th cell i Select the peak data of a cell whose cell type is the same as the i-th cell. Construct positive sample pairs for the i-th cell Simultaneously, a peak data of a cell whose cell type is different from the i-th cell type is randomly selected. Construct negative sample pairs for the i-th cell For the processed training set X train_processed Each cell in the array is constructed using a positive and negative sample pair method, ultimately yielding n. train n positive sample pairs and n train One negative sample pair; In step 3, the loss function Loss for the MLP based on positive and negative sample pairs is: In equation (3), This represents the low-dimensional representation of the i-th cell. This represents the low-dimensional representation of the cells in the positive sample pair of the i-th cell. Let represent the low-dimensional representation of the cells in the negative sample pair of the i-th cell; cos(·) represents the cosine similarity, calculated as follows:

5. As described in claim 1, characterized in that, In step 4, the first soft tag annotation matrix is ​​obtained. The specific steps are as follows: A1. Process the training set X obtained in step 2. train_prpcessed And the annotated set X target The inputs are fed into the trained MLP to obtain the low-dimensional representations of the processed training set. and the low-dimensional representation of the set to be annotated d represents the dimension of the low-dimensional representation; A2. Low-dimensional representation of the processed training set Calculate the algebraic centroid of the k-th class of cells. Stack the K centroid vectors into a centroid matrix In equations (5) and (6), The low-dimensional representation of the processed training set The set of indices belonging to the k-th cell type, where K represents the number of cell types in the training set; A3. Low-dimensional representation of the set to be annotated For each test cell, calculate the relationship between each test cell and its centroid matrix. Cosine similarity of each centroid: Then perform normalization: Then Consider the probability that the i-th test cell belongs to the k-th class; then use all probabilities Generate a cosine similarity matrix and use it as the first soft tag annotation matrix.

6. As described in claim 1, characterized in that, In step 4, the second soft tag annotation matrix is ​​obtained. The specific steps are as follows: B1. Take the training set X obtained in step 2. train The input is fed into the trained MLP to obtain a low-dimensional representation of the training set. For the low-dimensional representation of the training set Specific cells The training set X is obtained by applying the K-nearest neighbor graph construction strategy. train Adjacency matrix A train ; Simultaneously, the union of the low-dimensional representation of the training set and the low-dimensional representation of the set to be annotated is used. Applying the same K-nearest neighbor graph construction strategy, another adjacency matrix is ​​obtained. B2. Transform the adjacency matrix A train and adjacency matrix A all Add them together, then binarize the result to obtain the final adjacency matrix. B3. The final adjacency matrix A final The training set X obtained in step 2 train Step 2 yields the set of annotations X. target and the data label y obtained in step 1 train The input is fed into a graph convolutional network for semi-supervised learning to obtain the second soft label annotation matrix.

7. As described in claim 6, characterized in that, In step B1, for the low-dimensional representation of the training set Specific cells Find the m nearest cells based on cosine similarity; these m cells are considered as cells. The neighbor, recorded as Redefining the training set X train Adjacency matrix A train Adjacency matrix A train elements in for:

8. As described in claim 1, characterized in that, In step 4, the specific steps to obtain the cell type identification results are as follows: C1. Take the training set X obtained in step 2. train The input is fed into the trained MLP to obtain a low-dimensional representation of the training set. Low-dimensional representation of the training set Divide the data into K distinct training subsets based on K different known cell types. C2. Use each training subset separately. Calculate the convex hull S for each cell type in low-dimensional space. k : In equation (10), λ j The coefficients that constitute the dot-convex combination, x k,j A low-dimensional representation of the j-th cell in the space associated with cell type k; C3. Low-dimensional representation of annotation sets For each cell in the array, determine whether it lies within the convex hull of a known cell type; if it does, it is considered a cell of a known cell type. If it is not located, it is considered a cell of unknown cell type, thus obtaining cell type identification results for all cells.

9. As described in claim 1, characterized in that, In step 4, the specific steps for obtaining cell type-specific chromatin accessible peaks are as follows: Construct a feature selector F∈{0,1} for GCN nodes p and define the feature subset X F The feature selector filters relevant features in the following ways: In equation (11), This represents the feature in the i-th cell that is not masked by F; Then, by maximizing mutual information, the feature selector F is optimized to obtain the optimized feature selector F. t The specific optimization method is as follows: max F MY(and target ,X F )=H(y target )-H(y target |X=X F ) (12) In equation (12), the conditional entropy is defined as follows: Then, the annotation set X obtained in step 2 is... target Divide the data into K distinct subsets to be annotated based on K different known cell types. Then, for each known cell type, the corresponding subset to be annotated Apply the optimized feature selector F t The cell type-specific peak selection results are obtained; then the Sigmoid function is used to normalize the cell type-specific peak selection results to obtain the importance score of the cell type-specific peaks, and the top K peaks with the highest importance are selected as cell type-specific chromatin accessible peaks.

10. As described in claim 1, characterized in that, In step 4, the final annotation result C is obtained. target Specifically: the first soft tag annotation matrix Second soft tag annotation matrix Adding them together yields the final soft tag annotation matrix. For the set to be annotated X target Each cell i in the matrix is ​​annotated with a final soft label. The i-th row vector The final label of cell i is determined by the maximum value in the vector. The cell type corresponding to this maximum value is the most likely type of cell i. Then, a vector is generated using the most likely types of all cells as the output result y. target ∈R K Then, for the output result t target After decoding, the initial annotation result C is obtained. target_raw ; Then in the initial annotation result C target_raw In the process, based on the cell type identification results, the annotation results for cells with unknown cell types are replaced with "unknown," resulting in the final annotation result C. target .

Citation Information

Patent Citations

  • Single cell type annotation model based on pre-training virtual adversarial domain adaptive network

    CN117909835A

  • Single-cell multi-omics cell type annotation method based on pre-training

    CN119132426A