Quality control metrics
Usage
metrics(object, ...)
metricsPerSample(object, ...)
# S4 method for SingleCellExperiment
metrics(object)
# S4 method for SingleCellExperiment
metricsPerSample(object, fun = c("mean", "median", "sum"))
Functions
metrics(SingleCellExperiment)
: Cell-level metrics.metricsPerSample(SingleCellExperiment)
: Sample-level metrics.
Examples
data(SingleCellExperiment_splatter, package = "AcidTest")
## SingleCellExperiment ====
object <- SingleCellExperiment_splatter
object <- AcidExperiment::calculateMetrics(object)
#> → Calculating 400 sample metrics.
#> ℹ 99 coding features detected.
#> ℹ 0 mitochondrial features detected.
x <- metrics(object)
print(x)
#> DataFrame with 400 rows and 9 columns
#> sampleId nCount nFeature nCoding nMito log10FeaturesPerCount
#> <factor> <integer> <integer> <integer> <integer> <numeric>
#> cell001 sample3 68372 96 67542 NA 0.409994
#> cell002 sample3 81627 100 80709 NA 0.407180
#> cell003 sample4 80480 100 79333 NA 0.407690
#> cell004 sample1 55425 99 54891 NA 0.420691
#> cell005 sample2 38535 97 37910 NA 0.433239
#> ... ... ... ... ... ... ...
#> cell396 sample3 73967 99 73085 NA 0.409862
#> cell397 sample4 48600 97 47905 NA 0.423923
#> cell398 sample3 54041 100 53276 NA 0.422590
#> cell399 sample3 69971 99 69183 NA 0.411903
#> cell400 sample2 48907 99 48150 NA 0.425566
#> mitoRatio sampleName interestingGroups
#> <numeric> <factor> <factor>
#> cell001 NA sample3 sample3
#> cell002 NA sample3 sample3
#> cell003 NA sample4 sample4
#> cell004 NA sample1 sample1
#> cell005 NA sample2 sample2
#> ... ... ... ...
#> cell396 NA sample3 sample3
#> cell397 NA sample4 sample4
#> cell398 NA sample3 sample3
#> cell399 NA sample3 sample3
#> cell400 NA sample2 sample2
x <- metricsPerSample(object, fun = "mean")
#> → Calculating mean per sample.
print(x)
#> DataFrame with 4 rows and 8 columns
#> sampleName interestingGroups nCount nFeature nCoding nMito
#> <factor> <factor> <numeric> <numeric> <numeric> <numeric>
#> sample3 sample3 sample3 59947.3 98.2479 59157.5 NA
#> sample4 sample4 sample4 62774.9 98.3636 61911.8 NA
#> sample1 sample1 sample1 61158.4 98.3158 60284.0 NA
#> sample2 sample2 sample2 60788.5 98.4062 59964.3 NA
#> log10FeaturesPerCount mitoRatio
#> <numeric> <numeric>
#> sample3 0.417950 NA
#> sample4 0.416312 NA
#> sample1 0.417373 NA
#> sample2 0.417641 NA