Calculate quality control metrics
Source:R/AllGenerics.R
, R/calculateMetrics-methods.R
calculateMetrics.Rd
Calculate quality control metrics
Usage
calculateMetrics(object, ...)
# S4 method for Matrix
calculateMetrics(object, rowData = NULL, prefilter = FALSE)
# S4 method for SummarizedExperiment
calculateMetrics(object, assay = 1L, prefilter = FALSE)
# S4 method for matrix
calculateMetrics(object, rowData = NULL, prefilter = FALSE)
Arguments
- object
Object.
- rowData
DataFrame
. Metadata describing the assay rows, if genomic ranges are not available. UserowRanges
(GenomicRanges
) instead, if possible.- prefilter
logical(1)
. Drop very low quality samples/cells from the object. This can resize the number of columns but the rows (i.e. features) do not change with this operation.- assay
vector(1)
. Assay name or index position.- ...
Additional arguments.
Value
matrix
/Matrix
:DFrame
containing metrics.SummarizedExperiment
: Modified object, with metrics incolData()
.
Examples
data(RangedSummarizedExperiment, package = "AcidTest")
## SummarizedExperiment ====
object <- RangedSummarizedExperiment
names(SummarizedExperiment::colData(object))
#> [1] "condition"
object <- calculateMetrics(object)
#> → Calculating 12 sample metrics.
#> ℹ 497 coding features detected.
#> ℹ 0 mitochondrial features detected.
names(SummarizedExperiment::colData(object))
#> [1] "condition" "nCount" "nFeature"
#> [4] "nCoding" "nMito" "log10FeaturesPerCount"
#> [7] "mitoRatio"