Ejemplo n.º 1
0
    def test_qualityScoresTrace(self):
        q = Qxalign()

        q.prepare("AAAACGT", "TGCA", b"!!!!")
        self.assertEqual(60, q.align())
        q.trace()
        self.assertEqual("3I 1=", q.show_trace())

        q.prepare_query(query_seq="CAAC")
        self.assertEqual(40, q.align(semi=True))
        q.trace()
        self.assertEqual("1X 3=", q.show_trace())

        q.prepare("", "", "")
        self.assertRaises(IndexError, q.align, [])
Ejemplo n.º 2
0
def test_qxalign_long():
    q = Qxalign()

    q.prepare("AAAACGT", "TGCA", b"!!!!")
    assert 60 == q.align()
    q.trace()
    assert "3I 1=" == q.show_trace()

    q.prepare_query(query_seq="CAAC")
    assert 40 == q.align(semi=True)
    q.trace()
    assert "1X 3=" == q.show_trace()

    q.prepare("", "", "")
    try:
        q.align()
    except IndexError:
        pass
    else:
        assert False

    del q