Package Bio :: Package AlignIO :: Module PhylipIO :: Class PhylipIterator
[hide private]
[frames] | no frames]

Class PhylipIterator

source code

                  object --+    
                           |    
Interfaces.AlignmentIterator --+
                               |
                              PhylipIterator
Known Subclasses:

Reads a Phylip alignment file returning a MultipleSeqAlignment iterator.

Record identifiers are limited to at most 10 characters.

It only copes with interlaced phylip files!  Sequential files won't work
where the sequences are split over multiple lines.

For more information on the file format, please see:
http://evolution.genetics.washington.edu/phylip/doc/sequence.html
http://evolution.genetics.washington.edu/phylip/doc/main.html#inputfiles

Instance Methods [hide private]
 
_is_header(self, line) source code
 
_split_id(self, line)
Extracts the sequence ID from a Phylip line, returning a tuple containing:
source code
 
__next__(self)
Return the next alignment in the file.
source code

Inherited from Interfaces.AlignmentIterator: __init__, __iter__, next

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

Class Variables [hide private]
  id_width = 10
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_split_id(self, line)

source code 

Extracts the sequence ID from a Phylip line, returning a tuple
containing:

    (sequence_id, sequence_residues)

The first 10 characters in the line are are the sequence id, the
remainder are sequence data.

__next__(self)

source code 
Return the next alignment in the file.

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

Overrides: Interfaces.AlignmentIterator.__next__
(inherited documentation)