Cell annotation method and device, electronic equipment and storage medium
By constructing biological knowledge relationship data and entity atlases for cell annotation, the problem of existing methods' dependence on large-scale data is solved, and flexible and efficient cell annotation is achieved, which can adapt to the identification and classification of diverse cell types.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING HUADA BIO & INFORMATION FUSION TECHNOLOGY RESEARCH CO LTD
- Filing Date
- 2025-12-15
- Publication Date
- 2026-04-21
AI Technical Summary
Existing cell annotation methods rely on large-scale, high-quality single-cell expression data for model training, resulting in poor flexibility, difficulty in adapting to small-scale or specific samples, high network complexity, large computational overhead, and difficulty in efficient integration in scenarios with limited hardware resources or diverse scenarios.
By constructing biological knowledge relationship data, using entity graphs or adjacency matrices for relationship reasoning, determining target nodes based on target genes for cell annotation, reducing dependence on large-scale training data, employing energy transfer mechanisms for information transfer, and controlling energy transfer paths to improve flexibility and efficiency.
It reduces data requirements, improves the flexibility and efficiency of cell annotation, adapts to diverse cell annotation tasks, reduces computational complexity, and enhances the interpretability and biological credibility of the results.
Smart Images

Figure CN121415883B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of bioinformatics, specifically to a cell annotation method and apparatus, electronic device and storage medium. Background Technology
[0002] Cell annotation is the process of assigning specific biological labels (such as cell type, functional state, or developmental stage) to cells by analyzing their gene expression patterns, aiming to reveal the specific role of cells in tissues or physiological systems.
[0003] In related technologies, cell annotation can be achieved through methods such as deep learning annotation. However, these methods typically rely on large-scale, high-quality single-cell expression data for model training and often suffer from complex network structures. Thus, the flexibility of these methods is limited. Summary of the Invention
[0004] The main objective of this application is to provide a cell annotation method, apparatus, electronic device, and storage medium, which aims to improve the flexibility of cell annotation.
[0005] To achieve the above objectives, a first aspect of this application proposes a cell annotation method, the method comprising: constructing biological knowledge relation data, wherein the biological knowledge relation data is used to represent biological relationships between different biological entities; acquiring gene expression data of the target sample, determining a target gene based on the gene expression data, and determining the biological entity corresponding to the target gene in the biological knowledge relation data as a starting node; performing relation reasoning in the biological knowledge relation data based on the starting node to determine a target node, so as to perform cell annotation based on the biological entity represented by the target node.
[0006] In some embodiments, the biological knowledge relationship data is an entity graph, which includes multiple nodes and multiple edges. Each node represents a biological entity, and each edge represents a biological relationship between two associated nodes. The target node includes a first target annotation node. The step of performing relationship reasoning based on the starting node in the biological knowledge relationship data to determine the target node, and then performing cell annotation based on the biological entity represented by the target node, includes: determining the energy value of each starting node based on the expression level of the target gene; performing energy transfer along the corresponding edge in the entity graph according to the energy value and a first preset transfer condition; and after all starting nodes have completed energy transfer, determining the first target annotation node based on the endpoint node in the entity graph that received the energy, and then performing cell annotation based on the biological entity represented by the first target annotation node.
[0007] In some embodiments, the step of transferring energy to each starting node along the corresponding edge in the entity graph according to the energy value and the first preset transfer condition includes: for each starting node, determining the energy receiving node for each round of energy transfer in the entity graph according to the first preset transfer condition, and the energy allocation ratio of each energy receiving node; performing multiple rounds of energy transfer according to the energy value of each starting node, the energy receiving node for each round of energy transfer corresponding to each starting node, and the energy allocation ratio of each energy receiving node, wherein the energy receiving node corresponding to the last round of energy transfer is determined as the endpoint node.
[0008] In some embodiments, a method for determining the energy allocation ratio of each energy receiving node includes: for each round of energy transfer, determining the attribute values corresponding to the edges associated with the energy allocation node and the energy receiving node; wherein, in the first round of energy transfer, the starting node is identified as the energy allocation node; and based on the attribute values corresponding to all edges in each round of energy transfer, normalizing the attribute values of each edge in each round of energy transfer, so as to determine the energy allocation ratio of the energy receiving node associated with each edge in each round of energy transfer based on the normalization result.
[0009] In some embodiments, a method for determining the attribute value corresponding to an edge between an associated energy distribution node and an energy receiving node includes: constructing a relationship group based on the biological relationship represented by the edge between the associated energy distribution node and the energy receiving node, the energy distribution node and the energy receiving node; determining the repetition frequency of the relationship group in the entity graph, and determining the repetition frequency as the attribute value of the edge; or, determining the confidence level of the relationship group, and determining the confidence level as the attribute value of the edge.
[0010] In some embodiments, a method for determining the energy allocation ratio of each energy receiving node includes: for each round of energy transfer, calculating the expression feature similarity between the starting node and the energy receiving node to obtain an expression similarity weight; determining the graph distance between the starting node and the energy receiving node in the entity graph, and determining an energy attenuation factor based on the graph distance; and determining the energy allocation ratio of the energy receiving node based on the energy attenuation factor and the expression similarity weight.
[0011] In some embodiments, determining the energy receiving node for each round of energy transfer in the entity graph according to the first preset transfer conditions includes: for each starting node, determining multiple first candidate transfer paths in the entity graph according to the preset maximum transfer step size, edge type, and transfer direction; filtering the multiple first candidate transfer paths according to the preset endpoint type to obtain a first target transfer path; determining the energy receiving node for each round of energy transfer according to the first target transfer path; wherein the node corresponding to the endpoint of the first target transfer path is determined as the endpoint node.
[0012] In some embodiments, the step of performing multiple rounds of energy transfer based on the energy value of each starting node, the energy receiving node corresponding to each starting node in each round of energy transfer, and the energy allocation ratio of each energy receiving node includes: for each starting node, performing multiple rounds of energy transfer based on the energy value of each starting node, the energy receiving node corresponding to each starting node in each round of energy transfer, and the energy allocation ratio of each energy receiving node, until the energy transfer stop condition is met; wherein, the energy transfer stop condition includes: after completing the energy transfer of the current round, the energy gradient change of all energy receiving nodes corresponding to the current round is less than a first preset threshold, and the node coverage data determined based on the energy receiving nodes of the current round is less than a second preset threshold.
[0013] In some embodiments, determining the first target annotation node based on the endpoint nodes that received energy in the entity graph after all starting nodes have completed energy transfer includes: determining the total energy received by each endpoint node after all starting nodes have completed energy transfer; sorting all endpoint nodes in descending order based on the total energy; and determining the endpoint nodes with the highest total energy as the first target annotation node based on the sorting result; wherein N is a positive integer greater than 1.
[0014] In some embodiments, the biological knowledge relationship data is an entity graph, which includes multiple nodes and multiple edges. Each node represents a biological entity, and each edge represents a biological relationship between two associated nodes. The target node includes a second target annotation node. The step of performing relationship reasoning based on the starting node in the biological knowledge relationship data to determine the target node, and then performing cell annotation based on the biological entity represented by the target node, includes: determining a second candidate transmission path for each starting node in the entity graph according to a second preset transmission condition, and determining the attribute value of each edge in each second candidate transmission path; adjusting... A pre-trained path scoring model is used to score each second candidate transmission path corresponding to each starting node based on the attribute value of each edge in the second candidate transmission path, the biological relationship of each edge, and the path parameters of the second candidate transmission path, to obtain the path score. The multiple second candidate transmission paths are sorted in descending order according to the path score. The second candidate transmission path with the top M path scores is determined as the second target transmission path, and the endpoint node in the second target transmission path is determined as the second target annotation node, so as to perform cell annotation based on the biological entity represented by the second target annotation node; where M is a positive integer greater than 1.
[0015] In some embodiments, the training method of the path scoring model includes: acquiring sample genes, determining the sample initiation node and sample transfer path corresponding to the sample genes in the entity graph, and determining the sample energy value of each sample initiation node based on the expression level of the sample genes; performing energy transfer based on the sample energy value of each sample initiation node and the sample transfer path, and determining the label annotation node from the endpoint of the sample transfer path based on the energy transfer result; calling the path scoring model to score each sample transfer path corresponding to each sample initiation node based on the attribute value of each edge in the sample transfer path, the biological relationship of each edge, and the path parameters of the sample transfer path, to obtain a sample path score; sorting multiple sample transfer paths in descending order based on the sample path scores, and determining the sample transfer path with the top M scores as the predicted target transfer path based on the sorting result; and adjusting the parameters of the path scoring model based on the endpoint node of the predicted target transfer path and the label annotation node.
[0016] In some embodiments, the biological knowledge relationship data is an adjacency matrix, where the row and column nodes of the adjacency matrix are biological entities. The value of the adjacency matrix is determined based on the biological relationship between two corresponding biological entities. The target node includes a third target annotation node. The step of performing relationship reasoning based on the starting node in the biological knowledge relationship data to determine the target node, and then performing cell annotation based on the biological entity represented by the target node, includes: determining the energy value of each starting node based on the expression level of the target gene; constructing an energy vector based on the energy value of each starting node; multiplying each energy vector with the adjacency matrix to obtain an energy distribution vector; and then using the obtained energy distribution vector to determine the third target annotation node, and performing cell annotation based on the biological entity represented by the third target annotation node.
[0017] To achieve the above objectives, a second aspect of this application provides a cell annotation apparatus, the apparatus comprising:
[0018] An expression data construction unit is used to construct biological knowledge relationship data, wherein the biological knowledge relationship data is used to represent the biological relationships between different biological entities;
[0019] A node determination unit is used to acquire gene expression data of the target sample, determine the target gene based on the gene expression data, and determine the biological entity in the biological knowledge relationship data corresponding to the target gene as the starting node;
[0020] A cell annotation unit is used to determine the biological entities for cell annotation from the biological knowledge relationship data based on the starting node.
[0021] To achieve the above objectives, a third aspect of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.
[0022] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0023] The cell annotation method, apparatus, electronic device, and storage medium proposed in this application transform the cell annotation problem into a process of determining target nodes that are related to the starting node from the biological knowledge relation data based on the target gene by constructing biological knowledge relation data that integrates multiple types of biological entities and relationships. This allows the application to transfer information using biological knowledge relation data without relying on large-scale training data, thereby reducing the amount of data required and improving the flexibility of cell annotation. Attached Figure Description
[0024] The accompanying drawings are provided to further understand the technical solutions of this disclosure and constitute a part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure.
[0025] Figure 1 This is a flowchart of the cell annotation method provided in the embodiments of this application;
[0026] Figure 2 This is a schematic diagram illustrating the expression of the target gene in different cell populations according to embodiments of this application;
[0027] Figure 3 This is provided by the embodiments of this application. Figure 1 A flowchart of an embodiment of step S103;
[0028] Figure 4 This is provided by the embodiments of this application. Figure 3 A flowchart of an embodiment of step S301;
[0029] Figures 5 to 6B This is a schematic diagram of the cell annotation results provided in the embodiments of this application;
[0030] Figure 7 This is provided by the embodiments of this application. Figure 1 Flowchart of another embodiment of step S103;
[0031] Figure 8 This is provided by the embodiments of this application. Figure 1 Flowchart of another embodiment of step S103;
[0032] Figure 9 This is a schematic diagram of the cell annotation device provided in the embodiments of this application;
[0033] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this disclosure.
[0035] Cell annotation is the process of assigning specific biological labels (such as cell type, functional state, or developmental stage) to cells by analyzing their gene expression patterns, aiming to reveal the specific role of cells in tissues or physiological systems. The core function of cell annotation is to identify the functional identity of cells, assist in constructing cell lineage maps, reveal disease-related cell populations, and play a crucial role in tissue development and disease mechanism research.
[0036] The purpose of cell annotation is to infer the potential relationships between cells and reference cell types based on certain biological information inputs (such as differentially expressed genes, known biomarker genes, spatial location information, etc.), ultimately achieving efficient identification and classification of unknown cell populations. With the development of single-cell omics and graph modeling methods, more and more research is modeling cell annotation as a problem of node identification and path reasoning in a graph. Current modeling methods related to graph diffusion in cell annotation tasks can be broadly categorized as follows:
[0037] 1. Adjacency propagation method: Propagate known labeling information within a one-hop neighborhood to quickly identify directly connected target nodes. This method is simple but does not support cross-level propagation.
[0038] 2. Centrality ranking method: This method evaluates the importance of nodes based on their connectivity or intermediary status in the graph structure. It is often used for unsupervised annotation, but it ignores the semantic information of the source nodes.
[0039] 3. Random walk model: Random path sampling is performed starting from the source node to form the access probability distribution of the target node. It can cover a multi-hop range, but the path control is poor.
[0040] 4. Graph embedding method: Maps nodes in the graph to vectors, and relies on vector distance for clustering or matching annotation labels. It has strong expressive power but lacks the interpretability of explicit paths.
[0041] 5. Graph Neural Networks: They achieve node representation learning through multi-layer feature aggregation, making them suitable for supervised learning frameworks, but it is difficult to finely control the edge type and direction of each hop.
[0042] In addition, cell annotation can be achieved through methods such as deep learning annotation, but these methods have the following problems:
[0043] 1. Large data requirements and strong dependence on model training:
[0044] Current mainstream deep learning annotation methods, such as scDeepSort and scANVI, generally rely on large-scale, high-quality single-cell expression data for training. Model accuracy often improves with the increase in data volume and diversity. If there are insufficient samples, the model is prone to overfitting or insufficient generalization ability, making it difficult to adapt to small-scale or specific samples.
[0045] 2. High network complexity:
[0046] Most existing deep annotation methods tend to have complex network structures, such as stacked Transformer or GNN layers, resulting in a large number of parameters and high computational overhead during training and inference. For scenarios with limited hardware resources or restricted application scenarios, these models lack deployment flexibility and are difficult to integrate efficiently into annotation workflows with multiple scenarios and multiple samples.
[0047] 3. Insufficient utilization of prior knowledge of the graph structure:
[0048] Methods such as scANVI and OnClass focus on embedding learning or ontology label representation, but lack explicit modeling of the relational structure in the graph itself. The model training results are sensitive to data distribution and ontology label quality.
[0049] 4. Poor adaptability, limited to a single similar type of annotation:
[0050] Current deep annotation models mostly rely on a single model trained globally, lacking the ability to adjust annotation strategies with fine granularity based on different samples or biological scenarios. These models are typically designed for typical cell types in the training set, making it difficult to flexibly extend to diverse cell annotation needs across tissues or species, thus limiting their applicability in complex biological networks.
[0051] Existing deep annotation models typically target only fixed, typical cell types during the global training phase, making it difficult to flexibly adjust annotation strategies based on new samples or different biological scenarios. This limits the applicability of this method in cross-tissue, cross-species, and diverse annotation tasks.
[0052] In summary, the methods in the relevant technologies suffer from a lack of flexibility.
[0053] Based on this, embodiments of this application provide a cell annotation method and apparatus, an electronic device and a storage medium, which can improve the flexibility of cell annotation.
[0054] The cell annotation method provided in this application relates to the field of bioinformatics. This cell annotation method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the cell annotation method, but is not limited to the above forms.
[0055] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0056] The cell annotation method provided in the embodiments of this application will be described below.
[0057] Reference Figure 1 In some embodiments, the cell annotation method provided in this application includes, but is not limited to, steps S101 to S103.
[0058] Step S101: Construct biological knowledge relationship data, wherein the biological knowledge relationship data is used to represent the biological relationships between different biological entities;
[0059] Step S102: Obtain gene expression data of the target sample, determine the target gene based on the gene expression data, and determine the biological entity corresponding to the target gene in the biological knowledge relationship data as the starting node;
[0060] Step S103: Based on the starting node, perform relational reasoning in the biological knowledge relational data to determine the target node, and then perform cell annotation based on the biological entity represented by the target node.
[0061] In step S101 of some embodiments, biological knowledge relationship data can be constructed based on known biological knowledge. Biological knowledge relationship data refers to a carrier that formally represents biological entities and the relationships between them using a computer-processable data structure. Biological knowledge relationship data can be a graph structure, an adjacency matrix structure, etc., without specific limitations. Biological entities include objects with clear biological significance such as genes, proteins, cells, cell types, biological pathways, and physiological functions. Biological relationships include associations that have been experimentally verified or reported in the literature, such as expression regulation, pathway participation, functional annotation, and physical interactions.
[0062] In step S102 of some embodiments, the target sample can refer to the sample to be annotated by cells. The target sample can be a plant sample, an animal sample, etc., and is not limited thereto. Gene expression data can refer to data obtained through single-cell RNA sequencing technology. Gene expression data can be quantitative data reflecting the transcriptional activity level of each gene in each cell of the target sample. Using methods such as differential expression analysis or significance screening, the target gene is determined based on the gene expression data. The biological entity corresponding to the target gene is located in the constructed biological knowledge relationship data, and these biological entities are determined as the starting nodes for subsequent energy propagation. The embodiments of this application do not set up a complex initialization model, but determine the starting node through prior biological knowledge or highly reliable experimental results (such as differential expression analysis results), thus ensuring the biological reliability of the propagation source.
[0063] In some embodiments, step S102 may include, but is not limited to, the following steps:
[0064] Differential expression analysis was performed on gene expression data, and candidate genes for the target cell population in the target sample were determined based on the results of the differential expression analysis.
[0065] Identify the target gene from the candidate genes.
[0066] In this embodiment, after obtaining gene expression data, cell groups can be segmented based on the gene expression data (i.e., cells are divided into different cell groups based on the similarity of gene expression patterns). Then, the expression data of all cells in the target cell group (i.e., the selected cell group for cell annotation analysis) can be compared with the expression data of other cell groups. For example, statistical tests (such as Wilcoxon rank) can be used to calculate the significance (usually measured by p-value) and magnitude of change (measured by |log2(FoldChange)|) of each gene expression difference in the target cell group. Thus, genes meeting the significance threshold can be screened from all genes corresponding to the target cell group based on a preset significance threshold (such as |log2(FoldChange)| > 1 and p-value < 0.05, etc., without specific limitations), and these genes are identified as candidate genes.
[0067] After identifying candidate genes, target genes for energy propagation initiation can be selected from the candidate gene set. The selection method can be adaptively chosen based on actual needs, without specific limitations. For example, a threshold selection method can be used, selecting the top N most significant candidate genes as target genes (the value of N is not specifically limited). Alternatively, a knowledge base filtering method can be used, matching candidate genes with known databases and retaining genes with clear biological annotations.
[0068] Specifically, the raw single-cell RNA-seq expression matrix (i.e., gene expression data) of the target sample can first undergo standard preprocessing, including cell and gene filtering, normalization, logarithmic transformation, principal component analysis (PCA), adjacency graph construction, and cluster analysis, and then be visualized using UMAP. Subsequently, differential expression analysis (DEG) is used to identify the top 20 marker hypervariable genes (i.e., target genes) in each cell cluster, and these target genes are exported for subsequent cell annotation analysis. Figure 2 As shown, the expression of target genes screened based on differential expression analysis in different cell populations is illustrated. Figure 2 In the graph, the horizontal axis represents the target gene, and the vertical axis represents different cell populations. The color depth of each point in the graph represents the average expression level of the target gene in the cell population; the darker the color, the higher the expression level. The size of each point represents the proportion of cells in the cell population that express the target gene; the larger the point, the higher the proportion of cells expressing the gene.
[0069] The embodiments of this application are based on differential expression analysis, which uses candidate genes with significant and biological meaning as target genes. This reduces the randomness and noise interference in the selection of starting nodes, thereby improving the accuracy and interpretability of cell annotation.
[0070] In step S103 of some embodiments, relational reasoning is performed from the starting node in the biological knowledge relation data to determine the biological entities related to cell annotation. This process can be achieved by traversing the biological relation network defined in the biological knowledge relation data, exploring various biological entities reachable from the starting node, thereby determining the target node ultimately used for cell annotation of the starting node (or the cell group corresponding to the starting node). Cell annotation is then performed based on the biological entities represented by the target node.
[0071] The cell annotation method proposed in this application transforms the cell annotation problem into a process of determining target nodes that are related to the starting node from the biological knowledge relation data based on the target gene by constructing biological knowledge relation data that integrates multiple types of biological entities and relationships. This allows the application to transfer information using biological knowledge relation data without relying on large-scale training data, thereby reducing the amount of data required and improving the flexibility of cell annotation.
[0072] The following sections will explain the cases where biological knowledge relationship data is in graph structure and adjacency matrix structure, respectively. First, let's explain the graph structure case.
[0073] Reference Figure 3 In some embodiments, the biological knowledge relationship data is an entity graph, which includes multiple nodes and multiple edges. Nodes represent biological entities, and each edge represents the biological relationship between two associated nodes. The target node includes a first target annotation node. Step S103 may include, but is not limited to, steps S301 to S302.
[0074] Step S301: Determine the energy value of each starting node based on the expression level of the target gene, and transfer energy to each starting node along the corresponding edge in the entity graph according to the energy value and the first preset transfer condition.
[0075] Step S302: After all starting nodes have completed energy transfer, determine the first target annotation node based on the endpoint node that received energy in the entity map, so as to perform cell annotation based on the biological entity represented by the first target annotation node.
[0076] First, let's explain entity graphs. Entity graphs are constructed based on known biological knowledge and can consist of two main components: nodes and edges. Nodes represent different types of biological entities, such as cells, genes, annotation tags (e.g., cell type), and functional pathways (e.g., metabolic or signal transduction pathways). Edges describe the known biological relationships between nodes, such as a cell "expressing" a gene, a cell "belonging to" a certain type, or a gene being a "marker" of a pathway. Furthermore, these biological relationships represented by edges (i.e., "expressing," "belonging to," etc.) can be further quantified using attribute parameters (e.g., weights, frequency, confidence). Weights represent the strength of the relationship (e.g., the expression level of a gene in a cell), frequency represents the frequency with which the relationship appears in the database used to construct the entity graph (frequency can be used to assess the prevalence of the relationship, thus helping to screen for highly prevalent biological relationships and reduce random noise), and confidence can be assigned based on the reliability of biological knowledge or experimental data. Specifically, entity graphs can be constructed using graph databases such as Neo4j. By transforming biological knowledge into directed edges with attributes, a network structure (i.e., entity graph) that facilitates structured querying and dynamic path filtering can be formed. The entity graph constructed in this application embodiment allows the coexistence of different types of nodes and multiple types of edges, enabling the entity graph to express complex structures.
[0077] In step S301 of some embodiments, an energy value can be assigned to the starting node. The energy value is positively correlated with the expression level of the corresponding target gene in the target cell population, that is, the higher the expression level, the greater the energy value. The energy transfer process can follow the law of conservation of physical energy (that is, energy is only transferred along the path without being consumed). The energy is controlled by the first preset transfer condition to start from the starting node and transfer energy to other nodes along the edges in the entity graph.
[0078] Reference Figure 4 In some embodiments, step S301 may include, but is not limited to, steps S401 to S402.
[0079] Step S401: For each starting node, determine the energy receiving node for each round of energy transfer and the energy allocation ratio of each energy receiving node in the entity map according to the first preset transfer conditions.
[0080] Step S402: Perform multiple rounds of energy transfer based on the energy value of each starting node, the energy receiving node corresponding to each starting node in each round of energy transfer, and the energy allocation ratio of each energy receiving node. The energy receiving node corresponding to the last round of energy transfer is determined as the endpoint node.
[0081] In step S401 of some embodiments, during the initialization phase of energy transfer based on entity graphs, a first preset transfer condition needs to be configured for each starting node to guide the energy transfer process. The starting node serves as the initiator of the energy transfer. The first preset transfer condition can refer to conditions pre-set to control the energy transfer range and semantic relevance. Energy receiving nodes can refer to node entities that meet the first preset transfer condition and are directly or indirectly connected to the starting node in each energy transfer round; these nodes form effective connections with the starting node through predefined edge relationships. The energy allocation ratio can refer to the ratio used to allocate the energy of the current node to its downstream neighboring nodes during the energy transfer process.
[0082] In some embodiments, determining the energy receiving node for each round of energy transfer in the entity map according to a first preset transfer condition includes:
[0083] For each starting node, multiple first candidate transmission paths are determined in the entity graph based on the preset maximum transmission step size, edge type, and transmission direction;
[0084] The first target transmission path is obtained by filtering multiple first candidate transmission paths according to the preset endpoint type.
[0085] The energy receiving node for each round of energy transfer is determined based on the first target transfer path; wherein, the node corresponding to the end point of the first target transfer path is determined as the end point node.
[0086] In this embodiment, the first preset transmission condition may include a maximum transmission step size, edge type, transmission direction, and endpoint type. The maximum transmission step size can refer to an upper limit on the energy diffusion depth set according to needs (such as computational cost and biological interpretability), for example, limiting energy propagation to a maximum of 3 steps to reduce computational cost while maintaining biological interpretability. The edge type is used to constrain energy to be transmitted only through biologically related edges with specific semantics, for example, only allowing energy transmission along edges of the "expression" type, to ensure that the energy transmission path conforms to the biological scenario under study (such as a gene-cell research scenario). The transmission direction is used to control the flow of energy along the edge, and the transmission direction can be divided into forward transmission and reverse transmission. Forward transmission indicates diffusion from the starting node to the downstream node, while reverse transmission indicates backtracking from the endpoint node upstream. For example, in the relationship "cell expresses gene," forward transmission means starting from the gene node and spreading along the "expression" edge to the corresponding cell node. Reverse transmission means spreading against the direction of the edge, such as starting from the cell node and moving backward along the "expression" edge back to the gene node where the cell expresses the gene. Setting the propagation direction can control the semantics of diffusion; for example, forward propagation is used for functional inference, and backward propagation is used for source tracing analysis. Based on the three first preset propagation conditions of maximum propagation step size, edge type, and propagation direction, a path traversal algorithm or other methods are used to start from each starting node and record all paths that meet the requirements of propagation step size, edge type, and propagation direction, thereby obtaining multiple first candidate propagation paths corresponding to each starting node.
[0087] Then, these first candidate propagation paths can be filtered based on the endpoint type. The endpoint type can refer to the predefined biological entity category of the endpoint node. For example, the biological entity of the endpoint node can be limited to only "cell type" to prevent energy from diffusing to irrelevant nodes. Understandably, in addition to limiting the type of endpoint node, the type of intermediate node can also be set according to actual needs, without restriction.
[0088] Based on the endpoint type, first candidate transmission paths that do not meet the endpoint node requirements can be filtered out, and the final retained first candidate transmission paths are designated as the first target transmission paths. Thus, non-starting nodes in the first target transmission path can be identified as energy receiving nodes for each round of energy transfer, and the node corresponding to the endpoint of the first target transmission path can be identified as the endpoint node. In other words, the first target transmission path is an ordered sequence of edges starting from the starting node, passing through multiple intermediate nodes, and finally reaching the endpoint node that meets the conditions. The first target transmission path provides a structured channel for energy allocation.
[0089] Understandably, nodes with different hop counts can be divided into different levels. For example, Level 0 is the starting node, Level 1 is a node reachable in one step (also the energy receiving node for the first round of energy transfer), and Level 2 is a node reachable in two steps (also the energy receiving node for the second round of energy transfer). In this way, different types of edges can be set to be allowed only at specific levels according to actual needs, thereby achieving hierarchical control of paths.
[0090] This application's embodiments achieve precise control and efficient screening of energy transfer paths by setting multi-dimensional constraints such as maximum transfer step size, edge type, transfer direction, and endpoint type. Furthermore, the first preset transfer condition ensures that energy transfer follows biological semantic rules, and the endpoint type limitation enhances the direct relevance of the annotation target, ultimately reducing computational complexity while improving the reliability and interpretability of cell annotation results.
[0091] In some embodiments, the method for determining the energy allocation ratio of each energy receiving node may include, but is not limited to, the following steps:
[0092] For each round of energy transfer, determine the attribute values corresponding to the edges between the associated energy distribution nodes and energy receiving nodes; in the first round of energy transfer, the starting node is identified as the energy distribution node.
[0093] Based on the attribute values corresponding to all edges in each round of energy transfer, the attribute values of each edge in each round of energy transfer are normalized, so as to determine the energy allocation ratio of the energy receiving node associated with each edge in each round of energy transfer based on the normalization result.
[0094] In this embodiment, in each energy transfer round, the energy distribution node can refer to the node that distributes energy downstream, and the energy receiving node can refer to the node that receives the energy distributed by the energy distribution node. The energy distribution node and the energy receiving node can be connected by directed edges. For example, when the first round of energy transfer starts from the starting node, the energy distribution node can refer to the starting node, and the energy receiving node can refer to the downstream adjacent node of the starting node in the first target transfer path. Attribute values represent the values corresponding to the attribute parameters of the edges.
[0095] Thus, in each round of energy transfer, the energy allocation ratio of each energy receiving node can be determined by normalizing the attribute values corresponding to all edges. Specifically, normalization refers to scaling the attribute values of all edges corresponding to the same energy allocation node so that the sum of all attribute values is 1. Then, the energy allocation ratio can be determined based on the normalization result. For example, taking the first round of energy transfer as an example. Assume the starting node is node A, which includes two adjacent nodes: node B and node C. The attribute value of edge A→B is 0.8, and the attribute value of edge A→C is 0.4. After normalization, the attribute value of edge A→B is normalized to 0.667, and the attribute value of A→C is normalized to 0.333. Thus, 0.667 can be determined as the energy allocation ratio for node B, and 0.333 as the energy allocation ratio for node C, ensuring that the energy transfer process conforms to the law of conservation of energy, while allowing energy receiving nodes connected by edges with higher attribute values to receive a larger share of energy.
[0096] It is understandable that when an attribute parameter includes multiple parameter dimensions, one can choose the parameter value of one dimension as the attribute value, or perform weighted processing on multiple parameters and use the processing result as the attribute value; there are no specific restrictions on this.
[0097] Furthermore, in some embodiments, "repressive" nodes can be introduced during the construction of entity maps to simulate the influence of certain repressive genes or negative regulatory factors in biological networks. For these nodes, the attribute values of the corresponding edges can be set to negative values during energy transfer, thus inhibiting the energy of adjacent nodes. This approach can simulate the coexistence of promoting and repressive regulatory relationships in real biological networks, improving the biological reliability and interpretability of cell annotation results.
[0098] In some embodiments, a method for determining the attribute values corresponding to the edges between associated energy distribution nodes and energy receiving nodes includes:
[0099] Relationship groups are constructed based on the biological relationships represented by the edges between associated energy distribution nodes and energy receiving nodes, as well as the energy distribution nodes and energy receiving nodes.
[0100] Determine the repetition frequency of relation groups in the entity graph and assign the repetition frequency as the attribute value of the edge; or, determine the confidence of relation groups and assign the confidence as the attribute value of the edge.
[0101] In this embodiment, the attribute parameter may include repetition frequency or confidence level. The repetition frequency can be determined based on relation groups. Specifically, a relation group can refer to a complete relation triple consisting of the biological relation represented by the edge and the two nodes connected by the edge (i.e., an energy-distributing node and an energy-receiving node), for example, in the form of "cell X-expression-gene Y". The repetition frequency can be used to describe the frequency of occurrence of the relation group in the entity graph, reflecting the prevalence of the biological relation corresponding to the relation group in the entity graph. By assigning the repetition frequency statistic as an attribute value to the corresponding edge, relation paths with higher prevalence and a greater likelihood of representing stable biological laws can be preferentially selected during energy transfer, thereby reducing the interference of random associations on the annotation results.
[0102] Confidence score is a quantitative assessment of the reliability of a relation group based on external evidence. Specifically, it can be generated by integrating the strength of support from literature, experimental validation results, or consistency scores from different data sources, using a weighted sum to produce a confidence score in the range of 0-1. Using the confidence score as an attribute value for the corresponding edge in the relation group ensures that the annotation results are based on empirically validated scientific knowledge.
[0103] It is understandable that at least one of repetition frequency and confidence level can be used as an attribute value according to the actual application scenario (or cell annotation requirements, target sample type, etc.), and there are no restrictions on this.
[0104] In other embodiments, the energy allocation ratio can be determined by combining structural information and cell expression characteristics, thereby improving the ability to identify low-expression cells or edge nodes and enhancing the robustness of the method to biological noise. This method is described below.
[0105] Methods for determining the energy allocation ratio for each energy receiving node may include, but are not limited to, the following steps:
[0106] For each round of energy transfer, the expression feature similarity between the starting node and the energy receiving node is calculated to obtain the expression similarity weight;
[0107] Determine the graph distance between the starting node and the energy receiving node in the entity map, and determine the energy attenuation factor based on the graph distance;
[0108] The energy allocation ratio of the energy receiving node is determined based on the energy attenuation factor and the expression similarity weight.
[0109] In this embodiment, during each round of energy transfer, the expression feature vectors of the starting node and the corresponding energy receiving node are compared and analyzed to determine the expression similarity weight. Here, expression features can refer to gene expression levels, which can be quantified to obtain expression vectors. The expression feature similarity weight is a quantitative index obtained by calculating the relative proximity of two nodes (i.e., the starting node and the energy receiving node) in the expression feature space. This calculation can employ mathematical methods such as cosine similarity measurement. The expression feature similarity weight reflects the degree of biological similarity between nodes in terms of functional state or cell type; higher similarity results in a larger weight value, indicating stronger homogeneity in expression patterns between the two nodes.
[0110] Then, the graph distance between the starting node and the energy receiving node in the entity graph can be determined. Graph distance refers to the number of edges (i.e., hop distance) in the shortest path connecting the starting node and the energy receiving node in the entity graph, reflecting the degree of separation between the two nodes in the network topology. After determining the graph distance, it can be converted into an energy attenuation factor. For example, an exponential attenuation function can be used to map the graph distance to an attenuation factor value. In this way, based on the energy attenuation factor, the energy contribution of distant nodes can be reduced, thus significantly reducing the proportion of energy allocated to the energy receiving node far from the starting node.
[0111] After determining the energy decay factor and expression similarity weight, these two data points can be fused to obtain a comprehensive weight coefficient. For example, fusion can be performed using weighted averaging or multiplication operations; no specific limitations are imposed. Then, the comprehensive weights of all energy receiving nodes from the same starting node are normalized to obtain the energy allocation ratio for each energy receiving node, thereby ensuring that the sum of all output weights is 1, satisfying the requirement of energy conservation.
[0112] This application's embodiments effectively capture the biological similarity between nodes in terms of functional state and cell type by calculating expression feature similarity weights, enabling energy allocation to not only depend on network topology but also reflect actual expression pattern characteristics. By introducing graph distance and energy decay factors, the natural law of biological association strength decaying with path length is reasonably simulated, maintaining the biological rationality of the energy transfer process.
[0113] In step S402 of some embodiments, for each starting node, the energy value held by the starting node is gradually distributed to each energy receiving node along the first target transmission path according to the determined energy allocation ratio and transmission rounds, thereby realizing multi-round energy transmission. That is, energy transmission is a process that simulates the directional diffusion of energy along the edges of a physical graph, where the energy value of the starting node is distributed to downstream nodes level by level according to the first target transmission path and the energy allocation ratio. It is understood that since each of the multiple starting nodes can correspond to multiple first target transmission paths, the same non-starting node (i.e., intermediate and terminal nodes in the first target transmission path) may receive energy multiple times from the same or different starting nodes via different paths. It is understood that the terminal node is the energy receiving node corresponding to the last round of energy transmission, that is, the node corresponding to the end point of the first target transmission path.
[0114] As described above, the maximum propagation step size (i.e., hop count) in the first preset propagation condition is a fixed value. However, in actual propagation maps, the optimal propagation range may differ for different starting nodes. Therefore, this application also introduces a hop count adaptive mechanism based on diffusion dynamics to achieve adaptive hop count settings for different starting nodes. This method is explained below.
[0115] In some embodiments, step S402 may include, but is not limited to, the following steps:
[0116] For each starting node, multiple rounds of energy transfer are performed based on the energy value of each starting node, the energy receiving node corresponding to each starting node in each round of energy transfer, and the energy allocation ratio of each energy receiving node, until the energy transfer stop condition is met.
[0117] The conditions for stopping energy transfer include:
[0118] After the energy transfer of the current round is completed, the energy gradient change of all energy receiving nodes corresponding to the current round is less than the first preset threshold, and the node coverage data determined based on the energy receiving nodes of the current round is less than the second preset threshold.
[0119] In this embodiment, an independent propagation control mechanism is established for each starting node, and the dynamic distribution of energy in the entity graph is achieved through multiple rounds of iterative calculation. The energy transfer stopping condition can be comprehensively determined by two dimensions: energy gradient change and node coverage data. Energy gradient change refers to the relative rate of change of the total energy value of all energy receiving nodes between adjacent transfer rounds, reflecting the convergence state of the energy transfer process. The first preset threshold can be a pre-set threshold (without specific limitations on its value) used to determine whether the energy distribution has reached a stable state. When the energy gradient change is lower than the first preset threshold, it indicates that the energy distribution among nodes has tended to be balanced, and energy transfer should be stopped. Node coverage data refers to the number or coverage rate of newly added unique energy receiving nodes (such as nodes receiving energy for the first time) in the current round. Node coverage data can be calculated by statistically analyzing the differences in node sets between different rounds. Node coverage data reflects the degree of exploration of the graph structure by the energy transfer process. When the node coverage data is lower than the second preset threshold (without specific limitations on its value), it indicates that energy transfer has fully covered the relevant network area, meaning that energy transfer is considered to be close to saturation, and energy transfer should be stopped.
[0120] Thus, after each round of energy transfer, two indicators are calculated simultaneously: energy gradient change and node coverage data. If the energy gradient change is less than a first preset threshold and the node coverage data is less than a second preset threshold, subsequent energy transfer is stopped. The current transfer round is designated as the last round of energy transfer, and the energy receiving node of the current round is designated as the endpoint node.
[0121] This application embodiment introduces a dual stop determination mechanism based on energy gradient changes and node coverage data, which realizes intelligent control of the energy transfer process and effectively solves the problem of insufficient or excessive propagation caused by fixed hop count settings.
[0122] In step S302 of some embodiments, after energy transfer is completed (e.g., after traversing all the first target transfer paths corresponding to the starting nodes, or after determining the stop of transfer based on the dual stop determination mechanism), a first target annotation node can be selected from all the endpoint nodes based on the energy value received by each endpoint node (i.e., the node corresponding to the end of the first target transfer path, or the energy receiving node corresponding to the last round of energy transfer determined by the dual stop determination mechanism). The first target annotation node can refer to a node that has a strong correlation with the starting node. In this way, cell annotation can be performed based on the biological entity corresponding to the first target annotation node.
[0123] This application's embodiments construct a graph structure that integrates multiple types of biological entities and relationships, transforming the cell annotation problem into a process of energy transfer and accumulation in the graph. This overcomes the shortcomings of related technologies in terms of model complexity, data dependence, and interpretability, and improves the flexibility of cell annotation.
[0124] In some embodiments, step S302 may include, but is not limited to, the following steps:
[0125] After all starting nodes have completed energy transfer, determine the total energy received by each ending node;
[0126] Sort all endpoint nodes in descending order based on total energy, and determine the N endpoint nodes with the highest total energy as the first target annotation node based on the sorting results; where N is a positive integer greater than 1.
[0127] In this embodiment, for each endpoint node, the total energy can refer to the sum of the energy values received by that endpoint node from all corresponding first target transmission paths (or all energy transmission rounds after energy transmission stops). It is understood that an endpoint node can receive energy from multiple paths (or multiple transmission rounds), and the total energy is obtained by superimposing the energy values received from each path (or all energy transmission rounds after energy transmission stops). For example, taking the first target transmission paths as an example: Assume path 1: A→B→D, where endpoint node D receives 2.5 energy; path 2: A→C→D, where endpoint node D receives 1.5 energy; path 3: E→F→D, where endpoint node D receives 3.0 energy. Combining the energy received from the above paths, the total energy of endpoint node D is 7.
[0128] After determining the total energy corresponding to each endpoint node, all endpoint nodes can be sorted in descending order of total energy. The endpoint nodes with the highest total energy (N is a positive integer greater than 1) are designated as the first target annotation nodes. It is understood that endpoint nodes with higher total energy are considered to have a more significant structural association with the starting node. Therefore, cell annotation of the target cell group can be performed based on the cell type represented by the first target annotation node. Furthermore, the energy transfer path corresponding to the first target annotation node can provide interpretable annotation evidence. For example, the final annotation result can be as follows: Figures 5 to 6B As shown, Figure 5 This diagram annotates different cell populations, with the horizontal axis representing cell populations and the vertical axis representing the energy value of each cell population. Different colors in the diagram represent different cell types (cell_type). It is understandable that... Figure 5 The annotation results shown are based on the cell types represented by the two endpoint nodes with the highest total energy (arranged from largest to smallest). Figure 6A A UMAP dimensionality reduction visualization of the annotation results from the original cell type annotation method. Figure 6B A UMAP dimensionality reduction visualization of the annotation results of the energy transfer method based on this application ( Figure 6B The numbers in the diagram represent different cell groups. Figure 6A and Figure 6B Comparison shows that this application can improve the precision and accuracy of cell annotation. Figure 6A and Figure 6B Different colors in the text represent different cell types.
[0129] As described above, in this embodiment, the biological knowledge relationship data can be an entity graph or an adjacency matrix. When it is an entity graph, relationship reasoning can include path exploration and relationship transfer (such as energy transfer) between nodes through the graph structure. When it is an adjacency matrix, relationship reasoning can refer to iterative derivation of relationships between nodes and energy diffusion through matrix operations. Therefore, although there are differences in the specific implementation of relationship reasoning, the essence of relationship reasoning lies in using the biological relationship associations already defined in the biological knowledge relationship data to reason about target nodes with annotation potential starting from the starting node. Thus, the methods described in the foregoing embodiments have inherent consistency in technical logic and can be flexibly selected or combined at the implementation level according to specific application scenarios.
[0130] The cell annotation method provided in this application constructs a multi-hop energy transfer mechanism based on a graph structure, enabling it to directly transfer information using paths within the graph structure without relying on large-scale training data. This reduces data requirements and improves annotation capabilities for small-scale or specific samples. Furthermore, the lightweight diffusion strategy reduces the computational overhead of complex networks, enhancing flexibility and cell annotation efficiency across various scenarios. Moreover, addressing the insufficient utilization of prior graph structures in related technologies, this application fully leverages edge relationships and attribute information within the graph, enhancing annotation stability and adaptability. Through a flexible propagation mechanism, this application is no longer limited to a single model but can flexibly annotate according to different biological scenarios, meeting diverse cell annotation needs. In summary, this application outperforms related technologies in reducing data dependence, simplifying model structure, enhancing prior structural utilization, and improving flexible adaptability. This application can efficiently and accurately complete the annotation task of complex biological graphs.
[0131] In a specific embodiment, taking rice as an example, a gene-cell type-tissue level entity map is constructed for rice. The associated functions of a specific gene cluster are inferred from the cluster through energy transfer. In this embodiment, a specific gene cluster (i.e., the set of target genes corresponding to the target cell group) is selected as an example, and energy transfer is performed based on the cell annotation method described above.
[0132] Specifically, based on rice single-cell transcriptome data (such as the SRP250946 dataset) and plant anatomy knowledge, entity maps can be constructed in the Neo4j graph database. Entity maps can include nodes representing target genes, such as nodes representing genes like AT5G59240 and Os03g0424500. Additionally, they can include nodes representing cell types and tissues, such as root endodermis and parenchyma cells. Directed edges between nodes represent biological relationships (such as "expression" or "belongs to"), and each edge has an attribute value, thus supporting the expression of complex structures.
[0133] Sixty-two target genes (i.e., AT5G59240, Os03g0424500, etc.) from the target cell group identified based on cluster analysis were selected as energy transfer source nodes (i.e., starting nodes), and energy values were assigned based on the gene expression of these 62 target genes in the target cell group. These 62 target genes are understood to be marker genes of the target cell group, representing a subset of genes related to a specific function. Thus, energy transfer can reveal the cell type or tissue associated with this function. Specifically, the transfer direction is set according to biological relationships: from the gene node to the cell type node where the gene is "expressed," and then upwards and laterally along the tissue hierarchy (i.e., the transfer direction is positive, and the endpoint type is cell or tissue). Furthermore, the maximum transfer step size is set to 3, and the edge type is set to "expressed" or "belongs to." Before each round of energy transfer, edges that meet the above-set transfer conditions can be dynamically filtered to prevent energy from entering irrelevant nodes.
[0134] In the first round of diffusion, 62 gene nodes transfer energy to directly associated cell type nodes based on energy allocation ratios. For example, the AT5G59240 node can transfer energy to root endodermis nodes or other root cell type nodes. The Os03g0424500 node can transfer energy to parenchyma cell nodes or related tissue nodes. In subsequent transfers, energy diffuses upwards or laterally along tissue levels, forming multiple primary target transfer pathways. These pathways converge at some nodes (i.e., endpoint nodes), creating an energy superposition effect. Ultimately, the two nodes with the highest accumulated energy (i.e., total energy) are the root endodermis node and the parenchyma cell node.
[0135] After energy transfer was completed, based on the two endpoint nodes with the highest total energy—the root endodermis node and the parenchyma cell node—it was determined that the target cell group was closely related to the function of the rice root endodermis and parenchyma cells. Specifically, the root endodermis node indicated that the target cell group (i.e., a cluster of 62 genes) might be involved in root barrier formation or material transport, while the parenchyma cell node indicated its role in material storage or support structures. These results suggest that the target cell group may be related to the structural integrity, material regulation, and cell differentiation function of the rice root system. Thus, cellular annotation of the target cell group was achieved.
[0136] In other embodiments, when the biological knowledge relationship data is an entity graph, a path scoring model can be used as an alternative to the aforementioned energy transfer based on transfer paths. The path scoring model method does not require determining the complete energy transfer process. This method will be described below.
[0137] Reference Figure 7 In some other embodiments, the target node includes a second target annotation node, and step S103 may include, but is not limited to, steps S701 to S703.
[0138] Step S701: Based on the second preset transmission conditions, determine the second candidate transmission path for each starting node in the entity graph, and determine the attribute value of each edge in each second candidate transmission path;
[0139] Step S702: Call the pre-trained path scoring model to score each second candidate transmission path corresponding to each starting node based on the attribute value of each edge in the second candidate transmission path, the biological relationship of each edge, and the path parameters of the second candidate transmission path, to obtain the path score.
[0140] Step S703: Sort multiple second candidate delivery paths in descending order according to the path score, determine the second candidate delivery path with the highest path score in the top M positions as the second target delivery path, and determine the endpoint node in the second target delivery path as the second target annotation node, so as to perform cell annotation based on the biological entity represented by the second target annotation node; where M is a positive integer greater than 1.
[0141] In step S701 of some embodiments, the rules of the second preset transmission condition are relatively lenient compared to the first preset transmission condition; that is, the second preset transmission condition is only used for coarse screening. For example, the second preset transmission condition may include the maximum transmission step size, edge type, etc. The second candidate transmission path refers to the complete sequence of nodes discovered by graph traversal starting from the starting node and under the constraints of the second preset transmission condition. The second candidate transmission path is formed by connecting the starting node, intermediate nodes, and ending node sequentially through edge relationships. The method for determining the attribute value of each edge in the second candidate transmission path is similar to the aforementioned method for determining the attribute values corresponding to the edges of the associated energy distribution node and energy receiving node, and will not be described again here.
[0142] In step S702 of some embodiments, a pre-trained path scoring model is invoked to score the selected second candidate transmission paths, obtaining a path score for each candidate transmission path. Specifically, the path scoring model can refer to a neural network model pre-trained based on a large amount of labeled data or self-supervised signals. The path scoring model can learn the complex mapping relationship between path features and biological importance. The input features of the path scoring model may include the attribute values of each edge in the second candidate transmission path, the biological relationships of the edges, the IDs of each node in the second candidate transmission path, and the path parameters of the second candidate transmission path itself. Among them, the path parameters may include indicators reflecting the overall characteristics of the path, such as path length and node type.
[0143] In implementation, the path scoring model uses one-hot encoding or embedding layers to transform input features into vectors. Then, features are extracted from these vectors using non-linear activation functions (such as ReLU), and the extracted features are processed based on a self-attention mechanism to ultimately obtain the corresponding path score. The path score quantifies the relative importance and reliability of the corresponding second candidate propagation path in the cell annotation task. The scoring process fully utilizes the powerful feature extraction and non-linear mapping capabilities of neural networks, comprehensively considering the multi-dimensional features of the path and achieving an accurate assessment of the path's biological relevance.
[0144] In step S703 of some embodiments, all second candidate delivery paths corresponding to the starting nodes are sorted in descending order according to the path score, and the second candidate delivery paths ranked in the top M positions (the value of M is not specifically limited) are determined as the second target delivery paths. In this way, cell annotation can be performed based on the biological entity represented by the endpoint node of the second target delivery path.
[0145] This application embodiment establishes an intelligent path evaluation mechanism based on a path scoring model, which enables systematic screening and importance ranking of multi-hop related paths in biological knowledge graphs, effectively improving the accuracy and interpretability of cell annotation results.
[0146] The training method for the path scoring model is explained below.
[0147] In some embodiments, the training method for the path scoring model may include, but is not limited to, the following steps:
[0148] Obtain the sample genes, determine the sample initiation node and sample transfer path corresponding to the sample genes in the entity map, and determine the sample energy value of each sample initiation node based on the expression level of the sample genes.
[0149] Energy transfer is performed based on the sample energy value of each sample starting node and the sample transfer path, and the label annotation node is determined from the end point of the sample transfer path based on the energy transfer result.
[0150] The path scoring model is invoked to score each sample transfer path corresponding to each sample starting node based on the attribute value of each edge in the sample transfer path, the biological relationship of each edge, and the path parameters of the sample transfer path, so as to obtain the sample path score.
[0151] Based on the sample path score, multiple sample transmission paths are sorted in descending order, and the sample transmission paths with the top M path scores are determined as the predicted target transmission paths.
[0152] The parameters of the path scoring model are adjusted based on the endpoint node and label annotation node of the predicted target delivery path.
[0153] In this embodiment, the method for determining the sample gene, the sample starting node of the sample gene, the sample transfer path, and the sample energy value corresponding to the sample starting node is similar to the aforementioned method for determining the target gene, the target gene's starting node, the first target transfer path, and the energy value corresponding to the starting node. Furthermore, the method for energy transfer based on the sample energy value and the sample transfer path is similar to the aforementioned method for energy transfer based on the energy value and the first target transfer path (i.e., determining the energy receiving node for each round of energy transfer based on the first target transfer path). And the method for determining the sample transfer path by calling the path scoring model is similar to the aforementioned method for determining the path score of the second candidate transfer path by calling the path scoring model. Therefore, these three parts will not be elaborated further.
[0154] In the supervision signal generation stage, labeled annotation nodes can be determined from the endpoint nodes of the sample transfer path based on the consistency of multi-hop diffusion results. Specifically, this can be achieved by comparing the energy allocation results of energy transfer from different sample start nodes and / or different sample transfer paths. If certain endpoint nodes in different sample transfer paths consistently exhibit high energy values in different energy transfers, these endpoint nodes are considered to have a potential structural correlation with the sample start node. This consistency can then be used as pseudo-labels, identifying these endpoint nodes that consistently receive significant energy as labeled annotation nodes. In this way, a path scoring model can be trained based on labeled annotation nodes without relying on manual annotation.
[0155] During the model parameter optimization phase, the parameters of the path scoring model can be adjusted by comparing the predicted results with those of the pseudo-labels. The predicted target transmission path refers to the top M high-scoring paths after sorting the sample paths by score; these paths represent the biological pathways that the path scoring model currently considers most important. The parameter adjustment process can calculate the loss function value based on the endpoint node and label annotation node of the predicted target transmission path, and update the weight parameters in the network based on the loss function value. It's understandable that the training objective of the path scoring model is not simply to maximize the score of a path containing pseudo-labels (i.e., label annotation nodes), but rather has a more generalized objective. Specifically, for a starting node, training will drive the path scoring model to: increase positive sample scores, i.e., all different transmission paths leading to that "pseudo-label" node, whose predicted scores should be increased; and decrease negative sample scores, i.e., all transmission paths leading to other (non-pseudo-label) nodes, whose predicted scores should be decreased. In this way, the path scoring model learns to distinguish which paths are "good" and which are "bad" based on features such as path structure, node type, edge attribute values, and biological relationships, thereby achieving automated learning of path importance.
[0156] The following explains the case where biological knowledge relationship data is in the form of an adjacency matrix structure.
[0157] Reference Figure 8 In some embodiments, the biological knowledge relationship data is an adjacency matrix, where the row and column nodes of the adjacency matrix are biological entities, and the value of the adjacency matrix is determined based on the biological relationship between two corresponding biological entities. The target node includes a third target annotation node. Step S103 may include, but is not limited to, steps S801 to S802.
[0158] Step S801: Determine the energy value of each starting node based on the expression level of the target gene, and construct an energy vector based on the energy value of each starting node;
[0159] Step S802: Multiply each energy vector with the adjacency matrix to obtain the energy distribution vector, determine the third target annotation node based on the obtained energy distribution vector, and perform cell annotation based on the biological entity represented by the third target annotation node.
[0160] First, let's explain the adjacency matrix. An adjacency matrix is a two-dimensional square matrix data structure. The row and column indices of an adjacency matrix both correspond to the same set of biological entities, and the value of each matrix element is determined by the specific biological relationship between the two biological entities in the corresponding row and column. For example, the biological relationship "gene A connects cell B" can be transformed into a numerical value at the row and column index positions of "gene A" and "cell B". Specifically, the assignment of matrix elements can be done using binary representation (1 for the existence of a biological relationship, 0 for its absence) or weighted representation (using continuous values such as confidence, frequency, and intensity), depending on the specific application scenario, to accurately describe the qualitative and quantitative characteristics of the association between biological entities. No specific limitations are imposed on this approach.
[0161] In step S801 of some embodiments, the energy value of each starting node can be determined based on the expression level of the target gene, and a corresponding energy vector can be constructed. The energy vector can be a column vector with all biological entity nodes as its dimensions, where the dimension corresponding to the starting node is assigned the calculated energy value, and the dimensions corresponding to the other nodes are initially set to zero. The energy vector represents the initial distribution of energy in the biological entity network.
[0162] In step S802 of some embodiments, a matrix operation is performed between the energy vector and the adjacency matrix to realize the energy transfer process. For example, the energy vector and the adjacency matrix can be multiplied, and the result can be a new energy distribution vector. The value of each dimension in the energy distribution vector represents the energy value accumulated by the corresponding biological entity node during the energy diffusion process. It can be understood that each product calculation is equivalent to all nodes synchronously diffusing energy to the associated nodes one step. Thus, after multiple product calculations, when the energy distribution vector reaches a stable state, a third target annotation node can be determined based on the energy distribution vector. Specifically, the third target annotation node can refer to the nodes corresponding to the dimensions with higher energy values in the energy distribution vector. For example, an energy threshold can be set or the nodes corresponding to the top multiple dimensions can be selected as the third target annotation nodes according to the energy value sorting. In this way, cell annotation can be performed based on the biological entity represented by the third target annotation node.
[0163] This application establishes an efficient and platform-independent cell annotation method by representing biological knowledge in the form of an adjacency matrix and employing matrix operations to achieve energy diffusion. This method utilizes the mathematical properties of adjacency matrices to transform complex graph structures into a standardized matrix representation, enabling energy transfer processes to be implemented through highly optimized linear algebraic operations. This significantly improves computational efficiency and reduces dependence on specific graph database platforms. Through iterative multiplication of energy vectors with adjacency matrices, energy transfer across all nodes can be processed in parallel, fully utilizing the parallel computing capabilities of the computing hardware, making it suitable for analyzing large-scale biological networks.
[0164] It is understandable that, although the foregoing mainly describes the application of this application for cell type annotation in single-cell atlases, the controllable characteristics of pathway energy diffusion and transfer pathways also make this application applicable to other biological mapping tasks. For example, it can be used to identify potential regulatory targets in protein-protein interaction networks, or to identify pathological subgroups in disease atlases.
[0165] Reference Figure 9 This application also provides a cell annotation device, which includes:
[0166] The expression data construction unit 910 is used to construct biological knowledge relationship data, wherein the biological knowledge relationship data is used to represent the biological relationships between different biological entities;
[0167] The node determination unit 920 is used to acquire gene expression data of the target sample, determine the target gene based on the gene expression data, and determine the biological entity corresponding to the target gene in the biological knowledge relationship data as the starting node;
[0168] Cell annotation unit 930 is used to perform relational reasoning in biological knowledge relational data based on the starting node, determine the target node, and perform cell annotation based on the biological entity represented by the target node.
[0169] It is evident that the content of the above-described cell annotation method embodiments is applicable to the embodiments of this cell annotation device. The specific functions implemented by this cell annotation device embodiment are the same as those of the above-described cell annotation method embodiments, and the beneficial effects achieved are also the same as those achieved by the above-described cell annotation method embodiments.
[0170] Reference Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0171] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0172] The memory 1002 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the cell annotation method of the embodiments of this application.
[0173] Input / output interface 1003 is used to implement information input and output;
[0174] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0175] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0176] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0177] This application also provides a computer program product comprising a computer program. A processor of a computer device reads and executes the computer program, causing the computer device to perform the cell annotation method described above.
[0178] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described cell annotation method.
[0179] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0180] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of this application, and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in this application are also applicable to similar technical problems.
[0181] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0182] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0183] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0184] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0185] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0186] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0187] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0188] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0189] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0190] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A cell annotation method, characterized in that, The method includes: Biological knowledge relationship data is constructed, wherein the biological knowledge relationship data is used to represent the biological relationships between different biological entities; wherein the biological knowledge relationship data is an entity graph or an adjacency matrix, the entity graph includes multiple nodes and multiple edges, the nodes represent biological entities, and each edge represents the biological relationship between two associated nodes; the row and column nodes in the adjacency matrix are biological entities, and the value of the adjacency matrix is determined according to the biological relationship between the corresponding two biological entities; Obtain gene expression data of the target sample, determine the target gene based on the gene expression data, and determine the biological entity in the biological knowledge relationship data corresponding to the target gene as the starting node; Based on the starting node, relational reasoning is performed in the biological knowledge relational data to determine the target node, so as to perform cell annotation based on the biological entity represented by the target node; Wherein, when the biological knowledge relationship data is an entity graph, the target node includes a first target annotation node or a second target annotation node. The cell annotation problem is transformed into a process of energy transfer and energy accumulation in the graph. The energy value of each starting node is determined according to the expression level of the target gene. After the energy transfer is completed, the first target annotation node is selected from all the ending nodes based on the energy received by each ending node. Alternatively, multi-hop association paths in the entity graph are screened and ranked by importance based on a path scoring model. The second candidate transfer paths corresponding to all starting nodes are sorted in descending order according to the path score. The second candidate transfer paths ranked in the top M positions are determined as the second target transfer paths, and the ending nodes in the second target transfer paths are determined as the second target annotation nodes. M is a positive integer greater than 1. When the biological knowledge relationship data is an adjacency matrix, the target node includes a third target annotation node. The energy value of each starting node is determined according to the expression level of the target gene, and matrix operations are used to achieve energy diffusion. The third target annotation node is determined based on the energy distribution vector.
2. The method according to claim 1, characterized in that, The biological knowledge relationship data is an entity graph, which includes multiple nodes and multiple edges. The nodes represent biological entities, and each edge represents the biological relationship between two related nodes. The target node includes a first target annotation node. The step of performing relational reasoning based on the starting node in the biological knowledge relational data to determine the target node, and then performing cell annotation based on the biological entity represented by the target node, includes: The energy value of each starting node is determined based on the expression level of the target gene. Energy is transferred to each starting node along the corresponding edge in the entity map according to the energy value and the first preset transfer condition. After all starting nodes have completed energy transfer, a first target annotation node is determined based on the endpoint node that received energy in the entity map, so as to perform cell annotation based on the biological entity represented by the first target annotation node.
3. The method according to claim 2, characterized in that, The step of transferring energy to each starting node along the corresponding edge in the entity graph according to the energy value and the first preset transfer condition includes: For each starting node, the energy receiving node for each round of energy transfer is determined in the entity map according to the first preset transfer conditions, as well as the energy allocation ratio of each energy receiving node; Multiple rounds of energy transfer are conducted based on the energy value of each starting node, the energy receiving node corresponding to each starting node in each round of energy transfer, and the energy allocation ratio of each energy receiving node. The energy receiving node corresponding to the last round of energy transfer is determined as the endpoint node.
4. The method according to claim 3, characterized in that, Methods for determining the energy allocation ratio for each energy receiving node include: For each round of energy transfer, determine the attribute values corresponding to the edges between the associated energy distribution nodes and energy receiving nodes; in the first round of energy transfer, the starting node is identified as the energy distribution node. Based on the attribute values corresponding to all edges in each round of energy transfer, the attribute values of each edge in each round of energy transfer are normalized, so as to determine the energy allocation ratio of the energy receiving node associated with each edge in each round of energy transfer based on the normalization result.
5. The method according to claim 4, characterized in that, Methods for determining the attribute values corresponding to the edges between associated energy distribution nodes and energy receiving nodes include: Based on the biological relationship represented by the edges between the associated energy distribution node and the energy receiving node, a relationship group is constructed between the energy distribution node and the energy receiving node; Determine the repetition frequency of the relation group in the entity graph, and use the repetition frequency as the attribute value of the edge; or, determine the confidence level of the relation group, and use the confidence level as the attribute value of the edge.
6. The method according to claim 3, characterized in that, Methods for determining the energy allocation ratio for each energy receiving node include: For each round of energy transfer, the expression feature similarity between the starting node and the energy receiving node is calculated to obtain the expression similarity weight; Determine the graph distance between the starting node and the energy receiving node in the entity map, and determine the energy attenuation factor based on the graph distance; The energy allocation ratio of the energy receiving node is determined based on the energy attenuation factor and the expression similarity weight.
7. The method according to claim 3, characterized in that, The step of determining the energy receiving node for each round of energy transfer in the entity map according to the first preset transfer conditions includes: For each starting node, multiple first candidate transmission paths are determined in the entity graph based on the preset maximum transmission step size, edge type, and transmission direction; The first target transmission path is obtained by filtering multiple first candidate transmission paths according to the preset endpoint type. The energy receiving node for each round of energy transfer is determined based on the first target transfer path; wherein, the node corresponding to the end point of the first target transfer path is determined as the end point node.
8. The method according to claim 3, characterized in that, The process of performing multiple rounds of energy transfer based on the energy value of each starting node, the energy receiving node corresponding to each starting node in each round of energy transfer, and the energy allocation ratio of each energy receiving node includes: For each starting node, multiple rounds of energy transfer are performed based on the energy value of each starting node, the energy receiving node corresponding to each starting node in each round of energy transfer, and the energy allocation ratio of each energy receiving node, until the energy transfer stop condition is met. The energy transfer stopping conditions include: After the energy transfer of the current round is completed, the energy gradient change of all energy receiving nodes corresponding to the current round is less than the first preset threshold, and the node coverage data determined based on the energy receiving nodes of the current round is less than the second preset threshold.
9. The method according to claim 2, characterized in that, After energy transfer is completed at all starting nodes, the first target annotation node is determined based on the endpoint node that received the energy in the entity graph, including: After all starting nodes have completed energy transfer, determine the total energy received by each ending node; Sort all endpoint nodes in descending order based on the total energy, and determine the N endpoint nodes with the highest total energy as the first target annotation node based on the sorting results; where N is a positive integer greater than 1.
10. The method according to claim 1, characterized in that, The biological knowledge relationship data is an entity graph, which includes multiple nodes and multiple edges. The nodes represent biological entities, and each edge represents the biological relationship between two related nodes. The target node includes a second target annotation node. The step of performing relational reasoning based on the starting node in the biological knowledge relational data to determine the target node, and then performing cell annotation based on the biological entity represented by the target node, includes: According to the second preset transmission condition, a second candidate transmission path is determined for each starting node in the entity graph, and the attribute value of each edge in each second candidate transmission path is determined. The pre-trained path scoring model is invoked to score each second candidate transmission path corresponding to each starting node based on the attribute value of each edge in the second candidate transmission path, the biological relationship of each edge, and the path parameters of the second candidate transmission path, so as to obtain the path score. Multiple second candidate delivery paths are sorted in descending order based on path scores. The second candidate delivery path with the highest path score in the top M positions is determined as the second target delivery path, and the endpoint node in the second target delivery path is determined as the second target annotation node. Cell annotation is performed based on the biological entity represented by the second target annotation node; where M is a positive integer greater than 1.
11. The method according to claim 10, characterized in that, The training method for the path scoring model includes: Obtain sample genes, determine the sample initiation node and sample transfer path corresponding to the sample genes in the entity map, and determine the sample energy value of each sample initiation node based on the expression level of the sample genes. Energy transfer is performed based on the sample energy value of each sample starting node and the sample transfer path, and the label annotation node is determined from the endpoint of the sample transfer path based on the energy transfer result. The path scoring model is invoked to score each sample transfer path corresponding to each sample starting node based on the attribute value of each edge in the sample transfer path, the biological relationship of each edge, and the path parameters of the sample transfer path, so as to obtain the sample path score. Based on the sample path score, multiple sample transmission paths are sorted in descending order, and the sample transmission paths with the top M path scores are determined as the predicted target transmission paths. The parameters of the path scoring model are adjusted based on the endpoint node of the predicted target delivery path and the label annotation node.
12. The method according to claim 1, characterized in that, The biological knowledge relationship data is an adjacency matrix, in which the row and column nodes are biological entities. The value of the adjacency matrix is determined according to the biological relationship between the corresponding two biological entities. The target node includes a third target annotation node. The step of performing relational reasoning based on the starting node in the biological knowledge relational data to determine the target node, and then performing cell annotation based on the biological entity represented by the target node, includes: The energy value of each starting node is determined based on the expression level of the target gene, and an energy vector is constructed based on the energy value of each starting node. Each energy vector is multiplied by the adjacency matrix to obtain an energy distribution vector. A third target annotation node is determined based on the obtained energy distribution vector, and cell annotation is performed based on the biological entity represented by the third target annotation node.
13. A cell annotation device, characterized in that, The device includes: An expression data construction unit is used to construct biological knowledge relationship data, wherein the biological knowledge relationship data is used to represent the biological relationships between different biological entities; wherein the biological knowledge relationship data is an entity graph or an adjacency matrix, the entity graph includes multiple nodes and multiple edges, the nodes represent biological entities, and each edge represents the biological relationship between two associated nodes; the row and column nodes in the adjacency matrix are biological entities, and the value of the adjacency matrix is determined according to the biological relationship between the corresponding two biological entities; A node determination unit is used to acquire gene expression data of a target sample, determine a target gene based on the gene expression data, and determine the biological entity in the biological knowledge relationship data corresponding to the target gene as the starting node; The cell annotation unit is used to perform relational reasoning in the biological knowledge relational data based on the starting node, determine the target node, and perform cell annotation based on the biological entity represented by the target node. Wherein, when the biological knowledge relationship data is an entity graph, the target node includes a first target annotation node or a second target annotation node. The cell annotation problem is transformed into a process of energy transfer and energy accumulation in the graph. The energy value of each starting node is determined according to the expression level of the target gene. After the energy transfer is completed, the first target annotation node is selected from all the ending nodes based on the energy received by each ending node. Alternatively, multi-hop association paths in the entity graph are screened and ranked by importance based on a path scoring model. The second candidate transfer paths corresponding to all starting nodes are sorted in descending order according to the path score. The second candidate transfer paths ranked in the top M positions are determined as the second target transfer paths, and the ending nodes in the second target transfer paths are determined as the second target annotation nodes. M is a positive integer greater than 1. When the biological knowledge relationship data is an adjacency matrix, the target node includes a third target annotation node. The energy value of each starting node is determined according to the expression level of the target gene, and matrix operations are used to achieve energy diffusion. The third target annotation node is determined based on the energy distribution vector.
14. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method described in any one of claims 1 to 12.
15. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 12.
Citation Information
Patent Citations
Cell knowledge graph construction method and device, computing equipment and storage medium
CN115114445A
Annotation model training method, cell type annotation method and related equipment
CN119108025A