Registration method and apparatus for spatio-temporal transcriptome slices, electronic device, and storage medium
By calculating the deformation field between slices and performing coordinate registration, the problem of unregistered slice shape deformation in the prior art is solved, the registration accuracy of space-time transcriptome slices is improved, and the true reduction of slice shape is achieved.
Patent Information
- Application Number
- PCT/CN2023/120768
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-24
- Filing Date
- 2023-09-22
- Publication Date
- 2024-11-28
AI Technical Summary
The existing spatial transcriptome experimental registration methods only perform rigid registration, and fail to effectively deal with deformation of slice shapes, resulting in insufficient accuracy of registration results.
By obtaining the index vector of the spot with the largest probability transfer value in the probability transfer matrix of the target slice on adjacent slices, compute the deformation field, and register the slice coordinates using these variable values to restore the true shape of the slice.
It improves the accuracy of spatial-temporal transcriptome section registration, ensures the shape reduction of multiple sections in the organism, and enhances the reliability of registration results.
Smart Images

Figure CN2023120768_28112024_PF_FP_ABST
Abstract
Description
Method and device for registration of spatiotemporal transcriptome slices, electronic device, and storage medium
[0001] Cross-references to related art
[0002] This application is based on PCT patent application number PCT / CN2023 / 096109 and application date May 24, 2023, and claims priority of the PCT patent application. The entire contents of the PCT patent application are incorporated into this application by reference. Technical Field
[0003] The present disclosure relates to the field of data processing technology, and in particular to a method and device for registering spatiotemporal transcriptome slices, an electronic device, and a storage medium. Background Art
[0004] Probabilistic Alignment of Spatial Transcriptomics Experiments (PASTE) is an algorithm that aligns the sites (also called spots) of spatiotemporal expression data from adjacent or similar slices. Spots can represent cells or expression detection areas of similar size to cells, which are artificially divided on the spatiotemporal chip sites with a width of n sites multiplied by the height of n sites.
[0005] The PASTE algorithm calculates and implements rigid registration based on a probabilistic transfer matrix. However, the PASTE algorithm only performs rigid registration and does not perform shape registration.
[0006] Summary of the Invention
[0007] This disclosure provides a method, apparatus, electronic device, and storage medium for registering spatiotemporal transcriptome slices. Its primary purpose is to restore the true in vivo shapes of multiple slices by registering the deformation of spatiotemporal transcriptome slices, further improving the accuracy of the registration results.
[0008] According to a first aspect of the present disclosure, a method for registering spatiotemporal transcriptome slices is provided, comprising:
[0009] Obtain the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices for each target spot in the target slice; each slice contains at least one type of expression matrix, each expression matrix contains the site spots of multiple spatiotemporal expression data, and each slice contains at least one type of spot;
[0010] Based on the probability transfer matrix, rigidly register the target slice to obtain a registered target slice;
[0011] Calculate the deformation field of the registered target slice on the adjacent slice according to the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot;
[0012] The change values of the coordinates are correspondingly found in the deformation fields of two adjacent slices, and the coordinates of each spot of the target slice are aligned using the change values.
[0013] In some embodiments, the adjacent slice comprises a left-adjacent first slice;
[0014] For each target spot in the target slice, the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices includes:
[0015] Obtain a first probability transmission matrix, where the first probability transmission matrix is a probability transmission matrix calculated for the first slice and the target slice, wherein each spot in the target slice corresponds to a column in the second probability transmission matrix, and each spot in the first slice corresponds to a row in the first probability transmission matrix;
[0016] The row where the element with the largest probability transfer value is located is searched in the first probability transfer matrix, and the row index information of the row where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value.
[0017] In some embodiments, the adjacent slice comprises a right adjacent second slice;
[0018] For each target spot in the target slice, the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices includes:
[0019] Obtain a second probability transmission matrix, where the second probability transmission matrix is a probability transmission matrix calculated for the target slice and the second slice, wherein each spot in the second slice corresponds to a column on the third probability transmission matrix, and each spot in the target slice corresponds to a row on the second probability transmission matrix;
[0020] The column where the element with the largest probability transfer value is located is searched in the second probability transfer matrix, and the column index information of the column where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value.
[0021] In some embodiments, the adjacent slices include a left-adjacent third slice and a right-adjacent fourth slice;
[0022] For each target spot in the target slice, the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices includes:
[0023] Obtain a third probability transmission matrix, where the third probability transmission matrix is a probability transmission matrix calculated based on the third slice and the target slice, wherein each spot in the target slice corresponds to a column in the second probability transmission matrix, and each spot in the third slice corresponds to a row in the third probability transmission matrix;
[0024] Searching the row where the element with the largest probability transfer value is located in the third probability transfer matrix, and determining the row index information of the row where the element with the largest probability transfer value is located as the index vector of the spot with the largest probability transfer value;
[0025] Obtain a fourth probability transmission matrix, where the fourth probability transmission matrix is a probability transmission matrix calculated for the target slice and the fourth slice, wherein each spot in the fourth slice corresponds to a column in the fourth probability transmission matrix, and each spot in the target slice corresponds to a row in the fourth probability transmission matrix;
[0026] Searching the column of the element with the largest probability transfer value in the fourth probability transfer matrix, and determining the column index information of the column of the element with the largest probability transfer value as the index vector of the spot with the largest probability transfer value. In some embodiments, calculating the deformation field of the registered target slice on the adjacent slice based on the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot includes:
[0027] Searching for the coordinates of the spot point corresponding to the target slice on the adjacent slice from a preset coordinate matrix according to the index vector; wherein the first column of the preset coordinate matrix corresponds to the horizontal coordinate of the index vector, the second column corresponds to the vertical coordinate of the index vector, and each row represents a spot;
[0028] The deformation field on the adjacent slices is calculated based on the spot point coordinates.
[0029] In some embodiments, before respectively finding the change values of the coordinates in the deformation fields of two adjacent slices, the method further includes:
[0030] Calling a preset filtering function to smooth the deformation field of the target slice to obtain a filtered deformation field;
[0031] The step of respectively finding the change values of the coordinates in the deformation fields of two adjacent slices includes:
[0032] The change values of the coordinates are correspondingly found in the filtered deformation fields of two adjacent slices.
[0033] In some embodiments, after obtaining a first probability transmission matrix corresponding to spots of the same type in the target slice, the method further includes:
[0034] Searching for a target element value in the first probability transmission matrix whose element value is less than a preset threshold;
[0035] Set all target element values to 0.
[0036] In some embodiments, before obtaining the index vector of the spot with the largest probability transfer value in the probability transfer matrix corresponding to each target spot on the target slice on adjacent slices, the method further includes:
[0037] Obtain two adjacent slices, each slice contains at least one type of expression matrix, each expression matrix contains multiple spots of spatiotemporal expression data, and each slice contains at least one type of spot;
[0038] Determine the weights corresponding to the same type of spots in each slice, where spots of the same type are assigned the same weight;
[0039] According to the weight corresponding to each type of spot and the preset regularization coefficient, the first probability transfer matrix is calculated respectively to obtain the registration score of each spot in the expression matrix corresponding to each category on the two slices.
[0040] In some embodiments, before acquiring two adjacent slices, the method further includes:
[0041] Remove the spots that are not shared by two adjacent slices.
[0042] According to a second aspect of the present disclosure, a device for registering spatiotemporal transcriptome slices is provided, comprising:
[0043] The first acquisition unit is used to obtain the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices for each target spot in the target slice; each slice contains at least one type of expression matrix, each expression matrix contains site spots of multiple spatiotemporal group expression data, and each slice contains at least one type of spot;
[0044] A second acquisition unit is configured to acquire, for each target spot of the target slice, an index vector of a spot with a maximum probability transfer value in a second probability transfer matrix corresponding to each adjacent slice;
[0045] a first registration unit, configured to perform rigid registration on the target slice based on the first probability transfer matrix and the second probability transfer matrix to obtain a registered target slice;
[0046] A first calculation unit is configured to calculate a deformation field of the registered target slice on the adjacent slice according to the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot;
[0047] A first search unit, configured to search for corresponding change values of the coordinates in the deformation fields of two adjacent slices;
[0048] The second registration unit is configured to register the coordinates of each spot of the target slice using the change value.
[0049] In some embodiments, the adjacent slice comprises a left-adjacent first slice;
[0050] The second acquiring unit is further configured to:
[0051] Obtain a first probability transmission matrix, where the first probability transmission matrix is a probability transmission matrix calculated for the first slice and the target slice, wherein each spot in the target slice corresponds to a column in the second probability transmission matrix, and each spot in the first slice corresponds to a row in the first probability transmission matrix;
[0052] The row where the element with the largest probability transfer value is located is searched in the first probability transfer matrix, and the row index information of the row where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value.
[0053] In some embodiments, the adjacent slice comprises a right adjacent second slice;
[0054] The second acquiring unit is further configured to:
[0055] Obtain a second probability transmission matrix, where the second probability transmission matrix is a probability transmission matrix calculated for the target slice and the second slice, wherein each spot in the second slice corresponds to a column on the third probability transmission matrix, and each spot in the target slice corresponds to a row on the second probability transmission matrix;
[0056] The column where the element with the largest probability transfer value is located is searched in the second probability transfer matrix, and the column index information of the column where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value.
[0057] In some embodiments, the adjacent slices include a left-adjacent third slice and a right-adjacent fourth slice;
[0058] The second acquiring unit is further configured to:
[0059] Obtain a third probability transmission matrix, where the third probability transmission matrix is a probability transmission matrix calculated based on the third slice and the target slice, wherein each spot in the target slice corresponds to a column in the second probability transmission matrix, and each spot in the third slice corresponds to a row in the third probability transmission matrix;
[0060] Searching the row where the element with the largest probability transfer value is located in the third probability transfer matrix, and determining the row index information of the row where the element with the largest probability transfer value is located as the index vector of the spot with the largest probability transfer value;
[0061] Obtain a fourth probability transmission matrix, where the fourth probability transmission matrix is a probability transmission matrix calculated for the target slice and the fourth slice, wherein each spot in the fourth slice corresponds to a column in the fourth probability transmission matrix, and each spot in the target slice corresponds to a row in the fourth probability transmission matrix;
[0062] In the fourth probability transfer matrix, the column where the element with the largest probability transfer value is located is searched, and the column index information of the column where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value. In some embodiments, the calculation unit is further configured to:
[0063] Searching, according to the index vector, the coordinates of the spot points corresponding to the target slice after registration on the adjacent slice from a preset coordinate matrix; wherein the first column of the preset coordinate matrix corresponds to the abscissa of the index vector, the second column corresponds to the ordinate of the index vector, and each row represents a spot;
[0064] The deformation field on the adjacent slices is calculated based on the spot point coordinates.
[0065] In some embodiments, the apparatus further comprises:
[0066] a processing unit, configured to call a preset filtering function to smooth the deformation field of the target slice before the first search unit finds the change value of the coordinate in the deformation fields of two adjacent slices, to obtain a filtered deformation field;
[0067] The first search unit is further configured to respectively search for the change value of the coordinate in the filtered deformation fields of two adjacent slices.
[0068] In some embodiments, the apparatus further comprises:
[0069] A second search unit is configured to search for a target element value whose element value in the first probability transmission matrix is less than a preset threshold after the first acquisition unit acquires the first probability transmission matrix corresponding to the spot of the same type in the target slice;
[0070] A configuration unit is used to configure all target element values to 0.
[0071] In some embodiments, the apparatus further comprises:
[0072] The third acquisition unit is used to obtain two adjacent slices before obtaining the index vector of the spot with the largest probability transfer value in the probability transfer matrix corresponding to each target spot in the target slice and the adjacent slices, each slice including at least one type of expression matrix, each expression matrix including site spots of multiple spatiotemporal group expression data, and each slice including at least one type of spot;
[0073] A determination unit is used to determine the weights corresponding to the spots of the same type in each slice, wherein the spots of the same type are assigned the same weight;
[0074] The calculation unit is used to calculate the first probability transfer matrix according to the weight corresponding to each type of spot and the preset regularization coefficient, and obtain the registration score of each spot in the expression matrix corresponding to each category on the two slices.
[0075] In some embodiments, the apparatus further comprises:
[0076] The removal unit is configured to remove spots that are not common to the two adjacent slices before the third acquisition unit acquires the two adjacent slices.
[0077] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0078] at least one processor; and
[0079] a memory communicatively connected to the at least one processor; wherein,
[0080] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0081] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.
[0082] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.
[0083] The present disclosure provides a method, device, electronic device, and storage medium for registering spatiotemporal transcriptome slices, obtaining a first probability transfer matrix corresponding to spots of the same type in a target slice, each slice comprising at least one type of expression matrix, each expression matrix comprising a plurality of site spots of spatiotemporal group expression data, and each slice comprising at least one type of spot, obtaining the index vector of the spot with the largest probability transfer value in the second probability transfer matrix corresponding to each target spot in the target slice, respectively, on the adjacent slices, according to the spot point coordinates on the adjacent slices corresponding to the index vector, and the coordinates of the target spot, based on the probability transfer matrix, rigidly registering the target slice to obtain the registered target slice, calculating the deformation field of the registered target slice on the adjacent slice, and finding the corresponding change value of the coordinate in the deformation field of the two adjacent slices, and using the change value to register the coordinates of each spot in the target slice. After rigid registration of the target slice, the deformation of the slice is registered to restore the true shape of the multiple slices in the organism, further improving the accuracy of the registration result.
[0084] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0086] FIG1 is a schematic diagram of a process for registering spatiotemporal transcriptome slices according to an embodiment of the present disclosure;
[0087] FIG2 is a schematic diagram of deformation caused by force provided by an embodiment of the present disclosure;
[0088] FIG3 is a schematic diagram of a deformation field after filtering provided by an embodiment of the present application;
[0089] FIG4 is a schematic diagram of a flow chart of a spatiotemporal transcriptome slice registration method provided by an embodiment of the present disclosure;
[0090] FIG5 is a schematic diagram of a fruit fly larva before and after registration provided in an embodiment of the present application;
[0091] FIG6 is a schematic diagram showing changes in the area occupied by all cells before registration is performed, according to an embodiment of the present application;
[0092] FIG7 is a schematic diagram showing changes in the area occupied by all cells before registration is performed according to an embodiment of the present application;
[0093] FIG8 is a schematic diagram showing a comparison between the embodiment of the present application and the related art;
[0094] FIG9 is a schematic structural diagram of a spatiotemporal transcriptome slice registration apparatus provided by an embodiment of the present disclosure;
[0095] FIG10 is a schematic structural diagram of another spatiotemporal transcriptome slice registration apparatus provided by an embodiment of the present disclosure;
[0096] FIG11 is a schematic block diagram of an example electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0097] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0098] The following describes the registration method, device, electronic device, and storage medium for spatiotemporal transcriptome slices according to embodiments of the present disclosure with reference to the accompanying drawings.
[0099] FIG1 is a schematic flow chart of a spatiotemporal transcriptome slice registration method provided in an embodiment of the present disclosure.
[0100] As shown in Figure 1, the method includes the following steps:
[0101] Step 101: Obtain, for each target spot in the target slice, the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices.
[0102] Each slice contains at least one type of expression matrix, each expression matrix contains multiple spots of spatiotemporal expression data, and each slice contains at least one type of spot.
[0103] The probability transfer matrix is calculated between the target slice and adjacent slices in the order of the slices, for example, between the first and second slices, then between the second and third slices, and so on. The slice currently being calculated is the target slice. The probability transfer matrix stores the expression similarity of each spot between the target slice and the previous adjacent slice, or, for example, the first probability transfer matrix stores the expression similarity of each spot between the target slice and the next adjacent slice.
[0104] For each target slice, find the spot with the largest probability transfer value on the corresponding probability transfer matrix of the adjacent slices of the target slice.
[0105] In the embodiment of the present application, adjacent slices include but are not limited to the previous slice and the next slice of the target slice, and can be the two adjacent slices closest to the target slice: for example, when applied to the registration task of adjacent or similar spatiotemporal transcriptome slices, if the slice cutting order is S1, S2, S3, then S2 is the previous slice and the next slice of the target slice, S1 and S3 respectively.
[0106] As another embodiment of the present application, if the target slice is at the last position and there is no subsequent slice, then the adjacent slice is the previous slice, so only the spot point corresponding to the previous slice (i.e., S1) is calculated; if it is at the first position and the target slice has no previous slice, then only the spot point corresponding to the subsequent slice (i.e., S3) is calculated.
[0107] In practical applications, taking the adjacent slices including the previous slice and the next slice as an example, N is the number of spots on the target slice, N pre is the number of spots in the previous slice, N next The number of spots in the next slice; The probability transfer matrix calculated for the previous slice and the target slice; The probability transfer matrix calculated for the target slice and the subsequent slice.
[0108] calculate A vector describing the indices of the corresponding spots in the previous slice of the target slice;
[0109] Computation I next εZ N , is a vector describing the index of each corresponding spot of the target slice on the next slice;
[0110] In practical applications, a certain percentage of the maximum probability value (not limited to a fixed percentage value) can be used as a threshold, etc. In addition to the threshold method, other methods can also be used, such as clustering the spots paired with each spot represented in the probability transfer matrix result based on the coordinates, retaining the class with a large number of spots, and removing the class with a small number of spots, etc. Specifically, the embodiments of the present application are not limited to this.
[0111] Step 102: Perform rigid registration on the target slice based on the probability transfer matrix to obtain a registered target slice.
[0112] Based on the probability transfer matrix obtained in the above steps, rigid registration is performed using the Procrustes Analysis method. Specifically, for several slices arranged in sequence, the center of the target slice is first aligned with the center of the previous slice, and then the angle of the target slice is rotated according to the following formula to align the target slice with the previous slice.
[0113] where π is the probability transmission matrix of the second output, are all the coordinates of the target slice, are all the coordinates of the previous slice.
[0114] The above completes the rigid registration of the target slice to the previous slice. Then, the next slice is registered to the registered target slice, and so on, until all slices are traversed.
[0115] It should be noted that the above example is described using the target slice and the previous slice as examples. It should be clear that this description is only for illustration and not for limitation.
[0116] Step 103: Calculate the deformation field of the registered target slice on the adjacent slice according to the spot coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot.
[0117] The deformation field of the target slice on the adjacent slices is calculated by the coordinates of the spot points corresponding to the target slice on the adjacent slices and the coordinates of the spot points on the target slice.
[0118] To describe the process in mathematical form, we define: X is the coordinate of all points on the target slice, where the first column stores the x coordinate, the second column stores the y coordinate, and each row represents a spot, the order and M (pre) mid-column direction, and M (next) The order of spots in the corresponding row direction is consistent; define X (pre)The coordinates of all points on the previous piece, where the first column stores the x coordinate, the second column stores the y coordinate, and each row represents a spot, the order is the same as M (pre) The order of spots corresponding to the middle row direction is consistent; define X (next) The coordinates of all points on the latter piece, where the first column stores the x coordinate, the second column stores the y coordinate, and each row represents a spot, the order is the same as M (next) The order of spots corresponding to the column directions is consistent.
[0119] psize is the farthest horizontal and vertical distance between two points corresponding to the same pixel on the deformation field; this value can be close to the average distance between two points on the slice.
[0120] Step 104 : Find the corresponding change values of the coordinates in the deformation fields of two adjacent slices, and use the change values to align the coordinates of each spot in the target slice.
[0121] Based on the coordinates of each spot in each slice, the corresponding change values of the coordinates are found in the deformation field before and after, and the average value of the change values before and after is applied to the coordinates of each spot in the target slice.
[0122] The present disclosure provides a registration method for spatiotemporal transcriptome slices, which obtains a first probability transfer matrix corresponding to spots of the same type in a target slice, wherein each slice contains at least one type of expression matrix, and each expression matrix contains a plurality of site spots of spatiotemporal group expression data. Each slice contains at least one type of spot, and obtains the index vector of the spot with the largest probability transfer value in the second probability transfer matrix corresponding to each target spot on the adjacent slice. According to the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot, the deformation field of the registered target slice on the adjacent slice is calculated, and the change value of the coordinate is found in the deformation field of the two adjacent slices respectively, and the coordinates of each spot of the target slice are registered using the change value. By registering the deformation of the slices, the true shape of multiple slices in the organism is restored, and the accuracy of the registration result is further improved.
[0123] In Example 1, when the adjacent slices include a left-adjacent first slice, obtaining the index vector of the spot with the largest probability transfer value for each target spot in the target slice in the corresponding probability transfer matrix on each adjacent slice includes: obtaining a first probability transfer matrix, where the first probability transfer matrix is calculated for the first slice and the target slice, wherein each spot in the target slice corresponds to a column in the second probability transfer matrix, and each spot in the first slice corresponds to a row in the first probability transfer matrix; searching the first probability transfer matrix for the row containing the element with the largest probability transfer value, and determining the row index information of the row containing the element with the largest probability transfer value as the index vector of the spot with the largest probability transfer value.
[0124] Based on the above example, when finding the corresponding spot on the first slice (S1) for each spot on the target slice S2, we first obtain the first probability transfer matrix M12 output by S1 and S2; each spot on S2 corresponds to a column on M12. Each column corresponds to a number of elements, and the row with the element with the largest value corresponds to the spot on S1 with the largest probability transfer value in the first probability transfer matrix. This row is determined as the index vector of the spot with the largest probability transfer value.
[0125] In practical applications, taking the adjacent slices including the first slice as an example, N is the number of spots on the target slice, N pre is the number of spots in the first slice, The first probability transfer matrix calculated for the first slice and the target slice; Calculate I pre εZ N , is a vector describing the index of each corresponding spot on the first slice of the target slice;
[0126] Example 2, the adjacent slices include the second slice adjacent to the right; the obtaining of each target spot of the target slice, and the index vector of the spot with the largest probability transfer value in the corresponding probability transmission matrix on the adjacent slices includes: obtaining the second probability transmission matrix, the second probability transmission matrix is the probability transmission matrix calculated for the target slice and the second slice, wherein each spot of the second slice corresponds to a column on the third probability transmission matrix, and each spot of the target slice corresponds to a row on the second probability transmission matrix, searching the column where the element with the largest probability transfer value is located in the second probability transmission matrix, and determining the column label information of the column where the element with the largest probability transfer value is located as the index vector of the spot with the largest probability transfer value.
[0127] In the above example, to find the corresponding spot on the second slice (S3) for each spot on the target slice S2, we first obtain the second probability transfer matrix M23 output by S2 and S3. Each spot on S2 corresponds to a row in M23. Each row corresponds to a number of elements, and the column with the largest element value corresponds to the spot on S3 with the largest probability transfer value in the second probability transfer matrix. This is determined as the index vector of the spot with the largest probability transfer value.
[0128] In practical applications, taking the adjacent slice containing the second slice as an example, N is the number of spots on the target slice, N next is the number of spots in the second slice; A second probability transfer matrix is calculated for the target slice and the second slice.
[0129] Computation I next εZ N , is a vector describing the index of each corresponding spot on the second slice of the target slice:
[0130] Example 3, the adjacent slices include a third slice adjacent to the left and a fourth slice adjacent to the right; the obtaining of each target spot of the target slice, and the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices respectively include: obtaining a third probability transfer matrix, the third probability transfer matrix being a probability transfer matrix calculated for the third slice and the target slice, wherein each spot of the target slice corresponds to a column on the second probability transmission matrix, and each spot of the third slice corresponds to a row on the third probability transmission matrix; searching the row where the element with the largest probability transfer value is located in the third probability transmission matrix, And determine the row label information of the row where the element with the largest probability transfer value is located as the index vector of the spot with the largest probability transfer value; obtain the fourth probability transmission matrix, which is the probability transmission matrix calculated by the target slice and the fourth slice, wherein each spot of the fourth slice corresponds to a column on the fourth probability transmission matrix, and each spot of the target slice corresponds to a row on the fourth probability transmission matrix; find the column where the element with the largest probability transfer value is located in the fourth probability transmission matrix, and determine the column label information of the column where the element with the largest probability transfer value is located as the index vector of the spot with the largest probability transfer value.
[0131] This implementation process is a combination of Example 1 and Example 2. For details, please refer to the detailed description of Example 1 and Example 2. The embodiments of this application will not be described in detail here.
[0132] As an implementable method of an embodiment of the present application, when calculating the deformation field of the registered target slice on the adjacent slice based on the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot in step 103, the following method can be adopted but not limited to: searching the spot point coordinates corresponding to the target slice on the adjacent slice from a preset coordinate matrix based on the index vector; wherein the first column in the preset coordinate matrix corresponds to the horizontal coordinate of the index vector, the second column corresponds to the vertical coordinate of the index vector, and each row represents a spot; and calculating the deformation field on the adjacent slice based on the spot point coordinates.
[0133] Based on the above example, the adjacent slices still include the third slice on the left (the previous slice) and the fourth slice on the right (the next slice). Definition: X is the coordinate of all points on the target slice, where the first column stores the x coordinate and the second column stores the y coordinate. Each row represents a spot, and the order is the same as M. (pre) mid-column direction, and M (next) The order of spots in the corresponding row direction is consistent; define X (pre) The coordinates of all points on the previous piece, where the first column stores the x coordinate, the second column stores the y coordinate, and each row represents a spot, the order is the same as M (pre) The order of spots corresponding to the middle row direction is consistent; define X (next) The coordinates of all points on the latter piece, where the first column stores the x coordinate, the second column stores the y coordinate, and each row represents a spot, the order is the same as M (next) The order of spots corresponding to the middle column direction is consistent, and psize is the farthest horizontal and vertical distances between two points of the same pixel on the corresponding deformation field; this value only needs to be close to the average distance between two points on the slice.
[0134] Calculate the deformation field ΔX on the previous slice (pre) εR N×2 , and the deformation field ΔX on the latter slice (next) εR N×2 The following calculation method is used:
[0135] In the preset coordinate matrix, the first column stores the x coordinate, the second column stores the y coordinate, and each row represents a spot. The order is the same as M. (pre) The order of spots corresponding to the middle column direction is consistent;
[0136] Calculate X pixel εR N×2, each row represents a spot, the first column is the i index (row position) of the deformation field corresponding to the spot, and the second column is the j index (column position) of the deformation field corresponding to the spot:
[0137] Calculate the height H and width W of the elastic field:
[0138] Network nodes for computing elastic fields n grids =H×W. For example, using the grid node calculation method, f meshgrid Calculate the mesh node: mesh = f meshgrid ([0:H,0:W]), note meshεZ 2×H×W ; and adopt format conversion method f flatten and fconcatenate (convert the format of the tensor to mesh trans =fconcatenate((fexpanddims(f flatten (mesh 0,:,: ),axis=1), fexpand_dims(f flatten (mesh 1,:,: ),axis=1)),axis=1)
[0139] When calculating the entire deformation field, you can use, but are not limited to, interpolation methods, and finterp_grid to get the entire deformation field:
[0140] In addition to the above-mentioned implementation methods, interpolation methods may also include linear interpolation, cubic interpolation, B-Spline interpolation, TPS interpolation, and the like. Specifically, the embodiments of the present application do not limit this.
[0141] In practical applications, the deformation field calculated above, as shown in Figure 2, exhibits sudden changes in deformation values or significant gradient variations at some locations. While the deformation of a slice due to force should follow a smooth pattern, it actually reflects errors in the output deformation field, leading to inaccurate downstream registration results. This variation primarily stems from errors in the calculated probability transfer matrix, which in turn is caused by upstream data quality, which is unaffected by this method, as well as errors in the method itself.
[0142] Therefore, in order to reduce the negative impact of such changes on the downstream alignment results, before respectively finding the change values of the coordinates in the deformation fields of two adjacent slices, a preset filtering function is called to smooth the deformation field of the target slice to obtain a filtered deformation field; and the change values of the coordinates are respectively found in the filtered deformation fields of two adjacent slices.
[0143] In practical applications, the preset filter function can adopt but is not limited to Gaussian filtering to smooth the deformation field to achieve the effect of noise reduction. For example, FIG3 shows a deformation field after filtering provided by an embodiment of the present application.
[0144] Specifically, the deformation field is filtered and smoothed to achieve the effect of noise reduction. Using the Gaussian filter method fgaussian_filter, for each slice, four filtered deformation fields are calculated: F (x_pre) =fgaussian_filter(F (x_pre) ) F (y_pre) =fgaussian_filter(F (y_pre) ) F (x_next) =fgaussian_filter(F (x_next) ) F (y_next) =fgaussian_filter(F (y_next) )
[0145] In practical applications, in addition to the Gaussian filtering smoothing method, the smoothing method may also adopt mean filtering, median filtering and other methods, which are not limited in the specific embodiments of the present application.
[0146] After filtering, the filtered deformation field is applied to the coordinates of each spot in each slice. Specifically, based on the coordinates of each spot in each slice, the coordinate change values in the filtered deformation field before and after the filter are found, and the average of the before and after changes is applied to the coordinates.
[0147] Based on the calculated X (pixel) , and the final output F (x_pre) ,F (y_pre) ,F (x_next) ,F (y_next) , calculate ΔX (pre_final) εR N×2 , ΔX (next_final) εR N×2 :
[0148] It should be noted that the above example is based on the case where the target slice has a previous slice and a next slice. If there is no previous slice, only ΔX is calculated. (next_final) ; If there is no subsequent slice, only ΔX is calculated (pre_final) ; The calculation method remains unchanged.
[0149] Applying the above results to the coordinates, we get the reconstructed coordinates. The specific formula is as follows (taking the target slice as an example where there is a previous slice and a next slice):
[0150] If the target slice does not have a previous slice, the calculation formula is as follows: X=X+ΔX (next_final)
[0151] If the target slice does not have a subsequent slice, the calculation formula is as follows: X=X+ΔX (pre_final)
[0152] In practice, some non-zero elements in the first probability transfer matrix represent spot registration relationships that don't correspond to the two closest spots across the slice. Instead, they represent a smaller probability relationship derived from the optimal transfer algorithm. Using all values in the first probability transfer matrix for subsequent rigid registration results in poor registration accuracy.
[0153] In order to solve the above problem, an embodiment of the present application sets the target element values in the original probability transfer matrix whose element values are less than a preset threshold to 0, obtains a first probability transfer matrix, and divides each value in the first probability transfer matrix by the sum of all elements of the matrix.
[0154] The preset threshold is calculated as follows: thresh = min(pi[pi>0]) + (max(pi) – min(pi[pi>0])) × perc.
[0155] For example, the corresponding perc. value is 0.2. In fact, perc. can also take other values 0-1 (note that it cannot be equal to 1, otherwise all anchors will be filtered out).
[0156] The present application also provides another spatiotemporal transcriptome slice registration method, as shown in FIG4 , the method comprising:
[0157] Step 201: remove the unique spots in two adjacent slices.
[0158] In the embodiment of the present application, an operation of removing the unique spot types is added. The spots that appear only on one of the two pieces of expression data are removed to prevent them from becoming noise and interfering with the calculation of the probability transfer matrix.
[0159] Step 202: Obtain two adjacent slices, each slice containing at least one type of expression matrix, each expression matrix containing multiple spots of spatiotemporal expression data, and each slice containing at least one type of spot.
[0160] It should be noted that the method described in the embodiments of the present application is not applicable only to the registration between two adjacent slices. Rather, during a single registration calculation, two slices need to be registered pairwise. For example, if there are five slices that need to be registered, and the current calculation is for the registration between slice 1 and adjacent slice 2, after completing the registration of slices 1 and 2, the registration between slice 2 and adjacent slice 3 is continued, followed by the registration between slice 3 and adjacent slice 4, and finally the registration between slice 4 and adjacent slice 5. The above examples are merely for the convenience of quantitative description, and in actual applications, there is no limit on the number of slices to be registered.
[0161] It should be noted that the expression data described in the examples of this application are clustered or annotated to assist in algorithm implementation; in fact, for the needs of later analysis and presentation, the vast majority of spot-registered data are clustered or annotated. The spots can represent either cells or expression detection regions of approximately cell size, artificially demarcated on the spatiotemporal chip with a width of n sites and a height of n sites.
[0162] Step 203: Determine the weights corresponding to the spots of the same type in each slice, wherein the spots of the same type are assigned the same weight.
[0163] In an embodiment of the present application, spots of the same type have the same weight value, which depends on the similarity between the expression of the type on one slice and the expression on another slice, that is, the greater the similarity, the greater the weight value, and the smaller the similarity, the smaller the weight value.
[0164] When determining whether the types are the same, it can be determined based on the clustering result or annotation result of the expression data in step 202. The description of the clustering algorithm is not repeated in this embodiment of the present application.
[0165] In step 204, the probability transfer matrix is calculated according to the weight corresponding to each type of spot and the preset regularization coefficient, and the registration score of each spot in the expression matrix corresponding to each category on the two slices is obtained.
[0166] To improve the accuracy of the registration algorithm, the disclosed embodiments introduce an automated parameter adjustment mechanism: During the calculation, the algorithm sequentially uses different regularization coefficients with exponential variations to calculate the probability transfer matrix and obtain the corresponding accuracy score. After rotating through all the regularization coefficients specified for the calculation, the probability transfer matrix with the highest accuracy score is selected as the registration score for each spot in the expression matrix corresponding to each category on the two slices.
[0167] Step 205: Obtain the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices for each target spot in the target slice; each slice contains at least one type of expression matrix, each expression matrix contains the site spots of multiple spatiotemporal expression data, and each slice contains at least one type of spot;
[0168] Step 206: Perform rigid registration on the target slice based on the probability transfer matrix to obtain a registered target slice;
[0169] Step 207: Calculate the deformation field of the registered target slice on the adjacent slices based on the spot coordinates on the adjacent slices corresponding to the index vector and the coordinates of the target spot.
[0170] Step 208 : Find the corresponding change values of the coordinates in the deformation fields of two adjacent slices, and use the change values to align the coordinates of each spot in the target slice.
[0171] For steps 205 to 208 , please refer to the relevant detailed description in FIG. 1 , and the embodiment of the present application will not be described in detail here.
[0172] The above embodiment has described in detail the registration process of spatiotemporal transcriptome slices, which will be explained below using experimental data.
[0173] Experiment 1:
[0174] Figure 5 shows a schematic diagram of a Drosophila larva (L3) before and after registration, illustrating the change in results. Similarly, the curved arrow points from before to after the addition of the elastic component. Figure 5 shows that the slice shape has changed, improving the structural similarity before and after, and restoring the obvious deformation at the top of the third row of slices. Both examples demonstrate that the elastic component restores the true shape of multiple slices in vivo, further improving the accuracy of the registration results.
[0175] Before and after the registration method described in the examples of the present application is added, the areas of the sections occupied by different cell types in the Drosophila embryo are counted, and their changes in different sections along the z-axis are analyzed.
[0176] Figure 6 is a schematic diagram of the changes in the area occupied by all cells before registration is performed, provided in an embodiment of the present application, including epithelial (epidermis) cells, midgut (midgut) cells, foregut (foregut) cells, and the changes in the area occupied by all cells. Figure 7 is a schematic diagram of the changes in the area occupied by all cells before registration is performed, provided in an embodiment of the present application, which describes the changes in the areas occupied by the corresponding four types after the elastic part (registration) is added. It can be seen that after the elastic part is added, the area occupied by each cell type changes more smoothly along the z-axis. For fruit fly embryos, the surfaces of each organ in the organism are smooth, and the entire sample is also smooth in shape: therefore, along the direction of the cutter, the area occupied by epithelial cells, midgut cells, foregut cells, and the area occupied by the complete sample should show a smooth change trend. The results after adding the elastic part are more in line with this trend-this reflects that the accuracy of the registration results is further improved after the elastic work is added.
[0177] Experiment 2:
[0178] As shown in FIG8 , FIG8 shows a schematic diagram comparing the embodiment of the present application with the related art, comparing the registration effects of the related art PASTE, PASTE2 and the embodiment of the present application on mouse embryo data.
[0179] Figure a describes the shape of the original data of 6 consecutive slices that have not been registered; Figure b describes the data output after the PASTE method is registered; Figure c describes the data output after the PASTE2 method is registered, and Figure d describes the data output by the registration of the embodiment of the present application. It can be seen that the PASTE method has an error of more than 100° in the registration of the 5th and 6th slices, and the PASTE2 method has an error of more than 10° in the registration of the 3rd slice, which is visible to the naked eye. In comparison, the angular error of the registration of the embodiment of the present application is smaller. At the same time, neither PASTE nor PASTE2 repaired the deformation at the top of the second slice, but the method described in the embodiment of the present application repaired the deformation (as indicated by the arrow).
[0180] The registration method described in the embodiments of the present application is not limited to 3D reconstruction of the same experimental sample, but can also be used for cross-object (for example, slices are not from the same animal), cross-time (for example, slices are sampled from different developmental periods), and cross-species (for example, mouse brain slices and rabbit brain slices) registration.
[0181] Corresponding to the above-mentioned spatiotemporal transcriptome slice registration method, the present invention also provides a spatiotemporal transcriptome slice registration device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, any details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment and will not be further described in this invention.
[0182] FIG9 is a schematic diagram of the structure of a spatiotemporal transcriptome slice registration device provided by an embodiment of the present disclosure, as shown in FIG9 , comprising:
[0183] The first acquisition unit 31 is used to obtain, for each target spot in the target slice, the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices; each slice contains at least one type of expression matrix, each expression matrix contains the site spots of multiple spatiotemporal expression data, and each slice contains at least one type of spot;
[0184] The second acquisition unit 32 is configured to obtain, for each target spot of the target slice, an index vector of a spot with the largest probability transfer value in a second probability transfer matrix corresponding to each adjacent slice;
[0185] A first registration unit 33 is configured to perform rigid registration on the target slice based on the first probability transfer matrix and the second probability transfer matrix to obtain a registered target slice;
[0186] A first calculation unit 34 is configured to calculate a deformation field of the registered target slice on the adjacent slices according to the spot point coordinates on the adjacent slices corresponding to the index vector and the coordinates of the target spot;
[0187] A first search unit 35 is configured to search for corresponding change values of the coordinates in the deformation fields of two adjacent slices;
[0188] The second registration unit 36 is configured to register the coordinates of each spot of the target slice using the change value.
[0189] Furthermore, in a possible implementation of this embodiment, as shown in FIG10 , the adjacent slices include a left adjacent first slice;
[0190] The second acquiring unit 32 is further configured to:
[0191] Obtain a first probability transmission matrix, where the first probability transmission matrix is a probability transmission matrix calculated for the first slice and the target slice, wherein each spot in the target slice corresponds to a column in the second probability transmission matrix, and each spot in the first slice corresponds to a row in the first probability transmission matrix;
[0192] In the first probability transfer matrix, the row containing the element with the largest probability transfer value is searched, and the row index information of the row containing the element with the largest probability transfer value is determined as the index vector of the spot with the largest probability transfer value. Furthermore, in one possible implementation of this embodiment, as shown in FIG10 , the adjacent slice includes a second slice adjacent to the right;
[0193] The second acquiring unit 32 is further configured to:
[0194] Obtain a second probability transmission matrix, where the second probability transmission matrix is a probability transmission matrix calculated for the target slice and the second slice, wherein each spot in the second slice corresponds to a column on the third probability transmission matrix, and each spot in the target slice corresponds to a row on the second probability transmission matrix;
[0195] The column where the element with the largest probability transfer value is located is searched in the second probability transfer matrix, and the column index information of the column where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value.
[0196] Furthermore, in a possible implementation of this embodiment, as shown in FIG10 , the adjacent slices include a third slice adjacent to the left and a fourth slice adjacent to the right;
[0197] The second acquiring unit 32 is further configured to:
[0198] Obtain a third probability transmission matrix, where the third probability transmission matrix is a probability transmission matrix calculated based on the third slice and the target slice, wherein each spot in the target slice corresponds to a column in the second probability transmission matrix, and each spot in the third slice corresponds to a row in the third probability transmission matrix;
[0199] Searching the row where the element with the largest probability transfer value is located in the third probability transfer matrix, and determining the row index information of the row where the element with the largest probability transfer value is located as the index vector of the spot with the largest probability transfer value;
[0200] Obtain a fourth probability transmission matrix, where the fourth probability transmission matrix is a probability transmission matrix calculated for the target slice and the fourth slice, wherein each spot in the fourth slice corresponds to a column in the fourth probability transmission matrix, and each spot in the target slice corresponds to a row in the fourth probability transmission matrix;
[0201] In the fourth probability transfer matrix, the column where the element with the largest probability transfer value is located is searched, and the column index information of the column where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value. Furthermore, in a possible implementation of this embodiment, as shown in FIG10 , the calculation unit 33 is further configured to:
[0202] Searching for the coordinates of the spot point corresponding to the target slice on the adjacent slice from a preset coordinate matrix according to the index vector; wherein the first column of the preset coordinate matrix corresponds to the horizontal coordinate of the index vector, the second column corresponds to the vertical coordinate of the index vector, and each row represents a spot;
[0203] The deformation field on the adjacent slices is calculated based on the spot point coordinates.
[0204] Furthermore, in a possible implementation of this embodiment, as shown in FIG10 , the apparatus further includes:
[0205] a processing unit 37 configured to call a preset filtering function to smooth the deformation field of the target slice before the first search unit 35 finds the corresponding change value of the coordinate in the deformation fields of two adjacent slices, to obtain a filtered deformation field;
[0206] The first search unit 35 is further configured to search for corresponding change values of the coordinates in the filtered deformation fields of two adjacent slices.
[0207] Furthermore, in a possible implementation of this embodiment, as shown in FIG10 , the apparatus further includes:
[0208] A second search unit 38 is configured to search for a target element value whose element value in the original probability transmission matrix is less than a preset threshold after the first acquisition unit acquires the first probability transmission matrix corresponding to the spot of the same type in the target slice;
[0209] The configuration unit 39 is configured to configure all the target element values to 0 to obtain the first probability transmission matrix.
[0210] Furthermore, in a possible implementation of this embodiment, as shown in FIG10 , the apparatus further includes:
[0211] The third acquisition unit 310 is configured to acquire two adjacent slices before acquiring the index vector of the spot with the largest probability transfer value in the probability transfer matrix corresponding to each target spot in the target slice, wherein each slice includes at least one type of expression matrix, each expression matrix includes site spots of multiple spatiotemporal group expression data, and each slice includes at least one type of spot;
[0212] A determination unit 311 is configured to determine weights corresponding to spots of the same type in each slice, wherein spots of the same type are assigned the same weight;
[0213] The second calculation unit 312 is used to calculate the first probability transfer matrix according to the weight corresponding to each type of spot and the preset regularization coefficient, and obtain the alignment score of each spot in the expression matrix corresponding to each category on the two slices.
[0214] Furthermore, in a possible implementation of this embodiment, as shown in FIG10 , the apparatus further includes:
[0215] The removal unit 313 is configured to remove spots that are not common to the two adjacent slices before the third acquisition unit 310 acquires the two adjacent slices.
[0216] The present disclosure provides a registration device for spatiotemporal transcriptome slices, which obtains a first probability transfer matrix corresponding to spots of the same type in a target slice, wherein each slice contains at least one type of expression matrix, and each expression matrix contains a plurality of site spots of spatiotemporal group expression data. Each slice contains at least one type of spot, and obtains the index vector of the spot with the largest probability transfer value in the second probability transfer matrix corresponding to each target spot on the adjacent slice. According to the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot, the deformation field of the registered target slice on the adjacent slice is calculated, and the change value of the coordinate is found in the deformation field of the two adjacent slices respectively, and the coordinates of each spot of the target slice are registered using the change value. After rigid registration of the target slice, the deformation of the slice is registered to restore the true shape of the multiple slices in the organism, further improving the accuracy of the registration result.
[0217] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principles are the same, which is not limited in this embodiment.
[0218] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0219] FIG11 shows a schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0220] As shown in Figure 11, the device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 402 or a computer program loaded from a storage unit 408 into a RAM (Random Access Memory) 403. Various programs and data required for the operation of the device 400 can also be stored in the RAM 403. The computing unit 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An I / O (Input / Output) interface 405 is also connected to the bus 404.
[0221] Various components in device 400 are connected to I / O interface 405, including an input unit 406, such as a keyboard, mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409, such as a network card, modem, wireless communication transceiver, etc. Communication unit 409 allows device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0222] The computing unit 401 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various dedicated AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as the spatiotemporal transcriptome segment registration method. For example, in some embodiments, the spatiotemporal transcriptome segment registration method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to execute the aforementioned spatiotemporal transcriptome slice registration method in any other appropriate manner (eg, by means of firmware).
[0223] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System on Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0224] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0225] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0226] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0227] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0228] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.
[0229] It's important to note that artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). This encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.
[0230] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0231] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for registering spatiotemporal transcriptome slices, characterized in that: include: Get the index vector of the spot with the largest probability transfer value in the corresponding probability transfer matrix on the adjacent slices for each target spot of the target slice; each slice contains at least one type of expression matrix, each expression matrix contains the site spots of multiple spatiotemporal group expression data, and each slice contains at least one type of spot; Based on the probability transfer matrix, rigidly register the target slice to obtain a registered target slice; Calculate the deformation field of the registered target slice on the adjacent slice according to the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot; The change values of the coordinates are correspondingly found in the deformation fields of two adjacent slices, and the coordinates of each spot of the target slice are aligned using the change values.
2. The method according to claim 1, characterized in that The adjacent slices include a left adjacent first slice; The target spot of the target slice is obtained, and the index vector of the spot with the largest probability transfer value in the probability transfer matrix corresponding to the adjacent slices includes: Obtain a first probability transmission matrix, where the first probability transmission matrix is a probability transmission matrix calculated by the first slice and the target slice, wherein each spot of the target slice corresponds to a column on the second probability transmission matrix, and each spot of the first slice corresponds to a row on the first probability transmission matrix; The row where the element with the largest probability transfer value is located is searched in the first probability transfer matrix, and the row label information of the row where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value.
3. The method according to claim 1, characterized in that The adjacent slices include a right adjacent second slice; The target spot of the target slice is obtained, and the index vector of the spot with the largest probability transfer value in the probability transfer matrix corresponding to the adjacent slices includes: Obtain a second probability transmission matrix, where the second probability transmission matrix is a probability transmission matrix calculated by the target slice and the second slice, wherein each spot of the second slice corresponds to a column on the third probability transmission matrix, and each spot of the target slice corresponds to a row on the second probability transmission matrix; In the second probability transmission matrix, find the column where the element with the largest probability transfer value is located, and determine the column label information of the column where the element with the largest probability transfer value is located as the index vector of the spot with the largest probability transfer value.
4. The method according to claim 1, characterized in that: The adjacent slices include a third slice adjacent to the left and a fourth slice adjacent to the right; The target spot of the target slice is obtained, and the index vector of the spot with the largest probability transfer value in the probability transfer matrix corresponding to the adjacent slices includes: Obtain a third probability transmission matrix, where the third probability transmission matrix is a probability transmission matrix calculated by the third slice and the target slice, wherein each spot of the target slice corresponds to a column on the second probability transmission matrix, and each spot of the third slice corresponds to a row on the third probability transmission matrix; Find the row where the element with the largest probability transfer value is located in the third probability transfer matrix, and determine the row label information of the row where the element with the largest probability transfer value is located as the index vector of the spot with the largest probability transfer value; Obtain a fourth probability transmission matrix, where the fourth probability transmission matrix is a probability transmission matrix calculated by the target slice and the fourth slice, wherein each spot of the fourth slice corresponds to a column on the fourth probability transmission matrix, and each spot of the target slice corresponds to a row on the fourth probability transmission matrix; The column where the element with the largest probability transfer value is located is searched in the fourth probability transmission matrix, and the column label information of the column where the element with the largest probability transfer value is located is determined as the index vector of the spot with the largest probability transfer value.
5. The method according to claim 1, characterized in that The step of calculating the deformation field of the registered target slice on the adjacent slice according to the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot comprises: According to the index vector, searching the preset coordinate matrix for the spot point coordinates corresponding to the target slice after the registration on the adjacent slice; wherein the first column in the preset coordinate matrix corresponds to the horizontal coordinate of the index vector, the second column corresponds to the vertical coordinate of the index vector, and each row represents a spot; The deformation field on the adjacent slices is calculated based on the spot point coordinates.
6. The method according to claim 1, characterized in that Before respectively finding the change values of the coordinates in the deformation fields of two adjacent slices, the method further includes: Calling a preset filter function to smooth the deformation field of the target slice to obtain a filtered deformation field; The step of respectively finding the change values of the coordinates in the deformation fields of two adjacent slices includes: The change values of the coordinates are correspondingly found in the filtered deformation fields of two adjacent slices.
7. The method according to claim 1, characterized in that After obtaining the first probability transmission matrix corresponding to the spots of the same type in the target slice, the method further includes: Find a target element value whose element value in the first probability transmission matrix is less than a preset threshold; Set all target element values to 0.
8. The method according to any one of claims 1 to 7, characterized in that Before obtaining the index vector of the spot with the largest probability transfer value in the probability transfer matrix corresponding to each target spot of the target slice on the adjacent slices, the method further includes: Obtain two adjacent slices, each slice contains at least one type of expression matrix, each expression matrix contains multiple site spots of spatiotemporal group expression data, and each slice contains at least one type of spot; Determine the weights corresponding to the same type of spots in each slice, where the same type of spots are assigned the same weight; According to the weight corresponding to each type of spot and the preset regularization coefficient, the probability transfer matrix is calculated respectively to obtain the registration score of each spot in the expression matrix corresponding to each category on the two slices.
9. The method according to claim 8, characterized in that Before acquiring two adjacent slices, the method further includes: Remove the spots that are not common to two adjacent slices.
10. A device for registering spatiotemporal transcriptome slices, characterized in that: include: The first acquisition unit is used to obtain the index vector of the spot with the largest probability transfer value in the probability transfer matrix corresponding to each target spot in the target slice, respectively, on the adjacent slices; each slice contains at least one type of expression matrix, each expression matrix contains the site spots of multiple spatiotemporal group expression data, and each slice contains at least one type of spot; A second acquisition unit is used to obtain, for each target spot of the target slice, an index vector of a spot with a maximum probability transfer value in a second probability transfer matrix corresponding to each adjacent slice; A first registration unit, configured to perform rigid registration on the target slice based on the first probability transfer matrix and the second probability transfer matrix to obtain a registered target slice; A first calculation unit, configured to calculate a deformation field of the registered target slice on the adjacent slice according to the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot; A first search unit, used to search for the change values of the coordinates in the deformation fields of two adjacent slices respectively; The second registration unit is used to register the coordinates of each spot of the target slice using the change value.
11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the Any of the methods described above.
12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.
13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Biological tissue sequence slice microscopic image registration method and apparatus
CN107545567A
Sequential slice oriented real-time registration device and method for scanning electron microscope image
CN108038874A
Non-rigid point set registration method based on local transformation consistency
CN110874849A
Digital pathological image registration method and device
CN113269813A
Method and device for determining data similarity, electronic equipment and storage medium
CN114817363A
