View source: R/statistic-wsum.R
run_wsum | R Documentation |
Calculates regulatory activities using WSUM.
run_wsum(
mat,
network,
.source = source,
.target = target,
.mor = mor,
.likelihood = likelihood,
times = 100,
seed = 42,
sparse = TRUE,
randomize_type = "rows",
minsize = 5
)
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 |
Deprecated argument. Now it will always be set to 1. |
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. |
minsize |
Integer indicating the minimum number of targets per source. |
WSUM infers regulator activities by first multiplying each target feature by
its associated weight which then are summed to an enrichment score
wsum
. Furthermore, permutations of random target features can be
performed to obtain a null distribution that can be used to compute a z-score
norm_wsum
, or a corrected estimate corr_wsum
by multiplying
wsum
by the minus log10 of the obtained empirical p-value.
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, "mat.rds"))
net <- readRDS(file.path(inputs_dir, "net.rds"))
run_wsum(mat, net, minsize=0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.