R/Generics.R
, R/LIGER_Utilities.R
, R/QC_Utilities_Seurat.R
Add_Cell_QC_Metrics.Rd
Add Mito/Ribo %, Cell Complexity (log10GenesPerUMI), Top Gene Percent with single function call to Seurat or liger objects.
Add_Cell_QC_Metrics(object, ...)
# S3 method for liger
Add_Cell_QC_Metrics(
object,
add_mito_ribo = TRUE,
add_complexity = TRUE,
add_top_pct = TRUE,
add_MSigDB = TRUE,
add_IEG = TRUE,
add_hemo = TRUE,
add_cell_cycle = TRUE,
species,
mito_name = "percent_mito",
ribo_name = "percent_ribo",
mito_ribo_name = "percent_mito_ribo",
complexity_name = "log10GenesPerUMI",
top_pct_name = NULL,
oxphos_name = "percent_oxphos",
apop_name = "percent_apop",
dna_repair_name = "percent_dna_repair",
ieg_name = "percent_ieg",
hemo_name = "percent_hemo",
mito_pattern = NULL,
ribo_pattern = NULL,
hemo_pattern = NULL,
mito_features = NULL,
ribo_features = NULL,
hemo_features = NULL,
ensembl_ids = FALSE,
num_top_genes = 50,
assay = NULL,
list_species_names = FALSE,
overwrite = FALSE,
...
)
# S3 method for Seurat
Add_Cell_QC_Metrics(
object,
species,
add_mito_ribo = TRUE,
add_complexity = TRUE,
add_top_pct = TRUE,
add_MSigDB = TRUE,
add_IEG = TRUE,
add_hemo = TRUE,
add_cell_cycle = TRUE,
mito_name = "percent_mito",
ribo_name = "percent_ribo",
mito_ribo_name = "percent_mito_ribo",
complexity_name = "log10GenesPerUMI",
top_pct_name = NULL,
oxphos_name = "percent_oxphos",
apop_name = "percent_apop",
dna_repair_name = "percent_dna_repair",
ieg_name = "percent_ieg",
hemo_name = "percent_hemo",
mito_pattern = NULL,
ribo_pattern = NULL,
hemo_pattern = NULL,
mito_features = NULL,
ribo_features = NULL,
hemo_features = NULL,
ensembl_ids = FALSE,
num_top_genes = 50,
assay = NULL,
list_species_names = FALSE,
overwrite = FALSE,
...
)
Seurat or LIGER object
Arguments passed to other methods
logical, whether to add percentage of counts belonging to mitochondrial/ribosomal genes to object (Default is TRUE).
logical, whether to add Cell Complexity to object (Default is TRUE).
logical, whether to add Top Gene Percentages to object (Default is TRUE).
logical, whether to add percentages of counts belonging to genes from of mSigDB hallmark gene lists: "HALLMARK_OXIDATIVE_PHOSPHORYLATION", "HALLMARK_APOPTOSIS", and "HALLMARK_DNA_REPAIR" to object (Default is TRUE).
logical, whether to add percentage of counts belonging to IEG genes to object (Default is TRUE).
logical, whether to add percentage of counts belonging to homoglobin genes to object (Default is TRUE).
logical, whether to addcell cycle scores and phase based on
CellCycleScoring
. Only applicable if species = "human"
. (Default is TRUE).
Species of origin for given Seurat Object. If mouse, human, marmoset, zebrafish, rat, drosophila, rhesus macaque, or chicken (name or abbreviation) are provided the function will automatically generate patterns and features.
name to use for the new meta.data column containing percent mitochondrial counts. Default is "percent_mito".
name to use for the new meta.data column containing percent ribosomal counts. Default is "percent_ribo".
name to use for the new meta.data column containing percent mitochondrial+ribosomal counts. Default is "percent_mito_ribo".
name to use for new meta data column for Add_Cell_Complexity
.
Default is "log10GenesPerUMI".
name to use for new meta data column for Add_Top_Gene_Pct
.
Default is "percent_topXX", where XX is equal to the value provided to num_top_genes
.
name to use for new meta data column for percentage of MSigDB oxidative phosphorylation counts. Default is "percent_oxphos".
name to use for new meta data column for percentage of MSigDB apoptosis counts. Default is "percent_apop".
name to use for new meta data column for percentage of MSigDB DNA repair counts. Default is "percent_dna_repair"..
name to use for new meta data column for percentage of IEG counts. Default is "percent_ieg".
name to use for the new meta.data column containing percent hemoglobin counts. Default is "percent_mito".
A regex pattern to match features against for mitochondrial genes (will set automatically if species is mouse or human; marmoset features list saved separately).
A regex pattern to match features against for ribosomal genes (will set automatically if species is in default list).
A regex pattern to match features against for hemoglobin genes (will set automatically if species is in default list).
A list of mitochondrial gene names to be used instead of using regex pattern. Will override regex pattern if both are present (including default saved regex patterns).
A list of ribosomal gene names to be used instead of using regex pattern. Will override regex pattern if both are present (including default saved regex patterns).
A list of hemoglobin gene names to be used instead of using regex pattern. Will override regex pattern if both are present (including default saved regex patterns).
logical, whether feature names in the object are gene names or ensembl IDs (default is FALSE; set TRUE if feature names are ensembl IDs).
An integer vector specifying the size(s) of the top set of high-abundance genes. Used to compute the percentage of library size occupied by the most highly expressed genes in each cell.
assay to use in calculation. Default is "RNA". Note This should only be changed if storing corrected and uncorrected assays in same object (e.g. outputs of both Cell Ranger and Cell Bender).
returns list of all accepted values to use for default species names which contain internal regex/feature lists (human, mouse, marmoset, zebrafish, rat, drosophila, rhesus macaque, and chicken). Default is FALSE.
Logical. Whether to overwrite existing an meta.data column. Default is FALSE meaning that
function will abort if column with name provided to meta_col_name
is present in meta.data slot.
A liger Object
A Seurat Object
if (FALSE) {
obj <- Add_Cell_QC_Metrics(object = obj, species = "Human")
}
if (FALSE) {
obj <- Add_Cell_QC_Metrics(object = obj, species = "Human")
}