Allow a GenBank file to be accessed using a dictionary interface.
Methods
|
|
__getattr__
__getitem__
__init__
__len__
keys
|
|
__getattr__
|
__getattr__ ( self, name )
|
|
__getitem__
|
__getitem__ ( self, key )
Retrieve an item from the dictionary.
|
|
__init__
|
__init__ (
self,
index_file,
parser=None,
)
Initialize and open up a GenBank dictionary.
Arguments:
o index_file - The name of the file that servers as the dictionary
index. You need to use the index_file function in this module
to creat this index.
o parser - An optional argument specifying a parser object that
the records should be run through before returning the output. If
parser is None then the unprocessed contents of the file will be
returned.
|
|
__len__
|
__len__ ( self )
|
|
keys
|
keys ( self )
Provide valid keys from the index.
If keys is just called on the index (using getattr) then
the index will return internal values such as __filename which
we just don't want to see. This just strips these values out
before returning.
|
|