Example #1
0
 def test_tally_nonalphabetic(self):
     s = Seq("AGTCAGCTACGACGCGC", dna_alphabet)
     c = s.tally(Alphabet("AC"))
     self.assertEqual(2, len(c))
     self.assertEqual(list(c), [4, 6])
Example #2
0
 def test_tally(self):
     s = Seq("AGTCAGCTACGACGCGC", unambiguous_dna_alphabet)
     c = s.tally()
     self.assertEqual(len(unambiguous_dna_alphabet), len(c))
     self.assertEqual(list(c), [4, 6, 5, 2])