LoadAtera(..., segmentations = "cell") builds a Polygons
object (via sp::SpatialPolygons()) for every cell up front, which
doesn't scale to bundles with many hundreds of thousands of cells -- that
machinery gets impractically slow, and can overflow R's protection stack,
well before reaching cell counts typical of a whole-tissue Atera run. This
function instead builds segmentation polygons only for the cells already
present in object[[fov]], so a bundle too large to load
segmentations for up front (LoadAtera(..., segmentations = NULL))
can still get polygons for a Cropped
region-of-interest FOV, which typically has orders of magnitude fewer
cells.
LoadAteraSegmentations(object, data.dir, fov, segmentations = "cell")object, with a "segmentations" boundary added to
object[[fov]], built only for the cells currently in that FOV
A Seurat object created by LoadAtera
The same data.dir passed to the original
LoadAtera call (the Atera output bundle directory)
Name of the FOV (typically already cropped via
Crop) to add segmentation polygons to
One of "cell" or "nucleus"