def test_sw_positives_data(): start, end, bestScore, matchedA, matchedB = sw(testa, testb, blosum50, -10, -1) assert start == (29, 39) assert end == (76, 100) assert bestScore == 35.0 assert matchedA == "NSNQIKILGNQGSFLTKG-PSKLNDRADSRRSLW--------DQGNFPLIIK------NLKI" assert matchedB == "NCSTFYVVKEDGTIVYTGTATSMFD-NDTKETVYIADFSSVNEEGTYYLAVPGVGKSVNFKI"
def test_sw_Gap_beginB(): assert sw("EFGACD", "ACD", blosum50, -3, -1)[3:] == ("ACD", "ACD")
def test_sw_trace_indelA(): assert sw("LARN", "LAREN", blosum50, -3, -1)[3:] == ('LAR-N', 'LAREN')
def test_sw_trace_indelB(): assert sw("LAREN", "LARN", blosum50, -3, -1)[3:] == ('LAREN', 'LAR-N') #sadly i'm missing U
def test_sw_trace_mismatch(): assert sw("ACDAFG", "ACDEFG", blosum50, -3, -1)[2:] == (41.0, 'ACDAFG', 'ACDEFG' ) #make sure the score is right
def test_sw_Gap_endB(): assert sw("ACDEFG", "ACD", blosum50, -3, -1)[3:] == ("ACD", "ACD")