Back to index

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

List of all members.

Public Member Functions

def test_match_score_open_penalty1
def test_match_score_open_penalty2
def test_match_score_open_penalty3
def test_match_score_open_penalty4

Detailed Description

Definition at line 59 of file test_pairwise2.py.


Member Function Documentation

Definition at line 61 of file test_pairwise2.py.

00061 
00062     def test_match_score_open_penalty1(self):
00063         aligns = pairwise2.align.globalms("AA", "A", 2.0, -1, -0.1, 0)
00064         self.assertEqual(len(aligns), 2)
00065         aligns.sort()
00066         seq1, seq2, score, begin, end = aligns[0]
00067         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00068         self.assertEqual(alignment, """\
00069 AA
00070 ||
00071 -A
00072   Score=1.9
00073 """)
00074         seq1, seq2, score, begin, end = aligns[1]
00075         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00076         self.assertEqual(alignment, """\
00077 AA
00078 ||
00079 A-
00080   Score=1.9
00081 """)

Definition at line 82 of file test_pairwise2.py.

00082 
00083     def test_match_score_open_penalty2(self):
00084         aligns = pairwise2.align.globalms("GAA", "GA", 1.5, 0, -0.1, 0)
00085         self.assertEqual(len(aligns), 2)
00086         aligns.sort()
00087         seq1, seq2, score, begin, end = aligns[0]
00088         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00089         self.assertEqual(alignment, """\
00090 GAA
00091 |||
00092 G-A
00093   Score=2.9
00094 """)
00095         seq1, seq2, score, begin, end = aligns[1]
00096         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00097         self.assertEqual(alignment, """\
00098 GAA
00099 |||
00100 GA-
00101   Score=2.9
00102 """)

Definition at line 103 of file test_pairwise2.py.

00103 
00104     def test_match_score_open_penalty3(self):
00105         aligns = pairwise2.align.globalxs("GAACT", "GAT", -0.1, 0)
00106         self.assertEqual(len(aligns), 1)
00107         seq1, seq2, score, begin, end = aligns[0]
00108         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00109         self.assertEqual(alignment, """\
00110 GAACT
00111 |||||
00112 GA--T
00113   Score=2.9
00114 """)

Definition at line 115 of file test_pairwise2.py.

00115 
00116     def test_match_score_open_penalty4(self):
00117         aligns = pairwise2.align.globalms("GCT", "GATA", 1, -2, -0.1, 0)
00118         self.assertEqual(len(aligns), 1)
00119         seq1, seq2, score, begin, end = aligns[0]
00120         alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
00121         self.assertEqual(alignment, """\
00122 GCT-
00123 ||||
00124 GATA
00125   Score=-0.1
00126 """)
00127 


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