random.walk | R Documentation |
Function random.walk
is supposed to implement the original
Random Walk with Restart (RwR) on the input graph. If the seeds (i.e., a set
of starting nodes) are given, it intends to calculate the affinity score of
all nodes in the graph to the seeds.
random.walk( network, p0, edge_weight = FALSE, gamma = 0.7, threshold = 1e-10, pt.post.processing = "log", pt.align = "median", verbose = FALSE )
network |
The input graph object. It should be either an igraph object or an edge list matrix / data frame. |
p0 |
The starting vector on time t0. |
edge_weight |
Logical to indicate whether the input graph contains weight information. |
gamma |
The restart probability used for RwR. The |
threshold |
The threshold used for RwR. The |
pt.post.processing |
The way to scale the |
pt.align |
The way to normalize the output |
verbose |
Show the progress of the calculation. |
pt
vector
library(DTSEA) # Load the data data("example_disease_list", package = "DTSEA") data("example_drug_target_list", package = "DTSEA") data("example_ppi", package = "DTSEA") # Perform random walk p0 <- calculate_p0(nodes = example_ppi, disease = example_disease_list) pt <- random.walk(network = example_ppi, p0 = p0) # Perform GSEA analysis # .... # If you have obtained the supplemental data, then you can do random walk # with restart in the real data set # supp_data <- get_data(c("graph", "disease_related", "example_ppi")) # p0 <- calculate_p0(nodes = supp_data[["graph"]], # disease = supp_data[["disease_related"]]) # pt <- random.walk(network = supp_data[["example_ppi"]], # p0 = p0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.