Package Bio :: Package SCOP :: Class Node
[hide private]
[frames] | no frames]

Class Node

source code

object --+
         |
        Node
Known Subclasses:

A node in the Scop hierarchy.

Attributes:
Instance Methods [hide private]
 
__init__(self, scop=None)
Initialize a Node in the scop hierarchy.
source code
 
__str__(self)
Represent the node as a string.
source code
 
toHieRecord(self)
Return an Hie.Record.
source code
 
toDesRecord(self)
Return a Des.Record.
source code
 
getChildren(self)
Return a list of children of this Node.
source code
 
getParent(self)
Return the parent of this Node.
source code
 
getDescendents(self, node_type)
Return a list of all descendant nodes of the given type.
source code
 
getAscendent(self, node_type)
Return the ancenstor node of the given type, or None.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, scop=None)
(Constructor)

source code 

Initialize a Node in the scop hierarchy.

If a Scop instance is provided to the constructor, this will be used to lookup related references using the SQL methods. If no instance is provided, it is assumed the whole tree exists and is connected.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 
Represent the node as a string.
Overrides: object.__str__

getDescendents(self, node_type)

source code 

Return a list of all descendant nodes of the given type.

Node type can be a two letter code or longer description, e.g. 'fa' or 'family'.

getAscendent(self, node_type)

source code 

Return the ancenstor node of the given type, or None.

Node type can be a two letter code or longer description, e.g. 'fa' or 'family'.