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.
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.
source code
 
collapse(self, id)
Deletes node from chain and relinks successors to predecessor.
source code
 
kill(self, id)
Kills a node from chain without caring to what it is connected.
source code
 
unlink(self, id)
Disconnects node from his predecessor.
source code
 
link(self, parent, child)
Connects son to parent.
source code
 
is_parent_of(self, parent, grandchild)
Check if grandchild is a subnode of parent.
source code
 
trace(self, start, finish)
Returns a list of all node_ids between two nodes (excluding start, including 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.

Overrides: object.__init__