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

sunid -- SCOP unique identifiers. e.g. '14986'

parent -- The parent node

children -- A list of child nodes

sccs -- SCOP concise classification string. e.g. 'a.1.1.2'

type -- A 2 letter node type code. e.g. 'px' for domains

description --

Instance Methods [hide private]
 
__init__(self, scop=None)
Create a Node in the scop hierarchy.
source code
 
__str__(self)
str(x)
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 decendent nodes of the given type.
source code
 
getAscendent(self, node_type)
Return the ancenstor node of the given type, or None.Node type can a two letter code or longer description.
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 
Create 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 
str(x)

Overrides: object.__str__
(inherited documentation)

getDescendents(self, node_type)

source code 
Return a list of all decendent nodes of the given type. Node type can 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 a two letter code or longer description. e.g. 'fa' or 'family'