예제 #1
0
 def setUp(self):
     self.feature = tmrna.Tmrna()
     self.seq1 = Seq("AATTCGAGCT")
     self.seqfeature1 = test_data_utils.create_1_part_seqfeature(
                             1, 5, 1, "CDS")
     self.seqfeature2 = test_data_utils.create_1_part_seqfeature(
                             1, 5, -1, "CDS")
     self.seqfeature3 = test_data_utils.create_2_part_seqfeature(
                             1, 5, 1, 3, 7, 1, "CDS")
예제 #2
0
 def test_parse_coordinates_6(self):
     """Verify undefined strand 2-part compound location is not parsed."""
     seqfeature = test_data_utils.create_2_part_seqfeature(
         2, 10, None, 8, 20, None, "CDS")
     start, stop, parts = flat_files.parse_coordinates(seqfeature)
     with self.subTest():
         self.assertEqual(start, -1)
     with self.subTest():
         self.assertEqual(stop, -1)
     with self.subTest():
         self.assertEqual(parts, 0)
예제 #3
0
 def test_parse_coordinates_3(self):
     """Verify -1 strand 2-part compound location is parsed correctly."""
     seqfeature = test_data_utils.create_2_part_seqfeature(
         2, 10, -1, 8, 20, -1, "CDS")
     start, stop, parts = flat_files.parse_coordinates(seqfeature)
     with self.subTest():
         self.assertEqual(start, 8)
     with self.subTest():
         self.assertEqual(stop, 10)
     with self.subTest():
         self.assertEqual(parts, 2)