Package Bio :: Package AlignIO :: Module NexusIO :: Class NexusWriter
[hide private]
[frames] | no frames]

Class NexusWriter

source code

                object --+    
                         |    
Interfaces.AlignmentWriter --+
                             |
                            NexusWriter

Nexus alignment writer.

Note that Nexus files are only expected to hold ONE alignment matrix.

You are expected to call this class via the Bio.AlignIO.write() or Bio.SeqIO.write() functions.

Instance Methods [hide private]
 
write_file(self, alignments)
Use this to write an entire file containing the given alignments.
source code
 
write_alignment(self, alignment) source code
 
_classify_alphabet_for_nexus(self, alphabet)
Returns 'protein', 'dna', 'rna' based on the alphabet (PRIVATE).
source code

Inherited from Interfaces.AlignmentWriter: __init__, clean

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]

write_file(self, alignments)

source code 

Use this to write an entire file containing the given alignments.

Arguments:

  • alignments - A list or iterator returning MultipleSeqAlignment objects. This should hold ONE and only one alignment.
Overrides: Interfaces.AlignmentWriter.write_file

_classify_alphabet_for_nexus(self, alphabet)

source code 

Returns 'protein', 'dna', 'rna' based on the alphabet (PRIVATE).

Raises an exception if this is not possible.