Skip to contents

Wraps find_neighbours_sc() as an ScStep.

Usage

step_neighbours_sc(
  embd_to_use = "pca",
  no_embd_to_use = NULL,
  modality = c("rna", "adt", "atac"),
  neighbours_params = params_sc_neighbours(),
  seed = 42L,
  .verbose = TRUE
)

Arguments

embd_to_use

String. The embedding to use. Whichever you chose, it needs to be part of the object.

no_embd_to_use

Optional integer. Number of embedding dimensions to use. If NULL all will be used.

modality

String. One of c("rna", "adt", "atac"). You can only use "adt" on SingleCellsMultiModal class.

neighbours_params

List. Output of params_sc_neighbours(). Carries the graph parameters (see params_knn_graph_defaults()) and the kNN parameters (see params_knn_defaults()).

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

# neighbours on the PCA embedding
step_pca_sc(no_pcs = 10L) %>>% step_neighbours_sc()
#> <ScPipeline> 2 steps
#>   1. pca         no_pcs = 10L, pca_params = <list>, sparse_svd = NULL, hvg = NULL, seed = 42L, residuals = FALSE, .verbose = TRUE
#>   2. neighbours  embd_to_use = "pca", no_embd_to_use = NULL, modality = c("rna", "adt", "atac"), neighbours_params = <list>, seed = 42L, .verbose = TRUE