forked from BCCDC-PHL/mpxv-artic-nf
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.nf
46 lines (35 loc) · 1.03 KB
/
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
45
46
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
// include modules
include {printHelp} from './modules/help.nf'
// import subworkflows
include {mpxvIllumina} from './workflows/illuminaMpxv.nf'
if (params.help){
printHelp()
exit 0
}
if ( !params.directory ) {
println("Please supply a directory containing fastqs or CRAMs with --directory.")
println("Use --help to print help")
System.exit(1)
}
if ( ! params.prefix ) {
println("Please supply a prefix for your output files with --prefix")
println("Use --help to print help")
System.exit(1)
} else {
if ( params.prefix =~ /\// ){
println("The --prefix that you supplied contains a \"/\", please replace it with another character")
System.exit(1)
}
}
// entrypoint workflow
WorkflowMain.initialise(workflow, params, log)
// main workflow
workflow {
Channel.fromFilePairs( params.fastqSearchPath, flat: true)
.filter{ !( it[0] =~ /Undetermined/ ) }
.set{ ch_filePairs }
main:
mpxvIllumina(ch_filePairs)
}