Package goby :: Module Alignments :: Class AlignmentReader
[hide private]
[frames] | no frames]

Class AlignmentReader

source code

object --+
         |
        AlignmentReader

Reads alignments written in the Goby "compact" format. The AlignmentReader is actually an iterator over indiviual alignment entries stored in the file.

Instance Methods [hide private]
 
__init__(self, basename, verbose=False)
Initialize the AlignmentReader using the basename of the alignment files.
source code
 
next(self)
Return next alignment entry from the entries file
source code
 
__iter__(self) source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  basename = None
basename for this alignment
  statistics = Properties()
statistics from this alignment
  header = Alignments_pb2.AlignmentHeader()
alignment header
  entries_reader = None
reader for the alignment entries (interally stored in chunks)
  entries = []
Current chunk of alignment entries
  current_entry_index = 0
current entry index
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, basename, verbose=False)
(Constructor)

source code 

Initialize the AlignmentReader using the basename of the alignment files. Goby alignments are made up of files ending with:

".entries", ".header", ".tmh", ".stats", ".counts", ".index"

The basename of this alignment is the full path to one of these files including everything but the extension. If a basename is passed in with one of these extensions, it will be stripped.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)