calculate_summary_distances_between_celltypes
Source:R/calculate_summary_distances_between_celltypes.R
calculate_summary_distances_between_celltypes.Rd
Returns the mean, median and standard deviation of the minimum/pairwise distances between phenotypes.
Arguments
- df
Data.frame containing the distance output between cell types. The functions that generate the distances can be
calculate_minimum_distances_between_celltypes
andcalculate_pairwise_distances_between_celltypes
.
Examples
# for pairwise dist
pairwise_dist <- calculate_pairwise_distances_between_celltypes(SPIAT::defined_image,
cell_types_of_interest = c("Tumour","Immune1"), feature_colname = "Cell.Type")
summary_distances <- calculate_summary_distances_between_celltypes(pairwise_dist)
# for minimum dist
min_dists <- calculate_minimum_distances_between_celltypes(SPIAT::defined_image,
cell_types_of_interest = c("Tumour","Immune1"), feature_colname = "Cell.Type")
#> [1] "Markers had been selected in pair-wise distance calculation: "
#> [1] "Immune1" "Tumour"
summary_distances <- calculate_summary_distances_between_celltypes(min_dists)