Skip to contents

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.

Usage

LoadAteraSegmentations(object, data.dir, fov, segmentations = "cell")

Arguments

object

A Seurat object created by LoadAtera

data.dir

The same data.dir passed to the original LoadAtera call (the Atera output bundle directory)

fov

Name of the FOV (typically already cropped via Crop) to add segmentation polygons to

segmentations

One of "cell" or "nucleus"

Value

object, with a "segmentations" boundary added to object[[fov]], built only for the cells currently in that FOV