View source: R/calculate_summary_distances_of_cells_to_borders.R
calculate_summary_distances_of_cells_to_borders | R Documentation |
Returns the mean, median and standard deviation of the distances between a specified cell type to the border.
calculate_summary_distances_of_cells_to_borders(
spe_object,
cell_types_of_interest,
feature_colname = "Cell.Type"
)
spe_object |
SpatialExperiment object. It should contain information of tissue structure and cell distances to the tissue region border ('colData()' has 'Region' and 'Distance.To.Border' columns). |
cell_types_of_interest |
String Vector of cell types to consider. |
feature_colname |
String specifying which column the interested cell types are from. |
A data.frame is returned
spe_border <- identify_bordering_cells(SPIAT::defined_image,
reference_cell = "Tumour", feature_colname = "Cell.Type", n_to_exclude = 10)
spe_dist <- calculate_distance_to_margin(spe_border)
spe_structure <- define_structure(spe_dist, cell_types_of_interest =
c("Immune1","Immune2","Immune3"), feature_colname = "Cell.Type",
n_margin_layers = 5)
calculate_summary_distances_of_cells_to_borders(spe_structure,
cell_types_of_interest = c("Immune1","Immune3"),feature_colname = "Cell.Type")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.