-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
executable file
·49 lines (39 loc) · 1.17 KB
/
main.nf
File metadata and controls
executable file
·49 lines (39 loc) · 1.17 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
#!/usr/bin/env nextflow
/*
* Copyright (c) 2022, Seqera Labs.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This Source Code Form is "Incompatible With Secondary Licenses", as
* defined by the Mozilla Public License, v. 2.0.
*
*/
import groovy.json.JsonSlurper
include { fetch_dataset } from './modules/fetch_dataset'
log.info """
M L - H Y P E R O P T P I P E L I N E
=======================================
fetch_dataset : ${params.fetch_dataset}
base_url : ${params.base_url}
token : ${params.token}
project_id : ${params.project_id}
opt_run_id : ${params.opt_run_id}
outdir : ${params.outdir}
"""
/*
* main script flow
*/
workflow {
// fetch dataset if specified
if ( params.fetch_dataset == true ) {
dataset = fetch_dataset(params.project_id, params.opt_run_id, params.token, params.base_url)
}
}
/*
* completion handler
*/
workflow.onComplete {
log.info ( workflow.success ? '\nDone!' : '\nOops .. something went wrong' )
}