R/calculate_minimum_distances_between_celltypes.R
calculate_minimum_distances_between_celltypes.Rd
Returns the distance of the closest cell of a specific type from each reference cell.
calculate_minimum_distances_between_celltypes(
spe_object,
feature_colname,
cell_types_of_interest = NULL
)
SpatialExperiment object in the form of the output of
format_image_to_spe
.
String of the feature column of cells to choose the cell types from (e.g. Cell.Type, Cell.Type2, etc).
String Vector of marker combinations to consider is FALSE.
A data.frame is returned
min_dists <- calculate_minimum_distances_between_celltypes(
SPIAT::defined_image, feature_colname = "Cell.Type",
cell_types_of_interest = c("Tumour","Immune1"))
#> [1] "Markers had been selected in minimum distance calculation: "
#> [1] "Immune1" "Tumour"