| rwr.render | R Documentation |
Nodes in each AGS define a uniform restart distribution. Steady-state node
affinities are summed over the members of each FGS. This sparse-matrix
implementation follows the dnet::dRWR() algorithm without requiring the
dnet package at run time.
rwr.render(
ags,
fgs,
net,
restart = 0.75,
normalise = c("laplacian", "column", "row", "none"),
tol = 1e-06,
max_iter = 50L,
use_edge_weights = FALSE,
case_sensitive = FALSE,
verbose = TRUE
)
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 |
restart |
Restart probability in |
normalise |
Adjacency normalization method. The |
tol |
Positive L1 convergence tolerance. |
max_iter |
Positive maximum iteration count. |
use_edge_weights |
Use the igraph |
case_sensitive |
Use case-sensitive identifier matching. By default, identifiers in AGS, FGS, and NET are matched case-insensitively. |
verbose |
Report progress with |
Node-affinity vectors are stored as columns and updated by left
multiplication with the transition matrix. Under this convention,
normalise = "column" constructs A D^-1, whose columns sum to one, so
each source node distributes its probability among its neighbors.
normalise = "row" constructs D^-1 A, whose rows sum to one; when applied
to column vectors, this is a different, non-probability-conserving
propagation rule. For an undirected network the two matrices are transposes,
but they coincide only when connected nodes have equal degrees. The
dnet::dRWR() interface used the opposite labels; NEArender names the
options for the margin of the resulting transition matrix that is actually
normalized.
With use_edge_weights = FALSE, every retained edge has equal
weight. With TRUE, the non-negative igraph weight attribute is
normalized according to normalise to derive propagation coefficients;
for normalise = "column", these are transition probabilities. The
returned affinities are relative scores, not p- or q-values.
A nearender_result. scores$rwr is an FGS-by-AGS matrix whose
cells sum steady-state node affinity over the corresponding FGS;
statistics$rwr is the identical master score matrix.
diagnostics reports mapped input sizes, convergence, and iteration
count; parameters records restart, normalization, tolerance, iteration
limit, weight use, and identifier case policy.
Fang H, Gough J (2014). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/s13073-014-0064-8")}.
pagerank.render(), nea.render(), spectral.render()
edges <- data.frame(from = c("A", "A", "B"), to = c("B", "C", "C"),
confidence = c(5, 1, 2))
net <- import_network(edges, "from", "to", "confidence",
species = NULL, input_id_format = "custom", verbose = FALSE)
ags <- list(sample = "a")
fgs <- list(pathway_b = "b", pathway_c = "c")
rwr <- rwr.render(ags, fgs, net, verbose = FALSE)
rwr$scores$rwr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.