Back to index

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

List of all members.

Public Member Functions

def __init__
def contains
def __getattr__
def __repr__

Public Attributes

 gap_char
 alphabet
 new_letters
 letters

Private Member Functions

def _upper
def _lower

Detailed Description

Definition at line 153 of file __init__.py.


Constructor & Destructor Documentation

def Bio.Alphabet.Gapped.__init__ (   self,
  alphabet,
  gap_char = "-" 
)

Reimplemented from Bio.Alphabet.AlphabetEncoder.

Definition at line 154 of file __init__.py.

00154 
00155     def __init__(self, alphabet, gap_char = "-"):
00156         AlphabetEncoder.__init__(self, alphabet, gap_char)
00157         self.gap_char = gap_char

Here is the caller graph for this function:


Member Function Documentation

def Bio.Alphabet.AlphabetEncoder.__getattr__ (   self,
  key 
) [inherited]

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)

def Bio.Alphabet.AlphabetEncoder.__repr__ (   self) [inherited]

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.Gapped._lower (   self) [private]
Return a lower case variant of the current alphabet (PRIVATE).

Reimplemented from Bio.Alphabet.AlphabetEncoder.

Definition at line 172 of file __init__.py.

00172 
00173     def _lower(self):
00174         """Return a lower case variant of the current alphabet (PRIVATE)."""
00175         return Gapped(self.alphabet._lower(), self.gap_char.lower())
00176 
            
def Bio.Alphabet.Gapped._upper (   self) [private]
Return an upper case variant of the current alphabet (PRIVATE).

Reimplemented from Bio.Alphabet.AlphabetEncoder.

Definition at line 168 of file __init__.py.

00168 
00169     def _upper(self):
00170         """Return an upper case variant of the current alphabet (PRIVATE)."""
00171         return Gapped(self.alphabet._upper(), self.gap_char.upper())

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

Returns a boolean.  This relies on the Alphabet subclassing
hierarchy, and attempts to check the gap character.  This fails
if the other alphabet does not have a gap character!

Reimplemented from Bio.Alphabet.AlphabetEncoder.

Definition at line 158 of file __init__.py.

00158 
00159     def contains(self, other):
00160         """Does this alphabet 'contain' the other (OBSOLETE?).
00161 
00162         Returns a boolean.  This relies on the Alphabet subclassing
00163         hierarchy, and attempts to check the gap character.  This fails
00164         if the other alphabet does not have a gap character!
00165         """
00166         return other.gap_char == self.gap_char and \
00167                self.alphabet.contains(other.alphabet)


Member Data Documentation

Definition at line 122 of file __init__.py.

Definition at line 156 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: