Skip to content

Commit cf6e09c

Browse files
authored
fix: update the outputExtension wrt the trimmed param
1 parent 1acd2de commit cf6e09c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

main.nf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ gzip these files
3737

3838

3939
process gzip {
40-
echo true
4140
container 'abhi18av/biodragao_base'
4241
publishDir 'results/gzip'
4342

@@ -48,10 +47,12 @@ process gzip {
4847
tuple path(genome_1_fq), path(genome_2_fq) into ch_out_gzip
4948

5049
script:
50+
outputExtension = params.trimmed ? '.p.fastq' : '.fastq'
51+
5152
// rename the output files
5253
// G04880_R1.p.fastq.gz > G04880_R1.p.fastq
53-
genome_1_fq = read_1_gz.name.split("\\.")[0] + '.p.fastq'
54-
genome_2_fq = read_2_gz.name.split("\\.")[0] + '.p.fastq'
54+
genome_1_fq = read_1_gz.name.split("\\.")[0] + outputExtension
55+
genome_2_fq = read_2_gz.name.split("\\.")[0] + outputExtension
5556

5657
"""
5758
gzip -dc ${read_1_gz} > ${genome_1_fq}

0 commit comments

Comments
 (0)