Did I find the right examples for you? yes no      Crawl my project      Python Jobs

Bio.pairwise2.align.localxs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

```    def test_localxs(self):
aligns = sorted(pairwise2.align.localxs("AxBx", "zABz", -0.1, 0))
seq1, seq2, score, begin, end = aligns[0]
alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
self.assertEqual(alignment, """\
```
```    def test_align_one_char1(self):
aligns = pairwise2.align.localxs("abcde", "c", -0.3, -0.1)
self.assertEqual(len(aligns), 1)
seq1, seq2, score, begin, end = aligns[0]
alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
```
```    def test_align_one_char2(self):
aligns = pairwise2.align.localxs("abcce", "c", -0.3, -0.1)
self.assertEqual(len(aligns), 2)
aligns.sort()
seq1, seq2, score, begin, end = aligns[0]
```

```    def test_localxs(self):
aligns = sorted(pairwise2.align.localxs("AxBx", "zABz", -0.1, 0))
seq1, seq2, score, begin, end = aligns[0]
alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
self.assertEqual(alignment, """\
```
```    def test_align_one_char1(self):
aligns = pairwise2.align.localxs("abcde", "c", -0.3, -0.1)
self.assertEqual(len(aligns), 1)
seq1, seq2, score, begin, end = aligns[0]
alignment = pairwise2.format_alignment(seq1, seq2, score, begin, end)
```
```    def test_align_one_char2(self):
aligns = pairwise2.align.localxs("abcce", "c", -0.3, -0.1)
self.assertEqual(len(aligns), 2)
aligns.sort()
seq1, seq2, score, begin, end = aligns[0]
```