Distance calculations for spatial coord
calc_distance(
coord,
metadata,
cluster_col = "cluster",
collapse_to_cluster = FALSE
)min distance matrix
dataframe or matrix of spatial coordinates, cell barcode as rownames
data.frame or vector containing cluster assignments per cell. Order must match column order in supplied matrix. If a data.frame provide the cluster_col parameters.
column in metadata with cluster number
instead of reporting min distance to cluster per cell, summarize to cluster level