Skip to contents

Wraps harmony_v1_sc() as an ScStep.

Usage

step_harmony_v1_sc(
  batch_column,
  additional_batch_columns = NULL,
  modality = c("rna", "adt", "atac"),
  harmony_params = params_sc_harmony(),
  seed = 42L,
  .verbose = TRUE
)

Arguments

batch_column

String. Column name in the object containing the primary batch labels.

additional_batch_columns

Optional character vector. Additional batch columns to regress out. If NULL, only the primary batch column is used.

modality

String. One of c("rna", "adt", "atac"). "adt" needs a SingleCellsMultiModal, "atac" a SingleCellsMultiModal or a SingleCellsAtac.

harmony_params

List. Output of params_sc_harmony().

seed

Integer. For reproducibility.

.verbose

Boolean or integer. Controls verbosity and returns run times. FALSE -> quiet, TRUE or 1L -> normal verbosity, 2L -> detailed verbosity.

Value

An ScStep.

Examples

# the original Harmony writes its own embedding name
step_harmony_v1_sc(batch_column = "batch_index") %>>%
  step_neighbours_sc(embd_to_use = "harmony_v1")
#> <ScPipeline> 2 steps
#>   1. harmony_v1  batch_column = "batch_index", additional_batch_columns = NULL, modality = c("rna", "adt", "atac"), harmony_params = <params_sc_harmony>, seed = 42L, .verbose = TRUE
#>   2. neighbours  embd_to_use = "harmony_v1", no_embd_to_use = NULL, modality = c("rna", "adt", "atac"), neighbours_params = <list>, seed = 42L, .verbose = TRUE