quickPerCellQC: Quick cell-level QC

Description Usage Arguments Details Value Author(s) See Also Examples

Description

A convenient utility that identifies low-quality cells based on frequently used QC metrics.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
quickPerCellQC(x, ...)

## S4 method for signature 'ANY'
quickPerCellQC(
  x,
  sum.field = "sum",
  detected.field = "detected",
  sub.fields = NULL,
  ...,
  lib_size = NULL,
  n_features = NULL,
  percent_subsets = NULL
)

## S4 method for signature 'SummarizedExperiment'
quickPerCellQC(
  x,
  ...,
  subsets = NULL,
  assay.type = "counts",
  other.args = list()
)

Arguments

x

A DataFrame containing per-cell QC statistics, as computed by perCellQCMetrics. Alternatively, a SummarizedExperiment object that can be used to create such a DataFrame via perCellQCMetrics.

...

For the generic, further arguments to pass to specific methods.

For the ANY method, further arguments to pass to isOutlier.

For the SummarizedExperiment method, further arguments to pass to the ANY method.

sum.field

String specifying the column of x containing the library size for each cell.

detected.field

String specifying the column of x containing the number of detected features per cell.

sub.fields

Character vector specifying the column(s) of x containing the percentage of counts in subsets of “control features”, usually mitochondrial genes or spike-in transcripts.

If set to TRUE, this will default to all columns in x with names following the patterns "subsets_.*_percent" and "altexps_.*_percent".

lib_size, n_features, percent_subsets

Soft-deprecated equivalents of the arguments above.

subsets, assay.type

Arguments to pass to the perCellQCMetrics function, exposed here for convenience.

other.args

A named list containing other arguments to pass to the perCellQCMetrics function.

Details

The ANY method simply calls isOutlier on the various QC metrics in x.

Users can control the outlier detection (e.g., change the number of MADs, specify batches) by passing appropriate arguments to ....

The SummarizedExperiment method calls perCellQCMetrics before running outlier detection. This is simply a convenient wrapper that avoids the need for two separate function calls in routine applications.

Value

A DataFrame with one row per cell and containing columns of logical vectors. Each column specifies a reason for why a cell was considered to be low quality, with the final discard column indicating whether the cell should be discarded.

Author(s)

Aaron Lun

See Also

perCellQCMetrics, for calculation of these metrics.

isOutlier, to identify outliers with a MAD-based approach.

Examples

1
2
3
4
5
6
example_sce <- mockSCE()
x <- perCellQCMetrics(example_sce, subsets=list(Mito=1:100))

discarded <- quickPerCellQC(x, percent_subsets=c(
    "subsets_Mito_percent", "altexps_Spikes_percent"))
colSums(as.data.frame(discarded))

scuttle documentation built on Dec. 19, 2020, 2 a.m.