decouple {decoupleR}R Documentation

Evaluate multiple statistics with same input data

Description

Calculate the source activity per sample out of a gene expression matrix by coupling a regulatory network with a variety of statistics.

Usage

decouple(
  mat,
  network,
  .source = .data$source,
  .target = .data$target,
  statistics = c("udt", "mdt", "aucell", "wmean", "wsum", "ulm", "mlm", "viper",
    "gsva", "ora", "fgsea"),
  args = list(NULL),
  consensus_score = TRUE,
  include_time = FALSE,
  show_toy_call = FALSE
)

Arguments

mat

Matrix to evaluate (e.g. expression matrix). Target nodes in rows and conditions in columns. rownames(mat) must have at least one intersection with the elements in network .target column.

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 statistics (or length 1). The default argument, list(NULL), will be recycled to the same length as statistics, and will call each function with no arguments (apart from mat, network, .source and, .target).

consensus_score

Boolean whether to run a consensus score between methods. Obtained scores are -log10(p-values).

include_time

Should the time per statistic evaluated be informed?

show_toy_call

The call of each statistic must be informed?

Value

A long format tibble of the enrichment scores for each source across the samples. Resulting tibble contains the following columns:

  1. run_id: Indicates the order in which the methods have been executed.

  2. statistic: Indicates which method is associated with which score.

  3. source: Source nodes of network.

  4. condition: Condition representing each column of mat.

  5. score: Regulatory activity (enrichment score).

  6. statistic_time: If requested, internal execution time indicator.

  7. p_value: p-value (if available) of the obtained score.

See Also

Other decoupleR statistics: run_aucell(), run_fgsea(), run_gsva(), run_mdt(), run_mlm(), run_ora(), run_udt(), run_ulm(), run_viper(), run_wmean(), run_wsum()

Examples

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", "wmean", "wsum", "ulm", "aucell"),
        args = list(
            gsva = list(verbose = FALSE),
            wmean = list(.mor = "mor", .likelihood = "likelihood"),
            wsum = list(.mor = "mor"),
            ulm = list(.mor = "mor")
        )
    )
}

[Package decoupleR version 1.99.5 Index]