R/spat_reduce.R
spat_reduce.Rdspat_reduce() Creates a single SpatialExperiment object
with all measurements mapped to the same coordinate space for plotting
and analysis
spat_reduce(
spe_target,
spe_origin,
origin_assay = "lipids",
target_dims = c("spot_width", "spot_height"),
replace_nas = FALSE,
stat = "mean"
)Low resolution image measurements
High-resolution image measurements to be mapped to target
Name of assay in origin assay to be reduced
Names of width and height of target spots, respectively
Set to TRUE if we want to replace NA values with zeroes. This will increase the number of data points in common for correlation calculations.
Statistic used to summarize regions, choices are currently 'mean' and 'median'
A copy of the spe_target object with the altExp slot containing
a reduced version of the origin
This function allows us to map two distinct omics measurements to the same coordinate system. It takes on 'origin' measurement and summarizes the values (typically via mean) in the ROI in a 'target' measurement so that the source and target values can be compared.