add_cell_mito_qc: Calculate QC metrics for all reads and mitochondrial subset...

View source: R/add_cell_mito_qc.R

add_cell_mito_qcR Documentation

Calculate QC metrics for all reads and mitochondrial subset for each cell in a SingleCellExperiment

Description

Calculate QC metrics for all reads and mitochondrial subset for each cell in a SingleCellExperiment

Usage

add_cell_mito_qc(sce, mito, miQC = FALSE, ...)

Arguments

sce

SingleCellExperiment object.

mito

Character vector of mitochondrial gene names in the same format as rownames of SingleCellExperiment object.

miQC

Logical indicating whether or not to calculate the posterior probability of a cell being compromised using the linear mixture model in miQC. Default is FALSE.

...

Any additional arguments to be passed to scuttle::addPerCellQCMetrics.

Value

SingleCellExperiment with colData slot containing calculated QC metrics. Columns include sum, detected, mito_sum, mito_detected, mito_percent, and total.

Examples

## Not run: 
# add per cell QC metrics using only genes detected > 5% of cells
add_cell_mito_qc(
  sce = sce,
  mito = mito_genes,
  threshold = 5
)

## End(Not run)

AlexsLemonade/scpcaTools documentation built on July 12, 2024, 8:34 a.m.