-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
executable file
·45 lines (32 loc) · 1.21 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
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
// include non-process modules
include { help_message; version_message; complete_message; error_message; pipeline_start_message } from './modules/messages.nf'
include { default_params; check_params } from './modules/params_parser.nf'
include { help_or_version } from './modules/params_utilities.nf'
version = '1.0dev'
// setup default params
default_params = default_params()
// merge defaults with user params
merged_params = default_params + params
// help and version messages
help_or_version(merged_params, version)
final_params = check_params(merged_params)
// starting pipeline
pipeline_start_message(version, final_params)
// include processes and workflows
include { NANOPORE } from './modules/workflow.nf' addParams(final_params)
workflow {
// Setup input Channel from Read path
reads_ch = channel
.fromPath( final_params.reads )
.map { file -> tuple(file.simpleName, file) }
.ifEmpty { error "Cannot find any reads matching: ${final_params.reads}" }
NANOPORE(reads_ch)
}
workflow.onComplete {
complete_message(final_params, workflow, version)
}
workflow.onError {
error_message(workflow)
}