Calculate quality control metrics

calculateMetrics(object, ...)

# S4 method for matrix
calculateMetrics(object, rowRanges = NULL, prefilter = FALSE)

# S4 method for Matrix
calculateMetrics(object, rowRanges = NULL, prefilter = FALSE)

# S4 method for RangedSummarizedExperiment
calculateMetrics(object, prefilter = FALSE)

Arguments

object

Object.

rowRanges

GRanges or GRangesList. Genomic ranges (e.g. genome annotations). Metadata describing the assay rows.

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.

...

Additional arguments.

Value

  • matrix / Matrix: DataFrame containing metrics.

  • SummarizedExperiment: Modified object, with metrics in colData().

Details

Input a raw count matrix. Do not use size factor adjusted or log normalized counts here.

Note

Updated 2020-02-03.

Author

Michael Steinbaugh, Rory Kirchner

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"