quickPerCellQC {scater} | R Documentation

## Quick cell-level QC

### Description

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

### Usage

    quickPerCellQC(df, lib_size = "sum", n_features = "detected",
      percent_subsets = NULL, ...)

### Arguments

`df` | A DataFrame containing per-cell QC statistics, as computed by `perCellQCMetrics`.
`lib_size` | String specifying the column of `df` containing the library size for each cell.
`n_features` | String specifying the column of `df` containing the number of detected features per cell.
`percent_subsets` | String specifying the column(s) of `df` containing the percentage of counts in subsets of “control features”.
`...` | Further arguments to pass to `isOutlier`.

### Details

This function simply calls `isOutlier` on the various QC metrics in `df`.

- For `lib_size`, small outliers are detected on the log-scale to remove cells with low library sizes.

- For `n_features`, small outliers are detected on the log-scale to remove cells with few detected features.

- For each field in `percent_subsets`, large outliers are detected on the original scale. This aims to remove cells with high spike-in or mitochondrial content.

Users can change the number of MADs used to define an outlier or specify batches by passing appropriate arguments to `...`.

### 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

    example_sce <- mockSCE()
    df <- perCellQCMetrics(example_sce, subsets=list(Mito=1:100))

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

[Package scater version 1.14.0 Index]