-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.nf
executable file
·46 lines (37 loc) · 956 Bytes
/
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 {
default_dask_params;
} from './lib/dask_params';
final_params = default_dask_params() +
with_termination_params() +
cluster_paths_params() +
params
include {
CREATE_DASK_CLUSTER;
} from './workflows/create_dask_cluster' addParams(final_params);
include {
DASK_CLUSTER_TERMINATE;
} from './modules/dask/cluster_terminate/main' addParams(final_params);
workflow {
def res = CREATE_DASK_CLUSTER(file(params.dask_work_dir),
Channel.of(final_params.cluster_paths))
if (final_params.with_termination) {
res
| map {
def (cluster_id, scheduler_ip, wd) = it
wd
}
| DASK_CLUSTER_TERMINATE
}
}
def with_termination_params() {
[
with_termination: false,
]
}
def cluster_paths_params() {
[
cluster_paths: '',
]
}