This is a generic that provides wrappers for Seurat and SingleCellExperiment objects. Also, it allows harmony standalone with a matrix and a metadata dataframe.
RunHarmony(...)# S3 method for Seurat
RunHarmony(
object,
group.by.vars,
reduction.use = "pca",
dims.use = NULL,
verbose = TRUE,
reduction.save = "harmony",
project.dim = TRUE,
...
)
# S3 method for SingleCellExperiment
RunHarmony(
object,
group.by.vars,
dims.use = NULL,
verbose = TRUE,
reduction.save = "HARMONY",
...
)
HarmonyMatrix(...)
Seurat object. Harmony dimensions placed into a new slot in the Seurat object according to the reduction.save. For downstream Seurat analyses, use reduction='harmony'.
SingleCellExperiment object. After running RunHarmony, the corrected cell embeddings can be accessed with reducedDim(object, "Harmony").
harmony algorithm parameters to be passed on RunHarmony.default
SingleCellExperiment with the PCA reducedDim cell embeddings populated
the name(s) of covariates that harmony will remove its effect on the data.
Name of dimension reduction to use. Default is pca.
a vector of indices that allows only selected cell embeddings features to be used.
enable verbosity
the name of the new slot that is going to be created by harmony. By default, HARMONY.
Project dimension reduction loadings. Default TRUE.