Learn R Programming

rliger (version 1.0.1)

getProportionMito: 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-")

Value

Named vector containing proportion of mitochondrial contribution for each cell.

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.

Examples

Run this code
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-")

Run the code above in your browser using DataLab