-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
119 lines (87 loc) · 3.76 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/usr/bin/env nextflow
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AVR-biosecurity-bioinformatics/mimir
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Github : https://github.com/AVR-biosecurity-bioinformatics/mimir
----------------------------------------------------------------------------------------
*/
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PRINT PARAMS SUMMARY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
// include functions from nf-schema
include { validateParameters; paramsHelp; paramsSummaryLog; samplesheetToList } from 'plugin/nf-schema'
//
// from https://github.com/nextflow-io/nextflow/issues/1129
// if( !nextflow.version.matches('=23.04.5') ) {
// println " "
// println "*** ERROR ~ This pipeline currently requires Nextflow version 23.04.5 -- You are running version ${nextflow.version}. ***"
// error "*** You can use version 23.04.5 by appending 'NXF_VER=23.04.5' to the front of the 'nextflow run' command. ***"
// }
if( !nextflow.version.matches('=23.05.0-edge') ) {
println " "
println "*** ERROR ~ This pipeline currently requires Nextflow version 23.05.0-edge -- You are running version ${nextflow.version}. ***"
error "*** You can use version 23.05.0-edge by appending 'NXF_VER=23.05.0-edge' to the front of the 'nextflow run' command. ***"
}
def startupMessage() {
log.info pipelineHeader()
log.info "~~~ mimir: DNA barcode reference database curation ~~~"
log.info " "
}
def pipelineHeader(){
return """
## ##
##### ### ##### ### ### ##
# # # ## # # # ## ###
# # # # # # # # ##
# # # ## # # # ## ##
## # ## ###### ## # ## ###### ####
""".stripIndent()
}
startupMessage()
workflow.onComplete {
if ( workflow.success ) {
log.info "[$workflow.complete] >> Pipeline finished SUCCESSFULLY after $workflow.duration"
} else {
log.info "[$workflow.complete] >> Pipeline finished with ERRORS after $workflow.duration"
}
/*
TODO: use other metadata (https://www.nextflow.io/docs/latest/metadata.html) to display at the end of a run.
*/
}
// Print help message, supply typical command line usage for the pipeline
if (params.help) {
// log.info startupMessage()
log.info paramsHelp("nextflow run AVR-biosecurity-bioinformatics/mimir") // TODO: add typical commands for pipeline
exit 0
}
// Validate input parameters using schema
// validateParameters( parameters_schema: 'nextflow_schema.json' )
// Print summary of supplied parameters (that differ from defaults)
log.info paramsSummaryLog(workflow)
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORT LOCAL MODULES/SUBWORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//// subworkflows
include { TAXRETURN } from './nextflow/subworkflows/taxreturn'
//// modules
// include { PULL_NCBI } from './nextflow/modules/pull_ncbi'
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN MAIN WORKFLOW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//// define main workflow
workflow MIMIR {
TAXRETURN (
"dummy"
)
}
///// run implicit workflow
workflow {
MIMIR()
}