Example #1
0
 def test_overlapping(self):
     assert overlapping_exons(build_compound([(10, 30), (20, 30)],
                                             strand=1))
     assert overlapping_exons(
         build_compound([(10, 30), (70, 100), (20, 30)], strand=1))
     assert overlapping_exons(
         build_compound([(70, 100), (20, 30), (10, 30)], strand=1))
Example #2
0
 def test_bad_types(self):
     for bad in [None, "loc", [FeatureLocation(10, 40)], 5]:
         with self.assertRaises(TypeError):
             overlapping_exons(bad)
Example #3
0
 def test_not_overlapping(self):
     assert not overlapping_exons(
         build_compound([(10, 30), (40, 70)], strand=1))
Example #4
0
 def test_non_compound(self):
     assert not overlapping_exons(FeatureLocation(10, 40))
 def test_frameshifted(self):
     assert not overlapping_exons(
         build_compound([(10, 30), (29, 59)], strand=1))
 def test_small_exons(self):
     assert not overlapping_exons(
         build_compound([(10, 30), (29, 30), (50, 80)], strand=1))