Skip to content

Commit 2b8d96f

Browse files
authored
add the initial code
0 parents  commit 2b8d96f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

trimmed_gunzip.nf

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env nextflow
2+
3+
4+
/*
5+
################
6+
NEXTFLOW Global Config
7+
################
8+
*/
9+
10+
11+
inputRawFilePattern = "./*_{R1,R2}.p.fastq.gz"
12+
13+
Channel.fromFilePairs(inputRawFilePattern, flat: true)
14+
.into { ch_in_gzip }
15+
16+
17+
/*
18+
################
19+
gzip these files
20+
################
21+
*/
22+
23+
24+
process gzip {
25+
echo true
26+
container 'abhi18av/biodragao_base'
27+
publishDir 'results/gzip'
28+
29+
input:
30+
tuple (genomeName, path(read_1_gz), path(read_2_gz)) from ch_in_gzip
31+
32+
output:
33+
tuple path(genome_1_fq), path(genome_2_fq) into ch_out_gzip
34+
35+
script:
36+
// rename the output files
37+
// G04880_R1.p.fastq.gz > G04880_R1.p.fastq
38+
genome_1_fq = read_1_gz.name.split("\\.")[0] + '.p.fastq'
39+
genome_2_fq = read_2_gz.name.split("\\.")[0] + '.p.fastq'
40+
41+
"""
42+
gzip -dc ${read_1_gz} > ${genome_1_fq}
43+
gzip -dc ${read_2_gz} > ${genome_2_fq}
44+
"""
45+
//gzip -dc G04880_R1.p.fastq.gz > G04880_R1.p.fastq
46+
}

0 commit comments

Comments
 (0)