Spatial omics cell type annotation method, equipment and medium

By generating metacells and performing nonnegative matrix factorization, the computational complexity problem of large-scale single-cell and spatial omics data is solved, achieving efficient and accurate cell type annotation.

CN121171373APending Publication Date: 2025-12-19HANGZHOU LC BIOTECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511334881.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

Existing single-cell and spatial omics technologies have high computational complexity when processing large-scale data, and meta-cell inference methods are not accurate and efficient enough on large-scale datasets, making it difficult to efficiently annotate cell types.

Method used

By clustering single-cell data to generate metacells, and using the metacell feature counting matrix and non-negative matrix factorization, the cell type weights at each spatial location in spatial omics are calculated, thereby achieving cell type annotation.

Benefits of technology

It significantly reduces the computational load of the analysis process, improves the accuracy and stability of annotations, and reduces the impact of data noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121171373A_ABST
    Figure CN121171373A_ABST
Patent Text Reader

Abstract

The invention discloses a spatial omics cell type annotation method and device and a medium, and belongs to the technical field of biological information. The method comprises the following steps: splitting unicellular omics data with cell type annotations according to cell types, clustering cells of the same cell type and generating meta-cells, and obtaining a meta-cell characteristic counting matrix; calculating specific mark characteristics of each cell type relative to other cell types; and calculating a basis matrix of each cell type mark feature, calculating a cell type weight value corresponding to each spatial position based on the feature counting matrix of the spatial omics data to be annotated, and taking the cell type with the highest weight value as the cell type annotation of the spatial position. By utilizing the method, the equipment or the medium to carry out space cell type annotation, the calculation amount in the analysis process is greatly reduced, the analysis efficiency is improved, and the accuracy and the stability of annotation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Related patents This application is a divisional application of Chinese Patent Application No. 2025108149192, filed on June 18, 2025, entitled "Method, apparatus and medium for spatial transcriptome cell type annotation based on metacell". Technical Field

[0002] This application relates to the field of bioinformatics, and in particular to a method, apparatus and medium for spatial omics cell type annotation. Background Technology

[0003] In recent years, spatial omics and single-cell omics sequencing technologies have developed and become widespread. Single-cell omics technology can reveal heterogeneity in gene expression or chromatin openness, protein peaks, etc., at the resolution of a single cell, while preserving relatively rich gene expression or other information. However, it requires the separation of individual cells through methods such as tissue dissociation, resulting in the complete loss of the cell's spatial location information. Spatial omics technology, on the other hand, can preserve in-situ cell information, combining gene expression or protein information with spatial coordinates, and includes various methods based on microanatomy, spatial barcoding, or imaging (such as 10x Visium, MERFISH, Stereo-seq, 10x Visium HD, etc.). However, spatial omics suffers from drawbacks such as low resolution or insufficient detection depth, which often necessitates the use of single-cell omics data to assist in cell identification during its analysis process. Taking transcriptomics as an example, there are currently various methods for using single-cell transcriptome data to assist in the annotation of spatial transcriptome cell types. However, these methods typically use complete single-cell transcriptome data for computation, which usually consists of tens of thousands, hundreds of thousands, or even tens of millions of cells, resulting in a huge amount of computation and a long processing time. Alternatively, single-cell data can be randomly sampled to analyze a small number of cells. However, conventional single-cell transcriptome expression profiles are sparse matrices and may contain significant noise. This makes the analysis results susceptible to random factors (such as noise or failure to capture low-expression marker genes), especially in low-quality data, where they are prone to large errors.

[0004] To address the computational overhead of large-scale single-cell sequencing data, researchers have proposed various efficient single-cell analysis tools, primarily for tasks such as data imputation, integration, clustering, and cell type annotation. However, these tools are typically designed for specific tasks and are difficult to integrate directly into existing single-cell data analysis frameworks. To achieve more general and efficient single-cell data processing, one solution is to compress the raw data, thereby reducing data redundancy and enabling traditional analysis tools to process large-scale sequencing data more efficiently. A representative method for single-cell data compression is metacell inference, which aggregates biologically similar cell populations, compressing several single cells into a single representative metacell, thus effectively reducing the number of cells while preserving biological information to the greatest extent possible.

[0005] Metacell inference methods offer significant advantages in large-scale data processing. Firstly, the data compression provided by metacells reduces the computational overhead of sequencing data analysis. Secondly, by aggregating cells with similar characteristics, metacells alleviate data sparsity and improve the robustness of downstream analyses (such as cell type annotation and developmental trajectory inference) to some extent. However, despite the satisfactory results achieved by metacell inference methods in some applications, their accuracy and efficiency on large-scale datasets remain insufficient. For example, the current state-of-the-art SEACell algorithm performs single-cell clustering by constructing a global adjacency matrix and infers metacells based on the clustering results. This algorithm performs well when processing smaller datasets, but requires more than a day to process 100,000 single cells, and its exponential memory overhead makes it difficult to handle larger-scale single-cell datasets. In other words, existing metacell inference methods essentially shift the computational bottleneck from downstream analysis to the metacell inference stage, without truly solving the computational complexity problem. Summary of the Invention

[0006] To solve at least one of the above-mentioned technical problems, the technical solution adopted in this application is as follows.

[0007] The first aspect of this application provides a method for cell type annotation of metacellular spatial omics data, comprising the following steps: S101, split the single-cell omics data with cell type annotations according to cell type, cluster cells of the same cell type and generate metacells, and obtain the metacell feature count matrix; S102, Based on the meta-cell feature counting matrix, calculate the specific marker features of each cell type relative to other cell types, and merge the marker features of all cell types to generate a marker feature set; S103, Based on the meta-cell feature counting matrix, calculate the basis matrix of the cell type marker features; S104. Based on the feature counting matrix of the spatial omics data to be annotated, the cell type weight value corresponding to each spatial location is calculated using the basis matrix, and the cell type with the highest weight value is taken as the cell type annotation for that spatial location.

[0008] Metacells are a computational strategy that generates “supercell” units by clustering single-cell data. The goal is to reduce the high noise and sparsity of single-cell data by aggregating similar cells, while preserving biological heterogeneity.

[0009] In some embodiments of this application, step S101 generates a meta-cell feature counting matrix through the following steps: S1011, For single-cell omics data of the same cell type, the cell-feature count matrix is ​​reduced in dimension to obtain the cell dimension-reduced matrix; S1012, Based on the cell dimensionality reduction matrix, calculate the distance between any two cells in the matrix, and based on the distances between cells, cluster the cells, and further calculate the cell with the smallest distance, i.e., the most similar cell. k 10 cells, of which k =10~30; S1013, randomly select N cells, wherein the N cells are non-overlapping and distributed in all clusters, where N = 100~1000. For any feature of any cell among the N cells, calculate the feature in that cell and the cells most similar to that cell. k The average count of each cell is used to obtain N characteristic average count matrices.

[0010] For each cell type, steps S1011 to S1013 are repeated to obtain the meta-cell feature counting matrix.

[0011] In some embodiments of this application, principal component analysis (PCA) is used to reduce the dimensionality of the cell-feature counting matrix.

[0012] In some specific embodiments of this application, the cells are clustered into 10 classes.

[0013] In this application, the value of N is adjusted according to the number of cells, usually taking 1% of the number of cells of that cell type; however, when the number of cells of that cell type is less than 10,000, N is set to 100; when the number of cells of that cell type is greater than 100,000, N is set to 1000.

[0014] In some embodiments of this application, for any one of the N cells, the average count of each feature in that cell is calculated using the following formula:

[0015] in, Indicates the first cell in this cell i The average count of each feature; Indicates the first cell in this cell i Count of features, Indicates the first cell in this cell j The most similar cells i Count of features, j =1~ k Thus, we obtain the average expression count matrix of N features.

[0016] In some possible implementations of this application, in step S102, the average difference and p-value of each feature of each cell type relative to other cell types in the meta-cell feature counting matrix are calculated. In each cell type, the features are sorted in ascending order of p-value. For features with the same p-value, they are sorted in descending order of average difference. Only the top 10 features of each cell type are retained as marker features.

[0017] In some embodiments of this application, the average difference represents the average difference between the count of the feature in this cell type and the count in other cell types, characterized by the difference size log2FC, i.e., the difference fold (FC) after Log2 processing, and thus the average difference is represented by avg_log2FC.

[0018] In some possible implementations of this application, step S103 is specifically as follows: By removing features from all non-marker feature sets in the metacellular feature counting matrix, the metacellular marker feature matrix is ​​obtained. The basis matrix and the first coefficient matrix are obtained by decomposition.

[0019] in, , m Indicates the number of characteristics of the marker. Indicates the number of cellular units. Will Decompose into one dimensional basis matrix W and The first coefficient matrix of dimension ,Right now ,in, i Indicates the type of cell.

[0020] In some specific embodiments of this application, a nonnegative matrix factorization algorithm is used to... Decomposed into basis matrices W and the first coefficient matrix Non-negative matrix factorization (NMF) is an unsupervised learning algorithm designed to factor a matrix into a non-negative matrix. A 1-dimensional nonnegative matrix is ​​decomposed into two nonnegative matrices (one... A nonnegative matrix of dimension and a Non-negative matrix factorization (NMF) is the product of non-negative matrices (matrices of dimension 1). By constraining all matrix elements to be non-negative, the decomposition results are more interpretable and better suited to biological scenarios. Furthermore, NMF also helps capture key patterns in data, remove noise, and identify salient features.

[0021] In some possible implementations of this application, step S104 is specifically as follows: By removing all non-labeled features from the feature count matrix of the spatial omics data to be annotated, the spatial label feature matrix is ​​obtained. Based on the spatial marker feature counting matrix, a second coefficient matrix is ​​obtained using the basis matrix, and the second coefficient matrix is ​​used to characterize the weight values ​​of various cell types at each spatial location.

[0022] in, , Indicates the number of spatial locations. In some specific embodiments of this application, the second coefficient matrix is ​​calculated using the following formula. , , in, for A 3D matrix representing the weight values ​​of various cell types at each spatial location.

[0023] In some possible embodiments of this application, in step S104, the second coefficient matrix is ​​calculated using the negative least squares method. .

[0024] In this application, the omics data is selected from one of epigenomics data, transcriptomics data, and proteomics data.

[0025] In some possible embodiments of this application, the omics data are transcriptomics data, the features are genes, and correspondingly, the feature counts are gene expression counts.

[0026] A second aspect of this application provides a computer device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the cell type annotation method for metacellular spatial omics data as described in any of the first aspects of this application.

[0027] A third aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the cell type annotation method for metacellular spatial omics data as described in any of the first aspects of this application.

[0028] Compared with the prior art, this application has the following advantages: The method, apparatus, and media of this application generate metacells by clustering single cells, and calculate cell type features and perform non-negative matrix factorization based on the metacells to calculate cell type rights at each spatial location in spatial omics, and further obtain cell type annotation results at each spatial location. This significantly reduces the computational load of the analysis process, improves analysis efficiency, and increases the accuracy and stability of annotation.

[0029] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0030] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of this application are illustrated in the drawings by way of example and not limitation, wherein: Figure 1 A schematic diagram illustrating the implementation flow of the cell type annotation method for spatial transcriptomics data based on metacells in Embodiment 1 of this application is shown. Figure 2 The spatial distribution of astrocyte weight values ​​in Embodiment 2 of this application is shown. Figure 3 The spatial distribution of endothelial cell weight values ​​in Embodiment 2 of this application is shown. Figure 4 The distribution of neuron weight values ​​in spatial location is shown in Embodiment 2 of this application; Figure 5 The spatial distribution of the microglial cell weight values ​​in Embodiment 2 of this application is shown. Figure 6 The spatial distribution of oligodendrocyte weight values ​​in Embodiment 2 of this application is shown. Figure 7 The cell type identification results for each spatial location in Embodiment 2 of this application are shown. Detailed Implementation

[0031] Unless otherwise stated, implied from the context, or as is customary in the art, all parts and percentages in this application are based on weight, and all testing and characterization methods used are concurrent with the filing date of this application. Where applicable, any patent, patent application, or disclosure relating to this application is incorporated herein by reference in its entirety, and its equivalent patent families are also incorporated herein by reference, particularly the definitions of relevant terms in the art disclosed in such documents. If any definition of a specific term disclosed in the prior art is inconsistent with any definition provided in this application, the definition provided in this application shall prevail.

[0032] To make the technical problems, technical solutions and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments.

[0033] The following examples are used to illustrate preferred embodiments of this application. Those skilled in the art will understand that the techniques disclosed in the examples represent technologies discovered by the inventors that can be used to implement this application, and therefore can be considered preferred embodiments of this application. However, those skilled in the art should understand from this specification that many modifications can be made to the specific embodiments disclosed herein, still yielding the same or similar results, without departing from the spirit or scope of this application.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains, and all materials cited herein and referenced by them are incorporated herein by reference.

[0035] Those skilled in the art will recognize, or can learn through routine experimentation, many equivalents of specific embodiments of the invention described herein. These equivalents will be included in the claims.

[0036] Unless otherwise specified, the experimental methods used in the following examples are conventional methods. Unless otherwise specified, the instruments and equipment used in the following examples are all conventional laboratory instruments and equipment; unless otherwise specified, the experimental materials used in the following examples were all purchased from conventional biochemical reagent stores.

[0037] Example 1: A spatial transcriptome cell type annotation method based on metacells This embodiment provides a metacell-based spatial transcriptome cell type annotation method, the flowchart of which is shown below. Figure 1 As shown.

[0038] The main steps include S101 to S104, which are described in detail below: S101, the single-cell transcriptome data already containing cell type annotations is split into individual cell types, and cells of the same cell type are clustered to generate metacells. This is achieved through the following steps S1011 to S1014: S1011. Select single-cell transcriptome data of the same cell type (such as T cells), and use the NormalizeData, FindVariableFeatures, ScaleData, and RunPCA functions of the Seurat software to normalize, standardize, calculate highly variable genes, and perform PCA dimensionality reduction on the original cell-gene expression count matrix (as shown in Table 1) to obtain the cell-PCA dimensionality reduction matrix (Table 2).

[0039] Table 1. Original cell-gene expression count matrix (partial)

[0040] Table 2. Cell-PCA Dimensionality Reduction Matrix (Partial)

[0041] S1012 calculates the Euclidean distance between each cell in the cell-PCA dimensionality reduction matrix. Based on the Euclidean distance, the k-means algorithm is used to cluster the cells into 10 classes, and the KNN (k-nearest neighbor) algorithm is used to calculate the most similar (i.e., the one with the smallest Euclidean distance) cell for each class. k Cells ( k This is a hyperparameter that can be adjusted based on the number of cells. It can be set to any integer greater than 1, but is typically set to 25.

[0042] S1013, Generate meta-cells. Set the expected number of meta-cells N (N ranges from 100 to 1000, representing 1% of the total number of cells for that cell type; however, if the number of cells for that cell type is less than 10,000, N is set to 100; if the number of cells for that cell type is greater than 100,000, N is set to 1000). Randomly select N cells from the matrix (N cells must not overlap and must be distributed across all 10 clusters obtained in step S1012). Among these N cells, compare each cell with its most similar cell. k The original gene expression count matrix of each cell is combined, as shown in Table 3.

[0043] Table 3. Randomly selected cells and their nearest neighbors. k Original expression profile of individual cells (partial)

[0044] The average gene expression count in randomly selected cells can be calculated using the following formula:

[0045] in, Indicates the first cell in a randomly selected cell i Average expression count of each gene; Indicates the first cell in a randomly selected cell i Expression count of each gene, Indicates the randomly selected cell number. j The most similar cells i Expression count of each gene, j =1~ k .

[0046] Thus, N cells generate N gene average expression count matrices, and each gene average expression count matrix is ​​a metacellular gene expression count matrix, that is, N metacellular gene expression count matrices are generated, as shown in Table 4.

[0047] Table 4. Gene expression counting matrix of N metacells (partial)

[0048] S1014. Repeat steps S1011 to S1013 for single-cell transcriptome data of each cell type, that is, obtain N metacell gene expression count matrices for each cell type. After merging, the complete metacell gene expression count matrix corresponding to the single-cell transcriptome data of this embodiment is obtained, that is, the metacell count matrix.

[0049] S102: After normalizing and correcting the sequencing depth of the metacell count matrix, the marker genes for each cell type are calculated.

[0050] The matrix was normalized and sequence depth corrected using the NormalizeData function in the Seurat software, and the processed matrix was called the metacellular data matrix. The FindAllMarkers function and Wilcox differential test method in the Seurat software were used to calculate the avg_log2FC (fold change after log2 treatment) and p-value (i.e., significance level) for each gene of each cell type in the metacellular data matrix. Essentially, this involves performing a Wilcox rank-sum test on the genes of each individual cell type against the genes of all remaining cell types to identify genes with high expression specific to each cell type. Within each cell type, genes were sorted by p-value from smallest to largest; for genes with the same p-value, they were sorted by avg_log2FC from largest to smallest. Only the top 10 marker genes for each cell type were retained (as shown in Table 5), and the marker genes of all cell types were merged to generate a marker gene set.

[0051] Table 5. Top 10 marker genes for each cell type (partial list)

[0052] S103, the genes that have been removed from the metacellular data matrix, which contains all non-marker gene sets, are called the metacellular marker gene data matrix, i.e., a... dimensional matrix ,in m Indicates the number of marker genes, This represents the number of elementary cells. The matrix is ​​decomposed using a nonnegative matrix factorization algorithm. Decompose into one dimensional basis matrix W and dimensional coefficient matrix ,Right now .in, i Indicates the type of cell.

[0053] S104, the spatial location-gene expression count matrix of the spatial transcriptome data is normalized and sequence depth corrected using the NormalizeData function in Seurat software. Similarly, genes from all non-marker gene sets are removed to generate a spatial marker gene data matrix, i.e., a... dimensional matrix ,in This represents the number of spatial locations. The nonnegative least squares method is used to calculate... coefficient matrix in .in for A 3D matrix represents the weight values ​​of various cell types at each spatial location. For each spatial location, the cell type with the highest weight value is used as the cell type annotation for that spatial location.

[0054] Example 2: Application of a metacell-based spatial transcriptome cell type annotation method This embodiment provides an application of a metacell-based spatial transcriptome cell type annotation method. Cell type annotation is performed on high-resolution spatial transcriptome data of the mouse whole brain using single-cell transcriptome data, as shown in Example 1.

[0055] The raw spatial transcriptome data are shown in Table 6. Subsequently, normalization and sequencing depth correction were performed using the NormalizeData function in the Seurat software. Similarly, all genes not in the marker gene set were removed, generating a spatial marker gene data matrix, i.e., the matrix... As shown in step S104, the non-negative least squares method is used to calculate the weight values ​​of various cell types at each spatial location (as shown in Table 7 and...). Figures 2-6The cell type with the highest weight value is used as the cell type annotation for that spatial location (as shown in Table 8 and...). Figure 7 ).

[0056] Table 6. Spatial location-gene expression count matrix of the original spatial transcriptome.

[0057] Table 7 Weight values ​​of various cell types at each spatial location

[0058] Table 8. Cell type identification results at each spatial location.

[0059] All references to this application are incorporated herein by reference as if each reference were individually incorporated herein by reference. Furthermore, it should be understood that after reading the foregoing teachings of this application, those skilled in the art can make various alterations or modifications to this application, and these equivalent forms also fall within the scope defined by the appended claims.

Claims

1. A spatial omics cell type annotation method, characterized in that, Includes the following steps: S101, the single-cell omics data with cell type annotation is split according to cell type, cells of the same cell type are clustered and generated into metacells, and a metacell feature counting matrix is ​​obtained, wherein the single-cell omics data is single-cell transcriptome data; S102, Based on the meta-cell feature counting matrix, calculate the specific marker features of each cell type relative to other cell types, and merge the marker features of all cell types to generate a marker feature set; S103, Based on the aforementioned meta-cell feature counting matrix, calculate the basis matrix of each cell type marker feature using a non-negative matrix factorization algorithm; S104. Based on the feature counting matrix of the spatial omics data to be annotated, the cell type weight value corresponding to each spatial location is calculated using the negative least squares method using the basis matrix, and the cell type with the highest weight value is taken as the cell type annotation for that spatial location.

2. The spatial omics cell type annotation method according to claim 1, characterized in that, Step S101 is achieved through the following steps: S1011, For single-cell omics data of the same cell type, the cell-feature count matrix is ​​reduced in dimension to obtain the cell dimension-reduced matrix; S1012, Based on the cell dimensionality reduction matrix, calculate the distance between any two cells in the matrix, and based on the distances between cells, cluster the cells, and further calculate the cell with the smallest distance, i.e., the most similar cell. k 10 cells, of which k =10~30; S1013, randomly select N cells, wherein the N cells are non-overlapping and distributed in all clusters, where N = 100~1000. For any feature of any cell among the N cells, calculate the feature in that cell and the cells most similar to that cell. k The average count of each cell is used to obtain N characteristic average count matrices. For each cell type, steps S1011 to S1013 are repeated to obtain the meta-cell feature counting matrix.

3. The spatial omics cell type annotation method according to claim 1, characterized in that, In step S102, the average multiple and p-value of each feature of each cell type relative to other cell types in the meta-cell feature counting matrix are calculated. In each cell type, the features are sorted in ascending order of p-value. For features with the same p-value, they are sorted in descending order of average difference. Only the top 10 features of each cell type are retained as marker features.

4. The spatial omics cell type annotation method according to claim 1, characterized in that, Step S103 is as follows: The features in all non-marker feature sets in the meta-cell feature counting matrix are removed to obtain the meta-cell marker feature counting matrix, and then decomposed to obtain the base matrix and the first coefficient matrix.

5. A spatial omics cell type annotation method according to claim 4, characterized in that, Step S104 is as follows: Features from all non-label feature sets in the feature count matrix of the spatial omics data to be annotated are removed to obtain a spatial label feature count matrix. Based on the spatial label feature count matrix, a second coefficient matrix is ​​obtained using the basis matrix. The second coefficient matrix is ​​used to represent the weight values ​​of various cell types at each spatial location.

6. A spatial omics cell type annotation method according to any one of claims 1 to 5, characterized in that, The omics data are selected from one of the following: epigenomics data, transcriptomics data, and proteomics data.

7. A computer device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1-6.