SplitSeurat: Split Seurat

View source: R/SeuratUtils.R

SplitSeuratR Documentation

Split Seurat

Description

Split a seurat object, dividing into new objects based on the value of a field

Usage

SplitSeurat(
  seuratObj,
  splitField,
  minCellsToKeep = 0.02,
  naOtherLabel = "Other",
  excludedClasses = NULL,
  appendLowFreqToOther = TRUE,
  alwaysRetainOtherClass = FALSE
)

Arguments

seuratObj

The seurat object

splitField

The name of the field on which to split the object

minCellsToKeep

If any of the resulting seurat objects have less than this many cells, they will be discarded. If this value is less than 1, it will be interpreted as a fraction of the total input cells.

naOtherLabel

This string will be used to label any cells marked NA.

excludedClasses

Any cells with these labels will be lumped into the NA/Other bin.

appendLowFreqToOther

If true, any cells with NAs for the splitField, or terms with fewer than minCellsToKeep, will be merged into a single seurat object

alwaysRetainOtherClass

If true, even if the number of cells is less than minCellsToKeep, this class with be retained.


bimberlabinternal/CellMembrane documentation built on Nov. 15, 2024, 9:34 p.m.