From 888e058447122884af22a51a9e9e8fdf3f0b8cd8 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 8 May 2026 15:39:11 +0200 Subject: [PATCH 1/8] Exclude inputs from find search --- modules/nf-core/krakenuniq/build/main.nf | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/krakenuniq/build/main.nf b/modules/nf-core/krakenuniq/build/main.nf index 7fe9120d1da7..a73f366ea686 100644 --- a/modules/nf-core/krakenuniq/build/main.nf +++ b/modules/nf-core/krakenuniq/build/main.nf @@ -22,7 +22,17 @@ process KRAKENUNIQ_BUILD { def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" custom_db = custom_library_dir ? "mkdir ${prefix} && mv library taxonomy ${custom_seqid2taxid} ${prefix}" : "" - run_cleanup = keep_intermediate ? "" : "find -L ${prefix} -type f -not -name \"*.kdb\" -type f -not -name \"*idx\" -not -name \"taxDB\" -not -name \"*.counts\" -delete" + run_cleanup = keep_intermediate ? "" : """ + find -L ${prefix} -type f \\ + -not -name "*.kdb" \\ + -not -name "*idx" \\ + -not -name "taxDB" \\ + -not -name "*.counts" \\ + -not -path "${prefix}/library/*" \\ + -not -path "${prefix}/taxonomy/*" \\ + -not -name "${custom_seqid2taxid}" \\ + -delete + """ """ ${custom_db} @@ -37,7 +47,17 @@ process KRAKENUNIQ_BUILD { stub: prefix = task.ext.prefix ?: "${meta.id}" - run_cleanup = keep_intermediate ? "" : "find -L ${prefix} -type f -not -name \"*.kdb\" -type f -not -name \"*idx\" -not -name \"taxDB\" -delete" + run_cleanup = keep_intermediate ? "" : """ + find -L ${prefix} -type f \\ + -not -name "*.kdb" \\ + -not -name "*idx" \\ + -not -name "taxDB" \\ + -not -name "*.counts" \\ + -not -path "${prefix}/library/*" \\ + -not -path "${prefix}/taxonomy/*" \\ + -not -name "${custom_seqid2taxid}" \\ + -delete + """ """ mkdir ${prefix}/ touch ${prefix}/database-build.log From 861fea8e189b5c6b0afd6fbe8216fe35413c6eed Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 12 May 2026 09:42:26 +0200 Subject: [PATCH 2/8] Update krakenuniq build test and main --- modules/nf-core/krakenuniq/build/main.nf | 11 +-- .../krakenuniq/build/tests/main.nf.test | 84 +++++++++---------- 2 files changed, 45 insertions(+), 50 deletions(-) diff --git a/modules/nf-core/krakenuniq/build/main.nf b/modules/nf-core/krakenuniq/build/main.nf index a73f366ea686..244fab0eaca7 100644 --- a/modules/nf-core/krakenuniq/build/main.nf +++ b/modules/nf-core/krakenuniq/build/main.nf @@ -21,17 +21,15 @@ process KRAKENUNIQ_BUILD { script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" - custom_db = custom_library_dir ? "mkdir ${prefix} && mv library taxonomy ${custom_seqid2taxid} ${prefix}" : "" + custom_db = custom_library_dir ? "mkdir ${prefix} && cp -rL library taxonomy ${custom_seqid2taxid} ${prefix}" : "" run_cleanup = keep_intermediate ? "" : """ find -L ${prefix} -type f \\ -not -name "*.kdb" \\ -not -name "*idx" \\ -not -name "taxDB" \\ -not -name "*.counts" \\ - -not -path "${prefix}/library/*" \\ - -not -path "${prefix}/taxonomy/*" \\ - -not -name "${custom_seqid2taxid}" \\ - -delete + -delete && \\ + find -type d -empty -delete """ """ @@ -53,9 +51,6 @@ process KRAKENUNIQ_BUILD { -not -name "*idx" \\ -not -name "taxDB" \\ -not -name "*.counts" \\ - -not -path "${prefix}/library/*" \\ - -not -path "${prefix}/taxonomy/*" \\ - -not -name "${custom_seqid2taxid}" \\ -delete """ """ diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test b/modules/nf-core/krakenuniq/build/tests/main.nf.test index da55baf00ac4..9792e38ccfcc 100644 --- a/modules/nf-core/krakenuniq/build/tests/main.nf.test +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test @@ -12,12 +12,12 @@ nextflow_process { tag "krakenuniq/download" setup { - run("KRAKENUNIQ_DOWNLOAD"){ + run("KRAKENUNIQ_DOWNLOAD") { script "../../download/main.nf" process { - """ - input[0] = 'taxonomy' - """ + """ + input[0] = 'taxonomy' + """ } } } @@ -31,13 +31,9 @@ nextflow_process { ch_seqid2mapid = Channel.fromPath(params.modules_testdata_base_path + 'genomics/sarscov2/metagenome/seqid2taxid.map', checkIfExists: true) ch_input = ch_fastas - .combine(KRAKENUNIQ_DOWNLOAD.out.output) - .combine(ch_seqid2mapid) - .map { - fna, tax, map -> - - [ [id:'test'] , fna, tax, map ] - } + .combine(KRAKENUNIQ_DOWNLOAD.out.output.map{ dir -> [ dir.listFiles().toList() ] }) + .combine(ch_seqid2mapid) + .map { fna, tax, map -> [ [id:'test'], fna, tax, map ] } input[0] = ch_input input[1] = false @@ -46,24 +42,28 @@ nextflow_process { } then { - def stablefiles = [] - file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (!file.isDirectory() && !["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} } - def unstablefiles = [] - file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"].find {file.toString().endsWith(it)}) {unstablefiles.add(file.getName().toString())} } + def unstableNames = ["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] + def stableFiles = [] + def unstableFiles = [] + + file(process.out.db.get(0).get(1)).eachFileRecurse { f -> + if (f.isDirectory()) return + if (unstableNames.any { f.name.endsWith(it) }) unstableFiles << f.name + else stableFiles << f + } + assertAll( { assert process.success }, { assert snapshot( - stablefiles.sort(), - unstablefiles.sort(), - process.out.findAll { key, val -> key.startsWith('versions') } - ).match() - } + stableFiles.sort(), + unstableFiles.sort(), + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } - } -test("sarscov2 - fasta - nocleanup") { + test("sarscov2 - fasta - nocleanup") { when { process { @@ -72,13 +72,9 @@ test("sarscov2 - fasta - nocleanup") { ch_seqid2mapid = Channel.fromPath(params.modules_testdata_base_path + 'genomics/sarscov2/metagenome/seqid2taxid.map', checkIfExists: true) ch_input = ch_fastas - .combine(KRAKENUNIQ_DOWNLOAD.out.output) - .combine(ch_seqid2mapid) - .map { - fna, tax, map -> - - [ [id:'test'] , fna, tax, map ] - } + .combine(KRAKENUNIQ_DOWNLOAD.out.output.map{ dir -> [ dir.listFiles().toList() ] }) + .combine(ch_seqid2mapid) + .map { fna, tax, map -> [ [id:'test'], fna, tax, map ] } input[0] = ch_input input[1] = true @@ -87,21 +83,25 @@ test("sarscov2 - fasta - nocleanup") { } then { - def stablefiles = [] - file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (!file.isDirectory() && !["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} } - def unstablefiles = [] - file(process.out.db.get(0).get(1)).eachFileRecurse{ file -> if (["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"].find {file.toString().endsWith(it)}) {unstablefiles.add(file.getName().toString())} } + def unstableNames = ["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] + def stableFiles = [] + def unstableFiles = [] + + file(process.out.db.get(0).get(1)).eachFileRecurse { f -> + if (f.isDirectory()) return + if (unstableNames.any { f.name.endsWith(it) }) unstableFiles << f.name + else stableFiles << f + } + assertAll( { assert process.success }, { assert snapshot( - stablefiles.sort(), - unstablefiles.sort(), - process.out.findAll { key, val -> key.startsWith('versions') } - ).match() - } + stableFiles.sort(), + unstableFiles.sort(), + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } - } test("sarscov2 - fasta - stub") { @@ -110,7 +110,7 @@ test("sarscov2 - fasta - nocleanup") { when { process { """ - input[0] = [[id:'test'], [] , [] , []] + input[0] = [[id:'test'], [], [], []] input[1] = false """ } @@ -120,7 +120,7 @@ test("sarscov2 - fasta - nocleanup") { assertAll( { assert process.success }, { assert snapshot(process.out).match() } - ) + ) } } -} +} \ No newline at end of file From 362f0523c12d99e0769fc1a1c6f47386ca2de1ff Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 12 May 2026 10:32:37 +0200 Subject: [PATCH 3/8] Fix linting and remove redundant code --- modules/nf-core/krakenuniq/build/main.nf | 12 +++--------- modules/nf-core/krakenuniq/build/tests/main.nf.test | 8 +++++--- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/modules/nf-core/krakenuniq/build/main.nf b/modules/nf-core/krakenuniq/build/main.nf index 244fab0eaca7..29bcdc416917 100644 --- a/modules/nf-core/krakenuniq/build/main.nf +++ b/modules/nf-core/krakenuniq/build/main.nf @@ -22,7 +22,9 @@ process KRAKENUNIQ_BUILD { def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" custom_db = custom_library_dir ? "mkdir ${prefix} && cp -rL library taxonomy ${custom_seqid2taxid} ${prefix}" : "" - run_cleanup = keep_intermediate ? "" : """ + run_cleanup = "" + run_cleanup << custom_library_dir ? "rm -r ${prefix}/{library,taxonomy,${custom_seqid2taxid}}" : "" + run_cleanup << keep_intermediate ? "" : """ find -L ${prefix} -type f \\ -not -name "*.kdb" \\ -not -name "*idx" \\ @@ -45,14 +47,6 @@ process KRAKENUNIQ_BUILD { stub: prefix = task.ext.prefix ?: "${meta.id}" - run_cleanup = keep_intermediate ? "" : """ - find -L ${prefix} -type f \\ - -not -name "*.kdb" \\ - -not -name "*idx" \\ - -not -name "taxDB" \\ - -not -name "*.counts" \\ - -delete - """ """ mkdir ${prefix}/ touch ${prefix}/database-build.log diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test b/modules/nf-core/krakenuniq/build/tests/main.nf.test index 9792e38ccfcc..5cf9d4771260 100644 --- a/modules/nf-core/krakenuniq/build/tests/main.nf.test +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test @@ -42,7 +42,8 @@ nextflow_process { } then { - def unstableNames = ["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] + def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] + def unstableNames = ["database-build.log", "database.report.tsv"] + inputs def stableFiles = [] def unstableFiles = [] @@ -83,7 +84,8 @@ nextflow_process { } then { - def unstableNames = ["database-build.log", "database.report.tsv", "timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] + def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] + def unstableNames = ["database-build.log", "database.report.tsv"] + inputs def stableFiles = [] def unstableFiles = [] @@ -123,4 +125,4 @@ nextflow_process { ) } } -} \ No newline at end of file +} From dbc7aa5fcc339c35157a2133e0605535ce28cd14 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 12 May 2026 10:58:24 +0200 Subject: [PATCH 4/8] Simplify --- modules/nf-core/krakenuniq/build/main.nf | 8 +++----- modules/nf-core/krakenuniq/build/tests/main.nf.test | 10 ++++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/nf-core/krakenuniq/build/main.nf b/modules/nf-core/krakenuniq/build/main.nf index 29bcdc416917..17177cce0b73 100644 --- a/modules/nf-core/krakenuniq/build/main.nf +++ b/modules/nf-core/krakenuniq/build/main.nf @@ -21,10 +21,7 @@ process KRAKENUNIQ_BUILD { script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" - custom_db = custom_library_dir ? "mkdir ${prefix} && cp -rL library taxonomy ${custom_seqid2taxid} ${prefix}" : "" - run_cleanup = "" - run_cleanup << custom_library_dir ? "rm -r ${prefix}/{library,taxonomy,${custom_seqid2taxid}}" : "" - run_cleanup << keep_intermediate ? "" : """ + run_cleanup = keep_intermediate ? "" : """ find -L ${prefix} -type f \\ -not -name "*.kdb" \\ -not -name "*idx" \\ @@ -35,13 +32,14 @@ process KRAKENUNIQ_BUILD { """ """ - ${custom_db} + mkdir ${prefix} && cp -rL library taxonomy ${custom_seqid2taxid} ${prefix} krakenuniq-build \\ ${args} \\ --threads ${task.cpus} \\ --db ${prefix} + rm -r ${prefix}/{library,taxonomy,${custom_seqid2taxid}} ${run_cleanup} """ diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test b/modules/nf-core/krakenuniq/build/tests/main.nf.test index 5cf9d4771260..d8f67585e0ee 100644 --- a/modules/nf-core/krakenuniq/build/tests/main.nf.test +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test @@ -43,18 +43,19 @@ nextflow_process { then { def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] - def unstableNames = ["database-build.log", "database.report.tsv"] + inputs + def unstableOutputs = ["database-build.log", "database.report.tsv"] def stableFiles = [] def unstableFiles = [] file(process.out.db.get(0).get(1)).eachFileRecurse { f -> if (f.isDirectory()) return - if (unstableNames.any { f.name.endsWith(it) }) unstableFiles << f.name + if (unstableOutputs.any { f.name.endsWith(it) }) unstableFiles << f.name else stableFiles << f } assertAll( { assert process.success }, + { assert file(process.out.db.get(0).get(1)).eachFileRecurse { f -> f.name !in inputs } }, { assert snapshot( stableFiles.sort(), unstableFiles.sort(), @@ -85,18 +86,19 @@ nextflow_process { then { def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] - def unstableNames = ["database-build.log", "database.report.tsv"] + inputs + def unstableOutputs = ["database-build.log", "database.report.tsv"] def stableFiles = [] def unstableFiles = [] file(process.out.db.get(0).get(1)).eachFileRecurse { f -> if (f.isDirectory()) return - if (unstableNames.any { f.name.endsWith(it) }) unstableFiles << f.name + if (unstableOutputs.any { f.name.endsWith(it) }) unstableFiles << f.name else stableFiles << f } assertAll( { assert process.success }, + { assert file(process.out.db.get(0).get(1)).eachFileRecurse { f -> f.name !in inputs } }, { assert snapshot( stableFiles.sort(), unstableFiles.sort(), From 2546c554c7d48c2a02bddccac2cfb090307c6477 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 12 May 2026 11:29:04 +0200 Subject: [PATCH 5/8] Update tested files and snapshot --- .../krakenuniq/build/tests/main.nf.test | 36 +++++++++---------- .../krakenuniq/build/tests/main.nf.test.snap | 32 ++++------------- 2 files changed, 25 insertions(+), 43 deletions(-) diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test b/modules/nf-core/krakenuniq/build/tests/main.nf.test index d8f67585e0ee..23f07a1bfd52 100644 --- a/modules/nf-core/krakenuniq/build/tests/main.nf.test +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test @@ -42,20 +42,20 @@ nextflow_process { } then { - def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] + def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] def unstableOutputs = ["database-build.log", "database.report.tsv"] - def stableFiles = [] - def unstableFiles = [] - file(process.out.db.get(0).get(1)).eachFileRecurse { f -> - if (f.isDirectory()) return - if (unstableOutputs.any { f.name.endsWith(it) }) unstableFiles << f.name - else stableFiles << f - } + def dbDir = file(process.out.db.get(0).get(1)) + def allFiles = [] + dbDir.eachFileRecurse { f -> if (!f.isDirectory()) allFiles << f } + + def stableFiles = allFiles.findAll { f -> !unstableOutputs.any { f.name.endsWith(it) } } + def unstableFiles = allFiles.findAll { f -> unstableOutputs.any { f.name.endsWith(it) } } + .collect { it.name } assertAll( { assert process.success }, - { assert file(process.out.db.get(0).get(1)).eachFileRecurse { f -> f.name !in inputs } }, + { assert !allFiles.any { it.name in inputs } }, { assert snapshot( stableFiles.sort(), unstableFiles.sort(), @@ -85,20 +85,20 @@ nextflow_process { } then { - def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] + def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] def unstableOutputs = ["database-build.log", "database.report.tsv"] - def stableFiles = [] - def unstableFiles = [] - file(process.out.db.get(0).get(1)).eachFileRecurse { f -> - if (f.isDirectory()) return - if (unstableOutputs.any { f.name.endsWith(it) }) unstableFiles << f.name - else stableFiles << f - } + def dbDir = file(process.out.db.get(0).get(1)) + def allFiles = [] + dbDir.eachFileRecurse { f -> if (!f.isDirectory()) allFiles << f } + + def stableFiles = allFiles.findAll { f -> !unstableOutputs.any { f.name.endsWith(it) } } + def unstableFiles = allFiles.findAll { f -> unstableOutputs.any { f.name.endsWith(it) } } + .collect { it.name } assertAll( { assert process.success }, - { assert file(process.out.db.get(0).get(1)).eachFileRecurse { f -> f.name !in inputs } }, + { assert !allFiles.any { it.name in inputs } }, { assert snapshot( stableFiles.sort(), unstableFiles.sort(), diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap b/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap index cf902f8a687b..bc2b61223639 100644 --- a/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap @@ -66,29 +66,11 @@ "database.kraken.tsv:md5,be9bd0cb3a8bea30989e65aa42a73727", "database0.kdb:md5,46542be19979e867075f9e455a314e00", "library-files.txt:md5,8a9817d2de8465eb436aa3aa8696a717", - "genome.fasta:md5,6e9fe4042a72f2345f644f239272b7e6", - "seqid2taxid.map:md5,fe738f2333d57dde0db32239c04a93b8", - "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" + "taxDB:md5,5568e58a8acde137a258ce0b29ffa098" ], [ "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" + "database.report.tsv" ], { "versions_krakenuniq": [ @@ -100,10 +82,10 @@ ] } ], - "timestamp": "2026-04-25T13:34:38.850675715", + "timestamp": "2026-05-12T11:03:20.471692", "meta": { "nf-test": "0.9.5", - "nextflow": "25.10.4" + "nextflow": "26.04.0" } }, "sarscov2 - fasta": { @@ -113,7 +95,7 @@ "database.kdb:md5,46542be19979e867075f9e455a314e00", "database.kdb.counts:md5,a82149480a435210ec1e870f06b6cdb3", "database0.kdb:md5,46542be19979e867075f9e455a314e00", - "taxDB:md5,2a6c6234f8f4edba2b94ec75ea9f1b4c" + "taxDB:md5,5568e58a8acde137a258ce0b29ffa098" ], [ @@ -128,10 +110,10 @@ ] } ], - "timestamp": "2026-04-25T13:33:43.689590026", + "timestamp": "2026-05-12T11:01:33.50659", "meta": { "nf-test": "0.9.5", - "nextflow": "25.10.4" + "nextflow": "26.04.0" } } } \ No newline at end of file From 24ab22f774ad3a9568b61e71572c47fd346298f2 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 12 May 2026 13:58:02 +0200 Subject: [PATCH 6/8] Add def to run_cleanup --- modules/nf-core/krakenuniq/build/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/krakenuniq/build/main.nf b/modules/nf-core/krakenuniq/build/main.nf index 17177cce0b73..299f560930af 100644 --- a/modules/nf-core/krakenuniq/build/main.nf +++ b/modules/nf-core/krakenuniq/build/main.nf @@ -21,7 +21,7 @@ process KRAKENUNIQ_BUILD { script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" - run_cleanup = keep_intermediate ? "" : """ + def run_cleanup = keep_intermediate ? "" : """ find -L ${prefix} -type f \\ -not -name "*.kdb" \\ -not -name "*idx" \\ From 071215e0db3b0cd2b3cf5ced20964383d84d09c4 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 13 May 2026 11:00:30 +0200 Subject: [PATCH 7/8] Remove deference in copy --- modules/nf-core/krakenuniq/build/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nf-core/krakenuniq/build/main.nf b/modules/nf-core/krakenuniq/build/main.nf index 299f560930af..6f1c8665904a 100644 --- a/modules/nf-core/krakenuniq/build/main.nf +++ b/modules/nf-core/krakenuniq/build/main.nf @@ -32,7 +32,7 @@ process KRAKENUNIQ_BUILD { """ """ - mkdir ${prefix} && cp -rL library taxonomy ${custom_seqid2taxid} ${prefix} + mkdir ${prefix} && cp -r library taxonomy ${custom_seqid2taxid} ${prefix} krakenuniq-build \\ ${args} \\ From cbee74513c42404949313d21b7956e4c780e0c2f Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 13 May 2026 15:52:17 +0200 Subject: [PATCH 8/8] Update test and snapshot --- .../nf-core/krakenuniq/build/tests/main.nf.test | 12 ++++++++++-- .../krakenuniq/build/tests/main.nf.test.snap | 15 +++++++-------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test b/modules/nf-core/krakenuniq/build/tests/main.nf.test index 23f07a1bfd52..45451c30d725 100644 --- a/modules/nf-core/krakenuniq/build/tests/main.nf.test +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test @@ -43,7 +43,11 @@ nextflow_process { then { def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] - def unstableOutputs = ["database-build.log", "database.report.tsv"] + def unstableOutputs = [ + "database-build.log", // Every line has a timestamp + "database.report.tsv", // Timestamp and test filepath on first line + "taxDB" // Present species and species labels change: Probably because of KRAKENUNIQ_DOWNLOAD which fetches from NCBI. + ] def dbDir = file(process.out.db.get(0).get(1)) def allFiles = [] @@ -86,7 +90,11 @@ nextflow_process { then { def inputs = ["timestamp", "taxdump.tar.gz", "names.dmp", "nodes.dmp"] - def unstableOutputs = ["database-build.log", "database.report.tsv"] + def unstableOutputs = [ + "database-build.log", // Every line has a timestamp + "database.report.tsv", // Timestamp and test filepath on first line + "taxDB" // Present species and species labels change: Probably because of KRAKENUNIQ_DOWNLOAD which fetches from NCBI. + ] def dbDir = file(process.out.db.get(0).get(1)) def allFiles = [] diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap b/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap index bc2b61223639..9310d953cb03 100644 --- a/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap @@ -65,12 +65,12 @@ "database.kdb.counts:md5,a82149480a435210ec1e870f06b6cdb3", "database.kraken.tsv:md5,be9bd0cb3a8bea30989e65aa42a73727", "database0.kdb:md5,46542be19979e867075f9e455a314e00", - "library-files.txt:md5,8a9817d2de8465eb436aa3aa8696a717", - "taxDB:md5,5568e58a8acde137a258ce0b29ffa098" + "library-files.txt:md5,8a9817d2de8465eb436aa3aa8696a717" ], [ "database-build.log", - "database.report.tsv" + "database.report.tsv", + "taxDB" ], { "versions_krakenuniq": [ @@ -82,7 +82,7 @@ ] } ], - "timestamp": "2026-05-12T11:03:20.471692", + "timestamp": "2026-05-13T14:59:07.323282", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -94,11 +94,10 @@ "database.idx:md5,f5298aa4215c956d2f737b5988721a24", "database.kdb:md5,46542be19979e867075f9e455a314e00", "database.kdb.counts:md5,a82149480a435210ec1e870f06b6cdb3", - "database0.kdb:md5,46542be19979e867075f9e455a314e00", - "taxDB:md5,5568e58a8acde137a258ce0b29ffa098" + "database0.kdb:md5,46542be19979e867075f9e455a314e00" ], [ - + "taxDB" ], { "versions_krakenuniq": [ @@ -110,7 +109,7 @@ ] } ], - "timestamp": "2026-05-12T11:01:33.50659", + "timestamp": "2026-05-13T14:57:23.476447", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0"