R/average_percentage_of_cells_within_radius.R
average_percentage_of_cells_within_radius.Rd
Calculates the average percentage of cells of a target phenotype within a radius from the cells with a reference phenotype. The calculation is done per reference cell, so runtime will depend on the number of reference cells present. Output is a single value (the mean for the image).
average_percentage_of_cells_within_radius( sce_object, reference_phenotypes, target_phenotypes, radius = 100, column )
sce_object | SingleCellExperiment object in the form of the output of format_image_to_sce |
---|---|
reference_phenotypes | String specifying the phenotypes of reference cells |
target_phenotypes | String specifying the phenotypes for target cells |
radius | Integer specifying the radius of search for cells around the reference cells. Radii of ~100 are recommended. If too small, too few cells might be present |
column | String specifying the column with the desired cell type annotations |
A numeric vector ard a plot are returned