Trees | Indices | Help |
---|
|
Base class for building Alignment iterators.
You should write a next() method to return Aligment objects. You may wish to redefine the __init__ method as well.
|
|||
|
|||
|
|||
|
|
Create an AlignmentIterator object. handle - input file count - optional, expected number of records per alignment Recommend for fasta file format. alphabet - optional, e.g. Bio.Alphabet.generic_protein Note when subclassing: - there should be a single non-optional argument, the handle, and optional count and alphabet IN THAT ORDER. - you do not have to require an alphabet (?). - you can add additional optional arguments. |
Iterate over the entries as Alignment objects. Example usage for (concatenated) PHYLIP files: myFile = open("many.phy","r") for alignment in PhylipIterator(myFile) : print "New alignment:" for record in alignment : print record.id print record.seq myFile.close() |
Return the next alignment in the file. This method should be replaced by any derived class to do something useful. |
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun May 3 15:51:26 2009 | http://epydoc.sourceforge.net |