Back to index

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

List of all members.

Public Member Functions

def test_extend_penalty1
def test_extend_penalty2

Detailed Description

Definition at line 128 of file test_pairwise2.py.


Member Function Documentation

Definition at line 130 of file test_pairwise2.py.

00130 
00131     def test_extend_penalty1(self):
00132         aligns = pairwise2.align.globalxs("GACT", "GT", -0.2, -0.5)
00133         self.assertEqual(len(aligns), 1)
00134         seq1, seq2, score, begin, end = aligns[0]
00135         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00136         self.assertEqual(alignment, """\
00137 GACT
00138 ||||
00139 G--T
00140   Score=1.3
00141 """)

Definition at line 142 of file test_pairwise2.py.

00142 
00143     def test_extend_penalty2(self):
00144         aligns = pairwise2.align.globalxs("GACT", "GT", -0.2, -1.5)
00145         self.assertEqual(len(aligns), 2)
00146         aligns.sort()
00147         seq1, seq2, score, begin, end = aligns[0]
00148         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00149         self.assertEqual(alignment, """\
00150 GACT
00151 ||||
00152 -G-T
00153   Score=0.6
00154 """)
00155         seq1, seq2, score, begin, end = aligns[1]
00156         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00157         self.assertEqual(alignment, """\
00158 GACT
00159 ||||
00160 G-T-
00161   Score=0.6
00162 """)
00163 


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