Method for calculating cell type annotation score
By calculating the enrichment and scores of the cell type in the single cell transcription group data, and the visualization of the results in the UMAP diagram, solving the lack of accuracy in the processing of traditional methods in the processing of noise and mutant data, realizing more accurate and reliable reliability Cell type annotation.
Patent Information
- Application Number
- CN202411262387.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-24
AI Technical Summary
Traditional single-cell transcriptome data analysis methods lack accuracy in processing noise and variability data, resulting in cell type identification errors, and differences between different experimental conditions and biological samples increase the difficulty of annotation.
By calculating the enrichment and scores of each cell cluster and cell type combination, precise annotations for cell types can be achieved, and the annotation results can be visualized in the UMAP diagram, and the distribution of different cell types in the clustering category intuitively shows the distribution of different cell types and its clustering category. Significant.
It improves the accuracy and reliability of cell type annotations, can more effectively process large -scale single -cell transcriptional data, reduce the impact of inter -experimental differences, and improve noise and variant processing capabilities.
Smart Images

Figure CN119360971A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of bioinformatics and computational biology, and in particular to technical methods related to single cell transcriptome data analysis and cell type annotation. Specifically, the present invention provides a method for calculating cell type annotation scores. Background Art
[0002] Single-cell RNA sequencing (scRNA-seq) technology has revolutionized the field of genomics by studying gene expression at single-cell resolution. This technology can reveal heterogeneity between cells and provide an unprecedented perspective for understanding the functional roles of different cell populations. By capturing the gene expression profile of each single cell, researchers can identify cell types, states, and their roles in different biological processes.
[0003] Accurate cell type annotation is a key step in scRNA-seq data analysis. Traditional cell type annotation methods mainly rely on known marker genes and clustering techniques. These methods use known cell type-specific marker genes to infer the type of each cell by comparing the expression of genes in scRNA-seq data. Clustering technology analyzes the similarity of gene expression data and clusters cells with similar expression patterns together, thereby identifying different cell populations.
[0004] Because scRNA-seq data often contain a lot of noise and variability, traditional methods often lack accuracy in practical applications. Noise and technical variation can lead to erroneous gene expression measurements, which can affect the identification of cell types. In addition, differences between experimental conditions and biological samples can also increase the difficulty of annotation, so that the same marker gene may perform differently in different experiments. Summary of the invention
[0005] Purpose of the invention: The purpose of the present invention is to provide a method for calculating cell type annotation scores. By calculating the enrichment and score of each cell cluster and cell type combination, accurate annotation of cell types can be achieved. At the same time, the present invention also aims to visualize the annotation results in the UMAP map, so that researchers can intuitively understand the distribution of different cell types in the cluster and their significance, thereby improving the effect and efficiency of data analysis.
[0006] Technical solution: A method for calculating a cell type annotation score of the present invention comprises the following steps:
[0007] Step 1, loading an input data file containing cell clustering data and marker gene data, and performing format preprocessing on the input data file;
[0008] Step 2: Calculate the total number of marker genes for each cell type and their proportion in all genes;
[0009] Step 3: Merge the cell clustering data and marker gene data by gene name to generate a comprehensive dataset containing information about each gene in each cell type;
[0010] Step 4: Traverse each cluster and cell type combination to calculate the number, enrichment and score of marker genes;
[0011] Step 5: Filter out the records with a score of 0 and sort the remaining records by clustering and score;
[0012] Step 6: Within each cluster, rank the cell types and select the top three cell types with the highest scores; generate a label vector containing the cell types and their scores;
[0013] Step 7: Read the UMAP coordinate data and calculate the center point of each cluster;
[0014] Step 8. Use the UMAP coordinate data and the calculated label vector to plot the coordinate points of each cell in the UMAP map and add a label to the center point of each cluster to display the three cell types with the highest scores in the cluster and their scores.
[0015] Furthermore, step 2 is as follows: count the total number of marker genes for each cell type, assuming that the total number of genes is G t , the number of marker genes of cell type i is A i , then the gene ratio R of cell type i i for
[0016] Furthermore, step 4 is as follows: for each cluster C j and cell type i, calculate the following parameters:
[0017] Seurat marker gene number S ij : Cell type i is in cluster C j The number of marker genes in cluster C, that is, the number of marker genes belonging to cell type i in cluster C j The number of
[0018] Total number of Seurat marker genes S j : Cluster C j The total number of all marker genes in cluster C j The number of all marker genes in ;
[0019] Seurat marker gene ratio SR ij :The calculation formula is The marker genes representing cell type i are in cluster Cj The proportion of
[0020] Enrichment E ij :The calculation formula is The marker genes representing cell type i are in cluster C j The enrichment level in cluster C j The ratio of the proportion of marker genes of cell type i to its proportion in the total genes;
[0021] Scoure ij :The calculation formula is Indicates that cell type i is in cluster C j The score is a comprehensive score in the cluster; the score is calculated by taking into account the enrichment and the number of marker genes, and the weighted formula reflects the significance of the cell type in a specific cluster, and the score result is rounded off.
[0022] UMAP (Uniform Manifold Approximation and Projection) is an advanced dimensionality reduction technique that is widely used in the visualization and analysis of scRNA-seq data. UMAP can effectively capture the global structure of high-dimensional data while retaining local relationships, allowing different cell populations to be clearly separated in low-dimensional space. Through UMAP projection, researchers can intuitively observe the similarities and differences between cells, thereby more accurately identifying and distinguishing different cell types and states.
[0023] Furthermore, step 7 is specifically as follows:
[0024] Load the UMAP coordinate data. For each cluster, determine the center point of the cluster by calculating the median of the coordinates of all cells in each cluster in the UMAP space.
[0025] For cluster C j The cell set in {(X1, Y1), (X2, Y2), ..., (X n , Y n )}, the coordinates of its center point (M xj , M yj ) is:
[0026]
[0027] Among them, median() represents the value in the middle of a set of data. After the data is sorted, if there are an odd number of data, the median is the middle value; if there are an even number of data, the median is the average of the two middle values. xj , M yj ) By calculating the median of each value group x and y, the center position of the group of data is obtained.
[0028] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0029] (1) Cell type annotation scoring algorithm:
[0030] Calculation of marker gene ratio: By calculating the total number of marker genes for each cell type and their ratio in all genes, the basic data of cell type annotation is ensured to be accurate.
[0031] Enrichment calculation: Within each cluster, the enrichment of a cell type in a specific cluster is measured by calculating the ratio of the proportion of the cell type's marker genes to its proportion in all genes.
[0032] Score calculation: Taking into account the enrichment and number of marker genes, the annotation score of each cell type in a specific cluster is calculated to ensure that the score reflects the significance of the cell type.
[0033] Improved accuracy: By introducing enrichment calculation and scoring models, the present invention can more accurately reflect the significance of each cell type in different clusters, thereby improving the accuracy of cell type annotation. The algorithm not only considers the number of marker genes, but also combines enrichment to ensure that the annotation results are more scientifically based.
[0034] Efficient processing of large-scale data: The present invention designs an efficient algorithm that can quickly process large-scale single-cell transcriptome data. Through systematic data processing and analysis steps, the present invention ensures application efficiency on large-scale data sets and is suitable for the current analysis needs of high-throughput single-cell sequencing data.
[0035] (2) Single-cell RNA sequencing provides a powerful tool for genomic research, while UMAP makes up for the shortcomings of traditional cell type annotation methods through effective dimensionality reduction and visualization technology, significantly improving the accuracy and reliability of cell type identification.
[0036] Data integration: Integrate the cell type annotation results with the UMAP dimensionality reduction data to visualize the annotation results.
[0037] Center point calculation: Calculate the center point of each cluster in the UMAP graph to accurately add labels.
[0038] Label display: The top three cell types and their scores for each cluster are displayed in the UMAP plot, allowing researchers to intuitively understand the distribution and significance of different cell types in the cluster.
[0039] The present invention combines the cell type annotation results with the UMAP dimensionality reduction technology to achieve intuitive visualization of the results. By displaying the cell type with the highest score in each cluster and its score in the UMAP graph, researchers can more intuitively understand the distribution and significance of different cell types in the cluster, making it easier to identify and analyze key cell populations in the data.
[0040] Enhanced data interpretation capabilities: Adding annotation labels to UMAP graphs allows researchers to visually observe the similarities and differences between cells, thereby more accurately identifying and distinguishing different cell types and states. This feature significantly enhances data interpretation capabilities and helps discover potential biological significance.
[0041] (3) Wide applicability: The algorithm of the present invention has wide applicability, not only for single-cell transcriptome data, but also for other types of high-dimensional biological data analysis. The versatility of the algorithm makes it have broad application prospects in the field of bioinformatics.
[0042] Reduce the impact of differences between experiments: Through scientific calculation methods, the present invention effectively reduces the impact of differences between different experimental conditions and biological samples on the annotation results, and improves the reliability of annotation. Even in different experiments, the same marker gene can obtain consistent annotation results.
[0043] Improved noise and variability processing: By introducing enrichment and score calculations, the present invention shows stronger robustness when processing scRNA-seq data containing a lot of noise and variability. The algorithm can effectively distinguish true biological signals from technical noise, improving the accuracy of cell type identification.
[0044] Support for further analysis and research: The annotation results of the present invention provide a solid foundation for subsequent biological research. Accurate cell type annotation helps to further study the functional roles and relationships of different cell types and promote the progress of biological and medical research. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 The figure is an overall flow chart of the method of the present invention.
[0046] Figure 2 This is a flow chart for generating the UMAP map of the present invention.
[0047] Figure 3 This is the UMAP graph without using the algorithm.
[0048] Figure 4 This is the final score graph obtained after applying the algorithm to the input data.
[0049] Figure 5 To display the final score on the UMAP graph. DETAILED DESCRIPTION
[0050] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0051] like Figure 1 As shown, a method for calculating a cell type annotation score of the present invention comprises the following steps:
[0052] Step 1, loading an input data file containing cell clustering data and marker gene data, and performing format preprocessing on the input data file;
[0053] Step 2: Calculate the total number of marker genes for each cell type and their proportion in all genes;
[0054] Step 3: Merge the cell clustering data and marker gene data by gene name to generate a comprehensive dataset containing information about each gene in each cell type;
[0055] Step 4: Traverse each cluster and cell type combination to calculate the number, enrichment and score of marker genes;
[0056] Step 5: Filter out the records with a score of 0 and sort the remaining records by clustering and score;
[0057] Step 6: Within each cluster, rank the cell types and select the top three cell types with the highest scores; generate a label vector containing the cell types and their scores;
[0058] Step 7: Read the UMAP coordinate data and calculate the center point of each cluster;
[0059] Step 8. Use the UMAP coordinate data and the calculated label vector to plot the coordinate points of each cell in the UMAP map and add a label to the center point of each cluster to display the three cell types with the highest scores in the cluster and their scores.
[0060] Furthermore, step 2 is as follows: count the total number of marker genes for each cell type, assuming that the total number of genes is G t , the number of marker genes of cell type i is A i , then the gene ratio R of cell type i i for
[0061] Furthermore, step 4 is as follows: for each cluster C j and cell type i, calculate the following parameters:
[0062] Seurat marker gene number S ij : Cell type i is in cluster C jThe number of marker genes in cluster C, that is, the number of marker genes belonging to cell type i in cluster C j The number of
[0063] Total number of Seurat marker genes S j : Cluster C j The total number of all marker genes in cluster C j The number of all marker genes in ;
[0064] Seurat marker gene ratio SR ij :The calculation formula is The marker genes representing cell type i are in cluster C j The proportion of
[0065] Enrichment E ij :The calculation formula is The marker genes representing cell type i are in cluster C j The enrichment level in cluster C j The ratio of the proportion of marker genes of cell type i to its proportion in the total genes;
[0066] Scoure ij :The calculation formula is Indicates that cell type i is in cluster C j The score is a comprehensive score in the cluster; the score is calculated by taking into account the enrichment and the number of marker genes, and the weighted formula reflects the significance of the cell type in a specific cluster, and the score result is rounded off.
[0067] like Figure 2 As shown in the figure, UMAP (Uniform Manifold Approximation and Projection) is an advanced dimensionality reduction technique that is widely used in the visualization and analysis of scRNA-seq data. UMAP can effectively capture the global structure of high-dimensional data while retaining local relationships, so that different cell populations can be clearly separated in low-dimensional space. Through UMAP projection, researchers can intuitively observe the similarities and differences between cells, thereby more accurately identifying and distinguishing different cell types and states.
[0068] Furthermore, step 7 is specifically as follows:
[0069] Load the UMAP coordinate data. For each cluster, determine the center point of the cluster by calculating the median of the coordinates of all cells in each cluster in the UMAP space.
[0070] For cluster C j The cell set in {(X1, Y1), (X2, Y2), ...., (X n , Y n )}, the coordinates of its center point (Mxj , M yj ) is:
[0071]
[0072] Among them, median() represents the value in the middle of a set of data. After the data is sorted, if there are an odd number of data, the median is the middle value; if there are an even number of data, the median is the average of the two middle values. xj , M yj ) By calculating the median of each value group x and y, the center position of the group of data is obtained.
[0073] Example:
[0074] Input the umap.txt file provided by the user (containing the gene marker data in the cell cluster, each line records a gene and its cluster information) and draw a picture (such as Figure 3 ), then input Test_markers.tsv (which contains the two-dimensional coordinates of each cell in the UMAP dimensionality reduction space (UMAP_1, UMAP_2) and the corresponding cell type information) (such as Figure 4 ), and finally the algorithm is used to calculate Figure 5 .
Claims
1. A method for calculating a cell type annotation score, characterized in that The steps include: Step 1, loading an input data file containing cell clustering data and marker gene data, and performing format preprocessing on the input data file; Step 2: Calculate the total number of marker genes for each cell type and their proportion in all genes; Step 3: Merge the cell clustering data and marker gene data by gene name to generate a comprehensive dataset containing information about each gene in each cell type; Step 4: Traverse each cluster and cell type combination to calculate the number, enrichment and score of marker genes; Step 5: Filter out the records with a score of 0 and sort the remaining records by clustering and score; Step 6: Within each cluster, rank the cell types and select the top three cell types with the highest scores; generate a label vector containing the cell types and their scores; Step 7: Read the UMAP coordinate data and calculate the center point of each cluster; Step 8. Use the UMAP coordinate data and the calculated label vector to plot the coordinate points of each cell in the UMAP map and add a label to the center point of each cluster to display the three cell types with the highest scores in the cluster and their scores.
2. A method for calculating a cell type annotation score according to claim 1, characterized in that: Step 2 is as follows: Count the total number of marker genes for each cell type, assuming the total number of genes is G t , the number of marker genes of cell type i is A i , then the gene ratio R of cell type i i for 3. A method for calculating a cell type annotation score according to claim 1, characterized in that: Step 4 is as follows: For each cluster C j and cell type i, calculate the following parameters: Seurat marker gene number S ij : Cell type i is in cluster C j The number of marker genes in cluster C, that is, the number of marker genes belonging to cell type i in cluster C j The number of Total number of Seurat marker genes S j : Cluster C j The total number of all marker genes in cluster C j The number of all marker genes in ; Seurat marker gene ratio SR ij :The calculation formula is The marker genes representing cell type i are in cluster C j The proportion of Enrichment E ij :The calculation formula is The marker genes representing cell type i are in cluster C j The enrichment level in cluster C j The ratio of the proportion of marker genes of cell type i to its proportion in the total genes; Scoure ij :The calculation formula is Indicates that cell type i is in cluster C j The score is a comprehensive score in the cluster; the score is calculated by taking into account the enrichment and the number of marker genes, and the weighted formula reflects the significance of the cell type in a specific cluster, and the score result is rounded off.
4. A method for calculating a cell type annotation score according to claim 1, characterized in that: Step 7 is as follows: Load the UMAP coordinate data. For each cluster, determine the center point of the cluster by calculating the median of the coordinates of all cells in each cluster in the UMAP space. For cluster C j The cell set in {(X1, Y1), (X2, Y2), ..., (X n , Y n )}, the coordinates of its center point (M xj , M yj ) is: Among them, median() represents the value in the middle position of a set of data. After the data is sorted, if it is an odd number of data, the median is the middle value; if it is an even number of data, the median is the average of the two middle values; (M xj , M yj ) By calculating the median of each value group x and y, the center position of the group of data is obtained.
5. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method of claim 1.
6. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to claim 1 are implemented.
7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to claim 1 are implemented.