Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions modules/nf-core/krakenuniq/build/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ process KRAKENUNIQ_BUILD {
: 'quay.io/biocontainers/krakenuniq:1.0.4--pl5321h6dccd9a_2'}"

input:
tuple val(meta), path(custom_library_dir, stageAs: "library/*"), path(custom_taxonomy_dir, stageAs: "taxonomy"), path(custom_seqid2taxid)
tuple val(meta), path(custom_library_dir, stageAs: "library/*"), path(custom_taxonomy_dir, stageAs: "taxonomy/*"), path(custom_seqid2taxid, stageAs: 'seqid2taxid.map')
val keep_intermediate

output:
tuple val(meta), path("${prefix}/"), emit: db
path "versions.yml", emit: versions
tuple val("${task.process}"), val('krakenuniq'), eval("krakenuniq --version | sed '1!d;s/KrakenUniq version //'"), emit: versions_krakenuniq, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -33,11 +33,6 @@ process KRAKENUNIQ_BUILD {
--db ${prefix}

${run_cleanup}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
krakenuniq: \$(echo \$(krakenuniq --version 2>&1) | sed 's/^.*KrakenUniq version //; s/ .*\$//')
END_VERSIONS
"""

stub:
Expand All @@ -52,10 +47,5 @@ process KRAKENUNIQ_BUILD {
touch ${prefix}/database.kdb.counts
touch ${prefix}/database.kraken.tsv
touch ${prefix}/database.report.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
krakenuniq: \$(echo \$(krakenuniq --version 2>&1) | sed 's/^.*KrakenUniq version //; s/ .*\$//')
END_VERSIONS
"""
}
37 changes: 26 additions & 11 deletions modules/nf-core/krakenuniq/build/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ tools:
documentation: https://github.com/fbreitwieser/krakenuniq
tool_dev_url: https://github.com/fbreitwieser/krakenuniq
doi: 10.1186/s13059-018-1568-0
licence: ["MIT"]
licence:
- "MIT"
identifier: biotools:KrakenUniq
input:
- - meta:
Expand All @@ -24,12 +25,13 @@ input:
e.g. [ id:'test', single_end:false ]
- custom_library_dir:
type: directory
description: Optional directory containing custom fasta files for database build
description: Optional directory containing custom fasta files for database
build
pattern: "*"
- custom_taxonomy_dir:
type: directory
description: Optional directory containing custom taxonomy files for database
build
description: Optional directory containing custom taxonomy files for
database build
pattern: "*"
- custom_seqid2taxid:
type: file
Expand All @@ -39,7 +41,6 @@ input:
type: boolean
description: "Keep intermediate files that are not used by the database itself"
pattern: true|false

output:
db:
- - meta:
Expand All @@ -51,13 +52,27 @@ output:
type: directory
description: Directory containing KrakenUniq database
pattern: "*/"
versions_krakenuniq:
- - ${task.process}:
type: string
description: The name of the process
- krakenuniq:
type: string
description: The name of the tool
- krakenuniq --version | sed '1!d;s/KrakenUniq version //':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The name of the process
- krakenuniq:
type: string
description: The name of the tool
- krakenuniq --version | sed '1!d;s/KrakenUniq version //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@jfy133"
maintainers:
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/krakenuniq/build/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ nextflow_process {
{ assert snapshot(
stablefiles.sort(),
unstablefiles.sort(),
process.out.versions
process.out.findAll { key, val -> key.startsWith('versions') }
).match()
}
)
Expand Down Expand Up @@ -96,7 +96,7 @@ test("sarscov2 - fasta - nocleanup") {
{ assert snapshot(
stablefiles.sort(),
unstablefiles.sort(),
process.out.versions
process.out.findAll { key, val -> key.startsWith('versions') }
).match()
}
)
Expand Down
78 changes: 55 additions & 23 deletions modules/nf-core/krakenuniq/build/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
]
],
"1": [
"versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325"
[
"KRAKENUNIQ_BUILD",
"krakenuniq",
"1.0.4"
]
],
"db": [
[
Expand All @@ -37,16 +41,20 @@
]
]
],
"versions": [
"versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325"
"versions_krakenuniq": [
[
"KRAKENUNIQ_BUILD",
"krakenuniq",
"1.0.4"
]
]
}
],
"timestamp": "2026-04-25T13:34:52.419463205",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.4"
},
"timestamp": "2025-03-06T09:45:24.957949175"
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
},
"sarscov2 - fasta - nocleanup": {
"content": [
Expand All @@ -60,25 +68,43 @@
"library-files.txt:md5,8a9817d2de8465eb436aa3aa8696a717",
"genome.fasta:md5,6e9fe4042a72f2345f644f239272b7e6",
"seqid2taxid.map:md5,fe738f2333d57dde0db32239c04a93b8",
"taxDB:md5,1accaa141403e1fd5be9c79d1e5872b4"
"taxDB:md5,2a6c6234f8f4edba2b94ec75ea9f1b4c",
"citations.dmp:md5,7b2e5d0fbea3da110c4a0e3bb7c3720d",
"division.dmp:md5,f93fc4c838fdaa4b8923f003e8c11712",
"gc.prt:md5,accfbf13bca0899e7ba9849195af241a",
"gencode.dmp:md5,a5f39fc7a6608775d4c62a96cf1d170c",
"images.dmp:md5,3855c67cfa06ef8ae713cab73f009e3d",
"merged.dmp:md5,5e78eb1c4a235889458ef9f83a64e81e",
"readme.txt:md5,051060a90b7b89ad8e0fa33fe280211c"
],
[
"database-build.log",
"database-build.log",
"database.report.tsv",
"delnodes.dmp",
"names.dmp",
"names.dmp",
"nodes.dmp",
"nodes.dmp",
"taxdump.tar.gz",
"taxdump.tar.gz",
"timestamp"
],
[
"versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325"
]
{
"versions_krakenuniq": [
[
"KRAKENUNIQ_BUILD",
"krakenuniq",
"1.0.4"
]
]
}
],
"timestamp": "2026-04-25T13:34:38.850675715",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.4"
},
"timestamp": "2025-03-06T09:49:11.884850884"
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
},
"sarscov2 - fasta": {
"content": [
Expand All @@ -87,19 +113,25 @@
"database.kdb:md5,46542be19979e867075f9e455a314e00",
"database.kdb.counts:md5,a82149480a435210ec1e870f06b6cdb3",
"database0.kdb:md5,46542be19979e867075f9e455a314e00",
"taxDB:md5,1accaa141403e1fd5be9c79d1e5872b4"
"taxDB:md5,2a6c6234f8f4edba2b94ec75ea9f1b4c"
],
[

],
[
"versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325"
]
{
"versions_krakenuniq": [
[
"KRAKENUNIQ_BUILD",
"krakenuniq",
"1.0.4"
]
]
}
],
"timestamp": "2026-04-25T13:33:43.689590026",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.4"
},
"timestamp": "2025-03-06T09:48:27.136442441"
"nf-test": "0.9.5",
"nextflow": "25.10.4"
}
}
}
12 changes: 1 addition & 11 deletions modules/nf-core/krakenuniq/download/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ process KRAKENUNIQ_DOWNLOAD {

output:
path "${pattern}/", emit: output
path "versions.yml", emit: versions
tuple val("${task.process}"), val('krakenuniq'), eval("krakenuniq --version | sed '1!d;s/KrakenUniq version //'"), emit: versions_krakenuniq, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -24,20 +24,10 @@ process KRAKENUNIQ_DOWNLOAD {
-o ${pattern}/ \\
${pattern} \\
${args}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
krakenuniq: \$(echo \$(krakenuniq --version 2>&1) | sed 's/^.*KrakenUniq version //; s/ .*\$//')
END_VERSIONS
"""

stub:
"""
mkdir ${pattern}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
krakenuniq: \$(echo \$(krakenuniq --version 2>&1) | sed 's/^.*KrakenUniq version //; s/ .*\$//')
END_VERSIONS
"""
}
37 changes: 26 additions & 11 deletions modules/nf-core/krakenuniq/download/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,41 @@ tools:
documentation: https://github.com/fbreitwieser/krakenuniq
tool_dev_url: https://github.com/fbreitwieser/krakenuniq
doi: 10.1186/s13059-018-1568-0
licence: ["MIT"]
licence:
- "MIT"
identifier: biotools:KrakenUniq
input:
- pattern:
type: string
description: Pattern indicating what type of NCBI data to download. See KrakenUniq
documnation for possibilities.
description: Pattern indicating what type of NCBI data to download. See
KrakenUniq documnation for possibilities.
output:
output:
- ${pattern}/:
type: directory
description: Directory containing downloaded data with directory naming being
the user provided pattern.
description: Directory containing downloaded data with directory naming
being the user provided pattern.
versions_krakenuniq:
- - ${task.process}:
type: string
description: The name of the process
- krakenuniq:
type: string
description: The name of the tool
- krakenuniq --version | sed '1!d;s/KrakenUniq version //':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The name of the process
- krakenuniq:
type: string
description: The name of the tool
- krakenuniq --version | sed '1!d;s/KrakenUniq version //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@jfy133"
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/krakenuniq/download/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ nextflow_process {
{ assert snapshot(
stablefiles.sort(),
unstablefiles.sort(),
process.out.versions
process.out.findAll { key, val -> key.startsWith('versions') }
).match()
}
)
Expand Down
Loading
Loading