run_viper: VIPER wrapper

View source: R/viper_wrapper.R

run_viperR Documentation

VIPER wrapper

Description

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

Usage

run_viper(input, regulons, options = list(), tidy = FALSE, assay_key = "RNA")

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 more complex 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.

assay_key

Only applies if the input is a Seurat object. It selects the name of the assay from where to extract the normalized expression data.

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 appropriate 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 returned 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))

saezlab/dorothea documentation built on Feb. 24, 2024, 8:12 p.m.