Back to index

python-biopython  1.60
Public Member Functions
test_CAPS.TestCAPS Class Reference

List of all members.

Public Member Functions

def test_trivial
def test
def testNoCAPS
def test_uneven

Detailed Description

Definition at line 16 of file test_CAPS.py.


Member Function Documentation

def test_CAPS.TestCAPS.test (   self)

Definition at line 33 of file test_CAPS.py.

00033 
00034     def test(self):
00035         alignment = [
00036 """\
00037 AAAagaattcTAGATATACCAAACCAGAGAAAACAAATACATAATCGGAGAAATACAGAT
00038 AGAGAGCGAGAGAGATCGACGGCGAAGCTCTTTACCCGGAAACCATTGAAATCGGACGGT
00039 TTAGTGAAAATGGAGGATCAAGTagAtTTTGGGTTCCGTCCGAACGACGAGGAGCTCGTT
00040 GGTCACTATCTCCGTAACAAAATCGAAGGAAACACTAGCCGCGACGTTGAAGTAGCCATC
00041 AGCGAGGTCAACATCTGTAGCTACGATCCTTGGAACTTGCGCTGTAAGTTCCGAATTTTC
00042 """,
00043 """\
00044 AAAagaTttcTAGATATACCAAACCAGAGAAAACAAATACATAATCGGAGAAATACAGAT
00045 AGAGAGCGAGAGAGATCGACGGCGAAGCTCTTTACCCGGAAACCATTGAAATCGGACGGT
00046 TTAGTGAAAATGGAGGATCAAGTagctTTTGGGTTCCGTCCGAACGACGAGGAGCTCGTT
00047 GGTCACTATCTCCGTAACAAAATCGAAGGAAACACTAGCCGCGACGTTGAAGTAGCCATC
00048 AGCGAGGTCAACATCTGTAGCTACGATCCTTGGAACTTGCGCTGTAAGTTCCGAATTTTC
00049 """,
00050 """\
00051 AAAagaTttcTAGATATACCAAACCAGAGAAAACAAATACATAATCGGAGAAATACAGAT
00052 AGAGAGCGAGAGAGATCGACGGCGAAGCTCTTTACCCGGAAACCATTGAAATCGGACGGT
00053 TTAGTGAAAATGGAGGATCAAGTagctTTTGGGTTCCGTCCGAACGACGAGGAGCTCGTT
00054 GGTCACTATCTCCGTAACAAAATCGAAGGAAACACTAGCCGCGACGTTGAAGTAGCCATC
00055 AGCGAGGTCAACATCTGTAGCTACGATCCTTGGAACTTGCGCTGTAAGTTCCGAATTTTC
00056 """,
00057                     ]
00058         enzymes = [EcoRI, AluI]
00059         align = createAlignment(alignment, Alphabet.generic_dna)
00060         map = CAPS.CAPSMap(align, enzymes)
00061 
00062         self.assertEqual(len(map.dcuts), 2)
00063         self.assertEqual(map.dcuts[0].enzyme, EcoRI)
00064         self.assertEqual(map.dcuts[0].start, 5)
00065         self.assertEqual(map.dcuts[0].cuts_in, [0])
00066         self.assertEqual(map.dcuts[0].blocked_in, [1,2])
00067         self.assertEqual(map.dcuts[1].enzyme, AluI)
00068         self.assertEqual(map.dcuts[1].start, 144)
00069         self.assertEqual(map.dcuts[1].cuts_in, [1,2])
00070         self.assertEqual(map.dcuts[1].blocked_in, [0])
00071 

Here is the call graph for this function:

Definition at line 18 of file test_CAPS.py.

00018 
00019     def test_trivial(self):
00020         enzymes = [EcoRI]
00021         alignment = ["gaattc",
00022                      "gaactc",
00023                     ]
00024         align = createAlignment(alignment, Alphabet.generic_dna)
00025         map = CAPS.CAPSMap(align, enzymes)
00026 
00027         self.assertEqual(len(map.dcuts), 1)
00028         self.assertEqual(map.dcuts[0].enzyme, EcoRI)
00029         self.assertEqual(map.dcuts[0].start, 1)
00030         self.assertEqual(map.dcuts[0].cuts_in, [0])
00031         self.assertEqual(map.dcuts[0].blocked_in, [1])
00032 

Here is the call graph for this function:

Definition at line 82 of file test_CAPS.py.

00082 
00083     def test_uneven(self):
00084         alignment = ["aaaaaaaaaaaaaa",
00085                      "aaaaaaaaaaaaaa", #we'll change this below
00086                      "aaaaaaaaaaaaaa",
00087                     ]
00088         align = createAlignment(alignment, Alphabet.generic_nucleotide)
00089         align[1].seq = align[1].seq[:8] #evil
00090         self.assertRaises(CAPS.AlignmentHasDifferentLengthsError,
00091                           CAPS.CAPSMap,
00092                           align)
00093 
00094  

Here is the call graph for this function:

Definition at line 72 of file test_CAPS.py.

00072 
00073     def testNoCAPS(self):
00074         alignment = ["aaaaaaaaaaaaaaaaaaaa",
00075                      "aaaaaaaaaaaaaaaaaaaa",
00076                     ]
00077         enzymes = []
00078         align = createAlignment(alignment, Alphabet.generic_nucleotide)
00079         map = CAPS.CAPSMap(align, enzymes)
00080         self.assertEqual(map.dcuts, [])
00081 

Here is the call graph for this function:


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