Skip to contents

Assign cell cycle scores to cells. Scores are computed for each batch independantly.

Usage

CellCycleScoringPerBatch(
  object,
  batch.var = NULL,
  s.features,
  g2m.features,
  ctrl = NULL,
  assay = NULL,
  layer = NULL,
  ...
)

Arguments

object

A Seurat object

batch.var

The name of the batch variable (must be in the object metadata)

s.features

A vector of features associated with S phase

g2m.features

A vector of features associated with G2M phase

ctrl

Number of control features selected from the same bin per analyzed feature supplied to AddModuleScore. Defaults to value equivalent to minimum number of features present in 's.features' and 'g2m.features'.

assay

assay to use. Passed to Seurat to automatically construct the batch.var when not provided. Useless otherwise

layer

layer to use. Passed to Seurat to automatically construct the batch.var when not provided. Useless otherwise

...

Arguments to be passed to CellCycleScoring, then AddModuleScore (with the exception of set.ident which is always FALSE)

Value

A Seurat object with the following columns added to object meta data: S.Score, G2M.Score, and Phase

See also

CellCycleScoring to compute cc scores on the whole dataset.

Examples

if (FALSE) { # \dontrun{
obj <- SeuratData::LoadData("pbmcsca")
obj[["RNA"]] <- split(obj[["RNA"]], f = obj$Method)
obj <- NormalizeData(obj)
obj <- FindVariableFeatures(obj)
obj <- ScaleData(obj)
obj <- CellCycleScoringPerBatch(obj, batch.var = 'Method',
                                s.features = cc.genes.updated.2019$s.genes,
                                g2m.features = cc.genes.updated.2019$g2m.genes)

head(obj[[]])
} # }