Skip to contents

ScVI integration function

Usage

scVI_integrate(
  srt_merge = NULL,
  batch = NULL,
  append = TRUE,
  srt_list = NULL,
  assay = NULL,
  do_normalization = NULL,
  normalization_method = "LogNormalize",
  do_HVF_finding = TRUE,
  HVF_source = "separate",
  HVF_method = "vst",
  nHVF = 2000,
  HVF_min_intersection = 1,
  HVF = NULL,
  scVI_dims_use = NULL,
  nonlinear_reduction = "umap",
  nonlinear_reduction_dims = c(2, 3),
  nonlinear_reduction_params = list(),
  force_nonlinear_reduction = TRUE,
  neighbor_metric = "euclidean",
  neighbor_k = 20L,
  cluster_algorithm = "louvain",
  cluster_resolution = 0.6,
  model = "SCVI",
  SCVI_params = list(),
  PEAKVI_params = list(),
  POISSONVI_params = list(),
  train_params = list(),
  cores = 1,
  verbose = TRUE,
  seed = 11
)

Arguments

srt_merge

A merged `Seurat` object that includes the batch information.

batch

Batch variable name.

append

Append integrated results to srt_merge.

srt_list

A list of Seurat objects to be checked and preprocessed.

assay

Assay to use. NULL uses the default assay.

do_normalization

Whether data normalization should be performed.

normalization_method

The normalization method to be used. Possible values are "LogNormalize", "SCT", "TFIDF", and "scran".

do_HVF_finding, HVF_method, nHVF, HVF

Highly variable features. HVF_method is "vst", "mvp", "disp", or "scran".

HVF_source

The source of highly variable features. Possible values are "global" and "separate".

HVF_min_intersection

The feature needs to be present in batches for a minimum number of times in order to be considered as highly variable.

scVI_dims_use

Dimensions returned by scVI that will be utilized for downstream cell cluster finding and nonlinear reduction. If set to NULL, all the returned dimensions will be used by default.

nonlinear_reduction, nonlinear_reduction_dims, nonlinear_reduction_params, force_nonlinear_reduction

Nonlinear reduction ("umap", "umap-naive", "tsne", "dm", "phate", "pacmap", "trimap", "largevis", "fr").

neighbor_metric, neighbor_k

Neighbor graph ("euclidean", "cosine", "manhattan", "hamming").

cluster_algorithm, cluster_resolution

Clustering ("louvain", "slm", "leiden"). Larger cluster_resolution yields fewer clusters.

model

A string indicating the scVI model to be used. Options are "SCVI", "PEAKVI", and "POISSONVI".

SCVI_params

A list of parameters for the SCVI model.

PEAKVI_params

A list of parameters for the PEAKVI model.

POISSONVI_params

A list of parameters for the POISSONVI model.

train_params

A list of parameters passed to the model `train()` method.

cores

An integer setting the number of threads for `scVI`.

verbose

Whether to print the message. Default is TRUE.

seed

Random seed.

Examples

if (FALSE) { # \dontrun{
data("pbmcmultiome_sub", package = "scop")
pbmcmultiome_sub$batch <- rep(c("batch1", "batch2"), length.out = ncol(pbmcmultiome_sub))
pbmcmultiome_sub <- scVI_integrate(
  srt_merge = pbmcmultiome_sub,
  batch = "batch",
  assay = "peaks",
  model = "PEAKVI",
  train_params = list(max_epochs = 2L)
)
pbmcmultiome_sub <- scVI_integrate(
  srt_merge = pbmcmultiome_sub,
  batch = "batch",
  assay = "peaks",
  model = "POISSONVI",
  train_params = list(max_epochs = 2L)
)
} # }