Transforms input object to object of class spata2 object.

asSPATA2(object, ...)

# S4 method for giotto
asSPATA2(object, sample_name, transfer_meta_data = TRUE, verbose = TRUE, ...)

# S4 method for Seurat
asSPATA2(
  object,
  sample_name,
  spatial_method,
  assay_name = "Spatial",
  image_name = "slice1",
  transfer_meta_data = TRUE,
  transfer_dim_red = TRUE,
  count_mtr_name = "counts",
  scaled_mtr_name = "scale.data",
  verbose = TRUE
)

# S4 method for AnnDataR6
asSPATA2(
  object,
  sample_name,
  count_mtr_name = "counts",
  normalized_mtr_name = "normalized",
  scaled_mtr_name = "scaled",
  transfer_meta_data = TRUE,
  transfer_dim_red = TRUE,
  image_name = NULL,
  verbose = TRUE
)

Arguments

object

An object of either one of the following classes: Seurat, SingleCellExperiment, AnnDataR6

...

Additional arguments given to initiateSpataObject_CountMtr().

sample_name

A character string specifying the name of the sample

transfer_meta_data

Logical or character. Specifies if meta data, e.g clustering, from the input object is transferred to the output object. If TRUE, all variables of the meta data.frame are transferred. If character, named variables are transferred. If FALSE, none are transferred.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

spatial_method

Character value. The name of the spatial method that underlies the experiment. Must be one of validSpatialMethods(). Defaults to 'Unknown'.

transfer_dim_red

A logical specifying whether to transfer dimensional reduction data (PCA, UMAP, tSNE) from the input object to the output object.

count_mtr_name

A character string specifying the name of the count matrix

scaled_mtr_name

A character string specifying the name of the scaled matrix

normalized_mtr_name

A character string specifying the name of the normalized matrix (anndata only currently)

Value

An object of class spata2 object.