View source: R/calculate_distances.R
calculate_nearest_distances | R Documentation |
Calculate nearest distances between cell types
calculate_nearest_distances(
spatial_data,
reference_type,
target_types,
x_col = "pxl_row_in_fullres",
y_col = "pxl_col_in_fullres",
id_col = "barcode",
type_col = "Epi_strom"
)
spatial_data |
A data frame containing spatial coordinates and cell type info |
reference_type |
The reference cell type to calculate distances from |
target_types |
Vector of target cell types to calculate distances to |
x_col |
Column name for x-coordinates |
y_col |
Column name for y-coordinates |
id_col |
Column name for cell identifiers |
type_col |
Column name for cell type information |
A data frame with nearest distances for each reference cell
calculate_nearest_distances(posi, reference_type="Macrophage",
target_types=c("Epithelial_cells_A","Epithelial_cells_B",
"Epithelial_cells_C","Epithelial_cells_D"),
id_col = "Newbarcode",
type_col = "celltype_ABCDepi")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.