forked from sanger-tol/blobtoolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsummary.nf
More file actions
33 lines (27 loc) · 917 Bytes
/
summary.nf
File metadata and controls
33 lines (27 loc) · 917 Bytes
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
process BLOBTOOLKIT_SUMMARY {
tag "$meta.id"
label 'process_single'
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BLOBTOOLKIT_SUMMARY module does not support Conda. Please use Docker / Singularity / Podman instead."
}
container "docker.io/genomehubs/blobtoolkit:4.4.4"
input:
tuple val(meta), path(blobdir)
output:
tuple val(meta), path("*.json"), emit: 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}"
"""
blobtools filter \\
${args} \\
--summary ${prefix}.summary.json ${blobdir}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
blobtoolkit: \$(btk --version | cut -d' ' -f2 | sed 's/v//')
END_VERSIONS
"""
}