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

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)
#> Loading required package: Biobase
#> Loading required package: BiocGenerics
#> 
#> Attaching package: ‘BiocGenerics’
#> The following objects are masked from ‘package:stats’:
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from ‘package:base’:
#> 
#>     Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
#>     as.data.frame, basename, cbind, colnames, dirname, do.call,
#>     duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
#>     lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
#>     pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
#>     tapply, union, unique, unsplit, which.max, which.min
#> Welcome to Bioconductor
#> 
#>     Vignettes contain introductory material; view with
#>     'browseVignettes()'. To cite Bioconductor, see
#>     'citation("Biobase")', and for packages 'citation("pkgname")'.
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))
#> Warning: This function is deprecated, please check the package decoupleR to infer activities.