An adaptive feature extraction and clustering method for single-cell spatial transcriptome data
By adaptively adjusting the neighborhood range and adjacency weights, and combining spatial continuity to optimize the clustering results, the problem of inaccurate adjacency relationships in single-cell spatial transcriptome data clustering analysis was solved, achieving higher clustering accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI UNIV OF TECH
- Filing Date
- 2026-04-01
- Publication Date
- 2026-06-26
Smart Images

Figure CN122290730A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of single-cell spatial transcriptome data analysis technology, and in particular relates to an adaptive feature extraction and clustering method for single-cell spatial transcriptome data. Background Technology
[0002] Single-cell spatial transcriptomics technology can simultaneously acquire gene expression and spatial location information of cells, providing an important tool for tissue structure analysis, cell type identification, and microenvironment research. In related data analysis, cell clustering or spatial domain identification is a fundamental step, and its results directly affect subsequent cell annotation and spatial tissue feature analysis.
[0003] In existing technologies, cluster analysis of single-cell spatial transcriptome data is usually based on dimensionality reduction and clustering of gene expression data, or on constructing cell adjacency relationships by combining spatial coordinate information, and further integrating expression features and spatial features for clustering processing.
[0004] However, existing methods typically employ fixed neighborhood construction methods and uniform feature fusion strategies, which are difficult to adapt to differences in cell distribution density and local heterogeneity in different regions. In regions where cell distribution is relatively sparse or dense, fixed neighborhood ranges can easily lead to inaccurate adjacency relationship construction. For cells located near tissue boundaries or with significant local expression differences, uniform spatial information fusion methods can also easily cause clustering bias. Furthermore, existing technologies do not make sufficient comprehensive use of local spatial density, local expression consistency, and boundary features, making it difficult to balance spatial continuity and boundary discrimination ability in clustering results.
[0005] Therefore, there is an urgent need for an adaptive feature extraction and clustering method for single-cell spatial transcriptome data to achieve adaptive adjustment of neighborhood relationships and adaptive fusion of expression features and spatial features, thereby improving the accuracy and stability of clustering results. Summary of the Invention
[0006] This invention provides an adaptive feature extraction and clustering method for single-cell spatial transcriptome data, which solves the problem that the fixed neighborhood construction method and uniform feature fusion strategy in the prior art are difficult to adapt to the spatial heterogeneity differences of different local regions, resulting in insufficient accuracy and stability of clustering results.
[0007] In a first aspect, the present invention provides an adaptive feature extraction and clustering method for single-cell spatial transcriptome data, comprising:
[0008] Single-cell spatial transcriptome data from multiple cells were acquired, including gene expression data and spatial coordinate data, and preprocessed.
[0009] Based on the spatial coordinate data, spatial proximity relationships are determined; based on the gene expression data, expression similarity relationships are determined; and an initial joint adjacency relationship is constructed.
[0010] Based on the initial joint adjacency relationship, local spatial heterogeneity evaluation indices for each cell are calculated, including local spatial density indices, local expression consistency indices, and local boundary confidence indices.
[0011] The neighborhood range of each cell is adjusted based on the local spatial density index, and the adjacency relationship weight is updated based on the local expression consistency index and the local boundary confidence index to obtain an adaptive adjacency relationship.
[0012] Based on the preprocessed gene expression data, the expression features of each cell are extracted. Based on the adaptive adjacency relationship and spatial coordinate data, the spatial features of each cell are extracted. The expression features and the spatial features are then weighted and fused to obtain the adaptive embedding features.
[0013] Clustering is performed based on the adaptive embedding features to obtain the initial clustering results;
[0014] The initial clustering results are optimized by incorporating spatial continuity to obtain the target clustering results.
[0015] Furthermore, the preprocessing includes:
[0016] Filtering out low-quality cells;
[0017] Filter out genes with low expression;
[0018] The gene expression data were normalized.
[0019] Logarithmic transformation was performed on the normalized gene expression data;
[0020] Screening for highly variable genes based on the degree of expression fluctuation;
[0021] Dimensionality reduction was performed on the processed gene expression data.
[0022] Furthermore, the construction of the initial joint adjacency relationship includes:
[0023] The candidate spatial neighborhood for each cell is determined based on the spatial distance between cells.
[0024] Calculate the expression similarity between the target cell and each cell in the candidate spatial neighborhood, and screen neighboring cells whose expression similarity with the target cell meets a preset similarity threshold;
[0025] The initial joint adjacency relationship between the target cell and its neighboring cells is determined, and an initial weight is assigned to the initial joint adjacency relationship based on the spatial distance and expression similarity between the target cell and its neighboring cells.
[0026] Furthermore, the local spatial density index, local expression consistency index, and local boundary confidence index are all calculated based on cell data within the initial neighborhood corresponding to the initial joint adjacency relationship; wherein:
[0027] The local spatial density index is used to characterize the density of cell distribution in a local region of the target cell;
[0028] The local expression consistency index is used to characterize the similarity of cellular expression in local regions of the target cell;
[0029] The local boundary confidence index is used to characterize the probability that the target cell is located at the boundary of different cell populations.
[0030] Furthermore, the local spatial density index, the local expression consistency index, and the local boundary confidence index are obtained in the following ways:
[0031] Based on the spatial distance between the target cell and each neighboring cell in the initial neighborhood corresponding to the initial adjacency relationship, the average adjacency distance of the local region where the target cell is located is calculated;
[0032] The spatial density of the target cell in the local area is determined based on the average adjacency distance, and the local spatial density index is obtained.
[0033] Based on the expression similarity between the target cell and each neighboring cell in the initial neighborhood corresponding to the initial joint adjacency relationship, the average expression similarity of the local region where the target cell is located is calculated to obtain the local expression consistency index.
[0034] The local boundary confidence index is determined based on the local expression consistency index and the degree of difference in expression distribution among cells in the neighborhood.
[0035] Further, the step of adjusting the neighborhood range of each cell based on the local spatial density index, and updating the adjacency weights based on the local expression consistency index and the local boundary confidence index, includes:
[0036] When the local spatial density index corresponding to the target cell indicates that the cell distribution in its local area is relatively sparse, the neighborhood range of the target cell is increased.
[0037] When the local spatial density index indicates that the cell distribution in a local area is relatively dense, the neighborhood range of the target cell is reduced.
[0038] When the local expression consistency index corresponding to the target cell is high, the adjacency relationship weight between the target cell and its neighboring cells is increased;
[0039] When the local expression consistency index is low, the adjacency weight between the target cell and its neighboring cells is reduced;
[0040] When the local boundary confidence index corresponding to the target cell is high, the adjacency relationship weight between adjacent cells across the boundary is reduced to obtain the adaptive adjacency relationship.
[0041] Further, the step of extracting expression features of each cell based on preprocessed gene expression data, extracting spatial features of each cell based on the adaptive adjacency relationship and the spatial coordinate data, and weightedly fusing the expression features and the spatial features includes:
[0042] Expression characteristics of each cell were extracted based on the preprocessed gene expression data;
[0043] Based on the adaptive adjacency relationship and the spatial coordinate data, the spatial features of each cell are extracted;
[0044] The expression feature weights and spatial feature weights corresponding to each cell are determined based on the local spatial heterogeneity evaluation index, wherein:
[0045] For cells with high confidence in local boundaries, increase the weight of expression features and decrease the weight of spatial features;
[0046] For cells with high local expression consistency and low local boundary confidence, increase the weight of spatial features;
[0047] The expression features and spatial features are weighted and fused according to the expression feature weights and spatial feature weights to obtain the adaptive embedding features of each cell.
[0048] Furthermore, the adaptive embedding features are clustered using any one of K-means clustering, spectral clustering, hierarchical clustering, density clustering, or graph-based community discovery clustering to obtain the initial category label for each cell, which serves as the initial clustering result.
[0049] Furthermore, the optimization of the initial clustering result based on spatial continuity to obtain the target clustering result includes:
[0050] Calculate the class consistency between the target cell and its corresponding neighboring cells in the adaptive adjacency relationship, wherein the class consistency is determined based on the weighted proportion of cells in the neighborhood that have the same initial class label as the target cell;
[0051] When the category consistency is lower than the preset category consistency threshold, the initial category label of the target cell is corrected to the category label with the highest weighted proportion in the neighborhood according to the category distribution of the corresponding cells in the adaptive adjacency relationship and the adjacency relationship weight.
[0052] For small clusters with a cell count below a preset cell count threshold and spatially continuous distribution, the small clusters are merged into the neighboring clusters with the highest spatial continuity to obtain the target clustering result.
[0053] Secondly, the present invention also provides an adaptive feature extraction and clustering system for single-cell spatial transcriptome data, used to execute the above-mentioned adaptive feature extraction and clustering method for single-cell spatial transcriptome data, comprising:
[0054] The data acquisition and preprocessing module is used to acquire single-cell spatial transcriptome data from multiple cells, including gene expression data and spatial coordinate data, and to preprocess the single-cell spatial transcriptome data.
[0055] An initial joint adjacency relationship construction module is used to determine spatial proximity relationships based on the spatial coordinate data, determine expression similarity relationships based on the gene expression data, and construct initial joint adjacency relationships;
[0056] The local spatial heterogeneity evaluation module is used to calculate the local spatial heterogeneity evaluation index of each cell based on the initial joint adjacency relationship. The local spatial heterogeneity evaluation index includes the local spatial density index, the local expression consistency index, and the local boundary confidence index.
[0057] An adaptive adjacency adjustment module is used to adjust the neighborhood range of each cell based on the local spatial density index, and update the adjacency weight based on the local expression consistency index and the local boundary confidence index to obtain an adaptive adjacency relationship.
[0058] The feature extraction and fusion module is used to extract the expression features of each cell based on the preprocessed gene expression data, extract the spatial features of each cell based on the adaptive adjacency relationship and spatial coordinate data, and perform weighted fusion of the expression features and the spatial features to obtain adaptive embedding features;
[0059] A clustering module is used to perform clustering based on the adaptive embedding features to obtain initial clustering results;
[0060] The clustering optimization module is used to optimize the initial clustering results by combining spatial continuity to obtain the target clustering results.
[0061] Thirdly, the present invention also provides an electronic device, comprising: a memory for storing computer software programs; and a processor for reading and executing the computer software programs, thereby realizing the adaptive feature extraction and clustering method for single-cell spatial transcriptome data as described above.
[0062] Fourthly, the present invention also provides a non-transitory computer-readable storage medium storing a computer software program, which, when executed by a processor, implements the adaptive feature extraction and clustering method for single-cell spatial transcriptome data as described above.
[0063] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the adaptive feature extraction and clustering method for single-cell spatial transcriptome data as described above.
[0064] Compared with existing technologies, this invention constructs initial joint adjacency relationships by simultaneously combining spatial coordinate data and gene expression data, and further introduces local spatial density indicators, local expression consistency indicators, and local boundary confidence indicators to characterize the spatial heterogeneity of local regions where different cells are located. This allows for adaptive adjustment of the neighborhood range and adjacency relationship weights based on local spatial distribution characteristics and expression consistency characteristics. Simultaneously, based on the local spatial heterogeneity evaluation indicators corresponding to different cells, expression features and spatial features are differentially weighted and fused, enabling cells located in stable regions within the tissue to make fuller use of spatial continuity information, while reducing interference from inappropriate spatial smoothing in cells located in boundary regions. Furthermore, by optimizing the initial clustering results by incorporating spatial continuity, the accuracy and stability of the clustering results, as well as the ability to identify tissue boundary regions and locally heterogeneous regions, can be further improved. Attached Figure Description
[0065] Figure 1 This is a flowchart illustrating the adaptive feature extraction and clustering method for single-cell spatial transcriptome data provided in this embodiment of the invention.
[0066] Figure 2 This is a schematic diagram of the structure of the adaptive feature extraction and clustering system for single-cell spatial transcriptome data provided in an embodiment of the present invention;
[0067] Figure 3 An embodiment diagram of the electronic device provided in this invention;
[0068] Figure 4 An embodiment diagram of a computer-readable medium provided for embodiments of the present invention. Detailed Implementation
[0069] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0070] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0071] In the description of this invention, the term "such as" is used to mean "used as an example, illustration, or description." Any embodiment described as "such as" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. In the following description, for purposes of explanation...
[0072] Details are listed. It should be understood that those skilled in the art will recognize that the invention can be implemented without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but rather to be consistent with...
[0073] This is consistent with the broadest scope of the principles and features disclosed in this invention.
[0074] This embodiment provides an adaptive feature extraction and clustering method for single-cell spatial transcriptome data. The method is executed on single-cell spatial transcriptome data corresponding to multiple cells, which includes gene expression data and spatial coordinate data. The method constructs an initial joint adjacency relationship by jointly utilizing spatial coordinate data and gene expression data, and further calculates a local spatial heterogeneity evaluation index. Based on the local spatial heterogeneity evaluation index, the neighborhood range, adjacency relationship weight, and the fusion method of expression features and spatial features are adaptively adjusted to obtain adaptive embedding features suitable for clustering analysis. Then, the initial clustering results are optimized by combining spatial continuity to finally obtain the target clustering result.
[0075] See Figure 1 , Figure 1This is a flowchart illustrating the adaptive feature extraction and clustering method for single-cell spatial transcriptome data provided by the present invention. In this embodiment of the invention, the main body executing the adaptive feature extraction and clustering method for single-cell spatial transcriptome data is the adaptive feature extraction and clustering system for single-cell spatial transcriptome data. Therefore, the adaptive feature extraction and clustering method for single-cell spatial transcriptome data includes...
[0076] Step 10: Obtain single-cell spatial transcriptome data from multiple cells, including gene expression data and spatial coordinate data, and perform preprocessing.
[0077] In this step, single-cell spatial transcriptome data of multiple cells are acquired. The data includes at least gene expression data and spatial coordinate data. Gene expression data is used to characterize the expression status of each cell at the gene level, and spatial coordinate data is used to characterize the relative position of each cell in the tissue. Since the raw data may usually contain low-quality cells, low-expression genes, and noise introduced by the acquisition process, the data needs to be preprocessed before subsequent analysis to improve the stability of subsequent adjacency relationship construction, feature extraction, and cluster analysis.
[0078] Optionally, preprocessing includes filtering low-quality cells, filtering low-expression genes, normalizing gene expression data, performing logarithmic transformation on the normalized data, screening for highly variable genes based on expression fluctuations, and performing dimensionality reduction on the processed gene expression data.
[0079] The above preprocessing can, to some extent, reduce the impact of invalid information, differences in expression scale, and local abnormal fluctuations on subsequent analysis procedures.
[0080] Furthermore, the preprocessed expression data will serve as the basic input for subsequent expression similarity determination, expression feature extraction, and cluster analysis. See steps 101-106 for details.
[0081] Step 20: Determine spatial proximity relationships based on spatial coordinate data and expression similarity relationships based on gene expression data to construct initial joint adjacency relationships.
[0082] In this step, the spatial proximity relationship between cells is determined based on spatial coordinate data, and the expression similarity relationship between cells is determined based on preprocessed gene expression data. On this basis, an initial joint adjacency relationship is constructed.
[0083] The purpose of this step is to avoid establishing adjacency relationships based solely on spatial location or solely on gene expression. Instead, it utilizes both types of information simultaneously, so that the resulting adjacency relationships can reflect both the local geometric connections of cells within the tissue and the proximity of cells at the molecular expression level.
[0084] Furthermore, candidate spatial neighborhoods can be determined for each target cell based on spatial coordinate data. Then, the expression similarity between the target cell and each candidate neighboring cell can be calculated within the candidate spatial neighborhood, and neighboring cells whose expression similarity meets the preset similarity threshold can be screened.
[0085] For adjacency relationships that meet the conditions, initial weights can be assigned based on spatial distance and expression similarity to form initial joint adjacency relationships. These initial joint adjacency relationships not only provide a neighborhood basis for subsequent evaluation of local spatial heterogeneity but also provide an initial structure for the construction of subsequent adaptive adjacency relationships. This is described in steps 201-204.
[0086] Step 30: Calculate the local spatial heterogeneity evaluation index of each cell based on the initial joint adjacency relationship. The index includes local spatial density index, local expression consistency index and local boundary confidence index.
[0087] In this step, based on the initial joint adjacency relationship constructed in step 20, a local spatial heterogeneity evaluation index is calculated for each cell. The local spatial heterogeneity evaluation index includes a local spatial density index, a local expression consistency index, and a local boundary confidence index. The local spatial density index is used to characterize the density of cell distribution in the local region of the target cell, the local expression consistency index is used to characterize the similarity of cell expression states in the local region of the target cell, and the local boundary confidence index is used to characterize the probability that the target cell is located near the boundary of different cell populations.
[0088] Optionally, the local spatial density index can be obtained by statistically analyzing the spatial adjacency distance of the target cell in the initial neighborhood, the local expression consistency index can be obtained by statistically analyzing the expression similarity between the target cell and the cells in its initial neighborhood, and the local boundary confidence index can be determined by combining local expression consistency and differences in expression distribution within the neighborhood.
[0089] The above indicators can be used to quantify the sparsity, consistency of expression, and boundary features of local regions, thus providing a basis for subsequent adaptive adjustment of the neighborhood range, updating of adjacency weights, and allocation of fusion weights. See steps 301-304 for details.
[0090] Step 40 adjusts the neighborhood range of each cell based on the local spatial density index, updates the adjacency weights based on the local expression consistency index and the local boundary confidence index, and obtains the adaptive adjacency relationship.
[0091] In this step, the initial joint adjacency relationship is further adjusted based on the local spatial heterogeneity evaluation index obtained in step 30, so as to obtain an adaptive adjacency relationship that better conforms to the characteristics of local organizational heterogeneity.
[0092] Specifically, the distribution of cells in the local area where the target cell is located can be determined based on the local spatial density index, and the neighborhood range can be adjusted accordingly; the adjacency weights can also be updated based on the local expression consistency index and the local boundary confidence index.
[0093] Furthermore, when the cell distribution in the local area where the target cell is located is relatively sparse, the neighborhood range can be appropriately increased to obtain more sufficient local structural information; when the cell distribution in the local area is relatively dense, the neighborhood range can be appropriately reduced to avoid introducing more redundant adjacencies.
[0094] For cells with high local expression consistency, the adjacency weight between them and neighboring cells can be increased; for cells with low local expression consistency, the corresponding weight can be decreased.
[0095] For cells with high confidence in local boundaries, the weight of cross-boundary adjacency relationships can be reduced, thereby minimizing the impact of inappropriate spatial connectivity on subsequent analysis. See steps 401-405 for details.
[0096] Step 50: Extract the expression features of each cell based on the preprocessed gene expression data, extract the spatial features of each cell based on the adaptive adjacency relationship and spatial coordinate data, and perform weighted fusion of the expression features and spatial features to obtain the adaptive embedding features.
[0097] In this step, the expression features and spatial features of each cell are extracted. The expression features are used to describe the internal state of the cell at the gene expression level, and the spatial features are used to describe the positional association of the cell in the local tissue structure. Since single-cell spatial transcriptome data has both expression and spatial attributes, it is often difficult to take into account both local boundary differences and overall spatial continuity by relying on only one of the features. Therefore, it is necessary to fuse the two types of features in subsequent processing.
[0098] Furthermore, this step does not adopt a uniform and fixed fusion method, but instead assigns different expression feature weights and spatial feature weights to different cells based on the local spatial heterogeneity evaluation index obtained in step 30.
[0099] For cells with high local boundary confidence, the weight of expression features can be appropriately increased while the weight of spatial features can be decreased to reduce the impact of excessive spatial smoothing. For cells with high local expression consistency and low local boundary confidence, the weight of spatial features can be appropriately increased. The resulting adaptive embedding features can better balance local boundary preservation and overall tissue continuity. See steps 501-504 for details.
[0100] Step 60: Clustering is performed based on adaptive embedding features to obtain the initial clustering results.
[0101] In this step, clustering is performed based on the adaptive embedding features obtained in step 30 to obtain the initial category labels for each cell. The clustering method used can be selected from one of the following groups: K-means clustering, spectral clustering, hierarchical clustering, density clustering, and graph-based community discovery clustering.
[0102] Since the adaptive embedding features of the input have already fused expressive features and spatial features, and the fusion weights change with the local heterogeneity state, the clustering results are more suitable for reflecting the cell distribution patterns in tissues than clustering results based solely on expressive data or solely on spatial adjacency.
[0103] Furthermore, the result obtained in this step is the initial clustering result, which can provide a preliminary category label for each cell. However, there may still be local inconsistencies, unstable points in boundary regions, or small clusters that are spatially continuous. Therefore, the initial category label output in this step will be further input into step 70 to combine spatial continuity for subsequent optimization. See the description in step 601 for details.
[0104] Step 70: Optimize the initial clustering results by combining spatial continuity to obtain the target clustering results.
[0105] In this step, based on the initial clustering results obtained in step 60, and combined with the local spatial continuity reflected by the adaptive adjacency relationship, the initial category labels are optimized to obtain the target clustering results.
[0106] Specifically, the class consistency between the target cell and its corresponding neighboring cells in the adaptive adjacency relationship can be calculated. When the class consistency is lower than the preset class consistency threshold, the initial class label of the target cell can be corrected according to the class distribution of the neighboring cells and the adjacency relationship weight.
[0107] Furthermore, in addition to correcting the labels of cells with inconsistent local categories, small clusters with cell numbers below a preset cell number threshold and spatially continuous distribution can be processed and merged into adjacent clusters with higher spatial continuity. Through this optimization process, the influence of local discrete labels and fragmented cluster structures on the final clustering result can be reduced to a certain extent, so that the obtained target clustering result achieves a better balance between local boundary expression and overall spatial consistency. See steps 701-703 for details.
[0108] Compared with existing technologies, this invention first constructs an initial joint adjacency relationship based on spatial coordinate data and gene expression data, so that the adjacency relationship considers not only the spatial proximity between cells, but also the expression similarity between cells. On this basis, this invention further introduces local spatial density index, local expression consistency index, and local boundary confidence index to characterize the spatial heterogeneity of the local regions in which cells are located, and adaptively adjusts the neighborhood range and adjacency relationship weights accordingly, so that different local regions can adopt adjacency relationship representation methods that are more in line with their structural characteristics. At the same time, this invention also performs differentiated weighted fusion of expression features and spatial features based on the evaluation results of local spatial heterogeneity, so that cells in continuous regions within tissues can make full use of spatial continuity information, while cells in potential boundary regions can reduce the impact of inappropriate spatial smoothing. In addition, this invention further optimizes the initial clustering results by combining spatial continuity, so that the final clustering results have better adaptability, stability and practicality in identifying internal tissue regions, distinguishing boundary regions and characterizing local heterogeneous regions.
[0109] In one embodiment, steps 101-106 are described as follows:
[0110] Step 101: Obtain single-cell spatial transcriptome data from multiple cells.
[0111] In this step, single-cell spatial transcriptome data from multiple cells are acquired. This data includes at least gene expression data and spatial coordinate data. Gene expression data represents the expression of different genes in each cell, while spatial coordinate data represents the positional relationship of each cell within the tissue sample. The data can be the raw dataset collected experimentally, or a dataset to be analyzed obtained after basic processing of the raw data.
[0112] It should be noted that the focus of this step is to determine the two types of basic data sources required for subsequent analysis: information sources in the expression dimension and information sources in the spatial dimension. The former is used for subsequent expression similarity calculation, expression feature extraction, and cluster analysis, while the latter is used for subsequent spatial proximity determination, local density analysis, spatial feature extraction, and spatial continuity optimization. Since the technical solution of this invention is based on the joint use of expression data and spatial data, this step is the data starting point for all subsequent steps.
[0113] Furthermore, in practice, each cell can be treated as a processing object, maintaining a one-to-one correspondence between its expression data and spatial coordinate data. This correspondence remains unchanged in subsequent steps to ensure that expression features, spatial features, adjacency relationships, and clustering labels can all be mapped to the same cell object. This step provides the raw data input for subsequent preprocessing and analysis.
[0114] Step 102: Filter out low-quality cells.
[0115] After acquiring the raw data, low-quality cells should be filtered out first. This is because the raw single-cell spatial transcriptome data may contain some cells with unstable quality, such as those with insufficient overall expression information, too few effective detection genes, or cells with obvious abnormalities. If these cells are directly included in subsequent analysis, they may adversely affect expression similarity calculations, local consistency judgments, and clustering results. Therefore, it is necessary to remove or filter them first.
[0116] Optionally, low-quality cells can be identified based on the total expression level of each cell, the number of genes detected, or other statistical information reflecting the quality of the cell data. Cells that do not meet the preset quality criteria can be removed from the data to be analyzed. After this step, a relatively stable set of cells can be obtained. This set of cells will serve as the basis for subsequent low-expression gene filtering, normalization processing, and expression feature extraction.
[0117] Furthermore, the filtering method used in this step is a standard quality control measure in the data preprocessing stage. Its purpose is not to change the biological meaning of the data itself, but to minimize the impact of obviously abnormal samples on subsequent analysis. After filtering for low-quality cells, the subsequently calculated adjacency relationships and clustering results are more stable to a certain extent.
[0118] Step 103: Filter low-expression genes.
[0119] After filtering for low-quality cells, further filtering for low-expression genes can be performed. Low-expression genes generally refer to genes with limited expression coverage across multiple cells, low information content, or those that are difficult to stably reflect cellular differences. Retaining too many low-expression genes in subsequent analyses may increase data dimensionality redundancy and interfere with similarity calculations and feature extraction.
[0120] Optionally, genes can be screened based on their expression coverage in multiple cells, expression frequency, or other statistical results that reflect the effective information content of the genes. Genes that do not meet the preset expression coverage requirements can be removed from subsequent data analysis. This step preserves a set of genes with certain expression information in multiple cells, providing a basis for subsequent normalization, logarithmic transformation, and screening for hypervariable genes.
[0121] Furthermore, after filtering for low-expression genes, the effective dimensionality of the expression data can be appropriately reduced, thereby minimizing noise interference in subsequent processing without significantly losing key heterogeneity information. This processing result will be directly input into step 104 for normalization and logarithmic transformation.
[0122] Step 104: Normalize and logarithmically transform the gene expression data.
[0123] In this step, the gene expression data processed in steps 102 and 103 are normalized and further logarithmically transformed. The purpose of normalization is to reduce inconsistencies in expression scales between different cells due to differences in data acquisition depth, detection efficiency, or overall expression levels. Normalization makes the expression values between different cells more suitable for similarity comparison and subsequent feature extraction.
[0124] After normalization, the normalized expression data can be further transformed using a logarithmic transformation. The purpose of the logarithmic transformation is to compress the distribution range of expression values, reduce the dominant role of some highly expressed genes in the overall data distribution, and thus make the expression data more stable in subsequent analyses. After normalization and logarithmic transformation, expression data with relatively consistent scale and relatively flat distribution can be obtained, providing an input basis for subsequent screening of highly variable genes and calculation of expression similarity.
[0125] Furthermore, this step is not limited to a single form of normalization or logarithmic transformation. Any method that can adjust for differences in expression scale and moderately compress the expression distribution range can be used in the implementation of this invention. The expression data processed in this step will continue to be used in subsequent steps, particularly playing a fundamental role in the screening of highly variable genes, expression similarity calculation, and expression feature extraction.
[0126] Step 105: Screen for hypervariable genes based on the degree of expression fluctuation.
[0127] In this step, based on the expression data processed in step 104, hypervariable genes with high expression fluctuations in multiple cells are screened. Hypervariable genes are generally better able to reflect the differences between different cells, and therefore are often used as an important source of information for subsequent feature extraction and cluster analysis in single-cell data analysis. In contrast, genes with smaller expression changes may contribute relatively limitedly in distinguishing different cell populations.
[0128] Optionally, the expression levels of each gene in all cells can be statistically analyzed to assess the degree of expression fluctuation, and genes with relatively high fluctuation levels can be retained according to preset screening criteria. This process yields a subset of genes with relatively high information content. The expression data corresponding to this subset will be used for subsequent dimensionality reduction processing to construct a more compact and discriminative expression representation.
[0129] Furthermore, the aim of this step is to preserve as much information as possible related to cellular heterogeneity, while minimizing the impact of low-information dimensions on subsequent analysis. After screening for highly variable genes, the expression data is more suitable for calculating expression similarity and extracting expression features, thereby providing support for the subsequent construction of initial joint adjacency relationships and the implementation of adaptive fusion.
[0130] Step 106: Dimensionality reduction is performed on the processed gene expression data to generate preprocessed expression data output.
[0131] After screening for highly variable genes, the processed gene expression data can be subjected to dimensionality reduction. The purpose of dimensionality reduction is to reduce the data dimensionality while preserving the main expression differences, thereby improving the efficiency and stability of subsequent similarity calculations, adjacency relation construction, and cluster analysis. The dimensionality-reduced expression representation can serve as the basic form of cellular expression characteristics and can also be used as input for subsequent expression similarity calculations.
[0132] Furthermore, the dimensionality-reduced expression representation retains the main structural information of cells and outputs it as preprocessed expression data in a more compact form. This preprocessed expression data will be used, on the one hand, to calculate the expression similarity between the target cell and cells in the candidate spatial neighborhood in step 20, and on the other hand, to extract expression features in step 50. Therefore, step 106 constitutes a key connecting step from the original expression data to subsequent structural modeling and cluster analysis.
[0133] Through steps 101 to 106, the expression components in the original single-cell spatial transcriptome data are converted into preprocessed results suitable for calculating expression similarity relationships and extracting expression features. This result will be used in conjunction with spatial coordinate data in subsequent steps to support the implementation of the initial joint adjacency relationship construction and adaptive feature fusion in this invention.
[0134] In one embodiment, steps 201-204 are described as follows:
[0135] Step 201: Determine the candidate spatial neighborhood for each cell based on the spatial distance between cells.
[0136] In this step, candidate spatial neighborhoods for each target cell are determined based on spatial coordinate data. Specifically, the spatial nearest neighbor range around the target cell can be initially defined based on the spatial distance between the target cell and other cells. This process restricts subsequent expression similarity calculations to cells that are spatially close to the target cell, thus making the constructed adjacency relationships more consistent with the local structural features of the tissue.
[0137] It should be noted that the candidate spatial neighborhood is not the final adjacency relationship, but rather a preliminary range for subsequent expression similarity screening. In this invention, determining the candidate spatial neighborhood first, and then judging expression similarity within that range, avoids directly connecting cells that are spatially far apart but happen to be similar in expression, and also avoids unreasonable connections caused solely by spatial adjacency. Therefore, the basis for establishing the initial joint adjacency relationship is more in line with the analysis needs of single-cell spatial transcriptome data.
[0138] Furthermore, the output of step 201 includes the candidate spatial neighborhood for each target cell and the corresponding spatial proximity information. This result will serve as the scope for calculating expression similarity in step 202, and will also serve as the spatial basis for allocating the initial joint adjacency weights in step 204.
[0139] Step 202: Calculate the expression similarity between the target cell and each cell in the candidate space neighborhood.
[0140] After determining the candidate spatial neighborhood, the expression similarity between the target cell and each cell within its candidate spatial neighborhood is calculated. The expression similarity is obtained based on the gene expression data preprocessed in step 10, and its purpose is to reflect the degree of similarity in molecular expression patterns between the target cell and candidate neighborhood cells. By introducing expression similarity, it is possible to further determine whether cells in the candidate neighborhood have sufficiently similar characteristics at the expression level, based on spatial proximity.
[0141] Optionally, expression similarity can be determined by the degree of similarity between the preprocessed expression representations of the target cell and candidate neighboring cells. Higher expression similarity generally indicates a closer similarity in expression patterns; lower expression similarity indicates a more significant difference in expression levels. This similarity result will be used in the next step to screen neighboring cells to form initial adjacency relationships that are simultaneously constrained by spatial and expression constraints.
[0142] Furthermore, the expression similarity in this step is not calculated globally for all cells, but rather within a local range after spatial pre-screening. This helps to make the subsequently formed adjacency structures more consistent with the local cell organization relationships in real tissues. The expression similarity obtained in step 202 will be directly input into step 203.
[0143] Step 203: Screen neighboring cells whose expression similarity to the target cells meets the preset similarity threshold.
[0144] In this step, based on the expression similarity results obtained in step 202, neighboring cells whose expression similarity to the target cell meets a preset similarity threshold are selected. That is, in the candidate spatial neighborhood, not all cells will be retained as neighboring cells of the target cell, but further selection is performed based on expression similarity, retaining only cells that are spatially close and also have a certain degree of similarity in expression.
[0145] This screening process ensures that the initial adjacency relationships established subsequently have dual constraints: firstly, neighboring cells must be located within the local spatial range of the target cell; secondly, neighboring cells also need to have sufficient expression similarity to the target cell. This dual constraint helps reduce interference from unreasonable spatial connections and accidental similarities in non-local expression.
[0146] Furthermore, the output of this step is the initial set of neighboring cells corresponding to the target cell. This initial set of neighboring cells will serve as the basis for establishing initial joint adjacency relationships and assigning initial weights in step 204. Through this step, the candidate spatial neighborhood is further narrowed down to an effective neighborhood that balances spatial proximity and expression consistency.
[0147] Step 204: Determine the initial joint adjacency relationship and assign initial weights based on spatial distance and representational similarity.
[0148] In this step, initial joint adjacency relationships are established between the target cells and their neighboring cells identified in step 203, and initial weights are assigned to these relationships based on spatial distance and expression similarity. These initial weights characterize the overall association between the target cells and their neighboring cells. Generally, neighboring relationships with closer spatial distances and higher expression similarity correspond to higher initial weights; conversely, neighboring relationships with relatively greater spatial distances or lower expression similarity correspond to lower initial weights.
[0149] It should be noted that the initial weight allocation in this step does not require a single fixed calculation method; the key is that it comprehensively reflects both spatial distance and expression similarity information. This initial weight not only describes the preliminary association strength between the target cell and its neighboring cells but also provides a foundation for neighborhood composition in subsequent evaluations of local spatial heterogeneity. In particular, the calculations of the local spatial density index, local expression consistency index, and local boundary confidence index in subsequent step 30 are all based on the initial joint adjacency relationships constructed in this step.
[0150] Furthermore, by repeating the above process for all target cells, an initial joint adjacency relationship structure can be formed. This structure will serve as the starting point for subsequent adaptive neighborhood adjustment and feature fusion in this invention, reflecting the technical approach of combining spatial and representational information for local structure modeling.
[0151] In one embodiment, steps 301-304 are described as follows:
[0152] Step 301: Calculate the average adjacency distance of the local region where the target cell is located based on the spatial distance between each neighboring cell and the target cell in the initial neighborhood corresponding to the initial joint adjacency relationship, and determine the local spatial density index based on the average adjacency distance.
[0153] In this step, for each target cell, based on its initial neighborhood in the initial adjacency relationship, the spatial distance between the target cell and each of its neighboring cells is calculated, and the average adjacency distance of the local region where the target cell is located is also calculated. The average adjacency distance reflects the overall spatial proximity of the target cell to its surrounding cells within its local neighborhood. If the average adjacency distance is relatively small, it usually indicates that the cells around the target cell are relatively densely distributed; if the average adjacency distance is relatively large, it usually indicates that the cells around the target cell are relatively sparsely distributed.
[0154] In this embodiment, the local spatial density index can be determined based on the average adjacency distance. The local spatial density index can be expressed as:
[0155]
[0156] in, Indicates the first Local spatial density index corresponding to each cell; Indicates the first The average adjacency distance between a cell and its neighboring cells in its initial neighborhood; This indicates an adjustment term, used to prevent the denominator from being zero or too small; This represents a cell index.
[0157] in, The spatial density index is derived from the statistical results of the spatial distances between the target cell and its neighboring cells within its initial neighborhood. The spatial distance data originates from the spatial coordinate data obtained in step 10 and the initial joint adjacency relationship determined in step 20. This local spatial density index characterizes the cell distribution density in the local region where the target cell is located and will be used in subsequent step 40 to adjust the neighborhood range of the target cell. Generally, when... When the represented local region is relatively sparse, the neighborhood range can be appropriately increased; when When the represented local area is relatively dense, the neighborhood range can be appropriately reduced.
[0158] Furthermore, this step transforms the original local spatial distance information into a comparable local spatial density index that can be used for subsequent decision-making, providing a quantitative basis for the adaptive adjustment of the neighborhood range. This differs from the processing logic of the fixed neighborhood approach, which does not distinguish local density features.
[0159] Step 302: Based on the expression similarity between the target cell and each neighboring cell in the initial neighborhood corresponding to the initial joint adjacency relationship, calculate the average expression similarity of the local region where the target cell is located, and obtain the local expression consistency index.
[0160] In this step, for each target cell, based on the expression similarity between the target cell and its neighboring cells within the initial neighborhood corresponding to the initial adjacency relationship, the average expression similarity of the local region where the target cell is located is calculated, and a local expression consistency index is obtained accordingly. This index is used to measure the degree of consistency in expression patterns among cells within the local region where the target cell is located. If the overall expression similarity between the target cell and its neighboring cells is high, it indicates that the local region is relatively consistent; conversely, it indicates that there may be significant expression differences or a local transition state in the local region.
[0161] In this embodiment, the local expression consistency index can be expressed as:
[0162]
[0163] in, Indicates the first Local expression consistency indicators corresponding to each cell; Indicates the first The initial neighborhood of each cell in the initial adjacency relationship; This represents the number of neighboring cells in the initial neighborhood; This represents the index of adjacent cells in the initial neighborhood; Indicates the first The cell and the representation of the first Expression similarity between individual cells.
[0164] in, This is derived from the expression similarity calculated in step 20 based on the preprocessed gene expression data. Local expression consistency index. This is used to characterize the cellular expression similarity of the local region where the target cell is located, and will be used in subsequent steps to update the adjacency weights. Generally, when A higher value indicates that the expression structure in the local neighborhood of the target cell is relatively consistent, and the adjacency relationship weight between it and neighboring cells can be appropriately increased; when A lower value indicates that there may be more obvious expression transitions or unevenness in the local area, and the corresponding adjacency weight can be appropriately reduced.
[0165] Furthermore, this step quantifies the region where the cell is located at the local expression level, so that subsequent adjacency relationship adjustments are affected not only by spatial structure but also by the degree of consistency of expression structure, thereby improving the pertinence of adjacency relationship modeling.
[0166] Step 303: Determine the local boundary confidence index based on the local expression consistency index and the degree of difference in expression distribution of cells in the neighborhood.
[0167] In this step, the local expression consistency index obtained in step 302 and the degree of expression distribution difference among cells in the target cell's neighborhood are combined to determine the local boundary confidence index corresponding to the target cell. The local boundary confidence index is used to reflect the probability that the target cell is located near the boundary of different cell populations. Generally speaking, if the expression consistency within the local region where a target cell is located is low, and there are significant differences in expression distribution within its neighborhood, then the probability that the target cell is located in the boundary region is relatively high.
[0168] In this invention, the local boundary confidence index can be determined jointly by the local expression consistency index and the degree of expression distribution difference within the neighborhood. The degree of expression distribution difference within the neighborhood can be obtained based on the statistical analysis of expression differences between the target cell and its initial neighboring cells, with the data source still being the preprocessed gene expression data and the initial joint adjacency relationship formed in step 20. This index is not required to be limited to a unique form; the key is that it can reflect whether there are obvious expression stratification, expression transition, or heterogeneity within the local neighborhood.
[0169] Furthermore, the local boundary confidence index will be used in subsequent step 40 to reduce the adjacency weight between adjacent cells across the boundary, and will also be used in step 50 to determine the weights of expression features and spatial features. When the local boundary confidence of a target cell is high, it indicates that the cell is more likely to be located in a local boundary region. In this case, if the spatial neighborhood information is over-reliant, it may be over-smoothed towards adjacent categories. Therefore, the role of expression features in subsequent fusion can be appropriately increased.
[0170] Step 304: Output the local spatial heterogeneity evaluation index, which is used for subsequent adaptive adjacency relationship adjustment and feature fusion.
[0171] After calculating the local spatial density index, local expression consistency index, and local boundary confidence index, these are output as a unified result for evaluating local spatial heterogeneity. Specifically, for each target cell, a corresponding set of local heterogeneity evaluation information can be generated to reflect the spatial structure characteristics, expression structure characteristics, and boundary characteristics of the local region where the cell is located. This evaluation result constitutes the core basis for subsequent adaptive processing.
[0172] Furthermore, the local spatial density index output in step 304 will be used for neighborhood range adjustment in step 40; the local expression consistency index and local boundary confidence index output in step 304 will be used for adjacency relationship weight update in step 40; simultaneously, the local expression consistency index and local boundary confidence index will also be used for expression feature weight and spatial feature weight allocation in step 50. In other words, the result output in step 304 is crucial for the subsequent two key stages: adaptive adjacency relationship construction and adaptive feature fusion.
[0173] Through this step, the present invention transforms multidimensional structural information in a local region into evaluation indicators that can be directly used subsequently, thereby providing a basis for adopting different processing strategies for different types of local regions. This approach, which drives subsequent processing based on the evaluation results of local spatial heterogeneity, is one of the key features that distinguishes the present invention from existing methods that employ a unified fixed neighborhood and a unified fixed fusion strategy.
[0174] In this embodiment, the following limitations are uniformly applied to the judgment criteria of the above-mentioned local spatial heterogeneity evaluation index and the preset parameters in the method flow:
[0175] 1. Determination of the density of local spatial density index: "relatively sparse" means that the local spatial density index of the target cell is lower than the 25th percentile of the distribution of local spatial density index of all cells in the sample; "relatively dense" means that the local spatial density index of the target cell is higher than the 75th percentile of the distribution of local spatial density index of all cells in the sample.
[0176] 2. Determination of the level of local expression consistency index and local boundary confidence index: "higher" means that the corresponding index is higher than the 75th percentile of the distribution of the same index in all cells of the whole sample; "lower" means that the corresponding index is lower than the 25th percentile of the distribution of the same index in all cells of the whole sample.
[0177] 3. Exemplary values for preset thresholds: The preset similarity threshold is set to a Pearson correlation coefficient ≥ 0.6; the preset class consistency threshold is set to 0.5; and the preset cell count threshold is set to 10 cells. These thresholds can be adapted and modified according to the total number of cells and tissue type of the sample using conventional quantile adjustment methods in the art.
[0178] 4. Supplementary definitions of related terms: The cross-boundary neighboring cell refers to a neighboring cell that is spatially adjacent to the target cell but belongs to a different cell cluster in terms of local expression structure; the neighboring cluster with the highest spatial continuity refers to the neighboring cell cluster with the largest total weight of the weighted adjacency edges between it and the target cluster, wherein the weight of the weighted adjacency edges is taken from the adjacency relation weight of the corresponding cell in the adaptive adjacency relation.
[0179] In one embodiment, steps 401-405 are described as follows:
[0180] Step 401: Adjust the neighborhood range of each cell based on the local spatial density index.
[0181] In this step, the neighborhood range of each cell is adjusted based on the local spatial density index obtained in step 30. It should be noted that although the initial joint adjacency relationship has already considered both spatial proximity and expression similarity, its corresponding initial neighborhood still serves as the starting point for subsequent adaptive processing.
[0182] Since the density of cell distribution may vary in different local regions, if the same neighborhood range is used for all cells, it may be difficult to obtain sufficient neighborhood information in sparse local regions, while it may introduce more redundant adjacencies in dense local regions. Therefore, it is necessary to adjust the neighborhood range according to the local spatial density index.
[0183] Furthermore, when the local spatial density index corresponding to the target cell indicates that the cell distribution in its local area is relatively sparse, the neighborhood range of the target cell can be appropriately increased in order to introduce more information that is locally related to the target cell, thereby reducing the problem of insufficient local structure characterization caused by insufficient neighborhood information.
[0184] Correspondingly, when the local spatial density index of the target cell indicates that the cell distribution in its local area is relatively dense, the neighborhood range of the target cell can be appropriately reduced to avoid introducing too many neighboring cells that are close to each other but have limited actual contribution in the local dense area.
[0185] Optionally, the terms "relatively sparse" and "relatively dense" in this step can be determined based on a preset criterion corresponding to the local spatial density index. This preset criterion can be pre-set based on the overall distribution characteristics of the data, or it can be determined based on the relative distribution of the local spatial density index in the sample, but the present invention does not limit its specific value form.
[0186] This step allows for the formation of a neighborhood range for each target cell that better matches the characteristics of its local spatial structure, providing a suitable neighborhood basis for subsequent adjacency weight updates.
[0187] Step 402: Update the adjacency weights based on the local expression consistency index.
[0188] After adjusting the neighborhood range, this step updates the adjacency weights based on the local expression consistency index. The local expression consistency index reflects the degree of consistency in expression patterns within the local region where the target cell is located; therefore, it can serve as an important basis for judging the reliability of adjacency relationships. When the expression similarity within the local region where the target cell is located is high, it usually indicates that the local region has strong internal consistency, and the connection between the target cell and its neighboring cells can be appropriately strengthened. Conversely, when the local expression consistency is low, it indicates that there may be more obvious expression differences or state transitions within the local region, and the adjacency weights can be appropriately weakened.
[0189] Furthermore, when the local expression consistency index corresponding to the target cell is high, the adjacency weight between the target cell and its neighboring cells can be increased; when the local expression consistency index is low, the adjacency weight between the target cell and its neighboring cells can be decreased. Through this update method, regions with more stable local expression structures can exhibit stronger local cohesion in subsequent spatial feature construction, while regions with more complex local expression structures will not have their adjacency relationships over-strengthened.
[0190] It should be noted that the weight update in this step is based on the adjusted neighborhood range formed in step 401. That is, the adjustment of the neighborhood range determines "which cells enter the local neighborhood," while this step further determines "how much role these adjacency relationships should play in subsequent processing." Thus, this step makes the adaptive adjacency relationships reflect not only differences in neighborhood size but also differences in adjacency strength.
[0191] Step 403: Reduce the weight of cross-boundary adjacency relationships based on the local boundary confidence index.
[0192] In this step, the adjacency weights are further adjusted based on the local boundary confidence index, particularly suppressing cross-boundary adjacency relationships. The local boundary confidence index reflects the probability that the target cell is located near the boundary of different cell populations. When the local boundary confidence of a target cell is high, it indicates that the cell is more likely to be in a transitional or boundary region between different cell populations. In this case, if it is still strongly connected to neighboring cells on the other side of the boundary, it may introduce inappropriate spatial smoothing in subsequent spatial feature extraction and clustering optimization, affecting the differentiation of boundary regions.
[0193] Furthermore, when the local boundary confidence index corresponding to the target cell is high, the adjacency relationship weight between adjacent cells across the boundary can be reduced.
[0194] Here, "cross-boundary neighboring cells" can be understood as neighboring cells that, while spatially adjacent to the target cell, are more likely to be located on one side of a different cell population in terms of local expression structure. By reducing the weight of this type of adjacency, the target cell can be less affected by cells on the other side of the boundary in subsequent processing, thereby more reasonably preserving the expression and structural differences in the boundary region.
[0195] It should be noted that this step does not completely remove the adjacency relationships between cells near the boundary, but rather adjusts the degree of influence based on the local boundary confidence. This helps to preserve local spatial connections while reducing class confusion caused by cross-boundary propagation to some extent, providing a more suitable structural basis for subsequent adaptive feature fusion and clustering optimization in the boundary region.
[0196] Step 404: Construct an adaptive adjacency relationship based on the adjusted neighborhood range and the updated weights.
[0197] After steps 401 to 403 are completed, an adaptive adjacency relationship can be constructed based on the adjusted neighborhood range and the updated adjacency relationship weights. Compared with the initial joint adjacency relationship in step 20, the adaptive adjacency relationship further incorporates local spatial density indicators, local expression consistency indicators, and local boundary confidence indicators, thus better reflecting the organizational structure characteristics and expression heterogeneity characteristics of different local regions.
[0198] Furthermore, adaptive adjacency relations can be used to uniformly represent the adaptive connection state between each target cell and its neighboring cells. For locally sparse regions, adaptive adjacency relations can reflect a more extended neighborhood structure; for locally dense regions, they can reflect a relatively concise neighborhood structure; for regions with high local expression consistency, they can reflect stronger local connections; and for regions with high local boundary confidence, they can reflect a moderate suppression of cross-boundary connections. Thus, adaptive adjacency relations can simultaneously reflect the differences in both spatial and expressive aspects of different local regions.
[0199] The adaptive adjacency relationships obtained in this step will serve as important inputs for subsequent spatial feature extraction, and will also be used for class consistency calculation and label correction in the subsequent clustering optimization stage. Therefore, the adaptive adjacency relationships can be considered a key intermediate result connecting local heterogeneity evaluation with subsequent feature fusion and clustering optimization.
[0200] Step 405: Output the adaptive adjacency relationship and the corresponding local evaluation results.
[0201] In this step, the adaptive adjacency relation constructed in step 404 is used as the output of step 50. Simultaneously, the local spatial density index, local expression consistency index, and local boundary confidence index corresponding to each target cell can also be retained for continued use in subsequent steps. Thus, subsequent step 50 can not only extract spatial features using the adaptive adjacency relation but also assign different feature fusion weights to different cells by combining local spatial heterogeneity evaluation indicators.
[0202] Furthermore, the output of step 405 can be understood as two parts: firstly, the structural level output, which reflects the adaptive adjacency relationships of cell adjacency structures; and secondly, the evaluation level output, which reflects the set of evaluation indicators reflecting the local heterogeneity state of each cell. The former mainly serves spatial feature extraction and clustering result optimization, while the latter mainly serves the determination of feature fusion weights. Through the synergistic effect of these two types of outputs, subsequent steps of this invention can implement differentiated processing for different local regions.
[0203] Thus, steps 401 to 405 together complete the transition from the initial joint adjacency relationship to the adaptive adjacency relationship, forming an important technical feature of this invention in neighborhood modeling.
[0204] In one embodiment, steps 501-504 are described as follows:
[0205] Step 501: Extract the expression characteristics of each cell based on the preprocessed gene expression data.
[0206] In this step, expression features of each cell are extracted based on the preprocessed gene expression data from step 10. These expression features describe the internal state of each cell at the gene expression level and are crucial for distinguishing different cell populations in subsequent cluster analysis. Since step 10 has already performed low-quality cell filtering, low-expression gene filtering, normalization, logarithmic transformation, high-variance gene screening, and dimensionality reduction, the expression features extracted in this step are generally able to retain key expression differences within a relatively compact feature space.
[0207] Furthermore, expression features can be formed directly from the preprocessed expression representation, or they can be formed after further processing, as long as they can reflect the differences in expression dimensions of cells. The expression features extracted in this step will participate in the fusion weight allocation together with spatial features in subsequent step 503, and will be weighted and fused with spatial features in step 504. Since expression features mainly retain the molecular state information of the cell itself, they often play an important role in distinguishing boundaries in local boundary regions.
[0208] It should be noted that the focus of expression feature extraction in this step is on preserving expression information related to cellular heterogeneity, rather than limiting the specific feature representation. As long as it originates from preprocessed gene expression data and can serve subsequent fusion and clustering, it meets the implementation requirements of this invention.
[0209] Step 502: Extract spatial features of each cell based on adaptive adjacency relationships and spatial coordinate data.
[0210] In this step, spatial features of each cell are extracted based on the adaptive adjacency relationship output in step 40 and the spatial coordinate data obtained in step 10. Spatial features are used to characterize the spatial association state of the target cell within its local tissue environment. Unlike simply using the original coordinate information, the spatial feature extraction in this invention is based on adaptive adjacency relationships; therefore, it considers not only the spatial location of the cell but also the differences in neighborhood range and adjacency relationship weights in different local regions.
[0211] Furthermore, by combining spatial coordinate data with adaptive adjacency relationships, an information representation reflecting the local spatial structure of the target cell can be formed. For regions with strong spatial continuity within the tissue, this spatial feature can more fully reflect the stable spatial organizational relationships in the neighborhood; for boundary regions, since step 40 has already moderately suppressed cross-boundary adjacency relationships, the extracted spatial features can, to some extent, reduce the inappropriate influence of cells on the other side of the boundary. Thus, when subsequently fused with expression features, the spatial features can participate in the representation in a way that more closely matches the actual structure of the local region.
[0212] The spatial features output in this step will be used in step 503, together with the local spatial heterogeneity evaluation index, to determine the feature fusion weights, and then weighted and fused with the representational features in step 504. Thus, spatial features become another core input for this invention to achieve "co-modeling of representational information and spatial information".
[0213] Step 503: Determine the expression feature weights and spatial feature weights for each cell based on the local spatial heterogeneity evaluation index.
[0214] In this step, based on the local spatial heterogeneity evaluation index output in step 30, corresponding expression feature weights and spatial feature weights are determined for each cell. The underlying principle is that the spatial and expression structural features of different cells in their local regions are not the same. Therefore, when fusing expression and spatial features, it is not advisable to use a uniform and fixed fusion ratio for all cells. Instead, differentiated processing should be carried out according to the heterogeneity state of their local regions.
[0215] Furthermore, for cells with high local boundary confidence, the weight of expression features can be increased while the weight of spatial features can be decreased. This is because boundary regions are more susceptible to cross-boundary spatial propagation, and expression features are more conducive to preserving molecular differences on both sides of the boundary. For cells with high local expression consistency and low local boundary confidence, the weight of spatial features can be increased to better utilize the strong spatial continuity of the region where these cells are located. For cells falling between these two scenarios, appropriate weights for expression features and spatial features can be assigned based on the evaluation results of local spatial heterogeneity.
[0216] Through this step, different cells can adopt different feature emphasis strategies during the feature fusion stage, thereby distinguishing the representation of stable regions within the tissue from local boundary regions. The expression feature weights and spatial feature weights determined in this step will be directly used in step 504 to construct adaptive embedding features.
[0217] Step 504: Weighted fusion of expression features and spatial features is performed based on expression feature weights and spatial feature weights to obtain adaptive embedding features for each cell.
[0218] In this step, based on the expression feature weights and spatial feature weights determined in step 503, the expression features and spatial features of each cell are weighted and fused to obtain the adaptive embedding features of each cell. These adaptive embedding features are used to comprehensively represent the expression and spatial attributes of the cells and serve as input for subsequent clustering analysis.
[0219] In this embodiment, weighted fusion can be expressed as:
[0220]
[0221] in, Indicates the first Adaptive embedding features of individual cells; Indicates the first The expression feature weights corresponding to each cell; Indicates the first Individual cell expression characteristics; No. Spatial feature weights corresponding to each cell; Indicates the first Spatial characteristics of individual cells; This represents a cell index.
[0222] in, The expression features are derived from the preprocessed gene expression data extracted in step 501. The spatial features are derived from the adaptive adjacency relationship and spatial coordinate data extracted in step 502. and The fusion weights are derived from the evaluation index of local spatial heterogeneity determined in step 503. Adaptive embedding features. Used for clustering processing in subsequent step 60.
[0223] Furthermore, this formula reflects feature fusion performed on a per-cell basis, rather than applying a uniform, fixed-ratio fusion method to all cells. Therefore, for cells with high local boundary confidence, The value can be relatively high to enhance the effect of expression features; for cells with high local expression consistency and low local boundary confidence, The value can be relatively high to enhance the effect of spatial features. Through this step, the present invention forms an adaptive embedding representation that can adapt to the differences in features of different local regions.
[0224] In one embodiment, step 601 is described as follows:
[0225] Step 601: Use any one of K-means clustering, spectral clustering, hierarchical clustering, density clustering, or graph-based community discovery clustering to perform clustering on the adaptive embedding features to obtain the initial class labels of each cell, which are used as the initial clustering results.
[0226] In this step, any one of the following methods—K-means clustering, spectral clustering, hierarchical clustering, density clustering, or graph-based community detection clustering—is used to cluster the adaptive embedding features obtained in step 504 to obtain initial class labels for each cell. These initial class labels represent the class affiliation of each cell at the current clustering stage, thus forming the initial clustering results.
[0227] It should be noted that, since the adaptive embedding features used in this step have already fused expressive and spatial features, and this fusion process also incorporates the evaluation results of local spatial heterogeneity, the initial clustering results obtained in this step can better adapt to the structural differences of different local regions compared to clustering results obtained directly based on the original expressive data or directly based on a fixed spatial graph structure. In particular, internal regions, boundary regions, and local heterogeneous regions have been distinguished to a certain extent at the embedding representation level, which helps the initial category labels to more accurately reflect the true local structure.
[0228] Furthermore, the initial category labels output in this step are not the final result of this invention, but rather the basic input for further optimization in subsequent step 70, which incorporates spatial continuity. In other words, this step is mainly used to form an initial clustering state supported by both representational and spatial information, while further corrections to local inconsistencies and spatially continuous small clusters are completed in subsequent steps.
[0229] In one embodiment, steps 701-703 are described as follows:
[0230] Step 701: Calculate the class consistency between the target cell and its corresponding neighboring cells in the adaptive adjacency relationship.
[0231] In this step, based on the initial clustering results obtained in step 60, the class consistency between the target cell and its corresponding neighboring cells in the adaptive adjacency relation is calculated. Class consistency measures whether the target cell's current initial class label is consistent with the class distribution in its local neighborhood. If the target cell's class label is consistent with the majority of cells with high adjacency weights in its neighborhood, the class consistency is relatively high; conversely, if the target cell's class label is inconsistent with the main class distribution in its neighborhood, the class consistency is relatively low.
[0232] In this embodiment, category consistency can be represented as:
[0233]
[0234] in, Indicates the first Consistency of cell categories; Indicates the first The neighborhood of each cell in the adaptive adjacency relationship; Indicates the first The cell and the first The adaptive adjacency weights between cells; This indicates an indicator function that takes the corresponding identifier value when the condition within the parentheses is true. Indicates the first Initial category label for each cell; Indicates the first Initial category label for each cell; and Both represent cell indexes.
[0235] in, and The adaptive adjacency relationship derived from step 40 and This is derived from the initial clustering results obtained in step 60. (Class consistency) This is used in subsequent step 702 to determine whether the target cell needs category label correction. Generally speaking, if A lower value indicates a significant inconsistency between the target cell's current category label and its local neighborhood category structure, which can be further corrected in the future.
[0236] Furthermore, this step introduces adaptive adjacency weights, so that class consistency is not just a simple count of the number of cells of the same type in the neighborhood, but also considers the degree of influence of different neighboring cells on the target cell, thus making the characterization of local spatial continuity more targeted.
[0237] Step 702: When the class consistency is lower than the preset class consistency threshold, the initial class label of the target cell is corrected according to the class distribution of cells in the neighborhood and the adjacency weight.
[0238] In this step, when the class consistency of the target cell is lower than a preset class consistency threshold, the initial class label of the target cell is corrected based on the class distribution of cells in its corresponding neighborhood and the adjacency weights in the adaptive adjacency relationship. The basic idea of the correction is that if the current class label of the target cell is inconsistent with the main class distribution in its local neighborhood, it can be corrected to a more representative class label in the neighborhood to improve local spatial continuity and class stability.
[0239] Furthermore, the correction can be determined based on the proportion of different categories within the neighborhood under the weighted adjacency relationship. Specifically, when the category consistency of the target cell is lower than a preset category consistency threshold, the initial category label of the target cell can be corrected to the category label with the highest weighted proportion within the neighborhood. In this way, the category label correction of the target cell not only takes into account the number of categories within the neighborhood, but also the connection strength between different neighboring cells and the target cell, thus better conforming to the characteristics of the local spatial structure.
[0240] It should be noted that the correction in this step mainly targets cells with insufficient local cluster consistency, rather than smoothing all cells uniformly. This can, to some extent, avoid unnecessary interference with the already relatively stable initial clustering results, while also helping to preserve the real local boundaries and local differences. After this step, intermediate clustering results optimized for local consistency can be obtained.
[0241] Step 703: For small clusters with cell counts below a preset cell count threshold and spatially continuous distribution, merge the small clusters into the neighboring clusters with the highest spatial continuity to obtain the target clustering result.
[0242] In this step, after correcting the cell-level category labels, the cluster-level structure is further optimized. Specifically, small clusters with fewer cells than a preset cell number threshold and spatially continuous distribution can be merged into the adjacent clusters with the highest spatial continuity. This process is performed because after the initial clustering and local label correction, some small clusters with spatially continuous distribution may still exist. These small clusters may sometimes originate from local discrete or fragmented allocation results, and directly retaining them may affect the overall coordination of the final region division.
[0243] Furthermore, the "small cluster" in this step does not refer to all clusters with a small number of cells, but rather to clusters that simultaneously meet the criteria of having a cell count below a preset cell count threshold and being spatially continuous. For such small clusters, the neighboring cluster with the highest spatial continuity can be selected as the merging target based on its spatial continuity relationship with its surrounding adjacent clusters. Through this merging method, the fragmented cluster structure in local areas can be organized while maintaining the overall spatial structure coordination.
[0244] After this step, the target clustering result can be obtained. Compared with the initial clustering result, the target clustering result has not only undergone adaptive processing by combining expression information, spatial information and local spatial heterogeneity information in the feature construction stage, but also further optimized by combining local spatial continuity at the result level. Therefore, it is more conducive to reflecting the distribution status of cell regions, boundary relationships and local heterogeneous structures in tissues.
[0245] Optionally, refer to Figure 2 , Figure 2 This is a schematic diagram of the adaptive feature extraction and clustering system for single-cell spatial transcriptome data provided by the present invention. The adaptive feature extraction and clustering system for single-cell spatial transcriptome data includes...
[0246] The data acquisition and preprocessing module 210 is used to acquire single-cell spatial transcriptome data from multiple cells, including gene expression data and spatial coordinate data, and to preprocess the single-cell spatial transcriptome data.
[0247] The initial joint adjacency relationship construction module 220 is used to determine spatial proximity relationships based on spatial coordinate data, determine expression similarity relationships based on gene expression data, and construct initial joint adjacency relationships.
[0248] The local spatial heterogeneity evaluation module 230 is used to calculate the local spatial heterogeneity evaluation index of each cell based on the initial joint adjacency relationship. The local spatial heterogeneity evaluation index includes the local spatial density index, the local expression consistency index, and the local boundary confidence index.
[0249] The adaptive adjacency adjustment module 240 is used to adjust the neighborhood range of each cell based on the local spatial density index, and update the adjacency weight based on the local expression consistency index and the local boundary confidence index to obtain the adaptive adjacency relationship.
[0250] The feature extraction and fusion module 250 is used to extract the expression features of each cell based on the preprocessed gene expression data, extract the spatial features of each cell based on the adaptive adjacency relationship and spatial coordinate data, and perform weighted fusion of the expression features and spatial features to obtain adaptive embedding features;
[0251] Clustering module 260 is used to perform clustering based on adaptive embedding features to obtain initial clustering results;
[0252] Clustering optimization module 270 is used to optimize the initial clustering results by combining spatial continuity in order to obtain the target clustering results.
[0253] This invention constructs initial joint adjacency relationships by simultaneously combining spatial coordinate data and gene expression data. It further introduces local spatial density, local expression consistency, and local boundary confidence indices to characterize the spatial heterogeneity of different cell regions. This allows for adaptive adjustment of the neighborhood range and adjacency weights based on local spatial distribution and expression consistency characteristics. Simultaneously, based on the local spatial heterogeneity evaluation indices corresponding to different cells, expression and spatial features are differentially weighted and fused. This enables cells located in stable tissue regions to make full use of spatial continuity information, while reducing interference from inappropriate spatial smoothing in cells located in boundary regions. Furthermore, by optimizing the initial clustering results by incorporating spatial continuity, the accuracy and stability of the clustering results, as well as the ability to identify tissue boundary regions and locally heterogeneous regions, can be further improved.
[0254] Please see Figure 3 , Figure 3 An embodiment diagram of an electronic device provided in accordance with the present invention. For example... Figure 3 As shown, this embodiment of the invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it performs the following steps:
[0255] The data acquisition and preprocessing module is used to acquire single-cell spatial transcriptome data from multiple cells, including gene expression data and spatial coordinate data, and to preprocess the single-cell spatial transcriptome data.
[0256] The initial joint adjacency relationship construction module is used to determine spatial proximity relationships based on spatial coordinate data, determine expression similarity relationships based on gene expression data, and construct initial joint adjacency relationships.
[0257] The local spatial heterogeneity evaluation module is used to calculate the local spatial heterogeneity evaluation index of each cell based on the initial joint adjacency relationship. The local spatial heterogeneity evaluation index includes the local spatial density index, the local expression consistency index, and the local boundary confidence index.
[0258] The adaptive adjacency adjustment module is used to adjust the neighborhood range of each cell based on the local spatial density index, and update the adjacency weight based on the local expression consistency index and the local boundary confidence index to obtain the adaptive adjacency relationship.
[0259] The feature extraction and fusion module is used to extract the expression features of each cell based on the preprocessed gene expression data, extract the spatial features of each cell based on the adaptive adjacency relationship and spatial coordinate data, and perform weighted fusion of the expression features and spatial features to obtain adaptive embedding features;
[0260] The clustering module is used to perform clustering based on adaptive embedding features to obtain initial clustering results;
[0261] The clustering optimization module is used to optimize the initial clustering results by combining spatial continuity in order to obtain the target clustering results.
[0262] Please see Figure 4 , Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with an embodiment of the present invention is shown. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 311 is stored. When the computer program 311 is executed by a processor, it performs the following steps:
[0263] The data acquisition and preprocessing module is used to acquire single-cell spatial transcriptome data from multiple cells, including gene expression data and spatial coordinate data, and to preprocess the single-cell spatial transcriptome data.
[0264] The initial joint adjacency relationship construction module is used to determine spatial proximity relationships based on spatial coordinate data, determine expression similarity relationships based on gene expression data, and construct initial joint adjacency relationships.
[0265] The local spatial heterogeneity evaluation module is used to calculate the local spatial heterogeneity evaluation index of each cell based on the initial joint adjacency relationship. The local spatial heterogeneity evaluation index includes the local spatial density index, the local expression consistency index, and the local boundary confidence index.
[0266] The adaptive adjacency adjustment module is used to adjust the neighborhood range of each cell based on the local spatial density index, and update the adjacency weight based on the local expression consistency index and the local boundary confidence index to obtain the adaptive adjacency relationship.
[0267] The feature extraction and fusion module is used to extract the expression features of each cell based on the preprocessed gene expression data, extract the spatial features of each cell based on the adaptive adjacency relationship and spatial coordinate data, and perform weighted fusion of the expression features and spatial features to obtain adaptive embedding features;
[0268] The clustering module is used to perform clustering based on adaptive embedding features to obtain initial clustering results;
[0269] The clustering optimization module is used to optimize the initial clustering results by combining spatial continuity in order to obtain the target clustering results.
[0270] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0271] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0272] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An adaptive feature extraction and clustering method for single-cell spatial transcriptome data, characterized in that, include: Single-cell spatial transcriptome data from multiple cells were acquired, including gene expression data and spatial coordinate data, and preprocessed. Based on the spatial coordinate data, spatial proximity relationships are determined; based on the gene expression data, expression similarity relationships are determined; and an initial joint adjacency relationship is constructed. Based on the initial joint adjacency relationship, local spatial heterogeneity evaluation indices for each cell are calculated, including local spatial density indices, local expression consistency indices, and local boundary confidence indices. The neighborhood range of each cell is adjusted based on the local spatial density index, and the adjacency relationship weight is updated based on the local expression consistency index and the local boundary confidence index to obtain an adaptive adjacency relationship. Based on the preprocessed gene expression data, the expression features of each cell are extracted. Based on the adaptive adjacency relationship and spatial coordinate data, the spatial features of each cell are extracted. The expression features and the spatial features are then weighted and fused to obtain the adaptive embedding features. Clustering is performed based on the adaptive embedding features to obtain the initial clustering results; The initial clustering results are optimized by incorporating spatial continuity to obtain the target clustering results.
2. The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to claim 1, characterized in that, The preprocessing includes: Filtering out low-quality cells; Filter out genes with low expression; The gene expression data were normalized. Logarithmic transformation was performed on the normalized gene expression data; Screening for hypervariable genes based on the degree of expression fluctuation; The processed gene expression data were subjected to dimensionality reduction.
3. The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to claim 1, characterized in that, The construction of the initial joint adjacency relationship includes: The candidate spatial neighborhood for each cell is determined based on the spatial distance between cells. Calculate the expression similarity between the target cell and each cell in the candidate spatial neighborhood, and screen neighboring cells whose expression similarity with the target cell meets a preset similarity threshold; The initial joint adjacency relationship between the target cell and its neighboring cells is determined, and an initial weight is assigned to the initial joint adjacency relationship based on the spatial distance and expression similarity between the target cell and its neighboring cells.
4. The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to claim 3, characterized in that, The local spatial density index, local expression consistency index, and local boundary confidence index are all calculated based on cell data within the initial neighborhood corresponding to the initial joint adjacency relationship; wherein: The local spatial density index is used to characterize the density of cell distribution in a local region of the target cell; The local expression consistency index is used to characterize the similarity of cellular expression in local regions of the target cell; The local boundary confidence index is used to characterize the probability that the target cell is located at the boundary of different cell populations.
5. The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to claim 4, characterized in that, The local spatial density index, the local expression consistency index, and the local boundary confidence index are obtained through the following methods: Based on the spatial distance between the target cell and each neighboring cell in the initial neighborhood corresponding to the initial adjacency relationship, the average adjacency distance of the local region where the target cell is located is calculated; The spatial density of the target cell in the local area is determined based on the average adjacency distance, and the local spatial density index is obtained. Based on the expression similarity between the target cell and each neighboring cell in the initial neighborhood corresponding to the initial joint adjacency relationship, the average expression similarity of the local region where the target cell is located is calculated to obtain the local expression consistency index. The local boundary confidence index is determined based on the local expression consistency index and the degree of difference in expression distribution among cells in the neighborhood.
6. The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to claim 5, characterized in that, The process of adjusting the neighborhood range of each cell based on the local spatial density index and updating the adjacency weights based on the local expression consistency index and the local boundary confidence index includes: When the local spatial density index corresponding to the target cell indicates that the cell distribution in its local area is relatively sparse, the neighborhood range of the target cell is increased. When the local spatial density index indicates that the cell distribution in a local area is relatively dense, the neighborhood range of the target cell is reduced. When the local expression consistency index corresponding to the target cell is high, the adjacency relationship weight between the target cell and its neighboring cells is increased; When the local expression consistency index is low, the adjacency weight between the target cell and its neighboring cells is reduced; When the local boundary confidence index corresponding to the target cell is high, the adjacency relationship weight between adjacent cells across the boundary is reduced to obtain the adaptive adjacency relationship.
7. The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to claim 6, characterized in that, The process involves extracting expression features from each cell based on preprocessed gene expression data, extracting spatial features from each cell based on adaptive adjacency relationships and spatial coordinate data, and weighted fusion of the expression features and spatial features, including: Expression characteristics of each cell were extracted based on the preprocessed gene expression data; Based on the adaptive adjacency relationship and the spatial coordinate data, the spatial features of each cell are extracted; The expression feature weights and spatial feature weights corresponding to each cell are determined based on the local spatial heterogeneity evaluation index, wherein: For cells with high confidence in local boundaries, increase the weight of expression features and decrease the weight of spatial features; For cells with high local expression consistency and low local boundary confidence, increase the weight of spatial features; The expression features and spatial features are weighted and fused according to the expression feature weights and spatial feature weights to obtain the adaptive embedding features of each cell.
8. The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to claim 7, characterized in that, The adaptive embedding features are clustered using any one of the following methods: K-means clustering, spectral clustering, hierarchical clustering, density clustering, or graph-based community discovery clustering, to obtain the initial category label for each cell, which serves as the initial clustering result.
9. The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to claim 8, characterized in that, The optimization of the initial clustering result by incorporating spatial continuity to obtain the target clustering result includes: Calculate the class consistency between the target cell and its corresponding neighboring cells in the adaptive adjacency relationship, wherein the class consistency is determined based on the weighted proportion of cells in the neighborhood that have the same initial class label as the target cell; When the category consistency is lower than the preset category consistency threshold, the initial category label of the target cell is corrected to the category label with the highest weighted proportion in the neighborhood according to the category distribution of the corresponding cells in the adaptive adjacency relationship and the adjacency relationship weight. For small clusters with a cell count below a preset cell count threshold and spatially continuous distribution, the small clusters are merged into the neighboring clusters with the highest spatial continuity to obtain the target clustering result.
10. An adaptive feature extraction and clustering system for single-cell spatial transcriptome data, characterized in that, The adaptive feature extraction and clustering method for single-cell spatial transcriptome data according to any one of claims 1 to 9 includes: The data acquisition and preprocessing module is used to acquire single-cell spatial transcriptome data from multiple cells, including gene expression data and spatial coordinate data, and to preprocess the single-cell spatial transcriptome data. An initial joint adjacency relationship construction module is used to determine spatial proximity relationships based on the spatial coordinate data, determine expression similarity relationships based on the gene expression data, and construct initial joint adjacency relationships; The local spatial heterogeneity evaluation module is used to calculate the local spatial heterogeneity evaluation index of each cell based on the initial joint adjacency relationship. The local spatial heterogeneity evaluation index includes the local spatial density index, the local expression consistency index, and the local boundary confidence index. An adaptive adjacency adjustment module is used to adjust the neighborhood range of each cell based on the local spatial density index, and update the adjacency weight based on the local expression consistency index and the local boundary confidence index to obtain an adaptive adjacency relationship. The feature extraction and fusion module is used to extract the expression features of each cell based on the preprocessed gene expression data, extract the spatial features of each cell based on the adaptive adjacency relationship and spatial coordinate data, and perform weighted fusion of the expression features and the spatial features to obtain adaptive embedding features; A clustering module is used to perform clustering based on the adaptive embedding features to obtain initial clustering results; The clustering optimization module is used to optimize the initial clustering results by combining spatial continuity to obtain the target clustering results.