Esempio n. 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']))))
Esempio n. 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']))))
Esempio n. 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']))))
Esempio n. 4
0
 def testMatchMultiple(self):
     """
     Finds multiple codons in the sequence.
     """
     seq = Seq('ATGAAAGGGCCC')
     self.assertEqual([0, 9], list(findCodons(seq, set(['ATG', 'CCC']))))
Esempio n. 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']))))
Esempio n. 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']))))
Esempio n. 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']))))
Esempio n. 8
0
 def testMatchMultiple(self):
     """
     Finds multiple codons in the sequence.
     """
     seq = Seq('ATGAAAGGGCCC')
     self.assertEqual([0, 9], list(findCodons(seq, set(['ATG', 'CCC']))))
Esempio n. 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']))))
Esempio n. 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']))))