This function will add the Harmony batch-corrected reduced dimensions to an ArchRProject.

addHarmony(
  ArchRProj = NULL,
  reducedDims = "IterativeLSI",
  dimsToUse = NULL,
  scaleDims = NULL,
  corCutOff = 0.75,
  name = "Harmony",
  groupBy = "Sample",
  verbose = TRUE,
  force = FALSE,
  ...
)

Arguments

ArchRProj

An ArchRProject object containing the dimensionality reduction matrix passed by reducedDims.

reducedDims

The name of the reducedDims object (i.e. "IterativeLSI") to retrieve from the designated ArchRProject.

dimsToUse

A vector containing the dimensions from the reducedDims object to use in clustering.

scaleDims

A boolean that indicates whether to z-score the reduced dimensions for each cell. This is useful forminimizing the contribution of strong biases (dominating early PCs) and lowly abundant populations. However, this may lead to stronger sample-specific biases since it is over-weighting latent PCs. If set to NULL this will scale the dimensions based on the value of scaleDims when the reducedDims were originally created during dimensionality reduction. This idea was introduced by Timothy Stuart.

corCutOff

A numeric cutoff for the correlation of each dimension to the sequencing depth. If the dimension has a correlation to sequencing depth that is greater than the corCutOff, it will be excluded from analysis.

name

The name to store harmony output as a reducedDims in the ArchRProject object.

groupBy

The name of the column in cellColData to use for grouping cells together for vars in harmony batch correction.

verbose

A boolean value indicating whether to use verbose output during execution of this function. Can be set to FALSE for a cleaner output.

force

A boolean value that indicates whether or not to overwrite data in a given column when the value passed to name already exists as a column name in cellColData.

...

Additional arguments to be provided to harmony::HarmonyMatrix