run_ora {decoupleR} | R Documentation |
Over Representation Analysis (ORA)
Description
Calculates regulatory activities using ORA.
Usage
run_ora(
mat,
network,
.source = .data$source,
.target = .data$target,
n_up = 300,
n_bottom = 300,
n_background = 20000,
with_ties = TRUE,
...
)
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.
|
n_up |
Integer indicating the number of top targets to slice from mat.
|
n_bottom |
Integer indicating the number of bottom targets to slice from
mat.
|
n_background |
Integer indicating the background size of the sliced
targets. If not specified the number of background targets is determined by
the total number of unique targets in the union of mat and network .
|
with_ties |
Should ties be kept together? The default, TRUE ,
may return more rows than you request. Use FALSE to ignore ties,
and return the first n rows.
|
... |
Arguments passed on to stats::fisher.test
workspace an integer specifying the size of the workspace
used in the network algorithm. In units of 4 bytes. Only used for
non-simulated p-values larger than 2 by 2 tables.
Since R version 3.5.0, this also increases the internal stack size
which allows larger problems to be solved, however sometimes needing
hours. In such cases, simulate.p.values=TRUE may be more
reasonable.
hybrid a logical. Only used for larger than 2 by 2
tables, in which cases it indicates whether the exact probabilities
(default) or a hybrid approximation thereof should be computed.
hybridPars a numeric vector of length 3, by default describing
“Cochran's conditions” for the validity of the chisquare
approximation, see ‘Details’.
control a list with named components for low level algorithm
control. At present the only one used is "mult" , a positive
integer ≥ 2 with default 30 used only for larger than
2 by 2 tables. This says how many times as much
space should be allocated to paths as to keys: see file
‘fexact.c’ in the sources of this package.
or the hypothesized odds ratio. Only used in the
2 by 2 case.
alternative indicates the alternative hypothesis and must be
one of "two.sided" , "greater" or "less" .
You can specify just the initial letter. Only used in the
2 by 2 case.
conf.int logical indicating if a confidence interval for the
odds ratio in a 2 by 2 table should be
computed (and returned).
conf.level confidence level for the returned confidence
interval. Only used in the 2 by 2 case and if
conf.int = TRUE .
simulate.p.value a logical indicating whether to compute
p-values by Monte Carlo simulation, in larger than 2 by 2 tables.
B an integer specifying the number of replicates used in the
Monte Carlo test.
|
Details
Performs an over-representation analysis using stats::fisher.test()
.
Obtained scores are -log10(p-values).
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).
See Also
Other decoupleR statistics:
decouple()
,
run_aucell()
,
run_fgsea()
,
run_gsva()
,
run_mdt()
,
run_mlm()
,
run_udt()
,
run_ulm()
,
run_viper()
,
run_wmean()
,
run_wsum()
Examples
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_ora(mat, network, .source='tf')
[Package
decoupleR version 1.99.5
Index]