Esempio n. 1
0
 def test_find_terminal_gaps_all(self):
     aseq = skbio.DNA('-------')
     exp = np.asarray([True] * len(aseq))
     obs = _find_terminal_gaps(aseq)
     npt.assert_array_equal(obs, exp)
Esempio n. 2
0
 def test_find_terminal_gaps_3_prime(self):
     aseq = skbio.DNA('A---ACGTAGTCGA-AGCT----')
     exp = np.asarray(([False] * (len(aseq) - 4)) + ([True] * 4))
     obs = _find_terminal_gaps(aseq)
     npt.assert_array_equal(obs, exp)
Esempio n. 3
0
 def test_find_terminal_gaps_both_ends(self):
     aseq = skbio.DNA('---ACGTA-----GT-CGA-AGCT----')
     exp = np.asarray(([True] * 3) + ([False] * (len(aseq) - 7))
                      + ([True] * 4))
     obs = _find_terminal_gaps(aseq)
     npt.assert_array_equal(obs, exp)
Esempio n. 4
0
 def test_find_terminal_gaps_none(self):
     aseq = skbio.DNA('A---ACGTAGTCGA-AGCT----GATCG')
     exp = np.asarray([False] * len(aseq))
     obs = _find_terminal_gaps(aseq)
     npt.assert_array_equal(obs, exp)