Spatial transcriptome processing method and device, computer equipment and storage medium
By constructing the potential energy field coordinate system to reconstruct the spatial transcriptome data, the problem that traditional methods cannot effectively construct coordinate systems that adapt to irregular biological tissue regions is solved, and the definition and quantitative analysis of gene expression patterns in irregular biological structures is realized, which improves adaptability.
Patent Information
- Application Number
- CN202311275451.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
Traditional spatial transcriptome data processing methods are limited by hand-drawn fold lines, and cannot effectively construct coordinate systems that adapt to irregular biological tissue regions, limiting the research and definition of gene expression patterns.
By determining the boundaries of biological tissue regions, multiple sets of potential energy field coordinate systems are constructed for edge-to-edge, and spatial transcriptome data are reconstructed based on these coordinate systems to realize the construction of non-European coordinate systems for irregular biological tissue regions.
It significantly improves the freedom of coordinate system construction, can meet the definition and quantitative analysis of gene expression patterns within most irregular biological structures, and improves adaptability.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present application relates to the field of spatial transcriptome technology, and in particular to a spatial transcriptome processing method, apparatus, computer equipment and storage medium. Background Art
[0002] The core value of spatial transcriptome technology lies in studying the expression patterns of genes in real physical space. The key to studying and defining the expression patterns of real physical space in the whole transcriptome lies in the selection and construction of the spatial coordinate system.
[0003] In traditional techniques, a broken line is manually drawn on the spatial transcriptome data to obtain a one-dimensional reference system along the broken line in the area near the broken line. Obviously, this method is severely limited by hand-drawing and is quite limited. Summary of the invention
[0004] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for processing spatial transcriptome data that can improve adaptability in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for processing a spatial transcriptome. The method comprises:
[0006] Determine the boundary of the biological tissue region; the biological tissue region refers to the spatial region where the biological tissue used to detect the spatial transcriptome data is located;
[0007] determining a plurality of sets of opposite edges from the boundary;
[0008] For each set of opposite sides, the potential energy value is used as the coordinate value to construct the potential energy field coordinate system corresponding to each set of opposite sides;
[0009] The spatial position in the spatial transcriptome data is reconstructed based on the potential energy field coordinate system corresponding to each group of opposite sides to obtain the reconstructed spatial transcriptome data.
[0010] In one embodiment, determining the boundary of the biological tissue region comprises:
[0011] A point set including multiple sample points is determined from the spatial transcriptome data;
[0012] Contour detection is performed on the convex hull of the point set to obtain boundaries of biological tissue regions corresponding to the multiple sample points.
[0013] In one embodiment, each set of opposite sides includes a first boundary line and a second boundary line; for each set of opposite sides, using the potential energy value as the coordinate value, constructing a potential energy field coordinate system corresponding to each set of opposite sides includes:
[0014] Assigning potential energy values to the first boundary line and the second boundary line in each set of opposite sides to obtain an initial potential energy field coordinate system corresponding to each set of opposite sides;
[0015] Iterating the initial potential energy field coordinate system multiple times;
[0016] After the iteration is completed, the potential energy field coordinate system corresponding to each set of opposite sides is determined.
[0017] In one embodiment, assigning potential energy values to the first boundary line and the second boundary line in each set of opposite sides to obtain an initial potential energy field coordinate system corresponding to each set of opposite sides includes:
[0018] Fitting the first boundary line and the second boundary line in each set of opposite sides respectively to obtain a first line segment corresponding to the first boundary line and a second line segment corresponding to the second boundary line;
[0019] Continuous potential energy values are respectively assigned to the first line segment and the second line segment to obtain an initial potential energy field coordinate system corresponding to each set of opposite sides.
[0020] In one embodiment, the multiple iterations of the initial potential energy field coordinate system include:
[0021] The initial potential energy field coordinate system is used as the first potential energy field coordinate system. In each iteration, based on the reference potential energy value corresponding to each potential energy value in the current potential energy field coordinate system, each potential energy value in the current potential energy field coordinate system is iterated to obtain the next potential energy field coordinate system.
[0022] In one embodiment, the reference potential energy value corresponding to each potential energy value in the current potential energy field coordinate system is iterated to obtain the next potential energy field coordinate system, including:
[0023] For each potential energy value in the potential energy field coordinate system, multiple reference potential energy values corresponding to the potential energy value are determined, and the multiple reference potential energy values are averaged to obtain a reference mean value;
[0024] The potential energy value is iterated according to the reference mean value to obtain the next potential energy field coordinate system.
[0025] In one embodiment, iterating each potential energy value in the current potential energy field coordinate system to obtain the next potential energy field coordinate system includes:
[0026] Iterate each potential energy value in the potential energy field coordinate system to obtain each potential energy value after iteration; each potential energy value after iteration includes a boundary potential energy value after iteration; the spatial position represented by the boundary potential energy value is on the boundary;
[0027] Resetting the boundary potential energy value after the iteration to obtain the next potential energy field coordinate system;
[0028] The boundary potential energy value in each potential energy field coordinate system is consistent with the boundary potential energy value in the initial potential energy field coordinate system.
[0029] In one embodiment, before determining the potential energy field coordinate system corresponding to each set of opposite sides after the iteration is completed, the method further includes:
[0030] When the difference between the potential energy value in the potential energy field coordinate system after each iteration and the potential energy value in the potential energy field coordinate system after the previous iteration meets the iteration stop condition, it is determined that the iteration is completed.
[0031] In one embodiment, the potential energy field coordinate system corresponding to each group of opposite sides includes continuous potential energy values; the spatial position in the spatial transcriptome data is reconstructed based on the potential energy field coordinate system corresponding to each group of opposite sides to obtain the reconstructed spatial transcriptome data, including:
[0032] Discretizing the continuous potential energy values in the potential energy field coordinate system corresponding to each group of opposite sides to obtain a discretized potential energy field coordinate system;
[0033] The spatial position in the spatial transcriptome data is mapped to the discretized potential energy field coordinate system to perform position reconstruction to obtain reconstructed spatial transcriptome data.
[0034] In one embodiment, the method further comprises:
[0035] Performing model fitting on the reconstructed spatial transcriptome data to obtain a model fitting result;
[0036] Based on the model fitting result, the expression pattern of the spatial transcriptome data is identified to obtain an identification result.
[0037] In a second aspect, the present application also provides a spatial transcriptome processing device. The device comprises:
[0038] A first determination module is used to determine the boundary of a biological tissue region; the biological tissue region refers to a spatial region where the biological tissue used to detect spatial transcriptome data is located;
[0039] A second determination module, used to determine a plurality of groups of opposite edges from the boundary;
[0040] A construction module is used to construct a potential energy field coordinate system corresponding to each set of opposite sides with the potential energy value as the coordinate value;
[0041] The reconstruction module is used to reconstruct the spatial position in the spatial transcriptome data based on the potential field coordinate system corresponding to each group of opposite sides to obtain the reconstructed spatial transcriptome data.
[0042] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method when executing the computer program.
[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps in the above method when executed by a processor.
[0044] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps in the above method are implemented.
[0045] The above-mentioned spatial transcriptome processing method, device, computer equipment, storage medium and computer program product determine the boundary of the biological tissue region; the biological tissue region refers to the spatial region where the biological tissue used to detect the spatial transcriptome data is located; multiple groups of opposite sides are determined from the boundary; for each group of opposite sides, a potential field coordinate system corresponding to each group of opposite sides is constructed with potential energy values as coordinate values; based on the potential field coordinate system corresponding to each group of opposite sides, the spatial position in the spatial transcriptome data is reconstructed to obtain the reconstructed spatial transcriptome data, and by constructing a potential field coordinate system for each group of opposite sides in the boundary, the construction of a non-Euclidean coordinate system on an irregular biological tissue region is realized, which significantly improves the degree of freedom of coordinate system construction, can meet the definition and quantitative analysis of gene expression patterns inside most irregular biological structures, and improves adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram of a process of processing a spatial transcriptome in one embodiment;
[0047] Figure 2 is a schematic diagram of an initial potential energy field coordinate system in one embodiment;
[0048] Figure 3 is a schematic diagram of a two-dimensional coordinate system in one embodiment;
[0049] Figure 4 is a schematic diagram of a potential energy field coordinate system corresponding to a first set of opposite sides in one embodiment;
[0050] Figure 5 is a schematic diagram of a potential energy field coordinate system corresponding to a second set of opposite sides in one embodiment;
[0051] Figure 6 A schematic diagram of a recognition result in one embodiment;
[0052] Figure 7 is a structural block diagram of a processing device for a spatial transcriptome in one embodiment;
[0053] Figure 8 is an internal structure diagram of a computer device in one embodiment;
[0054] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] In one embodiment, Figure 1 As shown, a spatial transcriptome processing method is provided, which is described by taking the method applied to a computer device as an example, and includes the following steps:
[0057] S102, determining the boundary of the biological tissue region; the biological tissue region refers to the spatial region where the biological tissue used to detect the spatial transcriptome data is located.
[0058] Among them, spatial transcriptome is a technology used to analyze transcriptome data from a spatial level. Spatial transcriptome data is the result of spatial transcriptome sequencing of biological tissues. Spatial transcriptome data includes the transcriptome and spatial position of sample points on biological tissues.
[0059] Exemplarily, the computer device can extract multiple sample points from the spatial transcriptome data. The spatial positions of the multiple sample points are located in the biological tissue region. The computer device can perform contour detection on the multiple sample points to obtain the boundary of the biological tissue region.
[0060] In some embodiments, the spatial transcriptome data is obtained by performing spatial transcriptome sequencing on a variety of biological tissues. The computer device can extract multiple sample points of the same tissue type from the spatial transcriptome data. The computer device can perform contour detection on multiple sample points of the same tissue type to obtain the boundary of the biological tissue area. Multiple sample points under the same tissue type are points on the biological tissue of the tissue type. The spatial positions of multiple sample points under the same tissue type can be used to indicate the spatial region where the biological tissue of the tissue type is located. It can be understood that tissues of different tissue types have different biological structures, so the potential field coordinate system constructed based on multiple sample points under the same tissue type can better reflect the biological structure of the tissue type.
[0061] In some embodiments, the computer device can obtain an input tissue type and extract multiple sample points of the tissue type from the spatial transcriptome data.
[0062] In some embodiments, the spatial transcriptome data may include sequencing results, cluster analysis results, and tissue annotation results. The sequencing results are the results of spatial transcriptome sequencing of biological tissues. The sequencing results may include the spatial location and transcriptome of all sample points on the biological tissue. The cluster analysis results are obtained by clustering the sequencing results. The cluster analysis results include multiple tissue clusters. Each tissue cluster includes multiple sample points. The tissue annotation results are obtained by marking and annotating the cluster analysis results. The tissue annotation results may include cluster labels for each tissue cluster. Users can specify the cluster labels they want to analyze. It is more convenient to select a spatial region with the help of clustering results. The computer device can obtain the input cluster label and extract multiple sample points under the cluster label from the spatial transcriptome data. It can be understood that the cluster label is used to characterize the tissue type.
[0063] In some embodiments, the computer device can determine the contours of multiple sample points to obtain the boundary of the biological tissue region.
[0064] In some embodiments, the computer device may include at least one of a terminal or a server. It is understandable that the method provided in the embodiment of the present application may be executed by a server or a terminal alone, or may be executed by a system including a terminal and a server, and implemented through the interaction between the terminal and the server. Among them, the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0065] S104, determining multiple groups of opposite edges from the boundary.
[0066] Each set of opposite sides refers to two opposite sides on the boundary. The two sides may be a first boundary line and a second boundary line. The boundary is a closed irregular geometric boundary.
[0067] Exemplarily, the computer device may obtain multiple segmentation points input for the boundary. The segmentation points may be selected on the boundary. The computer device may use the portion between every two segmentation points on the boundary as an edge to obtain multiple sets of opposite edges. For example, if the user selects 4 points on the boundary in order, the 4 points will divide the boundary into 4 parts, and 2 sets of opposite edges will be obtained.
[0068] In some embodiments, the computer device may obtain four segmentation points for the boundary input. The computer device may use the portion between every two segmentation points on the boundary as an edge to obtain two sets of matching opposite edges. It is understood that the computer device may obtain four segmentation points for the boundary input multiple times to obtain multiple sets of matching opposite edges.
[0069] S106, for each set of opposite sides, using the potential energy value as the coordinate value, constructing a potential energy field coordinate system corresponding to each set of opposite sides.
[0070] Exemplarily, the computer device can perform potential energy field modeling for each set of opposite sides, and use the potential energy values in the established potential energy field as coordinate values to obtain the potential energy field coordinate system corresponding to each set of opposite sides. It can be understood that in the potential energy field established for each set of opposite sides, the potential energy is generated due to the energy generated by the relative position between the first boundary line and the second boundary line.
[0071] In some embodiments, the potential energy field established for each set of opposite edges may be, but is not limited to, an electric potential energy field.
[0072] In some embodiments, the boundary of the biological tissue region is also the boundary of the potential energy field coordinate system. The computer device can assign continuous potential energy values to the spatial positions on the boundary lines in each set of opposite sides, and construct equipotential lines for the region within the boundary in combination with the potential energy values on the boundary to construct the potential energy field coordinate system corresponding to the set of opposite sides. It can be understood that the potential energy value represented by the equipotential line is the potential energy value at the spatial position where the equipotential line is located.
[0073] S108, reconstructing the spatial position in the spatial transcriptome data based on the potential field coordinate system corresponding to each group of opposite sides, to obtain reconstructed spatial transcriptome data.
[0074] Exemplarily, the computer device may map the spatial positions of multiple sample points in the spatial transcriptome data to the potential field coordinate system corresponding to each set of opposite sides to reconstruct the positions of the multiple sample points to obtain the reconstructed spatial transcriptome data.
[0075] In some embodiments, two sets of matching opposite sides can represent a complete boundary. The boundary can be divided into four sides, which constitute two sets of matching opposite sides. Multiple sets of opposite sides can include at least one set of matching opposite sides. It can be understood that the potential energy value in the potential energy field coordinate system corresponding to each set of opposite sides is used to indicate the position in the relative direction of another set of opposite sides that matches the set of opposite sides, so the two potential energy field coordinate systems corresponding to the two sets of matching opposite sides are used to jointly constitute a two-dimensional coordinate system. The relative direction of a set of opposite sides refers to the relative direction between the first boundary line and the second boundary line in the set of opposite sides.
[0076] The computer device can map the spatial positions of multiple sample points in the spatial transcriptome data to two potential field coordinate systems corresponding to two matching sets of opposite sides, so as to reconstruct the positions of the multiple sample points.
[0077] In some embodiments, the computer device may determine a two-dimensional coordinate system composed of two potential field coordinate systems corresponding to two sets of matching opposite sides, and map the spatial positions of multiple sample points in the spatial transcriptome data to the two-dimensional coordinate system.
[0078] In some embodiments, the plurality of groups of opposite sides may include a plurality of matching two groups of opposite sides. The computer device may determine the potential field coordinate system corresponding to each of the two matching groups of opposite sides to obtain a plurality of two-dimensional coordinate systems. The computer device may map the spatial positions of the plurality of sample points in the spatial transcriptome data to each two-dimensional coordinate system to reconstruct the positions of the plurality of sample points.
[0079] In some embodiments, the computer device can analyze the reconstructed spatial transcriptome data to identify gene expression patterns of biological tissues.
[0080] In the above-mentioned spatial transcriptome processing method, the boundary of the biological tissue region is determined; the biological tissue region refers to the spatial region where the biological tissue used to detect the spatial transcriptome data is located; multiple groups of opposite sides are determined from the boundary; for each group of opposite sides, a potential field coordinate system corresponding to each group of opposite sides is constructed with potential energy values as coordinate values; based on the potential field coordinate system corresponding to each group of opposite sides, the spatial position in the spatial transcriptome data is reconstructed to obtain the reconstructed spatial transcriptome data, and by constructing a potential field coordinate system for each group of opposite sides in the boundary, the construction of a non-Euclidean coordinate system on an irregular biological tissue region is realized, which significantly improves the degree of freedom of coordinate system construction, can meet the definition and quantitative analysis of gene expression patterns inside most irregular biological structures, and improves adaptability.
[0081] In some embodiments, determining the boundary of a biological tissue region includes: determining a point set including a plurality of sample points from spatial transcriptome data; and performing contour detection on a convex hull of the point set to obtain the boundary of the biological tissue region corresponding to the plurality of sample points.
[0082] Exemplarily, a computer device can obtain a specified tissue type, filter out multiple sample points under the tissue type from the spatial transcriptome data, obtain a point set, and calculate the convex hull of the point set. The convex hull of the point set can indicate a continuous biological tissue region. The convex hull of the point set is solved for the contour line to obtain the boundary of the biological tissue region corresponding to the multiple sample points. It can be understood that the biological tissue region corresponding to the multiple sample points refers to the spatial region where the biological tissue to which the multiple sample points belong is located. It should be noted that the contour line will serve as the boundary of the biological tissue region and as the boundary constructed by the subsequent potential energy field coordinate system. The boundary is obtained according to the true shape of the biological tissue region composed of multiple sample points, and is not limited to the prior shape.
[0083] In some embodiments, the computer device may calculate the convex hull of the point set by using a convex hull search function in a computer vision library. The computer device may solve the contour line of the convex hull of the point set by using a contour extraction function in a computer vision library.
[0084] In some embodiments, a computer device can extract multiple sample points under a specified clustering label from the spatial transcriptome data, so that the shape of the biological tissue region is consistent with the shape of the cluster with the specified clustering label, is not restricted to any prior shape, and does not require manual delineation by the user.
[0085] In this embodiment, a point set including multiple sample points is determined from the spatial transcriptome data; contour detection is performed on the convex hull of the point set to obtain the boundaries of the biological tissue region corresponding to the multiple sample points, and then a potential field coordinate system is constructed based on the real boundaries of the biological tissue including the multiple sample points, without limiting the shape of the boundary and not being restricted by the prior shape, thereby improving adaptability. In addition, the constructed potential field coordinate system is closely related to the boundary shape, so the potential field coordinate system can better reflect the biological structure of the biological tissue.
[0086] In some embodiments, each group of opposite sides includes a first boundary line and a second boundary line; for each group of opposite sides, a potential energy field coordinate system corresponding to each group of opposite sides is constructed with potential energy values as coordinate values, including: assigning potential energy values to the first boundary line and the second boundary line in each group of opposite sides to obtain an initial potential energy field coordinate system corresponding to each group of opposite sides; iterating the initial potential energy field coordinate system multiple times; when the iteration is completed, determining the potential energy field coordinate system corresponding to each group of opposite sides.
[0087] Exemplarily, the two groups of matched opposite sides include a first group of opposite sides and a second group of opposite sides. The computer device can assign continuous potential energy values to the first boundary line and the second boundary line in the first group of opposite sides, respectively, and use the first boundary line and the second boundary line in the second group of opposite sides as equipotential lines to obtain an initial potential energy field coordinate system corresponding to the first group of opposite sides.
[0088] The computer device can assign continuous potential energy values to the first boundary line and the second boundary line in the second group of opposite sides respectively, and use the first boundary line and the second boundary line in the first group of opposite sides as equipotential lines to obtain the initial potential energy field coordinate system corresponding to the second group of opposite sides.
[0089] The computer device may iterate the initial potential energy field coordinate system corresponding to the first set of opposite sides, and determine the potential energy field coordinate system corresponding to the first set of opposite sides when the iteration is completed. The computer device may iterate the initial potential energy field coordinate system corresponding to the second set of opposite sides, and determine the potential energy field coordinate system corresponding to the second set of opposite sides when the iteration is completed. It can be understood that the computer device may form a two-dimensional coordinate system consisting of the potential energy field coordinate system corresponding to the first set of opposite sides and the potential energy field coordinate system corresponding to the second set of opposite sides.
[0090] In some embodiments, the computer device may use the initial potential energy field coordinate system as the first potential energy field coordinate system, and in each iteration, iterate the potential energy value in the current potential energy field coordinate system to obtain the next potential energy field coordinate system. The next potential energy field coordinate system is the potential energy field coordinate system after the iteration of the current potential energy field coordinate system. When the iteration is completed, the potential energy field coordinate system after the last iteration of the potential energy field coordinate system is determined as the potential energy field coordinate system corresponding to each set of opposite sides.
[0091] In some embodiments, when the difference in potential energy values between the next potential energy field coordinate system and the current potential energy field coordinate system meets the iteration stop condition, it means that the next potential energy field coordinate system is in a stable state, and the iteration is determined to be completed.
[0092] In some embodiments, the computer device can set the potential energy value of the space region outside the biological tissue region to zero. It can be understood that the space region outside the biological tissue region in the established potential energy field does not have potential energy.
[0093] In some embodiments, the computer device may assign values uniformly and continuously from large to small on the first boundary line and the second boundary line in the first set of opposite sides, and the first boundary line and the second boundary line in the second set of opposite sides are used as equipotential lines, and the potential energy values thereon are respectively the maximum value and the minimum value. The computer device may assign values uniformly and continuously from large to small on the first boundary line and the second boundary line in the second set of opposite sides, and the first boundary line and the second boundary line in the first set of opposite sides are used as equipotential lines, and the potential energy values thereon are respectively the maximum value and the minimum value.
[0094] In some embodiments, the user can select four segmentation points on the boundary in an orderly manner, namely, the first segmentation point, the second segmentation point, the third segmentation point, and the fourth segmentation point. The first boundary line in the first group of opposite sides includes the first segmentation point and the second segmentation point, and is the first segmented boundary line, and the second boundary line includes the third segmentation point and the fourth segmentation point, and is the third segmented boundary line. The first boundary line in the second group of opposite sides includes the second segmentation point and the third segmentation point, and is the second segmented boundary line, and the second boundary line includes the first segmentation point and the fourth segmentation point, and is the fourth segmented boundary line. The computer device can construct a potential energy field coordinate system for the first group of opposite sides and the second group of opposite sides respectively. For example, the four boundary lines are represented by 1, 2, 3, and 4 respectively in the order of segmentation, then the potential energy field coordinate system corresponding to the first group of opposite sides is used to indicate the continuous coordinates from high to low in the direction of 1->3, and the potential energy field coordinate system corresponding to the second group of opposite sides is used to indicate the continuous coordinates from high to low in the direction of 2->4. Among them, the potential energy value at the segmentation point is a maximum value or a minimum value.
[0095] In this embodiment, potential energy values are assigned to the first boundary line and the second boundary line in each group of opposite sides to obtain an initial potential energy field coordinate system corresponding to each group of opposite sides; the initial potential energy field coordinate system is iterated multiple times; when the iterations are completed, the potential energy field coordinate system corresponding to each group of opposite sides is determined, and with the help of the potential energy field, the construction of a non-Euclidean coordinate system is realized, which significantly improves the degree of freedom of reference system construction, can meet the definition and quantitative analysis of gene expression patterns of most irregular biological structures, and improves adaptability.
[0096] In some embodiments, potential energy values are assigned to the first boundary line and the second boundary line in each group of opposite sides to obtain an initial potential energy field coordinate system corresponding to each group of opposite sides, including: fitting the first boundary line and the second boundary line in each group of opposite sides respectively to obtain a first line segment corresponding to the first boundary line and a second line segment corresponding to the second boundary line; and assigning continuous potential energy values to the first line segment and the second line segment respectively to obtain an initial potential energy field coordinate system corresponding to each group of opposite sides.
[0097] Exemplarily, the computer device can perform straight line fitting on the first boundary line and the second boundary line in each set of opposite sides, respectively, to obtain a first line segment corresponding to the first boundary line and a second line segment corresponding to the second boundary line. It can be understood that the line segment is less complex than the boundary line, which facilitates the construction of the potential energy field coordinate system. The first line segment and the second line segment are respectively assigned continuous and uniform potential energy values to obtain the initial potential energy field coordinate system corresponding to each set of opposite sides.
[0098] In some embodiments, the computer device may assign continuous and uniform potential energy values to the first line segment corresponding to the first boundary line and the second line segment corresponding to the second boundary line in the first group of opposite sides, and use the first boundary line and the second boundary line in the second group of opposite sides as equipotential lines, respectively, to obtain the initial potential energy field coordinate system corresponding to the first group of opposite sides. The computer device may assign continuous and uniform potential energy values to the first line segment corresponding to the first boundary line and the second line segment corresponding to the second boundary line in the second group of opposite sides, and use the first boundary line and the second boundary line in the first group of opposite sides as equipotential lines, respectively, to obtain the initial potential energy field coordinate system corresponding to the second group of opposite sides.
[0099] In some embodiments, Figure 2 The figure shows a schematic diagram of the initial potential energy field coordinate system. Boundary lines 1 and 3 refer to the first boundary line and the second boundary line in the first set of opposite sides. Boundary lines 2 and 4 refer to the first boundary line and the second boundary line in the second set of opposite sides. Figure 2 The initial potential energy field coordinate system corresponding to the first set of opposite sides is presented in . Seven equipotential lines are presented at intervals of 1 / 3, including equipotential lines with potential energy values of +1, +0.67, +0.33, -0.33, -0.67 and -1. The maximum value in the initial potential energy field coordinate system is +1, and the minimum value is -1. It can be understood that the established potential energy field coordinate system can be an electric potential energy field.
[0100] In this embodiment, the first boundary line and the second boundary line in each group of opposite sides are fitted respectively to obtain the first line segment corresponding to the first boundary line and the second line segment corresponding to the second boundary line; continuous potential energy values are assigned to the first line segment and the second line segment respectively to obtain the initial potential energy field coordinate system corresponding to each group of opposite sides. The line segments are less complex than the boundary lines, which facilitates the construction of the potential energy field coordinate system.
[0101] In some embodiments, the initial potential energy field coordinate system is iterated multiple times, including: taking the initial potential energy field coordinate system as the first potential energy field coordinate system, and in each iteration, iterating each potential energy value in the current potential energy field coordinate system based on the reference potential energy value corresponding to each potential energy value in the current potential energy field coordinate system to obtain the next potential energy field coordinate system.
[0102] Exemplarily, the spatial position represented by the reference potential energy value corresponding to the potential energy value is within a preset range of the spatial position represented by the potential energy value. For example, the preset range may be four adjacent spatial positions. Each potential energy value corresponds to four reference potential energy values, and the spatial positions represented by the four reference potential energy values are adjacent to the spatial position represented by the potential energy value. The computer device may use the initial potential energy field coordinate system as the first potential energy field coordinate system. In the first iteration, based on the reference potential energy value corresponding to each potential energy value in the first potential energy field coordinate system, each potential energy value in the first potential energy field coordinate system is iterated to obtain the next potential energy field coordinate system. In each iteration after the first iteration, based on the reference potential energy value corresponding to each potential energy value in this potential energy field coordinate system, each potential energy value in this potential energy field coordinate system is iterated to obtain the next potential energy field coordinate system.
[0103] In some embodiments, the computer device may use the statistics of multiple reference potential energy values corresponding to each potential energy value in the current potential energy field coordinate system as the potential energy value in the next potential energy field coordinate system to obtain the next potential energy field coordinate system. The statistics may be any one of the median and the mean.
[0104] In this embodiment, the initial potential energy field coordinate system is used as the first potential energy field coordinate system. In each iteration, each potential energy value in the current potential energy field coordinate system is iterated based on the reference potential energy value corresponding to each potential energy value in the current potential energy field coordinate system to obtain the next potential energy field coordinate system. By iterating the potential energy values to obtain the potential energy field coordinate system, the construction of a non-Euclidean coordinate system is realized, which significantly improves the degree of freedom of reference system construction, can meet the definition and quantitative analysis of gene expression patterns of most irregular biological structures, and improves adaptability.
[0105] In some embodiments, based on the reference potential energy value corresponding to each potential energy value in the current potential energy field coordinate system, each potential energy value in the current potential energy field coordinate system is iterated to obtain the next potential energy field coordinate system, including: for each potential energy value in the current potential energy field coordinate system, multiple reference potential energy values corresponding to the potential energy value are determined, and the multiple reference potential energy values are averaged to obtain a reference mean value; the potential energy value is iterated according to the reference mean value to obtain the next potential energy field coordinate system.
[0106] Exemplarily, the computer device can determine the average value of multiple reference potential energy values corresponding to the potential energy value at each spatial position in the current potential energy field coordinate system, and obtain the reference mean value corresponding to each spatial position. The reference mean value corresponding to each spatial position is used as the potential energy value at the spatial position to obtain the next potential energy field coordinate system.
[0107] In some embodiments, formula (1) is an iterative formula for potential energy value.
[0108] (1)
[0109] Among them, i,j k+1 Represents the potential energy value at the spatial position (i, j) in the K+1 potential energy field coordinate system. i-1,j k Represents the potential energy value at the spatial position (i-1, j) in the K-order potential energy field coordinate system. i-1,j+1 k Represents the potential energy value at the spatial position (i-1, j+1) in the K-order potential energy field coordinate system. i-1,j-1 k Represents the potential energy value at the spatial position (i-1, j-1) in the K-order potential energy field coordinate system. i+1,j k Represents the potential energy value at the spatial position (i+1,j) in the K-th potential energy field coordinate system.
[0110] In this embodiment, for each potential energy value in the current potential energy field coordinate system, multiple reference potential energy values corresponding to the potential energy value are determined, and the multiple reference potential energy values are averaged to obtain a reference mean value; the potential energy value is iterated according to the reference mean value to obtain the next potential energy field coordinate system, and the potential energy value is iterated by the mean of the reference potential energy value to obtain the potential energy field coordinate system, thereby realizing the construction of a non-Euclidean coordinate system, significantly improving the degree of freedom of reference system construction, and being able to meet the definition and quantitative analysis of gene expression patterns of most irregular biological structures, thereby improving adaptability.
[0111] In some embodiments, each potential energy value in the current potential energy field coordinate system is iterated to obtain the next potential energy field coordinate system, including: iterating each potential energy value in the current potential energy field coordinate system to obtain each potential energy value after iteration; each potential energy value after iteration includes a boundary potential energy value after iteration; the spatial position represented by the boundary potential energy value is on the boundary; resetting the boundary potential energy value after iteration to obtain the next potential energy field coordinate system; wherein the boundary potential energy value in each potential energy field coordinate system is consistent with the boundary potential energy value in the initial potential energy field coordinate system.
[0112] Exemplarily, each potential energy value after iteration includes a reference mean value corresponding to each spatial position. The computer device can iterate each potential energy value in the current potential energy field coordinate system, and use the reference mean value corresponding to each spatial position as the potential energy value at the spatial position to obtain the potential energy value after iteration. The boundary potential energy value after iteration is reset to the boundary potential energy value in the initial potential energy field coordinate system to obtain the next potential energy field coordinate system. It can be understood that the potential energy value at each spatial position is iterated to obtain each equipotential line in the potential energy field, and the position in the potential energy field is located by the position and potential energy value of these equipotential lines.
[0113] In this embodiment, each potential energy value in the potential energy field coordinate system is iterated to obtain each potential energy value after iteration; the boundary potential energy value after iteration is reset to obtain the next potential energy field coordinate system, and the stable state reached by the iteration of the internal potential energy value is related to the boundary shape and can reflect the biological structure. By resetting the potential energy value on the boundary, it is ensured that the boundaries of all established potential energy field coordinate systems are matched, which is convenient for the subsequent joint analysis of the spatial transcriptome in different potential energy field coordinate systems.
[0114] In some embodiments, when the iteration is completed, before determining the potential energy field coordinate system corresponding to each group of opposite sides, it also includes: when the difference between the potential energy value in the potential energy field coordinate system after each iteration and the potential energy value in the potential energy field coordinate system after the previous iteration meets the iteration stop condition, determining that the iteration is completed.
[0115] Exemplarily, the iteration is determined to be completed when the number of iterations reaches a preset number of iterations or the difference between the potential energy value in the potential energy field coordinate system after each iteration and the potential energy value in the potential energy field coordinate system after the previous iteration meets the iteration stop condition.
[0116] In some embodiments, the computer device may determine a first potential energy value corresponding to each spatial position from the current potential energy field coordinate system, and determine a second potential energy value corresponding to each spatial position from the next potential energy field coordinate system. The computer device may determine that the iteration is complete when the difference between the first potential energy value and the second potential energy value corresponding to each spatial position meets the iteration stop condition.
[0117] In some embodiments, the computer device may determine a loss value between two iterations based on a difference between a first potential energy value and a second potential energy value corresponding to each spatial position, and determine that the iteration is stopped when the loss value is not greater than a preset loss threshold.
[0118] In some embodiments, formula (2) is a formula for calculating the loss value.
[0119] (2)
[0120] Among them, Loss represents the loss value of the Kth iteration. i,j k+1 Represents the potential energy value at the spatial position (i, j) in the K+1 potential energy field coordinate system. i,j k Represents the potential energy value at the spatial position (i, j) in the K-order potential energy field coordinate system. The interior is used to represent the potential energy value, which refers to the potential energy value in the potential energy field coordinate system.
[0121] In this embodiment, when the difference between the potential energy value in the potential energy field coordinate system after each iteration and the potential energy value in the potential energy field coordinate system after the previous iteration meets the iteration stop condition, it indicates that the potential energy field coordinate system after this iteration is in a stable state, which can ensure the accuracy of subsequent reconstruction.
[0122] In some embodiments, the potential energy field coordinate system corresponding to each group of opposite sides includes continuous potential energy values; based on the potential energy field coordinate system corresponding to each group of opposite sides, the spatial position in the spatial transcriptome data is reconstructed to obtain the reconstructed spatial transcriptome data, including: discretizing the continuous potential energy values in the potential energy field coordinate system corresponding to each group of opposite sides to obtain the discretized potential energy field coordinate system; mapping the spatial position in the spatial transcriptome data to the discretized potential energy field coordinate system to perform position reconstruction to obtain the reconstructed spatial transcriptome data.
[0123] Exemplarily, the computer device can perform binning operation on the continuous potential energy values in the potential energy field coordinate system corresponding to each group of opposite sides according to the preset binning number, and obtain the discretized potential energy field coordinate system. It should be noted that the specific method of binning operation is not limited in the present embodiment. The number of isopotential lines in the discretized potential energy field coordinate system is consistent with the preset binning number. For example, if the preset binning number is 100, the discretized potential energy field coordinate system includes 100 isopotential lines. Using the potential energy values on the isopotential lines in the discretized potential energy field coordinate system as coordinate values, the spatial position in the spatial transcriptome data is mapped to the discretized potential energy field coordinate system for position reconstruction, and the reconstructed spatial transcriptome data is obtained.
[0124] In some embodiments, for two sets of matching opposite sides, the potential field coordinate system corresponding to the first set of opposite sides is the first coordinate system, and the potential field coordinate system corresponding to the second set of opposite sides is the second coordinate system. The two-dimensional coordinate system includes a first coordinate system and a second coordinate system. The computer device can determine the discretized first coordinate system and the discretized second coordinate system. Using the potential energy values on the equipotential lines in the discretized first coordinate system and the discretized second coordinate system as coordinate values, the spatial position decibels in the spatial transcriptome data are mapped to the discretized first coordinate system and the discretized second coordinate system for position reconstruction, and the reconstructed spatial transcriptome data is obtained.
[0125] In this embodiment, by discretizing the continuous potential energy values in the potential field coordinate system to obtain a discretized potential field coordinate system, and then mapping the spatial position in the spatial transcriptome data to the discretized potential field coordinate system for position reconstruction, the amount of data can be reduced and computing resources can be saved.
[0126] In some embodiments, the method further comprises: performing model fitting on the reconstructed spatial transcriptome data to obtain a model fitting; and identifying the expression pattern of the spatial transcriptome data based on the model fitting result to obtain an identification result.
[0127] For example, for spatial transcriptome data reconstructed in a potential field coordinate system, a model can be freely selected for fitting. The computer device can obtain recognition results by comparing the model fitting results and each expression pattern. The recognition results are used to characterize the gene expression pattern of biological tissues.
[0128] In some embodiments, the computer device can determine the model corresponding to the expression pattern to be identified. The computer device can fit the reconstructed spatial transcriptome data using the model corresponding to the expression pattern to be identified to obtain a model fit. The identification result is obtained by comparing the model fitting result with the expression pattern to be identified.
[0129] In some embodiments, the spatial position in the spatial transcriptome data is mapped to a two-dimensional coordinate system to obtain reconstructed spatial transcriptome data. If the step changes in gene expression are to be studied, the computer device can perform linear regression fitting on the reconstructed spatial transcriptome data to obtain a model fitting result. By comparing the model fitting result and the step expression pattern, the recognition result is obtained.
[0130] In some embodiments, Figure 3 A schematic diagram of a two-dimensional coordinate system is provided. Figure 3 The figure shows a two-dimensional coordinate system constructed on the mouse brain spatial transcriptome cortical area. The two-dimensional coordinate system is presented in the form of a grid on the mouse cerebral cortex. The grid is marked with filled circles to mark each segmentation point.
[0131] In some embodiments, Figure 4 The figure shows a schematic diagram of the potential energy field coordinate system corresponding to the first set of opposite sides. The depth of the filling represents the size of the coordinate value in the potential energy field coordinate system. The deepest represents a coordinate value of 0, and the shallowest represents a coordinate value of 20. The potential energy field coordinate system corresponding to the first set of opposite sides is used to indicate the spatial position in the relative direction of the second set of opposite sides.
[0132] In some embodiments, Figure 5 The figure shows a schematic diagram of the potential energy field coordinate system corresponding to the second set of opposite sides. The depth of the filling represents the size of the coordinate value in the potential energy field coordinate system. The deepest represents a coordinate value of 0, and the shallowest represents a coordinate value of 100. The potential energy field coordinate system corresponding to the second set of opposite sides is used to indicate the spatial position in the relative direction of the first set of opposite sides.
[0133] In some embodiments, the computer device may perform generalized linear model fitting on the reconstructed spatial transcriptome data to obtain a model fitting result.
[0134] In some embodiments, Figure 6 The figure shows a schematic diagram of the identification results. The expression cells (percentage) are used to indicate the expression of the transcriptome by the biological tissue. The confidence of the step expression pattern is used to indicate the probability that the expression pattern of the transcriptome on the biological tissue is a step expression pattern. The "1", "2", "3", "4", "5" and "6" marked in the coordinate system represent the first transcriptome, the second transcriptome, the third transcriptome, the fourth transcriptome, the fifth transcriptome and the sixth transcriptome, respectively. The expression pattern of the corresponding transcriptome on the biological tissue represented by these digitally marked points is a step expression pattern. It can be understood that when the confidence of the expression cells (percentage) and the step expression pattern is not less than the preset threshold, it will be considered as a step expression pattern. Figure 6 It also includes the expression of the first transcriptome, the second transcriptome, the third transcriptome, the fourth transcriptome, the fifth transcriptome and the sixth transcriptome in the mouse cortex, wherein the depth of filling in the cortex represents the expression amount of the transcriptome, the shallowest represents 1 and the deepest represents 0.
[0135] In this embodiment, a model is fitted by performing model fitting on the reconstructed spatial transcriptome data to obtain a model fitting; based on the model fitting result, the expression pattern of the spatial transcriptome data is identified to obtain an identification result. With the help of the potential energy field, the construction of a non-Euclidean coordinate system on irregular boundaries and irregular spatial regions is realized, which significantly improves the degree of freedom of reference system construction and can meet the definition and quantitative analysis of gene expression patterns of most irregular biological structures, thereby making the identification result more accurate.
[0136] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0137] Based on the same inventive concept, the embodiment of the present application also provides a processing device for a spatial transcriptome for implementing the processing method of the spatial transcriptome involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the processing device for one or more spatial transcriptomes provided below can be referred to the limitations of the processing method for the spatial transcriptome above, and will not be repeated here.
[0138] In one embodiment, Figure 7 As shown, a spatial transcriptome processing device 700 is provided, comprising: a first determination module 702, a second determination module 704, a construction module 706 and a reconstruction module 708, wherein:
[0139] The first determination module 702 is used to determine the boundary of the biological tissue region; the biological tissue region refers to the spatial region where the biological tissue used to detect the spatial transcriptome data is located;
[0140] A second determination module 704 is used to determine a plurality of groups of opposite edges from the boundary;
[0141] A construction module 706 is used to construct a potential energy field coordinate system corresponding to each set of opposite sides with the potential energy value as the coordinate value;
[0142] The reconstruction module 708 is used to reconstruct the spatial position in the spatial transcriptome data based on the potential field coordinate system corresponding to each group of opposite edges to obtain the reconstructed spatial transcriptome data.
[0143] In some embodiments, the first determination module 702 is used to determine a point set including a plurality of sample points from the spatial transcriptome data; and perform contour detection on the convex hull of the point set to obtain the boundaries of the biological tissue region corresponding to the plurality of sample points.
[0144] In some embodiments, each group of opposite sides includes a first boundary line and a second boundary line; a construction module 706 is used to assign potential energy values to the first boundary line and the second boundary line in each group of opposite sides to obtain an initial potential energy field coordinate system corresponding to each group of opposite sides; the initial potential energy field coordinate system is iterated multiple times; when the iteration is completed, the potential energy field coordinate system corresponding to each group of opposite sides is determined.
[0145] In some embodiments, construction module 706 is used to fit the first boundary line and the second boundary line in each group of opposite sides respectively to obtain a first line segment corresponding to the first boundary line and a second line segment corresponding to the second boundary line; and to assign continuous potential energy values to the first line segment and the second line segment respectively to obtain an initial potential energy field coordinate system corresponding to each group of opposite sides.
[0146] In some embodiments, construction module 706 is used to use the initial potential energy field coordinate system as the first potential energy field coordinate system. In each iteration, based on the reference potential energy value corresponding to each potential energy value in the current potential energy field coordinate system, each potential energy value in the current potential energy field coordinate system is iterated to obtain the next potential energy field coordinate system.
[0147] In some embodiments, construction module 706 is used to determine multiple reference potential energy values corresponding to each potential energy value in the current potential energy field coordinate system, and average the multiple reference potential energy values to obtain a reference mean value; the potential energy value is iterated according to the reference mean value to obtain the next potential energy field coordinate system.
[0148] In some embodiments, construction module 706 is used to iterate each potential energy value in the current potential energy field coordinate system to obtain each potential energy value after iteration; each potential energy value after iteration includes a boundary potential energy value after iteration; the spatial position represented by the boundary potential energy value is on the boundary; the boundary potential energy value after iteration is reset to obtain the next potential energy field coordinate system; wherein, the boundary potential energy value in each potential energy field coordinate system is consistent with the boundary potential energy value in the initial potential energy field coordinate system.
[0149] In some embodiments, the construction module 706 is used to determine that the iteration is completed when the difference between the potential energy value in the potential energy field coordinate system after each iteration and the potential energy value in the potential energy field coordinate system after the previous iteration meets the iteration stop condition.
[0150] In some embodiments, the potential energy field coordinate system corresponding to each group of opposite sides includes continuous potential energy values; the reconstruction module 708 is used to discretize the continuous potential energy values in the potential energy field coordinate system corresponding to each group of opposite sides to obtain a discretized potential energy field coordinate system; the spatial position in the spatial transcriptome data is mapped to the discretized potential energy field coordinate system to perform position reconstruction to obtain the reconstructed spatial transcriptome data.
[0151] In some embodiments, the reconstruction module 708 is further used to perform model fitting on the reconstructed spatial transcriptome data to obtain a model fitting result; and identify the expression pattern of the spatial transcriptome data based on the model fitting result to obtain an identification result.
[0152] Each module in the processing device of the above-mentioned spatial transcription group can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0153] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store spatial transcriptome data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing a spatial transcriptome is implemented.
[0154] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for processing a spatial transcriptome is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0155] Those skilled in the art will understand that Figure 8 or Fig. 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0156] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0157] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0158] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0159] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0160] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0161] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for processing a spatial transcriptome, characterized in that: The method comprises: Determine the boundary of the biological tissue region; the biological tissue region refers to the spatial region where the biological tissue used to detect the spatial transcriptome data is located; determining a plurality of sets of opposite edges from the boundary; For each set of opposite sides, the potential energy value is used as the coordinate value to construct the potential energy field coordinate system corresponding to each set of opposite sides; The spatial position in the spatial transcriptome data is reconstructed based on the potential energy field coordinate system corresponding to each group of opposite sides to obtain the reconstructed spatial transcriptome data.
2. The method according to claim 1, characterized in that Determining the boundary of the biological tissue region comprises: A point set including multiple sample points is determined from the spatial transcriptome data; Contour detection is performed on the convex hull of the point set to obtain boundaries of biological tissue regions corresponding to the multiple sample points.
3. The method according to claim 1, characterized in that Each set of opposite sides includes a first boundary line and a second boundary line; for each set of opposite sides, a potential energy field coordinate system corresponding to each set of opposite sides is constructed with the potential energy value as the coordinate value, including: Assigning potential energy values to the first boundary line and the second boundary line in each set of opposite sides to obtain an initial potential energy field coordinate system corresponding to each set of opposite sides; Iterating the initial potential energy field coordinate system multiple times; After the iteration is completed, the potential energy field coordinate system corresponding to each set of opposite sides is determined.
4. The method according to claim 3, characterized in that The step of assigning potential energy values to the first boundary line and the second boundary line in each set of opposite sides to obtain an initial potential energy field coordinate system corresponding to each set of opposite sides includes: Fitting the first boundary line and the second boundary line in each set of opposite sides respectively to obtain a first line segment corresponding to the first boundary line and a second line segment corresponding to the second boundary line; Continuous potential energy values are respectively assigned to the first line segment and the second line segment to obtain an initial potential energy field coordinate system corresponding to each set of opposite sides.
5. The method according to claim 3, characterized in that: The multiple iterations of the initial potential energy field coordinate system include: The initial potential energy field coordinate system is used as the first potential energy field coordinate system. In each iteration, based on the reference potential energy value corresponding to each potential energy value in the current potential energy field coordinate system, each potential energy value in the current potential energy field coordinate system is iterated to obtain the next potential energy field coordinate system.
6. The method according to claim 5, characterized in that The reference potential energy value corresponding to each potential energy value in the current potential energy field coordinate system is based on iterating each potential energy value in the current potential energy field coordinate system to obtain the next potential energy field coordinate system, including: For each potential energy value in the potential energy field coordinate system, multiple reference potential energy values corresponding to the potential energy value are determined, and the multiple reference potential energy values are averaged to obtain a reference mean value; The potential energy value is iterated according to the reference mean value to obtain the next potential energy field coordinate system.
7. The method according to claim 5, characterized in that The iterating each potential energy value in the current potential energy field coordinate system to obtain the next potential energy field coordinate system includes: Iterate each potential energy value in the potential energy field coordinate system to obtain each potential energy value after iteration; each potential energy value after iteration includes a boundary potential energy value after iteration; the spatial position represented by the boundary potential energy value is on the boundary; Resetting the boundary potential energy value after the iteration to obtain the next potential energy field coordinate system; The boundary potential energy value in each potential energy field coordinate system is consistent with the boundary potential energy value in the initial potential energy field coordinate system.
8. The method according to claim 3, characterized in that The step of determining the potential energy field coordinate system corresponding to each set of opposite sides after the iteration is completed also includes: When the difference between the potential energy value in the potential energy field coordinate system after each iteration and the potential energy value in the potential energy field coordinate system after the previous iteration meets the iteration stop condition, it is determined that the iteration is completed.
9. The method according to claim 1, characterized in that: The potential energy field coordinate system corresponding to each group of opposite sides includes continuous potential energy values; the spatial position in the spatial transcriptome data is reconstructed based on the potential energy field coordinate system corresponding to each group of opposite sides to obtain the reconstructed spatial transcriptome data, including: Discretizing the continuous potential energy values in the potential energy field coordinate system corresponding to each group of opposite sides to obtain a discretized potential energy field coordinate system; The spatial position in the spatial transcriptome data is mapped to the discretized potential energy field coordinate system to perform position reconstruction to obtain reconstructed spatial transcriptome data.
10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: Performing model fitting on the reconstructed spatial transcriptome data to obtain a model fitting result; Based on the model fitting result, the expression pattern of the spatial transcriptome data is identified to obtain an identification result.
11. A spatial transcriptome processing device, characterized in that: The device comprises: A first determination module is used to determine the boundary of a biological tissue region; the biological tissue region refers to a spatial region where the biological tissue used to detect spatial transcriptome data is located; A second determination module, used to determine a plurality of groups of opposite edges from the boundary; A construction module is used to construct a potential energy field coordinate system corresponding to each set of opposite sides with the potential energy value as the coordinate value; The reconstruction module is used to reconstruct the spatial position in the spatial transcriptome data based on the potential field coordinate system corresponding to each group of opposite sides to obtain the reconstructed spatial transcriptome data.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.