Skip to content

Commit

Permalink
made split_reads output be gzipped
Browse files Browse the repository at this point in the history
  • Loading branch information
timosong committed Jul 5, 2019
1 parent a8bb40c commit 81a1d2d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bin/cmo_split_reads
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ def chunk(fastq, platform_unit, lines_per_chunk):
exploded = output_prefix.split("_")
exploded[0]=platform_unit
output_prefix = "-".join(exploded)
# output_prefix = output_prefix+"chunk"
logger.info("Opening %s and writing reads..." % (fastq))
#these aren't relaly gz but trimgalore doesnt like files not named gz...great work trimgalore
os.popen('zcat %s | split -l %d -d --additional-suffix=.fastq.gz --suffix-length 3 - %s' % (fastq, lines_per_chunk, output_prefix))
os.popen("zcat %s | split -l %d -d --additional-suffix=.fastq --suffix-length 3 - %s --filter='gzip > $FILE.gz'" % (fastq, lines_per_chunk, output_prefix))
return True


Expand Down

0 comments on commit 81a1d2d

Please sign in to comment.