-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.nf
38 lines (30 loc) · 1017 Bytes
/
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
process SIMPLIFY_IRIDA_JSON {
tag "$meta.id"
label 'process_single'
// Container directive is intentionally using the "override_configure_container_registry" as an example:
// How to keep a non-biocontainer/quay.io default, see nextflow.config for details
container "${ task.ext.override_configured_container_registry != false ?
'docker.io/python:3.10' :
'python:3.10' }"
input:
tuple val(meta), path(json)
output:
tuple val(meta), path("*.simple.json.gz") , emit: simple_json
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
simplify_irida_json.py \\
$args \\
--json-output ${meta.id}.simple.json \\
${json}
gzip ${meta.id}.simple.json
cat <<-END_VERSIONS > versions.yml
"${task.process}":
simplifyiridajson : 0.1.0
END_VERSIONS
"""
}