-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.nf
59 lines (50 loc) · 1.09 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
process makeBuild {
output:
file "*" into buildFiles
script:
"""
createModel.py --folder ${params.input_dir}
"""
}
process splitSweepParams {
scratch true
input:
file testfiles from buildFiles
output:
file "outputFolder*" into buildFolders mode flatten
script:
"""
speciesVals=''
ratelawVals=''
if [ -z '${params.speciesVals}' ]
then
speciesVals='None'
else
speciesVals='${params.speciesVals}'
fi
if [ -z '${params.ratelawVals}' ]
then
ratelawVals='None'
else
ratelawVals='${params.ratelawVals}'
fi
numCopies='${params.numCells}'
savePermutations.py \$speciesVals \$ratelawVals
buildFolders.sh \$numCopies
exit
"""
}
process model {
input:
file buildFolder from buildFolders
script:
"""
cd ${buildFolder}
changeRunParams.py
runModel.py --deterministic ${params.deterministic} --time ${params.time} --Vn ${params.Vn} --Vc ${params.Vc} --outfile ${params.outfile}
rm -rf SPARCED
cd ..
cp -rf ${buildFolder}/* .
rm -rf ${buildFolder}
"""
}