Example #1
0
 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']))))
Example #2
0
 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']))))
Example #3
0
 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']))))
Example #4
0
 def testMatchMultiple(self):
     """
     Finds multiple codons in the sequence.
     """
     seq = Seq('ATGAAAGGGCCC')
     self.assertEqual([0, 9], list(findCodons(seq, set(['ATG', 'CCC']))))
Example #5
0
 def testMatchAtEnd(self):
     """
     Finds a codon at the end of the sequence.
     """
     seq = Seq('ATGAAA')
     self.assertEqual([3], list(findCodons(seq, set(['AAA']))))
Example #6
0
 def testMatchAtStart(self):
     """
     Finds a codon at the start of the sequence.
     """
     seq = Seq('ATGAAA')
     self.assertEqual([0], list(findCodons(seq, set(['ATG', 'AGG']))))
Example #7
0
 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']))))
Example #8
0
 def testMatchMultiple(self):
     """
     Finds multiple codons in the sequence.
     """
     seq = Seq('ATGAAAGGGCCC')
     self.assertEqual([0, 9], list(findCodons(seq, set(['ATG', 'CCC']))))
Example #9
0
 def testMatchAtEnd(self):
     """
     Finds a codon at the end of the sequence.
     """
     seq = Seq('ATGAAA')
     self.assertEqual([3], list(findCodons(seq, set(['AAA']))))
Example #10
0
 def testMatchAtStart(self):
     """
     Finds a codon at the start of the sequence.
     """
     seq = Seq('ATGAAA')
     self.assertEqual([0], list(findCodons(seq, set(['ATG', 'AGG']))))