average_marker_intensity_within_radius
Source:R/average_marker_intensity_within_radius.R
average_marker_intensity_within_radius.Rd
Calculates the average intensity of the target_marker within a radius from the cells positive for the reference marker. Note that it pools all cells with the target marker that are within the specific radius of any reference cell. Results represent the average intensities within a radius, but not a vector of metrics for each cell.
Usage
average_marker_intensity_within_radius(
sce_object,
reference_marker,
target_marker,
radius = 20
)
Arguments
- sce_object
SingleCellExperiment object in the form of the output of
format_image_to_sce
.- reference_marker
String specifying the marker that is used for reference cells.
- target_marker
String specifying the marker to calculate its average intensity.
- radius
Numeric specifying the radius of search for cells around the reference cells.
Examples
average_marker_intensity_within_radius(SPIAT::simulated_image,
reference_marker ="Immune_marker3",
target_marker = "Immune_marker2",
radius=30)
#> [1] 0.5995357