Пример #1
0
 def setUp(self):
     self.records = [
         bed_pb2.BedRecord(reference_name='chr1',
                           start=30,
                           end=40,
                           name='first',
                           score=55.5),
         bed_pb2.BedRecord(reference_name='chr2',
                           start=32,
                           end=38,
                           name='second',
                           score=0),
         bed_pb2.BedRecord(reference_name='chr3',
                           start=40,
                           end=50,
                           name='third',
                           score=99),
     ]
     self.tokens = [
         [
             'chr1', '30', '40', 'first', '55.5', '+', '35', '38',
             '128,242,16', '2', '5,3', '30,37'
         ],
         [
             'chr2', '32', '38', 'second', '0', '.', '32', '38',
             '128,128,128', '1', '6', '32'
         ],
         [
             'chr3', '40', '50', 'third', '99', '-', '40', '44', '0,0,0',
             '3', '40,43,48', '3,2,2'
         ],
     ]
Пример #2
0
 def setUp(self):
   out_fname = test_utils.test_tmpfile('output.bed')
   self.writer = bed_writer.BedWriter.to_file(
       out_fname, bed_pb2.BedHeader(num_fields=12), bed_pb2.BedWriterOptions())
   self.expected_bed_content = [
       'chr1\t10\t20\tfirst\t100\t+\t12\t18\t255,124,1\t3\t2,6,2\t10,12,18\n',
       'chr1\t100\t200\tsecond\t250\t.\t120\t180\t252,122,12\t2\t35,40\t'
       '100,160\n'
   ]
   self.record = bed_pb2.BedRecord(
       reference_name='chr1', start=20, end=30, name='r')
Пример #3
0
 def setUp(self):
     self.bed = test_utils.genomics_core_testdata('test_regions.bed')
     self.zipped_bed = test_utils.genomics_core_testdata(
         'test_regions.bed.gz')
     self.options = bed_pb2.BedReaderOptions()
     self.first = bed_pb2.BedRecord(reference_name='chr1',
                                    start=10,
                                    end=20,
                                    name='first',
                                    score=100,
                                    strand=bed_pb2.BedRecord.FORWARD_STRAND,
                                    thick_start=12,
                                    thick_end=18,
                                    item_rgb='255,124,1',
                                    block_count=3,
                                    block_sizes='2,6,2',
                                    block_starts='10,12,18')
Пример #4
0
 def _raw_next(self):
   record = bed_pb2.BedRecord()
   not_done = self._cc_iterable.PythonNext(record)
   return record, not_done