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

Class Scop

source code

object --+
         |
        Scop

The entire SCOP hierarchy.

root -- The root node of the hierarchy

Instance Methods [hide private]
 
__init__(self, cla_handle=None, des_handle=None, hie_handle=None, dir_path=None, db_handle=None, version=None)
Build the SCOP hierarchy from the SCOP parsable files, or a sql backend.
source code
 
getRoot(self) source code
 
getDomainBySid(self, sid)
Return a domain from its sid
source code
 
getNodeBySunid(self, sunid)
Return a node from its sunid
source code
 
getDomains(self)
Returns an ordered tuple of all SCOP Domains
source code
 
write_hie(self, handle)
Build an HIE SCOP parsable file from this object
source code
 
write_des(self, handle)
Build a DES SCOP parsable file from this object
source code
 
write_cla(self, handle)
Build a CLA SCOP parsable file from this object
source code
 
getDomainFromSQL(self, sunid=None, sid=None)
Load a node from the SQL backend using sunid or sid
source code
 
getAscendentFromSQL(self, node, type)
Get ascendents using SQL backend
source code
 
getDescendentsFromSQL(self, node, type)
Get descendents of a node using the database backend.
source code
 
write_hie_sql(self, handle)
Write HIE data to SQL database
source code
 
write_cla_sql(self, handle)
Write CLA data to SQL database
source code
 
write_des_sql(self, handle)
Write DES data to SQL database
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, cla_handle=None, des_handle=None, hie_handle=None, dir_path=None, db_handle=None, version=None)
(Constructor)

source code 
Build the SCOP hierarchy from the SCOP parsable files, or a sql backend.

If no file handles are given, then a Scop object with a single
empty root node is returned.

If a directory and version are given (with dir_path=.., version=...) or
file handles for each file, the whole scop tree will be built in memory.

If a MySQLdb database handle is given, the tree will be built as needed,
minimising construction times.  To build the SQL database to the methods
write_xxx_sql to create the tables.

Overrides: object.__init__

getDescendentsFromSQL(self, node, type)

source code 
Get descendents of a node using the database backend.  This avoids
repeated iteration of SQL calls and is therefore much quicker than
repeatedly calling node.getChildren().