SnapATAC_runHarmony: Perform batch effect using harmony

View source: R/BatchCorrection.R

SnapATAC_runHarmonyR Documentation

Perform batch effect using harmony

Description

Perform batch effect using harmony

Usage

SnapATAC_runHarmony(
  mapSnapATAC,
  meta_data,
  nPC = 30,
  vars_use = NULL,
  weightDimReduct = FALSE
)

Arguments

mapSnapATAC

list, output of SnapATAC_runDiffusionMaps, at least contains

  • dmat matrix, cell by feature, dense matrix of embedding for the cells

  • sdev numeric vector, standard deviation from runDiffusionMaps.

meta_data

Either (1) Dataframe with variables to integrate or (2) vector with labels.

nPC

integer, how many PCs used for Harmony, default is 30.

vars_use

string, if meta_data is dataframe, this defined which variable(s) to remove (character vector). Default is NULL

weightDimReduct

bool, if weighted the PCs by multiplying sdev, default is FALSE

Value

Matrix, cell by updated principle components


beyondpie/smmtools documentation built on July 1, 2022, 4:33 a.m.