setCountMatrix: Set data matrices

View source: R/setA-Z.R

setCountMatrixR Documentation

Set data matrices

Description

Functions to set data matrices of different assays.

Usage

setCountMatrix(object, count_mtr, assay_name = activeAssay(object), ...)

setProcessedMatrix(
  object,
  proc_mtr,
  name,
  assay_name = activeAssay(object),
  ...
)

Arguments

object

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

count_mtr

The count matrix with rownames corresponding to the feature names and the column names corresponding to the barcodes.

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().

...

Used to absorb deprecated arguments or functions.

proc_mtr

The processed matrix with rownames corresponding to the feature names and the column names corresponding to the barcodes.

name

Character value. The name with which to refer to the processed matrix later on.

Value

The updated input object, containing the added, removed or computed results.

Note

SPATA2 in general distinguishes between two types of data matrices. There are count matrices containing the raw counts, and processed matrices that contain processed expression data obtained via single or subsequent processing steps such as log normalization, scaling, denoising etc. Count matrices are always stored in slot @mtr_counts in their MolecularAssay object and do not need a name. Processed matrices are stored in a list stored in slot @mtr_proc of the MolecularAssay object and therefore need further naming. Their name should correspond to the method with which they were processed. E.g. log_norm if it was created by log normalizing the counts. Or scaled if it was created by subsequent scaling of the log_norm matrix.


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.