| ear | R Documentation |
EAR compares the enrichment score for each observed altered gene set (AGS)
with scores from n_perm equally sized random sets sampled without
replacement from the same eligible gene universe. The finite-sample
corrected empirical probability is (1 + n_exceed) / (n_perm + 1), where
n_exceed is the number of random scores greater than or equal to the
observed score.
ear(
universe,
n_perm = 100L,
ags,
fgs,
net = NULL,
method = c("nea", "ora"),
renderer_args = list(),
seed = NULL,
case_sensitive = FALSE,
na_replace = 0,
n_cores = 1L,
verbose = TRUE,
network_nodes_only = FALSE
)
universe |
Character vector of genes on which the observed sets are based and that are eligible for random controls. |
n_perm |
Positive integer number of controls per AGS. |
ags |
Named list of altered gene sets. |
fgs |
Named list of functional gene sets. |
net |
Network used for NEA. It is required when |
method |
Renderer used for calibration: |
renderer_args |
Named list of additional arguments forwarded to the selected renderer. EAR-managed inputs and options cannot be overridden. |
seed |
Optional integer seed for reproducible control sampling. |
case_sensitive |
Use case-sensitive identifier matching. |
na_replace |
Value used for zero observed NEA link counts. |
n_cores |
Positive integer passed to the selected renderer. ORA distributes functional-set rows. NEA accepts the value for consistency, although EAR does not request member matrices and its sparse calculations remain single-process matrix operations. |
verbose |
Report progress with |
network_nodes_only |
For NEA, whether to restrict the random-control
universe to genes present as network nodes. The default, |
Calibration uses the upper tail: an empirical p-value counts
random scores greater than or equal to the observed score. Q-values are
adjusted separately within each AGS column. AGSs of different sizes use
separate random reference banks. For NEA, the submitted gene universe is
used by default even when some genes are absent from the network. Set
network_nodes_only = TRUE to reproduce network-restricted sampling.
A nearender_result whose master score is the upper-tail empirical
probability matrix p.ear, available identically in scores$p.ear and
statistics$p.ear. statistics also contains the ordinary renderer
probabilities as p.trivial, their adjusted values as q.trivial, the
empirical adjusted values as q.ear, and every other ordinary renderer
statistic with a .trivial suffix. EAR settings are recorded in
parameters; reference-bank information is recorded in diagnostics.
nea.render(), ora.render(), samples2ags()
data("NEArender.test")
ags <- NEArender.test$AGS$CCLE[1]
fgs <- NEArender.test$FGS$Hallmarks[1:2]
universe <- unique(c(unlist(ags), unlist(fgs), paste0("control", 1:150)))
calibrated <- ear(universe, n_perm = 9, ags = ags, fgs = fgs,
method = "ora", seed = 1, verbose = FALSE)
calibrated$scores$p.ear
calibrated$statistics$p.trivial
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.