-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
284 lines (261 loc) · 8.43 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
// Global default params, used in configs
params {
// Default workflow
workflow = "arbitrary_grid" // "two_references" "one_reference" "arbitrary_grid" "deconvolution_indices"
input = "./assets/samplesheet.csv"
outdir = "./results"
tracedir = "${params.outdir}/pipeline_info"
memory_scale_factor = 1.0
bind = ""
overwrite_files_on_publish = false
}
includeConfig 'conf/containers.config'
// Default parameters
if (params.workflow == 'one_reference') {
includeConfig 'conf/analysis-one.config'
if (params.do_img_subworkflow) {
includeConfig 'conf/analysis-img.config'
}
}
if (params.workflow == 'two_references' || params.workflow == 'deconvolution_indices') {
includeConfig 'conf/analysis-two.config'
if (params.do_img_subworkflow) {
includeConfig 'conf/analysis-img.config'
}
}
if (params.workflow == 'arbitrary_grid') {
includeConfig 'conf/analysis-img.config'
}
process {
resourceLimits = [ cpus: 70, memory: 768.GB, time: 72.h ]
withName: GUNZIP {
cpus = 1
memory = 20.GB
container = params.container_vips
clusterOptions = '--time=01:00:00'
}
withName: GUNZIP_FASTA {
cpus = 1
memory = 20.GB
container = params.container_vips
clusterOptions = '--time=01:00:00'
}
withName: DECONVOLUTION_XENOME {
cpus = 8
memory = 50.GB
container = params.container_xenome
clusterOptions = '--time=06:00:00'
}
withName: DECONVOLUTION_XENGSORT {
cpus = 8
memory = 50.GB
container = params.container_xengsort
clusterOptions = '--time=06:00:00'
}
withName: XENOME_GENERATE_INDEX {
cpus = 16
memory = 100.GB
container = params.container_xenome
clusterOptions = '--time=06:00:00'
}
withName: XENGSORT_GENERATE_INDEX {
cpus = 32
memory = 50.GB
container = params.container_xengsort
clusterOptions = '--time=01:00:00'
}
withLabel: low_process {
cpus = 1
memory = 8.GB
container = params.container_fastqtools
}
withLabel: samtools {
cpus = 4
memory = 64.GB
container = params.container_samtools
clusterOptions = '--time=03:00:00'
}
withLabel: splicing_quantification {
cpus = 1
memory = 64.GB
container = params.container_velocyto
clusterOptions = '--time=09:00:00'
}
withLabel: python_low_process {
cpus = 1
memory = 12.GB
container = params.container_python
clusterOptions = '--time=01:00:00'
}
withName: SPACERANGER {
cpus = 8
memory = 90.GB
container = params.container_spaceranger
clusterOptions = '--time=24:00:00'
}
withLabel: bafextract {
cpus = 1
memory = 36.GB
container = params.container_bafextract
clusterOptions = '--time=03:00:00'
}
withLabel: vips_process {
cpus = 1
memory = 3.GB
container = params.container_vips
}
withLabel: process_ome {
cpus = 1
memory = 36.GB
container = params.container_ome
}
withLabel: process_estimate_size {
cpus = 1
memory = 2.GB
container = params.container_inception
}
withLabel: process_extract {
cpus = 1
container = params.container_inception
clusterOptions = '--time=03:00:00'
}
withLabel: color_normalization_process {
cpus = 1
container = params.container_stainnet
clusterOptions = '--time=16:00:00'
}
withLabel: stain_normalization_process {
cpus = 1
container = params.container_staintools
clusterOptions = '--time=16:00:00'
}
withLabel: python_process_low {
cpus = 1
container = params.container_inception
clusterOptions = '--time=02:00:00'
}
withLabel: process_focus {
cpus = 16
container = params.container_deepfocus
clusterOptions = '--time=16:00:00'
}
withLabel: process_inception {
cpus = 10
container = params.container_inception
clusterOptions = '--time=16:00:00'
}
withLabel: process_uni {
cpus = 10
container = params.container_uni_conch
clusterOptions = '--time=16:00:00'
}
withLabel: process_conch {
cpus = 10
container = params.container_uni_conch
clusterOptions = '--time=16:00:00'
}
withLabel: process_ctranspath {
cpus = 10
container = params.container_ctranspath
clusterOptions = '--time=16:00:00'
}
withLabel: process_mocov3 {
cpus = 1
container = params.container_ctranspath
resourceLimits = [ cpus: 46, memory: 170.GB, time: 6.h ]
clusterOptions = '--time=03:00:00 -q gpu_inference --gres=gpu:1 --export=ALL'
containerOptions = '--nv'
queue = 'gpu_v100'
}
withLabel: process_stardist {
cpus = 4
container = params.container_inception
clusterOptions = '--time=16:00:00'
}
withLabel: process_hovernet_low {
cpus = 1
memory = 3.GB
container = params.container_hovernet
clusterOptions = '--time=02:00:00'
}
withLabel: process_hovernet {
container = params.container_hovernet
if (params.do_nuclear_segmentation || params.sample_tiles_subworkflow) {
if (params.hovernet_device_mode == 'gpu') {
resourceLimits = [ cpus: 46, memory: 170.GB, time: 6.h ]
cpus = 8
clusterOptions = '--time=06:00:00 -q gpu_inference --gres=gpu:1 --export=ALL'
containerOptions = '--nv'
queue = 'gpu_v100'
}
else if (params.hovernet_device_mode == 'cpu') {
cpus = 10
clusterOptions = '--time=48:00:00'
}
}
}
withLabel: process_post_hovernet {
container = params.container_hovernet
cpus = 16
}
}
profiles {
slurm {
executor {
name = "slurm"
submitRateLimit = '100/1s'
queueSize = 100
}
process.queue = "compute"
process.clusterOptions = '-q batch'
process.module = "slurm"
}
singularity {
process.module = 'singularity'
singularity.enabled = true
singularity.envWhitelist = 'CUDA_VISIBLE_DEVICES'
singularity.autoMounts = true
docker.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
singularity.runOptions = "-B $projectDir " + params.bind
}
test {
includeConfig 'conf/test.config'
}
}
// Export these variables to prevent local Python/R libraries from conflicting with those in the container
// The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container.
// See https://apeltzer.github.io/post/03-julia-lang-nextflow/ for details on that. Once we have a common agreement on where to keep Julia packages, this is adjustable.
env {
PYTHONNOUSERSITE = 1
R_PROFILE_USER = "/.Rprofile"
R_ENVIRON_USER = "/.Renviron"
JULIA_DEPOT_PATH = "/usr/local/share/julia"
}
// Capture exit codes from upstream processes when piping
process.shell = ['/bin/bash', '-euo', 'pipefail']
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
timeline {
enabled = true
file = "${params.tracedir}/execution_timeline_${trace_timestamp}.html"
}
report {
enabled = true
file = "${params.tracedir}/execution_report_${trace_timestamp}.html"
}
trace {
enabled = true
file = "${params.tracedir}/execution_trace_${trace_timestamp}.txt"
}
dag {
enabled = true
file = "${params.tracedir}/pipeline_dag_${trace_timestamp}.svg"
}
manifest {
author = 'Sergii Domanskyi'
homePage = 'https://github.com/TheJacksonLaboratory/STQ'
description = 'Spatial Transcriptomics Quantification'
mainScript = 'main.nf'
}