run_wsum {decoupleR} | R Documentation |
Calculates regulatory activities by computing the WSUM
run_wsum( mat, network, .source = .data$source, .target = .data$target, .mor = .data$mor, .likelihood = .data$likelihood, times = 100, 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. |
Infers activity score for each regulator by weighting the molecular readouts
of its targets by their mode of regulations and likelihoods. In addition, it
runs permutations to calculate empirical p-values, providing normalized
(z-score) and corrected activity (estimate * -log10(p-value)) scores. This is
represented in the statistic
column which will contain three values for
each call to run_wsum()
; wsum, norm_wsum and corr_wsum.
A long format tibble of the enrichment scores for each source across the samples. Resulting tibble contains the following columns:
statistic
: Indicates which method is associated with which score.
source
: Source nodes of network
.
condition
: Condition representing each column of mat
.
score
: Regulatory activity (enrichment score).
p_value
: p-value for the score of the method.
Other decoupleR statistics:
decouple()
,
run_aucell()
,
run_fgsea()
,
run_gsva()
,
run_mdt()
,
run_mlm()
,
run_ora()
,
run_udt()
,
run_ulm()
,
run_viper()
,
run_wmean()
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_wsum(mat, network, .source='tf')