process_seurat: Process a 'Seurat' object

View source: R/process_seurat.R

process_seuratR Documentation

Process a Seurat object

Description

Run a standardised Seurat pipeline on a Seurat object or raw counts and meta.data.
Automatically performs

FindVariableFeatures

Variable feature selection

NormalizeData

Data normalization

RunPCA

PCA

RunUMAP

UMAP

FindNeighbors

K-nearest neighbors

FindClusters

Clustering

Usage

process_seurat(
  obj = NULL,
  meta.data = NULL,
  nfeatures = 2000,
  vars.to.regress = NULL,
  dims = seq(50),
  add_specificity = FALSE,
  default_assay = NULL,
  n.components = 2L,
  log_norm = FALSE,
  cluster_reduction = "umap",
  workers = 1,
  max_mem = 8000 * 1024^2,
  seed = 2020,
  verbose = TRUE
)

Arguments

obj

A single-cell object supported by scKirby. See converters for a table of all supported conversions.

meta.data

Additional cell-level metadata to add to the Seurat object. Should be a data.frame where the rows are cell names and the columns are additional metadata fields. Row names in the metadata need to match the column names of the counts matrix.

nfeatures

Number of features to select as top variable features; only used when selection.method is set to 'dispersion' or 'vst'

vars.to.regress

Variables to regress out (previously latent.vars in RegressOut). For example, nUMI, or percent.mito.

dims

Which dimensions to use as input features, used only if features is NULL

add_specificity

Add a new assay called "specificity" by deriving specificity scores from the input data.

default_assay

Default assay to set with DefaultAssay.

n.components

The dimension of the space to embed into.

log_norm

Log-normalise the data with LogNormalize.

cluster_reduction

Recompute neighbors graph based on UMAP to get clusters that best reflect UMAP space. For this same reason, only cluster in two dimensions, because this is the view we most often use. That said, this may reduce the generalisability of these clusters/graph.

workers

Number of workers (threads) to parallelise processes across using future.

max_mem

Max limit on memory usage, to be passed to environmental variable future.globals.maxSize.

seed

Random seed to set.

verbose

Print messages.

Value

A preprocessed Seurat object.

Examples

obj <- example_obj("list")
obj2 <- process_seurat(obj = obj)

bschilder/scKirby documentation built on Oct. 2, 2024, 10:16 p.m.