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)

# S4 method for SingleCellExperiment
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.

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

Note

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

Updated 2020-01-20.

Author

Michael Steinbaugh, Rory Kirchner

Examples

data(SingleCellExperiment, package = "AcidTest") ## SingleCellExperiment ==== object <- SingleCellExperiment x <- calculateMetrics(object)
#> → Calculating 100 sample metrics.
#> 496 coding features detected.
#> 0 mitochondrial features detected.
print(x)
#> class: SingleCellExperiment #> dim: 500 100 #> metadata(1): date #> assays(1): counts #> rownames(500): gene001 gene002 ... gene499 #> gene500 #> rowData names(8): broadClass description ... #> geneName seqCoordSystem #> colnames(100): cell001 cell002 ... cell099 #> cell100 #> colData names(7): sampleID nCount ... #> log10FeaturesPerCount mitoRatio #> reducedDimNames(0): #> altExpNames(0):