This function calculates the percentage of counts coming from features matching specified patterns (e.g., mitochondrial genes, ribosomal genes) and adds them as metadata columns to the Seurat object.
Usage
QCPatternFilter(
obj,
pattern = c("^MT-", "^mt-", "^RP[SL]", "^MT-|^RP[SL]"),
verbose = TRUE,
...
)Arguments
- obj
A seurat object.
- pattern
Character pattern to identify mitochondrial genes, ribosomal protein genes, or other unwanted genes, as well as combinations of these genes. Customized patterns are supported.
- verbose
logical, whether to print progress messages
- ...
Additional arguments passed to
PercentageFeatureSet
Details
The function automatically generates friendly column names based on the patterns:
"mt" for mitochondrial patterns
"rp" for ribosomal patterns
"rrna" for ribosomal RNA patterns
For combined patterns (using |), creates names like "mt_rp"
For other patterns, creates cleaned lowercase names
See also
Other single_cell_preprocess:
ClusterAndReduce(),
FilterTumorCell(),
FindRobustElbow(),
ProcessSeuratObject()