Transforms an SPATA2 object to an object of class SingleCellExperiment. See details for more information.

asSingleCellExperiment(
  object,
  assay_name = activeAssay(object),
  bayes_space = FALSE,
  verbose = NULL
)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

assay_name

Only relevant if the SPATA2 object contains more than one assay: Denotes the assay of interest and thus the molecular modality to use. Defaults to the active assay as set by activateAssay().

bayes_space

Logical. If TRUE, the function creates an object fitted to the requirements for the BayesSpace pipeline.

verbose

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

(Warning messages will always be printed.)

Value

An object of class SingleCellExperiment.

Details

Output object contains the count matrix in slot @assays and feature data.frame combined with coordinates in slot @colData.

Slot @metadata is a list that contains the image object.

Examples

library(SPATA2)
library(SingleCellExperiment)

data("example_data")

object <- example_data$object_UKF275T_diet

sce <- asSingleCellExperiment(object)

class(sce)