Beispiel #1
0
 def setUp(self):
     self.records = [
         fastq_pb2.FastqRecord(id='id1', sequence='ACGTG', quality='ABCDE'),
         fastq_pb2.FastqRecord(id='id2', sequence='ATTT', quality='ABC@'),
         fastq_pb2.FastqRecord(id='ID3',
                               description='multi desc',
                               sequence='GATAC',
                               quality='ABC@!'),
     ]
 def setUp(self):
     writer_options = fastq_pb2.FastqWriterOptions()
     out_fname = test_utils.test_tmpfile('output.fastq')
     self.writer = fastq_writer.FastqWriter.to_file(out_fname,
                                                    writer_options)
     self.expected_fastq_content = [
         '@NODESC:header\n',
         'GATTACA\n',
         '+\n',
         'BB>B@FA\n',
         '@M01321:49:000000000-A6HWP:1:1101:17009:2216 1:N:0:1\n',
         'CGTTAGCGCAGGGGGCATCTTCACACTGGTGACAGGTAACCGCCGTAGTAAAGGTTCCGCCTTTCACT\n',
         '+\n',
         'AAAAABF@BBBDGGGG?FFGFGHBFBFBFABBBHGGGFHHCEFGGGGG?FGFFHEDG3EFGGGHEGHG\n',
         '@FASTQ contains multiple spaces in description\n',
         'CGGCTGGTCAGGCTGACATCGCCGCCGGCCTGCAGCGAGCCGCTGC\n',
         '+\n',
         'FAFAF;F/9;.:/;999B/9A.DFFF;-->.AAB/FC;9-@-=;=.\n',
         '@FASTQ_with_trailing_space\n',
         'CGG\n',
         '+\n',
         'FAD\n',
     ]
     self.record = fastq_pb2.FastqRecord(id='ID',
                                         description='desc',
                                         sequence='ACGTAC',
                                         quality='ABCDEF')
 def _raw_next(self):
   record = fastq_pb2.FastqRecord()
   not_done = self._cc_iterable.PythonNext(record)
   return record, not_done