identifyVariableMolecules.RdIdentfies molecules that are outliers on a mean-variability plot as proposed by
Seurat.
identifyVariableMolecules(
object,
n_mol = 2500,
method = "vst",
assay_name = activeAssay(object),
...
)An object of class SPATA2 or, in case of S4 generics,
objects of classes for which a method has been defined.
Numeric value. The number of molecules to be identified. Given
to nfeatures of Seurat::FindVariableFeatures().
Character value. The identification method. One of 'vst',
'mean.var.plot' or 'dispersion'. Given to selection.method of
Seurat::FindVariableFeatures().
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.
The updated input object, containing the added, removed or computed results.
library(SPATA2)
data("example_data")
object <- loadExampleObject("UKF269T")
# default is method = 'vst'
object <- identifyVariableMolecules(object, n_mol = 2000)
# multiple results can be stored simultaneously
object <- identifyVariableMolecules(object, n_mol = 3000, method = "mean.var.plot")
# fails, cause results for two methods are stored and method = NULL
vars_vst <- getVariableMolecules(object)
vars_vst <- getVariableMoleculs(object, method = "vst") # works
# should work
vars_mvp <- getVariableMolecules(object, method = "mean.var.plot")
length(vars_vst)
length(vars_mvp)