-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfoo.nf
More file actions
102 lines (80 loc) · 1.69 KB
/
foo.nf
File metadata and controls
102 lines (80 loc) · 1.69 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
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
#!/usr/bin/env nextflow
process foo {
publishDir params.outdir
input:
val x
output:
path 'x.txt'
"""
echo $x > x.txt
"""
}
/*
Python script to set up dp3 parset and copy to nodes according to pipeline
*/
process SetupSimulateVisibilities{
publishDir params.outdir
input:
val ns
val ne
val copy_dir
val indir
val dp3_parset_file
script:
"""
for ni in {${ns}..${ne}}; do
mkdir -p /net/node\${ni}/${copy_dir}
cp -r ${indir}/${dp3_parset_file} /net/node\${ni}/${copy_dir}/${dp3_parset_file}
done
"""
}
/*
Python script to set up noise parset according to pipeline
*/
params.outdir = "${launchDir}"
process SetupGaussianNoise{
publishDir params.outdir, mode: 'copy'
input:
val datapath
val msprefix
val skymodel_path
val outcol
val noise_parset
output:
path noise_parset
script:
"""
python3 /home/users/cahofer/code/simple/scripts/setup_noise.py -d ${datapath} -m ${msprefix} -s ${skymodel_path} -c ${outcol} -n ${noise_parset}
"""
}
/*
Bash script to make the machines file for sagecal.
*/
process MakeMachinesFile {
publishDir params.outdir, mode: 'copy'
input:
val ns
val ne
output:
path "machines.txt"
script:
"""
seq -f "node%g.fast.dawn.rug.nl slots=4 max_slots=4" ${ns} ${ne} > machines.txt
"""
}
process MSList {
publishDir params.outdir, mode: 'copy'
input:
val msprefix
val copy_dir
val ns
val ne
output:
path "file_list_${msprefix}"
script:
"""
for ni in {$ns..$ne}; do
ls -d /net/node\${ni}/${copy_dir}/${msprefix}*.MS >> file_list_${msprefix}
done
"""
}