|
IMP Reference Guide
develop.169ea894ba,2025/11/01
The Integrative Modeling Platform
|
Functions to traverse and score the spatiotemporal graphs. More...
Functions to traverse and score the spatiotemporal graphs.
Functions | |
| def | find_all_paths |
| Finds all paths between nodes, which already have edges drawn between them. More... | |
| def | get_graph_as_dict |
| converts a list of graphNode objects (nodes), which have been initiated with scores and edges into a dictionary representation of a graph (graph). More... | |
| def | score_graph |
| Function to score a graph based on nodes, which has scores and edges, as well as keys, which is a list of the states visited. More... | |
| def IMP.spatiotemporal.score_graph.find_all_paths | ( | graph, | |
| start, | |||
| end, | |||
path = [] |
|||
| ) |
Finds all paths between nodes, which already have edges drawn between them.
| graph | dictionary representation of the graph, acquired in get_graph_as_dict() |
| start | graphNode, candidate for starting the graph |
| end | graphNode, candidate to end the graph |
| path | list of graphNodes on the path, which is defined recursively. |
Definition at line 26 of file score_graph.py.
| def IMP.spatiotemporal.score_graph.get_graph_as_dict | ( | nodes | ) |
converts a list of graphNode objects (nodes), which have been initiated with scores and edges into a dictionary representation of a graph (graph).
Each node in the graph is a key, which returns edges in the next state.
| nodes | list of graphNode objects |
Definition at line 13 of file score_graph.py.
| def IMP.spatiotemporal.score_graph.score_graph | ( | nodes, | |
| keys | |||
| ) |
Function to score a graph based on nodes, which has scores and edges, as well as keys, which is a list of the states visited.
Note that all edges must be drawn and scores must be added to nodes before calling this function.
| nodes | list of graphNode objects, which has been initialized with all weights and edges |
| keys | list of all ordered states (strings) visited along the graph. Paths will be determined in sequential order passed to this function. |
Definition at line 56 of file score_graph.py.