R/Generics.R
, R/LIGER_Utilities.R
, R/Object_Utilities.R
Add_Mito_Ribo.Rd
Add Mito, Ribo, & Mito+Ribo percentages to meta.data slot of Seurat Object or cell.data slot of Liger object
Add_Mito_Ribo(object, ...)
# S3 method for liger
Add_Mito_Ribo(
object,
species,
mito_name = "percent_mito",
ribo_name = "percent_ribo",
mito_ribo_name = "percent_mito_ribo",
mito_pattern = NULL,
ribo_pattern = NULL,
mito_features = NULL,
ribo_features = NULL,
ensembl_ids = FALSE,
overwrite = FALSE,
list_species_names = FALSE,
...
)
# S3 method for Seurat
Add_Mito_Ribo(
object,
species,
mito_name = "percent_mito",
ribo_name = "percent_ribo",
mito_ribo_name = "percent_mito_ribo",
mito_pattern = NULL,
ribo_pattern = NULL,
mito_features = NULL,
ribo_features = NULL,
ensembl_ids = FALSE,
assay = NULL,
overwrite = FALSE,
list_species_names = FALSE,
...
)
Seurat or LIGER object
Arguments passed to other methods
Species of origin for given Seurat Object. If mouse, human, marmoset, zebrafish, rat, drosophila, or rhesus macaque (name or abbreviation) are provided the function will automatically generate mito_pattern and ribo_pattern values.
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".
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 mouse, human, or marmoset).
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).
logical, whether feature names in the object are gene names or ensembl IDs (default is FALSE; set TRUE if feature names are ensembl IDs).
Logical. Whether to overwrite existing meta.data columns. Default is FALSE meaning that
function will abort if columns with any one of the names provided to mito_name
ribo_name
or
mito_ribo_name
is present in meta.data slot.
returns list of all accepted values to use for default species names which contain internal regex/feature lists (human, mouse, marmoset, zebrafish, rat, drosophila, and rhesus macaque). Default is FALSE.
Assay to use (default is the current object default assay).
An object of the same class as object
with columns added to object meta data.
if (FALSE) {
# Liger
liger_object <- Add_Mito_Ribo(object = liger_object, species = "human")
}
if (FALSE) {
# Seurat
seurat_object <- Add_Mito_Ribo(object = seurat_object, species = "human")
}