def testDoesNotFindOutOfFrameMatches(self): """ Does not find matching codons that are in a non-zero frame in the sequence. """ seq = Seq('TATGAAAGGGCCC') self.assertEqual([], list(findCodons(seq, set(['ATG', 'CCC']))))
def testNoMatches(self): """ When there are no codons in the sequence, returns an empty list. """ seq = Seq('AAAAAA') self.assertEqual([], list(findCodons(seq, set(['ATG', 'AGG']))))
def testMatchMultiple(self): """ Finds multiple codons in the sequence. """ seq = Seq('ATGAAAGGGCCC') self.assertEqual([0, 9], list(findCodons(seq, set(['ATG', 'CCC']))))
def testMatchAtEnd(self): """ Finds a codon at the end of the sequence. """ seq = Seq('ATGAAA') self.assertEqual([3], list(findCodons(seq, set(['AAA']))))
def testMatchAtStart(self): """ Finds a codon at the start of the sequence. """ seq = Seq('ATGAAA') self.assertEqual([0], list(findCodons(seq, set(['ATG', 'AGG']))))