Learn R Programming

harmony (version 1.0.1)

RunHarmony: Run harmony algorithm generic function

Description

This is a generic that provides wrappers for Seurat and SingleCellExperiment objects. Also, it allows harmony standalone with a matrix and a metadata dataframe.

Usage

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

Value

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

Arguments

...

harmony algorithm parameters to be passed on RunHarmony.default

object

SingleCellExperiment with the PCA reducedDim cell embeddings populated

group.by.vars

the name(s) of covariates that harmony will remove its effect on the data.

reduction.use

Name of dimension reduction to use. Default is pca.

dims.use

a vector of indices that allows only selected cell embeddings features to be used.

verbose

enable verbosity

reduction.save

the name of the new slot that is going to be created by harmony. By default, HARMONY.

project.dim

Project dimension reduction loadings. Default TRUE.