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 do not correspond to metrics for each cell
average_marker_intensity_within_radius( sce_object, reference_marker, target_marker, radius = 20 )
sce_object | A SingleCellExperiment object in the form of the output of format_image_to_sce |
---|---|
reference_marker | A string specifying the marker that is used for reference cells |
target_marker | A string specifying the marker to calculate its average intensity |
radius | An integer specifying the radius of search for cells around the reference cells |
A single number is returned
average_marker_intensity_within_radius(SPIAT::formatted_image, reference_marker ="CD8", target_marker = "CD4", radius=30)#> [1] 10.13677