A convenient function that takes the spata-object you have initiated with the package SPATA and adjusts it's architecture to the new version. All features remain.

updateSpataObject(
  object,
  sample_name = NULL,
  chr_to_fct = TRUE,
  n_pcs = 30,
  verbose = TRUE
)

Arguments

object

A spata-object that has been created within the package SPATA.

sample_name

Character value. Denotes the sample name. Must be one of getSampleNames().

chr_to_fct

Logical. SPATA2 recommends to store grouping variables as factors in the slot @fdata. If set to TRUE, character variables (apart from barcodes, sample, segmentation) of the old obejct's feature data are converted to factors.

n_pcs

Numeric value. Denotes the number of principal components to be computed.

verbose

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

(Warning messages will always be printed.)

Value

An updated spata-object.

Details

Apart from transferring the data and the progress from the old object to the new one principal component analysis (PCA) is run via the function runPca() and gene meta data is compuated via computeGeneMetaData().