filter_counts: Filter counts matrix using DropletUtils::emptyDropsCellRanger

View source: R/filter_counts.R

filter_countsR Documentation

Filter counts matrix using DropletUtils::emptyDropsCellRanger

Description

This function will filter a SingleCellExperiment object using DropletUtils::emptyDropsCellRanger() by default, or DropletUtils::emptyDrops(), as well as any associated alternative experiments. If mean expression and percent detected were previously calculated in the columns 'mean' and 'detected', respectively, these will be removed from both the main and alternative experiments.

Usage

filter_counts(
  sce,
  cr_like = TRUE,
  fdr_cutoff = 0.01,
  seed = NULL,
  umi_cutoff = 100,
  ...
)

Arguments

sce

SingleCellExperiment with unfiltered gene x cell counts matrix.

cr_like

Logical indicating whether or not to use DropletUtils::emptyDropsCellRanger. Default is set to TRUE.

fdr_cutoff

FDR cutoff to use for DropletUtils::emptyDropsCellRanger or DropletUtils::emptyDrops. Default is 0.01.

seed

An optional random seed for reproducibility.

umi_cutoff

The minimum UMI count for cells to pass filtering, only used if emptyDropsCellRanger or emptyDrops fails. Default is 100.

...

Any arguments to be passed into DropletUtils::emptyDropsCellRanger or DropletUtils::emptyDrops.

Value

SingleCellExperiment with filtered gene x cell matrix.

Examples

## Not run: 
filter_counts(sce = sce_object)

## End(Not run)

AlexsLemonade/scpcaTools documentation built on July 12, 2024, 8:34 a.m.