nea.render: Render altered gene sets as pathway-level network enrichment...

View source: R/render-nea.R

nea.renderR Documentation

Render altered gene sets as pathway-level network enrichment features

Description

Given altered gene sets (AGSs), functional gene sets (FGSs), and a global network, evaluate enrichment from the number of network edges connecting each AGS–FGS pair. Expected counts are calibrated from the degree sums of all member nodes under the null model. Edges confined within only the AGS or only the FGS do not contribute. Returned matrices have FGSs in rows and AGSs in columns. Observed and expected edge counts and two-sided chi-square p-values accompany the signed z-score used for downstream modelling. Q-values follow the enrichment convention: BH correction is applied to all two-sided p-values, after which depleted scores are assigned q-value 1.

Usage

nea.render(
  ags,
  fgs,
  net,
  case_sensitive = FALSE,
  na_replace = 0,
  verbose = TRUE,
  network_name = NULL,
  members = FALSE,
  n_cores = 1L
)

Arguments

ags

Named list of altered gene sets.

fgs

Named list of functional gene sets.

net

Undirected igraph network, or a legacy network with a named adjacency list in links and an edge count in Ntotal.

case_sensitive

Use case-sensitive identifier matching. By default, identifiers in AGS, FGS, and NET are matched case-insensitively.

na_replace

Value used for zero observed link counts.

verbose

Report progress with message().

network_name

Optional non-empty network name recorded in the result. When omitted, a name stored on net is used, if available.

members

Whether to return the potentially large members.ags and members.fgs matrices of connected identifiers.

n_cores

Positive integer number of worker processes used only to format member matrices when members = TRUE. Sparse matrix calculations are not distributed across workers.

Value

A nearender_result. scores$z is the signed standardized deviation of observed AGS–FGS edge counts from the degree-based null. statistics contains AGS and FGS cumulative degrees, observed (n.actual) and expected (n.expected) edge counts, chi-square statistics, two-sided p-values, and BH-adjusted enrichment q-values (depleted cells are set to 1). When members = TRUE, it also contains connected AGS and FGS member matrices. The master z matrix occurs identically in both scores and statistics; all other matrices occur only in statistics.

References

Alexeyenko A et al. (2012). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/1471-2105-13-226")}. Jeggari A and Alexeyenko A (2017). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/s12859-017-1534-y")}.

See Also

ora.render(), ear(), rwr.render(), pagerank.render(), texture.render(), spectral.render(), gsva.render(), samples2ags(), mutations2ags(), set.heat()

Examples

data("NEArender.test")
ags <- NEArender.test$AGS$CCLE[1:2]
fgs <- NEArender.test$FGS$Hallmarks[1:3]
net <- NEArender.test$NET$STRING.300K
nea <- nea.render(ags, fgs, net, verbose = FALSE)
nea$scores$z
nea$statistics$q

NEArender documentation built on Nov. 28, 2026, 5:10 p.m.