Spatial transcriptome data standardization processing method, cross-sample comparison method and device
Patent Information
- Application Number
- CN202611185574.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-08-06
AI Technical Summary
但是当组织具有深度沟回折叠结构时,从两侧边界出发的热场在沟回底部的中轴线区域均衰减至极小值,导致热比率在该区域趋近于0/0型不定式,使得坐标场梯度方向在中轴线处发生剧烈跳变,流线异常汇聚并形成类似叶片脉络的分叉结构,无法生成全域平滑且语义统一的内禀坐标系,导致不同样本的相同生物学位置无法准确对应,跨样本对齐准确率较低
本申请实施例提出的空间转录组数据标准化处理方法、跨样本比较方法及装置,通过获取空间转录组切片样本,从空间转录组切片样本中确定组织区域的边界轮廓,基于边界轮廓确定第一边界段和第二边界段,在组织区域的外接矩形内生成用于坐标映射的组织网格;以第一边界段作为唯一扩散热源,在组织网格进行热扩散,得到组织区域的初始相对深度分布,并基于初始相对深度分布得到由第一边界段指向第二边界段的归一化的深度方向特征;基于深度方向特征,通过全局平滑校正方法生成在组织区域内连续可微的全局平滑深度分布,基于全局平滑深度分布确定组织区域的中间深度参考线,沿着全局平滑深度分布的梯度方向生成从第一边界段穿过中间深度参考线到达第二边界段的多个组织深度轨迹线;基于中间深度参考线和组织深度轨迹线确定多个空间坐标位置,并基于空间转录组切片样本确定空间坐标位置对应的特征值,构建标准化表达矩阵。本申请实施例采用第一边界段作为唯一扩散热源进行单源热扩散,克服了复杂折叠形态的组织在形态提取时产生的局部物理方向不稳定,再通过连续可微的全局平滑深度分布确保不同组织厚度的形态延伸走向是一致的,避免由于组织剧烈形变引发的结构特征突变。在此基础上,基于全局平滑深度分布生成的组织深度轨迹线能够顺滑穿透各种复杂的生物折叠区域,从物理空间消除映射中常见的“叶脉”伪影,确保生物切片内每一个微环境测序位点均能够获得唯一的空间拓扑映射标识。最终基于组织中间深度参考线与组织深度轨迹线构建维度统一的标准化表达矩阵,将不同大小、形状、物种的组织切片映射为同样的数据结构,统一投影至相同维度的特征映射空间中,使得不同样本在矩阵中的相同位置能够精确对应一致的生物学深度与切向特征,实现跨样本空间转录组数据的直接比较,提升跨样本对齐准确率。另外,整个标准化过程不依赖基因表达或图像配准信息,对组织切片质量、测序平台差异具有较强的适应性,并且适用于各类具有复杂折叠结构的生物组织,能够实现空间转录组学的大规模跨样本比较。
Smart Images

Figure CN122696101B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of bioinformatics and computational biology, and in particular to methods for standardizing spatial transcriptome data, cross-sample comparison methods and devices. Background Technology
[0002] Spatial transcriptomics is a technology that can acquire gene expression data while preserving tissue spatial location information. In recent years, with the rapid development of various spatial transcriptomics platforms, a large amount of spatial transcriptomics data from different species, developmental stages, and physiological and pathological states has been generated, requiring systematic cross-sample comparative analysis of this data.
[0003] The relevant technology employs a coordinate construction method based on dual-source heat diffusion, solving for the thermal field from both sides of the tissue boundary and calculating the depth coordinates by the ratio of the two thermal fields. However, when the tissue has a deep groove and fold structure, the thermal field emanating from both sides decays to a minimum in the central axis region at the bottom of the grooves and folds. This causes the thermal ratio to approach a 0 / 0 indeterminate form in this region, resulting in a drastic jump in the gradient direction of the coordinate field at the central axis. The streamlines converge abnormally and form a bifurcation structure similar to leaf veins, making it impossible to generate a globally smooth and semantically unified intrinsic coordinate system. Consequently, the same biological location in different samples cannot be accurately corresponded, resulting in low cross-sample alignment accuracy. Summary of the Invention
[0004] The main objective of this application is to propose a method for standardizing spatial transcriptome data, a method and apparatus for cross-sample comparison, and to improve the accuracy of cross-sample alignment of spatial transcriptome data.
[0005] To achieve the above objectives, a first aspect of this application proposes a method for standardizing spatial transcriptome data, comprising: A spatial transcriptome slice sample is obtained, the boundary contour of the tissue region is determined from the spatial transcriptome slice sample, a first boundary segment and a second boundary segment are determined based on the boundary contour, and a tissue mesh for coordinate mapping is generated within the bounding rectangle of the tissue region. Using the first boundary segment as the sole heat source, thermal diffusion is carried out in the tissue mesh to obtain the initial relative depth distribution of the tissue region, and a normalized depth direction feature from the first boundary segment to the second boundary segment is obtained based on the initial relative depth distribution. Based on the depth direction features, a continuously differentiable global smooth depth distribution is generated within the tissue region using a global smoothing correction method. An intermediate depth reference line of the tissue region is determined based on the global smooth depth distribution. Multiple tissue depth trajectory lines are generated along the gradient direction of the global smooth depth distribution, starting from the first boundary segment, passing through the intermediate depth reference line, and reaching the second boundary segment. Multiple spatial coordinate positions are determined based on the intermediate depth reference line and the tissue depth trajectory line, and the feature values corresponding to the spatial coordinate positions are determined based on the spatial transcriptome slice samples to construct a standardized expression matrix.
[0006] In some embodiments, the step of determining a first boundary segment and a second boundary segment based on the boundary contour, and generating a tissue mesh for coordinate mapping within the bounding rectangle of the tissue region, includes: Based on the first and second anatomical anchor points determined on the boundary contour, the boundary contour is divided into the first boundary segment and the second boundary segment; A tissue mesh is generated within the bounding rectangle of the tissue region, and the mesh nodes corresponding to the tissue mesh are identified. The mesh nodes include internal tissue nodes and edge boundary nodes that intersect with the boundary contour.
[0007] In some embodiments, the internal nodes of the tissue include deep core nodes and near-edge transition nodes. The step of using the first boundary segment as the sole heat source for thermal diffusion within the tissue mesh to obtain the initial relative depth distribution of the tissue region includes: The spatial neighborhood difference features of the deep core nodes are obtained, and the spatial neighborhood difference features of the near-edge transition nodes are obtained by using embedded boundary processing. The spatial neighborhood difference matrix is obtained based on all the spatial neighborhood difference features. Obtain the average grid spacing of the tissue mesh or the average thickness of the tissue region between the first boundary segment and the second boundary segment, and obtain the diffusion time parameter based on the average thickness or the average grid spacing; Set the value of the edge intersection node located on the first boundary segment to one, and set the value of the other grid nodes to zero to obtain the heat source vector; Based on the heat source vector, the diffusion time parameter, and the spatial neighborhood difference matrix, a global diffusion estimation model is generated and solved to obtain the initial relative depth distribution.
[0008] In some embodiments, obtaining the normalized depth direction feature from the first boundary segment to the second boundary segment based on the initial relative depth distribution includes: The local depth variation vector at each of the grid nodes is calculated using the central difference approximation method; The local depth change vector is reversed in direction and normalized in magnitude to obtain the normalized depth direction feature pointing from the first boundary segment to the second boundary segment.
[0009] In some embodiments, generating a continuously differentiable global smooth depth distribution within the tissue region based on the depth direction features using a global smoothing correction method includes: Calculate the directional field divergence feature of the depth direction feature at each of the grid nodes, and generate a global smoothing model based on the directional field divergence feature to smooth the depth information of the tissue region; Set the global smooth depth distribution value of the edge junction node corresponding to the first boundary segment as the starting depth value, set the global smooth depth distribution value of the edge junction node corresponding to the second boundary segment as the maximum depth value, and set the global smooth depth distribution values corresponding to the first anatomical anchor point and the second anatomical anchor point as intermediate depth reference values to generate fixed boundary value constraints. The global smoothing model is solved on the organization mesh based on the fixed boundary value constraints to obtain the global smoothing depth distribution.
[0010] In some embodiments, generating a plurality of tissue depth trajectory lines along the gradient direction of the globally smoothed depth distribution, extending from the first boundary segment through the intermediate depth reference line to the second boundary segment, includes: Calculate the spatial length of the intermediate depth reference line, divide the spatial length into a first number of first sampling points at equal intervals, and initialize the spatial state parameters of each first sampling point, the spatial state parameters including spatial coordinates and extension distance; Calculate the local depth change direction features of the global smooth depth distribution at the spatial coordinates, normalize the local depth change direction features to obtain the extension guidance direction, the guidance direction towards the second boundary segment is the extension guidance direction, and the guidance direction towards the first boundary segment is the opposite direction of the extension guidance direction. The spatial path is extended along the guiding direction, and the spatial coordinates and the extension distance are updated during the extension process until the tissue depth trajectory line extending from the first boundary segment through the first sampling point to the second boundary segment is generated.
[0011] In some embodiments, extending the spatial path along the guiding direction, updating the spatial coordinates and the extension distance during the extension process, until the tissue depth trajectory line extending from the first boundary segment through the first sampling point to the second boundary segment is generated, includes: Based on the spatial coordinates and the guiding direction, multiple intermediate guiding changes are calculated sequentially, and the intermediate guiding changes are weighted and fused to obtain a single-step displacement vector. The single-step displacement vector is added to the spatial coordinates to update the spatial coordinates and the extension distance, and the extension path is updated according to the updated spatial coordinates. After the extension process is terminated, the extension path towards the first boundary segment is spliced with the extension path towards the second boundary segment to form a continuous tissue depth trajectory line.
[0012] In some embodiments, the step of determining multiple spatial coordinate positions based on the intermediate depth reference line and the tissue depth trajectory line, and determining the feature values corresponding to the spatial coordinate positions based on the spatial transcriptome slice samples to construct a standardized expression matrix includes: For each tissue depth trajectory line, calculate the total length of the trajectory line, and divide the total length of the trajectory line into a second number of second sampling points at equal intervals; Using the tangential position of the first sampling point corresponding to the intermediate depth reference line as the row index and the streamline depth position corresponding to the second sampling point as the column index, multiple spatial coordinate positions of the two-dimensional matrix are determined based on the row index and the column index. For each spatial coordinate location, the nearest spatial site is matched in the spatial transcriptome slice sample, and the gene expression vector corresponding to the spatial site is used as the feature value corresponding to the spatial coordinate location. The normalized expression matrix is constructed based on the feature value, and the dimension of the normalized expression matrix is determined according to the first quantity and the second quantity.
[0013] To achieve the above objectives, a second aspect of this application proposes a method for cross-sample comparison of spatial transcriptome data, the method further comprising: The standardized expression matrices of multiple different samples are stacked and combined to obtain a three-dimensional data tensor. The three-dimensional data tensor is subjected to non-negative matrix decomposition or tensor decomposition to obtain the corresponding dimensional spatial expression patterns extracted along the tangential and depth dimensions. The standardized expression matrix is obtained according to the spatial transcriptome data standardization processing method described in any of the first aspects. Alternatively, joint clustering can be performed on the feature values corresponding to multiple different samples at the same spatial coordinate position to obtain cross-sample conserved structural domains and / or sample-specific organizational domains. Alternatively, the spatial gradients of the corresponding feature values can be calculated along the tangential and depth dimensions of the standardized expression matrix, respectively, and the distribution patterns of gene modules and cell types exhibiting gradient changes along the corresponding coordinate directions can be determined based on the spatial gradients.
[0014] To achieve the above objectives, a third aspect of this application provides a spatial transcriptome data normalization processing apparatus, comprising: The computational preprocessing module is used to acquire spatial transcriptome slice samples, determine the boundary contours of tissue regions from the spatial transcriptome slice samples, determine a first boundary segment and a second boundary segment based on the boundary contours, and generate a tissue mesh for coordinate mapping within the bounding rectangle of the tissue region. Normalized depth direction feature generation module: used to perform thermal diffusion in the tissue mesh with the first boundary segment as the only diffused heat source to obtain the initial relative depth distribution of the tissue region, and obtain the normalized depth direction feature from the first boundary segment to the second boundary segment based on the initial relative depth distribution; Tissue depth trajectory line determination module: Based on the depth direction features, it generates a continuously differentiable global smooth depth distribution within the tissue region using a global smoothing correction method, determines an intermediate depth reference line for the tissue region based on the global smooth depth distribution, and generates multiple tissue depth trajectory lines from the first boundary segment through the intermediate depth reference line to the second boundary segment along the gradient direction of the global smooth depth distribution. A normalized matrix mapping module is used to determine multiple spatial coordinate positions based on the intermediate depth reference line and the tissue depth trajectory line, and to determine the feature values corresponding to the spatial coordinate positions based on the spatial transcriptome slice samples, thereby constructing a normalized expression matrix. A spatial transcriptome data normalization processing device includes: The spatial transcriptome data standardization processing method, cross-sample comparison method, and apparatus proposed in this application acquire spatial transcriptome slice samples, determine the boundary contours of tissue regions from the spatial transcriptome slice samples, determine a first boundary segment and a second boundary segment based on the boundary contours, and generate a tissue grid for coordinate mapping within the circumscribed rectangle of the tissue region; using the first boundary segment as the sole heat source, thermal diffusion occurs within the tissue grid to obtain the initial relative depth distribution of the tissue region, and a normalized depth direction feature pointing from the first boundary segment to the second boundary segment is obtained based on the initial relative depth distribution; based on the depth direction feature, a continuously differentiable global smooth depth distribution is generated within the tissue region using a global smoothing correction method; an intermediate depth reference line of the tissue region is determined based on the global smooth depth distribution; multiple tissue depth trajectory lines are generated along the gradient direction of the global smooth depth distribution, from the first boundary segment through the intermediate depth reference line to the second boundary segment; multiple spatial coordinate positions are determined based on the intermediate depth reference line and the tissue depth trajectory lines, and the feature values corresponding to the spatial coordinate positions are determined based on the spatial transcriptome slice samples to construct a standardized expression matrix. This application employs a first boundary segment as the sole heat source for single-source heat diffusion, overcoming the local physical orientation instability caused by complex folded tissues during morphological extraction. Furthermore, a continuously differentiable, globally smooth depth distribution ensures consistent morphological extension across different tissue thicknesses, preventing structural feature mutations caused by drastic tissue deformation. Based on this, the tissue depth trajectory line generated by the globally smooth depth distribution smoothly penetrates various complex biological folded regions, eliminating common "vein" artifacts in physical mapping and ensuring that each microenvironment sequencing site within the biological slice obtains a unique spatial topological mapping identifier. Finally, a standardized expression matrix with unified dimensions is constructed based on the tissue intermediate depth reference line and the tissue depth trajectory line, mapping tissue slices of different sizes, shapes, and species to the same data structure and uniformly projecting them into a feature mapping space of the same dimension. This allows different samples at the same position in the matrix to accurately correspond to consistent biological depth and tangential features, enabling direct comparison of cross-sample spatial transcriptome data and improving cross-sample alignment accuracy. In addition, the entire standardization process does not rely on gene expression or image registration information, is highly adaptable to differences in tissue slice quality and sequencing platforms, and is applicable to various biological tissues with complex folding structures, enabling large-scale cross-sample comparisons of spatial transcriptomics. Attached Figure Description
[0015] Figure 1 This is a flowchart of the spatial transcriptome data standardization processing method provided in the embodiments of this application.
[0016] Figure 2This is a flowchart provided in this application embodiment for generating an organizational mesh for coordinate mapping within the circumscribed rectangle of an organizational region based on determining the first and second boundary segments according to the boundary contour.
[0017] Figure 3 This is a flowchart provided by an embodiment of the present application, in which a first boundary segment is used as the sole heat source for thermal diffusion in the tissue mesh to obtain the initial relative depth distribution of the tissue region.
[0018] Figure 4 This is a flowchart of a normalized depth direction feature from the first boundary segment to the second boundary segment, based on an initial relative depth distribution, provided in an embodiment of this application.
[0019] Figure 5 This is a flowchart illustrating the generation of a continuously differentiable global smooth depth distribution within a tissue region using a global smoothing correction method, as provided in an embodiment of this application.
[0020] Figure 6 This is a flowchart provided in an embodiment of the present application for generating multiple tissue depth trajectory lines from the first boundary segment through the intermediate depth reference line to the second boundary segment along the gradient direction of the globally smooth depth distribution.
[0021] Figure 7 This is a flowchart provided in the embodiments of this application, which shows that spatial paths are extended along the guiding direction, and spatial coordinates and extension distances are updated during the extension process until a tissue depth trajectory line is generated extending from the first boundary segment through the first sampling point to the second boundary segment.
[0022] Figure 8 This is a flowchart provided in the embodiments of this application to determine multiple spatial coordinate positions based on intermediate depth reference lines and tissue depth trajectory lines, and to determine the feature values corresponding to the spatial coordinate positions based on spatial transcriptome slice samples, and to construct a standardized expression matrix.
[0023] Figure 9 This is a flowchart of a cross-sample comparison method for spatial transcriptome data provided in an embodiment of this application.
[0024] Figures 10a to 10d This is a schematic diagram of small intestinal tissue region data analysis provided in an embodiment of this application.
[0025] Figures 11a to 11e This is a schematic diagram of data analysis of the spinal region of a developing mouse provided in an embodiment of this application.
[0026] Figures 12a to 12f This is a schematic diagram of psoriasis lesion tissue data analysis provided in the embodiments of this application.
[0027] Figure 13 This is a structural block diagram of the spatial transcriptome data normalization processing device provided in the embodiments of this application.
[0028] Figure 14 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0030] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0032] Spatial transcriptomics is a technology that can acquire gene expression data while preserving tissue spatial location information. In recent years, with the rapid development of various spatial transcriptomics platforms, a large amount of spatial transcriptomics data from different species, developmental stages, and physiological and pathological states has been generated, requiring systematic cross-sample comparative analysis of this data.
[0033] In the field of spatial transcriptomics, methods for multi-slice processing and spatial coordinate construction fall into the following categories: The first category is spatial alignment methods based on gene expression similarity. Represented by PASTE and STalign, these methods establish correspondences between loci by calculating the gene expression similarity between spatial sites in different slices, thereby achieving spatial alignment between slices. The second category is methods based on histological image registration. Represented by tools such as STUtility and Giotto, these methods rely on histologically stained images of tissue slices and achieve alignment between slices through image feature matching. The third category is coordinate construction methods based on simplified geometric assumptions. Represented by Spateo, these methods establish multiple control points (usually four) on the tissue boundary and construct a coordinate system within the tissue using the steady-state heat conduction equation. Specifically, multiple temperature control points are set on the tissue boundary, and the temperature field is obtained by solving the steady-state heat conduction equation or by solving a dual-source global diffusion estimation model to obtain the heat fields emanating from both sides of the boundary. and In terms of heat ratio As depth coordinates.
[0034] However, the first type of method suffers from circular reasoning. The alignment results of this type of method rely on gene expression itself, which poses a risk of circular reasoning when used to discover differences in gene expression across samples. Furthermore, when two slices come from different species or developmental stages, the gene expression profiles may differ significantly, causing alignment methods based on expression similarity to fail. This type of method inherently cannot establish a unified coordinate system independent of gene expression. The second type of method requires high-quality histological staining images as input, cannot directly utilize the geometric information of the spatial transcriptome data itself, and is difficult to apply to tissues with significant morphological differences between different species. The third type of method suffers from "vein" artifacts. When tissues have deep grooved and folded structures, the thermal field emanating from the lateral boundaries decays to a minimum in the central axis region at the bottom of the grooves, causing the thermal ratio to approach a 0 / 0 indeterminate form in this region. This results in a drastic jump in the gradient direction of the coordinate field at the central axis, abnormal convergence of streamlines, and the formation of a bifurcated structure resembling leaf veins. This makes it impossible to generate a globally smooth and semantically unified intrinsic coordinate system, leading to inaccurate correspondence between the same biological locations in different samples and low cross-sample alignment accuracy. Furthermore, the method's use of four control points makes it difficult to establish consistent correspondences in cross-species comparisons.
[0035] Therefore, it can be seen that the above three types of methods share a common fundamental deficiency: the lack of a unified coordinate standardization framework based on the tissue's intrinsic geometry and independent of gene expression. In particular, for tissues with complex folded morphologies, these methods cannot reliably construct a smooth and consistent intrinsic coordinate system.
[0036] Based on this, this application provides a method for standardizing spatial transcriptome data, a method for cross-sample comparison, and an apparatus. It employs a first boundary segment as the sole heat source for single-source heat diffusion, overcoming the local physical orientation instability caused by complex folded tissues during morphological extraction. Furthermore, a continuously differentiable global smooth depth distribution ensures consistent morphological extension directions across different tissue thicknesses, avoiding structural feature mutations caused by drastic tissue deformation. On this basis, the tissue depth trajectory line generated based on the global smooth depth distribution can smoothly penetrate various complex biological folded regions, eliminating common "vein" artifacts in mapping from the physical spatial root, ensuring that each microenvironment sequencing site within the biological slice obtains a unique spatial topological mapping identifier. Finally, a standardized expression matrix with unified dimensions is constructed based on the tissue intermediate depth reference line and the tissue depth trajectory line, mapping tissue slices of different sizes, shapes, and species to the same data structure and uniformly projecting them into a feature mapping space of the same dimension. This allows different samples to accurately correspond to consistent biological depth and tangential features at the same position in the matrix, enabling direct comparison of cross-sample spatial transcriptome data and improving cross-sample alignment accuracy. Furthermore, the entire standardization process does not rely on gene expression or image registration information, is highly adaptable to differences in tissue section quality and sequencing platforms, and is applicable to various biological tissues with complex folding structures, enabling large-scale cross-sample comparisons of spatial transcriptomics.
[0037] This application provides a method for standardizing spatial transcriptome data, a method for cross-sample comparison, and an apparatus, which are specifically described through the following embodiments. First, the method for standardizing spatial transcriptome data in this application is described.
[0038] The spatial transcriptome data standardization method provided in this application relates to the fields of bioinformatics and computational biology. This method can be applied to a terminal, a server, or a computer program running on either a terminal or a server. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run, such as a client supporting spatial transcriptome data standardization, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin. The terminal communicates with the server via a network. This spatial transcriptome data standardization method can be executed by the terminal or the server, or by the terminal and the server working together.
[0039] In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, or smartwatch, etc. The server can be a standalone server, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms; it can also be a service node in a blockchain system, where the service nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). The terminal and server can connect via Bluetooth, Universal Serial Bus (USB), or a network, etc., and this embodiment does not impose any limitations.
[0040] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0041] The spatial transcriptome data normalization method described in the embodiments of this application is as follows.
[0042] Figure 1 This is an optional flowchart of the spatial transcriptome data normalization processing method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps 110 to 130. It is also understood that this embodiment... Figure 1 The order of steps 110 to 130 is not specifically limited. The order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0043] Step 110: Obtain spatial transcriptome slice samples, determine the boundary contour of the tissue region from the spatial transcriptome slice samples, determine the first boundary segment and the second boundary segment based on the boundary contour, and generate a tissue mesh for coordinate mapping within the bounding rectangle of the tissue region.
[0044] In one embodiment, the spatial transcriptome slide sample may include high-resolution microscopic images of tissue slides and gene expression data corresponding to each spatial site. For spatial transcriptome slide samples from different species, different developmental stages, and different physiological and pathological states, they are standardized one by one according to the spatial transcriptome data standardization processing method of the embodiments of this application.
[0045] First, for spatial transcriptome slide samples, it is necessary to determine the tissue region. boundary contour The boundary contour is a closed curve. For example, the interactive Lasso annotation tool can be used for boundary annotation. This tool allows anatomists to delineate boundaries, select anchor points, and remove non-target areas. Specifically, this tool supports dragging and dropping to draw free-form closed curves, providing real-time preview of the area enclosed by the curve, and automatically identifying valid tissue areas within the curve. The interactive Lasso annotation tool also supports manually dragging to adjust the position of individual boundary points and selecting and deleting incorrectly selected background areas. This embodiment significantly improves the accuracy and efficiency of boundary annotation through this annotation method, reducing systematic errors caused by purely manual annotation.
[0046] In one embodiment, reference is made to Figure 2 , Figure 2 This is a flowchart provided in this application embodiment, which describes the generation of a tissue mesh for coordinate mapping within the circumscribed rectangle of a tissue region based on the determination of a first boundary segment and a second boundary segment according to the boundary contour. The flowchart specifically includes the following steps: Step 210: Divide the boundary contour into a first boundary segment and a second boundary segment based on the first and second anatomical anchor points determined on the boundary contour.
[0047] In one embodiment, for the tissue region of a spatial transcriptome slice sample, a first anatomical anchor point and a second anatomical anchor point are selected. Anatomical anchor points are characteristic points on the tissue boundary with clear and stable anatomical significance, maintaining positional consistency in similar tissue samples from different individuals and at different developmental stages. For example, anatomical anchor points could be the anterior and posterior ends of the hippocampus in a cerebral cortex slice, the apex of the villi and the base of the crypts in a small intestine slice, or the two ends of the epidermis in a skin slice. In this embodiment, two anatomical anchor points are selected by clicking on the tissue region boundary contour and marked as the first anatomical anchor point. Second anatomical anchor point .
[0048] Next, based on the first anatomical anchor point Second anatomical anchor point Divide the first boundary segment Second boundary segment Specifically, the closed boundary contour is divided into two independent continuous curves using two anatomical anchor points. The curve running clockwise from the first anatomical anchor point to the second anatomical anchor point serves as the first boundary segment, and the curve running clockwise from the second anatomical anchor point to the first anatomical anchor point serves as the second boundary segment. The resulting first boundary segment serves as the sole diffusion heat source for the subsequent single-source heat diffusion process, while the second boundary segment serves as the far-end boundary condition for solving the global smooth depth distribution.
[0049] Step 220: Generate an organization mesh within the bounding rectangle of the organization region and identify the mesh nodes corresponding to the organization mesh.
[0050] In one embodiment, a tissue mesh is generated within the bounding rectangle of the tissue region. First, the bounding rectangle is determined, and the minimum and maximum x-coordinates, minimum and maximum y-coordinates of all points along the boundary contour of the tissue region are calculated. Using the minimum and minimum y-coordinates as the lower left corner and the maximum and maximum y-coordinates as the upper right corner, a bounding rectangle completely enclosing the tissue region is generated. Then, equally spaced tissue meshes are divided within the bounding rectangle. This represents the distance between two adjacent parallel grid lines, which can be adjusted according to the actual size of the organization area and the required calculation accuracy.
[0051] In one embodiment, after discretizing the organizational region using an organizational mesh, multiple mesh nodes are obtained. These mesh nodes include internal nodes located within the organizational region and edge boundary nodes intersecting with the boundary contour. Internal nodes are further divided into two categories based on their neighborhood composition: if an internal node does not contain any edge boundary nodes within a preset proximity range, it is considered a deep core node, and a standard discrete approximation calculation format is used for it; if it contains at least one edge boundary node within its preset proximity range, it is considered a near-edge transition node, and an embedded boundary processing method is used for it, determining the actual boundary neighbor points through nearest neighbor search to ensure the accuracy of the discrete approximation. The preset proximity range is the set of adjacent nodes within a preset physical distance.
[0052] Step 120: Using the first boundary segment as the sole heat source, thermal diffusion is carried out in the tissue mesh to obtain the initial relative depth distribution of the tissue region, and based on the initial relative depth distribution, the normalized depth direction feature from the first boundary segment to the second boundary segment is obtained.
[0053] In one embodiment, unlike the dual heat sources selected in related technologies, this embodiment uses only the first boundary segment as the sole heat source for thermal diffusion within the mesh. (Refer to...) Figure 3 , Figure 3 This is a flowchart provided by an embodiment of the present application, which uses a first boundary segment as the sole heat source to diffuse heat within the tissue mesh, thereby obtaining the initial relative depth distribution of the tissue region. The flowchart specifically includes the following steps: Step 310: Obtain the spatial neighborhood difference features of the deep core nodes, and use embedded boundary processing to obtain the spatial neighborhood difference features of the near-edge transition nodes. Based on all the spatial neighborhood difference features, obtain the spatial neighborhood difference matrix of the deep core nodes and the near-edge transition nodes.
[0054] In one embodiment, for deep core nodes, spatial neighborhood difference features are directly constructed, where the spatial neighborhood difference features can be discrete Laplace operators. Discrete Laplace operators are numerical approximations of continuous Laplace operators on discrete grids, used to describe the spatial variation of the second derivative of a scalar field. On the organized grid, the spatial neighborhood difference features of deep core nodes are approximated using a standard five-point difference scheme, where the five-point difference scheme calculates the Laplace value of the current node using the scalar values of the current node and its four adjacent nodes (up, down, left, and right).
[0055] Therefore, for any deep core node (x, y), its spatial neighborhood difference feature is represented as:
[0056] in, This refers to the grid spacing in the x and y directions, not the actual grid spacing values. The general mathematical placeholder for node (x, y) represents any scalar field. It has no specific physical meaning and is only used to show the scalar value in the initial relative depth distribution of the five-point difference scheme, similar to the unknown variable in a mathematical formula.
[0057] For near-edge transition nodes, this embodiment employs an embedded boundary processing method to construct spatial neighborhood difference features. Nearest neighbor search is used to determine the nearest edge boundary node in the direction of the current node's missing node. The scalar value of this edge boundary node is then used to replace the scalar value of the missing adjacent node. Finally, the Laplacian value is calculated using a five-point difference scheme, ensuring the computational accuracy of near-edge transition nodes close to the boundary region.
[0058] Finally, regardless of whether it is a deep core node or a near-edge transition node, its spatial neighborhood difference features are arranged in order of node number to construct a spatial neighborhood difference matrix. .
[0059] Step 320: Obtain the average grid spacing of the tissue mesh or the average thickness of the tissue region between the first boundary segment and the second boundary segment, and obtain the diffusion time parameter based on the average thickness or the average grid spacing.
[0060] In one embodiment, the diffusion time parameter t is used to control the range and intensity of thermal diffusion, and it can be calculated in two ways. The first is based on the average thickness d of the tissue region between the first and second boundary segments, expressed as: α is a preset adjustment coefficient, which can be 1.0. The second method is based on the average grid spacing h of the organized mesh, expressed as... The average grid spacing is obtained from the average grid spacing. This is because the actual distance between the edge intersection nodes generated at the intersection of the grid and the boundary contour and the adjacent internal nodes may be less than the standard grid spacing. Therefore, the average distance between all adjacent node pairs is taken as h to more accurately reflect the actual spacing characteristics of the grid.
[0061] Step 330: Set the value of the edge intersection node located on the first boundary segment to one, and set the value of other grid nodes to zero to obtain the heat source vector.
[0062] In one embodiment, the heat source vector This is a one-dimensional vector with the same length as the total number of grid nodes, used to mark the location of heat sources for heat diffusion. In this embodiment, the vector element values corresponding to all edge intersection nodes on the first boundary segment are set to 1, and the vector element values corresponding to all other grid nodes are set to 0, thus constructing the heat source vector corresponding to a single heat source. This single heat source fundamentally avoids the problem of mutual interference between the two thermal fields in dual-source heat diffusion.
[0063] Step 340: Generate and solve the global diffusion estimation model based on the heat source vector, diffusion time parameter, and spatial neighborhood difference matrix to obtain the initial relative depth distribution.
[0064] In one embodiment, based on the spatial neighborhood difference matrix diffusion time parameter t and heat source vector Solve the following global diffusion estimation model, where the global diffusion estimation model is a shielded Poisson equation, expressed as:
[0065] in, is the identity matrix, whose dimensions are the same as the spatial neighborhood difference matrix, and u is the initial relative depth distribution obtained by solving.
[0066] It is understandable that the key advantage of using single-source diffusion estimation in this embodiment is that even if the initial relative depth distribution decays to a minimum value in the region far from the first arc segment, the normalized depth direction feature obtained after direction reversal and amplitude normalization still maintains reliable direction information. This is fundamentally different from the existing dual-source method, which diffuses from both sides of the boundary. In the region at the bottom of the tissue fold, the two diffusion results decay to a minimum value at the same time, and their ratio approaches an indeterminate form, resulting in the complete loss of direction information. This is the root cause of the "vein" artifact. In one embodiment, reference is made to Figure 4 , Figure 4This is a flowchart illustrating the process of obtaining a normalized depth direction feature from the first boundary segment to the second boundary segment based on an initial relative depth distribution, provided in an embodiment of this application. The flowchart specifically includes the following steps: Step 410: Use the central difference approximation to calculate the local depth change vector at each grid node of the initial relative depth distribution.
[0067] In one embodiment, after obtaining the initial relative depth distribution, the central difference approximation can be used to calculate the local depth change vector at each grid node, which is the corresponding spatial gradient. The central difference approximation calculates the local depth change vector using the scalar values of the two adjacent nodes (left, right, and top / bottom) in the initial relative depth distribution. Therefore, for any grid node (x, y), after applying the central difference approximation, its local depth change vectors in the x and y directions are expressed as follows:
[0068]
[0069] in, dx and dy represent the specific scalar values in the initial relative depth distribution at node (x,y), where dx and dy represent the actual grid spacing in the x and y directions, respectively.
[0070] Step 420: Perform direction flipping and amplitude normalization on the local depth change vector to obtain the normalized depth direction feature pointing from the first boundary segment to the second boundary segment.
[0071] In one embodiment, the calculated local depth change vector is inverted and its magnitude is normalized, followed by direction flipping and amplitude normalization, to obtain the normalized depth direction feature X, whose direction points from the first boundary segment to the second boundary segment, as shown below:
[0072] in, This is the spatial gradient vector, which includes gradient components in the x and y directions. This represents the magnitude of the spatial gradient vector. In this embodiment, the direction of the normalized depth direction feature is flipped by reversing the local depth change vector, so that the direction points from the first boundary segment to the second boundary segment, consistent with the direction of depth increase. It can be understood that this embodiment uses a single anatomical boundary as a single heat source for diffusion estimation. Even if the initial relative depth distribution characterizing endogenous depth experiences significant numerical attenuation in deeper tissue regions far from this boundary, after direction flipping and amplitude normalization, discarding amplitude information and retaining only direction information, the resulting normalized depth direction feature still maintains a continuous and consistent direction throughout the entire tissue region. This operation effectively overcomes the defect of existing dual-source methods where direction information is lost in the tissue fold bottom region due to the simultaneous attenuation of diffusion results on both sides to a minimum, and is one of the key operations for eliminating "vein" artifacts.
[0073] Step 130: Based on the depth direction features, generate a continuously differentiable global smooth depth distribution within the tissue region using a global smoothing correction method. Determine the intermediate depth reference line of the tissue region based on the global smooth depth distribution. Generate multiple tissue depth trajectory lines from the first boundary segment through the intermediate depth reference line to the second boundary segment along the gradient direction of the global smooth depth distribution.
[0074] In one embodiment, a globally smoothed depth distribution needs to be determined based on normalized depth direction features. (Refer to...) Figure 5 , Figure 5 This is a flowchart illustrating the generation of a continuously differentiable global smooth depth distribution within a tissue region using a global smoothing correction method, as provided in this application embodiment. The flowchart specifically includes the following steps: Step 510: Calculate the directional field divergence feature of the depth direction feature at each grid node, and generate a global smoothing model based on the directional field divergence feature to smooth the depth information of the tissue region.
[0075] In one embodiment, normalized depth orientation features Each grid node corresponds to a unit direction vector, which includes the x-direction component. and y-direction components The central difference approximation method is used to calculate the divergence characteristic of the normalized depth direction feature at each grid node, i.e., the divergence value, which describes the degree of divergence of the normalized depth direction feature at each grid node, and is expressed as:
[0076] in, The x-direction component represents the normalized depth-direction feature at node (x, y). This represents the y-direction component of the normalized depth-direction feature at node (x,y).
[0077] Then, a global smoothing model for smoothing the depth information of the tissue region is generated based on the divergent feature of the directional field. Here, the Poisson equation with fixed boundary value constraints is selected as the global smoothing model, where the fixed boundary value constraints are Dirichlet boundary conditions. The form of the global smoothing model is as follows: ,exist internal Where Δ is the spatial neighborhood difference matrix. The global smooth depth distribution to be solved is... This is the vector formed by the calculated divergence features of the directional field. At the discrete level, for the internal node part, the coefficient matrix of this global smoothing model is exactly the same as the spatial neighborhood difference matrix, only the right-hand vector is different. Therefore, the previously constructed spatial neighborhood difference matrix can be directly reused, reducing the amount of computation.
[0078] For node i within the organization, its global smoothing model is represented as:
[0079] in, Let be the globally smoothed depth distribution value of the neighboring nodes of node i within the organization. Let be the globally smoothed depth distribution value of the internal node i. denoted as the local divergence of the depth-direction feature at internal node i.
[0080] Step 520: Set the global smooth depth distribution value of the edge junction node corresponding to the first boundary segment as the starting depth value, set the global smooth depth distribution value of the edge junction node corresponding to the second boundary segment as the maximum depth value, and set the global smooth depth distribution value corresponding to the first anatomical anchor point and the second anatomical anchor point as the intermediate depth reference value to generate fixed boundary value constraints.
[0081] In one embodiment, the process of setting the fixed boundary value constraint conditions corresponding to the global smoothing model is as follows: the global smoothing depth distribution value of all edge intersection nodes corresponding to the first boundary segment is set as the starting depth value, for example, 0; the global smoothing depth distribution value of all edge intersection nodes corresponding to the second boundary segment is set as the maximum depth value, for example, 100; and the global smoothing depth distribution value corresponding to the first anatomical anchor point and the second anatomical anchor point is set as the intermediate depth reference value, for example, 50.
[0082] The final fixed boundary value constraint is expressed as follows:
[0083] Next, fixed boundary value constraints are implemented at the discrete level. For each edge boundary node i, the i-th row of the spatial neighborhood difference matrix is set as a row vector with diagonal elements of 1 and all other elements of 0. At the same time, the i-th element of the right-hand vector is set as a preset value corresponding to the edge boundary node, including the starting depth value, the maximum depth value, or the intermediate depth reference value. This can fix the depth value of the edge boundary node to the preset value without affecting the solution of the equations of the nodes inside the organization region.
[0084] Step 530: Solve the global smoothing model on the organization mesh based on the fixed boundary value constraints to obtain the global smoothing depth distribution.
[0085] In one embodiment, solving the global smoothing model with the aforementioned fixed boundary value constraints yields the global smoothing depth distribution. For example, the conjugate gradient method or other sparse linear equation solvers can be used. The computational complexity is linearly related to the number of grid nodes. After solving, the global smoothing depth distribution values of all nodes within the tissue region and the boundary nodes are obtained, constituting the global smoothing depth distribution. Then, the obtained global smoothing depth distribution values are mapped onto the tissue mesh to obtain a global smoothing depth distribution covering the entire tissue region.
[0086] Because the Laplacian operator is an elliptic operator, its inverse operator possesses global smoothing properties. Therefore, even if the normalized depth direction feature exhibits a local directional jump at the central axis at the bottom of the groove, causing a local peak in the local divergence of the depth direction feature, the solution process of the global smoothing model will smoothly diffuse this local perturbation to the surrounding region, ensuring that the global smoothed depth distribution remains continuously differentiable at the central axis. Simultaneously, fixed boundary value constraints ensure the boundedness and stability of the solution, strictly constraining the range of the global smoothed depth distribution within the interval of 0 to 100. The extremum principle of the elliptic equation ensures that the depth values within the organization region will not significantly deviate from this interval, avoiding the extreme deviations in the range that occur without boundary conditions, such as from -1563 to 266, thus ensuring the stability of numerical calculations and the reliability of results.
[0087] In one embodiment, the median contour line of the globally smooth depth distribution is selected as the intermediate depth reference line of the tissue region. Multiple tissue depth trajectory lines are generated based on the intermediate depth reference line, which is represented as follows:
[0088] The intermediate depth reference line is the geometric center line of the tissue region, a continuous smooth curve connecting the first and second anatomical anchor points, representing the intermediate depth position of the tissue region. In tissues with complex folded structures, the arc lengths of the first and second boundary segments may differ by several times. For example, in the sagittal plane of the cerebral cortex, the arc length of the second boundary segment may be three times that of the first boundary segment. If the two arc segments are parameterized by their arc lengths and harmonicized internally, the contour lines will be severely distorted. Therefore, this embodiment selects the median contour line of the globally smooth depth distribution as the intermediate depth reference line of the tissue region to avoid the coordinate distortion problem caused by the mismatch in arc lengths when directly assigning coordinate values to the two arc segments.
[0089] In one embodiment, reference is made to Figure 6 , Figure 6 This application provides a flowchart for generating multiple tissue depth trajectory lines along the gradient direction of a globally smooth depth distribution, from the first boundary segment through the intermediate depth reference line to the second boundary segment. The flowchart specifically includes the following steps: Step 610: Calculate the spatial length of the intermediate depth reference line, divide the spatial length into equal intervals to obtain a first number of first sampling points, and initialize the spatial state parameters of each first sampling point.
[0090] In one embodiment, the Euclidean distance between two adjacent sampling points on the intermediate depth reference line C is calculated sequentially, and all adjacent distances are summed to obtain the spatial length L of the intermediate depth reference line. Then, according to the preset tangential resolution requirements, the spatial length of the intermediate depth reference line is sampled at equal intervals to obtain M (a first number) first sampling points. Uniform sampling of the spatial length of the intermediate depth reference line is crucial for establishing cross-sample comparability. Different samples have different shapes of the intermediate depth reference line, but uniform sampling along the intermediate depth reference line ensures that each "column" represents the same proportion of tangential positions. The first number can be adjusted according to the size of the tissue region and the required analytical precision, and its value can range from 50 to 200.
[0091] Then, the spatial state parameters of each first sampling point are initialized. The spatial state parameters include the spatial coordinates r corresponding to the position of the first sampling point on the streamline and the extension distance s, where the extension distance of the i-th first sampling point on the intermediate depth reference line is... Represented as:
[0092] During initialization, the spatial coordinates are initialized to the two-dimensional coordinates of the first sampling point, and the extension distance is initialized to 0 to record the cumulative path length traversed during the streamline extension process. Furthermore, the extension path is used to record all position points passed during the streamline extension process; the extension path is initialized as a single-element list containing only the first sampling point.
[0093] Step 620: Calculate the local depth change direction features of the global smooth depth distribution at the spatial coordinates, and normalize the local depth change direction features to obtain the extension guidance direction.
[0094] In one embodiment, for each first sampling point, the local depth change direction feature of the global smoothed depth distribution at the current location is calculated. This local depth change direction feature can be the corresponding gradient vector. The gradient vector of the global smoothed depth distribution at the coordinates corresponding to the position parameters can be calculated using a central difference scheme. The gradient vector contains gradient components in the x and y directions. The magnitude of the gradient vector is then calculated, and each component of the gradient vector is divided by the magnitude for normalization, resulting in a unit gradient direction as the extension guidance direction. The vector magnitude corresponding to the extension guidance direction is 1, retaining only the direction information of the fastest increase in scalar field value.
[0095] Step 630: Extend the spatial path along the guiding direction, updating the spatial coordinates and extension distance during the extension process, until a tissue depth trajectory line is generated extending from the first boundary segment through the first sampling point to the second boundary segment.
[0096] In one embodiment, a fourth-order Runge-Kutta method is used to generate tissue depth trajectory lines. (See also...) Figure 7 , Figure 7 This application provides a flowchart illustrating the process of extending spatial paths along guiding directions, updating spatial coordinates and extension distances during the extension process, until a tissue depth trajectory line is generated extending from the first boundary segment through the first sampling point to the second boundary segment. The flowchart specifically includes the following steps: Step 710: Based on the spatial coordinates and the guiding direction, calculate multiple intermediate guiding changes in sequence, perform weighted fusion on the intermediate guiding changes to obtain a single-step displacement vector, add the single-step displacement vector and the spatial coordinates to update the spatial coordinates and the extension distance, and update the extension path according to the updated spatial coordinates.
[0097] In one embodiment, the extension process of the tissue depth trajectory line can be viewed as an integration process, and the integration follows the following ordinary differential equation:
[0098] Where r represents the spatial coordinates and s represents the extension distance. When the tissue depth trajectory line extends towards the second boundary segment, the guiding direction is the extension guiding direction and is positive; when extending towards the first boundary segment, the guiding direction is the opposite of the extension guiding direction and is negative. Bidirectional integration ensures that each tissue depth trajectory line completely covers the entire tissue depth from the first boundary segment to the second boundary segment.
[0099] In one embodiment, during integration, single-step integration can be performed according to the average grid spacing h or other step size parameters. The single-step integration process is described below using the average grid spacing h. First, four intermediate guiding changes, i.e., the gradient directions, need to be calculated sequentially. The first intermediate guiding change is calculated. At the current location Calculate the gradient vector of the global smooth depth distribution, normalize the gradient vector to obtain the unit gradient direction, and multiply it by the sign of the integral direction to obtain k1. Then calculate the first intermediate position: The gradient vector of the global smooth depth distribution is calculated at the first intermediate position, normalized, and multiplied by the sign of the integral direction to obtain the second intermediate guiding change. Next, we calculate the second intermediate position: At the second intermediate position, the gradient vector of the global smooth depth distribution is calculated, normalized, and multiplied by the sign of the integral direction to obtain the third intermediate guiding change. Finally, calculate the third intermediate position: At the third intermediate position, the gradient vector of the global smooth depth distribution is calculated, normalized, and multiplied by the sign of the integral direction to obtain the fourth intermediate guiding change. Then, a weighted average of the four intermediate guiding changes is performed to obtain the single-step displacement vector. The weighting coefficients are 1 / 6, 2 / 6, 2 / 6, and 1 / 6, respectively.
[0100] Then, the single-step displacement vector is added to the current position parameters to update the spatial coordinates. The preset fixed distance step size is added to the current extension distance to update the distance parameters. The updated spatial coordinates are then added to the extension path in the corresponding direction to complete one step of integration.
[0101] In one embodiment, if the position parameter falls on the first boundary segment or the corresponding global smooth depth distribution value is 0 when integrating towards the first boundary segment, the integration in the first boundary segment direction is terminated. If the position parameter falls on the second boundary segment or the corresponding global smooth depth distribution value is 100 when integrating towards the second boundary segment, the integration in the second boundary segment direction is terminated. This dual termination condition avoids errors caused by a single condition judgment. That is, when there is local noise or discontinuity in the boundary contour, the global smooth depth distribution value is used to provide a termination basis; when there are slight fluctuations in the global smooth depth distribution at the boundary, the boundary contour judgment is used to ensure that the integration accurately terminates at the tissue edge.
[0102] Step 720: After the extension process is terminated, the extension path towards the first boundary segment is spliced with the extension path towards the second boundary segment to form a continuous tissue depth trajectory line.
[0103] In one embodiment, the initial first sampling point is deleted from both the extension path towards the first boundary segment and the extension path towards the second boundary segment to avoid duplicate points after splicing. Then, the extension path towards the first boundary segment is reversed so that its direction points from the first boundary segment to the first sampling point, aligning with the direction of the path towards the second boundary segment. Finally, the reversed extension path of the first boundary segment and the extension path of the second boundary segment are spliced end-to-end to form a continuous and complete tissue depth trajectory line starting from the first boundary segment, passing through the first sampling point, and finally reaching the second boundary segment. The spliced tissue depth trajectory line is arranged in ascending order of arc length, and the global smooth depth distribution value of all path points monotonically increases from 0 to 100.
[0104] Next, traverse all first sampling points and repeat the above single-step integration, termination judgment and path splicing steps to generate a set of all tissue depth trajectory lines covering the entire tissue region.
[0105] This embodiment employs a three-step strategy—single-source heat diffusion, direction reversal and amplitude normalization, and a global smoothing model—to fundamentally eliminate the "vein" artifacts generated by the multi-source heat ratio method in complex geometric regions. The elliptical smoothing property of the global smoothing model ensures the continuous differentiability of the global smoothing depth distribution, allowing the tissue depth trajectory line to smoothly traverse any complex geometric region without abnormal convergence or bifurcation. This eliminates the "vein" artifact.
[0106] Step 140: Determine multiple spatial coordinate positions based on the intermediate depth reference line and the tissue depth trajectory line, and determine the feature values corresponding to the spatial coordinate positions based on the spatial transcriptome slice samples to construct a standardized expression matrix.
[0107] In one embodiment, reference is made to Figure 8 , Figure 8 This application provides a flowchart for determining multiple spatial coordinate positions based on intermediate depth reference lines and tissue depth trajectory lines, and constructing a standardized expression matrix based on the feature values corresponding to the spatial coordinate positions determined by spatial transcriptome slice samples. The flowchart specifically includes the following steps: Step 810: For each tissue depth trajectory line, calculate the total length of the trajectory line, and divide the total length of the trajectory line into a second number of second sampling points at equal intervals.
[0108] In one embodiment, each first sampling point contains a tissue depth trajectory line. For the tissue depth trajectory line corresponding to the i-th first sampling point on the intermediate depth reference line, the Euclidean distance between two adjacent path points on the flow line is calculated sequentially, and all adjacent distances are summed to obtain the total length of the tissue depth trajectory line. .
[0109] Then, the tissue depth trajectory lines are divided at equal intervals along the trajectory line direction. The total length of each tissue depth trajectory line is evenly divided into N (second quantity) segments, resulting in N second sampling points. The arc length parameter corresponding to the j-th second sampling point on the i-th streamline is expressed as:
[0110] Where j is the index of the second sampling point, and N is the second quantity, which can range from 50 to 200.
[0111] Based on the calculated extension distance, linear interpolation is then performed on the tissue depth trajectory line to obtain the two-dimensional spatial coordinates corresponding to each second sampling point. In this way, whether it's a long streamline passing through a thick region or a short streamline passing through a thin region, it is divided into N segments, each representing a relative depth of 1 / N. This sampling method ensures consistent depth resolution across tissue regions of different thicknesses, eliminating the impact of tissue geometry differences on the accuracy of cross-sample alignment.
[0112] Step 820: Using the tangential position of the intermediate depth reference line corresponding to the first sampling point as the row index and the streamline depth position corresponding to the second sampling point as the column index, determine the multiple spatial coordinate positions of the two-dimensional matrix based on the row index and column index.
[0113] In one embodiment, based on M first sampling points and N second sampling points corresponding to each first sampling point, the total number is obtained as follows: The sampling points, whose spatial locations constitute a spatial location set. Where i is the index of the first sampling point, ranging from 1 to M, and j is the index of the second sampling point, ranging from 1 to N.
[0114] And for each spatial location In this embodiment, the tangential position of the intermediate depth reference line corresponding to the first sampling point is used as the row index i of the two-dimensional matrix. The row indices from 1 to M correspond to the tangential positions from the first anatomical anchor point to the second anatomical anchor point, respectively. The streamline depth position of the streamline corresponding to the second sampling point is used as the column index j of the two-dimensional matrix. The column indices from 1 to N correspond to the depth positions from the first boundary segment to the second boundary segment, respectively. Therefore, each matrix index (i,j) uniquely corresponds to a spatial coordinate position. .
[0115] Step 830: For each spatial coordinate location, match the nearest spatial site in the spatial transcriptome slice sample, use the gene expression vector corresponding to the spatial site as the feature value corresponding to the spatial coordinate location, and construct a standardized expression matrix based on the feature value.
[0116] In one embodiment, for each spatial coordinate position In all sequencing spatial sites of the spatial transcriptome slice sample, the nearest spatial site is found by Euclidean distance using the nearest neighbor search function. Then, the gene expression vector corresponding to the matched nearest spatial site is used as the gene expression feature at position (i,j) in the normalized expression matrix. The dimension of the constructed normalized expression matrix is determined according to the first quantity and the second quantity.
[0117] Therefore, the formula for calculating the elements of the standardized representation matrix G is: ) Where (i,j) represents the matrix index, This indicates the actual spatial coordinates of the index in three-dimensional space. For nearest neighbor search function, This is a function to obtain gene expression vectors at spatial sites.
[0118] The resulting normalized representation matrix maps the irregular organizational geometry into a regular two-dimensional matrix structure with dimensions of [missing information]. Each element of the matrix is a gene expression vector. For spatial transcriptome slices of different sizes, shapes, and species, as long as the first quantity M and the second quantity N are the same, the same (i,j) position in the matrix represents the exact same relative anatomical position, and cross-sample positional comparisons can be performed directly without additional image registration or coordinate transformation.
[0119] Understandably, this embodiment draws inspiration from gauge fields in physics, establishing an intrinsic coordinate system on the tissue that is independent of its external geometry, thus providing a unified intrinsic coordinate representation for tissues with different geometries. As long as corresponding anatomical anchor points can be identified on different samples, the spatial transcriptome data standardization method of this embodiment can map tissue slices from different species, developmental stages, and physiological and pathological conditions to a standardized coordinate space with uniform dimensions for direct positional comparison. It requires only two anatomical anchor points to establish a complete global coordinate system, compared to some coordinate construction methods in related technologies that typically require four control points, thus requiring less prior information and possessing stronger coordinate standardization capabilities. Furthermore, this embodiment is not limited to specific tissue types, species, or sequencing platforms, and is applicable to various biological tissue samples, from curved embryonic tissue to the cerebral cortex with complex depths of sulci and gyri.
[0120] The technical solution provided in this application involves acquiring spatial transcriptome slice samples, determining the boundary contour of the tissue region from the spatial transcriptome slice samples, determining a first boundary segment and a second boundary segment based on the boundary contour, and generating a tissue grid for coordinate mapping within the circumscribed rectangle of the tissue region. Using the first boundary segment as the sole heat source, thermal diffusion occurs within the tissue grid to obtain the initial relative depth distribution of the tissue region. Based on the initial relative depth distribution, a normalized depth direction feature pointing from the first boundary segment to the second boundary segment is obtained. Based on the depth direction feature, a continuously differentiable global smooth depth distribution is generated within the tissue region using a global smoothing correction method. An intermediate depth reference line of the tissue region is determined based on the global smooth depth distribution. Multiple tissue depth trajectory lines are generated along the gradient direction of the global smooth depth distribution, extending from the first boundary segment through the intermediate depth reference line to the second boundary segment. Multiple spatial coordinate positions are determined based on the intermediate depth reference line and the tissue depth trajectory lines. The feature values corresponding to these spatial coordinate positions are determined based on the spatial transcriptome slice samples, and a normalized expression matrix is constructed. This application employs a first boundary segment as the sole heat source for single-source heat diffusion, overcoming the local physical orientation instability caused by complex folded tissues during morphological extraction. Furthermore, a continuously differentiable, globally smooth depth distribution ensures consistent morphological extension across different tissue thicknesses, preventing structural feature mutations caused by drastic tissue deformation. Based on this, the tissue depth trajectory line generated by the globally smooth depth distribution smoothly penetrates various complex biological folded regions, eliminating common "vein" artifacts in physical mapping and ensuring that each microenvironment sequencing site within the biological slice obtains a unique spatial topological mapping identifier. Finally, a standardized expression matrix with unified dimensions is constructed based on the tissue intermediate depth reference line and the tissue depth trajectory line, mapping tissue slices of different sizes, shapes, and species to the same data structure and uniformly projecting them into a feature mapping space of the same dimension. This allows different samples at the same position in the matrix to accurately correspond to consistent biological depth and tangential features, enabling direct comparison of cross-sample spatial transcriptome data and improving cross-sample alignment accuracy. In addition, the entire standardization process does not rely on gene expression or image registration information, is highly adaptable to differences in tissue slice quality and sequencing platforms, and is applicable to various biological tissues with complex folding structures, enabling large-scale cross-sample comparisons of spatial transcriptomics.
[0121] The following describes the specific application of the spatial transcriptome data normalization method according to embodiments of this application in cross-sample comparisons. In one embodiment, referring to... Figure 9 , Figure 9 This is a flowchart of a method for cross-sample comparison of spatial transcriptome data provided in an embodiment of this application, which specifically includes the following steps: Step 910: Stack and combine the standardized representation matrices of multiple different samples to obtain a three-dimensional data tensor. Perform non-negative matrix decomposition or tensor decomposition on the three-dimensional data tensor to obtain the corresponding dimensional spatial representation patterns extracted along the tangential and depth dimensions.
[0122] In one embodiment, the standardized expression matrix corresponding to each sample is obtained according to the spatial transcriptome data standardization processing method in the above embodiment. Assuming there are K samples, each sample corresponds to one... The standardized expression matrices are stacked and combined to obtain a K×M×N three-dimensional data tensor T. Each element T(k,i,j) in the three-dimensional data tensor T represents the gene expression vector at the tangential position i and the depth position j in the k-th sample. Then, nonnegative matrix factorization or tensor factorization can be selected according to the analysis requirements. After decomposition, gene modules that exhibit gradient expression along the tangential direction but are relatively uniform in the depth direction, or gene modules that exhibit gradient expression along the depth direction but are relatively uniform in the tangential direction, can be identified. In addition, gene modules that are enriched in both specific tangential and depth intervals can also be identified. It can be understood that the tangential dimension refers to the row index dimension, and the depth dimension refers to the column index dimension.
[0123] Step 920: Alternatively, perform joint clustering on the feature values corresponding to multiple different samples at the same spatial coordinate position to obtain cross-sample conservative structural domains and / or sample-specific organizational domains.
[0124] In one embodiment, for each identical spatial coordinate position (i,j) in the standardized expression matrix, gene expression vectors corresponding to all K samples at that position can be collected to form a positional expression set containing K expression vectors. Then, joint clustering is performed on all positional expression sets. Based on the clustering results, the spatial position sets that are clustered into the same class in most samples are defined as cross-sample conserved spatial domains, representing basic anatomical structures common to different samples. Clustering results that appear only in a single or a few samples are defined as sample-specific spatial domains, representing individual differences, developmental stage differences, or pathological state differences, etc.
[0125] Step 930: Alternatively, calculate the spatial gradient of the corresponding feature values along the tangential and depth dimensions of the standardized expression matrix, and determine the distribution patterns of gene modules and cell types that exhibit gradient changes along the corresponding coordinate directions based on the spatial gradient.
[0126] In one embodiment, for each gene expression vector in the normalized expression matrix, the spatial gradient of its expression value can be calculated along both the tangential and depth dimensions. Then, genes are clustered based on the direction and magnitude of their spatial gradients, grouping genes with similar gradient patterns into the same gene module. For example, gene modules whose expression gradually increases along the tangential direction from the first anatomical anchor point to the second anatomical anchor point, or whose expression gradually decreases along the depth direction from the first boundary segment to the second boundary segment, can be identified. Simultaneously, cell type annotation results can be mapped to the normalized expression matrix to analyze the distribution gradients of different cell types along the tangential and depth dimensions, obtaining the spatial distribution pattern of cell types.
[0127] The following describes several specific application scenarios of the embodiments of this application.
[0128] In one embodiment, reference is made to Figures 10a to 10d , Figures 10a to 10d This is a schematic diagram of small intestinal tissue region data analysis provided in an embodiment of this application.
[0129] This embodiment selects multiple Visium spatial transcriptome slides of the human proximal small intestine published by HubMAP for analysis. The boundary contours of the small intestinal tissue regions were delineated using the interactive lasso annotation tool, and a first and second anatomical anchor point were selected to divide the boundary contours into a first boundary segment and a second boundary segment. Following the spatial transcriptome data normalization method of this embodiment, the tissue regions of all samples were mapped to a 39×5 normalized expression matrix. (Refer to...) Figure 10a The top figure shows the clustering results based on spatial transcriptome slice samples, resulting in 8 clusters, from Cluster1 to Cluster8. Different colors represent different clustering results, presenting the annular spatial structure of the small intestinal villi. The bottom figure shows the standardized representation of the tissue depth trajectory lines generated according to this embodiment, containing 167 streamlines, 5 depth layers, and 39 tangential partitions. The tissue depth trajectory lines start from the first boundary segment, smoothly pass through the intermediate depth reference line of the tissue region, and reach the second boundary segment. The tangential partitions are evenly spaced along the intermediate depth reference line of the tissue region, and the depth layers are evenly divided along the tissue depth trajectory lines, completely covering the entire small intestinal tissue region.
[0130] Next, the standardized expression matrices of multiple samples are stacked along the sample dimensions. Then, according to the analysis requirements, non-negative matrix factorization or tensor factorization is selected to calculate the spatial gradient of the corresponding gene expression features along the tangential and depth dimensions of the standardized expression matrices, and gene modules with significant spatial banding along the tangential direction are identified.
[0131] Reference Figure 10bThe image shows a Z-score heatmap of the top 5 most prominent genes in each spatial pattern, segmented tangentially. This heatmap is plotted by averaging the expression values of the 5 depth layers along the depth axis. The front region (T0-T4) is enriched with front-end dominant expression gene modules, the back region (T15-T19) is enriched with back-end dominant expression gene modules, and there is a clear expression transition zone in the middle region.
[0132] Based on this, zoning was performed using 12 manually compiled pathway gene sets to identify a three-region functional structure: "front end (matrix / extracellular matrix) -> mid-section (transport / immunity) -> back end (lipid metabolism / absorption)". (Refer to...) Figure 10c The left and right figures show detailed partitioning of the three functional regions. The left figure displays expression curves at the pathway level, showing the expression trends of the front (matrix / ECM), mid-phase (transport / immunity), and back-phase (lipid metabolism / absorption) functional regions, allowing for a direct observation of the peak expression positions and fluctuations of different pathways. The right figure shows the corresponding gene-by-gene heatmap, where the color represents the normalized mean expression level of each pathway's maximum value within each tangential partition, clearly demonstrating the consistency of expression patterns of multiple genes along the tangential dimension within the same pathway. (Refer to...) Figure 10d A heatmap summarizing the pathway partitioning of the three functional regions is presented. The color bars on the left correspond to the three functional regions, and the color represents the mean expression level of each pathway after normalization of the maximum value in each tangential region. The spatial functional structure of the three regions is defined as front end (matrix / ECM) -> mid-section (transport / immunity) -> back end (lipid metabolism / absorption).
[0133] Therefore, this embodiment extracts the specific spatial expression patterns of small intestinal tissue along the tangential and depth dimensions using tensor stacking and decomposition methods, and verifies the stability and interpretability of the functional gradient based on the pathway expression curves of each region and gene-by-gene heatmap.
[0134] In one embodiment, reference is made to Figures 11a to 11e Figure 11 is a schematic diagram of data analysis of the spinal region of a developing mouse provided in an embodiment of this application.
[0135] This embodiment selects spatial transcriptome slides of spinal tissue from developing mice (at three time points: E11.5, E13.5, and E15.5) to analyze the dynamic changes of gene regulatory networks along the anterior-posterior (AP) axis of the spine. The boundaries of the spinal tissue regions were delineated using an interactive lasso annotation tool, and two anatomical anchor points were selected. Following the spatial transcriptome data standardization method of this embodiment, the spinal tissue samples from the three time points were mapped to a 20×N standardized expression matrix, achieving a multi-level spatial partitioning of 20 continuous partitions along the tangential dimension and N layers along the depth dimension. All samples used the exact same first and second quantities to ensure that the same matrix positions at different time points correspond to the same relative anatomical positions. (Refer to...) Figure 11a This represents the standardized representation of the spinal column in developing mice based on tissue depth trajectory lines. The tissue depth trajectory lines, also known as streamlines, originate from the first boundary segment at the anterior end of the spine, smoothly pass through the intermediate depth reference line, and reach the second boundary segment at the posterior end. Twenty consecutive tangential partitions are evenly divided along the intermediate depth reference line, transforming the irregularly curved spinal tissue into a regular rectangular standardized representation, thus fully preserving the spatial structural information of the anterior-posterior axis of the spine.
[0136] Next, cross-sample joint clustering was performed on the normalized expression matrices at multiple time points in the normalized coordinate space. At time points E11.5, E13.5, and E15.5, the most spatially significant major regulators, corresponding to transcription factors, were identified, with E representing the culture day. The regulators were sorted along the normalized tangential axis according to their activity centroid. The results showed that regulator activity exhibited an ordered activation pattern along the anterior-posterior axis of the spinal column. (Refer to...) Figure 11b The image shows a heatmap of the activity of the top five most significant regulators along the tangential axis at time point E11.5, ordered from front to back by their activity centroids along the tangential axis. The colors represent the Z-score-normalized regulator activity values. The heatmap clearly shows an ordered activation pattern of normalized regulator activity along the anteroposterior axis of the spine, highly consistent with the developmental sequence of the spine. Furthermore, analysis at time point E13.5 indicates a significant spatial consistency between the regulator activity centroids and their target gene expression centroids, supporting a feedforward gene regulation model. (Reference) Figure 11c The scatter plot shows the spatial consistency between the centroids of regulator activity and the centroids of target gene expression at E13.5. The absolute difference of the centroids in the scatter plot shows that all points are closely distributed near the diagonal. The sample size n=58, that is, 58 pairs of transcription factors and target genes were selected. The Spearman correlation coefficient ρ=0.87, and the p-value =1.9×10⁻⁶. - ¹ 8 This demonstrates a high degree of spatial consistency between regulator activity and target gene expression. The color of the dots represents the offset between the centroid of regulator activity and the centroid of target gene expression.
[0137] Next, a comprehensive analysis across three developmental time points revealed three representative gene regulatory programs. The first category consists of sample-conserved domains corresponding to a sustained activation program, including regulators such as Isl2, Plagl1, Hic1, and Foxc1, which maintain stable spatial expression patterns throughout development. The second category comprises sample-specific histodomains corresponding to a novel activation program, including regulators such as Zfp93, AI987944, and Vdr, which only begin to show significant activity at E15.5. The third category is another sample-specific histodomain corresponding to a deactivation program, including regulators such as Atf2, Nmral1, and Hoxa4, whose activity gradually decreases with development until it disappears completely. (Reference) Figure 11d This is a dynamic heatmap of regulator activity across three developmental time points. The heatmap is divided into three columns, corresponding to the three time points E11.5, E13.5, and E15.5, respectively, and displays the dynamic changes of three types of regulatory programs. The activity values of all regulators have been normalized to their global maximum values across the three time points for easy direct comparison.
[0138] Finally, refer to Figure 11e This section validates the spatial distribution of representative regulators on the original tissue sections. The overall activation activity of each transcription factor and target gene was quantified based on the AUCell activity index; a higher value indicates stronger activation of the transcription factor in the cell. The mean value represents the average AUCell activity of all cells in the entire spinal tissue section, used for cross-sectional comparison of the overall activity of the same gene at different embryonic days. The first row shows the spatial distribution of the persistent regulator Plagl1, which maintained a stable anteroposterior axis activity gradient at all three time points. The second row shows the spatial distribution of the novel activating regulator Vdr, which showed no activity at E11.5 and E13.5, but localized activation in a specific region of the spine at E15.5, with the activation location highly consistent with the ossification initiation site. The third row shows the spatial distribution of the deactivating regulator Atf2, which showed an anteroposterior axis gradient expression at E11.5, became highly expressed overall at E13.5, and was completely shut down at E15.5, revealing a two-stage deactivation process.
[0139] As can be seen from the above embodiments, the spatial transcriptome data standardization processing method of this embodiment can map spinal tissues with different developmental time points and different degrees of curvature into a unified standardized coordinate space, thereby achieving accurate cross-sample comparison of the spatiotemporal dynamics of the regulatory network.
[0140] In one embodiment, reference is made to Figures 12a to 12f Figure 12a to Figure 12f This is a schematic diagram of psoriasis lesion tissue data analysis provided in the embodiments of this application.
[0141] This embodiment selects spatial transcriptome data from psoriatic lesions and analyzes ST-16L lesion samples with a PASI score of 28.8 to quantitatively analyze the molecular expression gradient across the epidermis and dermis during the progression of psoriasis. First, the boundary contours of the psoriatic lesion area are delineated using the interactive lasso annotation tool. Based on the accompanying H&E histological imaging results, a first anatomical anchor point (epidermal side P1) and a second anatomical anchor point (dermal side P2) are selected, dividing the closed tissue boundary into two arc segments. Following the spatial transcriptome data standardization method provided in this embodiment, irregularly shaped lesion areas are uniformly mapped to a 5×5 standardized expression matrix, achieving precise alignment of psoriasis samples at different disease stages within the same coordinate system. (Refer to...) Figure 12a The top image shows the original H&E tissue staining of ST-16L psoriasis lesions, which clearly distinguishes the epidermis, dermis, and infiltrated areas of inflammatory lesions. The bottom image shows the visualization results of the 5×5 standardized expression matrix. The colors correspond to five depth levels, D0-D4, where D0 corresponds to the superficial epidermis and D4 corresponds to the deep dermis. The color brightness corresponds to the positional differences in the tangential dimension, which can completely preserve the original spatial anatomical structure information of the lesion tissue within a regular grid.
[0142] Next, the spatial gradients of the corresponding gene expression feature values were calculated along both the tangential and depth dimensions of the normalized expression matrix. Based on the results of these two-dimensional spatial gradient calculations, gradient pattern classification was performed on the 1001 genes with spatial expression consistency selected from the screening. (Refer to...) Figure 12b The scatter plot represents the binning-normalized expression difference (ΔBinScore) between non-lesion samples and healthy samples, and the vertical axis represents the binning-normalized expression difference (ΔBinScore) between lesion samples and non-lesion samples. This is a standardized indicator used to measure the difference in gene expression levels between the two groups. Based on the temporal and spatial characteristics of expression changes, 1001 spatially consistent genes were classified into five categories according to their binning-normalized expression changes under different conditions: reversal type (n=8), early change type (n=11), lesion-specific type (n=584), progressive downregulation type (n=2), and progressive upregulation type (n=8), where n is the number of genes. The size of the scatter plot represents the number of grid units with significant gene expression differences. The Mann-Whitney U test was used, and the false detection rate (FDR) was <0.05, providing a clear visual representation of the expression fluctuations and spatial coverage of different genes.
[0143] Additionally, refer to Figure 12cThis is a summary expression heatmap of the top two genes in various gradient patterns. The heatmap is arranged along the depth axis. The PASI score is used to represent the area and severity index of psoriasis lesions. D0 = epidermal end, D4 = dermal end. The experimental conditions are divided into three groups: healthy (PASI=0), non-lesion (PASI=11.2), and lesion (PASI=28.8). The color of the blocks is represented by the row-normalized Z-score to indicate the expression level. The cell label value is the log-normalized expression level after averaging along the tangential axis. The summary expression heatmap allows for horizontal comparison of the expression differences of the same gene at different disease stages and different skin layers.
[0144] As can be seen, the gradient pattern classification results indicate that, based on a unified standardized space, the embodiments of this application can fully analyze the molecular dynamic changes of psoriasis from the epidermis to the dermis, and from local prodromal changes to the formation of global lesions. It can clearly distinguish three types of gene modules with distinct characteristics: a progressive upregulation gradient module with gradually increasing expression along the depth axis (represented by the gene KRTDAP); a progressive downregulation gradient module with gradually decreasing expression along the depth axis (represented by the gene MT-ND1); a lesion-specific module that is significantly activated in all grid units of the lesion (represented by the gene KRT16); an early response module that shows expression fluctuations in the non-lesion prodromal stage (represented by the gene IGKC); a reversal gene module that is significantly upregulated in the non-lesion stage and declines in expression after the development of lesions (represented by the gene CFD); and a stable gene module with no drastic fluctuations in expression among the three tissue layers (represented by the gene FTL). It should be understood that the genes here are only examples and do not represent limitations.
[0145] You can also refer to Figures 12d-12f The top image shows the spatial expression maps of three representative gene modules, and the bottom image shows the corresponding normalized expression matrix results. Figure 12d For the KRTDAP gene module, healthy, non-lesion, and lesion groups were selected for comparison. In the normalized expression matrix, the vertical axis corresponds to the depth direction, representing skin layers D0 to D4, and the horizontal axis corresponds to the horizontal tangential regions T0 to T4. This gene exhibits progressive upregulation, with its expression gradually increasing along the depth direction from the epidermis to the dermis. The normalized expression matrix quantifies the gradient characteristics of this gene's progressive upregulation along the depth axis. Figure 12e The KRT16 gene module is a lesion-specific type, with high global expression. Grid analysis showed that it was significantly expressed in all 25 grid units of a 5×5 grid. Figure 12f It is the AEBP1 gene module, which belongs to the early variant type. Significant changes have already occurred in the non-lesion stage without obvious skin lesions.
[0146] Therefore, the spatial transcriptome data standardization method of this embodiment can construct a stable intrinsic coordinate system for layered skin lesion tissues, achieve unbiased spatial alignment of samples at different disease stages, and simultaneously decompose gene expression and cell distribution gradients in two dimensions: depth layering and tangential extension. This provides a standardized spatial transcriptome analysis scheme for the analysis of the pathogenesis of psoriasis and the screening of early molecular markers.
[0147] This application also provides a spatial transcriptome data normalization processing apparatus, which can implement the above-described spatial transcriptome data normalization processing method, as described above. Figure 13 The device includes: The computational preprocessing module 1310 is used to acquire spatial transcriptome slice samples, determine the boundary contours of tissue regions from the spatial transcriptome slice samples, determine the first boundary segment and the second boundary segment based on the boundary contours, and generate a tissue mesh for coordinate mapping within the bounding rectangle of the tissue region.
[0148] Depth Direction Normalization Module 1320: Used to perform thermal diffusion in the organization mesh with the first boundary segment as the only diffused heat source, obtain the initial relative depth distribution of the organization region, and obtain the normalized depth direction feature from the first boundary segment to the second boundary segment based on the initial relative depth distribution.
[0149] Tissue depth trajectory determination module 1330: Based on depth direction features, it generates a continuously differentiable global smooth depth distribution within the tissue region using a global smoothing correction method, determines an intermediate depth reference line within the tissue region based on the global smooth depth distribution, and generates multiple tissue depth trajectory lines from the first boundary segment through the intermediate depth reference line to the second boundary segment along the gradient direction of the global smooth depth distribution.
[0150] The standardized matrix mapping module 1340 is used to determine multiple spatial coordinate positions based on the intermediate depth reference line and the tissue depth trajectory line, and to determine the feature values corresponding to the spatial coordinate positions based on the spatial transcriptome slice samples, thereby constructing a standardized expression matrix.
[0151] The specific implementation of the spatial transcriptome data standardization processing device in this embodiment is basically the same as the specific implementation of the spatial transcriptome data standardization processing method described above, and will not be repeated here.
[0152] This application also provides an electronic device, including: At least one memory; At least one processor; At least one program; The program is stored in a memory, and the processor executes the at least one program to implement the spatial transcriptome data standardization processing method and the spatial transcriptome data cross-sample comparison method described above in this application. The electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), in-vehicle computers, etc.
[0153] Please see Figure 14 , Figure 14 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 1401 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 1402 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1402 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1402, and the processor 1401 calls and executes the spatial transcriptome data standardization processing method and the spatial transcriptome data cross-sample comparison method of the embodiments of this application. The input / output interface 1403 is used to implement information input and output; The communication interface 1404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1405 transmits information between various components of the device (e.g., processor 1401, memory 1402, input / output interface 1403, and communication interface 1404); The processor 1401, memory 1402, input / output interface 1403 and communication interface 1404 are connected to each other within the device via bus 1405.
[0154] This application also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described spatial transcriptome data standardization processing method and spatial transcriptome data cross-sample comparison method.
[0155] Memory, as a non-transitory storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0156] The spatial transcriptome data standardization method, cross-sample comparison method, and apparatus proposed in this application employ a first boundary segment as the sole diffusion heat source for single-source heat diffusion. This overcomes the local physical orientation instability caused by complex folded tissues during morphological extraction. Furthermore, a continuously differentiable global smooth depth distribution ensures consistent morphological extension directions across different tissue thicknesses, avoiding structural feature mutations caused by drastic tissue deformation. Based on this, the tissue depth trajectory line generated by the global smooth depth distribution smoothly penetrates various complex biological folded regions, eliminating common "vein" artifacts in mapping from the physical spatial root, ensuring that each microenvironment sequencing site within the biological slice obtains a unique spatial topological mapping identifier. Finally, a standardized expression matrix with unified dimensions is constructed based on the tissue intermediate depth reference line and the tissue depth trajectory line. This maps tissue slices of different sizes, shapes, and species to the same data structure, uniformly projecting them into a feature mapping space of the same dimension. This allows different samples to accurately correspond to consistent biological depth and tangential features at the same position in the matrix, enabling direct comparison of cross-sample spatial transcriptome data and improving cross-sample alignment accuracy. In addition, the entire standardization process does not rely on gene expression or image registration information, is highly adaptable to differences in tissue slice quality and sequencing platforms, and is applicable to various biological tissues with complex folding structures, enabling large-scale cross-sample comparisons of spatial transcriptomics.
[0157] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0158] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0159] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0160] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0161] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0162] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0164] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0165] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0166] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0167] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for standardizing spatial transcriptome data, characterized in that, include A spatial transcriptome slice sample is obtained, and the boundary contour of the tissue region is determined from the spatial transcriptome slice sample. Based on the first anatomical anchor point and the second anatomical anchor point determined on the boundary contour, the boundary contour is divided into a first boundary segment and a second boundary segment. A tissue mesh for coordinate mapping is generated in the space covering the tissue region. Using the first boundary segment as the sole heat source, thermal diffusion is carried out in the tissue mesh to obtain the initial relative depth distribution of the tissue region, and a normalized depth direction feature from the first boundary segment to the second boundary segment is obtained based on the initial relative depth distribution. Based on the depth direction features, a continuously differentiable global smooth depth distribution is generated within the tissue region using a global smoothing correction method. Based on the global smooth depth distribution, an intermediate depth reference line is determined for the tissue region to generate multiple tissue depth trajectory lines from the first boundary segment through the intermediate depth reference line to the second boundary segment along the gradient direction of the global smooth depth distribution. Multiple spatial coordinate positions are determined based on the intermediate depth reference line and the tissue depth trajectory line, and the feature values corresponding to the spatial coordinate positions are determined based on the spatial transcriptome slice samples to construct a standardized expression matrix.
2. The spatial transcriptome data standardization method according to claim 1, characterized in that, The step of generating a tissue mesh for coordinate mapping within the space covering the tissue region includes: A tissue mesh is generated within the bounding rectangle of the tissue region, and the mesh nodes corresponding to the tissue mesh are identified. The mesh nodes include internal tissue nodes and edge boundary nodes that intersect with the boundary contour.
3. The spatial transcriptome data standardization method according to claim 2, characterized in that, The internal nodes of the tissue include deep core nodes and near-edge transition nodes. The process of using the first boundary segment as the sole heat source for thermal diffusion within the tissue mesh to obtain the initial relative depth distribution of the tissue region includes: The spatial neighborhood difference features of the deep core nodes are obtained, and the spatial neighborhood difference features of the near-edge transition nodes are obtained by using embedded boundary processing. The spatial neighborhood difference matrix is obtained based on all the spatial neighborhood difference features. Obtain the average grid spacing of the tissue mesh or the average thickness of the tissue region between the first boundary segment and the second boundary segment, and obtain the diffusion time parameter based on the average thickness or the average grid spacing; Set the value of the edge intersection node located on the first boundary segment to one, and set the value of the other grid nodes to zero to obtain the heat source vector; Based on the heat source vector, the diffusion time parameter, and the spatial neighborhood difference matrix, a global diffusion estimation model is generated and solved to obtain the initial relative depth distribution.
4. The spatial transcriptome data standardization method according to claim 2, characterized in that, The process of obtaining the normalized depth direction feature from the first boundary segment to the second boundary segment based on the initial relative depth distribution includes: The local depth variation vector at each of the grid nodes is calculated using the central difference approximation method; The local depth change vector is reversed in direction and normalized in magnitude to obtain the normalized depth direction feature pointing from the first boundary segment to the second boundary segment.
5. The spatial transcriptome data standardization method according to claim 2, characterized in that, The step of generating a continuously differentiable global smooth depth distribution within the tissue region based on the depth direction features using a global smoothing correction method includes: Calculate the directional field divergence feature of the depth direction feature at each of the grid nodes, and generate a global smoothing model based on the directional field divergence feature to smooth the depth information of the tissue region; Set the global smooth depth distribution value of the edge junction node corresponding to the first boundary segment as the starting depth value, set the global smooth depth distribution value of the edge junction node corresponding to the second boundary segment as the maximum depth value, and set the global smooth depth distribution values corresponding to the first anatomical anchor point and the second anatomical anchor point as intermediate depth reference values to generate fixed boundary value constraints. The global smoothing model is solved on the organization mesh based on the fixed boundary value constraints to obtain the global smoothing depth distribution.
6. The spatial transcriptome data standardization method according to claim 1, characterized in that, The generation of multiple tissue depth trajectory lines along the gradient direction of the globally smoothed depth distribution, from the first boundary segment through the intermediate depth reference line to the second boundary segment, includes: Calculate the spatial length of the intermediate depth reference line, divide the spatial length into a first number of first sampling points at equal intervals, and initialize the spatial state parameters of each first sampling point, the spatial state parameters including spatial coordinates and extension distance; Calculate the local depth change direction features of the global smooth depth distribution at the spatial coordinates, normalize the local depth change direction features to obtain the extension guidance direction, the guidance direction towards the second boundary segment is the extension guidance direction, and the guidance direction towards the first boundary segment is the opposite direction of the extension guidance direction. The spatial path is extended along the guiding direction, and the spatial coordinates and the extension distance are updated during the extension process until the tissue depth trajectory line extending from the first boundary segment through the first sampling point to the second boundary segment is generated.
7. The spatial transcriptome data standardization method according to claim 6, characterized in that, The step of extending the spatial path along the guiding direction, updating the spatial coordinates and the extension distance during the extension process, until the tissue depth trajectory line extending from the first boundary segment through the first sampling point to the second boundary segment is generated, includes: Based on the spatial coordinates and the guiding direction, multiple intermediate guiding changes are calculated sequentially, and the intermediate guiding changes are weighted and fused to obtain a single-step displacement vector. The single-step displacement vector is added to the spatial coordinates to update the spatial coordinates and the extension distance, and the extension path is updated according to the updated spatial coordinates. After the extension process is terminated, the extension path towards the first boundary segment is spliced with the extension path towards the second boundary segment to form a continuous tissue depth trajectory line.
8. The spatial transcriptome data standardization method according to claim 6, characterized in that, The process of determining multiple spatial coordinate positions based on the intermediate depth reference line and the tissue depth trajectory line, and determining the feature values corresponding to the spatial coordinate positions based on the spatial transcriptome slice samples to construct a standardized expression matrix includes: For each tissue depth trajectory line, calculate the total length of the trajectory line, and divide the total length of the trajectory line into a second number of second sampling points at equal intervals; Using the tangential position of the intermediate depth reference line corresponding to the first sampling point as the row index and the streamline depth position corresponding to the second sampling point as the column index, multiple spatial coordinate positions of the two-dimensional matrix are determined based on the row index and the column index. For each spatial coordinate location, the nearest spatial site is matched in the spatial transcriptome slice sample, and the gene expression vector corresponding to the spatial site is used as the feature value corresponding to the spatial coordinate location. The normalized expression matrix is constructed based on the feature value, and the dimension of the normalized expression matrix is determined according to the first quantity and the second quantity.
9. A method for cross-sample comparison of spatial transcriptome data, characterized in that, The method further includes: The standardized expression matrices of multiple different samples are stacked and combined to obtain a three-dimensional data tensor. Non-negative matrix decomposition or tensor decomposition operation is performed on the three-dimensional data tensor to obtain the corresponding dimensional spatial expression patterns extracted along the tangential dimension and the depth dimension. The standardized expression matrix is obtained by the spatial transcriptome data standardization processing method according to any one of claims 1 to 8. Alternatively, joint clustering can be performed on the feature values corresponding to multiple different samples at the same spatial coordinate position to obtain cross-sample conserved structural domains and / or sample-specific organizational domains. Alternatively, the spatial gradients of the corresponding feature values can be calculated along the tangential and depth dimensions of the standardized expression matrix, respectively, and the distribution patterns of gene modules and cell types exhibiting gradient changes along the corresponding coordinate directions can be determined based on the spatial gradients.
10. A spatial transcriptome data normalization processing device, characterized in that, include: The computational preprocessing module is used to acquire spatial transcriptome slice samples, determine the boundary contour of the tissue region from the spatial transcriptome slice samples, divide the boundary contour into a first boundary segment and a second boundary segment according to the first anatomical anchor point and the second anatomical anchor point determined on the boundary contour, and generate a tissue mesh for coordinate mapping within the bounding rectangle of the tissue region. Normalized depth direction feature generation module: used to perform thermal diffusion in the tissue mesh with the first boundary segment as the only diffused heat source to obtain the initial relative depth distribution of the tissue region, and obtain the normalized depth direction feature from the first boundary segment to the second boundary segment based on the initial relative depth distribution; Tissue depth trajectory line determination module: Based on the depth direction features, it generates a continuously differentiable global smooth depth distribution within the tissue region using a global smoothing correction method, determines an intermediate depth reference line for the tissue region based on the global smooth depth distribution, and generates multiple tissue depth trajectory lines from the first boundary segment through the intermediate depth reference line to the second boundary segment along the gradient direction of the global smooth depth distribution. The standardized matrix mapping module is used to determine multiple spatial coordinate positions based on the intermediate depth reference line and the tissue depth trajectory line, and to determine the feature values corresponding to the spatial coordinate positions based on the spatial transcriptome slice samples, thereby constructing a standardized expression matrix.
Citation Information
Patent Citations
Spatial omics-based intestinal cancer metastasis prediction method and device, medium and equipment
CN120913863A
Breast cancer detection method and system based on morphological image and space transcriptome cross-graph collaborative learning
CN121582228A
