Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Private Member Functions
Bio.Alphabet.AlphabetEncoder Class Reference
Inheritance diagram for Bio.Alphabet.AlphabetEncoder:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def __getattr__
def __repr__
def contains

Public Attributes

 alphabet
 new_letters
 letters

Private Member Functions

def _upper
def _lower

Detailed Description

Definition at line 120 of file __init__.py.


Constructor & Destructor Documentation

def Bio.Alphabet.AlphabetEncoder.__init__ (   self,
  alphabet,
  new_letters 
)

Reimplemented in Bio.Alphabet.HasStopCodon, and Bio.Alphabet.Gapped.

Definition at line 121 of file __init__.py.

00121 
00122     def __init__(self, alphabet, new_letters):
00123         self.alphabet = alphabet
00124         self.new_letters = new_letters
00125         if alphabet.letters is not None:
00126             self.letters = alphabet.letters + new_letters
00127         else:
            self.letters = None

Here is the caller graph for this function:


Member Function Documentation

def Bio.Alphabet.AlphabetEncoder.__getattr__ (   self,
  key 
)

Definition at line 128 of file __init__.py.

00128 
00129     def __getattr__(self, key):
00130         if key[:2] == "__" and key[-2:] == "__":
00131             raise AttributeError(key)
00132         return getattr(self.alphabet, key)

Definition at line 133 of file __init__.py.

00133 
00134     def __repr__(self):
00135         return "%s(%r, %r)" % (self.__class__.__name__, self.alphabet,
00136                                self.new_letters)

def Bio.Alphabet.AlphabetEncoder._lower (   self) [private]
Return a lower case variant of the current alphabet (PRIVATE).

Reimplemented in Bio.Alphabet.HasStopCodon, and Bio.Alphabet.Gapped.

Definition at line 148 of file __init__.py.

00148 
00149     def _lower(self):
00150         """Return a lower case variant of the current alphabet (PRIVATE)."""
00151         return AlphabetEncoder(self.alphabet._lower(), self.new_letters.lower())

def Bio.Alphabet.AlphabetEncoder._upper (   self) [private]
Return an upper case variant of the current alphabet (PRIVATE).

Reimplemented in Bio.Alphabet.HasStopCodon, and Bio.Alphabet.Gapped.

Definition at line 144 of file __init__.py.

00144 
00145     def _upper(self):
00146         """Return an upper case variant of the current alphabet (PRIVATE)."""
00147         return AlphabetEncoder(self.alphabet._upper(), self.new_letters.upper())

def Bio.Alphabet.AlphabetEncoder.contains (   self,
  other 
)
Does this alphabet 'contain' the other (OBSOLETE?).

This is isn't implemented for the base AlphabetEncoder,
which will always return 0 (False).

Reimplemented in Bio.Alphabet.HasStopCodon, and Bio.Alphabet.Gapped.

Definition at line 137 of file __init__.py.

00137 
00138     def contains(self, other):
00139         """Does this alphabet 'contain' the other (OBSOLETE?).
00140 
00141         This is isn't implemented for the base AlphabetEncoder,
00142         which will always return 0 (False)."""
00143         return 0


Member Data Documentation

Definition at line 122 of file __init__.py.

Definition at line 125 of file __init__.py.

Definition at line 123 of file __init__.py.


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