-
Notifications
You must be signed in to change notification settings - Fork 1
/
nextflow.config
127 lines (108 loc) · 3.1 KB
/
nextflow.config
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
120
121
122
123
124
125
126
127
manifest {
mainScript = 'main.nf'
defaultBranch = 'main'
nextflowVersion = '>=24.04.4'
}
// Global default params, used in configs
params {
runtime_opts = ''
lsf_opts = ''
vmf = '-B' // volume mounting flag - default it to singularity flag
singularity_cache_dir = getEnvValue("HOME",
getEnvValue("TMPDIR", "/tmp")) + "/.singularity_cache"
singularity_user = getEnvValue("USER", "")
scratch_mount = ''
}
// Load base.config by default for all pipelines
includeConfig 'conf/base.config'
profiles {
standard {
docker.enabled = false
singularity.enabled = true
process {
withLabel: withGPU {
containerOptions = "${params.runtime_opts} --nv"
}
}
}
localDocker {
docker.enabled = true
singularity.enabled = false
params.vmf = '-v'
}
janeliaLSF {
process {
executor = 'lsf'
clusterOptions = params.lsf_opts
withLabel: withGPU {
queue = 'gpu_tesla'
clusterOptions = '-gpu "num=1" ' + params.lsf_opts
containerOptions = "${params.runtime_opts} --nv"
}
withLabel: use_local {
executor = 'local'
}
}
params.scratch_mount = params.vmf + ' /scratch/' + params.singularity_user
docker.enabled = false
singularity.enabled = true
}
janeliaLSFNoGPU {
process {
executor = 'lsf'
containerOptions = params.runtime_opts
clusterOptions = params.lsf_opts
withLabel: use_local {
executor = 'local'
}
}
params.scratch_mount = params.vmf + ' /scratch/' + params.singularity_user
docker.enabled = false
singularity.enabled = true
}
tower {
process {
withLabel: withGPU {
containerOptions = ""
}
}
fusion.enabled = true
wave.enabled = true
docker.enabled = true
singularity.enabled = false
params.singularity_user = "ec2_user"
}
tower_gpu {
process {
withLabel: withGPU {
accelerator = 1
containerOptions = "--runtime nvidia"
}
}
fusion.enabled = true
wave.enabled = true
docker.enabled = true
singularity.enabled = false
params.singularity_user = "ec2_user"
}
}
docker {
runOptions = "${params.runtime_opts}"
temp = "auto"
}
singularity {
autoMounts = true
cacheDir = "${params.singularity_cache_dir}"
runOptions = "${params.scratch_mount} --env USER=${params.singularity_user} ${params.runtime_opts}"
}
// Borrowed from nf-virontus/nextflow.config
// Try to get a system environment variable value with some key. If the key
// doesn't exist, then return a default value
def getEnvValue(envKey, defaultValue = null) {
envMap = new HashMap(System.getenv())
if (envMap.containsKey(envKey)) {
envMap[envKey]
} else {
defaultValue
}
}