In-situ sequencing based spatial gene co-expression network construction system

By correcting the pixel coordinates of in situ sequencing image data and constructing a spatial adjacency graph using an adaptive algorithm, the problems of physical scale error and tissue heterogeneity in existing technologies are solved, achieving high-precision gene co-expression network construction and improving the accuracy of biological communication analysis and the integrity of network topology.

CN122637883APending Publication Date: 2026-08-25DONGGUAN QINKE EDUCATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610822569.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing technologies rely on raw pixel coordinates when processing in situ sequencing image data, leading to physical scale errors. Furthermore, the use of fixed distance thresholds cannot adapt to tissue heterogeneity, resulting in the loss of biological communication connectivity.

Method used

By introducing instrument resolution conversion parameters and origin offset for pixel coordinate correction, and combining adaptive algorithms to dynamically calculate distance thresholds and local nearest neighbor constraint algorithms, a spatial adjacency graph is constructed to accurately calculate gene expression correlations and generate a gene co-expression network topology graph with spatial coordinate attributes.

Benefits of technology

It achieves high-precision reconstruction at the real physical scale, avoids the loss of biological communication in sparse cellular regions, improves the robustness and integrity of microenvironment network topology, and provides an analytical paradigm for accurate spatial physical mapping and coordinated regulation of topology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122637883A_ABST
    Figure CN122637883A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of biological information data processing, and particularly relates to a spatial gene co-expression network construction system based on in-situ sequencing. First, in-situ sequencing raw data of a target tissue section is acquired, the raw pixel coordinates are linearly scaled and translationally corrected into objective and true raw spatial physical coordinates, and a gene expression matrix is statistically generated; second, the real spatial distance between sequencing sites is calculated based on the raw spatial physical coordinates, and a spatial adjacency graph is constructed in combination with a dynamic distance threshold and a local neighborhood constraint algorithm; and finally, the gene expression matrix is mapped into the spatial adjacency graph to extract local spatial co-expression features and construct a network. The application eliminates physical scale distortion caused by underlying hardware sampling, flexibly adapts to the cell density and heterogeneity characteristics of different tissues, effectively avoids loss of real biological communication links in sparse areas, and realizes high-fidelity reconstruction of gene synergistic regulation networks in microenvironments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of bioinformatics data processing technology, specifically to a system for constructing spatial gene co-expression networks based on in situ sequencing. Background Technology

[0002] In recent years, spatial transcriptomics, especially in situ sequencing technology, has made significant progress. In situ sequencing technology can not only acquire gene expression data within target tissue sections in high throughput, but also completely preserve the original spatial physical coordinates of each molecule and its corresponding sequencing site on the tissue section. In modern biological and bioinformatics research, constructing gene co-expression networks has always been an important means to reveal the synergistic regulatory relationships between genes and explore underlying biological functions. With the massive accumulation of multidimensional data from in situ sequencing, deeply integrating high-throughput gene expression information with real physical spatial locations, and then exploring the gene synergistic expression characteristics in specific physically adjacent microenvironments in the spatial dimension, has extremely important scientific significance for elucidating tissue heterogeneity, intercellular communication, and complex life activity mechanisms. Therefore, based on spatial adjacency relationships and gene expression data, calculating local spatial co-expression characteristics and extracting key gene pairs, and then generating spatial gene co-expression networks with real spatial coordinate attributes and synergistic regulatory topology, has become an important development direction for deeply exploring the value of in situ sequencing data.

[0003] However, existing technologies often rely directly on raw pixel coordinates for spatial location analysis when processing in situ sequencing image data. However, raw pixel coordinates cannot reflect the true physical spatial scale, resulting in physical scale errors when calculating the spatial distance between sequencing sites or molecules. This makes it difficult to accurately reproduce the true biological physical distribution and communication distance at the microscopic scale. At the same time, when constructing spatial adjacency maps between cells or sequencing sites, existing technologies usually rely on fixed empirical distance thresholds to screen effective spatial interaction distances. This static threshold method cannot be adjusted according to the heterogeneity of different target tissue slices, which can easily lead to the loss of true biological communication connectivity in sparsely populated areas.

[0004] Therefore, this invention proposes a spatial gene co-expression network construction system based on in situ sequencing. Summary of the Invention

[0005] To address the physical scale errors caused by existing technologies that directly rely on original pixel coordinates, as mentioned in the background section, and the technical problems of using fixed distance thresholds failing to adapt to tissue heterogeneity and thus losing true biological connectivity defects, the present invention aims to provide a spatial gene co-expression network construction system based on in situ sequencing.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A spatial gene co-expression network construction system based on in situ sequencing includes:

[0008] M1: Data acquisition module, used to acquire in situ sequencing data of target tissue slices, parse and extract the gene expression matrix contained in the in situ sequencing data, and the original spatial physical coordinates of the sequencing sites corresponding to each gene on the target tissue slices;

[0009] M2: Spatial relationship construction module, used to calculate the spatial distance between the sequencing sites based on the original spatial physical coordinates, and to filter them by combining a preset distance threshold and a neighborhood constraint algorithm to construct a spatial adjacency graph between the sequencing sites;

[0010] M3: Co-expression calculation module, used to map the gene expression matrix to the spatial adjacency graph, calculate the gene expression correlation between the sequencing sites with spatial adjacency, and obtain local spatial co-expression features;

[0011] M4: Network generation module, used to extract key gene pairs with synergistic regulatory relationships based on the local spatial co-expression features, and generate and output a spatial gene co-expression network topology map with spatial coordinate attributes.

[0012] Furthermore, the process of parsing and extracting the gene expression matrix in the data acquisition module specifically involves:

[0013] First, the detected tissue slices in the target tissue section are defined. The total number of molecules is , No. indivual The molecule is denoted as At the same time, extract the first indivual molecular Original pixel coordinates on the image and the indivual molecular Associated genetic tags ;in, , For the first indivual molecular The original pixel x-coordinate on the image, For the first indivual molecular The original pixel ordinates on the image;

[0014] Secondly, instrument resolution conversion parameters and origin offset are introduced to adjust the original pixel coordinates. Perform linear scaling and translation correction;

[0015] Furthermore, the target tissue slices are divided into... sequencing sites, and the The number of sequencing sites is denoted as the sequencing site set. Wherein, the sequencing site refers to a spatial grid or a segmented single-cell region. This represents the total number of sequencing sites. Indicates the first One sequencing site, It is an index variable, and Simultaneously extract the sequencing site set. Any of the following sequencing sites Original spatial physical coordinates ;in, The first sequencing sites The original spatial physics x-axis and the original spatial physics y-axis;

[0016] Finally, the number of molecules of each gene within each sequencing site is counted to generate the gene expression matrix.

[0017] Furthermore, the original spatial physical coordinates From the sequencing site All within the boundary The physical coordinates of the molecule's centroid are determined, and the calculation formula is:

[0018]

[0019]

[0020] in, This is a spatial attribution indicator function;

[0021] When the indivual molecular Real space physical coordinates Falling into sequencing site Two-dimensional physical boundary When the space is within the specified range, the value of the spatial attribution indicator function is 1; otherwise, the value of the spatial attribution indicator function is 0; the two-dimensional spatial physical boundary The target tissue slice is generated by dividing it into square spatial grids with fixed side lengths.

[0022] Furthermore, the specific process for calculating the spatial distance between the sequencing sites in the spatial relationship construction module is as follows:

[0023] First, obtain the original spatial physical coordinates. and set the The indices of any two different sequencing sites in the sequencing sites are respectively and ;in, , ,and ;

[0024] Synchronization settings The original spatial physical coordinates of the sequencing sites are , No. The original spatial physical coordinates of the sequencing sites are To calculate the Euclidean spatial distance between the sequencing sites.

[0025] Furthermore, the process of filtering in the spatial relationship construction module by combining a preset distance threshold and a neighborhood constraint algorithm is as follows:

[0026] First, based on a preset distance threshold For the actual physical space distance Perform initial screening to generate distance truncation indicator variables. ;

[0027] Then, a secondary selection is performed using a local nearest neighbor constraint algorithm, specifically: any sequencing site... True physical distance from all other sites Sort in ascending order and select the first one with the smallest distance. Each sequencing site constitutes a locally effective neighborhood set. And generate neighborhood connectivity indicator variables. ;

[0028] Finally, the distance truncation indicator variable is integrated. Connectivity indicator variable with neighborhood The final spatial adjacency matrix elements are calculated and generated.

[0029] Furthermore, the effective spatial action distance threshold The result is dynamically calculated using an adaptive algorithm. The specific process is as follows:

[0030] Firstly, regarding all For each sequencing site, calculate the minimum adjacency distance from its nearest physical neighbor; then, statistically analyze all... The minimum adjacency distance set of each sequencing site is used to calculate the global distance mean and standard deviation of the minimum adjacency distance set; finally, based on the global distance mean and standard deviation, combined with a preset diffusion tolerance coefficient, the effective spatial action distance threshold is calculated.

[0031] Furthermore, the process of obtaining local spatial co-expression features in the co-expression calculation module is as follows:

[0032] First, obtain the underlying mathematical data structure representation of the gene expression matrix and the spatial adjacency graph, i.e., the spatial adjacency matrix, and set the target gene index for which the correlation is to be calculated;

[0033] Then, the mean and standard deviation of the expression level of each gene at all sequencing sites were calculated to standardize the absolute expression level and generate a standardized gene expression matrix.

[0034] Furthermore, the gene expression matrix is ​​mapped to the spatial adjacency graph, and the values ​​of the spatial adjacency matrix elements are fused for weighted correlation calculation. If and only if there is a spatial adjacency edge between two sequencing sites, their standardized expression product is included in the effective accumulation and normalized by dividing by the total number of effective adjacency edges to obtain the local spatial co-expression score between target genes.

[0035] Finally, all pairwise combinations of all genes are traversed and calculated to generate the local spatial co-expression feature matrix. It covers the true co-expression weights of global gene pairs in physically adjacent microenvironments, which are the local spatial co-expression features output by this module.

[0036] Furthermore, the process of obtaining the spatial gene co-expression network topology map in the network generation module is as follows:

[0037] First, the local spatial co-expression feature matrix is ​​obtained, and the mean and standard deviation of the global effective gene combination co-expression score are calculated. Then, a preset network sparsity adjustment coefficient is introduced to dynamically calculate the co-expression significance cutoff threshold.

[0038] Secondly, based on the co-expression significance truncation threshold, a binary network connection determination is performed on all gene combinations to remove background false positive noise with low scores and extract key gene pairs with scores greater than the threshold, thereby generating a binary network adjacency matrix.

[0039] Furthermore, by combining the absolute expression level molecular count of each gene at the sequencing site with the original spatial physical coordinates of the sequencing site, the spatial expression centroid coordinates of each gene are calculated.

[0040] Next, the adjacency matrix of the binarized network and the centroid coordinates of the spatial representation are integrated to construct a mathematical expression model. The complete spatial gene co-expression network topology diagram; among which... For the core network node set, For network connection edge sets, For the set of spatial coordinate attributes of nodes;

[0041] Finally, the core network node set is rendered graphically. Network connection edge collection and node spatial coordinate attribute set Output a spatial gene co-expression network topology diagram with real spatial coordinate attributes and collaborative regulatory network topology relationships.

[0042] Compared with the prior art, the advantages of the present invention are as follows:

[0043] 1. This invention achieves high-precision linear scaling and translation correction of the original pixel coordinates of in situ sequencing images by introducing instrument resolution conversion parameters and origin offsets that match the high-resolution fluorescence microscopy imaging system. Combined with a fixed-side-length two-dimensional square spatial grid division and spatial attribution indicator function, the spatial position of the sequencing site is accurately anchored by the centroid of the physical coordinates of all molecules falling within the physical boundary. This enables high-precision reconstruction of the original spatial physical coordinates that objectively represent the real physical scale. It eliminates the scale error caused by optical hardware sampling from the underlying algorithm level and achieves high-fidelity restoration of the real physical distribution law of biomolecules and the spatial communication distance of the microenvironment at the microscopic level.

[0044] 2. This invention abandons the traditional static truncation strategy and innovatively introduces a dynamic distance screening mechanism based on an adaptive algorithm. That is, it globally calculates the minimum adjacency distance between each sequencing site and its nearest physical neighbor, calculates the global mean and standard deviation of the minimum adjacency distance set, and adaptively derives an effective spatial action distance threshold in conjunction with a preset diffusion tolerance coefficient. This achieves flexible matching of cell spatial arrangement density and local heterogeneity characteristics of different target tissue slices. In addition, it uses a local nearest neighbor constraint algorithm for secondary spatial connectivity screening, which greatly avoids the loss of false negatives in real biological communication links in sparse cell regions and significantly improves the robustness and integrity of the microenvironment network topology.

[0045] 3. This invention breaks through the inherent limitations of traditional gene co-expression networks, which are detached from physical spatial attributes. It directly maps the gene expression matrix to the underlying spatial adjacency graph to accurately quantify local spatial co-expression characteristics. After extracting key gene pairs with synergistic regulatory relationships, it calculates the spatial expression centroid coordinates of each gene and deeply integrates them as independent node coordinate attributes into the underlying mathematical expression model. This achieves the output of a spatial gene co-expression network graph that combines accurate spatial physical mapping with synergistic regulatory topology. This multimodal modeling architecture, which integrates spatial coordinates, adjacency relationships, and gene expression, concretely anchors abstract molecular regulatory relationships to the real physical microenvironment, providing a highly forward-looking graph computational analysis paradigm for in-depth analysis of the microenvironmental heterogeneity of complex tissues and precise intercellular communication mechanisms. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a schematic diagram of the system workflow of the present invention;

[0048] Figure 2 This is a schematic diagram of the spatial relationship construction module of the present invention;

[0049] Figure 3 This is a schematic diagram of the co-expression calculation module of the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0051] To achieve the above objectives, the present invention provides a spatial gene co-expression network construction system based on in situ sequencing, such as... Figures 1-3 As shown, the system includes:

[0052] M1: Data acquisition module, used to acquire in situ sequencing data of target tissue slices, parse and extract the gene expression matrix contained in the in situ sequencing data, and the original spatial physical coordinates of the sequencing sites corresponding to each gene on the target tissue slices.

[0053] M101: Obtain the raw in situ sequencing data of the target tissue slice, and extract each detected element from the raw in situ sequencing data. The original pixel coordinates of the molecule, and each Molecularly associated gene tags, specifically:

[0054] Define the detected in the target tissue slice The total number of molecules is , No. indivual The molecule is denoted as At the same time, extract the first indivual molecular Original pixel coordinates on the image and the indivual molecular Associated genetic tags ;in, , For the first indivual molecular The original pixel x-coordinate on the image, For the first indivual molecular The original pixel ordinates on the image;

[0055] M102: Since the original pixel coordinates cannot reflect the true physical spatial scale, they need to be converted into original spatial physical coordinates. Here, instrument resolution conversion parameters and origin offset are introduced to adjust the original pixel coordinates. After linear scaling and translation correction, the formula for calculating the original spatial physical coordinates is as follows:

[0056]

[0057]

[0058] in, The first indivual molecular Mapped real space physical x-axis and real space physical y-axis; This is the conversion coefficient from horizontal pixels to actual physical distance; This is the conversion coefficient from vertical pixels to actual physical distance; These are the horizontal and vertical origin offsets of the physical coordinate system, respectively.

[0059] In this embodiment, since in situ sequencing technology relies on a high-resolution fluorescence microscopy imaging system, the physical meaning of the conversion coefficient is the actual physical size corresponding to a single pixel. This actual physical size is calculated by dividing the physical pixel size of the camera sensor in the microscopy imaging system by the magnification of the microscope objective. Specifically, this is based on multiple error robust fluorescence in situ hybridization. The standard hardware configuration for publicly available space transcriptome sequencing technology, the The technology uses an assembly Physical pixel size Using a camera and a microscope objective with 60x magnification, the actual physical distance corresponding to the single pixel is calculated as follows. Therefore, the conversion coefficients mentioned and The specific values ​​are all ;

[0060] M103: To construct the gene expression matrix, the target tissue slice needs to be divided into... sequencing sites, and the The number of sequencing sites is denoted as the sequencing site set. Wherein, the sequencing site refers to a spatial grid or a segmented single-cell region. This represents the total number of sequencing sites. Indicates the first One sequencing site, It is an index variable, and ;

[0061] Simultaneously extract the sequencing site set Any of the following sequencing sites Original spatial physical coordinates ;in, The first sequencing sites The original spatial physics x-axis and the original spatial physics y-axis;

[0062] The original spatial physical coordinates From the sequencing site All within the boundary The physical coordinates of the molecule's centroid are determined, and the calculation formula is:

[0063]

[0064]

[0065] in, For spatial attribution indicator function, when the first indivual molecular Real space physical coordinates Falling into sequencing site Two-dimensional physical boundary When the space is within the specified range, the value of the space attribution indicator function is 1; otherwise, the value of the space attribution indicator function is 0.

[0066] The two-dimensional spatial physical boundary The target tissue slice is generated by dividing it into square spatial grids with fixed side lengths, specifically as follows:

[0067] Let the side length of the square spatial grid be... The two-dimensional spatial physical boundary The mathematical constraint expression is:

[0068]

[0069] in, For any two-dimensional physical coordinates; and The first sequencing sites The horizontal physical left boundary and the horizontal physical right boundary, and ; and The first sequencing sites The vertical physical lower boundary and the vertical physical upper boundary, and ;

[0070] Correspondingly, if and only if the first indivual molecular Real space physical coordinates satisfy and When, determine the first indivual molecular Falling into the physical boundary of the two-dimensional space If any inequality condition is not satisfied, it is determined that the corresponding molecule does not fall within the physical boundary of the two-dimensional space. Inside;

[0071] M104: Count the number of molecules of each gene within each sequencing site to generate the gene expression matrix, specifically:

[0072] Let the total number of unique genes contained in the target tissue slice be . , No. Each gene is denoted as ,and , synchronous calculation of the One gene In the sequencing sites The expression level in [the sample] is calculated using the following formula:

[0073]

[0074] in, Indicates the first One gene In the sequencing sites The absolute expression level of molecules in the count; For gene tag matching function, when the first indivual molecular Genetic tags With the One gene If the values ​​are the same, the value of the gene tag matching function is 1; otherwise, the value of the gene tag matching function is 0.

[0075] Finally, iterate through all the data. One gene and all 1 sequencing site, generating dimension 1 Gene expression matrix The expression is: .

[0076] M2: Spatial Relationship Construction Module, used to calculate the spatial distance between the sequencing sites based on the original spatial physical coordinates, and to filter them by combining a preset distance threshold and a neighborhood constraint algorithm to construct a spatial adjacency graph between the sequencing sites.

[0077] M201: Obtain all data from the M1 module. The original spatial physical coordinates of each sequencing site on the target tissue slice , set the The indices of any two different sequencing sites in the sequencing sites are respectively and ;in, , ,and ;

[0078] Definition of the first The original spatial physical coordinates of the sequencing sites are , No. The original spatial physical coordinates of the sequencing sites are The Euclidean spatial distance between the sequencing sites is calculated using the following formula:

[0079]

[0080] in, Indicates the first The sequencing site and the first The actual physical spatial distance between sequencing sites;

[0081] M202: To eliminate site pairs that are too far apart and lack biological communication significance, the actual physical spatial distance is determined based on a preset distance threshold. A preliminary screening is performed to generate a distance truncation indicator variable, calculated as follows:

[0082]

[0083] in, The effective spatial action distance threshold preset for the system; The distance truncation indicator variable is used when the physical distance between two sequencing sites does not exceed the threshold. Its value is 1 if it is true, and 0 otherwise.

[0084] The effective space action distance threshold The result is dynamically calculated using an adaptive algorithm, and the corresponding calculation process is as follows:

[0085] Firstly, regarding all Each sequencing site is calculated. The distance to its nearest physical neighbor is denoted as the minimum adjacency distance. The calculation formula is:

[0086]

[0087] Then all statistics were compiled. The set of minimum adjacency distances for each sequencing site is used to calculate the global distance mean of the set of minimum adjacency distances. with standard deviation The calculation formula is:

[0088]

[0089] Finally, based on the global distance mean and standard deviation Combined with the preset diffusion tolerance coefficient The effective spatial action distance threshold is calculated. The calculation formula is: ;

[0090] In this embodiment, the diffusion tolerance coefficient The value of is set based on the empirical rule of normal distribution in spatial statistics: when the target tissue slice is a conventional tissue with uniform cell distribution, Preferably, it is 2, such that the effective spatial action distance threshold is... It can cover approximately 97.7% of the natural adjacent sequencing site spacing, thus preserving the vast majority of effective local communication relationships while strictly eliminating false positive connections caused by section tearing; when the target tissue section is a highly heterogeneous tissue with drastic changes in cell density, The preferred value is 3, to provide a higher signal diffusion tolerance, to ensure that long-distance paracrine communication networks between cells in sparse regions can be captured, and to prevent effective sequencing sites from becoming isolated nodes in the spatial adjacency graph.

[0091] M203: A secondary screening process combining local nearest neighbor constraint algorithms is performed to avoid redundant connections in densely populated regions or isolated nodes in sparsely populated regions, targeting any sequencing site. The true physical spatial distance between it and all other sites Sort in ascending order and select the first one with the smallest distance. Each sequencing site constitutes a locally effective neighborhood set. It also generates a neighborhood connectivity indicator variable, calculated as follows:

[0092]

[0093] in, This is a preset constraint parameter for the maximum number of neighboring nodes; Indicates the first The nearest neighbor set of each sequencing site; Let the neighborhood connectivity indicator variable be the first one. If a sequencing site belongs to the nearest neighbor set, the value is 1; otherwise, the value is 0.

[0094] In this embodiment, based on current mainstream spatial transcriptome sequencing technologies, such as microarray chip-based in-situ capture systems, the capture probes on the sequencing chip are typically arranged in a regular hexagonal close-packed pattern. Based on this two-dimensional physical spatial topology, the number of the most direct and closest physical nodes around any single sequencing site is theoretically exactly 6. Using this value as a constraint can maximize the fit with the actual spatial physical arrangement logic of the underlying hardware sequencing sites and accurately capture the most direct communication relationships of the local microenvironment. Therefore, the maximum neighbor node number constraint parameter... The preferred value is 6;

[0095] M204: Incorporate the aforementioned distance truncation indicator variable Connectivity indicator variable with neighborhood The final spatial adjacency matrix elements are calculated using the following formula:

[0096]

[0097] in, The first in the spatial adjacency matrix Line number The element state value of the column if and only if At that time, the judgment of the first The sequencing site and the first Sequencing sites simultaneously satisfy both a distance threshold and a neighborhood constraint, and there exists a valid spatial adjacency edge between them; specifically, it is stipulated that a site itself does not generate a spatial adjacency edge, i.e., when... hour, ;

[0098] Traverse all 1 sequencing site, generating dimension 1 The spatial adjacency matrix is ​​expressed as:

[0099]

[0100] The spatial adjacency matrix This constitutes the underlying mathematical data structure representation of the spatial adjacency graph described in this module.

[0101] M3: Co-expression calculation module, used to map the gene expression matrix to the spatial adjacency graph, calculate the gene expression correlation between the sequencing sites with spatial adjacency, and obtain local spatial co-expression features.

[0102] M301: Obtain the gene expression matrix output by the M1 module. and the spatial adjacency matrix output by the M2 module Meanwhile, the indices of any two target genes whose correlation is to be calculated are set as follows: and ;in, , ;

[0103] M302: To eliminate the dimensional differences in basal expression abundance and sequencing depth among different genes and improve the accuracy of spatial correlation calculations, the gene expression matrix needs to be modified. The data in the document is standardized.

[0104] First, regarding the first [section / part] in the target tissue slice... Each gene, calculate its role in all Mean expression levels at each sequencing site and the standard deviation of expression level The calculation formula is:

[0105]

[0106]

[0107] in, The first statistic in module M1 One gene In the sequencing sites The absolute expression level of molecules in the count;

[0108] Subsequently, based on the mean expression level and the standard deviation of expression level , for the The gene in the first The absolute expression levels of each sequencing site were analyzed. Standardized computation to generate standardized expression levels The calculation formula is: ;

[0109] Finally, iterate through all the data. One gene and Each sequencing site has a generation dimension of [number] dimensionality. Standardized expression matrix The expression is:

[0110] ;

[0111] M303: The standardized expression matrix Mapped to the spatial adjacency graph, the local spatial co-expression score is obtained by calculating the expression synergy of gene pairs at adjacent sites, targeting the target gene. With target gene The spatial adjacency matrix elements are fused for weighted correlation calculation, and a dual index is introduced for traversing sequencing sites. and ;in, , The calculation formula is:

[0112]

[0113] in, Indicates gene With genes Local spatial co-expression scores between them; For the spatial adjacency matrix, the first... Line number The element state value of the column, if and only if the first element is... The sequencing site and the first When there are spatially adjacent edges between sequencing sites, i.e. Only the product of the standardized expression levels is included in the effective summation; otherwise, it is 0. Indicates gene In the Standardized expression levels of each sequencing site; Indicates gene In the Normalized expression levels of each sequencing site; denominator The total number of all valid spatial adjacency edges in the network is used to normalize the co-expression score as a penalty.

[0114] M304: Traverse all For each gene, calculate the local spatial co-expression score between any two gene combinations, generating a dimension of [missing information]. Local spatial co-representation feature matrix The expression is:

[0115] ;

[0116] The local space co-expression feature matrix It covers the true co-expression weights of global gene pairs in physically adjacent microenvironments, which are the local spatial co-expression features output by this module.

[0117] M4: Network generation module, used to extract key gene pairs with synergistic regulatory relationships based on the local spatial co-expression features, and generate and output a spatial gene co-expression network topology map with spatial coordinate attributes.

[0118] M401: Obtain the dimension output from the M3 module. Local spatial co-representation feature matrix To remove background false positive noise with low spatial co-expression scores, an adaptive statistical thresholding algorithm is used to evaluate the matrix. The elements in the sample are used to determine the key gene pairs with synergistic regulatory relationships, specifically:

[0119] First, regarding the matrix The effective gene combinations, i.e., the upper triangular elements, avoid self- and redundant calculations, and calculate the mean of global and local space co-expression scores. with standard deviation The calculation formula is:

[0120]

[0121] in, Local spatial co-expression feature matrix The Middle Line number The element of the column represents the first element. The gene and the first Local spatial co-expression score among genes;

[0122] Subsequently, a preset network sparsity adjustment coefficient is introduced. Dynamically calculate the co-expression significance cutoff threshold The calculation formula is: ;

[0123] In this embodiment, the network sparsity adjustment coefficient The value of is based on the empirical rule of normal distribution in spatial statistics and the scale-free distribution of biological networks, and is set to 2 or 3; specifically, when the target tissue is a normal homeostatic tissue and it is necessary to retain a large number of potential co-regulatory branches, a value of is preferred. At this point, based on the principle of normal distribution statistics, the vast majority of background noise can be strictly eliminated, retaining approximately 2.3% of the significantly co-expressed strongly correlated signals located in the right tail. When the target tissue is in a highly heterogeneous state, such as the tumor microenvironment, or when the research requires the extraction of core regulatory frameworks with extremely high confidence, it is preferable to set... To provide more stringent screening criteria, ensuring that the extracted key gene pairs have strong spatial co-expression characteristics, effectively reducing the false positive rate;

[0124] Based on the threshold Binarize all gene pairs to determine network connectivity, and traverse all... The co-expression interaction combination of genes generates a dimension that is the same. Binary network adjacency matrix The expression is: ;in, For the binary network adjacency matrix The Middle Line number The elements of the column are calculated using the following formula: ;

[0125] when At that time, the judgment of the first The gene and the first Several genes exhibit significant spatial co-expression relationships, constituting key genes with a cooperative regulatory relationship; when At that time, the judgment of the first The gene and the first The local spatial co-expression score among the genes is lower than the co-expression significance cutoff threshold. In other words, if there is no significant synergistic regulatory relationship between the two, they are considered as background noise or weakly correlated signals, and no connection is established in the spatial gene co-expression network topology diagram.

[0126] M402: To ensure that network nodes possess spatial coordinate attributes that reflect the actual physical distribution of in-situ sequencing, the spatial expression centroid coordinates of each gene need to be calculated using the data obtained from the M1 module. Specifically:

[0127] Assume that all extracted by the M1 module Of the sequencing sites, the first The original spatial physical coordinates of the sequencing sites are For the first For each gene, calculate the corresponding spatial expression centroid coordinates. The calculation formula is:

[0128]

[0129]

[0130] in, This represents the total number of all sequencing sites. For the gene expression levels recorded in the M1 module gene expression matrix, the first... The gene in the first Absolute expression level of molecules at each sequencing site;

[0131] M403: Integrating the binarized network adjacency matrix Spatial expression of centroid coordinates ( To construct a complete spatial gene co-expression network topology. The corresponding mathematical expression model is ;in, This is the core set of network nodes in the network topology, used to characterize effective gene nodes with synergistic regulatory relationships; This is the set of network edges in the network topology graph, used to characterize the spatial co-expression connections between key gene nodes; This is a set of spatial coordinate attributes for the nodes in the network topology graph, used to characterize the actual physical mapping position of each gene node on the target tissue slice;

[0132] For the core network node set Network connection edge collection and node spatial coordinate attribute set The specific construction and expansion calculations are as follows:

[0133] First, define the core network node set. To remove isolated gene nodes that are below a threshold and have no association with other genes, the expression is: ;

[0134] Next, define the network connection edge set. The extracted key gene pairs are mapped to network connections, expressed as: ;

[0135] Finally, define the node spatial coordinate attribute set. To precisely map the actual physical location of each gene in the core network node set, the expression is: ;

[0136] The system ultimately renders the core network node set graphically. Network connection edge collection and node spatial coordinate attribute set Output a spatial gene co-expression network topology diagram with real spatial coordinate attributes and collaborative regulatory network topology relationships.

[0137] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0138] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A spatial gene co-expression network construction system based on in situ sequencing, characterized in that, include: M1: Data acquisition module, used to acquire in situ sequencing data of target tissue slices, parse and extract the gene expression matrix contained in the in situ sequencing data, and the original spatial physical coordinates of the sequencing sites corresponding to each gene on the target tissue slices; M2: Spatial relationship construction module, used to calculate the spatial distance between the sequencing sites based on the original spatial physical coordinates, and to filter them by combining a preset distance threshold and a neighborhood constraint algorithm to construct a spatial adjacency graph between the sequencing sites; M3: Co-expression calculation module, used to map the gene expression matrix to the spatial adjacency graph, calculate the gene expression correlation between the sequencing sites with spatial adjacency, and obtain local spatial co-expression features; M4: Network generation module, used to extract key gene pairs with synergistic regulatory relationships based on the local spatial co-expression features, and generate and output a spatial gene co-expression network topology map with spatial coordinate attributes.

2. The spatial gene co-expression network construction system based on in situ sequencing according to claim 1, characterized in that, The process of parsing and extracting the gene expression matrix in the data acquisition module is as follows: First, the detected tissue slices in the target tissue section are defined. The total number of molecules is , No. indivual The molecule is denoted as At the same time, extract the first indivual molecular Original pixel coordinates on the image and the indivual molecular Associated genetic tags ;in, , For the first indivual molecular The original pixel x-coordinate on the image, For the first indivual molecular The original pixel ordinates on the image; Secondly, instrument resolution conversion parameters and origin offset are introduced to adjust the original pixel coordinates. Perform linear scaling and translation correction; Furthermore, the target tissue slices are divided into... sequencing sites, and the The number of sequencing sites is denoted as the sequencing site set. Wherein, the sequencing site refers to a spatial grid or a segmented single-cell region. This represents the total number of sequencing sites. Indicates the first One sequencing site, It is an index variable, and Simultaneously extract the sequencing site set. Any number in the middle sequencing sites Original spatial physical coordinates ;in, The first sequencing sites The original spatial physics x-axis and the original spatial physics y-axis; Finally, the number of molecules of each gene within each sequencing site is counted to generate the gene expression matrix.

3. The spatial gene co-expression network construction system based on in situ sequencing according to claim 2, characterized in that, The original spatial physical coordinates From the sequencing site All within the boundary The physical coordinates of the molecule's centroid are determined, and the calculation formula is: in, This is a spatial attribution indicator function; When the indivual molecular Real space physical coordinates Falling into sequencing site Two-dimensional physical boundary When the space is within the specified range, the value of the spatial attribution indicator function is 1; otherwise, the value of the spatial attribution indicator function is 0; the two-dimensional spatial physical boundary The target tissue slice is generated by dividing it into square spatial grids with fixed side lengths.

4. The spatial gene co-expression network construction system based on in situ sequencing according to claim 2, characterized in that, The specific process for calculating the spatial distance between the sequencing sites in the spatial relationship construction module is as follows: First, obtain the original spatial physical coordinates. and set the The indices of any two different sequencing sites in the sequencing sites are respectively and ;in, , ,and ; Synchronization settings The original spatial physical coordinates of the sequencing sites are , No. The original spatial physical coordinates of the sequencing sites are To calculate the Euclidean spatial distance between the sequencing sites.

5. The spatial gene co-expression network construction system based on in situ sequencing according to claim 1, characterized in that, The process of filtering in the spatial relationship construction module, which combines a preset distance threshold and a neighborhood constraint algorithm, is as follows: First, based on a preset distance threshold For the actual physical space distance Perform initial screening to generate distance truncation indicator variables. ; Then, a secondary selection is performed using a local nearest neighbor constraint algorithm, specifically: any sequencing site... True physical distance from all other sites Sort in ascending order and select the first one with the smallest distance. Each sequencing site constitutes a locally effective neighborhood set. And generate neighborhood connectivity indicator variables. ; Finally, the distance truncation indicator variable is integrated. Connectivity indicator variable with neighborhood The final spatial adjacency matrix elements are calculated and generated.

6. The spatial gene co-expression network construction system based on in situ sequencing according to claim 5, characterized in that, The effective space action distance threshold The result is dynamically calculated using an adaptive algorithm. The specific process is as follows: Firstly, regarding all For each sequencing site, calculate the minimum adjacency distance from its nearest physical neighbor; then, statistically analyze all... The minimum adjacency distance set of each sequencing site is used to calculate the global distance mean and standard deviation of the minimum adjacency distance set; finally, based on the global distance mean and standard deviation, combined with a preset diffusion tolerance coefficient, the effective spatial action distance threshold is calculated.

7. The spatial gene co-expression network construction system based on in situ sequencing according to claim 1, characterized in that, The process of obtaining local spatial co-expression features in the co-expression calculation module is as follows: First, obtain the underlying mathematical data structure representation of the gene expression matrix and the spatial adjacency graph, i.e., the spatial adjacency matrix, and set the target gene index for which the correlation is to be calculated; Then, the mean and standard deviation of the expression level of each gene at all sequencing sites were calculated to standardize the absolute expression level and generate a standardized gene expression matrix. Furthermore, the gene expression matrix is ​​mapped to the spatial adjacency graph, and the values ​​of the spatial adjacency matrix elements are fused for weighted correlation calculation. If and only if there is a spatial adjacency edge between two sequencing sites, their standardized expression product is included in the effective accumulation and normalized by dividing by the total number of effective adjacency edges to obtain the local spatial co-expression score between target genes. Finally, all pairwise combinations of all genes are traversed and calculated to generate the local spatial co-expression feature matrix. It covers the true co-expression weights of global gene pairs in physically adjacent microenvironments, which are the local spatial co-expression features output by this module.

8. The spatial gene co-expression network construction system based on in situ sequencing according to claim 1, characterized in that, The process of obtaining the spatial gene co-expression network topology map in the network generation module is as follows: First, the local spatial co-expression feature matrix is ​​obtained, and the mean and standard deviation of the global effective gene combination co-expression score are calculated. Then, a preset network sparsity adjustment coefficient is introduced to dynamically calculate the co-expression significance cutoff threshold. Secondly, based on the co-expression significance truncation threshold, a binary network connection determination is performed on all gene combinations to remove background false positive noise with low scores and extract key gene pairs with scores greater than the threshold, thereby generating a binary network adjacency matrix. Furthermore, by combining the absolute expression level molecular count of each gene at the sequencing site with the original spatial physical coordinates of the sequencing site, the spatial expression centroid coordinates of each gene are calculated. Next, the adjacency matrix of the binarized network and the centroid coordinates of the spatial representation are integrated to construct a mathematical expression model. The complete spatial gene co-expression network topology diagram; among which... For the core network node set, For network connection edge sets, For the set of spatial coordinate attributes of nodes; Finally, the core network node set is rendered graphically. Network connection edge collection and node spatial coordinate attribute set Output a spatial gene co-expression network topology diagram with real spatial coordinate attributes and collaborative regulatory network topology relationships.