-
Notifications
You must be signed in to change notification settings - Fork 83
/
main.nf
37 lines (32 loc) · 1.23 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
process NANOPLOT {
tag "$meta.id"
label 'process_low'
conda "bioconda::nanoplot=1.41.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/nanoplot:1.41.0--pyhdfd78af_0' :
'quay.io/biocontainers/nanoplot:1.41.0--pyhdfd78af_0' }"
input:
tuple val(meta), path(ontfile)
output:
tuple val(meta), path("*.html") , emit: html
tuple val(meta), path("*.png") , optional: true, emit: png
tuple val(meta), path("*.txt") , emit: txt
tuple val(meta), path("*.log") , emit: log
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def input_file = ("$ontfile".endsWith(".fastq.gz")) ? "--fastq ${ontfile}" :
("$ontfile".endsWith(".txt")) ? "--summary ${ontfile}" : ''
"""
NanoPlot \\
$args \\
-t $task.cpus \\
$input_file
cat <<-END_VERSIONS > versions.yml
"${task.process}":
nanoplot: \$(echo \$(NanoPlot --version 2>&1) | sed 's/^.*NanoPlot //; s/ .*\$//')
END_VERSIONS
"""
}