| cellQC | R Documentation |
Quality control on cells
cellQC( sce, spike, threshold = 0, mad_sum = 5, mad_detected = 3, mad_spikegenes = 5 )
sce |
SingleCellExperiment with |
spike |
the character name of spike genes.
If missing, |
threshold |
A numeric scalar specifying the threshold above which a gene is considered to be detected. |
mad_sum |
A numeric scalar specifying exceed how many median absolute deviations from the median log10-counts a cell is considered to be filtered out. Default is 5. |
mad_detected |
A numeric scalar specifying exceed how many median absolute deviations from the median detected features a cell is considered to be filtered out. Default is 5. |
mad_spikegenes |
A numeric scalar specifying exceed how many median absolute deviations from the median spike genes expression percentage a cell is considered to be filtered out. Default is 5. |
A DataFrame of QC statistics includes
sum the sum of counts of each cell
detected the number of features above threshold
spikePercent the percentage of counts assignes to spike genes
filter_sum indicate whether log10-counts
within mad_sum median absolute deviations
from the median log10-counts for the dataset
filter_detected indicate whether features detected by this cell
within mad_detected median absolute deviations
from the median detected features for the dataset
filter_spike indicate whether percentage expressed by spike genes
within mad_spikegenes median absolute deviations from the median
spike genes expression percentage for the dataset
sce <- makeSimulatedData()
sce <- preprocess(sce)
cellQCmetrics <- cellQC(sce)
keep_cell <- (
cellQCmetrics$filter_sum | # sufficient features (genes)
# sufficient molecules counted
cellQCmetrics$filter_detected |
# sufficient features expressed compared to spike genes
cellQCmetrics$filter_spike
)
sce <- sce[, keep_cell]
# or manually setting threshold
cellQCmetrics <- cellQC(sce,
spike = "Ercc",
mad_detected = 4, mad_spikegenes = 4
)
keep_cell <- (
cellQCmetrics$sum > 2.4 |
cellQCmetrics$detected > 110
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.