Learn R Programming

Seurat (version 2.3.4)

FilterCells: Return a subset of the Seurat object

Description

Creates a Seurat object containing only a subset of the cells in the original object. Takes either a list of cells to use as a subset, or a parameter (for example, a gene), to subset on.

Usage

FilterCells(object, subset.names, low.thresholds, high.thresholds,
  cells.use = NULL)

Arguments

object

Seurat object

subset.names

Parameters to subset on. Eg, the name of a gene, PC1, a column name in object@meta.data, etc. Any argument that can be retreived using FetchData

low.thresholds

Low cutoffs for the parameters (default is -Inf)

high.thresholds

High cutoffs for the parameters (default is Inf)

cells.use

A vector of cell names to use as a subset

Value

Returns a Seurat object containing only the relevant subset of cells

Examples

Run this code
# NOT RUN {
head(x = FetchData(object = pbmc_small, vars.all = 'LTB'))
pbmc_filtered <- FilterCells(
  object = pbmc_small,
  subset.names = 'LTB',
  high.thresholds = 6
)
head(x = FetchData(object = pbmc_filtered, vars.all = 'LTB'))

# }

Run the code above in your browser using DataLab