run_viper: VIPER wrapper

View source: R/viper_wrapper.R

run_viperR Documentation

VIPER wrapper

Description

This function is a convenient wrapper for the viper function using DoRothEA regulons.

Usage

run_viper(input, regulons, options = list(), tidy = FALSE)

Arguments

input

An object containing a gene expression matrix with genes (HGNC/MGI symbols) in rows and samples in columns. The object can be a simple matrix/data frame or complexer objects such as ExpressionSet Seurat or SingleCellExperiment objects.

regulons

DoRothEA regulons in table format.

options

A list of named options to pass to viper such as minsize or method. These options should not include, eset or regulon.

tidy

Logical, whether computed tf activities scores should be returned in a tidy format.

Value

A matrix of normalized enrichment scores for each TF across all samples. Of note, if you provide Bioconductor objects as input the function will return this object with added tf activities at appropiate slots. e.g. Seurat object with a new assay called dorothea. For all other inputs the function will return a matrix. If tidy is TRUE the normalized enrichment scores are retured in a tidy format (not supported for Bioconductor objects).

Examples

# use example gene expression matrix from bcellViper package
library(bcellViper)
data(bcellViper, package = "bcellViper")
# acessing (human) dorothea regulons
# for mouse regulons: data(dorothea_mm, package = "dorothea")
data(dorothea_hs, package = "dorothea")
# run viper
tf_activities <- run_viper(dset, dorothea_hs,
                          options =  list(method = "scale", minsize = 4,
                          eset.filter = FALSE, cores = 1,
                          verbose = FALSE))

t-stei/dorothea documentation built on March 19, 2022, 7:26 a.m.