Package Bio :: Package config :: Module DBRegistry :: Class IndexedFileDB
[hide private]
[frames] | no frames]

Class IndexedFileDB

source code

Registry.RegisterableObject --+    
                              |    
                       DBObject --+
                                  |
                                 IndexedFileDB

Return SeqRecord objects from an indexed file.

This module deals with both flat file and BerkeleyDB indexes. These indexed files can be created by any of the compliant indexing implementations from Biopython, BioPerl, BioJava, etc...

Instance Methods [hide private]
 
__init__(self, name, dbname, doc='')
Intialize with information about loading the database.
source code
 
_load_database(self, name)
Get a connection with the given database.
source code
 
_get_check_names(self, given_name, db)
Get a list of all namespaces to search for the file under.
source code
data
_get(self, key)
Do the database retrieval of the sequence, returning a handle.
source code
another data type
_convert_to(self, handle, to_io) source code

Inherited from DBObject: __getitem__, get, get_as, set

Inherited from DBObject (private): _make_pickleable, _set, _unmake_pickleable

Method Details [hide private]

__init__(self, name, dbname, doc='')
(Constructor)

source code 

Intialize with information about loading the database.

dbname is the name of the database to open. This will likely be a filesystem path to a database directory.

Overrides: Registry.RegisterableObject.__init__

_get_check_names(self, given_name, db)

source code 

Get a list of all namespaces to search for the file under.

If given_name is a valid key, then it is returned as the only thing to check. Otherwise, we go forward and check all possible namespaces.

_get(self, key)

source code 

Do the database retrieval of the sequence, returning a handle.

Returns: data
Overrides: DBObject._get

_convert_to(self, handle, to_io)

source code 
Returns: another data type
Overrides: DBObject._convert_to
(inherited documentation)