Takes the count matrix of your spata-object and creates a Seurat-object with it. The spata-object's feature-data is passed as input for the meta.data-argument of Seurat::CreateSeuratObject(). If specified as TRUE or named list of arguments the respective functions are called in order to pre process the object.

The specified spata-object must contain only one sample! (use subsetSpataObject() to reduce the number of samples). If you want to analyze several samples with Seurat please compile the objects one by one and consider using Seurat::merge().

compileSeuratObject(
  object,
  ...,
  SCTransform = FALSE,
  NormalizeData = FALSE,
  FindVariableFeatures = FALSE,
  ScaleData = FALSE,
  RunPCA = FALSE,
  FindNeighbors = FALSE,
  FindClusters = FALSE,
  RunTSNE = FALSE,
  RunUMAP = FALSE,
  verbose = TRUE
)

Arguments

object

A valid spata-object.

...

Additional parameters given to Seurat::CreateSeuratObject().

SCTransform

A named list of arguments given to Seurat::SCTransform(), TRUE or FALSE.

NormalizeData

A named list of arguments given to Seurat::NormalizeData(), TRUE or FALSE.

FindVariableFeatures

A named list of arguments given to Seurat::FindVariableFeatures(), TRUE or FALSE.

ScaleData

A named list of arguments given to Seurat::ScaleData(), TRUE or FALSE.

Hint: If set to TRUE or the argument-list provided does not specify the argument features input for argument features is set to base::rownames(seurat_object).

RunPCA

A named list of arguments given to Seurat::RunPCA(), TRUE or FALSE.

FindNeighbors

A named list of arguments given to Seurat::FindNeighbors(), TRUE or FALSE.

FindClusters

A named list of arguments given to Seurat::FindClusters(), TRUE or FALSE.

RunTSNE

A named list of arguments given to Seurat::RunTSNE(), TRUE or FALSE.

RunUMAP

A named list of arguments given to Seurat::RunUMAP(), TRUE or FALSE.

Value

Details

`compileSeuratObject()` is a convenient wrapper around all functions that preprocess a seurat-object after it's initiation. The object is initiated by passing the spata-objects count-matrix and feature data to it whereupon the functions are called in the order they are presented in this documentation. For all pre processing functions apply the following instructions:

  • If set to FALSE the processing function is skipped.

  • If set to TRUE the respective function is called with it's default argument settings. Note: RunUMAP() needs additional input!

  • If a named list is provided the respective function called whereby the named list will provide the argument-input (the seurat-object to be constructed must not be named and will be passed to every function as the first argument!!!.)

Note that certain listed functions require previous functions! E.g. if RunPCA is set to FALSE RunTSNE() will result in an error. (base::tryCatch() will prevent the function from crashing.)