Skip to contents

Converts an on-disk emObject (Zarr store) into a SpatialMap object. Required attributes of the emObject are: data and pos. emObjects should be converted one at a time. Multiple converted objects can be combined into a single SpatialMap object using combineMaps.

Usage

spatialmap_from_emobject(
  data_dir,
  layer = NULL,
  invert.y.coordinates = TRUE,
  projectName = NULL,
  projectSummary = NULL,
  activeRegions = NULL,
  settings = NULL,
  neutral.markers = c("DAPI", "Blank", "Empty"),
  expand_metadata = T
)

Arguments

data_dir

A data directory containing the emObject Zarr store

layer

The layer in the emObject whose attributes will be used

invert.y.coordinates

Whether the Y coordinates should be inverted. This is typically done by default in SpatialMap for plotting purposes, so that points have the same visual orientation as raw image data.

projectName

Project name

projectSummary

A brief text summary of the project

activeRegions

The active Regions for this SpatialMap

settings

The list of settings

neutral.markers

These are the names of the markers that are distinct because they measure background or baseline signals. For example, DAPI, Blank, or Empty. These will be piped to bgData and excluded from main expression Data.

expand_metadata

A logical indicating whether sample-level metadata will be expanded to the cell level metadata as well. For example, the value for coverslip_label for Region_A will be copied to every cell in Region_A. This takes up more memory, but is more intuitive for most users.

Note

At the moment, this function can only be used by internal Enable users, due to import dependencies that require AWS credentials. Support for external users is on our roadmap!

To refresh AWS credentials, either:

  1. run aws sso login on the command line (and remove any from .Renviron!)

  2. update AWS creds in .Renviron

Scroll to top