def test_rc_matches(self): occurrences = dnaseq.naive_with_rc("CCATCTGAT", "ATC") self.assertEqual([2, 6], occurrences)
def test_one_match(self): occurrences = dnaseq.naive_with_rc("CCATCC", "AT") self.assertEqual([2], occurrences)
def test_more_matches(self): occurrences = dnaseq.naive_with_rc("CCATCAT", "AT") self.assertEqual([2, 5], occurrences)
def test_no_match(self): occurrences = dnaseq.naive_with_rc("AAAAAA", "CC") self.assertEqual([], occurrences)
def question_01(): occurrences = dnaseq.naive_with_rc(lambda_virus, "AGGT") print "question_01: %i" % len(occurrences)
def question_04(): occurrences = dnaseq.naive_with_rc(lambda_virus, "AGTCGA") print "question_04: %i" % occurrences[0]
def question_03(): occurrences = dnaseq.naive_with_rc(lambda_virus, "ACTAAGT") print "question_03: %i" % occurrences[0]
def question_02(): occurrences = dnaseq.naive_with_rc(lambda_virus, "TTAA") print "question_02: %i" % len(occurrences)