| Trees | Indices | Help |
|---|
|
|
Base class for building SeqRecord iterators.
You should write a next() method to return SeqRecord objects. You may wish to redefine the __init__ method as well.
|
|||
|
|||
|
|||
|
|||
|
|||
Create a SequenceIterator object. handle - input file alphabet - optional, e.g. Bio.Alphabet.generic_protein Note when subclassing: - there should be a single non-optional argument, the handle. - you do not have to require an alphabet. - you can add additional optional arguments. |
Return the next record in the file. This method should be replaced by any derived class to do something useful. |
Iterate over the entries as a SeqRecord objects.
Example usage for Fasta files:
myFile = open("example.fasta","r")
myFastaReader = FastaIterator(myFile)
for record in myFastaReader :
print record.id
print record.seq
myFile.close()
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sun May 3 17:14:23 2009 | http://epydoc.sourceforge.net |