예제 #1
0
 def test_index_numeric(self):
     from multicov.alphabet import NumericAlphabet
     alpha = NumericAlphabet(4, 8)
     for i, n in enumerate(alpha.letters()):
         self.assertEqual(alpha[i], n)
예제 #2
0
 def test_numeric_letters_nonzero_base(self):
     from multicov.alphabet import NumericAlphabet
     alpha = NumericAlphabet(2, 7)
     self.assertTrue(np.array_equal(alpha.letters(), list(range(2, 7))))
예제 #3
0
 def test_numeric_letters_nogap_nonzero_base_gapful(self):
     from multicov.alphabet import NumericAlphabet
     alpha = NumericAlphabet(5, 11, has_gap=True)
     self.assertTrue(np.array_equal(alpha.letters(no_gap=True), list(range(6, 11))))
예제 #4
0
 def test_numeric_letters_nogap_base0_gapless(self):
     from multicov.alphabet import NumericAlphabet
     alpha = NumericAlphabet(4, has_gap=False)
     self.assertTrue(np.array_equal(alpha.letters(no_gap=True), list(range(4))))