quickPerCellQC {scater} | R Documentation |
A convenient utility that identifies low-quality cells based on frequently used QC metrics.
quickPerCellQC( df, lib_size = "sum", n_features = "detected", percent_subsets = NULL, ... )
df |
A DataFrame containing per-cell QC statistics, as computed by |
lib_size |
String specifying the column of |
n_features |
String specifying the column of |
percent_subsets |
String specifying the column(s) of |
... |
Further arguments to pass to |
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 ...
.
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.
Aaron Lun
perCellQCMetrics
, for calculation of these metrics.
isOutlier
, to identify outliers with a MAD-based approach.
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))