Given the path to a MERSCOPE experiment directory, creates a Giotto object.

createGiottoMerscopeObject(
  merscope_dir,
  data_to_use = c("subcellular", "aggregate"),
  FOVs = NULL,
  poly_z_indices = 1:7,
  calculate_overlap = TRUE,
  overlap_to_matrix = TRUE,
  aggregate_stack = TRUE,
  aggregate_stack_param = list(summarize_expression = "sum", summarize_locations =
    "mean", new_spat_unit = "cell"),
  instructions = NULL,
  cores = NA,
  verbose = TRUE
)

.createGiottoMerscopeObject_subcellular(
  data_list,
  calculate_overlap = TRUE,
  overlap_to_matrix = TRUE,
  aggregate_stack = TRUE,
  aggregate_stack_param = list(summarize_expression = "sum", summarize_locations =
    "mean", new_spat_unit = "cell"),
  cores = NA,
  verbose = TRUE
)

.createGiottoMerscopeObject_aggregate(data_list, cores = NA, verbose = TRUE)

Arguments

merscope_dir

full path to the exported merscope directory

data_to_use

which of either the 'subcellular' or 'aggregate' information to use for object creation

FOVs

which FOVs to use when building the subcellular object. (default is NULL) NULL loads all FOVs (very slow)

calculate_overlap

whether to run calculateOverlapRaster

overlap_to_matrix

whether to run overlapToMatrix

aggregate_stack

whether to run aggregateStacks

aggregate_stack_param

params to pass to aggregateStacks

instructions

list of instructions or output result from createGiottoInstructions

cores

how many cores or threads to use to read data if paths are provided

verbose

be verbose when building Giotto object

data_list

list of loaded data from load_merscope_folder

Value

a giotto object

Details

[Expected Directory] This function generates a giotto object when given a link to a MERSCOPE output directory. It expects the following items within the directory where the bolded portions are what this function matches against:

  • cell_boundaries (folder .hdf5 files)

  • images (folder of .tif images and a scalefactor/transfrom table)

  • cell_by_gene.csv (file)

  • cell_metadatafov_positions_file.csv (file)

  • detected_transcriptsmetadata_file.csv (file)

Functions

  • .createGiottoMerscopeObject_subcellular(): Create giotto object with 'subcellular' workflow

  • .createGiottoMerscopeObject_aggregate(): Create giotto object with 'aggregate' workflow