concept_variables.Rd
In the context of SPATA2, the term variables refers to the features that characterize observations.
Throughout documentation the term variables and features are used synonymously. We work closely with the tidyverse. It proposes the concept of tidy data, which structures data.frames in observations and variables. Therefore, we tend to stick to the term variables
Note: In previous versions of SPATA2 we used the term features and feature
data.frame and the slot @fdata to refer to variables that were not related
to molecular counts like gene expression or gene sets. This resulted in
confusion as many other platforms such as Seurat use the term features in general
to refer to what we refer to as variables. Therefore, the slot @fdata has been renamed
to @meta_obs and the corresponding data.frame has been renamed to meta data.frame,
as obtained by getMetaDf()
.
Next to the obligatory variable barcodes - which uniquely identifies each observation -
different kind of variables exist in the SPATA2
object.
Numeric variables represent continuous or numerical data. These variables can take on numeric values and are typically used to represent quantitative measurements counts. When working with SPATA2 numeric variables are conceptually subdivided.
spatial: Numeric variables used to position the observations in two dimensional
space. Stored in the coordinates data.frame as obtained by getCoordsDf()
.
E.g. x, x_orig, y and y_orig. They are stored in the coordinates data.frame.
molecular: Numeric variables used to quantify molecular expression of an
observation. Stored in the count and processed matrices of the MolecularAssay
objects. E.g. GFAP, VEGFA, LDH.
dimensional reduction Numeric variables used to position the observations in latent space. Stored in slot @dim_red.
signature: Specific scores or mean expression based on multiple molecular
data variables. E.g. gene signatures like HM_HYPOXIA. The SPATA2
object
only stores the molecules of which the signature consists, namely in slot @signatures
of the MolecularAssay
. The actual variable is computed upon extraction.
miscellaneous: Numeric variables that do not fit in any of the descriptions above
and often correspond to meta data. E.g. the number of molecule counts per observation.
. They are stored in the meta data.frame for the observations, as obtained by getMetaDf()
.
Categorical or grouping variables represent qualitative data that can take on a limited number of distinct categories or levels. These variables are used to categorize or group observations into distinct groups or classes. When working with SPATA2 grouping variables are conceptually subdivided.
cluster: Results of clustering algorithms. E.g. runBayesSpaceClustering()
segmentation: Results of manual, spatial segmentation via createSpatialSegmentation()
miscellaneous: Categorical variables that do not fit in any of the descriptions above.
E.g. tissue section assignment by identifyTissueOutline()
, or outlier assignment by identifySpatialOutliers()
.
Grouping variables are stored as factors in the meta data.frame of slot @meta_obs, as obtained by getMetaDf()
.