View source: R/number_of_cells_within_radius.R
number_of_cells_within_radius | R Documentation |
Calculates the number of cells of a target cell type within a pre-defined radius around cells of a reference cell type.
number_of_cells_within_radius(
spe_object,
reference_celltype,
target_celltype,
radius = 20,
feature_colname
)
spe_object |
SpatialExperiment object in the form of the output of
|
reference_celltype |
String. Cell type to be used for reference cells. |
target_celltype |
String. Cell type to be used for target cells. |
radius |
Numeric. Radius around the reference cells. |
feature_colname |
String specifying the column with the desired cell type annotations. |
A list of dataframes with the number of target cells of each of the reference cells
n_in_radius <- number_of_cells_within_radius(SPIAT::defined_image,
reference_celltype = "Tumour", target_celltype="Immune1", radius = 50,
feature_colname = "Cell.Type")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.