View source: R/calculate_distance_to_tumour_margin.R
calculate_distance_to_margin | R Documentation |
Returns a SPE object with the minimum distance from cells of interest (CoI) to the identified bordering cells.
calculate_distance_to_margin(spe_object)
spe_object |
SpatialExperiment object. It should contain information of the detected bordering cells ('colData()' has 'Region' column). |
An spe_object with a 'Distance.To.Border' column is returned.
spe_border <- identify_bordering_cells(SPIAT::defined_image,
reference_cell = "Tumour", feature_colname = "Cell.Type", n_to_exclude = 10)
spe_dist <- calculate_distance_to_margin(spe_border)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.