Package Bio :: Package Alphabet :: Class Alphabet
[hide private]
[frames] | no frames]

Class Alphabet

source code

object --+
         |
        Alphabet
Known Subclasses:

Generic alphabet base class.

This class is used as a base class for other types of alphabets.

Attributes:
letters -- list-like object containing the letters of the alphabet.
           Usually it is a string when letters are single characters.
size    -- size of the alphabet's letters (e.g. 1 when letters are
           single characters).

Instance Methods [hide private]
 
__repr__(self)
repr(x)
source code
 
contains(self, other)
Does this alphabet 'contain' the other (OBSOLETE?).
source code
 
_case_less(self)
Return a case-less variant of the current alphabet (PRIVATE).
source code
 
_upper(self)
Return an upper case variant of the current alphabet (PRIVATE).
source code
 
_lower(self)
Return a lower case variant of the current alphabet (PRIVATE).
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  size = None
hash(x)
  letters = None
hash(x)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__repr__(self)
(Representation operator)

source code 
repr(x)

Overrides: object.__repr__
(inherited documentation)

contains(self, other)

source code 
Does this alphabet 'contain' the other (OBSOLETE?).

Returns a boolean.  This relies on the Alphabet subclassing
hierarchy only, and does not check the letters property.
This isn't ideal, and doesn't seem to work as intended
with the AlphabetEncoder classes.