Package Bio :: Package GA :: Package Repair :: Module Stabilizing :: Class AmbiguousRepair
[hide private]
[frames] | no frames]

Class AmbiguousRepair

source code

object --+

Perform repair to reduce the number of Ambiguous genes in a genome.

In cases where ambiguous genes are allowed in a genome (for example,
where you have a wild card character like '*' that will match
anything), these can come to dominate a genome since, really, the
best fitness is someting like '*******'. This repair protects against
that by changing ambiguous characters into some non-ambiguous gene.

Instance Methods [hide private]
__init__(self, ambig_finder, num_ambiguous)
Initialize the repair class.
source code
repair(self, organism)
Perform a repair to remove excess ambiguous genes.
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, ambig_finder, num_ambiguous)

source code 
Initialize the repair class.


o ambig_finder - A class implementing the function find_ambiguous
which will return a list of all ambiguous positions in a sequence.
It also must have the function all_unambiguous, which will return
all allowed unambiguous letters.

o num_ambiguous - The minimum number of ambiguous items that are
allowed in a genome. If there are more than this present, repair
will be performed.

Overrides: object.__init__