-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
executable file
·56 lines (41 loc) · 1.4 KB
/
main.nf
File metadata and controls
executable file
·56 lines (41 loc) · 1.4 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
nextflow.enable.dsl=2
include { FASTQC } from './modules/fastqc.nf'
include { MULTIQC } from './modules/multiqc.nf'
// this prevents a warning of undefined parameter
params.help = false
params.input_dir = ''
params.output_dir = ''
// this prints the input parameters
log.info """
BASIC FASTQ FILE QC - N F P I P E L I N E
============================================
input_reads_path : ${params.input_dir}
output_dir : ${params.output_dir}
"""
// this prints the help in case you use --help parameter in the command line and it stops the pipeline
if (params.help) {
log.info 'This is BASIC FASTQ FILE QC Pipeline\n'
log.info 'Please define input_reads_path and output_dir!\n'
log.info '\n'
exit 1
}
workflow {
reads_ch = Channel.fromFilePairs("$params.input_dir/*{1,2}.fastq.gz")
fastqc_ch = FASTQC(reads_ch)
MULTIQC(fastqc_ch)
}
workflow.onComplete {
println ( workflow.success ? """
Pipeline execution summary
---------------------------
Completed at: ${workflow.complete}
Duration : ${workflow.duration}
Success : ${workflow.success}
workDir : ${workflow.workDir}
exit status : ${workflow.exitStatus}
""" : """
Failed: ${workflow.errorReport}
exit status : ${workflow.exitStatus}
"""
)
}