-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.nf
557 lines (442 loc) · 20.8 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
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
#!/usr/bin/env nextflow
// hash:sha256:ee238a2e6bda43aaa966305b789cc227184d10b60b7ff1a044182d98c6b8a0f6
nextflow.enable.dsl = 1
params.ecephys_url = 's3://aind-ephys-data/ecephys_713593_2024-02-08_14-10-37'
capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_preprocessing_1_1 = channel.create()
ecephys_to_preprocess_ecephys_2 = channel.fromPath(params.ecephys_url + "/", type: 'any')
capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_curation_2_3 = channel.create()
ecephys_to_job_dispatch_ecephys_4 = channel.fromPath(params.ecephys_url + "/", type: 'any')
ecephys_to_postprocess_ecephys_5 = channel.fromPath(params.ecephys_url + "/", type: 'any')
capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_postprocessing_5_6 = channel.create()
capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_postprocessing_5_7 = channel.create()
capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_postprocessing_5_8 = channel.create()
capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_visualization_6_9 = channel.create()
capsule_aind_ephys_unit_classifier_8_to_capsule_aind_ephys_visualization_6_10 = channel.create()
capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_visualization_6_11 = channel.create()
capsule_aind_ephys_curation_2_to_capsule_aind_ephys_visualization_6_12 = channel.create()
capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_visualization_6_13 = channel.create()
capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_visualization_6_14 = channel.create()
ecephys_to_visualize_ecephys_15 = channel.fromPath(params.ecephys_url + "/", type: 'any')
capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_spikesort_kilosort_25_7_16 = channel.create()
capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_unit_classifier_8_17 = channel.create()
capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_results_collector_9_18 = channel.create()
capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_results_collector_9_19 = channel.create()
capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_results_collector_9_20 = channel.create()
capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_results_collector_9_21 = channel.create()
capsule_aind_ephys_curation_2_to_capsule_aind_ephys_results_collector_9_22 = channel.create()
capsule_aind_ephys_unit_classifier_8_to_capsule_aind_ephys_results_collector_9_23 = channel.create()
capsule_aind_ephys_visualization_6_to_capsule_aind_ephys_results_collector_9_24 = channel.create()
ecephys_to_collect_results_ecephys_25 = channel.fromPath(params.ecephys_url + "/", type: 'any')
ecephys_to_nwb_packaging_subject_capsule_26 = channel.fromPath(params.ecephys_url + "/", type: 'any')
capsule_aind_ephys_job_dispatch_4_to_capsule_nwb_packaging_units_11_27 = channel.create()
capsule_nwb_packaging_ecephys_capsule_12_to_capsule_nwb_packaging_units_11_28 = channel.create()
capsule_aind_ephys_results_collector_9_to_capsule_nwb_packaging_units_11_29 = channel.create()
ecephys_to_nwb_packaging_units_30 = channel.fromPath(params.ecephys_url + "/", type: 'any')
capsule_aind_ephys_job_dispatch_4_to_capsule_nwb_packaging_ecephys_capsule_12_31 = channel.create()
ecephys_to_nwb_packaging_ecephys_capsule_32 = channel.fromPath(params.ecephys_url + "/", type: 'any')
capsule_nwb_packaging_subject_capsule_10_to_capsule_nwb_packaging_ecephys_capsule_12_33 = channel.create()
// capsule - Preprocess Ecephys
process capsule_aind_ephys_preprocessing_1 {
tag 'capsule-0874799'
container "$REGISTRY_HOST/capsule/05eaf483-9ca3-4a9e-8da8-7d23717f6faf:523fa9d174842e03d2834412ff170b5e"
cpus 16
memory '64 GB'
input:
path 'capsule/data/' from capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_preprocessing_1_1.flatten()
path 'capsule/data/ecephys_session' from ecephys_to_preprocess_ecephys_2.collect()
output:
path 'capsule/results/*' into capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_postprocessing_5_7
path 'capsule/results/*' into capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_visualization_6_11
path 'capsule/results/*' into capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_spikesort_kilosort_25_7_16
path 'capsule/results/*' into capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_results_collector_9_19
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=05eaf483-9ca3-4a9e-8da8-7d23717f6faf
export CO_CPUS=16
export CO_MEMORY=68719476736
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-0874799.git" capsule-repo
git -C capsule-repo checkout bb516eafb1c2a73901ac5cba781a5bc316679058 --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run ${params.capsule_aind_ephys_preprocessing_1_args}
echo "[${task.tag}] completed!"
"""
}
// capsule - Curate Ecephys
process capsule_aind_ephys_curation_2 {
tag 'capsule-8866682'
container "$REGISTRY_HOST/capsule/0e141650-15b9-4150-8277-2337557a8688:3277e97619b15e62ed31572251863e7b"
cpus 4
memory '32 GB'
input:
path 'capsule/data/' from capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_curation_2_3
output:
path 'capsule/results/*' into capsule_aind_ephys_curation_2_to_capsule_aind_ephys_visualization_6_12
path 'capsule/results/*' into capsule_aind_ephys_curation_2_to_capsule_aind_ephys_results_collector_9_22
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=0e141650-15b9-4150-8277-2337557a8688
export CO_CPUS=4
export CO_MEMORY=34359738368
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-8866682.git" capsule-repo
git -C capsule-repo checkout a8d31a85ceeedb903f19c5b8476cdaf8a8b750e6 --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run
echo "[${task.tag}] completed!"
"""
}
// capsule - Job Dispatch Ecephys
process capsule_aind_ephys_job_dispatch_4 {
tag 'capsule-5089190'
container "$REGISTRY_HOST/capsule/44358dbf-921b-42d7-897d-9725eebd5ed8:38fc6e79f1b73753fbcc23ee1492cf4d"
cpus 4
memory '32 GB'
input:
path 'capsule/data/ecephys_session' from ecephys_to_job_dispatch_ecephys_4.collect()
output:
path 'capsule/results/*' into capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_preprocessing_1_1
path 'capsule/results/*' into capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_postprocessing_5_8
path 'capsule/results/*' into capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_visualization_6_9
path 'capsule/results/*' into capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_results_collector_9_18
path 'capsule/results/*' into capsule_aind_ephys_job_dispatch_4_to_capsule_nwb_packaging_units_11_27
path 'capsule/results/*' into capsule_aind_ephys_job_dispatch_4_to_capsule_nwb_packaging_ecephys_capsule_12_31
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=44358dbf-921b-42d7-897d-9725eebd5ed8
export CO_CPUS=4
export CO_MEMORY=34359738368
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-5089190.git" capsule-repo
git -C capsule-repo checkout c12f45e41d8c9961657a011b50d6a0b376808421 --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run ${params.capsule_aind_ephys_job_dispatch_4_args}
echo "[${task.tag}] completed!"
"""
}
// capsule - Postprocess Ecephys
process capsule_aind_ephys_postprocessing_5 {
tag 'capsule-5473620'
container "$REGISTRY_HOST/capsule/6020e947-d8ea-4b64-998b-37404eb5ea51:6ffbe6ba08a782f72d1c46395c415944"
cpus 16
memory '128 GB'
input:
path 'capsule/data/ecephys_session' from ecephys_to_postprocess_ecephys_5.collect()
path 'capsule/data/' from capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_postprocessing_5_6.collect()
path 'capsule/data/' from capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_postprocessing_5_7.collect()
path 'capsule/data/' from capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_postprocessing_5_8.flatten()
output:
path 'capsule/results/*' into capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_curation_2_3
path 'capsule/results/*' into capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_visualization_6_14
path 'capsule/results/*' into capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_unit_classifier_8_17
path 'capsule/results/*' into capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_results_collector_9_21
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=6020e947-d8ea-4b64-998b-37404eb5ea51
export CO_CPUS=16
export CO_MEMORY=137438953472
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-5473620.git" capsule-repo
git -C capsule-repo checkout f63b9b16c5ababd75826445f1f71a44298feeff2 --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run ${params.capsule_aind_ephys_postprocessing_5_args}
echo "[${task.tag}] completed!"
"""
}
// capsule - Visualize Ecephys
process capsule_aind_ephys_visualization_6 {
tag 'capsule-6668112'
container "$REGISTRY_HOST/capsule/628c3c19-61bc-4f0c-80b2-00e81f83c176:949d03d1402d2951bf9d03a84001089c"
cpus 4
memory '64 GB'
input:
path 'capsule/data/' from capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_visualization_6_9.collect()
path 'capsule/data/' from capsule_aind_ephys_unit_classifier_8_to_capsule_aind_ephys_visualization_6_10.collect()
path 'capsule/data/' from capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_visualization_6_11
path 'capsule/data/' from capsule_aind_ephys_curation_2_to_capsule_aind_ephys_visualization_6_12.collect()
path 'capsule/data/' from capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_visualization_6_13.collect()
path 'capsule/data/' from capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_visualization_6_14.collect()
path 'capsule/data/ecephys_session' from ecephys_to_visualize_ecephys_15.collect()
output:
path 'capsule/results/*' into capsule_aind_ephys_visualization_6_to_capsule_aind_ephys_results_collector_9_24
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=628c3c19-61bc-4f0c-80b2-00e81f83c176
export CO_CPUS=4
export CO_MEMORY=68719476736
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-6668112.git" capsule-repo
git -C capsule-repo checkout 4279f309927a1e3ad3df3a4142e45ae59644785a --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run
echo "[${task.tag}] completed!"
"""
}
// capsule - Spikesort Kilosort2.5 Ecephys
process capsule_aind_ephys_spikesort_kilosort_25_7 {
tag 'capsule-2633671'
container "$REGISTRY_HOST/capsule/9c169ec3-5933-4b10-808b-6fa4620e37b7:00a3548a3adaea831d1ec593d056d4a0"
cpus 16
memory '61 GB'
accelerator 1
label 'gpu'
input:
path 'capsule/data/' from capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_spikesort_kilosort_25_7_16
output:
path 'capsule/results/*' into capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_postprocessing_5_6
path 'capsule/results/*' into capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_visualization_6_13
path 'capsule/results/*' into capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_results_collector_9_20
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=9c169ec3-5933-4b10-808b-6fa4620e37b7
export CO_CPUS=16
export CO_MEMORY=65498251264
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-2633671.git" capsule-repo
git -C capsule-repo checkout c7b2d11ea0c258a0d07c28c105d365553ccfaf43 --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run ${params.capsule_aind_ephys_spikesort_kilosort_25_7_args}
echo "[${task.tag}] completed!"
"""
}
// capsule - Unit Classifier Ecephys
process capsule_aind_ephys_unit_classifier_8 {
tag 'capsule-3820244'
container "$REGISTRY_HOST/capsule/25e96d32-73e9-4a19-b967-f095ffe06c28:34af8863c19bfcdbfb4b57fe07b23476"
cpus 8
memory '64 GB'
input:
path 'capsule/data/' from capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_unit_classifier_8_17
output:
path 'capsule/results/*' into capsule_aind_ephys_unit_classifier_8_to_capsule_aind_ephys_visualization_6_10
path 'capsule/results/*' into capsule_aind_ephys_unit_classifier_8_to_capsule_aind_ephys_results_collector_9_23
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=25e96d32-73e9-4a19-b967-f095ffe06c28
export CO_CPUS=8
export CO_MEMORY=68719476736
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-3820244.git" capsule-repo
git -C capsule-repo checkout 0231bdaa9cb1a812e55b0c938167049ba0ea62fe --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run
echo "[${task.tag}] completed!"
"""
}
// capsule - Collect Results Ecephys
process capsule_aind_ephys_results_collector_9 {
tag 'capsule-4820071'
container "$REGISTRY_HOST/capsule/2fcf1c0b-df5d-4822-b078-9e1024a092c5:31effaa4c4ac3f75b2c9f175f53f419b"
cpus 8
memory '64 GB'
publishDir "$RESULTS_PATH", saveAs: { filename -> new File(filename).getName() }
input:
path 'capsule/data/' from capsule_aind_ephys_job_dispatch_4_to_capsule_aind_ephys_results_collector_9_18.collect()
path 'capsule/data/' from capsule_aind_ephys_preprocessing_1_to_capsule_aind_ephys_results_collector_9_19.collect()
path 'capsule/data/' from capsule_aind_ephys_spikesort_kilosort_25_7_to_capsule_aind_ephys_results_collector_9_20.collect()
path 'capsule/data/' from capsule_aind_ephys_postprocessing_5_to_capsule_aind_ephys_results_collector_9_21.collect()
path 'capsule/data/' from capsule_aind_ephys_curation_2_to_capsule_aind_ephys_results_collector_9_22.collect()
path 'capsule/data/' from capsule_aind_ephys_unit_classifier_8_to_capsule_aind_ephys_results_collector_9_23.collect()
path 'capsule/data/' from capsule_aind_ephys_visualization_6_to_capsule_aind_ephys_results_collector_9_24.collect()
path 'capsule/data/ecephys_session' from ecephys_to_collect_results_ecephys_25.collect()
output:
path 'capsule/results/*'
path 'capsule/results/*' into capsule_aind_ephys_results_collector_9_to_capsule_nwb_packaging_units_11_29
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=2fcf1c0b-df5d-4822-b078-9e1024a092c5
export CO_CPUS=8
export CO_MEMORY=68719476736
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-4820071.git" capsule-repo
git -C capsule-repo checkout 2dcc8b7d9089d2c0069aa163b6be8992b02628a5 --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run
echo "[${task.tag}] completed!"
"""
}
// capsule - NWB-Packaging-Subject-Capsule
process capsule_nwb_packaging_subject_capsule_10 {
tag 'capsule-1748641'
container "$REGISTRY_HOST/capsule/dde17e00-2bad-4ceb-a00e-699ec25aca64:cfac593fe3228c6ee40d14cd2f3509e0"
cpus 4
memory '32 GB'
input:
path 'capsule/data/ecephys_session' from ecephys_to_nwb_packaging_subject_capsule_26.collect()
output:
path 'capsule/results/*' into capsule_nwb_packaging_subject_capsule_10_to_capsule_nwb_packaging_ecephys_capsule_12_33
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=dde17e00-2bad-4ceb-a00e-699ec25aca64
export CO_CPUS=4
export CO_MEMORY=34359738368
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-1748641.git" capsule-repo
git -C capsule-repo checkout 0817b7aa432c788d00c49aab0fa5da19a5199d07 --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run ${params.capsule_nwb_packaging_subject_capsule_10_args}
echo "[${task.tag}] completed!"
"""
}
// capsule - NWB-Packaging-Units
process capsule_nwb_packaging_units_11 {
tag 'capsule-7106853'
container "$REGISTRY_HOST/capsule/9be90966-938b-4084-8959-4966e9dbb955:3c4c7ec4b1d220fe40b0dc1ccfd8a1cd"
cpus 4
memory '32 GB'
publishDir "$RESULTS_PATH/nwb", saveAs: { filename -> new File(filename).getName() }
input:
path 'capsule/data/' from capsule_aind_ephys_job_dispatch_4_to_capsule_nwb_packaging_units_11_27.collect()
path 'capsule/data/' from capsule_nwb_packaging_ecephys_capsule_12_to_capsule_nwb_packaging_units_11_28.collect()
path 'capsule/data/' from capsule_aind_ephys_results_collector_9_to_capsule_nwb_packaging_units_11_29.collect()
path 'capsule/data/ecephys_session' from ecephys_to_nwb_packaging_units_30.collect()
output:
path 'capsule/results/*'
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=9be90966-938b-4084-8959-4966e9dbb955
export CO_CPUS=4
export CO_MEMORY=34359738368
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-7106853.git" capsule-repo
git -C capsule-repo checkout 53dba6d99c4d7bd24b1106d2cf02cc3712b8082e --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run
echo "[${task.tag}] completed!"
"""
}
// capsule - NWB-Packaging-Ecephys-Capsule
process capsule_nwb_packaging_ecephys_capsule_12 {
tag 'capsule-5741357'
container "$REGISTRY_HOST/capsule/2cfc8f08-1042-4e84-ba44-f33e2a8021a8:d26ee5ac20819365a3eaebc743352ed9"
cpus 8
memory '64 GB'
input:
path 'capsule/data/' from capsule_aind_ephys_job_dispatch_4_to_capsule_nwb_packaging_ecephys_capsule_12_31.collect()
path 'capsule/data/ecephys_session' from ecephys_to_nwb_packaging_ecephys_capsule_32.collect()
path 'capsule/data/' from capsule_nwb_packaging_subject_capsule_10_to_capsule_nwb_packaging_ecephys_capsule_12_33.collect()
output:
path 'capsule/results/*' into capsule_nwb_packaging_ecephys_capsule_12_to_capsule_nwb_packaging_units_11_28
script:
"""
#!/usr/bin/env bash
set -e
export CO_CAPSULE_ID=2cfc8f08-1042-4e84-ba44-f33e2a8021a8
export CO_CPUS=8
export CO_MEMORY=68719476736
mkdir -p capsule
mkdir -p capsule/data && ln -s \$PWD/capsule/data /data
mkdir -p capsule/results && ln -s \$PWD/capsule/results /results
mkdir -p capsule/scratch && ln -s \$PWD/capsule/scratch /scratch
echo "[${task.tag}] cloning git repo..."
git clone "https://\$GIT_ACCESS_TOKEN@\$GIT_HOST/capsule-5741357.git" capsule-repo
git -C capsule-repo checkout 5bbb7a8dc57058f2040ea0b3957dd345ca302795 --quiet
mv capsule-repo/code capsule/code
rm -rf capsule-repo
echo "[${task.tag}] running capsule..."
cd capsule/code
chmod +x run
./run ${params.capsule_nwb_packaging_ecephys_capsule_12_args}
echo "[${task.tag}] completed!"
"""
}