-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
44 lines (32 loc) · 906 Bytes
/
main.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env nextflow
out_dir = file(params.outdir)
out_dir.mkdir()
Channel
.fromFilePairs( params.rawReads )
.ifEmpty { error "Cannot find any reads matching: ${params.rawReads}" }
.into {read_pair_p1; read_pair_p2}
process runFastQC{
tag { "${params.projectName}.rFQC.${sample}" }
publishDir "${out_dir}/${sample}", mode: 'copy', overwrite: false
input:
set sample, file(in_fastq) from read_pair_p1
output:
file("${sample}_fastqc/*.zip") into fastqc_files
"""
mkdir ${sample}_fastqc
fastqc --outdir ${sample}_fastqc \
${in_fastq.get(0)} \
${in_fastq.get(1)}
"""
}
process runMultiQC{
tag { "${params.projectName}.rMQC" }
publishDir "${out_dir}/", mode: 'copy', overwrite: true
input:
file('*') from fastqc_files.collect()
output:
file('multiqc_report.html')
"""
multiqc .
"""
}