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

Class Astral

source code

object --+
         |
        Astral

Representation of the ASTRAL database.

Abstraction of the ASTRAL database, which has sequences for all the SCOP domains, as well as clusterings by percent id or evalue.

Instance Methods [hide private]
 
__init__(self, dir_path=None, version=None, scop=None, astral_file=None, db_handle=None)
Initialize the astral database.
source code
 
domainsClusteredByEv(self, id)
Get domains clustered by evalue.
source code
 
domainsClusteredById(self, id)
Get domains clustered by percentage identity.
source code
 
getAstralDomainsFromFile(self, filename=None, file_handle=None)
Get the scop domains from a file containing a list of sids.
source code
 
getAstralDomainsFromSQL(self, column)
Load ASTRAL domains from the MySQL database.
source code
 
getSeqBySid(self, domain)
Get the seq record of a given domain from its sid.
source code
 
getSeq(self, domain)
Return seq associated with domain.
source code
 
hashedDomainsById(self, id)
Get domains clustered by sequence identity in a dict.
source code
 
hashedDomainsByEv(self, id)
Get domains clustered by evalue in a dict.
source code
 
isDomainInId(self, dom, id)
Return true if the domain is in the astral clusters for percent ID.
source code
 
isDomainInEv(self, dom, id)
Return true if the domain is in the ASTRAL clusters for evalues.
source code
 
writeToSQL(self, db_handle)
Write the ASTRAL database to a MYSQL 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, dir_path=None, version=None, scop=None, astral_file=None, db_handle=None)
(Constructor)

source code 

Initialize the astral database.

You must provide either a directory of SCOP files:
  • dir_path - string, the path to location of the scopseq-x.xx directory

    (not the directory itself), and

  • version -a version number.

or, a FASTA file:
  • astral_file - string, a path to a fasta file (which will be loaded in memory)
or, a MYSQL database:
  • db_handle - a database handle for a MYSQL database containing a table 'astral' with the astral data in it. This can be created using writeToSQL.
Overrides: object.__init__

getAstralDomainsFromSQL(self, column)

source code 

Load ASTRAL domains from the MySQL database.

Load a set of astral domains from a column in the astral table of a MYSQL database (which can be created with writeToSQL(...).