pagerank.render: Render gene sets by personalized PageRank

View source: R/render-walks.R

pagerank.renderR Documentation

Render gene sets by personalized PageRank

Description

Nodes in each AGS supply a uniform personalization vector to igraph::page_rank(). PageRank probabilities are summed over each FGS.

Usage

pagerank.render(
  ags,
  fgs,
  net,
  damping = 0.15,
  use_edge_weights = FALSE,
  case_sensitive = FALSE,
  n_cores = 1L,
  verbose = TRUE
)

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.

damping

PageRank damping factor in the interval ⁠(0, 1)⁠. Increasing it raises the probability of following network edges, lowers the implicit restart probability 1 - damping, and permits longer-range diffusion. Thus its direction is opposite to increasing restart in rwr.render().

use_edge_weights

Use the igraph weight edge attribute to determine transition probabilities. The default is FALSE because imported edge weights may encode evidence or confidence rather than a transition model.

case_sensitive

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

n_cores

Positive integer number of worker processes. Independent AGS personalization vectors are distributed across workers when greater than one.

verbose

Report progress with message().

Details

With use_edge_weights = FALSE, NEArender explicitly suppresses igraph's automatic use of a weight attribute. With TRUE, each source node's edge weights are normalized to transition probabilities by PageRank. Returned pathway affinities are relative scores, not p- or q-values.

Value

A nearender_result. scores$pagerank is an FGS-by-AGS matrix obtained by summing personalized PageRank probabilities over each FGS; statistics$pagerank is the identical master score matrix. diagnostics reports original and mapped AGS/FGS sizes, and parameters records damping, edge-weight use, case policy, and workers.

See Also

rwr.render(), nea.render(), spectral.render()

Examples

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")
page <- pagerank.render(ags, fgs, net, verbose = FALSE)
page$scores$pagerank

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