Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.AlignIO.Interfaces.AlignmentWriter Class Reference
Inheritance diagram for Bio.AlignIO.Interfaces.AlignmentWriter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def write_file
def clean

Public Attributes

 handle

Detailed Description

Base class for building MultipleSeqAlignment writers.

You should write a write_alignment() method.
You may wish to redefine the __init__ method as well

Definition at line 71 of file Interfaces.py.


Constructor & Destructor Documentation

Reimplemented in Bio.AlignIO.Interfaces.SequentialAlignmentWriter.

Definition at line 77 of file Interfaces.py.

00077 
00078     def __init__(self, handle):
00079         self.handle = handle
       

Here is the caller graph for this function:


Member Function Documentation

Use this to avoid getting newlines in the output.

Definition at line 95 of file Interfaces.py.

00095 
00096     def clean(self, text):
00097         """Use this to avoid getting newlines in the output."""
        return text.replace("\n", " ").replace("\r", " ").replace("  ", " ")

Here is the caller graph for this function:

def Bio.AlignIO.Interfaces.AlignmentWriter.write_file (   self,
  alignments 
)
Use this to write an entire file containing the given alignments.

alignments - A list or iterator returning MultipleSeqAlignment objects

In general, this method can only be called once per file.

This method should be replaced by any derived class to do something
useful.  It should return the number of alignments

Reimplemented in Bio.AlignIO.Interfaces.SequentialAlignmentWriter.

Definition at line 80 of file Interfaces.py.

00080 
00081     def write_file(self, alignments):
00082         """Use this to write an entire file containing the given alignments.
00083 
00084         alignments - A list or iterator returning MultipleSeqAlignment objects
00085 
00086         In general, this method can only be called once per file.
00087         
00088         This method should be replaced by any derived class to do something
00089         useful.  It should return the number of alignments"""
00090         raise NotImplementedError("This object should be subclassed")
00091         #####################################################
00092         # You SHOULD subclass this, to write the alignment  #
00093         # objecta to the file handle                        #
00094         #####################################################


Member Data Documentation

Reimplemented in Bio.AlignIO.Interfaces.SequentialAlignmentWriter.

Definition at line 78 of file Interfaces.py.


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