Package Bio :: Package Data :: Module CodonTable :: Class AmbiguousForwardTable
[hide private]
[frames] | no frames]

Class AmbiguousForwardTable

source code

object --+
         |
        AmbiguousForwardTable

Forward table for translation of ambiguous nucleotide sequences.
Instance Methods [hide private]
 
__init__(self, forward_table, ambiguous_nucleotide, ambiguous_protein)
Initialize the class.
source code
 
__contains__(self, codon)
Check if codon works as key for ambiguous forward_table.
source code
 
get(self, codon, failobj=None)
Implement get for dictionary-like behaviour.
source code
 
__getitem__(self, codon)
Implement dictionary-like behaviour for AmbiguousForwardTable.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, forward_table, ambiguous_nucleotide, ambiguous_protein)
(Constructor)

source code 
Initialize the class.
Overrides: object.__init__

__contains__(self, codon)
(In operator)

source code 

Check if codon works as key for ambiguous forward_table.

Only returns 'True' if forward_table[codon] returns a value.

__getitem__(self, codon)
(Indexing operator)

source code 

Implement dictionary-like behaviour for AmbiguousForwardTable.

forward_table[codon] will either return an amino acid letter, or throws a KeyError (if codon does not encode an amino acid) or a TranslationError (if codon does encode for an amino acid, but either is also a stop codon or does encode several amino acids, for which no unique letter is available in the given alphabet.