| decouple {decoupleR} | R Documentation |
Calculate the TF activity per sample out of a gene expression matrix by coupling a regulon network with a variety of statistics.
decouple( mat, network, .source, .target, statistics, args = list(NULL), include_time = FALSE, show_toy_call = FALSE )
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. |
statistics |
Statistical methods to be coupled. |
args |
A list of argument-lists the same length as |
include_time |
Should the time per statistic evaluated be informed? |
show_toy_call |
The call of each statistic must be informed? |
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).
statistic_time: If requested, internal execution time indicator.
...: Columns of metadata generated by certain statistics.
Other decoupleR statistics:
run_gsva(),
run_mean(),
run_ora(),
run_pscira(),
run_scira(),
run_viper()
if (FALSE) {
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"))
decouple(
mat = mat,
network = network,
.source = "tf",
.target = "target",
statistics = c("gsva", "mean", "pscira", "scira", "viper"),
args = list(
gsva = list(verbose = FALSE),
mean = list(.mor = "mor", .likelihood = "likelihood"),
pscira = list(.mor = "mor"),
scira = list(.mor = "mor"),
viper = list(
.mor = "mor",
.likelihood = "likelihood",
verbose = FALSE
)
)
)
}