run_mean {decoupleR} | R Documentation |
Calculate the activity of all regulons in network
through the conditions in
the mat
matrix by calculating the mean over the expression of all genes.
run_mean( mat, network, .source = .data$tf, .target = .data$target, .mor = .data$mor, .likelihood = .data$likelihood, times = 2, seed = 42, sparse = TRUE, randomize_type = "rows" )
mat |
Matrix to evaluate (e.g. expression matrix).
Target nodes in rows and conditions in columns.
|
network |
Tibble or dataframe with edges and it's associated metadata. |
.source |
Column with source nodes. |
.target |
Column with target nodes. |
.mor |
Column with edge mode of regulation (i.e. mor). |
.likelihood |
Column with edge likelihood. |
times |
How many permutations to do? |
seed |
A single value, interpreted as an integer, or NULL for random number generation. |
sparse |
Should the matrices used for the calculation be sparse? |
randomize_type |
How to randomize the expression matrix. |
run_mean()
calculates the activity score, but in addition, it takes
advantage of the permutations used to calculate the p-value
, to provide
the normalized activity score. This is represented in the statistic
column
which will contain two values for each call to run_mean()
; mean and
normalized_mean.
A long format tibble of the enrichment scores for each tf across the samples. Resulting tibble contains the following columns:
statistic
: Indicates which method is associated with which score.
tf
: Source nodes of network
.
condition
: Condition representing each column of mat
.
score
: Regulatory activity (enrichment score).
p_value
: p-value for the score of mean method.
Other decoupleR statistics:
decouple()
,
run_gsva()
,
run_ora()
,
run_pscira()
,
run_scira()
,
run_viper()
inputs_dir <- system.file("testdata", "inputs", package = "decoupleR") mat <- readRDS(file.path(inputs_dir, "input-expr_matrix.rds")) network <- readRDS(file.path(inputs_dir, "input-dorothea_genesets.rds")) run_mean(mat, network, tf, target, mor, likelihood)