IMP logo
IMP Reference Guide  develop.49f026e7cd,2024/12/04
The Integrative Modeling Platform
IMP.spatiotemporal.graphNode.graphNode Class Reference

A class to represent a node in a spatiotemporal process. More...

Detailed Description

A class to represent a node in a spatiotemporal process.

Each graphNode contains a list of it's component subcoplexes, an array of scores, a time index and a list of pointers to nodes to which edges coming from this node point.

Note
This class is only available in Python.

Definition at line 12 of file graphNode.py.

Public Member Functions

def __init__
 Initialize a node. More...
 
def __repr__
 String representation of a graphNode. More...
 
def add_edge
 Add a directed edge to the node. More...
 
def add_score
 Update the score list by appending score. More...
 
def get_edges
 Return the list of edges for this node. More...
 
def get_index
 Return the node's index. More...
 
def get_label
 Return the node's index. More...
 
def get_scores
 Return the scores array. More...
 
def get_subcomplex_components
 Return a list of subcomplexes in this node's representation. More...
 
def get_time
 Return the time associated with this node. More...
 
def get_weight
 Return the weight of the node. More...
 
def init_graphNode
 Function that initiates a graph node with specific time, label, and expected_subcomplexes. More...
 
def set_expected_subcomplexes
 Set the list of possible subcomplex components. More...
 
def set_index
 Set an index to label node's identity. More...
 
def set_label
 Set an index to label node's identity. More...
 
def set_scores
 Set the score data for this node. More...
 
def set_subcomplex_components
 Set the list of subcomplex components. More...
 
def set_time
 Set the time. More...
 

Constructor & Destructor Documentation

def IMP.spatiotemporal.graphNode.graphNode.__init__ (   self)

Initialize a node.

Definition at line 17 of file graphNode.py.

Member Function Documentation

def IMP.spatiotemporal.graphNode.graphNode.__repr__ (   self)

String representation of a graphNode.

Definition at line 29 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.add_edge (   self,
  edge 
)

Add a directed edge to the node.

Expects a graphNode object.

Definition at line 127 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.add_score (   self,
  score 
)

Update the score list by appending score.

Definition at line 161 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.get_edges (   self)

Return the list of edges for this node.

Definition at line 139 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.get_index (   self)

Return the node's index.

Definition at line 81 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.get_label (   self)

Return the node's index.

Definition at line 92 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.get_scores (   self)

Return the scores array.

Definition at line 171 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.get_subcomplex_components (   self)

Return a list of subcomplexes in this node's representation.

Definition at line 103 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.get_time (   self)

Return the time associated with this node.

Definition at line 149 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.get_weight (   self)

Return the weight of the node.

A weight refers in this case to the sum score of the scores list.

Definition at line 97 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.init_graphNode (   self,
  time,
  label,
  scorestr,
  subcomplexstr,
  expected_subcomplexes 
)

Function that initiates a graph node with specific time, label, and expected_subcomplexes.

Scores and components are extracted from files named scorestr and subcomplexstr respectively. Returns a single graphNode object.

Parameters
timestring, time point in the stepwise temporal process
labelstring, a number label for the graphNode
scorestrstring, trailing characters at the end of the file with scores for each stage of the spatiotemporal model
subcomplexstrstring, trailing characters after the subcomplex file, which is a list of subcomplexes included in the given label/time
expected_subcomplexeslist of all possible subcomplex strings in the model

Definition at line 45 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.set_expected_subcomplexes (   self,
  expected_subcomplexes 
)

Set the list of possible subcomplex components.

Should include all possible components across the entire spatiotemporal model

Definition at line 120 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.set_index (   self,
  index 
)

Set an index to label node's identity.

Definition at line 76 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.set_label (   self,
  label 
)

Set an index to label node's identity.

Definition at line 87 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.set_scores (   self,
  scores 
)

Set the score data for this node.

Expects an list of floats which represent the total score array.

Definition at line 154 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.set_subcomplex_components (   self,
  scs,
  fn 
)

Set the list of subcomplex components.

Should be one of the standard used components.

Definition at line 108 of file graphNode.py.

def IMP.spatiotemporal.graphNode.graphNode.set_time (   self,
  time 
)

Set the time.

Definition at line 144 of file graphNode.py.


The documentation for this class was generated from the following file: