getProportionMito: Calculate proportion mitochondrial contribution

View source: R/rliger.R

getProportionMitoR Documentation

Calculate proportion mitochondrial contribution

Description

Calculates proportion of mitochondrial contribution based on raw or normalized data.

Usage

getProportionMito(object, use.norm = FALSE, mito.pattern = "^mt-")

Arguments

object

liger object.

use.norm

Whether to use cell normalized data in calculating contribution (default FALSE).

mito.pattern

Regex pattern for identifying mitochondrial genes. Default "^mt-" typically goes for mouse. May use "^MT-" for human.

Value

Named vector containing proportion of mitochondrial contribution for each cell.

Examples

ligerex <- createLiger(list(ctrl = ctrl, stim = stim))
# Expect a warning because the test data does not contain mito genes
ligerex@cell.data$mito <- getProportionMito(ligerex, mito.pattern = "^MT-")

rliger documentation built on Nov. 9, 2023, 1:07 a.m.