Package Bio :: Package SeqIO :: Module Interfaces :: Class InterlacedSequenceIterator
[hide private]
[frames] | no frames]

Class InterlacedSequenceIterator

source code

      object --+    
               |    
SequenceIterator --+
                   |
                  InterlacedSequenceIterator

Base class for any iterator of a non-sequential file type (DEPRECATED).

This object was not intended for direct use, and is now deprecated.

Instance Methods [hide private]
 
__init__(self)
Create the object.
source code
 
__len__(self)
Return the number of records.
source code
 
__getitem__(self, i)
Return the requested record.
source code
 
move_start(self) source code
 
next(self)
Return the next record in the file.
source code
 
__iter__(self)
Iterate over the entries as a SeqRecord objects.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Create the object.

This method should be replaced by any derived class to do something useful.

Overrides: object.__init__

__len__(self)
(Length operator)

source code 
Return the number of records.

This method should be replaced by any derived class to do something useful.

__getitem__(self, i)
(Indexing operator)

source code 
Return the requested record.

This method should be replaced by any derived class to do something
useful.

It should NOT touch the value of self._n

next(self)

source code 
Return the next record in the file.

This method should be replaced by any derived class to do something useful.

Overrides: SequenceIterator.next
(inherited documentation)

__iter__(self)

source code 
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()

Overrides: SequenceIterator.__iter__
(inherited documentation)