Back to index

python-biopython  1.60
Public Member Functions
test_pairwise2.TestPairwiseOneCharacter Class Reference

List of all members.

Public Member Functions

def test_align_one_char1
def test_align_one_char2
def test_align_one_char3

Detailed Description

Definition at line 334 of file test_pairwise2.py.


Member Function Documentation

Definition at line 336 of file test_pairwise2.py.

00336 
00337     def test_align_one_char1(self):
00338         aligns = pairwise2.align.localxs("abcde", "c", -0.3, -0.1)
00339         self.assertEqual(len(aligns), 1)
00340         seq1, seq2, score, begin, end = aligns[0]
00341         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00342         self.assertEqual(alignment, """\
00343 abcde
00344   |
00345 --c--
00346   Score=1
00347 """)

Definition at line 348 of file test_pairwise2.py.

00348 
00349     def test_align_one_char2(self):
00350         aligns = pairwise2.align.localxs("abcce", "c", -0.3, -0.1)
00351         self.assertEqual(len(aligns), 2)
00352         aligns.sort()
00353         seq1, seq2, score, begin, end = aligns[0]
00354         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00355         self.assertEqual(alignment, """\
00356 abcce
00357    |
00358 ---c-
00359   Score=1
00360 """)
00361         seq1, seq2, score, begin, end = aligns[1]
00362         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00363         self.assertEqual(alignment, """\
00364 abcce
00365   |
00366 --c--
00367   Score=1
00368 """)

Definition at line 369 of file test_pairwise2.py.

00369 
00370     def test_align_one_char3(self):
00371         aligns = pairwise2.align.globalxs("abcde", "c", -0.3, -0.1)
00372         self.assertEqual(len(aligns), 1)
00373         seq1, seq2, score, begin, end = aligns[0]
00374         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00375         self.assertEqual(alignment, """\
00376 abcde
00377 |||||
00378 --c--
00379   Score=0.2
00380 """)
00381 


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