Permalink
Browse files

Removing the deprecated module Bio.Align.FormatConvert

  • Loading branch information...
1 parent 6db1d1d commit 0433a74d01ce70795027dbe0b83a38351d8e7f1d Michiel de Hoon committed Aug 28, 2010
Showing with 3 additions and 67 deletions.
  1. +0 −65 Bio/Align/FormatConvert.py
  2. +3 −2 DEPRECATED
View
65 Bio/Align/FormatConvert.py
@@ -1,65 +0,0 @@
-"""
-For conversion between different formats for representing alignments (DEPRECATED).
-
-This module is considered obsolete and has been deprecated. Please use
-Bio.AlignIO instead for reading and writing alignments in different file
-formats.
-
-classes:
-FormatConverter
-"""
-
-# biopython
-from Bio.Fasta.FastaAlign import FastaAlignment
-from Bio.Clustalw import ClustalAlignment
-
-import warnings
-warnings.warn("Bio.Align.FormatConvert is deprecated. Please use Bio.AlignIO "
- "or the Alignment object's format method instead.",
- DeprecationWarning)
-
-class FormatConverter:
- """Convert between different alignment representation formats.
-
- The basic idea behind the converter is that it takes a given format,
- converts it into the base Alignment class, and then can return an object
- in any other supported format with the info from the basal alignment.
-
- Supported formats are:
- o Clustal format (*.aln)
- o Fasta format (*.fasta)
- """
- def __init__(self, to_convert):
- """Initialize a converter with a given object.
-
- Arguments:
- o to_convert - The class which we are going to be converting.
- """
- self.orig_format = to_convert
-
- self._base_alphabet, self._base_records = self._get_base_info()
-
- def _get_base_info(self):
- """Retrieve all of the basal (ie Generic.Alignment) info.
-
- The idea is that this info is present in all of the classes and
- this is the information that will be retained in a conversion.
- Format specific information will be lost.
- """
- return self.orig_format._alphabet, self.orig_format._records
-
- def to_fasta(self):
- """Convert the current info into a FastaAlignment object.
- """
- return_format = FastaAlignment(self._base_alphabet)
- return_format._records = self._base_records
-
- return return_format
-
- def to_clustal(self):
- """Convert the current info into a ClustalAlignment object.
- """
- return_format = ClustalAlignment(self._base_alphabet)
- return_format._records = self._base_records
-
- return return_format
View
5 DEPRECATED
@@ -183,8 +183,9 @@ Please use the "fasta" support in Bio.SeqIO or Bio.AlignIO instead.
Bio.Align.FormatConvert
=======================
-Declared obsolete in Release 1.48, and deprecated in Release 1.51.
-Please use Bio.AlignIO or the Alignment object's format method instead.
+Declared obsolete in Release 1.48, deprecated in Release 1.51, and
+removed in Release 1.55 final. Please use Bio.AlignIO or the Alignment
+object's format method instead.
Bio.Emboss.Primer
=================

0 comments on commit 0433a74

Please sign in to comment.