Given the path to a MERSCOPE experiment directory, creates a Giotto object. Supports both Parquet and HDF5 cell boundary formats (v2). Features automatic 2D vs 3D architecture detection with vertex validation.
createGiottoMerscopeObject(
merscope_dir,
version = 1,
data_to_use = c("subcellular", "aggregate"),
FOVs = NULL,
polygon_format = c("parquet", "hdf5"),
poly_z_indices = NULL,
flip_axis = c("none", "y", "x", "both"),
spat_unit = "cell",
calculate_overlap = TRUE,
overlap_to_matrix = TRUE,
aggregate_stack = TRUE,
aggregate_stack_param = list(summarize_expression = "sum", summarize_locations =
"mean", new_spat_unit = "cell"),
split_keyword = c("Blank"),
instructions = NULL,
cores = NA,
verbose = TRUE
)
.createGiottoMerscopeObject_subcellular(
data_list,
version = 1,
flip_axis = c("none", "y", "x", "both"),
spat_unit = "cell",
calculate_overlap = TRUE,
overlap_to_matrix = TRUE,
aggregate_stack = TRUE,
aggregate_stack_param = list(summarize_expression = "sum", summarize_locations =
"mean"),
split_keyword = c("Blank"),
instructions = NULL,
cores = NA,
verbose = TRUE
)
.createGiottoMerscopeObject_aggregate(data_list, cores = NA, verbose = TRUE)full path to the exported merscope directory
integer. Version of logic to use (1 = Legacy/Original, 2 = New/Optimized)
which of either the 'subcellular' or 'aggregate' information to use for object creation
which FOVs to use when building the subcellular object. (default is NULL). NULL loads all FOVs (very slow)
format of the boundary files, either 'parquet' or 'hdf5' (v2 only)
which z-indices to use for the polygons (Default 0:6 for v2, 1:7 for v1)
character. Version 2 only. Axis along which to
reflect polygon vertices and transcript coordinates after loading:
"none" (default, data read as-is), "y", "x", or
"both". The reflection origin is the midpoint of the transcript
coordinate range so both layers stay registered. Silently forced to
"none" for version = 1, which handles orientation internally
via polygon_mask_list_params (flip_vertical = TRUE).
character. Name assigned to the cell spatial unit (default
"cell"). Controls the polygon layer name when a single Z-plane is
present and serves as the default new_spat_unit in
aggregate_stack_param when that field is not already supplied.
whether to run calculateOverlapRaster
whether to run overlapToMatrix
whether to run aggregateStacks
params to pass to aggregateStacks
character vector of keywords to separate feature detections (e.g. "Blank")
list of instructions or output result
from createGiottoInstructions
how many cores or threads to use to read data if paths are provided
be verbose when building Giotto object
list of loaded data from load_merscope_folder
a giotto object
.createGiottoMerscopeObject_subcellular(): Create giotto object with
'subcellular' workflow
.createGiottoMerscopeObject_aggregate(): Create giotto object with 'aggregate'
workflow