runGeneralQC | R Documentation |
Calculate number of UMIs, number of detected features and percentage of feature subset (e.g. mito, ribo and hemo) expression per cell.
runGeneralQC(
object,
organism,
features = NULL,
pattern = NULL,
overwrite = FALSE,
useDatasets = NULL,
chunkSize = 1000,
verbose = getOption("ligerVerbose", TRUE),
mito = NULL,
ribo = NULL,
hemo = NULL
)
This function by default calculates:
nUMI
- The column sum of the raw data matrix per cell.
Represents the total number of UMIs per cell if given raw counts.
nGene
- Number of detected features per cell
mito
- Percentage of mitochondrial gene expression per cell
ribo
- Percentage of ribosomal gene expression per cell
hemo
- Percentage of hemoglobin gene expression per cell
Users can also specify their own feature subsets with argument
features
, or regular expression patterns that match to genes of
interests with argument pattern
, to calculate the expression
percentage. If a character vector is given to features
, a QC metric
variable named "featureSubset_name"
will be computed. If a named list
of multiple subsets is given, the names will be used as the variable names.
If a single pattern is given to pattern
, a QC metric variable named
"featureSubset_pattern"
will be computed. If a named list of multiple
patterns is given, the names will be used as the variable names.
Duplicated QC metric names between these two arguments and the default
five listed above should be avoided.
This function is automatically operated at the creation time of each
liger object to capture the raw status. Argument
overwrite
is set to FALSE by default to avoid mistakenly updating
existing metrics after filtering the object. Users can still opt to update
all newly calculated metrics (including the default five) by setting
overwrite = TRUE
, or only some of newly calculated ones by providing
a character vector of the names of the metrics to update. Intended
overwriting only happens to datasets selected with useDatasets
.
Updated object
with the cellMeta(object)
updated as
intended by users. See Details for more information.
pbmc <- runGeneralQC(pbmc, "human", overwrite = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.