Skip to contents

BBKNN integration function

Usage

BBKNN_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,
  do_scaling = TRUE,
  vars_to_regress = NULL,
  regression_model = "linear",
  scale_within_batch = FALSE,
  linear_reduction = "pca",
  linear_reduction_dims = 50,
  linear_reduction_dims_use = NULL,
  linear_reduction_params = list(),
  force_linear_reduction = FALSE,
  nonlinear_reduction = "umap",
  nonlinear_reduction_dims = c(2, 3),
  nonlinear_reduction_params = list(),
  force_nonlinear_reduction = TRUE,
  cluster_algorithm = "louvain",
  cluster_resolution = 0.6,
  bbknn_params = list(),
  verbose = TRUE,
  seed = 11,
  backend = c("cpp", "python")
)

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.

do_scaling

Force scaling via ScaleData.

vars_to_regress

A vector of variable names to include as additional regression variables.

regression_model

"linear", "poisson", or "negativebinomial".

scale_within_batch

Scale within each batch. Only used by "Uncorrected", "Seurat", "MNN", "Harmony", "BBKNN", "CSS", "ComBat".

linear_reduction, linear_reduction_dims, linear_reduction_dims_use, linear_reduction_params, force_linear_reduction

Linear reduction ("pca", "svd", "ica", "nmf", "mds", "glmpca"). linear_reduction_dims_use = NULL uses estimated dimensions, else the first 50.

nonlinear_reduction, nonlinear_reduction_dims, nonlinear_reduction_params, force_nonlinear_reduction

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

cluster_algorithm, cluster_resolution

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

bbknn_params

A list of parameters for the bbknn.matrix.bbknn function, default is an empty list.

verbose

Whether to print the message. Default is TRUE.

seed

Random seed.

backend

BBKNN graph backend. `"cpp"` uses the compiled cross-batch KNN graph implementation; `"python"` retains the official bbknn package.