Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
test_GARepair.AmbiguousRepairTest Class Reference

List of all members.

Public Member Functions

def setUp
def test_single_repair
def test_multiple_repair

Public Attributes

 organism
 ambig_info

Detailed Description

Test for the ability to repair too many ambiguous genes in a genome.

Definition at line 36 of file test_GARepair.py.


Member Function Documentation

Definition at line 39 of file test_GARepair.py.

00039 
00040     def setUp(self):
00041         alphabet = TestAlphabet()
00042         test_genome = MutableSeq("11*22*33*", alphabet)
00043         self.organism = Organism(test_genome, test_fitness)
00044         
00045         self.ambig_info = Schema(alphabet.alphabet_matches)

Test repair of multiple ambiguous positions in a genome.

Definition at line 58 of file test_GARepair.py.

00058 
00059     def test_multiple_repair(self):
00060         """Test repair of multiple ambiguous positions in a genome.
00061         """
00062         repairer = AmbiguousRepair(self.ambig_info, 0)
00063 
00064         for repair_attempt in range(5):
00065             new_org = repairer.repair(self.organism)
00066             new_genome_seq = new_org.genome.toseq()
00067 
00068             assert new_genome_seq.count("*") == 0, \
00069                    "Did not repair genome, got %s" % new_genome_seq.tostring()

Test repair of a single ambiguous position in a genome.

Definition at line 46 of file test_GARepair.py.

00046 
00047     def test_single_repair(self):
00048         """Test repair of a single ambiguous position in a genome.
00049         """
00050         repairer = AmbiguousRepair(self.ambig_info, 2)
00051 
00052         for repair_attempt in range(5):
00053             new_org = repairer.repair(self.organism)
00054             new_genome_seq = new_org.genome.toseq()
00055 
00056             assert new_genome_seq.count("*") == 2, \
00057                    "Did not repair genome, got %s" % new_genome_seq.tostring()


Member Data Documentation

Definition at line 44 of file test_GARepair.py.

Definition at line 42 of file test_GARepair.py.


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