Skip to content

Commit

Permalink
Deprecating Bio.SeqUtils.makeTableX function, plus ProteinX and Missi…
Browse files Browse the repository at this point in the history
…ngTable classes which are all dead code after the removal of the Bio.SeqUtils.translate function
  • Loading branch information
peterjc committed Feb 4, 2010
1 parent 0d6a55c commit 8135f46
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Bio/SeqUtils/__init__.py
Expand Up @@ -221,13 +221,18 @@ def nt_search(seq, subseq):
# should be moved to ???

class ProteinX(Alphabet.ProteinAlphabet):
"""Variant of the extended IUPAC extended protein alphabet (DEPRECATED)."""
letters = IUPACData.extended_protein_letters + "X"

#Can't add a deprecation warning to the class due to the following line:
proteinX = ProteinX()

class MissingTable:
def __init__(self, table):
self._table = table
import warnings
warnings.warn("Function Bio.SeqUtils.makeTableX() and related classes ProteinX "
"and MissingTable are deprecated.", DeprecationWarning)
def get(self, codon, stop_symbol):
try:
return self._table.get(codon, stop_symbol)
Expand Down
4 changes: 4 additions & 0 deletions DEPRECATED
Expand Up @@ -309,6 +309,10 @@ in Release 1.31, and removed in Release 1.43. Function 'translate' was
deprecated in Release 1.49, and removed in Release 1.53. Use the functions
and methods in Bio.Seq instead.

Function makeTableX and classes ProteinX and MissingTable were deprecated
in Release 1.54. These were remnants of the removed translate function,
and no longer served any useful purpose.

Function 'reverse' in Bio.SeqUtils was deprecated in Release 1.54, instead
just use the string's slice method with a step of minus one.

Expand Down

0 comments on commit 8135f46

Please sign in to comment.