diff --git a/modules/nf-core/kaiju/mkfmi/main.nf b/modules/nf-core/kaiju/mkfmi/main.nf index d08be63bb5e..f82c2d75921 100644 --- a/modules/nf-core/kaiju/mkfmi/main.nf +++ b/modules/nf-core/kaiju/mkfmi/main.nf @@ -1,18 +1,21 @@ process KAIJU_MKFMI { - tag "$meta.id" + tag "${meta.id}" label 'process_high' conda "bioconda::kaiju=1.10.0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/kaiju:1.10.0--h43eeafb_0': - 'biocontainers/kaiju:1.10.0--h43eeafb_0' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/kaiju:1.10.0--h43eeafb_0' + : 'biocontainers/kaiju:1.10.0--h43eeafb_0'}" input: tuple val(meta), path(fasta) + val keep_intermediate output: tuple val(meta), path("*.fmi"), emit: fmi - path "versions.yml" , emit: versions + tuple val(meta), path("*.bwt"), optional: true, emit: bwt + tuple val(meta), path("*.sa"), optional: true, emit: sa + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -20,14 +23,17 @@ process KAIJU_MKFMI { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def run_cleanup = keep_intermediate ? "" : "rm -f *.{bwt,sa}" """ kaiju-mkbwt \\ - $args \\ - -n $task.cpus \\ + ${args} \\ + -n ${task.cpus} \\ -o ${prefix} \\ ${fasta} kaiju-mkfmi ${prefix} + ${run_cleanup} + cat <<-END_VERSIONS > versions.yml "${task.process}": kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) @@ -37,8 +43,13 @@ process KAIJU_MKFMI { stub: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def run_cleanup = keep_intermediate ? "" : "rm -f *.{bwt,sa}" """ touch ${prefix}.fmi + touch ${prefix}.bwt + touch ${prefix}.sa + + ${run_cleanup} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/kaiju/mkfmi/meta.yml b/modules/nf-core/kaiju/mkfmi/meta.yml index 16532703735..cb3a5a0aeed 100644 --- a/modules/nf-core/kaiju/mkfmi/meta.yml +++ b/modules/nf-core/kaiju/mkfmi/meta.yml @@ -26,6 +26,10 @@ input: type: file description: Uncompressed Protein FASTA file (mandatory) pattern: "*.{fa,faa,fasta}" + - - keep_intermediate: + type: boolean + description: "Keep intermediate files" + pattern: true|false output: - fmi: - meta: @@ -37,6 +41,26 @@ output: type: file description: Kaiju FM-index file pattern: "*.{fmi}" + - bwt: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*.bwt": + type: file + description: Kaiju intermedite bwt-index file (not needed for classification) + pattern: "*.{bwt}" + - sa: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + - "*.sa": + type: file + description: Kaiju intermedite bwt-index file (not needed for classification) + pattern: "*.{sa}" - versions: - versions.yml: type: file @@ -44,3 +68,4 @@ output: pattern: "versions.yml" authors: - "@alxndrdiaz" + - "@jfy133" diff --git a/modules/nf-core/kaiju/mkfmi/tests/main.nf.test b/modules/nf-core/kaiju/mkfmi/tests/main.nf.test index d8062b0b9f9..68170caeb40 100644 --- a/modules/nf-core/kaiju/mkfmi/tests/main.nf.test +++ b/modules/nf-core/kaiju/mkfmi/tests/main.nf.test @@ -18,6 +18,30 @@ nextflow_process { [ id:'test', single_end:true ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) ] + input[1] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - proteome - keep intermediates") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) + ] + input[1] = true """ } } @@ -42,6 +66,7 @@ nextflow_process { [ id:'test', single_end:true ], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true) ] + input[1] = true """ } } diff --git a/modules/nf-core/kaiju/mkfmi/tests/main.nf.test.snap b/modules/nf-core/kaiju/mkfmi/tests/main.nf.test.snap index 9120a164e4f..8c0ae1b22f1 100644 --- a/modules/nf-core/kaiju/mkfmi/tests/main.nf.test.snap +++ b/modules/nf-core/kaiju/mkfmi/tests/main.nf.test.snap @@ -3,6 +3,10 @@ "content": [ "test.fmi" ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, "timestamp": "2024-01-20T16:27:00.670884904" }, "sarscov2 - proteome - fasta": { @@ -18,7 +22,16 @@ ] ], "1": [ + + ], + "2": [ + + ], + "3": [ "versions.yml:md5,3cbd427d0187ffee188347830d33dc12" + ], + "bwt": [ + ], "fmi": [ [ @@ -29,11 +42,89 @@ "test.fmi:md5,54fd89f5e4eab61af30175e8aa389598" ] ], + "sa": [ + + ], + "versions": [ + "versions.yml:md5,3cbd427d0187ffee188347830d33dc12" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-16T09:29:43.118144301" + }, + "sarscov2 - proteome - keep intermediates": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fmi:md5,54fd89f5e4eab61af30175e8aa389598" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bwt:md5,fe639339371f5b4352017522f54d0c99" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.sa:md5,7d4a6481ad5ffdc2058bb35331a64d4d" + ] + ], + "3": [ + "versions.yml:md5,3cbd427d0187ffee188347830d33dc12" + ], + "bwt": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bwt:md5,fe639339371f5b4352017522f54d0c99" + ] + ], + "fmi": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fmi:md5,54fd89f5e4eab61af30175e8aa389598" + ] + ], + "sa": [ + [ + { + "id": "test", + "single_end": true + }, + "test.sa:md5,7d4a6481ad5ffdc2058bb35331a64d4d" + ] + ], "versions": [ "versions.yml:md5,3cbd427d0187ffee188347830d33dc12" ] } ], - "timestamp": "2024-01-20T16:26:48.062489887" + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-16T09:29:47.890853152" } } \ No newline at end of file diff --git a/modules/nf-core/krakenuniq/build/main.nf b/modules/nf-core/krakenuniq/build/main.nf index b9a5991a8b2..07c06bebfbe 100644 --- a/modules/nf-core/krakenuniq/build/main.nf +++ b/modules/nf-core/krakenuniq/build/main.nf @@ -1,18 +1,19 @@ process KRAKENUNIQ_BUILD { - tag "$meta.id" + tag "${meta.id}" label 'process_medium' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/krakenuniq:1.0.4--pl5321h6dccd9a_2': - 'biocontainers/krakenuniq:1.0.4--pl5321h6dccd9a_2' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/krakenuniq:1.0.4--pl5321h6dccd9a_2' + : '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) + val keep_intermediate output: - tuple val(meta), path("$prefix/"), emit: db - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}/"), emit: db + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -20,15 +21,38 @@ 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} && 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\" -delete" + """ - $custom_db + ${custom_db} krakenuniq-build \\ - $args \\ + ${args} \\ --threads ${task.cpus} \\ --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: + 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" + """ + mkdir ${prefix}/ + touch ${prefix}/database-build.log + touch ${prefix}/database.idx + touch ${prefix}/database.jdb + touch ${prefix}/database.kdb + 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/ .*\$//') diff --git a/modules/nf-core/krakenuniq/build/meta.yml b/modules/nf-core/krakenuniq/build/meta.yml index bafc3cfa04e..0322cb68ec1 100644 --- a/modules/nf-core/krakenuniq/build/meta.yml +++ b/modules/nf-core/krakenuniq/build/meta.yml @@ -34,6 +34,11 @@ input: - custom_seqid2taxid: type: file description: custom seqid2taxid + - - keep_intermediate: + type: boolean + description: "Keep intermediate files" + pattern: true|false + output: - db: - meta: @@ -41,7 +46,7 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - $prefix/: + - ${prefix}/: type: directory description: Directory containing KrakenUniq database pattern: "*/" diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test b/modules/nf-core/krakenuniq/build/tests/main.nf.test new file mode 100644 index 00000000000..c4e77e29846 --- /dev/null +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test @@ -0,0 +1,126 @@ +nextflow_process { + + name "Test Process KRAKENUNIQ_BUILD" + script "../main.nf" + process "KRAKENUNIQ_BUILD" + config './nextflow.config' + + tag "modules" + tag "modules_nfcore" + tag "krakenuniq" + tag "krakenuniq/build" + tag "krakenuniq/download" + + setup { + run("KRAKENUNIQ_DOWNLOAD"){ + script "../../download/main.nf" + process { + """ + input[0] = 'taxonomy' + """ + } + } + } + + test("sarscov2 - fasta") { + + when { + process { + """ + ch_fastas = Channel.fromPath(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + 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 ] + } + + input[0] = ch_input + input[1] = false + """ + } + } + + 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())} } + assertAll( + { assert process.success }, + { assert snapshot( + stablefiles.sort(), + unstablefiles.sort(), + process.out.versions + ).match() + } + ) + } + + } + +test("sarscov2 - fasta - nocleanup") { + + when { + process { + """ + ch_fastas = Channel.fromPath(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + 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 ] + } + + input[0] = ch_input + input[1] = true + """ + } + } + + 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())} } + assertAll( + { assert process.success }, + { assert snapshot( + stablefiles.sort(), + unstablefiles.sort(), + process.out.versions + ).match() + } + ) + } + + } + + test("sarscov2 - fasta - stub") { + options "-stub" + + when { + process { + """ + input[0] = [[id:'test'], [] , [] , []] + input[1] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap b/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap new file mode 100644 index 00000000000..fb3f1327e16 --- /dev/null +++ b/modules/nf-core/krakenuniq/build/tests/main.nf.test.snap @@ -0,0 +1,104 @@ +{ + "sarscov2 - fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "database-build.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.idx:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.jdb:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kdb:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kdb.counts:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kraken.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.report.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325" + ], + "db": [ + [ + { + "id": "test" + }, + [ + "database-build.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.idx:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.jdb:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kdb:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kdb.counts:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.kraken.tsv:md5,d41d8cd98f00b204e9800998ecf8427e", + "database.report.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.3" + }, + "timestamp": "2025-01-16T14:19:28.193479362" + }, + "sarscov2 - fasta - nocleanup": { + "content": [ + [ + "database.idx:md5,f5298aa4215c956d2f737b5988721a24", + "database.jdb:md5,48db5f6bb9b9e9db7f5bbdd0d8bec4a8", + "database.kdb:md5,46542be19979e867075f9e455a314e00", + "database.kdb.counts:md5,a82149480a435210ec1e870f06b6cdb3", + "database.kraken.tsv:md5,be9bd0cb3a8bea30989e65aa42a73727", + "database0.kdb:md5,46542be19979e867075f9e455a314e00", + "library-files.txt:md5,8a9817d2de8465eb436aa3aa8696a717", + "genome.fasta:md5,6e9fe4042a72f2345f644f239272b7e6", + "seqid2taxid.map:md5,fe738f2333d57dde0db32239c04a93b8", + "taxDB:md5,37ea954363803b13c2c9f6ae36fc81c7" + ], + [ + "database-build.log", + "database.report.tsv", + "names.dmp", + "nodes.dmp", + "taxdump.tar.gz", + "timestamp" + ], + [ + "versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-17T08:29:04.791324194" + }, + "sarscov2 - fasta": { + "content": [ + [ + "database.idx:md5,f5298aa4215c956d2f737b5988721a24", + "database.kdb:md5,46542be19979e867075f9e455a314e00", + "database0.kdb:md5,46542be19979e867075f9e455a314e00", + "taxDB:md5,37ea954363803b13c2c9f6ae36fc81c7" + ], + [ + + ], + [ + "versions.yml:md5,b7fb6c70957b2e6b6b810757928d0325" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-17T08:28:18.051752599" + } +} \ No newline at end of file diff --git a/modules/nf-core/krakenuniq/build/tests/nextflow.config b/modules/nf-core/krakenuniq/build/tests/nextflow.config new file mode 100644 index 00000000000..11e267e03c6 --- /dev/null +++ b/modules/nf-core/krakenuniq/build/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: KRAKENUNIQ_BUILD { + ext.args = "--work-on-disk --max-db-size 12 --kmer-len 15 --minimizer-len 13 --jellyfish-bin \"\$(which jellyfish)\"" + } +} diff --git a/modules/nf-core/krakenuniq/download/main.nf b/modules/nf-core/krakenuniq/download/main.nf index 8ef3eff2b90..abfa89961f4 100644 --- a/modules/nf-core/krakenuniq/download/main.nf +++ b/modules/nf-core/krakenuniq/download/main.nf @@ -2,16 +2,16 @@ process KRAKENUNIQ_DOWNLOAD { label 'process_low' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/krakenuniq:1.0.4--pl5321h6dccd9a_2': - 'biocontainers/krakenuniq:1.0.4--pl5321h6dccd9a_2' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/krakenuniq:1.0.4--pl5321h6dccd9a_2' + : 'biocontainers/krakenuniq:1.0.4--pl5321h6dccd9a_2'}" input: val pattern output: - path "${pattern}/" , emit: output - path "versions.yml" , emit: versions + path "${pattern}/", emit: output + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -23,7 +23,18 @@ process KRAKENUNIQ_DOWNLOAD { --threads ${task.cpus} \\ -o ${pattern}/ \\ ${pattern} \\ - $args + ${args} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krakenuniq: \$(echo \$(krakenuniq --version 2>&1) | sed 's/^.*KrakenUniq version //; s/ .*\$//') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + """ + mkdir ${pattern} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/krakenuniq/download/tests/main.nf.test b/modules/nf-core/krakenuniq/download/tests/main.nf.test new file mode 100644 index 00000000000..edef7bfea3b --- /dev/null +++ b/modules/nf-core/krakenuniq/download/tests/main.nf.test @@ -0,0 +1,65 @@ +nextflow_process { + + name "Test Process KRAKENUNIQ_DOWNLOAD" + script "../main.nf" + process "KRAKENUNIQ_DOWNLOAD" + + tag "modules" + tag "modules_nfcore" + tag "krakenuniq" + tag "krakenuniq/download" + tag "debug" + + test("taxonomy") { + + when { + process { + """ + input[0] = 'taxonomy' + """ + } + } + + then { + println('HHELLLOOOOO') + def stablefiles = [] + file(process.out.output.get(0)).eachFileRecurse{ file -> if (!file.isDirectory() && !["timestamp"].find {file.toString().endsWith(it)}) {stablefiles.add(file)} } + println(stablefiles) + def unstablefiles = [] + file(process.out.output.get(0)).eachFileRecurse{ file -> if (["timestamp"].find {file.toString().endsWith(it)}) {unstablefiles.add(file.getName().toString())} } + println(unstablefiles) + assertAll( + { assert process.success }, + { assert snapshot( + stablefiles.sort(), + unstablefiles.sort(), + process.out.versions + ).match() + } + ) + } + + } + + test("taxonomy - stub") { + + options "-stub" + + when { + process { + """ + input[0] = 'taxonomy' + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/krakenuniq/download/tests/main.nf.test.snap b/modules/nf-core/krakenuniq/download/tests/main.nf.test.snap new file mode 100644 index 00000000000..bdea7d86ea6 --- /dev/null +++ b/modules/nf-core/krakenuniq/download/tests/main.nf.test.snap @@ -0,0 +1,49 @@ +{ + "taxonomy - stub": { + "content": [ + { + "0": [ + [ + + ] + ], + "1": [ + "versions.yml:md5,a12e821f0d977f77c0c905a89c708d09" + ], + "output": [ + [ + + ] + ], + "versions": [ + "versions.yml:md5,a12e821f0d977f77c0c905a89c708d09" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-17T08:39:20.362801897" + }, + "taxonomy": { + "content": [ + [ + "names.dmp:md5,aae05a99d67ea8a593f8642b40e98f28", + "nodes.dmp:md5,73f515a0c4be7a324a6717bbe14cd274", + "taxdump.tar.gz:md5,4ec3d4430ef2d350db5b3284edd33a8b" + ], + [ + "timestamp" + ], + [ + "versions.yml:md5,a12e821f0d977f77c0c905a89c708d09" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.2" + }, + "timestamp": "2025-01-17T09:01:52.533204202" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 6eef66aaa8b..f8edf0986e5 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -266,12 +266,6 @@ kofamscan: krakentools/combinekreports: - modules/nf-core/krakentools/combinekreports/** - tests/modules/nf-core/krakentools/combinekreports/** -krakenuniq/build: - - modules/nf-core/krakenuniq/build/** - - tests/modules/nf-core/krakenuniq/build/** -krakenuniq/download: - - modules/nf-core/krakenuniq/download/** - - tests/modules/nf-core/krakenuniq/download/** krona/kronadb: - modules/nf-core/krona/kronadb/** - tests/modules/nf-core/krona/kronadb/** diff --git a/tests/modules/nf-core/krakenuniq/build/main.nf b/tests/modules/nf-core/krakenuniq/build/main.nf deleted file mode 100644 index 63fba4866cb..00000000000 --- a/tests/modules/nf-core/krakenuniq/build/main.nf +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { KRAKENUNIQ_DOWNLOAD } from '../../../../../modules/nf-core/krakenuniq/download/main.nf' -include { KRAKENUNIQ_BUILD } from '../../../../../modules/nf-core/krakenuniq/build/main.nf' - -workflow test_krakenuniq_build { - - ch_fastas = Channel.fromPath(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ch_seqid2mapid = Channel.fromPath(params.test_data['sarscov2']['metagenome']['seqid2taxid_map'], checkIfExists: true) - KRAKENUNIQ_DOWNLOAD ( 'taxonomy' ) - - ch_input = ch_fastas - .combine(KRAKENUNIQ_DOWNLOAD.out.output) - .combine(ch_seqid2mapid) - .map { - fna, tax, map -> - - [ [id: "customdb"], fna, tax, map ] - } - - KRAKENUNIQ_BUILD ( ch_input ) -} diff --git a/tests/modules/nf-core/krakenuniq/build/nextflow.config b/tests/modules/nf-core/krakenuniq/build/nextflow.config deleted file mode 100644 index 113299318e5..00000000000 --- a/tests/modules/nf-core/krakenuniq/build/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: 'KRAKENUNIQ_BUILD' { - ext.args ="--work-on-disk" - } - -} diff --git a/tests/modules/nf-core/krakenuniq/build/test.yml b/tests/modules/nf-core/krakenuniq/build/test.yml deleted file mode 100644 index f36f385f174..00000000000 --- a/tests/modules/nf-core/krakenuniq/build/test.yml +++ /dev/null @@ -1,30 +0,0 @@ -- name: krakenuniq build test_krakenuniq_build - command: nextflow run ./tests/modules/nf-core/krakenuniq/build -entry test_krakenuniq_build -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/krakenuniq/build/nextflow.config - tags: - - krakenuniq/build - - krakenuniq - files: - - path: output/krakenuniq/customdb/database-build.log - contains: ["-d database.jdb -o database0.kdb.tmp -i database.idx"] - - path: output/krakenuniq/customdb/database.idx - md5sum: db9e8cd1f75cdedd70dd346b70658790 - - path: output/krakenuniq/customdb/database.jdb - md5sum: 8b4a9b8cbcacec61fc6a220f0cec59bd - - path: output/krakenuniq/customdb/database.kdb - md5sum: c6853c5d2f3a4a7ad05c2973a993b9b8 - - path: output/krakenuniq/customdb/database.kdb.counts - md5sum: a82149480a435210ec1e870f06b6cdb3 - - path: output/krakenuniq/customdb/database.kraken.tsv - md5sum: 8aafacd89a6aac98aaf512df0a7493d1 - - path: output/krakenuniq/customdb/database.report.tsv - contains: ["% reads taxReads kmers dup cov taxID rank taxName"] - - path: output/krakenuniq/customdb/database0.kdb - md5sum: c6853c5d2f3a4a7ad05c2973a993b9b8 - - path: output/krakenuniq/customdb/library-files.txt - md5sum: 8a9817d2de8465eb436aa3aa8696a717 - - path: output/krakenuniq/customdb/library/genome.fasta - md5sum: 6e9fe4042a72f2345f644f239272b7e6 - - path: output/krakenuniq/customdb/seqid2taxid.map - md5sum: fe738f2333d57dde0db32239c04a93b8 - - path: output/krakenuniq/customdb/taxDB - md5sum: 84213970a13958e612a0eb0f4681fbc4 diff --git a/tests/modules/nf-core/krakenuniq/download/main.nf b/tests/modules/nf-core/krakenuniq/download/main.nf deleted file mode 100644 index 418561dc320..00000000000 --- a/tests/modules/nf-core/krakenuniq/download/main.nf +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { KRAKENUNIQ_DOWNLOAD } from '../../../../../modules/nf-core/krakenuniq/download/main.nf' - -workflow test_krakenuniq_download { - - input = "taxonomy" - - KRAKENUNIQ_DOWNLOAD ( input ) -} diff --git a/tests/modules/nf-core/krakenuniq/download/nextflow.config b/tests/modules/nf-core/krakenuniq/download/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/krakenuniq/download/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/krakenuniq/download/test.yml b/tests/modules/nf-core/krakenuniq/download/test.yml deleted file mode 100644 index 63fdcfc4cae..00000000000 --- a/tests/modules/nf-core/krakenuniq/download/test.yml +++ /dev/null @@ -1,12 +0,0 @@ -- name: krakenuniq download test_krakenuniq_download - command: nextflow run ./tests/modules/nf-core/krakenuniq/download -entry test_krakenuniq_download -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/krakenuniq/download/nextflow.config - tags: - - krakenuniq - - krakenuniq/download - files: - - path: output/krakenuniq/taxonomy/names.dmp - contains: ["scientific name"] - - path: output/krakenuniq/taxonomy/nodes.dmp - contains: ["superkingdom"] - - path: output/krakenuniq/taxonomy/taxdump.tar.gz - - path: output/krakenuniq/taxonomy/timestamp