First, read in capture-area-level spaceranger outputs. Then, overwrite
spatial coordinates and images to represent group-level samples using
sample_info$group
(though keep original coordinates in
colData
columns ending in "_original"). Next, add info about
overlaps (via spe$exclude_overlapping
and spe$overlap_key
).
Ultimately, return a SpatialExperiment
ready for visualization or
downstream analysis.
build_spe(sample_info, coords_dir, count_type = "sparse")
A tibble
with columns capture_area
and
group
A character(1)
vector giving the directory
containing sample directories each with tissue_positions.csv
,
scalefactors_json.json
, and tissue_lowres_image.png
files
produced from refinement with prep_imagej_*()
functions
A character(1)
vector passed to type
from
SpatialExperiment::read10xVisium
, defaulting to "sparse"
A SpatialExperiment
object with one sample per group specified
in sample_info
using transformed pixel and array coordinates (including
in the spatialCoords
).
# For internal testing
if (FALSE) { # \dontrun{
sample_info <- readr::read_csv("dev/test_data/sample_info.csv")
coords_dir <- "dev/test_data"
spe <- build_spe(sample_info, coords_dir)
} # }
## TODO: add working examples
args(build_spe)
#> function (sample_info, coords_dir, count_type = "sparse")
#> NULL