% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Generics.R, R/LIGER_Utilities.R,
%   R/Utilities_QC_Seurat.R
\name{Add_Mito_Ribo}
\alias{Add_Mito_Ribo}
\alias{Add_Mito_Ribo.liger}
\alias{Add_Mito_Ribo.Seurat}
\title{Add Mito and Ribo percentages}
\usage{
Add_Mito_Ribo(object, ...)

\method{Add_Mito_Ribo}{liger}(
  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,
  ...
)

\method{Add_Mito_Ribo}{Seurat}(
  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,
  species_prefix = NULL,
  ...
)
}
\arguments{
\item{object}{Seurat or LIGER object}

\item{...}{Arguments passed to other methods}

\item{species}{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 mito_pattern and ribo_pattern values.}

\item{mito_name}{name to use for the new meta.data column containing percent mitochondrial counts.
Default is "percent_mito".}

\item{ribo_name}{name to use for the new meta.data column containing percent ribosomal counts.
Default is "percent_ribo".}

\item{mito_ribo_name}{name to use for the new meta.data column containing percent
mitochondrial+ribosomal counts.  Default is "percent_mito_ribo".}

\item{mito_pattern}{A regex pattern to match features against for mitochondrial genes (will set automatically if
species is mouse, human, zebrafish, rat, drosophila, rhesus macaque, or chicken;
marmoset features list saved separately).}

\item{ribo_pattern}{A regex pattern to match features against for ribosomal genes
(will set automatically if species is mouse, human, marmoset, zebrafish, rat,
drosophila, rhesus macaque, or chicken).}

\item{mito_features}{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).}

\item{ribo_features}{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).}

\item{ensembl_ids}{logical, whether feature names in the object are gene names or
ensembl IDs (default is FALSE; set TRUE if feature names are ensembl IDs).}

\item{overwrite}{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 \code{mito_name} \code{ribo_name} or
\code{mito_ribo_name} is present in meta.data slot.}

\item{list_species_names}{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.}

\item{assay}{Assay to use (default is the current object default assay).}

\item{species_prefix}{the species prefix in front of gene symbols in object if providing two species for
multi-species aligned dataset.}
}
\value{
An object of the same class as \code{object} with columns added to object meta data.
}
\description{
Add Mito, Ribo, & Mito+Ribo percentages to meta.data slot of Seurat Object or
cell.data slot of Liger object
}
\examples{
\dontrun{
# Liger
liger_object <- Add_Mito_Ribo(object = liger_object, species = "human")
}

\dontrun{
# Seurat
seurat_object <- Add_Mito_Ribo(object = seurat_object, species = "human")
}

}
\concept{liger_object_util}
\concept{qc_util}
