-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathmain.nf
More file actions
57 lines (45 loc) · 1.57 KB
/
main.nf
File metadata and controls
57 lines (45 loc) · 1.57 KB
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
process DIAMONDPREPARETAXA {
// tag "${taxondmp_zip.baseName}"
label 'process_low'
conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/YOUR-TOOL-HERE':
'biocontainers/YOUR-TOOL-HERE' }"
// write the output files to a user specified directory via an input parameter
// publishDir "${params.outdir}/ncbi_refseq/", mode: 'copy'
input:
val taxondmp_zip // Add default of ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
output:
path("taxa/nodes.dmp"), emit: taxonnodes
path("taxa/names.dmp"), emit: taxonnames
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}"
// Omitting from script portion for now
// # $args \\
// # -@ $task.cpus \\
// # -o ${prefix}.bam \\
"""
mkdir -p taxa/
wget -q ${taxondmp_zip}
tar -xzf taxdump.tar.gz -C taxa
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diamondpreparetaxa: \$(diamondpreparetaxa --version)
END_VERSIONS
"""
stub:
// def args = task.ext.args ?: ''
// def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch taxa/nodes.dmp
touch taxa/names.dmp
cat <<-END_VERSIONS > versions.yml
"${task.process}":
diamondpreparetaxa: \$(diamondpreparetaxa --version)
END_VERSIONS
"""
}