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 SequenceIterator: next

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

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:

with open("example.fasta","r") as myFile:
    myFastaReader = FastaIterator(myFile)
    for record in myFastaReader:
        print(record.id)
        print(record.seq)

Overrides: SequenceIterator.__iter__
(inherited documentation)