create_object: Create a SpatialExperiment object

View source: R/create-object.R

create_objectR Documentation

Create a SpatialExperiment object

Description

Create a SpatialExperiment object (used in the same manner as SingleCellExperiment) that will store all of the project data.

Usage

create_object(
  x,
  expression_cols = NULL,
  metadata_cols = NULL,
  skip_cols = NULL,
  clean_names = TRUE,
  transformation = NULL,
  out_dir = NULL
)

Arguments

x

A data frame or a path to a file (can be gzipped).

expression_cols

Column names of markers/antibody expression as a vector or a grep pattern. Auto-detected if not specified.

metadata_cols

Column names of cell metadata (not markers/antibodies) as a vector or a grep pattern. Auto-detected if not specified.

skip_cols

Column names to ignore (such as bad antibodies) as a vector or a grep pattern.

clean_names

A logical scalar. Clean the data frame column names to remove problematic characters and make them unique.

transformation

A character string indicating which transformation method should be used. See transform().

out_dir

Name of the output analysis directory. If specified, the object and the corresponding plots will be saved there.

Value

A SpatialExperiment object.

Examples

tonsil_csv <- system.file("extdata", "tonsil-akoya-2018-500.csv", package = "phenomenalist")
tonsil_spe <- create_object(tonsil_csv, skip_cols = "DAPI|Blank", transformation = "z")

igordot/phenomenalist documentation built on March 1, 2024, 1:41 p.m.