Ejemplo n.º 1
0
 def test_from_regions_not_empty(self):
   literals = ['chr1', 'chr2:10-20']
   self.assertItemsEqual(
       [ranges.make_range('chr1', 0, 10),
        ranges.make_range('chr2', 9, 20)],
       ranges.RangeSet.from_regions(
           literals, ranges.contigs_dict(_TEST_CONTIGS)))
Ejemplo n.º 2
0
 def test_query(self, query, expected_variant_indices):
   range1 = ranges.parse_literal(query, ranges.contigs_dict(
       self.header.contigs))
   self.assertEqual(
       list(self.reader.query(range1)),
       [self.variants[i] for i in expected_variant_indices])