Skip to contents

Constructor for the various Scrublet parameters. In this case, the default for the kNN graph generation was set to "hnsw" as this algorithm showed the best performance in different empirical benchmarks.

Usage

params_scrublet(
  sim_doublet_ratio = 1.5,
  expected_doublet_rate = 0.1,
  stdev_doublet_rate = 0.02,
  n_bins_histogram = 100L,
  manual_threshold = NULL,
  normalisation = list(),
  hvg = list(),
  pca = list(),
  knn = list(k = 0L)
)

Arguments

sim_doublet_ratio

Numeric. Number of doublets to simulate relative to the number of observed cells. For example, 2.0 simulates twice as many doublets as there are cells. Defaults to 1.5.

expected_doublet_rate

Numeric. Expected doublet rate for the experiment, typically 0.05-0.10 depending on cell loading. Must be between 0 and 1. Defaults to 0.1.

stdev_doublet_rate

Numeric. Uncertainty in the expected doublet rate. Defaults to 0.02.

n_bins_histogram

Integer. Number of bins for histogram-based automatic threshold detection. Typically 50-100. Defaults to 100L.

manual_threshold

Numeric or NULL. Manual doublet score threshold. If NULL (default), threshold is automatically detected from simulated doublet score distribution. Defaults to NULL.

normalisation

List. Optional overrides for normalisation parameters. See params_norm_doublets_defaults() for available parameters: log_transform, mean_center, normalise_variance, target_size. See params_norm_doublets_defaults() for the available elements. Defaults to list().

hvg

List. Optional overrides for highly variable gene selection parameters. See params_hvg_defaults() for available parameters: min_gene_var_pctl, hvg_method, loess_span, clip_max. See params_hvg_defaults() for the available elements. Defaults to list().

pca

List. Optional overrides for PCA parameters. See params_pca_defaults() for available parameters: no_pcs, random_svd, sparse and skip_first_pc. See params_pca_defaults() for the available elements. Defaults to list().

knn

List. Optional overrides for kNN parameters. See params_knn_defaults() for available parameters: k, knn_method, ann_dist, search_budget, n_trees, delta, diversify_prob, ef_budget, extract_knn, m, ef_construction, ef_search, n_list and n_probe. Note: this function defaults to k = 0L (automatic neighbour detection). See params_knn_defaults() for the available elements. Defaults to list(k = 0L).

Value

A named list with the following elements:

  • The elements of params_norm_doublets_defaults(), overridden by normalisation, spliced in at this position.

  • The elements of params_hvg_defaults(), overridden by hvg, spliced in at this position.

  • The elements of params_pca_defaults(), overridden by pca, spliced in at this position.

  • The elements of params_knn_defaults(), overridden by knn, spliced in at this position.

  • sim_doublet_ratio - Numeric. Number of doublets to simulate relative to the number of observed cells. For example, 2.0 simulates twice as many doublets as there are cells. Defaults to 1.5.

  • expected_doublet_rate - Numeric. Expected doublet rate for the experiment, typically 0.05-0.10 depending on cell loading. Must be between 0 and 1. Defaults to 0.1.

  • stdev_doublet_rate - Numeric. Uncertainty in the expected doublet rate. Defaults to 0.02.

  • n_bins_histogram - Integer. Number of bins for histogram-based automatic threshold detection. Typically 50-100. Defaults to 100L.

  • manual_threshold - Numeric or NULL. Manual doublet score threshold. If NULL (default), threshold is automatically detected from simulated doublet score distribution. Defaults to NULL.