filterCells: Filter cells

Description Usage Arguments Details Value Note Examples

Description

Filter cells

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
filterCells(object, ...)

## S4 method for signature 'SingleCellExperiment'
filterCells(
  object,
  minCounts = 1L,
  maxCounts = Inf,
  minFeatures = 1L,
  maxFeatures = Inf,
  minNovelty = 0L,
  maxMitoRatio = 1L,
  minCellsPerFeature = 1L,
  nCells = Inf,
  countsCol = "nCount",
  featuresCol = "nFeature",
  noveltyCol = "log10FeaturesPerCount",
  mitoRatioCol = "mitoRatio"
)

Arguments

object

Object.

minCounts, maxCounts

integer(1). Minimum/maximum number of counts per cell. Applies to UMI disambiguated counts for droplet scRNA-seq. Matches nUMI then nCount column in colData() internally. Previously named minUMIs/maxUMIs in bcbioSingleCell.

minFeatures, maxFeatures

integer(1). Minimum/maximum number of features (i.e. genes) detected. Matches nFeaturein colData() internally. Previously named minGenes/maxGenes in bcbioSingleCell.

minNovelty

integer(1) (0-1). Minimum novelty score (log10 features per UMI). Matches log10FeaturesPerCount then log10FeaturesPerUMI (legacy) colData() internally.

maxMitoRatio

integer(1) (0-1). Maximum relative mitochondrial abundance.

minCellsPerFeature

integer(1). Include genes with non-zero expression in at least this many cells. Previously named minCellsPerGene in bcbioSingleCell.

nCells

integer(1). Expected number of cells per sample. Don't set this by default, unless you're confident of your capture.

countsCol, featuresCol, noveltyCol, mitoRatioCol

character(1). Column mapping name.

...

Additional arguments.

Details

Apply feature (i.e. gene/transcript) detection, novelty score, and mitochondrial abundance cutoffs to cellular barcodes. By default we recommend applying the same filtering cutoff to all samples. The filtering parameters now support per-sample cutoffs, defined using a named numeric vector. When matching per sample, be sure to use the sampleNames() return values (i.e. the sampleName column in sampleData()).

Filtering information gets slotted into metadata() as filterCells metadata.

Value

SingleCellExperiment.

Note

Updated 2020-01-20.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(SingleCellExperiment, package = "acidtest")

## SingleCellExperiment ====
object <- SingleCellExperiment
x <- filterCells(object)
print(x)

## Per sample cutoffs.
sampleNames(object)
x <- filterCells(
    object = object,
    minCounts = c(sample1 = 100L)
)
print(x)

acidgenomics/basejump documentation built on Aug. 15, 2020, 10:21 a.m.