Ejemplo 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']))))
Ejemplo 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']))))
Ejemplo 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']))))
Ejemplo 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']))))
Ejemplo 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']))))
Ejemplo 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']))))
Ejemplo 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']))))
Ejemplo 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']))))
Ejemplo 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']))))
Ejemplo 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']))))