Back to index

python-biopython  1.60
Public Member Functions
Bio.AlignIO.EmbossIO.EmbossWriter Class Reference
Inheritance diagram for Bio.AlignIO.EmbossIO.EmbossWriter:
Inheritance graph
[legend]
Collaboration diagram for Bio.AlignIO.EmbossIO.EmbossWriter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def write_header
def write_footer
def write_alignment

Detailed Description

Emboss alignment writer (WORK IN PROGRESS).

Writes a simplfied version of the EMBOSS pairs/simple file format.
A lot of the information their tools record in their headers is not
available and is ommitted.

Definition at line 21 of file EmbossIO.py.


Member Function Documentation

def Bio.AlignIO.EmbossIO.EmbossWriter.write_alignment (   self,
  alignment 
)
Use this to write (another) single alignment to an open file.

Definition at line 44 of file EmbossIO.py.

00044 
00045     def write_alignment(self, alignment):
00046         """Use this to write (another) single alignment to an open file."""
00047         handle = self.handle
00048         handle.write("#=======================================\n")
00049         handle.write("#\n")
00050         handle.write("# Aligned_sequences: %i\n" % len(alignment))
00051         for i, record in enumerate(alignment):
00052             handle.write("# %i: %s\n" % (i+1, record.id))
00053         handle.write("#\n")
00054         handle.write("# Length: %i\n" % alignment.get_alignment_length())
00055         handle.write("#\n")
00056         handle.write("#=======================================\n")
00057         handle.write("\n")
00058         #...
00059         assert False

Here is the caller graph for this function:

Definition at line 39 of file EmbossIO.py.

00039 
00040     def write_footer(self):
00041         handle = self.handle
00042         handle.write("#---------------------------------------\n")
00043         handle.write("#---------------------------------------\n")
        

Definition at line 29 of file EmbossIO.py.

00029 
00030     def write_header(self):
00031         handle = self.handle
00032         handle.write("########################################\n")
00033         handle.write("# Program: Biopython\n")
00034         try:
00035             handle.write("# Report_file: %s\n" % handle.name)
00036         except AttributeError:
00037             pass
00038         handle.write("########################################\n")

Here is the caller graph for this function:


The documentation for this class was generated from the following file: