if opts.output is not None:
if opts.bzip:
- output = bz2.BZ2File(opts.output,'w')
+ output = bz2.BZ2File(opts.output, 'wt')
elif opts.gzip:
- output = gzip.GzipFile(opts.output, 'w')
+ output = gzip.GzipFile(opts.output, 'wt')
else:
output = open(opts.output, 'w')
else:
for read in UNALIGNED_READS:
suffix = 'R{0}_{1}_export.txt.gz'.format(read, split)
pathname = paths.make_test_filename(suffix)
- stream = gzip.open(pathname, 'w')
+ stream = gzip.open(pathname, 'wt')
stream.write(body)
stream.close()
for read in reads:
suffix = 'R{0}_{1}.fastq.gz'.format(read, split)
pathname = paths.make_test_filename(suffix)
- stream = gzip.open(pathname, 'w')
+ stream = gzip.open(pathname, 'wt')
stream.write(sample_seq)
stream.close()