Gene spatial distribution characteristic identification method, device and equipment and storage medium
The method and device provide flexible gene identification by determining probability distributions and transmission costs, enabling accurate analysis of gene spatial distribution patterns and differences.
Patent Information
- Application Number
- CN202310708881.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-17
AI Technical Summary
Existing gene identification methods lack flexibility in analyzing the spatial distribution of genes, as they use a uniform null hypothesis, limiting their applicability to diverse scenarios.
A method and device for identifying spatial distribution characteristics of genes by determining source and target probability distributions, calculating transmission costs, and evaluating distribution differences using geodesic distances and statistical tests, allowing for flexible analysis under varying assumptions.
Enables flexible and accurate identification of gene distribution patterns, capable of distinguishing between random and non-random distributions, and identifying significant differences in gene spatial characteristics.
Smart Images

Figure CN119152931A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of gene identification technology, and in particular to a method, device, equipment and storage medium for identifying the spatial distribution characteristics of genes. Background Art
[0002] In recent years, with the development of spatial sequencing technology, the analysis of spatial transcriptome data has become increasingly important. One of the core aspects of spatial transcriptome data analysis is to study the expression distribution characteristics of genes in space. At present, the same null hypothesis is used for different genes to determine whether the genes are randomly distributed. The application scenarios for gene identification are relatively simple, resulting in poor flexibility. Summary of the invention
[0003] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for identifying the spatial distribution characteristics of genes in order to improve flexibility in response to the above-mentioned technical problems.
[0004] In a first aspect, the present application provides a method for identifying the spatial distribution characteristics of a gene, comprising:
[0005] Obtain spatial transcriptome data and identification requirements; spatial transcriptome data includes sample points used to express different genes to be identified;
[0006] For each gene to be identified, determining the source probability distribution corresponding to the gene to be identified according to each sample point corresponding to the gene to be identified; the source probability distribution includes the probability distribution of each sample point corresponding to the gene to be identified in the sample space;
[0007] Determine the target probability distribution according to the identification requirements; the target probability distribution includes the probability distribution of each reference sample point corresponding to the reference gene in the sample space;
[0008] Determine the target transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution; the target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space;
[0009] According to the target transmission cost corresponding to each gene to be identified, the distribution characteristics of each gene to be identified in the sample space are determined.
[0010] In a second aspect, the present application provides a device for identifying spatial distribution characteristics of genes, comprising:
[0011] A data determination module is used to obtain spatial transcriptome data and identification requirements; the spatial transcriptome data includes sample points for expressing different genes to be identified;
[0012] The probability distribution determination module is used to determine the source probability distribution corresponding to each gene to be identified according to each sample point corresponding to the gene to be identified; the source probability distribution includes the probability distribution of each sample point corresponding to the gene to be identified in the sample space; determine the target probability distribution according to the identification requirements; the target probability distribution includes the probability distribution of each reference sample point corresponding to the reference gene in the sample space;
[0013] The transmission cost calculation module is used to determine the target transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution; the target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space;
[0014] The distribution feature determination module is used to determine the distribution features corresponding to each gene to be identified in the sample space according to the target transmission cost corresponding to each gene to be identified.
[0015] In some embodiments, the spatial transcriptome data also includes the spatial coordinates of each sample point corresponding to each gene to be identified. The transmission cost calculation module is used to determine the geodesic distance of the current sample point to the remaining sample points for each current sample point corresponding to each gene to be identified, according to the spatial coordinates of each sample point corresponding to the gene to be identified; the remaining sample points are the sample points other than the current sample point among the sample points corresponding to the gene to be identified; the geodesic distance is used to characterize the cost required for the current sample point to be transmitted to the remaining sample points; determine the transmission quality of each sample point corresponding to each gene to be identified to be transmitted to the remaining sample points; determine the target transmission cost of the source probability distribution corresponding to each gene to be identified to the target probability distribution according to the geodesic distance and transmission quality of each sample point corresponding to each gene to be identified.
[0016] In some embodiments, the geodesic distance includes a geodesic distance matrix. The transmission cost calculation module is also used to determine the neighboring points of the current sample point for each current sample point corresponding to each gene to be identified; the neighboring points of the current sample point are points adjacent to the current sample point among the remaining sample points corresponding to the gene to be identified; according to the spatial coordinates of the current sample point and the neighboring points of the current sample point, calculate the Euclidean distance between the current sample point and the neighboring points of the current sample point; record the Euclidean distances between the current sample points and the neighboring points of the current sample point in a pre-constructed multi-order matrix to obtain an initial distance matrix; the order of the multi-order matrix is determined by the number of sample points corresponding to the gene to be identified; use the initial distance matrix to solve the shortest paths between the current sample point and the non-neighboring points of the current sample point, so as to record the determined shortest paths in the initial distance matrix to obtain a geodesic distance matrix.
[0017] In some embodiments, the spatial transcription group data includes first spatial transcription group data and second spatial transcription group data; the sample points included in the first spatial transcription group data are first sample points; the spatial coordinates corresponding to the first sample points are the first spatial coordinates in the first sample space; the sample points included in the second spatial transcription data are second sample points; the spatial coordinates corresponding to the second sample points are the second spatial coordinates in the second sample space. The transmission cost calculation module is also used to determine the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point; for each current first sample point corresponding to each gene to be identified, the second sample point with the largest transmission amount to the current first sample point among the second sample points is determined as the mapping point of the current first sample point; according to the mapping relationship between each first sample point corresponding to each gene to be identified and the mapping point, each first sample point corresponding to each gene to be identified is mapped to the second sample space to obtain the third space coordinates corresponding to each first sample point corresponding to each gene to be identified in the second sample space; for each current space sample point among each first sample point and second sample point of each gene to be identified in the second sample space, the geodesic distance of the current space sample point to the non-current space sample point is determined according to the second space coordinate or the third space coordinate corresponding to the current space sample point.
[0018] In some embodiments, the transmission cost calculation module is also used to determine the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified; the first transmission cost is the transmission cost of each first sample point transmitted to the remaining first sample points; the first transmission quality is the transmission quality of each first sample point transmitted to the remaining first sample points; determine the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified; the second transmission cost is the transmission cost of each second sample point transmitted to the remaining second sample points; the second transmission quality is the transmission quality of each second sample point transmitted to the remaining second sample points; according to the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified, and the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified, calculate the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point.
[0019] In some embodiments, the distribution feature determination module is also used to perform a statistical test on the target transmission cost corresponding to each gene to be identified, so as to determine the statistical significance of the gene to be identified; based on the statistical significance of each gene to be identified, determine the distribution feature corresponding to each gene to be identified in the sample space; the distribution feature is used to characterize the degree of difference between the corresponding gene to be identified and the reference gene in the sample space.
[0020] In some embodiments, the distribution feature determination module is also used to reorder the source probability distribution corresponding to the current gene to be identified multiple times for each current gene to be identified, so as to obtain multiple random probability distributions after reordering; according to the transmission costs from the multiple random probability distributions to the target probability distribution, and the ranking relationship between the target transmission costs corresponding to the current gene to be identified, the statistical significance of the current gene to be identified is determined.
[0021] In a third aspect, the present application provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method when executing the computer program.
[0022] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps in the above method when executed by a processor.
[0023] In a fifth aspect, the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps in the above method.
[0024] The above-mentioned method, device, computer equipment, computer-readable storage medium and computer program product for identifying the spatial distribution characteristics of genes obtain spatial transcriptome data and identification requirements for each sample point for expressing different genes to be identified; for each gene to be identified, the source probability distribution corresponding to the gene to be identified is determined according to each sample point corresponding to the gene to be identified; wherein the source probability distribution includes the probability distribution of each sample point corresponding to the gene to be identified in the sample space. Then, the target probability distribution is determined according to the identification requirements; wherein the target probability distribution includes the probability distribution of each reference sample point corresponding to the reference gene in the sample space. By selecting the target probability distribution that matches the identification requirements, each gene to be identified can accept different prior assumptions to meet the distribution characteristics analysis requirements of genes in different scenarios, and is not limited to whether the distribution characteristics corresponding to the identification gene belong to random distribution. Compared with the traditional method, it is more flexible. Then, the target transmission cost of the source probability distribution corresponding to each gene to be identified to the target probability distribution is determined; wherein the target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space, and the distribution difference between the source probability distribution and the target probability distribution can be evaluated by constructing the target transmission cost. In addition, according to the target transmission cost corresponding to each gene to be identified, the distribution characteristics of each gene to be identified in the sample space are determined to clarify whether there is a significant difference in the distribution of each gene to be identified and the reference gene, thereby achieving spatial characteristic gene identification with high flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1A schematic diagram of a method for identifying the spatial distribution characteristics of a gene provided in an embodiment of the present application;
[0026] Figure 2 A schematic diagram of the spatial distribution of the first gene provided in the embodiment of the present application;
[0027] Figure 3 A schematic diagram of the spatial distribution of the second gene provided in the embodiment of the present application;
[0028] Figure 4 A schematic diagram of the spatial distribution of the third gene provided in the embodiment of the present application;
[0029] Figure 5 A structural block diagram of a device for identifying the spatial distribution characteristics of genes provided in an embodiment of the present application;
[0030] Figure 6 An internal structure diagram of a computer device provided in an embodiment of the present application;
[0031] Figure 7 An internal structure diagram of another computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] 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.
[0033] In some embodiments, Figure 1 As shown, a method for identifying the spatial distribution characteristics of genes is provided. This embodiment uses the method applied to a computer device as an example. It can be understood that the computer device can be a server or a terminal. The method can be implemented by the server or the terminal alone, or through interaction between the server and the terminal. In this embodiment, the method includes the following steps:
[0034] Step 102, obtaining spatial transcriptome data and identification requirements.
[0035] The spatial transcriptome data includes sample points for expressing different genes to be identified. The genes to be identified refer to genes whose spatial distribution characteristics are to be identified.
[0036] The identification requirement refers to the requirement for identifying the distribution characteristics of each gene to be identified. In some embodiments, the identification requirement may be to identify whether the distribution of each gene to be identified is uniform or random, or whether each gene to be identified is right-side distributed.
[0037] Specifically, the computer device obtains a single or multiple spatial transcriptome data, and obtains an identification requirement for identifying each to-be-identified gene represented by the single or multiple spatial transcriptome data.
[0038] Step 104: for each gene to be identified, determine the source probability distribution corresponding to the gene to be identified according to each sample point corresponding to the gene to be identified.
[0039] The source probability distribution includes the probability distribution of each sample point in the sample space corresponding to the gene to be identified, and the sum is 1. It should be noted that the source probability distribution is the true distribution of the expression of each gene to be identified, and can also be expressed as the probability density distribution of each gene to be identified. In addition, the source probability distribution S is an N S dimensional vector, S[i] represents the expression level of the gene at sample point i in the sample space.
[0040] In some embodiments, the sample space may be a real physical space where each sample point is located, or may be an extended three-dimensional space or other custom space.
[0041] Specifically, the computer device constructs a source probability distribution corresponding to each gene to be identified according to the expression amount of the gene at each sample point corresponding to the gene to be identified.
[0042] Step 106, determining the target probability distribution according to the identification requirements.
[0043] The target probability distribution includes the probability distribution of each reference sample point corresponding to the reference gene in the sample space. It should be noted that the sample space where each reference sample point is located needs to be the same as the sample space where each sample point is located.
[0044] Specifically, the computer device determines a probability distribution that matches the identification requirement from a plurality of preset probability distributions according to the identification requirement, and obtains a target probability distribution.
[0045] For example, if the identification requirement needs to determine whether the gene to be identified is evenly distributed in the sample space, then the reference sample points evenly distributed in the sample space and the probability distribution corresponding to the reference sample points can be selected to obtain the target probability distribution. If the identification requirement needs to determine whether the gene to be identified is discretely distributed in the sample space, then the reference sample points discretely distributed in the sample space and the probability distribution corresponding to the reference sample points can be selected to obtain the target probability distribution.
[0046] In some embodiments, taking spatially non-uniformly distributed gene identification as an example, the target probability distribution T can be selected as a uniform distribution in the sample space. For example, the sample space contains N t reference sample points, then for any sample point i, T[i] = (1 / Nt ).
[0047] In some embodiments, when the input spatial transcriptome data is a copy, the target probability distribution is determined by pre-set genes with specific distribution characteristics.
[0048] In other embodiments, when there are two copies of input spatial transcriptome data, each gene represented by one copy of the spatial transcriptome data can be determined as a gene to be identified, and each gene represented by the other copy of the spatial transcriptome data can be determined as a reference gene. The source probability distribution of the two copies of spatial transcriptome data is determined based on each gene to be identified in one copy of the spatial transcriptome data, and the target probability distribution of the two copies of spatial transcriptome data is determined based on each reference gene in the other copy of the spatial transcriptome data.
[0049] It can be seen that in the embodiments of the present application, not only the distribution difference between the source probability distribution of each gene to be identified in a single spatial transcriptome data and the preset target probability distribution can be determined, but also the distribution difference between the source probability distribution of the gene to be identified in two spatial transcriptome data and the target probability distribution of the reference gene can be determined, thereby realizing the degree of change in the spatial distribution of genes detected between different spatial transcriptome data.
[0050] Step 108, determining the target transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution.
[0051] The target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space. It can be understood that the target transmission cost is used to evaluate the distribution difference between the source probability distribution and the target probability distribution.
[0052] In some embodiments, the target transmission cost may be the minimum transmission cost required to change the source probability distribution to the target probability distribution in the sample space.
[0053] Specifically, the computer device calculates the transmission cost from the source probability distribution corresponding to each gene to be identified to the same target probability distribution, and obtains the target transmission cost corresponding to each gene to be identified.
[0054] It should be noted that the target transmission cost can be recorded as L. In general, the larger L is, the greater the difference between the spatial distribution of the corresponding gene to be identified and the spatial distribution of the reference gene is.
[0055] Step 110, determining the distribution characteristics of each gene to be identified in the sample space according to the target transmission cost corresponding to each gene to be identified.
[0056] The distribution characteristics of the genes to be identified are used to characterize the specific distribution of each gene to be identified in the sample space, such as characterizing that each gene to be identified is evenly distributed in the sample space, or characterizing that each gene to be identified is unevenly distributed in the sample space.
[0057] Specifically, the computer device can determine the spatial distribution difference between each gene to be identified and the reference gene based on the target transmission cost corresponding to each gene to be identified. In the case where the spatial distribution difference indicates that the spatial distribution difference between the gene to be identified and the reference gene is significant, it can be determined that the distribution characteristics presented by the gene to be identified in the sample space are different from or even opposite to those of the reference gene. In the case where the spatial distribution difference indicates that the spatial distribution difference between the gene to be identified and the reference gene is not significant, it can be determined that the distribution characteristics presented by the gene to be identified in the sample space are basically the same as those of the reference gene.
[0058] Exemplarily, assuming that the reference gene is uniformly distributed, if the spatial distribution difference indicates that the spatial distribution difference between the gene to be identified and the reference gene is significant, then it can be determined that the gene to be identified is unevenly distributed in the sample space. If the spatial distribution difference indicates that the spatial distribution difference between the gene to be identified and the reference gene is not significant, then it can be determined that the gene to be identified is uniformly distributed in the sample space.
[0059] In some embodiments, the above method can be used to find the reference gene from each gene to be identified, such as finding the reference gene Figure 2 The genes with similar expression distribution of the marker genes shown can well obtain genes with consistent spatial distribution. For example, genes with similar distribution to gene 1 include gene 2, gene 3 and gene 4, and genes with similar distribution to gene 5 include gene 6, gene 7 and gene 8.
[0060] The above-mentioned method for identifying the spatial distribution characteristics of genes obtains spatial transcriptome data and identification requirements for each sample point used to express different genes to be identified; for each gene to be identified, the source probability distribution corresponding to the gene to be identified is determined according to each sample point corresponding to the gene to be identified; wherein the source probability distribution includes the probability distribution of each sample point corresponding to the gene to be identified in the sample space. Then, the target probability distribution is determined according to the identification requirements; wherein the target probability distribution includes the probability distribution of each reference sample point corresponding to the reference gene in the sample space. By selecting the target probability distribution that matches the identification requirements, each gene to be identified can accept different prior assumptions to meet the distribution characteristics analysis requirements of genes in different scenarios, and is not limited to whether the distribution characteristics corresponding to the identification gene belong to random distribution. Compared with the traditional method, it is more flexible. Then, the target transmission cost of the source probability distribution corresponding to each gene to be identified to the target probability distribution is determined; wherein the target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space, and the distribution difference between the source probability distribution and the target probability distribution can be evaluated by constructing the target transmission cost. In addition, according to the target transmission cost corresponding to each gene to be identified, the distribution characteristics of each gene to be identified in the sample space are determined to clarify whether there is a significant difference in the distribution of each gene to be identified and the reference gene, thereby achieving spatial characteristic gene identification with high flexibility.
[0061] In some embodiments, the spatial transcriptome data also includes the spatial coordinates of each sample point corresponding to each gene to be identified in the sample space. Step 108 specifically includes but is not limited to: for each current sample point corresponding to each gene to be identified, according to the spatial coordinates of each sample point corresponding to the gene to be identified, determining the geodesic distance of the current sample point to the remaining sample points; determining the transmission quality of each sample point corresponding to each gene to be identified to the remaining sample points; according to the geodesic distance and transmission quality of each sample point corresponding to each gene to be identified, determining the target transmission cost of the source probability distribution corresponding to each gene to be identified to the target probability distribution.
[0062] The remaining sample points are sample points other than the current sample point among the sample points corresponding to the genes to be identified, and the geodesic distance is used to represent the cost required for transmitting the current sample point to the remaining sample points.
[0063] It should be noted that since the shape of biological samples may be irregular, the geodesic distance does not directly use the straight-line distance in Euclidean space, but uses the specific biological distance.
[0064] In some embodiments, taking a ring-shaped sample as an example, the biological distance between the sample points at the leftmost and rightmost ends of the ring-shaped sample, that is, the distance that genes or substances need to travel to be transported or migrated from the actual sample, should be the length of half the ring.
[0065] Specifically, the computer device determines the geodesic distance of each current sample point corresponding to each gene to be identified, according to the spatial coordinates of each sample point corresponding to the gene to be identified, from the current sample point to the remaining sample points. The computer device determines the quality of each sample point corresponding to each gene to be identified being transmitted to the remaining sample points, and obtains the transmission quality. The computer device comprehensively considers the geodesic distance and transmission quality of each sample point corresponding to each gene to be identified, calculates the transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution, and obtains the target transmission cost. The target transmission cost is the spatial feature index established in the embodiment of the present application that is different from the traditional technology. The target transmission cost can be used to independently construct null hypotheses for different genes. At the same time, the spatial feature index can also accept different prior assumptions, such as uniform, discrete, or no assumptions, so as to meet the feature analysis requirements of different scenarios.
[0066] In some embodiments, the geodesic distance includes a geodesic matrix, and when the target transmission cost is the minimum transmission cost from the source probability distribution to the target probability distribution, it can be calculated by the following formula (1):
[0067]
[0068] stγ1=a;γ T 1=b;γ≥0
[0069] Among them, γ * Represents the transmission scheme between sample points in the sample space, that is, the minimum transmission cost, γ * is greater than or equal to 0. arg min is the value of the variable when the following formula reaches the minimum value. i and j both represent the sample points representing the corresponding genes to be identified. i,j represents the transmission quality from sample point i to sample point j, M i,j represents the cost required to transfer 1 unit from sample point i to sample point j in two-dimensional space, a and b are the source probability distribution and target probability distribution respectively.
[0070] It can be understood that the general principle of formula (1) is to solve an optimal transmission scheme from the source probability distribution to the target probability distribution, given the source probability distribution of a gene to be identified, the target probability distribution determined according to the identification requirements, and the geodesic distance and transmission quality of each sample point corresponding to the gene to be identified, so as to minimize the total cost of the transmission.
[0071] In some embodiments, the step of "for each current sample point corresponding to each gene to be identified, determining the geodesic distances of the current sample point to the remaining sample points according to the spatial coordinates of the sample points corresponding to the gene to be identified" specifically includes but is not limited to: for each current sample point corresponding to each gene to be identified, determining the neighboring points of the current sample point; calculating the Euclidean distances between the current sample point and the neighboring points of the current sample point according to the spatial coordinates of the current sample point and the neighboring points of the current sample point; recording the Euclidean distances between the current sample points and the neighboring points of the current sample point in a pre-constructed multi-order matrix to obtain an initial distance matrix; using the initial distance matrix to solve the shortest paths between the current sample point and the non-neighboring points of the current sample point, so as to record the determined shortest paths in the initial distance matrix to obtain a geodesic distance matrix.
[0072] The neighboring points of the current sample point are points adjacent to the current sample point among the remaining sample points corresponding to the gene to be identified, and the order of the multi-order matrix is determined by the number of sample points corresponding to the gene to be identified.
[0073] Specifically, the computer device solves the nearest neighbor network for each current sample point corresponding to each gene to be identified, so as to obtain the K nearest sample points adjacent to the current sample point, that is, the K neighboring points of the current sample point. The computer device calculates the Euclidean distance between the current sample point and the K neighboring points of the current sample point according to the spatial coordinates of the current sample point and the K neighboring points of the current sample point in the sample space. Then, the Euclidean distances of each current sample point and the K neighboring points of the current sample point are recorded in the pre-constructed multi-order matrix M as the initial value of the multi-order matrix M to obtain the initial distance matrix. It can be understood that in the initial distance matrix, the Euclidean distance between each sample point and its K neighboring points is not zero, while the other Euclidean distances are defaulted to 0. Subsequently, the computer device uses the initial distance matrix to solve the shortest paths between the current sample point and each non-adjacent point of the current sample point, so as to record each determined shortest path into the initial distance matrix, thereby filling all 0 values and obtaining the geodesic distance matrix M', wherein [i, j] in the geodesic distance matrix M' represents the geodesic distance from sample point i to sample point j. Through the above steps, the geodesic distances from sample points in a spatial transcriptome data to the remaining sample points can be determined, so as to be used for the subsequent calculation of the source probability distribution corresponding to each gene to be identified in the spatial transcriptome data, and the target transmission cost of the target probability distribution determined according to the identification requirements.
[0074] In some embodiments, the computer device may solve the initial distance matrix according to a multi-source shortest path algorithm to obtain the shortest paths from the current sample point to each non-adjacent point of the current sample point.
[0075] In some embodiments, when there are two copies of spatial transcription group data, the spatial transcription group data includes first spatial transcription group data and second spatial transcription group data; the sample points included in the first spatial transcription group data are first sample points; the spatial coordinates corresponding to the first sample points are the first spatial coordinates in the first sample space; the sample points included in the second spatial transcription data are second sample points; the spatial coordinates corresponding to the second sample points are the second spatial coordinates in the second sample space. The step of "for each current sample point corresponding to each gene to be identified, determining the geodesic distances of the current sample point to the remaining sample points according to the spatial coordinates of the sample points corresponding to the gene to be identified" specifically includes but is not limited to: determining the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point; for each current first sample point corresponding to each gene to be identified, determining the second sample point with the largest transmission amount to the current first sample point among the second sample points as the mapping point of the current first sample point; according to the mapping relationship between each first sample point corresponding to each gene to be identified and the mapping point, mapping each first sample point corresponding to each gene to be identified to the second sample space, and obtaining the third spatial coordinates corresponding to each first sample point corresponding to each gene to be identified in the second sample space; for each current spatial sample point among each first sample point and second sample point in the second sample space of each gene to be identified, determining the geodesic distances of the current spatial sample point to non-current spatial sample points according to the second spatial coordinates or the third spatial coordinates corresponding to the current spatial sample point.
[0076] The non-current spatial sample points refer to the first sample point and the second sample point other than the current spatial sample point.
[0077] Specifically, the computer device determines the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point, that is, the transmission cost. For each current first sample point corresponding to each gene to be identified, the computer device determines the second sample point with the largest transmission amount to the current first sample point among the second sample points as the mapping point of the current first sample point. According to the mapping relationship between each first sample point corresponding to each gene to be identified and the mapping point, the computer device maps each first sample point corresponding to each gene to be identified to the second sample space, and obtains the third space coordinates corresponding to each first sample point corresponding to each gene to be identified in the second sample space. For each current space sample point among each first sample point and second sample point in the second sample space of each gene to be identified, the computer device determines the geodesic distance of the current space sample point transmitted to the non-current space sample point according to the second space coordinate or the third space coordinate corresponding to the current space sample point. Through the above steps, each first sample point in the first spatial transcriptome data can be mapped to the sample space where each second sample point in the second spatial transcriptome data is located, thereby ensuring that the geodesic distance of each sample point can be accurately calculated based on the same sample space, so as to be used for the subsequent calculation of the target transmission cost between the two probability distributions corresponding to the two spatial transcriptome data.
[0078] Exemplarily, the first spatial transcription group data is data A, the second spatial transcription group data is data B, a certain sample point in data A may be sample point Ai, and the sample point with the largest transmission amount with sample point Ai in data B may be sample point Bj. In this case, sample point Bj may be used as the mapping of sample point Ai in data B. After obtaining the mapping relationship, the first sample space where data A is located is changed to the second sample space where data B is located according to the mapping relationship, and data A' and data B with unified sample coordinates are obtained.
[0079] It should be noted that the embodiment of the present application can better map each sample point in different spatial transcriptome data using the above method, such as Figure 3 As shown in FIG. 1 , it shows the mapping relationship between the cerebral cortex of the mouse on the day of birth and the cerebral cortex on the seventh day after birth, that is, the mapping relationship between the data points at P0 and P7. Figure 4 As shown in the figure, after mapping the sample points according to the mapping relationship, the genes whose spatial distribution changes between the P0 and P7 time points are calculated. It can be seen that the distribution of the top five genes in the calculation results changes significantly between the two time points. Among them, the first line is the true distribution of gene expression at the P0 time point, the second line is the gene expression distribution after the genes at the P0 time point are mapped to the space at the P7 time point, and the third line is the gene expression distribution at the P7 time point.
[0080] It should be noted that, since data A and data B are uniformly in the second sample space of data B, the geodesic distance matrix M' can be constructed in the second sample space. For any gene to be identified, the distribution vector Sa of the gene to be identified in data A' can be calculated and used as the corresponding source probability distribution, and the distribution vector Tb in data B can be calculated and used as the target probability distribution. After that, the target transmission cost of the distribution vector Sa and the distribution vector Tb is calculated, which is recorded as L.
[0081] In some embodiments, the step of "determining the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point" specifically includes but is not limited to: determining the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified; determining the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified; calculating the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point based on the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified, and the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified.
[0082] The first transmission cost is the transmission cost of each first sample point being transmitted to the other first sample points, and the first transmission quality is the transmission quality of each first sample point being transmitted to the other first sample points. The second transmission cost is the transmission cost of each second sample point being transmitted to the other second sample points, and the second transmission quality is the transmission quality of each second sample point being transmitted to the other second sample points.
[0083] Specifically, the computer device determines the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified. The computer device also determines the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified. The computer device calculates the transmission amount from each first sample point corresponding to each gene to be identified to each second sample point, based on the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified, and the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified. The present application maps sample points between data based on optimal transmission, which can ensure that the sample space where each sample point is located is unified, which is helpful for the subsequent construction of the geodesic distance matrix and the calculation of the target transmission cost.
[0084] In some embodiments, the transmission amount from each first sample point corresponding to each gene to be identified to each second sample point can be calculated by the following formula (2):
[0085]
[0086] Among them, i, j, k, l are sample points, C1 i,k is the transmission cost from sample point i to sample point k in data A, C2 j,l is the transmission cost from point j to point l in data B, T is the transmission matrix, representing the transmission quality. L is the total variation distance, which is a measure of the difference between two probability distributions and is defined as the sum of the absolute differences between the probabilities of all possible result pairs.
[0087] In some embodiments, step 110 specifically includes but is not limited to: for each gene to be identified, performing a statistical test on the target transmission cost corresponding to the gene to be identified to determine the statistical significance of the gene to be identified; and determining the distribution characteristics corresponding to each gene to be identified in the sample space based on the statistical significance of each gene to be identified.
[0088] Among them, the distribution characteristics are used to characterize the degree of difference between the corresponding genes to be identified and the reference genes in the sample space. Statistical significance refers to the risk level of rejecting the null hypothesis when the null hypothesis is true. It can be understood that the calculation of statistical significance is to avoid the influence of the distribution difference of the genes to be identified on the calculation and ensure the accuracy of the calculation results.
[0089] Specifically, in order to provide the statistical significance of the target transmission cost and eliminate the differences in potential prior distributions between different genes to be identified, the computer device can also perform a statistical test on the target transmission cost corresponding to each gene to be identified to determine the statistical significance of the gene to be identified. The computer device determines the distribution characteristics corresponding to each gene to be identified in the sample space according to the statistical significance of each gene to be identified.
[0090] In some embodiments, the step of "for each gene to be identified, performing a statistical test on the target transmission cost corresponding to the gene to be identified to determine the statistical significance of the gene to be identified" specifically includes but is not limited to: for each gene to be identified, reordering the source probability distribution corresponding to the gene to be identified multiple times to obtain multiple random probability distributions after reordering; determining the statistical significance of the gene to be identified based on the ranking relationship between the transmission costs from the multiple random probability distributions to the target probability distribution and the target transmission costs corresponding to the gene to be identified.
[0091] Specifically, the computer device can use the following permutation test method to perform statistical verification on the target transmission cost of the gene to be identified: for each current gene to be identified, the source probability distribution corresponding to the current gene to be identified is reordered multiple times, that is, the source probability distribution is shuffled multiple times to obtain multiple random probability distributions after reordering. The computer device sorts the transmission costs of the multiple random probability distributions to the target probability distribution and the target transmission cost corresponding to the current gene to be identified from small to large or from large to small, and determines the specific sorting position of the target transmission cost corresponding to the current gene to be identified, so as to obtain the statistical significance of the current gene to be identified according to the specific sorting position.
[0092] Exemplarily, the source probability distribution S is shuffled to obtain the corresponding random probability distribution S' under the gene to be identified. Next, the transmission cost L' of the random probability distribution S' and the target probability distribution T is calculated. Repeat the above process, for example, repeat it 1000 times by default, to form a zero distribution of the transmission cost. Afterwards, perform a single-ended test on the previously calculated target transmission cost L, such as a right-side check, to obtain a statistically significant p-value. It should be noted that if the statistically significant p-value during the calculation process is already greater than the first threshold, such as 0.2, the calculation is terminated early.
[0093] In some embodiments, the difference multiple of the target transmission cost L can also be calculated based on the mean of the zero distribution of the transmission cost. In addition, the above-mentioned process of constructing the zero distribution of the transmission cost is run on all genes to be identified to determine the statistically significant p-value corresponding to each gene to be identified. Afterwards, the genes to be identified with a statistically significant p-value less than the second threshold, such as less than 0.05, are taken and sorted according to the difference multiple. If the reference gene has a uniform distribution characteristic in the sample space, the screened gene can be considered as a gene with an uneven distribution characteristic in space; if the reference gene is determined from another spatial transcriptome data, then the screened gene can be considered as a gene that has undergone significant spatial changes in the two spatial transcriptome data.
[0094] In some embodiments, the method for identifying the spatial distribution characteristics of genes of the present application further includes, but is not limited to, the following steps:
[0095] (1) Acquisition of spatial transcriptome data and identification needs.
[0096] (2) For each gene to be identified in the spatial transcriptome data, the source probability distribution corresponding to the gene to be identified is determined according to each sample point corresponding to the gene to be identified.
[0097] (3) Determine the target probability distribution according to the identification requirements. In the case where the target probability distribution is determined based on a preset reference gene, perform step (4). In the case where the target probability distribution is determined based on a reference gene in another spatial transcriptome data, perform steps (5) and (6).
[0098] (4) For each current sample point corresponding to each gene to be identified, determine the neighboring points of the current sample point. According to the spatial coordinates of the current sample point and the neighboring points of the current sample point, calculate the Euclidean distances between the current sample point and the neighboring points of the current sample point. Record the Euclidean distances between the current sample points and the neighboring points of the current sample point in a pre-constructed multi-order matrix to obtain an initial distance matrix. Use the initial distance matrix to solve the shortest paths between the current sample point and the non-neighboring points of the current sample point, so as to record the determined shortest paths in the initial distance matrix to obtain a geodesic distance matrix. Then, execute step (7).
[0099] (5) Determine the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified; determine the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified; calculate the transmission amount from each first sample point corresponding to each gene to be identified to each second sample point based on the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified, and the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified.
[0100] (6) For each current first sample point corresponding to each gene to be identified, the second sample point with the largest transmission amount to the current first sample point among the second sample points is determined as the mapping point of the current first sample point; according to the mapping relationship between the first sample points corresponding to each gene to be identified and the mapping point, the first sample points corresponding to each gene to be identified are mapped to the second sample space to obtain the third space coordinates corresponding to each first sample point corresponding to each gene to be identified in the second sample space; for each current space sample point among the first sample points and the second sample points of each gene to be identified in the second sample space, the geodesic distance of the current space sample point to the non-current space sample point is determined according to the second space coordinate or the third space coordinate corresponding to the current space sample point.
[0101] (7) Determine the transmission quality of each sample point corresponding to each gene to be identified to the remaining sample points.
[0102] (8) According to the geodesic distance matrix and transmission quality of each sample point corresponding to each gene to be identified, the target transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution is determined.
[0103] (9) For each gene to be identified, the source probability distribution corresponding to the gene to be identified is reordered multiple times to obtain multiple random probability distributions after reordering.
[0104] (10) Determine the statistical significance of the gene to be identified based on the ranking relationship between the transmission costs from multiple random probability distributions to the target probability distribution and the target transmission costs corresponding to the gene to be identified.
[0105] (11) According to the statistical significance of each gene to be identified, the distribution characteristics corresponding to each gene to be identified in the sample space are determined.
[0106] It should be understood that, although the steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order restriction on the execution of these steps, 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 may 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.
[0107] Based on the same inventive concept, the present application embodiment also provides a device for identifying the spatial distribution characteristics of genes. 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 embodiment of the device for identifying the spatial distribution characteristics of one or more genes provided below can refer to the limitations of the method for identifying the spatial distribution characteristics of genes above, and will not be repeated here.
[0108] like Figure 5 As shown, the embodiment of the present application provides a device for identifying the spatial distribution characteristics of genes, including: a data determination module 502, a probability distribution determination module 504, a transmission cost calculation module 506 and a distribution characteristic determination module 508, wherein:
[0109] The data determination module 502 is used to obtain spatial transcriptome data and identification requirements; the spatial transcriptome data includes sample points for expressing different genes to be identified;
[0110] The probability distribution determination module 504 is used to determine the source probability distribution corresponding to each gene to be identified according to each sample point corresponding to the gene to be identified; the source probability distribution includes the probability distribution of each sample point corresponding to the gene to be identified in the sample space; determine the target probability distribution according to the identification requirements; the target probability distribution includes the probability distribution of each reference sample point corresponding to the reference gene in the sample space;
[0111] The transmission cost calculation module 506 is used to determine the target transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution; the target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space;
[0112] The distribution feature determination module 508 is used to determine the distribution feature corresponding to each gene to be identified in the sample space according to the target transmission cost corresponding to each gene to be identified.
[0113] The above-mentioned method for identifying the spatial distribution characteristics of genes obtains spatial transcriptome data and identification requirements for each sample point used to express different genes to be identified; for each gene to be identified, the source probability distribution corresponding to the gene to be identified is determined according to each sample point corresponding to the gene to be identified; wherein the source probability distribution includes the probability distribution of each sample point corresponding to the gene to be identified in the sample space. Then, the target probability distribution is determined according to the identification requirements; wherein the target probability distribution includes the probability distribution of each reference sample point corresponding to the reference gene in the sample space. By selecting the target probability distribution that matches the identification requirements, each gene to be identified can accept different prior assumptions to meet the distribution characteristics analysis requirements of genes in different scenarios, and is not limited to whether the distribution characteristics corresponding to the identification gene belong to random distribution. Compared with the traditional method, it is more flexible. Then, the target transmission cost of the source probability distribution corresponding to each gene to be identified to the target probability distribution is determined; wherein the target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space, and the distribution difference between the source probability distribution and the target probability distribution can be evaluated by constructing the target transmission cost. In addition, according to the target transmission cost corresponding to each gene to be identified, the distribution characteristics of each gene to be identified in the sample space are determined to clarify whether there is a significant difference in the distribution of each gene to be identified and the reference gene, thereby achieving spatial characteristic gene identification with high flexibility.
[0114] In some embodiments, the spatial transcriptome data also includes the spatial coordinates of each sample point corresponding to each gene to be identified. The transmission cost calculation module 506 is used to determine the geodesic distance of the current sample point to the remaining sample points according to the spatial coordinates of each sample point corresponding to the gene to be identified for each current sample point corresponding to each gene to be identified; the remaining sample points are the sample points other than the current sample point among the sample points corresponding to the gene to be identified; the geodesic distance is used to characterize the cost required for the current sample point to be transmitted to the remaining sample points; determine the transmission quality of each sample point corresponding to each gene to be identified to be transmitted to the remaining sample points; determine the target transmission cost of the source probability distribution corresponding to each gene to be identified to the target probability distribution according to the geodesic distance and transmission quality of each sample point corresponding to each gene to be identified.
[0115] In some embodiments, the geodesic distance includes a geodesic distance matrix. The transmission cost calculation module 506 is also used to determine the neighboring points of the current sample point for each current sample point corresponding to each gene to be identified; the neighboring points of the current sample point are points adjacent to the current sample point among the remaining sample points corresponding to the gene to be identified; according to the spatial coordinates of the current sample point and the neighboring points of the current sample point, calculate the Euclidean distance between the current sample point and the neighboring points of the current sample point; record the Euclidean distances between the current sample points and the neighboring points of the current sample point in a pre-constructed multi-order matrix to obtain an initial distance matrix; the order of the multi-order matrix is determined by the number of sample points corresponding to the gene to be identified; use the initial distance matrix to solve the shortest paths between the current sample point and the non-neighboring points of the current sample point, so as to record the determined shortest paths in the initial distance matrix to obtain a geodesic distance matrix.
[0116] In some embodiments, the spatial transcription group data includes first spatial transcription group data and second spatial transcription group data; the sample points included in the first spatial transcription group data are first sample points; the spatial coordinates corresponding to the first sample points are the first spatial coordinates in the first sample space; the sample points included in the second spatial transcription data are second sample points; the spatial coordinates corresponding to the second sample points are the second spatial coordinates in the second sample space. The transmission cost calculation module 506 is also used to determine the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point; for each current first sample point corresponding to each gene to be identified, the second sample point with the largest transmission amount to the current first sample point among the second sample points is determined as the mapping point of the current first sample point; according to the mapping relationship between each first sample point corresponding to each gene to be identified and the mapping point, each first sample point corresponding to each gene to be identified is mapped to the second sample space to obtain the third space coordinates corresponding to each first sample point corresponding to each gene to be identified in the second sample space; for each current space sample point among each first sample point and second sample point of each gene to be identified in the second sample space, the geodesic distance of the current space sample point to the non-current space sample point is determined according to the second space coordinate or the third space coordinate corresponding to the current space sample point.
[0117] In some embodiments, the transmission cost calculation module 506 is also used to determine the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified; the first transmission cost is the transmission cost of each first sample point transmitted to the remaining first sample points; the first transmission quality is the transmission quality of each first sample point transmitted to the remaining first sample points; determine the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified; the second transmission cost is the transmission cost of each second sample point transmitted to the remaining second sample points; the second transmission quality is the transmission quality of each second sample point transmitted to the remaining second sample points; according to the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified, and the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified, calculate the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point.
[0118] In some embodiments, the distribution feature determination module 508 is also used to perform a statistical test on the target transmission cost corresponding to each gene to be identified, so as to determine the statistical significance of the gene to be identified; based on the statistical significance of each gene to be identified, determine the distribution feature corresponding to each gene to be identified in the sample space; the distribution feature is used to characterize the degree of difference between the corresponding gene to be identified and the reference gene in the sample space.
[0119] In some embodiments, the distribution feature determination module 508 is also used to reorder the source probability distribution corresponding to the current gene to be identified multiple times for each current gene to be identified, so as to obtain multiple random probability distributions after reordering; according to the transmission costs from the multiple random probability distributions to the target probability distribution, and the ranking relationship between the target transmission costs corresponding to the current gene to be identified, the statistical significance of the current gene to be identified is determined.
[0120] Each module in the above-mentioned gene spatial distribution feature identification device 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 a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0121] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Wherein, 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. Wherein, 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 data related to the spatial distribution feature identification of genes. 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, the steps in the above-mentioned method for identifying the spatial distribution features of genes are implemented.
[0122] In some embodiments, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Wherein, the processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. Wherein, 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 by WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, the steps in the above-mentioned method for identifying the spatial distribution characteristics of genes are realized. 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; the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0123] Those skilled in the art will understand that Figure 6 or Figure 7 The 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.
[0124] In some embodiments, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps in the above method embodiments are implemented.
[0125] In some embodiments, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0126] In some embodiments, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0127] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0128] Those of ordinary skill 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 the present 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.
[0129] 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.
[0130] 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 construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications 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 identifying the spatial distribution characteristics of a gene, characterized in that: include: Acquisition of spatial transcriptome data and identification needs; The spatial transcriptome data includes sample points for expressing different genes to be identified; For each gene to be identified, determining the source probability distribution corresponding to the gene to be identified according to each sample point corresponding to the gene to be identified; the source probability distribution includes the probability distribution of each sample point corresponding to the gene to be identified in the sample space; Determine a target probability distribution according to the identification requirement; the target probability distribution includes a probability distribution of each reference sample point corresponding to the reference gene in the sample space; Determine the target transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution; the target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space; According to the target transmission costs respectively corresponding to the genes to be identified, the distribution characteristics corresponding to the genes to be identified in the sample space are determined.
2. The method according to claim 1, characterized in that The spatial transcriptome data also includes the spatial coordinates of each sample point corresponding to each gene to be identified; The step of determining the target transmission cost from the source probability distribution corresponding to each of the genes to be identified to the target probability distribution includes: For each current sample point corresponding to each gene to be identified, determine the geodesic distance of the current sample point to the remaining sample points according to the spatial coordinates of the sample points corresponding to the gene to be identified; the remaining sample points are sample points other than the current sample point among the sample points corresponding to the gene to be identified; the geodesic distance is used to characterize the cost required to transmit the current sample point to the remaining sample points; Determine the transmission quality of each sample point corresponding to each gene to be identified to the remaining sample points; According to the geodesic distance and transmission quality of each sample point corresponding to each gene to be identified, the target transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution is determined.
3. The method according to claim 2, characterized in that The geodesic distance comprises a geodesic distance matrix; The method of determining, for each current sample point corresponding to each gene to be identified, the geodesic distances of the current sample point to the remaining sample points according to the spatial coordinates of the sample points corresponding to the gene to be identified, includes: For each current sample point corresponding to each gene to be identified, determine each neighboring point of the current sample point; each neighboring point of the current sample point is a point adjacent to the current sample point among the remaining sample points corresponding to the gene to be identified; According to the spatial coordinates of the current sample point and each neighboring point of the current sample point, the Euclidean distance between the current sample point and each neighboring point of the current sample point is calculated; The Euclidean distances between each current sample point and each neighboring point of the current sample point are recorded in a pre-constructed multi-order matrix to obtain an initial distance matrix; the order of the multi-order matrix is determined by the number of sample points corresponding to the gene to be identified; The initial distance matrix is used to solve the shortest paths from the current sample point to each non-adjacent point of the current sample point, so as to record each determined shortest path into the initial distance matrix to obtain the geodesic distance matrix.
4. The method according to claim 2, characterized in that: The spatial transcription group data includes first spatial transcription group data and second spatial transcription group data; each sample point included in the first spatial transcription group data is each first sample point; the spatial coordinates corresponding to each first sample point are first spatial coordinates in the first sample space; each sample point included in the second spatial transcription data is each second sample point; the spatial coordinates corresponding to each second sample point are second spatial coordinates in the second sample space; The method of determining, for each current sample point corresponding to each gene to be identified, the geodesic distances of the current sample point to the remaining sample points according to the spatial coordinates of the sample points corresponding to the gene to be identified, includes: Determine the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point; For each current first sample point corresponding to each gene to be identified, determine the second sample point with the largest transmission amount with the current first sample point among the second sample points as the mapping point of the current first sample point; According to the mapping relationship between each first sample point corresponding to each gene to be identified and the mapping point, each first sample point corresponding to each gene to be identified is mapped to the second sample space to obtain the third space coordinates corresponding to each first sample point corresponding to each gene to be identified in the second sample space; For each current space sample point among the first sample points and the second sample points of each gene to be identified in the second sample space, the geodesic distance of the current space sample point transmitted to the non-current space sample point is determined according to the second space coordinates or the third space coordinates respectively corresponding to the current space sample point.
5. The method according to claim 4, characterized in that The determining the transmission amount of each first sample point corresponding to each gene to be identified to each second sample point includes: Determine a first transmission cost and a first transmission quality of each first sample point corresponding to each gene to be identified; the first transmission cost is the transmission cost of each first sample point being transmitted to the remaining first sample points; the first transmission quality is the transmission quality of each first sample point being transmitted to the remaining first sample points; Determine the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified; the second transmission cost is the transmission cost of each second sample point being transmitted to the remaining second sample points; the second transmission quality is the transmission quality of each second sample point being transmitted to the remaining second sample points; According to the first transmission cost and the first transmission quality of each first sample point corresponding to each gene to be identified, and the second transmission cost and the second transmission quality of each second sample point corresponding to each gene to be identified, the transmission amount from each first sample point corresponding to each gene to be identified to each second sample point is calculated.
6. The method according to any one of claims 1 to 5, characterized in that: Determining the distribution characteristics of each gene to be identified in the sample space according to the target transmission costs respectively corresponding to each gene to be identified includes: For each gene to be identified, a statistical test is performed on the target transmission cost corresponding to the gene to be identified to determine the statistical significance of the gene to be identified; According to the statistical significance of each gene to be identified, the distribution characteristics corresponding to each gene to be identified in the sample space are determined; the distribution characteristics are used to characterize the degree of difference between the corresponding gene to be identified and the reference gene in the sample space.
7. The method according to claim 6, characterized in that The method of performing a statistical test on the target transmission cost corresponding to each gene to be identified to determine the statistical significance of the gene to be identified includes: For each gene to be identified, the source probability distribution corresponding to the gene to be identified is reordered multiple times to obtain multiple random probability distributions after reordering; The statistical significance of the gene to be identified is determined according to the ranking relationship between the transmission costs from the multiple random probability distributions to the target probability distribution and the target transmission costs corresponding to the gene to be identified.
8. A device for identifying the spatial distribution characteristics of genes, characterized in that: include: Data determination module, used to obtain spatial transcriptome data and identify requirements; The spatial transcriptome data includes sample points for expressing different genes to be identified; A probability distribution determination module is used to determine, for each gene to be identified, a source probability distribution corresponding to the gene to be identified according to each sample point corresponding to the gene to be identified; the source probability distribution includes the probability distribution of each sample point corresponding to the gene to be identified in the sample space; determine a target probability distribution according to the identification requirement; the target probability distribution includes the probability distribution of each reference sample point corresponding to the reference gene in the sample space; A transmission cost calculation module is used to determine the target transmission cost from the source probability distribution corresponding to each gene to be identified to the target probability distribution; the target transmission cost is the transmission cost required to change the source probability distribution to the target probability distribution in the sample space; The distribution feature determination module is used to determine the distribution features corresponding to each of the genes to be identified in the sample space according to the target transmission costs respectively corresponding to each of the genes to be identified.
9. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. 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 7 are implemented.
