find_all_paths | R Documentation |
Finds all paths up to length 'maxlen' between specified groups of vertices. This function is needed only becaues igraph's 'all_shortest_paths' finds only the shortest, not any path up to a defined length.
find_all_paths(
graph,
start,
end,
attr = NULL,
mode = 'OUT',
maxlen = 2,
progress = TRUE
)
graph |
An igraph graph object. |
start |
Integer or character vector with the indices or names of one or more start vertices. |
end |
Integer or character vector with the indices or names of one or more end vertices. |
attr |
Character: name of the vertex attribute to identify the vertices by. Necessary if 'start' and 'end' are not igraph vertex ids but for example vertex names or labels. |
mode |
Character: IN, OUT or ALL. Default is OUT. |
maxlen |
Integer: maximum length of paths in steps, i.e. if maxlen = 3, then the longest path may consist of 3 edges and 4 nodes. |
progress |
Logical: show a progress bar. |
List of vertex paths, each path is a character or integer vector.
interaction_graph
enzsub_graph
giant_component
interactions <- import_omnipath_interactions()
graph <- interaction_graph(interactions)
paths <- find_all_paths(
graph = graph,
start = c('EGFR', 'STAT3'),
end = c('AKT1', 'ULK1'),
attr = 'name'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.