Skip to contents

Returns a SCE object with the minimum distance from immune cells to the identified tumour bordering cells.

Usage

calculate_distance_to_tumour_margin(sce_object)

Arguments

sce_object

SingleCellExperiment object that has the information of the detected bordering cells (metadata has "Region" column).

Value

An sce_object is returned

Examples

sce_border <- identify_bordering_cells(SPIAT::defined_image, reference_cell = "Tumour",
feature_colname = "Cell.Type", n_to_exclude = 10)
#> [1] "The alpha of Polygon is: 63.24375"

sce_dist <- calculate_distance_to_tumour_margin(sce_border)
#> [1] "Markers had been selected in pair-wise distance calculation: "
#> [1] "Non-border" "Border"