Package Bio :: Package SCOP :: Module Raf :: Class SeqMapIndex
[hide private]
[frames] | no frames]

Class SeqMapIndex

source code

     object --+        
              |        
           dict --+    
                  |    
FileIndex.FileIndex --+
                      |
                     SeqMapIndex

An RAF file index.

The RAF file itself is about 50 MB. This index provides rapid, random access of RAF records without having to load the entire file into memory.

The index key is a concatenation of the PDB ID and chain ID. e.g "2drcA", "155c_". RAF uses an underscore to indicate blank chain IDs.

Instance Methods [hide private]
new empty dictionary

__init__(self, raf_filename)
Arguments:
source code
 
getSeqMap(self, residues)
Get the sequence map for a collection of residues.
source code

Inherited from FileIndex.FileIndex: __getitem__

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __setitem__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, raf_filename)
(Constructor)

source code 

Arguments:

  filename  -- The file to index

  iterator_gen --   A function that eats a file handle, and returns
    a file iterator. The iterator has a method next()
    that returns the next item to be indexed from the file.

  key_gen -- A function that generates an index key from the items
             created by the iterator. 

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

getSeqMap(self, residues)

source code 
Get the sequence map for a collection of residues.

residues -- A Residues instance, or a string that can be converted into
            a Residues instance.