Skip to content

Commit

Permalink
Use zcat -f for fastqs to allow compressed and/or uncompressed files
Browse files Browse the repository at this point in the history
  • Loading branch information
martinaryee committed Jan 29, 2019
1 parent 3ff836c commit cf37fb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions preprocess_hic.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ task split_fastq_files {
Int disk_gb

command {
zcat ${sep=' ' r1_in} | split -d --suffix-length=3 -l ${num_lines_per_chunk} --additional-suffix='_R1.fastq' --filter='gzip > $FILE.gz' - ${sample_id}-
zcat ${sep=' ' r2_in} | split -d --suffix-length=3 -l ${num_lines_per_chunk} --additional-suffix='_R2.fastq' --filter='gzip > $FILE.gz' - ${sample_id}-
zcat -f ${sep=' ' r1_in} | split -d --suffix-length=3 -l ${num_lines_per_chunk} --additional-suffix='_R1.fastq' --filter='gzip > $FILE.gz' - ${sample_id}-
zcat -f ${sep=' ' r2_in} | split -d --suffix-length=3 -l ${num_lines_per_chunk} --additional-suffix='_R2.fastq' --filter='gzip > $FILE.gz' - ${sample_id}-
}

runtime {
Expand Down Expand Up @@ -125,7 +125,7 @@ task count_pairs {
String dollar = "$"

command <<<
num_lines=`zcat ${sep=' ' r1_fastq} | wc -l`
num_lines=`zcat -f ${sep=' ' r1_fastq} | wc -l`
let "num_pairs=${dollar}num_lines/4"
echo ${dollar}num_pairs
>>>
Expand Down

0 comments on commit cf37fb8

Please sign in to comment.