Skip to contents

Generate single-cell reference (`screference`) object

Usage

new_screference(
  seurat_obj,
  annot_id,
  batch_id = NULL,
  project_name = "project",
  cache_path = "scref_cache",
  sample_cells = NULL,
  seed = NULL
)

Arguments

seurat_obj

a reference Seurat object

annot_id

the column name of the Seurat object metadata containing the reference annotation

batch_id

NULL or a column name of the Seurat object metadata containing information about batch to be used as batch information downstream. Examples of batch are patient ID, study ID, etc.

project_name

a string indicating the project name, used for caching

cache_path

path to the directory where results will be cached.

sample_cells

NULL or a named vector with how many cells to randomly sub-sample of each population. Sub-sampling can make the object significantly smaller and accelerate downstream computation, but make the results less accurate.

seed

an integer representing a "seed", for reproducibility of sub-sampling.

Value

an object of class `screference`