WO2024239503A1 - 时空转录组切片的配准方法及装置、电子设备和存储介质 - Google Patents
时空转录组切片的配准方法及装置、电子设备和存储介质 Download PDFInfo
- Publication number
- WO2024239503A1 WO2024239503A1 PCT/CN2023/120768 CN2023120768W WO2024239503A1 WO 2024239503 A1 WO2024239503 A1 WO 2024239503A1 CN 2023120768 W CN2023120768 W CN 2023120768W WO 2024239503 A1 WO2024239503 A1 WO 2024239503A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- slice
- spot
- probability
- target
- matrix
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
- G06T7/33—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16B—BIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
- G16B20/00—ICT specially adapted for functional genomics or proteomics, e.g. genotype-phenotype associations
- G16B20/30—Detection of binding sites or motifs
Definitions
- 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.
- PSTE Probabilistic Alignment of Spatial Transcriptomics Experiments
- the PASTE algorithm calculates and implements rigid registration based on a probability transfer matrix. However, the PASTE algorithm only performs rigid registration and does not perform registration in terms of shape.
- the present disclosure provides a method, device, electronic device and storage medium for registering spatiotemporal transcriptome slices.
- the main purpose is to restore the true shapes of multiple slices in the organism by registering the deformation of spatiotemporal transcriptome slices, and further improve the accuracy of the registration results.
- a method for registering spatiotemporal transcriptome slices comprising:
- 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;
- 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.
- the adjacent slice comprises 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:
- 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.
- the adjacent slice comprises 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:
- 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;
- 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.
- the adjacent slices include a left adjacent third slice and a right adjacent fourth 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:
- 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, 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.
- the deformation field of the registered target slice on the adjacent slice is calculated based on the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot, including:
- the index vector search the coordinates of the spot points corresponding to the target slice on the adjacent slice from the preset coordinate matrix; 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.
- the method before respectively finding the change values of the coordinates in the deformation fields of two adjacent slices, the method further includes:
- the change values of the coordinates are correspondingly found in the filtered deformation fields of two adjacent slices.
- the method further includes:
- the method 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:
- each slice contains at least one type of expression matrix
- each expression matrix contains multiple site spots of spatiotemporal group expression data
- each slice contains at least one type of spot
- 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.
- the method before acquiring two adjacent slices, the method further includes:
- a device for registering spatiotemporal transcriptome slices comprising:
- 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.
- the adjacent slice comprises a left adjacent first slice
- the second acquisition unit is further used for:
- 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 adjacent slice comprises a right adjacent second slice
- the second acquisition unit is further used for:
- 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;
- 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.
- the adjacent slices include a left adjacent third slice and a right adjacent fourth slice;
- the second acquisition unit is further used for:
- 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;
- 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, 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.
- the calculation unit is further used 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.
- the apparatus further comprises:
- a processing unit configured to call a preset filtering function to smooth the deformation field of the target slice before the first searching unit respectively searches for the change value of the coordinate in the deformation fields of two adjacent slices to obtain a filtered deformation field;
- the first search unit is further used to respectively search for the change value of the coordinate in the filtered deformation fields of two adjacent slices.
- the apparatus further comprises:
- a second searching unit configured to search for a target element value whose element value in the first probability transmission matrix is less than a preset threshold value after the first acquiring unit acquires the first probability transmission matrix corresponding to the spot of the same type in the target slice;
- a configuration unit is used to configure all the target element values to 0.
- the apparatus further comprises:
- the third acquisition unit is used 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 of the target slice, respectively, each slice includes at least one type of expression matrix, each expression matrix includes a site spot of multiple spatiotemporal group expression data, and each slice includes at least one type of spot;
- a determination unit used to determine the weights corresponding to the same type of spots in each slice, wherein the same type of spots are assigned the same weight
- 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.
- the apparatus further comprises:
- the removing unit is used to remove the spots that are not common to the two adjacent slices before the third acquiring unit acquires the two adjacent slices.
- an electronic device including:
- the memory stores instructions that can be executed by the at least one processor, and 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.
- a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.
- a computer program product 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.
- the present disclosure provides a registration method, device, electronic device and storage medium for spatiotemporal transcriptome slices, obtains a first probability transfer matrix corresponding to spots of the same type in a target slice, 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, obtains 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, and performs rigid registration of the target slice based on the probability transfer matrix according to the spot point coordinates on the adjacent slice corresponding to the index vector and the coordinates of the target spot to obtain the registered target slice, calculates the deformation field of the registered target slice on the adjacent slice, finds the change value of the coordinate in the deformation field of two adjacent slices, and uses the change value to register the coordinates of each spot in the target slice. After the target slice is rigidly registered, the deformation of the slice is registered to restore the true shape of the multiple slices in the organism. The accuracy of the registration results is further improved
- FIG1 is a schematic diagram of a flow chart of a method for registering spatiotemporal transcriptome slices provided by an embodiment of the present disclosure
- FIG2 is a schematic diagram of a deformation caused by force provided by an embodiment of the present disclosure
- FIG3 is a schematic diagram of a deformation field after filtering provided by an embodiment of the present application.
- FIG4 is a schematic diagram of a flow chart of a method for registering spatiotemporal transcriptome slices provided in an embodiment of the present disclosure
- FIG5 is a schematic diagram of a fruit fly larva before and after registration provided in an embodiment of the present application.
- FIG6 is a schematic diagram of changes in the areas occupied by all cells before registration is performed, provided in an embodiment of the present application.
- FIG7 is a schematic diagram of changes in the areas occupied by all cells before registration is performed according to an embodiment of the present application.
- FIG8 is a schematic diagram showing a comparison between the embodiment of the present application and the related art.
- FIG9 is a schematic diagram of the structure of a device for registering spatiotemporal transcriptome slices provided by an embodiment of the present disclosure
- FIG10 is a schematic diagram of the structure of another spatiotemporal transcriptome slice registration device provided in an embodiment of the present disclosure.
- FIG. 11 is a schematic block diagram of an example electronic device provided by an embodiment of the present disclosure.
- FIG1 is a schematic flow chart of a method for registering spatiotemporal transcriptome slices provided in an embodiment of the present disclosure.
- the method comprises the following steps:
- Step 101 obtaining, for each target spot of the target slice, an 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 multiple spots of spatiotemporal group expression data, and each slice contains at least one type of spot.
- the probability transfer matrix between the target slice and the adjacent slices is calculated in sequence according to the order of the slices, for example, the calculation is performed between the first slice and the second slice, and then between the second slice and the third slice, and so on.
- the slice currently being calculated is the target slice.
- the probability transfer matrix stores the similarity of the expression of each spot between the target slice and the previous adjacent slice, or the first probability transfer matrix stores the similarity of the expression of each spot between the target slice and the next adjacent slice.
- adjacent slices include but are not limited to the previous slice and the next slice of the target slice, and may be 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 sequence is S1, S2, and S3, then S2 is S1 and S3 as the previous slice and the next slice of the target slice, respectively.
- 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.
- N is the number of spots on the target slice
- N pre is the number of spots on the previous slice
- N next is the number of spots on the next slice
- the probability transfer matrix calculated for the previous slice and the target slice is the probability transfer matrix calculated for the target slice and the next slice.
- a certain percentage of the maximum probability value may be taken as a threshold, etc.
- other methods may also be used, such as clustering the paired spots represented by each spot in the probability transfer matrix result according to the coordinates, retaining the class with a large number of spots, removing the class with a small number, etc.
- the embodiments of the present application do not limit this.
- Step 102 rigidly register the target slice based on the probability transfer matrix to obtain a registered target slice.
- rigid registration is performed based on the Procrustes Analysis method.
- the specific content is: for several slices arranged in sequence, first align the center of the target slice with the center of the previous slice, and then rotate the angle of the target slice according to the following formula to align the target slice with the previous slice.
- ⁇ 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.
- Step 103 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.
- 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.
- 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, each row represents a spot, and the order is consistent with the order of spots in the column direction in M (pre) and the row direction in M (next) ;
- X (pre) is defined as the coordinate of all points on the previous slice, where the first column stores the x coordinate, the second column stores the y coordinate, each row represents a spot, and the order is consistent with the order of spots in the row direction in M (pre) ;
- X (next) is defined as the coordinate of all points on the next slice, where the first column stores the x coordinate, the second column stores the y coordinate, each row represents a spot, and the order is consistent with the order of spots in the column direction in M (next) .
- 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.
- Step 104 respectively finding the change values of the coordinates in the deformation fields of two adjacent slices, and using the change values to align the coordinates of each spot of the target slice.
- the 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.
- the spatiotemporal transcriptome slice registration method obtains the corresponding spots of the same type in the target slice.
- the first probability transfer matrix each slice contains at least one type of expression matrix
- each expression matrix contains multiple site spots of spatiotemporal group expression data
- each slice contains at least one type of spot
- Example 1 When the adjacent slices include the first slice adjacent to the left, the obtaining of 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 includes: obtaining the first probability transfer matrix, the first probability transfer matrix is the probability transfer 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 transfer matrix, and each spot of the first slice corresponds to a row on the first probability transfer matrix; searching the row where the element with the largest probability transfer value is located in the first probability transfer matrix, and determining 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. .
- each spot on S2 corresponds to a column on M12.
- Each column corresponds to a number of elements, and the row with the largest element value corresponds to the spot on S1, corresponding to the first probability transfer matrix, with the largest probability transfer value, and it is determined as the index vector of the spot with the largest probability transfer value.
- N is the number of spots on the target slice
- N pre is the number of spots on the first slice.
- I pre ⁇ Z N which is a vector describing the index of each corresponding spot of the target slice on the first slice
- the adjacent slices include a right adjacent second slice; 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 respectively include: obtaining a second probability transmission matrix, the second probability transmission matrix is a 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 adding the element with the largest probability transfer value to the index vector.
- the column label information of the column is determined as the index vector of the spot with the largest probability transfer value.
- each spot on S2 corresponds to a row on M23.
- Each row corresponds to a number of elements
- the column where the element with the largest element value is located corresponds to the spot point on S3, corresponding to the second probability transfer matrix, with the largest probability transfer value, and is determined as the index vector of the spot with the largest probability transfer value.
- N is the number of spots on the target slice, and N next is the number of spots on the second slice;
- a second probability transfer matrix is calculated for the target slice and the second slice.
- 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 transmission matrix on the adjacent slices respectively include: obtaining a third probability transmission matrix, 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; 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 a fourth probability transmission matrix, wherein the fourth probability transmission matrix is the probability transmission matrix calculated for 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
- Example 1 This implementation process is a combination of Example 1 and Example 2.
- Example 2 This implementation process is a combination of Example 1 and Example 2.
- Example 1 and Example 2 For details, please refer to the detailed description of Example 1 and Example 2, and the embodiments of the present application will not be described in detail here.
- the following method when 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 in step 103, the following method may be adopted but is not limited to: searching the spot point coordinates corresponding to the target slice on the adjacent slice from a preset coordinate matrix according to the index vector; wherein the first column in the preset coordinate matrix corresponds to the horizontal coordinate of the index vector, and the second column corresponds to the vertical coordinate of the index vector. Label, each row represents a spot; the deformation field on the adjacent slices is calculated based on the spot point coordinates.
- the adjacent slices still include the third slice adjacent to the left (previous slice) and the fourth slice adjacent to the right (next slice).
- 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, each row represents a spot, and the order is consistent with the order of spots in the column direction in M (pre) and the row direction corresponding to M (next) ;
- X (pre) is defined as the coordinate of all points on the previous slice, where the first column stores the x coordinate, the second column stores the y coordinate, each row represents a spot, and the order is consistent with the order of spots in the row direction in M (pre) ;
- X (next) is defined as the coordinate of all points on the next slice, where the first column stores the x coordinate, the second column stores the y coordinate, each row represents a spot, and the order is consistent with the order of spots in the column direction in M (next)
- psize is the farthest horizontal and vertical distance between
- the first column stores the x coordinate
- the second column stores the y coordinate
- each row represents a spot
- the order is consistent with the order of the spots corresponding to the column direction in M (pre) ;
- f interp_grid When calculating the entire deformation field, you can use but are not limited to using interpolation methods, f interp_grid to get the entire deformation field:
- the interpolation method may also adopt linear interpolation, cubic interpolation, B-Spline interpolation, TPS interpolation and the like methods, which are not limited in the embodiments of the present application.
- the deformation field calculated above has sudden changes in deformation values or obvious changes in gradients in some locations.
- the deformation of the slice caused by force should change smoothly; in fact, it reflects the error of the output deformation field, so it will lead to inaccurate downstream registration results.
- This change mainly comes from the error in the calculated probability transfer matrix, which is caused by the quality of upstream data that this method cannot affect, as well as the error of the method itself.
- 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.
- the preset filter function can use but is not limited to Gaussian filtering to smooth the deformation field to achieve a noise reduction effect.
- Figure 3 is a deformation field after filtering provided by an embodiment of the present application.
- the deformation field is filtered and smoothed to achieve the effect of noise reduction.
- the smoothing method may also use mean filtering, median filtering and other methods, which are not limited in the specific embodiments of the present application.
- the filtered deformation field of the present invention is applied to the coordinates of each spot of each slice. Specifically, based on the coordinates of each spot of each slice, the change values of the coordinates are respectively found in the deformation field after filtering before and after, and the average value of the change values before and after is applied to the coordinates.
- the above example is based on the case where the target slice has a previous slice and a subsequent slice. If the previous slice does not exist, only ⁇ X (next_final) is calculated; if the subsequent slice does not exist, only ⁇ X (pre_final) is calculated; the calculation method remains unchanged.
- the positions where some elements in the first probability transfer matrix are not 0 do not correspond to the spot point registration relationship between the two spots closest to each other on the cross-slice, but are only the transport relationship with a smaller probability obtained by the optimal transport algorithm. Using all the values in the first probability transfer matrix for the subsequent rigid registration results in a low accuracy problem.
- the 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.
- perc. is 0.2.
- perc. can also take other values 0-1 (note that it cannot be equal to 1, otherwise all anchors will be filtered out).
- the present application embodiment also provides another spatiotemporal transcriptome slice registration method, as shown in FIG4 , the method comprising:
- Step 201 remove the spots that are not common to two adjacent slices.
- an operation of removing the incommon spot types is added, that is, the spots that appear only on one piece of the expression data between two pieces are removed to prevent them from becoming noise and interfering with the calculation of the probability transfer matrix.
- Step 202 obtaining two adjacent slices, each slice comprising at least one type of expression matrix, each expression matrix comprising multiple spots of spatiotemporal group expression data, and each slice comprising at least one type of spot.
- the method described in the embodiment of the present application is not only applicable to the registration between two adjacent slices, but in a registration calculation process, two slices need to be registered in pairs. For example, there are 5 slices that need to be registered.
- the current calculation is the registration between slice 1 and the adjacent slice 2.
- the registration between slice 2 and the adjacent slice 3 is continued, and then the registration between slice 3 and the adjacent slice 4 is performed, and finally the registration between slice 4 and the adjacent slice 5 is performed.
- the above examples are only for the convenience of quantitative description, and the number of slice registrations is not limited in actual applications.
- the spot can represent a cell or an expression detection area of n site width multiplied by n site height that is artificially divided on the spatiotemporal chip site and is close to the size of a cell.
- Step 203 respectively 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 weights.
- 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.
- Step 204 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.
- the embodiment of the present disclosure introduces an automatic parameter adjustment mechanism: in the calculation, the algorithm uses different regularization coefficients with exponential changes in turn, calculates the probability transfer matrix respectively, and obtains its corresponding accuracy score. After using all the regularization coefficients specified for calculation in turn, the probability transfer matrix with the highest accuracy score is selected as the registration score of each spot in the expression matrix corresponding to each category on the two slices.
- Step 205 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 on the adjacent slices; each slice contains at least one type of expression matrix, Each expression matrix contains multiple spots of spatiotemporal group expression data, and each slice contains at least one type of spot;
- Step 206 based on the probability transfer matrix, rigidly register the target slice to obtain a registered target slice;
- Step 207 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;
- Step 208 Find the change values of the coordinates in the deformation fields of two adjacent slices respectively, and use the change values to align the coordinates of each spot in the target slice.
- steps 205 to 208 please refer to the relevant detailed description of FIG. 1 , and the embodiment of the present application will not be described in detail here.
- FIG5 shows a schematic diagram of a fruit fly larva (L3) before and after registration, and the effect changes.
- the curved arrow points from before the elastic part is added to after the elastic part is added. It can be seen from FIG5 that the shape of the slice is changed, the structural similarity before and after is improved, and the obvious deformation of the top of the third column of slices is repaired.
- the areas of the sections occupied by different cell types of the Drosophila embryo are counted, and their changes on different sections along the z-axis are analyzed.
- FIG6 is a schematic diagram of the change of the area occupied by all cells before the registration is performed provided in an embodiment of the present application, including epithelial (epidermis) cells, midgut (midgut) cells, foregut (foregut) cells, and the change of the area occupied by all cells.
- FIG7 is a schematic diagram of the change of the area occupied by all cells before the registration is performed provided in an embodiment of the present application, which describes the change of the area 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.
- the surface of each organ in the organism is 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 adding the elastic work.
- FIG8 is a schematic diagram showing a comparison between the embodiment of the present application and the related art. The registration effects of PASTE, PASTE2 and the embodiments of the present application on mouse embryo data are shown.
- 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 after the registration of the embodiment of the present application.
- 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.
- the angular error of the registration of the embodiment of the present application is smaller.
- 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).
- the registration method described in the embodiments of the present application may not be limited to 3D reconstruction of the same experimental sample, but may also be cross-object (e.g., slices do not come from the same animal), cross-time (e.g., slices are sampled from different developmental periods), and cross-species (e.g., mouse brain slices and rabbit brain slices) registration.
- cross-object e.g., slices do not come from the same animal
- cross-time e.g., slices are sampled from different developmental periods
- cross-species e.g., mouse brain slices and rabbit brain slices
- the present invention also proposes a spatiotemporal transcriptome slice registration device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.
- 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:
- the first acquisition unit 31 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 includes at least one type of expression matrix, each expression matrix includes the site spots of multiple spatiotemporal group expression data, and each slice includes at least one type of spot;
- a second acquisition unit 32 is used 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;
- a first registration unit 33 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 34 is used to 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;
- a first search unit 35 used to search for the change values of the coordinates in the deformation fields of two adjacent slices respectively;
- the second registration unit 36 is used to register the coordinates of each spot of the target slice using the change value.
- the adjacent slices include The first slice adjacent to the left;
- the second acquiring unit 32 is further used for:
- 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 adjacent slices include a right adjacent second slice;
- the second acquiring unit 32 is further used for:
- 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;
- 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.
- the adjacent slices include a left adjacent third slice and a right adjacent fourth slice;
- the second acquiring unit 32 is further used for:
- 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;
- 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, 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.
- the calculation unit 33 is also used to:
- the index vector search the coordinates of the spot points corresponding to the target slice on the adjacent slice from the preset coordinate matrix; 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.
- the device further includes:
- the processing unit 37 is used to call a preset filtering function to smooth the deformation field of the target slice to obtain a filtered deformation field before the first searching unit 35 respectively searches for the change value of the coordinate in the deformation fields of two adjacent slices;
- the first search unit 35 is further configured to respectively search for the change values of the coordinates in the filtered deformation fields of two adjacent slices.
- the device further includes:
- a second searching 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 value after the first acquiring unit acquires the first probability transmission matrix corresponding to the spot of the same type in the target slice;
- the configuration unit 39 is used to configure all the target element values to 0 to obtain the first probability transmission matrix.
- the device further includes:
- the third acquisition unit 310 is used 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, respectively, each slice includes at least one type of expression matrix, each expression matrix includes a site spot of multiple spatiotemporal group expression data, and each slice includes at least one type of spot;
- a determining unit 311 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;
- 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 registration score of each spot in the expression matrix corresponding to each category on the two slices.
- the device further includes:
- the removal unit 313 is used to remove spots that are not common to the two adjacent slices before the third acquisition unit 310 acquires the two adjacent slices.
- the spatiotemporal transcriptome slice registration device obtains a first probability transmission matrix corresponding to the same type of spot in the target slice, each slice contains at least one type of expression matrix, and each expression matrix
- the site spots contain multiple spatiotemporal group expression data, and each slice contains at least one type of spot.
- the index vector of the spot with the largest probability transfer value in the corresponding second probability transfer matrix on the adjacent slices is obtained.
- the deformation field of the aligned 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 aligned using the change value.
- the deformation of the slice is aligned to restore the true shape of multiple slices in the organism, further improving the accuracy of the alignment result.
- the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
- 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.
- a ROM Read-Only Memory
- RAM Random Access Memory
- various programs and data required for the operation of the device 400 can also be stored.
- the computing unit 401, the ROM 402, and the 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.
- a number of components in the device 400 are connected to the I/O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc.
- the communication unit 409 allows the device 400 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
- the computing unit 401 may be a variety of general and/or special processing components with processing and computing capabilities. Some examples of element 401 include, but are not limited to, CPU (Central Processing Unit), GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, 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 registration method of spatiotemporal transcriptome slices.
- the registration method of spatiotemporal transcriptome slices can be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 408.
- part or all of the computer program can be loaded and/or installed on the device 400 via ROM 402 and/or communication unit 409.
- the computer program is loaded into RAM 403 and executed by the computing unit 401, one or more steps of the method described above can be performed.
- the computing unit 401 may be configured to perform the aforementioned registration method of spatiotemporal transcriptome slices in any other appropriate manner (eg, by means of firmware).
- Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Array), ASICs (Application-Specific Integrated Circuit), ASSPs (Application Specific Standard Product), SOCs (System On Chip), CPLDs (Complex Programmable Logic Device), computer hardware, firmware, software, and/or combinations thereof.
- FPGAs Field Programmable Gate Array
- ASICs Application-Specific Integrated Circuit
- ASSPs Application Specific Standard Product
- SOCs System On Chip
- CPLDs Complex Programmable Logic Device
- These various embodiments may include: being implemented in one or more computer programs that are executable and/or interpreted on a programmable system including at least one programmable processor that may be a special purpose or general purpose programmable processor that may 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.
- a programmable processor that may be a special purpose or general purpose programmable processor that may 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.
- the program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions/operations specified in the flow chart and/or block diagram to be implemented.
- the program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
- a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
- the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- the machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or apparatuses, or any suitable combination of the foregoing.
- machine-readable storage media may include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fibers, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
- 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.
- a display device e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor
- a keyboard and pointing device e.g., a mouse or trackball
- 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).
- the systems and techniques described herein may be implemented in a computing system that includes backend 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 frontend components (e.g., a user computer with a graphical user interface or a 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 backend components, middleware components, or frontend components.
- the components of the system may 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.
- a computer system may include a client and a server.
- the client and the server are generally remote from each other and usually interact through a communication network.
- the relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other.
- the server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short).
- the server may also be a server for a distributed system, or a server combined with a blockchain.
- AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing technologies; AI software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, machine learning/deep learning, big data processing technology, and knowledge graph technology.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Theoretical Computer Science (AREA)
- Proteomics, Peptides & Aminoacids (AREA)
- Evolutionary Biology (AREA)
- Genetics & Genomics (AREA)
- Molecular Biology (AREA)
- Analytical Chemistry (AREA)
- Bioinformatics & Computational Biology (AREA)
- Biotechnology (AREA)
- Biophysics (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Chemical & Material Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Image Processing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本公开公开了时空转录组切片的配准方法及装置、电子设备和存储介质,主获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量;基于概率传输矩阵,对目标切片进行刚性配准,得到配准后的目标切片;根据索引向量对应的相邻切片上的spot点坐标,及目标spot的坐标,计算配准后的目标切片在相邻切片上的形变场;在相邻两张切片的形变场中分别对应查找到坐标的变化值,并利用变化值对目标切片各spot的坐标进行配准。在对目标切片进行刚性配准之后,再通过对切片的形变进行配准,还原了多张切片在生物体内的真实形状,进一步提高了配准结果的准确性。
Description
相关技术的交叉引用
本申请基于申请号为PCT/CN2023/096109,申请日为2023年05月24日的PCT专利申请提出,并要求该PCT专利申请的优先权,该PCT专利申请的全部内容通过引用结合在本申请中。
本公开涉及数据处理技术领域,尤其涉及一种时空转录组切片的配准方法及装置、电子设备和存储介质。
空间转录组实验的概率配准(Probabilistic Alignment of Spatial Transcriptomics Experiments,PASTE),是一个对来及相邻或相近切片的时空组表达量数据的位点(也称spot),spot既可以表示细胞,也可以表示和细胞大小接近的、人工于时空芯片位点上划分的n个位点宽乘以n个位点高的表达量检测区域之间进行配准的算法。
该PASTE算法基于概率传输矩阵,计算和实现刚性配准,但是,该PASTE算法仅做了刚性配准,在形状方面并未进行配准。
发明内容
本公开提供了一种时空转录组切片的配准方法、装置、电子设备和存储介质。其主要目的在于实现通过对时空转录组切片的形变进行配准,还原了多张切片在生物体内的真实形状,进一步提高了配准结果的准确性。
根据本公开的第一方面,提供了一种时空转录组切片的配准方法,其中,包括:
获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量;每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;
基于所述概率传输矩阵,对所述目标切片进行刚性配准,得到配准后的目标切片;
根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场;
在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值,并利用所述变化值对所述目标切片各spot的坐标进行配准。
在一些实施例中,所述相邻切片包括左相邻的第一切片;
所述获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:
获取第一概率传输矩阵,所述第一概率传输矩阵为第一切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第一切片每个spot对应所述第一概率传输矩阵上的一行;
在所述第一概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量。
在一些实施例中,所述相邻切片包括右相邻的第二切片;
所述获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:
获取第二概率传输矩阵,所述第二概率传输矩阵为所述目标切片与第二切片计算得到的概率传输矩阵,其中,所述第二切片每个spot对应所述第三概率传输矩阵上的一列,所述目标切片每个spot对应所述第二概率传输矩阵上的一行;
在所述第二概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。
在一些实施例中,所述相邻切片包括左相邻的第三切片以及右相邻的第四切片;
所述获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:
获取第三概率传输矩阵,所述第三概率传输矩阵为第三切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第三切片每个spot对应所述第三概率传输矩阵上的一行;
在所述第三概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量;
获取第四概率传输矩阵,所述第四概率传输矩阵为所述目标切片与第四切片计算得到的概率传输矩阵,其中,所述第四切片每个spot对应所述第四概率传输矩阵上的一列,所述目标切片每个spot对应所述第四概率传输矩阵上的一行;
在所述第四概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。在一些实施例中,所述根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场包括:
根据所述索引向量从预设坐标矩阵中查找在所述目标切片在所述相邻切片上对应的spot点坐标;其中,所述预设坐标矩阵中第一列对应所述索引向量的横坐标,第二列对应所述索引向量的纵坐标,每行表示一个spot;
基于所述spot点坐标计算在所述相邻切片上的形变场。
在一些实施例中,在在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值之前,所述方法还包括:
调用预设滤波函数对所述目标切片的所述形变场进行平滑处理,得到滤波后的形变场;
所述在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值包括:
在相邻两张切片的所述滤波后的形变场中分别对应查找到所述坐标的变化值。
在一些实施例中,在获取目标切片中同一类型的spot对应的第一概率传输矩阵之后,所述方法还包括:
查找所述第一概率传输矩阵中元素值小于预设阈值的目标元素值;
将所有所述目标元素值配置为0。
在一些实施例中,在获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量之前,所述方法还包括:
获取两张相邻切片,每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;
分别确定每张切片中同一类型的spot对应的权重,其中,同一类型的spot分配相同的权重;
根据所述每一类型spot对应的权重及预设正则化系数,分别计算第一概率传输矩阵,得到两张切片上每一类别对应的表达量矩阵中每个spot的配准分数。
在一些实施例中,在获取两张相邻切片之前,所述方法还包括:
去掉两张相邻切片中的不共具的spot。
根据本公开的第二方面,提供了一种时空转录组切片的配准装置,包括:
第一获取单元,用于获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量;每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;
第二获取单元,用于获取所述目标切片每个目标spot,分别在相邻切片上对应的第二概率传输矩阵中,概率转移值最大的spot的索引向量;
第一配准单元,用于基于所述第一概率传输矩阵及所述第二概率传输矩阵,对所述目标切片进行刚性配准,得到配准后的目标切片;
第一计算单元,用于根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场;
第一查找单元,用于在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值;
第二配准单元,用于利用所述变化值对所述目标切片各spot的坐标进行配准。
在一些实施例中,所述相邻切片包括左相邻的第一切片;
所述第二获取单元还用于:
获取第一概率传输矩阵,所述第一概率传输矩阵为第一切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第一切片每个spot对应所述第一概率传输矩阵上的一行;
在所述第一概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率
转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量。
在一些实施例中,所述相邻切片包括右相邻的第二切片;
所述第二获取单元还用于:
获取第二概率传输矩阵,所述第二概率传输矩阵为所述目标切片与第二切片计算得到的概率传输矩阵,其中,所述第二切片每个spot对应所述第三概率传输矩阵上的一列,所述目标切片每个spot对应所述第二概率传输矩阵上的一行;
在所述第二概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。
在一些实施例中,所述相邻切片包括左相邻的第三切片以及右相邻的第四切片;
所述第二获取单元还用于:
获取第三概率传输矩阵,所述第三概率传输矩阵为第三切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第三切片每个spot对应所述第三概率传输矩阵上的一行;
在所述第三概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量;
获取第四概率传输矩阵,所述第四概率传输矩阵为所述目标切片与第四切片计算得到的概率传输矩阵,其中,所述第四切片每个spot对应所述第四概率传输矩阵上的一列,所述目标切片每个spot对应所述第四概率传输矩阵上的一行;
在所述第四概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。在一些实施例中,所述计算单元还用于:
根据所述索引向量从预设坐标矩阵中查找在所述配准后的目标切片在所述相邻切片上对应的spot点坐标;其中,所述预设坐标矩阵中第一列对应所述索引向量的横坐标,第二列对应所述索引向量的纵坐标,每行表示一个spot;
基于所述spot点坐标计算在所述相邻切片上的形变场。
在一些实施例中,所述装置还包括:
处理单元,用于在所述第一查找单元在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值之前,调用预设滤波函数对所述目标切片的所述形变场进行平滑处理,得到滤波后的形变场;
所述第一查找单元,还用于在相邻两张切片的所述滤波后的形变场中分别对应查找到所述坐标的变化值。
在一些实施例中,所述装置还包括:
第二查找单元,用于在所述第一获取单元获取目标切片中同一类型的spot对应的第一概率传输矩阵之后,查找所述第一概率传输矩阵中元素值小于预设阈值的目标元素值;
配置单元,用于将所有所述目标元素值配置为0。
在一些实施例中,所述装置还包括:
第三获取单元,用于在获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量之前,获取两张相邻切片,每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;
确定单元,用于分别确定每张切片中同一类型的spot对应的权重,其中,同一类型的spot分配相同的权重;
计算单元,用于根据所述每一类型spot对应的权重及预设正则化系数,分别计算第一概率传输矩阵,得到两张切片上每一类别对应的表达量矩阵中每个spot的配准分数。
在一些实施例中,所述装置还包括:
去除单元,用于在所述第三获取单元获取两张相邻切片之前,去掉两张相邻切片中的不共具的spot。
根据本公开的第三方面,提供了一种电子设备,包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述第一方面所述的方法。
根据本公开的第四方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行前述第一方面所述的方法。
根据本公开的第五方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现如前述第一方面所述的方法。
本公开提供的时空转录组切片的配准方法、装置、电子设备和存储介质,获取目标切片中同一类型的spot对应的第一概率传输矩阵,每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot,获取所述目标切片每个目标spot,分别在相邻切片上对应的第二概率传输矩阵中,概率转移值最大的spot的索引向量,根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,基于概率传输矩阵,对所述目标切片进行刚性配准,得到配准后的目标切片,计算所述配准后的目标切片在所述相邻切片上的形变场,在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值,并利用所述变化值对所述目标切片各spot的坐标进行配准。在对目标切片进行刚性配准之后,再通过对切片的形变进行配准,还原了多张切片在生物体内的真实形状,
进一步提高了配准结果的准确性。
应当理解,本部分所描述的内容并非旨在标识本申请的实施例的关键或重要特征,也不用于限制本申请的范围。本申请的其它特征将通过以下的说明书而变得容易理解。
附图用于更好地理解本方案,不构成对本公开的限定。其中:
图1为本公开实施例所提供的一种时空转录组切片的配准方法的流程示意图;
图2为本公开实施例所提供的一种受力导致的形变的示意图;
图3为本申请实施例提供的一种经滤波处理后的形变场示意图;
图4为本公开实施例所提供的一种时空转录组切片的配准方法的流程示意图;
图5为本申请实施例提供的一种果蝇幼虫在进行配准前后的示意图;
图6为本申请实施例提供的一种未执行配准前所有细胞占据面积的变化情况示意图;
图7为本申请实施例提供的一种执行配准前所有细胞占据面积的变化情况示意图;
图8示出了本申请实施例与相关技术的比对示意图;
图9为本公开实施例提供的一种时空转录组切片的配准装置的结构示意图;
图10为本公开实施例提供的另一种时空转录组切片的配准装置的结构示意图;
图11为本公开实施例提供的示例电子设备的示意性框图。
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
下面参考附图描述本公开实施例的时空转录组切片的配准方法、装置、电子设备和存储介质。
图1为本公开实施例所提供的一种时空转录组切片的配准方法的流程示意图。
如图1所示,该方法包含以下步骤:
步骤101,获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量。
每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot。
按照切片的顺序依次计算目标切片与相邻切片之间的概率传输矩阵,例如第一片和第二片之间进行计算,然后第二片和第三片之间进行计算……等等,当前进行计算的切片为目标切片。概率传输矩阵中存储的是目标切片与前一个相邻切片之间每个spot的表达量相似性,或者,第一概率传输矩阵中存储的是目标切片与后一个相邻切片之间每个spot的表达量相似性。
针对目标切片,找到其中每一个spot,在该目标切片的相邻切片上的对应概率转移矩阵上,概率转移值最大的spot点。
本申请实施例中,相邻切片包含但不限于目标切片的前一张切片和后一张切片,可以是与目标切片最相近的两张相邻切片:例如应用在相邻或相近的时空转录组切片的配准任务中时,如切片的切刀顺序为S1、S2、S3,那么S2作为目标切片的前一张切片和后一张切片分别为S1和S3。
作为本申请实施例的另一实施例,如果目标切片位于末位,没有后一张切片,那么相邻切片为前一张切片,因此只计算前一张切片(即S1)对应spot点;如果位于首位,目标切片没有前一张切片,那么只计算后一张切片(即S3)对应的spot点。
实际应用中,以相邻切片包含前一张切片和后一张切片为例,N为目标切片上spot的个数,Npre为前一张切片spot的个数,Nnext为后一张切片spot的个数;为前一张切片和目标切片计算得到的概率转移矩阵;为目标切片和后一张切片计算得到的概率转移矩阵。
计算为描述目标切片在前一张切片上各对应spot的索引的向量;
计算InextεZN,为描述目标切片在后一张切片上各对应spot的索引的向量;
实际应用中,可以是取最大的概率值的某个百分比(不限于某个固定的百分比数值)作为阈值等等。除了使用阈值的方法外,也可采用其他方法,如对每个spot在概率传输矩阵结果中表示的与之配对的spot依据坐标进行聚类,保留spot数量较多的类,去掉较少的类等等。具体的,本申请实施例对此不做限定。
步骤102,基于概率传输矩阵,对所述目标切片进行刚性配准,得到配准后的目标切片。
基于上述步骤获取的概率传输矩阵,基于方法Procrustes Analysis进行刚性配准。具体内容为:对按顺序排列的若干张切片,首先将目标切片和前一张切片的中心进行对齐,然后根据如下公式将目标切片的角度进行旋转,使目标切片对齐于前一张切片。
其中Π是第二输出的概率传输矩阵,是目标切片的所有坐标,是前一张切片的所有坐标。
以上完成了目标切片向前一张切片的刚性配准。然后,将后一张切片配准到配准后的目标切片上,以此类推,直到遍历所有切片。
需要说明的是,上述实例是以目标切片与前一张切片为例进行的说明,应当明确,该种说明方式仅为了示例,而并非用以限定。
步骤103,根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场。
目标切片在相邻切片上得到的形变场,由目标切片在相邻切片上对应的spot点的坐标,以及目标切片上spot点坐标,计算得到。
为用数学形式描述该过程,定义:X为目标切片上所有点的坐标,其中第一列存储x坐标,第二列存储y坐标,每行表示一个spot,顺序和M(pre)中列方向,以及M(next)对应的行方向上的spot顺序相一致;定义X(pre)为前一片上所有点的坐标,其中第一列存储x坐标,第二列存储y坐标,每行表示一个spot,顺序和M(pre)中行方向对应的spot顺序相一致;定义X(next)为后一片上所有点的坐标,其中第一列存储x坐标,第二列存储y坐标,每行表示一个spot,顺序和M(next)中列方向对应的spot顺序相一致。
psize为对应形变场上同一像素的两点的最远横、纵距离;该值和切片上两点的平均距离接近即可。
步骤104,在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值,并利用所述变化值对所述目标切片各spot的坐标进行配准。
基于每片切片各spot的坐标,在其前后形变场中,分别对应查找到坐标的变化值,并将前后变化值的平均值应用在目标切片各spot的坐标上。
本公开提供的时空转录组切片的配准方法,获取目标切片中同一类型的spot对应
的第一概率传输矩阵,每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot,获取所述目标切片每个目标spot,分别在相邻切片上对应的第二概率传输矩阵中,概率转移值最大的spot的索引向量,根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场,在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值,并利用所述变化值对所述目标切片各spot的坐标进行配准。通过对切片的形变进行配准,还原了多张切片在生物体内的真实形状,进一步提高了配准结果的准确性。
示例一,当所述相邻切片包括左相邻的第一切片,所述获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:获取第一概率传输矩阵,所述第一概率传输矩阵为第一切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第一切片每个spot对应所述第一概率传输矩阵上的一行;在所述第一概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量。。
呈由上述示例,在找目标切片S2片上每一个spot,在第一切片(S1)上对应的spot点时,首先取得S1和S2输出的第一概率转移矩阵M12;S2上的每一个spot,对应M12上的一列。每一列对应若干个元素,而元素值最大的元素所在的行,对应的是该spot在S1上,对应第一概率转移矩阵上,概率转移值最大的spot点,将其确定为概率转移值最大的spot的索引向量。
实际应用中,以相邻切片包含第一切片为例,N为目标切片上spot的个数,Npre为第一切片spot的个数,为第一切片和目标切片计算得到的第一概率转移矩阵;计算IpreεZN,为描述目标切片在第一切片上各对应spot的索引的向量;
示例二,所述相邻切片包括右相邻的第二切片;所述获取所述目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:获取第二概率传输矩阵,所述第二概率传输矩阵为所述目标切片与第二切片计算得到的概率传输矩阵,其中,所述第二切片每个spot对应所述第三概率传输矩阵上的一列,所述目标切片每个spot对应所述第二概率传输矩阵上的一行,在所述第二概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素
所在的列的列标信息,确定为概率转移值最大的spot的索引向量。
呈由上述示例,在找找目标切片S2片上每一个spot,在第二切片(S3)上对应的spot点时,首先取得S2和S3在输出的第二概率转移矩阵M23;S2上的每一个spot,对应M23上的一行。每一行对应若干个元素,而元素值最大的元素所在的列,对应的是该spot在S3上,对应第二概率转移矩阵上,概率转移值最大的spot点,确定为概率转移值最大的spot的索引向量。
实际应用中,以相邻切片包含第二切片为例,N为目标切片上spot的个数,Nnext为第二切片spot的个数;为目标切片和第二切片计算得到的第二概率转移矩阵。
计算InextεZN,为描述目标切片在第二切片上各对应spot的索引的向量:
示例三,所述相邻切片包括左相邻的第三切片以及右相邻的第四切片;所述获取所述目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:获取第三概率传输矩阵,所述第三概率传输矩阵为第三切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第三切片每个spot对应所述第三概率传输矩阵上的一行;在所述第三概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量;获取第四概率传输矩阵,所述第四概率传输矩阵为所述目标切片与第四切片计算得到的概率传输矩阵,其中,所述第四切片每个spot对应所述第四概率传输矩阵上的一列,所述目标切片每个spot对应所述第四概率传输矩阵上的一行;在所述第四概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。
该实现过程为示例一和示例二的结合,具体的,可参阅示例一和示例二的详细说明,本申请实施例在此不再进行赘述。
作为本申请实施例的一种可实现方式,在步骤103执行根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场时,可以采用但不局限于以下方式:根据所述索引向量从预设坐标矩阵中查找在所述目标切片在所述相邻切片上对应的spot点坐标;其中,所述预设坐标矩阵中第一列对应所述索引向量的横坐标,第二列对应所述索引向量的纵坐
标,每行表示一个spot;基于所述spot点坐标计算在所述相邻切片上的形变场。
呈由上述示例,依旧以相邻切片包括左相邻的第三切片(前一张切片)以及右相邻的第四切片(后一张切片)。定义:X为目标切片上所有点的坐标,其中第一列存储x坐标,第二列存储y坐标,每行表示一个spot,顺序和M(pre)中列方向,以及M(next)对应的行方向上的spot顺序相一致;定义X(pre)为前一片上所有点的坐标,其中第一列存储x坐标,第二列存储y坐标,每行表示一个spot,顺序和M(pre)中行方向对应的spot顺序相一致;定义X(next)为后一片上所有点的坐标,其中第一列存储x坐标,第二列存储y坐标,每行表示一个spot,顺序和M(next)中列方向对应的spot顺序相一致,psize为对应形变场上同一像素的两点的最远横、纵距离;该值只要和切片上两点的平均距离接近即可。
在计算在所述前一张切片上的形变场ΔX(pre)εRN×2,和在所述后一张切片上的形变场ΔX(next)εRN×2时,采用下述计算方式:
其中,在预设坐标矩阵中第一列存储x坐标,第二列存储y坐标,每行表示一个spot,顺序和M(pre)中列方向对应的spot顺序相一致;
计算XpixelεRN×2,每一行表示一个spot,第一列为该spot对应形变场的i索引(行位置),第二列对应该spot对应形变场的j索引(列位置):
计算弹性场的高H,和宽W:其中:
计算弹性场的网络节点ngrids=H×W。例如采用网格节点计算方法,fmeshgrid计算得到网格节点:mesh=fmeshgrid([0:H,0:W]),注意meshεZ2×H×W;并采用格式转换方法fflatten和fconcatenate(对该张量的格式进行转换:
meshtrans=fconcatenate((fexpanddims(fflatten(mesh0,:,:),axis=1),
fexpand_dims(fflatten(mesh1,:,:),axis=1)),axis=1)
meshtrans=fconcatenate((fexpanddims(fflatten(mesh0,:,:),axis=1),
fexpand_dims(fflatten(mesh1,:,:),axis=1)),axis=1)
计算整个形变场时,可以采用但不限于使用插值方法,finterp_grid得到整个形变场:
插值方法除了上述实现方式外还也可以采用线性插值,三次插值,B-Spline插值、TPS插值等等方法,具体的,本申请实施例不做限定。
在实际应用中,上述计算得到的形变场,如图2所示,在一些位置存在形变值突变,或梯度较为明显的变化。切片由受力导致的形变,应当平滑变化的规律;实际上体现的是输出的形变场的误差,因此它会导致下游配准结果的不准确。这种变化主要来自于计算得到的概率转移矩阵存在的误差,该误差又是由本方法无法影响的上游数据质量,以及方法本身的误差导致。
因此减少这种变化对下游配准结果带来的消极影响,在在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值之前,调用预设滤波函数对所述目标切片的所述形变场进行平滑处理,得到滤波后的形变场;在相邻两张切片的所述滤波后的形变场中分别对应查找到所述坐标的变化值。
实际应用中预设滤波函数可以采用但不局限于高斯滤波,对形变场进行平滑,达到降噪的效果。如图3为例,图3为本申请实施例提供的一种经滤波处理后的形变场。
具体的对形变场进行滤波平滑,从而达到降噪的效果。采用高斯滤波方法fgaussian_filter,对每张切片,计算得到4个滤波后的形变场:
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))
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))
实际应用中,除了高斯滤波的平滑方法。该平滑方法也可以采用均值滤波,中位数滤波等方法,具体的本申请实施例不做限定。
执行完滤波处理后,本发明滤波后的形变场,应用到每片的spot的坐标上。具体做法:基于每片切片各spot的坐标,在其前后滤波后的形变场中,分别对应查找到坐标的变化值;并将前后变化值的平均值应用在坐标上。
基于计算得到的X(pixel),以及最终输出的F(x_pre),F(y_pre),F(x_next),F(y_next),计算得
到ΔX(pre_final)εRN×2,ΔX(next_final)εRN×2:
需要说明的是,上述示例是以目标切片存在前一张切片和后一张切片为例进行的说明,若不存在前一张切片,则只计算ΔX(next_final);若不存在后一张切片,则只计算ΔX(pre_final);计算方法不变。
将上述结果应用于坐标上,就得到了重构后的坐标,具体公式如下(以目标切片存在前一张切片和后一张切片为例):
若目标切片不存在前一张切片,计算公式如下:
X=X+ΔX(next_final)
X=X+ΔX(next_final)
若目标切片不存在后一张切片,计算公式如下:
X=X+ΔX(pre_final)
X=X+ΔX(pre_final)
实际应用中,第一概率转移矩阵中有些元素不为0的位置,所表示的spot点配准关系,并不对应跨切片上距离最近的两个spot,而仅仅是最优输运算法得到的,具较小概率的输运关系。把第一概率转移矩阵上所有的值用于后面的刚性配准,使得配准结果具有准确率低的问题。
为了解决上述问题,本申请实施例将原始概率传输矩阵中元素值小于预设阈值的目标元素值统一置0,得到第一概率转移矩阵,并将第一概率转移矩阵中的每个值重新除以矩阵所有元素的和。
其中,预设阈值的计算方法如下:
thresh=min(pi[pi>0])+(max(pi)–min(pi[pi>0]))×perc.
thresh=min(pi[pi>0])+(max(pi)–min(pi[pi>0]))×perc.
举例而言,对应的perc.的值是0.2,实际上,perc.也可以取其他0-1的值(注意不能等于1,否则将滤掉全部的锚)。
本申请实施例还提供另一种时空转录组切片的配准方法,如图4所示,所述方法包括:
步骤201,去掉两张相邻切片中的不共具的spot。
本申请实施例中增加了去掉不共具的spot类型的操作。将两片表达量数据间,只在一片上出现的spot进行去除,防止其成为噪音,干扰概率传输矩阵的计算。
步骤202,获取两张相邻切片,每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot。
需要说明的是,本申请实施例所述的方法,并非是指仅适用于两张相邻切片之间的配准,而是在一次配准计算过程中,需要对两张切片进行两两配准,例如,需要进行配准计算的切片有5张,当前计算的为切片1和相邻的切片2之间的配准,在执行完切片1和切片2的配准后,继续执行切片2和相邻的切片3之间的配准,再执行切片3和相邻的切片4之间的配准,最后执行切片4和相邻的切片5之间配准。以上示例仅为便于给出的数量说明,在实际应用中对切片配准的数量不进行限定。
需要说明的是,本申请实施例所述的表达量数据具备聚类或注释结果,以辅助算法的实施;事实上,出于后期分析和展示的需要,绝大部分做spot配准的数据均具备聚类或注释结果。所述spot既可以表示细胞,也可以表示和细胞大小接近的、人工于时空芯片位点上划分的n个位点宽乘以n个位点高的表达量检测区域。
步骤203,分别确定每张切片中同一类型的spot对应的权重,其中,同一类型的spot分配相同的权重。
本申请实施例中,对于相同类型的spot具有相同的权重值,该值取决于该类型在一张切片上的表达量和在另一张切片上的表达量的相似度,即相似度约大,权重值越大,相似度越小,权重值越小。
在判定类型是否相同时,可以有步骤202中表达量数据的聚类结果或注释结果确定。有关聚类算法的说明,本申请实施例在此不再进行赘述。
步骤204,根据所述每一类型spot对应的权重及预设正则化系数,分别计算概率传输矩阵,得到两张切片上每一类别对应的表达量矩阵中每个spot的配准分数。
为提升配准算法的准确性,本公开实施例引入了自动化调参机制:在计算中,算法依次采用指数变化的不同的正则化系数,分别计算概率传输矩阵,并得到其对应的准确性分数。在轮流使用过所有规定参与计算的正则化系数后,选择准确性分数最高的概率传输矩阵,作为两张切片上每一类别对应的表达量矩阵中每个spot的配准分数。
步骤205,获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量;每张切片包含至少一种类型的表达量矩阵,
每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;
步骤206,基于所述概率传输矩阵,对所述目标切片进行刚性配准,得到配准后的目标切片;
步骤207,根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场;
步骤208,在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值,并利用所述变化值对所述目标切片各spot的坐标进行配准。
有关步骤205至步骤208,可参阅图1的相关详细说明,本申请实施例在此不再进行赘述。
上述实施例已详细说明了时空转录组切片的配准流程,以下以实验数据进行说明。
实验一:
如图5所示,图5示出了一种果蝇幼虫(L3)在进行配准前后的示意图,效果的变化。同样地,弯箭头由加入弹性部分前,指向加入弹性部分后。由图5可看出切片的形状得到改变,其前后的结构相似性得到提高,第三列切片顶部的明显形变得到修复,此两个案例均体现了弹性部分的工作还原了多张切片在生物体内的真实形状,因此进一步提高了配准结果的准确性。
在加入本申请实施例所述的配准方法前后,对果蝇胚胎不同细胞类型占据切面的面积进行统计,分析其在沿着z轴的不同切面上的变化情况。
图6为本申请实施例提供的一种未执行配准前所有细胞占据面积的变化情况示意图,包括上皮(epidermis)细胞、中肠(midgut)细胞、前肠(foregut)细胞,以及所有细胞占据面积的变化情况,图7为本申请实施例提供的一种执行配准前所有细胞占据面积的变化情况示意图,描述的是加入弹性部分(配准)之后,对应的4种类型占据面积的变化情况。可以看到,加入弹性部分之后,各细胞类型占据面积随着z轴的变化过程更加平滑。对果蝇胚胎来说,各器官在生物体内的表面是平滑的,整个样本也是平滑形状的:因此,沿着切刀方向,上皮细胞、中肠细胞、前肠细胞占据面积,以及完整样本占据面积,应当呈现平滑的变化趋势。加入弹性部分之后的结果更符合这种趋势——这体现了加入弹性工作后,配准结果的准确性被进一步提高。
实验二:
如图8所示,图8示出了本申请实施例与相关技术的比对示意图,对比了相关技
术PASTE,PASTE2以及本申请实施例在鼠胚胎数据上的配准效果。
a图描述了未经过配准的连续6张切片的原始数据的形状;b图描述的是PASTE方法配准后输出的数据;c图描述的是PASTE2方法配准后输出的数据,d图描述的是本申请实施例配准输出的数据。可以看到,PASTE方法在第5片和第6片的配准中,出现了超过100°的误差,PASTE2方法在第3片的配准中,出现了超过10°的,肉眼可见的误差,相比之下,本申请实施例配准的角度误差更小。同时,PASTE和PASTE2均没有将第二片顶部的形变进行修复,但本申请实施例所述的方法对该形变进行了修复(如箭头所指)。
本申请实施例所述的配准方法,可以不限于对同一个实验样本的3d重构,还可以是跨对象(例如切片不来自同一只动物)、跨时间(例如切片采样自不同的发育时期)、跨物种(例如鼠脑切片和兔脑切片)的配准。
与上述的时空转录组切片的配准方法相对应,本发明还提出一种时空转录组切片的配准装置。由于本发明的装置实施例与上述的方法实施例相对应,对于装置实施例中未披露的细节可参照上述的方法实施例,本发明中不再进行赘述。
图9为本公开实施例提供的一种时空转录组切片的配准装置的结构示意图,如图9所示,包括:
第一获取单元31,用于获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量;每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;
第二获取单元32,用于获取所述目标切片每个目标spot,分别在相邻切片上对应的第二概率传输矩阵中,概率转移值最大的spot的索引向量;
第一配准单元33,用于基于所述第一概率传输矩阵及所述第二概率传输矩阵,对所述目标切片进行刚性配准,得到配准后的目标切片;
第一计算单元34,用于根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场;
第一查找单元35,用于在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值;
第二配准单元36,用于利用所述变化值对所述目标切片各spot的坐标进行配准。
进一步地,在本实施例一种可能的实现方式中,如图10所示,所述相邻切片包括
左相邻的第一切片;
所述第二获取单元32还用于:
获取第一概率传输矩阵,所述第一概率传输矩阵为第一切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第一切片每个spot对应所述第一概率传输矩阵上的一行;
在所述第一概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量。进一步地,在本实施例一种可能的实现方式中,如图10所示,所述相邻切片包括右相邻的第二切片;
所述第二获取单元32还用于:
获取第二概率传输矩阵,所述第二概率传输矩阵为所述目标切片与第二切片计算得到的概率传输矩阵,其中,所述第二切片每个spot对应所述第三概率传输矩阵上的一列,所述目标切片每个spot对应所述第二概率传输矩阵上的一行;
在所述第二概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。
进一步地,在本实施例一种可能的实现方式中,如图10所示,所述相邻切片包括左相邻的第三切片以及右相邻的第四切片;
所述第二获取单元32还用于:
获取第三概率传输矩阵,所述第三概率传输矩阵为第三切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第三切片每个spot对应所述第三概率传输矩阵上的一行;
在所述第三概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量;
获取第四概率传输矩阵,所述第四概率传输矩阵为所述目标切片与第四切片计算得到的概率传输矩阵,其中,所述第四切片每个spot对应所述第四概率传输矩阵上的一列,所述目标切片每个spot对应所述第四概率传输矩阵上的一行;
在所述第四概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。进一步地,在本实施例一种可能的实现方式中,如图10所示,所述计算单元33还用于:
根据所述索引向量从预设坐标矩阵中查找在所述目标切片在所述相邻切片上对应的spot点坐标;其中,所述预设坐标矩阵中第一列对应所述索引向量的横坐标,第二列对应所述索引向量的纵坐标,每行表示一个spot;
基于所述spot点坐标计算在所述相邻切片上的形变场。
进一步地,在本实施例一种可能的实现方式中,如图10所示,所述装置还包括:
处理单元37,用于在所述第一查找单元35在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值之前,调用预设滤波函数对所述目标切片的所述形变场进行平滑处理,得到滤波后的形变场;
所述第一查找单元35,还用于在相邻两张切片的所述滤波后的形变场中分别对应查找到所述坐标的变化值。
进一步地,在本实施例一种可能的实现方式中,如图10所示,所述装置还包括:
第二查找单元38,用于在所述第一获取单元获取目标切片中同一类型的spot对应的第一概率传输矩阵之后,查找原始概率传输矩阵中元素值小于预设阈值的目标元素值;
配置单元39,用于将所有所述目标元素值配置为0,得到所述第一概率传输矩阵。
进一步地,在本实施例一种可能的实现方式中,如图10所示,所述装置还包括:
第三获取单元310,用于在获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量之前,获取两张相邻切片,每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;
确定单元311,用于分别确定每张切片中同一类型的spot对应的权重,其中,同一类型的spot分配相同的权重;
第二计算单元312,用于根据所述每一类型spot对应的权重及预设正则化系数,分别计算第一概率传输矩阵,得到两张切片上每一类别对应的表达量矩阵中每个spot的配准分数。
进一步地,在本实施例一种可能的实现方式中,如图10所示,所述装置还包括:
去除单元313,用于在所述第三获取单元310获取两张相邻切片之前,去掉两张相邻切片中的不共具的spot。
本公开提供的时空转录组切片的配准装置,获取目标切片中同一类型的spot对应的第一概率传输矩阵,每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中
包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot,获取所述目标切片每个目标spot,分别在相邻切片上对应的第二概率传输矩阵中,概率转移值最大的spot的索引向量,根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场,在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值,并利用所述变化值对所述目标切片各spot的坐标进行配准。在对目标切片进行刚性配准之后,再通过对切片的形变进行配准,还原了多张切片在生物体内的真实形状,进一步提高了配准结果的准确性。
需要说明的是,前述对方法实施例的解释说明,也适用于本实施例的装置,原理相同,本实施例中不再限定。
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。
图11示出了可以用来实施本公开的实施例的示例电子设备400的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。
如图11所示,设备400包括计算单元401,其可以根据存储在ROM(Read-Only Memory,只读存储器)402中的计算机程序或者从存储单元408加载到RAM(Random Access Memory,随机访问/存取存储器)403中的计算机程序,来执行各种适当的动作和处理。在RAM 403中,还可存储设备400操作所需的各种程序和数据。计算单元401、ROM 402以及RAM 403通过总线404彼此相连。I/O(Input/Output,输入/输出)接口405也连接至总线404。
设备400中的多个部件连接至I/O接口405,包括:输入单元406,例如键盘、鼠标等;输出单元407,例如各种类型的显示器、扬声器等;存储单元408,例如磁盘、光盘等;以及通信单元409,例如网卡、调制解调器、无线通信收发机等。通信单元409允许设备400通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。
计算单元401可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单
元401的一些示例包括但不限于CPU(Central Processing Unit,中央处理单元)、GPU(Graphic Processing Units,图形处理单元)、各种专用的AI(Artificial Intelligence,人工智能)计算芯片、各种运行机器学习模型算法的计算单元、DSP(Digital Signal Processor,数字信号处理器)、以及任何适当的处理器、控制器、微控制器等。计算单元401执行上文所描述的各个方法和处理,例如时空转录组切片的配准方法。例如,在一些实施例中,时空转录组切片的配准方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元408。在一些实施例中,计算机程序的部分或者全部可以经由ROM 402和/或通信单元409而被载入和/或安装到设备400上。当计算机程序加载到RAM 403并由计算单元401执行时,可以执行上文描述的方法的一个或多个步骤。备选地,在其他实施例中,计算单元401可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行前述时空转录组切片的配准方法。
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、FPGA(Field Programmable Gate Array,现场可编程门阵列)、ASIC(Application-Specific Integrated Circuit,专用集成电路)、ASSP(Application Specific Standard Product,专用标准产品)、SOC(System On Chip,芯片上系统的系统)、CPLD(Complex Programmable Logic Device,复杂可编程逻辑设备)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。
机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、RAM、ROM、EPROM(Electrically Programmable Read-Only-Memory,可擦除可编程只读存储器)或快闪存储器、光纤、CD-ROM(Compact Disc Read-Only Memory,便捷式紧凑盘只读存储器)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(Cathode-Ray Tube,阴极射线管)或者LCD(Liquid Crystal Display,液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:LAN(Local Area Network,局域网)、WAN(Wide Area Network,广域网)、互联网和区块链网络。
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务("Virtual Private Server",或简称"VPS")中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。
其中,需要说明的是,人工智能是研究使计算机来模拟人的某些思维过程和智能行为(如学习、推理、思考、规划等)的学科,既有硬件层面的技术也有软件层面的
技术。人工智能硬件技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理等技术;人工智能软件技术主要包括计算机视觉技术、语音识别技术、自然语言处理技术以及机器学习/深度学习、大数据处理技术、知识图谱技术等几大方向。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。
Claims (13)
- 一种时空转录组切片的配准方法,其特征在于,包括:获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量;每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;基于所述概率传输矩阵,对所述目标切片进行刚性配准,得到配准后的目标切片;根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场;在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值,并利用所述变化值对所述目标切片各spot的坐标进行配准。
- 根据权利要求1所述的方法,其特征在于,所述相邻切片包括左相邻的第一切片;所述获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:获取第一概率传输矩阵,所述第一概率传输矩阵为第一切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第一切片每个spot对应所述第一概率传输矩阵上的一行;在所述第一概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量。
- 根据权利要求1所述的方法,其特征在于,所述相邻切片包括右相邻的第二切片;所述获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:获取第二概率传输矩阵,所述第二概率传输矩阵为所述目标切片与第二切片计算得到的概率传输矩阵,其中,所述第二切片每个spot对应所述第三概率传输矩阵上的一列,所述目标切片每个spot对应所述第二概率传输矩阵上的一行;在所述第二概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。
- 根据权利要求1所述的方法,其特征在于,所述相邻切片包括左相 邻的第三切片以及右相邻的第四切片;所述获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量包括:获取第三概率传输矩阵,所述第三概率传输矩阵为第三切片与所述目标切片计算得到的概率传输矩阵,其中,所述目标切片每个spot对应所述第二概率传输矩阵上的一列,所述第三切片每个spot对应所述第三概率传输矩阵上的一行;在所述第三概率传输矩阵中查找概率转移值最大的元素所在的行,并将所述概率转移值最大的元素所在的行的行标信息,确定为概率转移值最大的spot的索引向量;获取第四概率传输矩阵,所述第四概率传输矩阵为所述目标切片与第四切片计算得到的概率传输矩阵,其中,所述第四切片每个spot对应所述第四概率传输矩阵上的一列,所述目标切片每个spot对应所述第四概率传输矩阵上的一行;在所述第四概率传输矩阵中查找概率转移值最大的元素所在的列,并将所述概率转移值最大的元素所在的列的列标信息,确定为概率转移值最大的spot的索引向量。
- 根据权利要求1所述的方法,其特征在于,所述根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场包括:根据所述索引向量从预设坐标矩阵中查找在所述配准后的目标切片在所述相邻切片上对应的spot点坐标;其中,所述预设坐标矩阵中第一列对应所述索引向量的横坐标,第二列对应所述索引向量的纵坐标,每行表示一个spot;基于所述spot点坐标计算在所述相邻切片上的形变场。
- 根据权利要求1所述的方法,其特征在于,在在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值之前,所述方法还包括:调用预设滤波函数对所述目标切片的所述形变场进行平滑处理,得到滤波后的形变场;所述在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值包括:在相邻两张切片的所述滤波后的形变场中分别对应查找到所述坐标的变化值。
- 根据权利要求1所述的方法,其特征在于,在获取目标切片中同一类型的spot对应的第一概率传输矩阵之后,所述方法还包括:查找所述第一概率传输矩阵中元素值小于预设阈值的目标元素值;将所有所述目标元素值配置为0。
- 根据权利要求1-7中任一项所述的方法,其特征在于,在获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量之前,所述方法还包括:获取两张相邻切片,每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;分别确定每张切片中同一类型的spot对应的权重,其中,同一类型的spot分配相同的权重;根据所述每一类型spot对应的权重及预设正则化系数,分别计算概率传输矩阵,得到两张切片上每一类别对应的表达量矩阵中每个spot的配准分数。
- 根据权利要求8所述的方法,其特征在于,在获取两张相邻切片之前,所述方法还包括:去掉两张相邻切片中的不共具的spot。
- 一种时空转录组切片的配准装置,其特征在于,包括:第一获取单元,用于获取目标切片每个目标spot,分别在相邻切片上对应的概率传输矩阵中,概率转移值最大的spot的索引向量;每张切片包含至少一种类型的表达量矩阵,每个表达量矩阵中包含多个时空组表达量数据的位点spot,每张切片上包含至少一个类型的spot;第二获取单元,用于获取所述目标切片每个目标spot,分别在相邻切片上对应的第二概率传输矩阵中,概率转移值最大的spot的索引向量;第一配准单元,用于基于所述第一概率传输矩阵及所述第二概率传输矩阵,对所述目标切片进行刚性配准,得到配准后的目标切片;第一计算单元,用于根据所述索引向量对应的相邻切片上的spot点坐标,及所述目标spot的坐标,计算所述配准后的目标切片在所述相邻切片上的形变场;第一查找单元,用于在相邻两张切片的所述形变场中分别对应查找到所述坐标的变化值;第二配准单元,用于利用所述变化值对所述目标切片各spot的坐标进行配准。
- 一种电子设备,其特征在于,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-9中 任一项所述的方法。
- 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行根据权利要求1-9中任一项所述的方法。
- 一种计算机程序产品,其特征在于,包括计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-9中任一项所述的方法。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202380098639.5A CN121263842A (zh) | 2023-05-24 | 2023-09-22 | 时空转录组切片的配准方法及装置、电子设备和存储介质 |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2023/096109 WO2024239284A1 (zh) | 2023-05-24 | 2023-05-24 | 时空转录组切片的配准方法及装置 |
| CNPCT/CN2023/096109 | 2023-05-24 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024239503A1 true WO2024239503A1 (zh) | 2024-11-28 |
Family
ID=93588788
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/096109 Ceased WO2024239284A1 (zh) | 2023-05-24 | 2023-05-24 | 时空转录组切片的配准方法及装置 |
| PCT/CN2023/120768 Ceased WO2024239503A1 (zh) | 2023-05-24 | 2023-09-22 | 时空转录组切片的配准方法及装置、电子设备和存储介质 |
Family Applications Before (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/096109 Ceased WO2024239284A1 (zh) | 2023-05-24 | 2023-05-24 | 时空转录组切片的配准方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (2) | CN120826740A (zh) |
| WO (2) | WO2024239284A1 (zh) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107545567A (zh) * | 2017-07-31 | 2018-01-05 | 中国科学院自动化研究所 | 生物组织序列切片显微图像的配准方法及装置 |
| CN108038874A (zh) * | 2017-12-01 | 2018-05-15 | 中国科学院自动化研究所 | 面向序列切片的扫描电镜图像实时配准装置及方法 |
| US20180182103A1 (en) * | 2016-12-23 | 2018-06-28 | International Business Machines Corporation | 3d segmentation reconstruction from 2d slices |
| CN110874849A (zh) * | 2019-11-08 | 2020-03-10 | 安徽大学 | 一种基于局部变换一致的非刚性点集配准方法 |
| CN113269813A (zh) * | 2021-06-09 | 2021-08-17 | 志诺维思(北京)基因科技有限公司 | 数字病理图像的配准方法和装置 |
| CN114817363A (zh) * | 2022-04-21 | 2022-07-29 | 北京百度网讯科技有限公司 | 确定数据相似性的方法、装置、电子设备以及存储介质 |
| CN115798587A (zh) * | 2022-10-19 | 2023-03-14 | 上海鹿明生物科技有限公司 | 一种空间转录组与空间代谢组空间信息匹配方法及系统 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107194959A (zh) * | 2017-04-25 | 2017-09-22 | 北京海致网聚信息技术有限公司 | 基于切片进行图像配准的方法和装置 |
| US11830192B2 (en) * | 2019-07-31 | 2023-11-28 | The Joan and Irwin Jacobs Technion-Cornell Institute | System and method for region detection in tissue sections using image registration |
| CN113436238B (zh) * | 2021-08-27 | 2021-11-23 | 湖北亿咖通科技有限公司 | 点云配准精度的评估方法、装置和电子设备 |
| CN114387319B (zh) * | 2022-01-13 | 2023-11-14 | 北京百度网讯科技有限公司 | 点云配准方法、装置、设备以及存储介质 |
-
2023
- 2023-05-24 CN CN202380094961.0A patent/CN120826740A/zh active Pending
- 2023-05-24 WO PCT/CN2023/096109 patent/WO2024239284A1/zh not_active Ceased
- 2023-09-22 CN CN202380098639.5A patent/CN121263842A/zh active Pending
- 2023-09-22 WO PCT/CN2023/120768 patent/WO2024239503A1/zh not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180182103A1 (en) * | 2016-12-23 | 2018-06-28 | International Business Machines Corporation | 3d segmentation reconstruction from 2d slices |
| CN107545567A (zh) * | 2017-07-31 | 2018-01-05 | 中国科学院自动化研究所 | 生物组织序列切片显微图像的配准方法及装置 |
| CN108038874A (zh) * | 2017-12-01 | 2018-05-15 | 中国科学院自动化研究所 | 面向序列切片的扫描电镜图像实时配准装置及方法 |
| CN110874849A (zh) * | 2019-11-08 | 2020-03-10 | 安徽大学 | 一种基于局部变换一致的非刚性点集配准方法 |
| CN113269813A (zh) * | 2021-06-09 | 2021-08-17 | 志诺维思(北京)基因科技有限公司 | 数字病理图像的配准方法和装置 |
| CN114817363A (zh) * | 2022-04-21 | 2022-07-29 | 北京百度网讯科技有限公司 | 确定数据相似性的方法、装置、电子设备以及存储介质 |
| CN115798587A (zh) * | 2022-10-19 | 2023-03-14 | 上海鹿明生物科技有限公司 | 一种空间转录组与空间代谢组空间信息匹配方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2024239284A1 (zh) | 2024-11-28 |
| CN121263842A (zh) | 2026-01-02 |
| CN120826740A (zh) | 2025-10-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7403605B2 (ja) | マルチターゲット画像テキストマッチングモデルのトレーニング方法、画像テキスト検索方法と装置 | |
| CN111553215A (zh) | 人员关联方法及其装置、图卷积网络训练方法及其装置 | |
| WO2022160676A1 (zh) | 热力图生成模型的训练方法、装置、电子设备和存储介质 | |
| CN114463856B (zh) | 姿态估计模型的训练与姿态估计方法、装置、设备及介质 | |
| WO2023093015A1 (zh) | 一种数据筛选方法、装置、设备以及存储介质 | |
| CN115018999A (zh) | 一种多机器人协作的稠密点云地图构建方法及装置 | |
| CN113361574A (zh) | 数据处理模型的训练方法、装置、电子设备及存储介质 | |
| CN114708611A (zh) | 一种跨模态行人重识别方法、装置、设备和存储介质 | |
| CN114461837A (zh) | 一种图像处理方法、装置及电子设备 | |
| CN116196017B (zh) | 脑电信号分类模型训练方法、脑电信号分类方法及装置 | |
| CN113360688A (zh) | 信息库的构建方法、装置及系统 | |
| WO2024152550A1 (zh) | 图片处理方法、装置、电子设备及存储介质 | |
| WO2024239503A1 (zh) | 时空转录组切片的配准方法及装置、电子设备和存储介质 | |
| CN114463551A (zh) | 图像处理方法、装置、存储介质及电子设备 | |
| CN114549947A (zh) | 模型训练方法、装置、设备和存储介质 | |
| CN118604777A (zh) | 激光点云噪点生成方法及装置、电子设备、存储介质 | |
| JP7427120B2 (ja) | 特徴画像の処理方法、装置及び記憶媒体 | |
| CN118151804A (zh) | 一种大屏自动布局方法、装置、设备及存储介质 | |
| JP7355295B2 (ja) | データラベリング方法、装置、電子機器、及び読み取り可能な記憶媒体 | |
| WO2024138387A1 (zh) | 批次效应去除模型的训练方法及去除方法、装置 | |
| CN114494782B (zh) | 图像处理方法、模型训练方法、相关装置及电子设备 | |
| CN113408592B (zh) | 特征点匹配方法、装置、电子设备及计算机可读存储介质 | |
| CN113361402B (zh) | 识别模型的训练方法、确定准确率的方法、装置和设备 | |
| CN117291929A (zh) | 视频加工方法、装置、电子设备及存储介质 | |
| CN116958100A (zh) | 一种提取dsa序列关键帧的方法、装置、设备及介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23938172 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |