Package Bio :: Package Nexus :: Module Nodes :: Class Chain
[hide private]
[frames] | no frames]

Class Chain

source code

object --+
         |
        Chain
Known Subclasses:

Stores a list of nodes that are linked together.

Instance Methods [hide private]
 
__init__(self)
Initiates a node chain: (self).
source code
 
_get_id(self)
Gets a new id for a node in the chain.
source code
 
all_ids(self)
Return a list of all node ids.
source code
 
add(self, node, prev=None)
Attaches node to another: (self, node, prev).
source code
 
collapse(self, id)
Deletes node from chain and relinks successors to predecessor: collapse(self, id).
source code
 
kill(self, id)
Kills a node from chain without caring to what it is connected: kill(self,id).
source code
 
unlink(self, id)
Disconnects node from his predecessor: unlink(self,id).
source code
 
link(self, parent, child)
Connects son to parent: link(self,son,parent).
source code
 
is_parent_of(self, parent, grandchild)
Check if grandchild is a subnode of parent: is_parent_of(self,parent,grandchild).
source code
 
trace(self, start, finish)
Returns a list of all node_ids between two nodes (excluding start, including end): trace(start,end).
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initiates a node chain: (self).

Overrides: object.__init__