R/add_overlap_info.R
add_overlap_info.Rd
Given a SpatialExperiment
and column name in its colData
,
return a modified copy of the SpatialExperiment
with additional colData
columns: spe$exclude_overlapping
and spe$overlap_key
add_overlap_info(spe, metric_name)
A SpatialExperiment
object with additional colData
columns spe$exclude_overlapping
and spe$overlap_key
spe$exclude_overlapping
is TRUE for spots with a higher-quality overlapping
capture area and FALSE otherwise. spot_plot
only displays FALSE spots to
prevent overplotting in regions of overlap. spe$overlap_key
gives comma-
separated strings containing the keys of any overlapping spots, and is the empty
string otherwise.
# For internal testing
if (FALSE) { # \dontrun{
library("HDF5Array")
spe <- loadHDF5SummarizedExperiment("dev/test_data/spe_filtered")
spe_new <- add_overlap_info(spe, metric_name = "sum_umi")
p_old <- spot_plot(
spe,
sample_id = "Br8492", var_name = "capture_area",
is_discrete = TRUE
)
p_new <- spot_plot(
spe_new,
sample_id = "Br8492", var_name = "capture_area",
is_discrete = TRUE
)
print(p_old)
print(p_new)
} # }
## TODO: add working examples
args(add_overlap_info)
#> function (spe, metric_name)
#> NULL