From e8771874196a492af65a097e8fea8b9415d562e8 Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Tue, 12 May 2026 14:06:45 +1000 Subject: [PATCH 01/10] New module mifaser/environment Co-authored-by: Nick Waters Co-authored-by: Mirae Baichoo --- modules/nf-core/mifaser/environment.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 modules/nf-core/mifaser/environment.yml diff --git a/modules/nf-core/mifaser/environment.yml b/modules/nf-core/mifaser/environment.yml new file mode 100644 index 00000000000..05ab4d7d03b --- /dev/null +++ b/modules/nf-core/mifaser/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::mifaser=1.60 From 44e34b456876b0c8d3398e4de0bf59df3ac88218 Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Tue, 12 May 2026 14:06:48 +1000 Subject: [PATCH 02/10] New module mifaser/main Co-authored-by: Nick Waters Co-authored-by: Mirae Baichoo --- modules/nf-core/mifaser/main.nf | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 modules/nf-core/mifaser/main.nf diff --git a/modules/nf-core/mifaser/main.nf b/modules/nf-core/mifaser/main.nf new file mode 100644 index 00000000000..b5ee22e40c4 --- /dev/null +++ b/modules/nf-core/mifaser/main.nf @@ -0,0 +1,48 @@ +process MIFASER { + tag "${meta.id}" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container 'ghcr.io/vdblab/mifaser:1.64d' + + input: + tuple val(meta), path(reads) + path db + + output: + tuple val(meta), path("*multi_ec.tsv"), emit: multi_ec + tuple val(meta), path("*analysis.tsv"), emit: analysis + tuple val(meta), path("*ec_count.tsv"), emit: ec_counts + tuple val("${task.process}"), val('mi-faser'), eval("mifaser --version 2>&1 | sed 's/* v//'"), emit: versions_mifaser, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def input_flag = meta.single_end ? "-f" : "-l" + """ + mifaser \\ + ${args} \\ + ${input_flag} ${reads} \\ + --threads 1 \\ + --cpu ${task.cpus} \\ + --databasefolder ${db} \\ + --outputfolder mifaser-${prefix}/ + + for suf in multi_ec.tsv analysis.tsv ec_count.tsv; do + mv mifaser-${prefix}/\${suf} ${prefix}_\${suf} + done + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + echo ${args} + for suf in multi_ec.tsv analysis.tsv ec_count.tsv; do + touch ${prefix}_\${suf} + done + """ +} From 3cde904d3d7c0cee51b3eda8c8d564bef58f6a2b Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Tue, 12 May 2026 14:06:51 +1000 Subject: [PATCH 03/10] New module mifaser/meta Co-authored-by: Nick Waters Co-authored-by: Mirae Baichoo --- modules/nf-core/mifaser/meta.yml | 91 ++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 modules/nf-core/mifaser/meta.yml diff --git a/modules/nf-core/mifaser/meta.yml b/modules/nf-core/mifaser/meta.yml new file mode 100644 index 00000000000..932e4163b6b --- /dev/null +++ b/modules/nf-core/mifaser/meta.yml @@ -0,0 +1,91 @@ +name: "mifaser" +description: Functional annotation of metagenomic reads by assigning enzyme + commission (EC) numbers +keywords: + - metagenomics + - functional annotation + - EC numbers + - fastq +tools: + - "mifaser": + description: "mi-faser: microsecond functional annotation of sequences, a massive + scalability upgrade" + homepage: "https://sourceforge.net/projects/mifaser/" + documentation: "https://sourceforge.net/projects/mifaser/" + tool_dev_url: "https://sourceforge.net/projects/mifaser/" + doi: "10.1093/nar/gkx1209" + licence: + - "NPOSL-3.0" + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1', single_end:true ]` + - reads: + type: file + description: | + Single-end or paired-end FASTQ files. Use meta.single_end to indicate input type. + pattern: "*.{fastq,fastq.gz,fq,fq.gz}" + ontologies: + - edam: "http://edamontology.org/format_1930" + - db: + type: directory + description: Path to the mi-faser database folder +output: + multi_ec: + - - meta: + type: map + description: Groovy Map containing sample information + - "*multi_ec.tsv": + type: file + description: TSV file with multi-EC functional assignments per read + pattern: "*multi_ec.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + analysis: + - - meta: + type: map + description: Groovy Map containing sample information + - "*analysis.tsv": + type: file + description: TSV file with per-sample functional analysis summary + pattern: "*analysis.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + ec_counts: + - - meta: + type: map + description: Groovy Map containing sample information + - "*ec_count.tsv": + type: file + description: TSV file with EC number counts + pattern: "*ec_count.tsv" + ontologies: + - edam: http://edamontology.org/format_3475 + versions_mifaser: + - - "${task.process}": + type: string + description: Process name + - "mi-faser": + type: string + description: Tool name + - "mifaser --version 2>&1 | sed 's/* v//'": + type: eval + description: mifaser version string +topics: + versions: + - - "${task.process}": + type: string + description: Process name + - "mi-faser": + type: string + description: Tool name + - "mifaser --version 2>&1 | sed 's/* v//'": + type: eval + description: mifaser version string +authors: + - "@nickp60" +maintainers: + - "@nickp60" From ccaaeb9e343e912c8706b674dc3a61fee72d6836 Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Tue, 12 May 2026 14:06:55 +1000 Subject: [PATCH 04/10] New module mifaser/tests Co-authored-by: Nick Waters Co-authored-by: Mirae Baichoo --- modules/nf-core/mifaser/tests/main.nf.test | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 modules/nf-core/mifaser/tests/main.nf.test diff --git a/modules/nf-core/mifaser/tests/main.nf.test b/modules/nf-core/mifaser/tests/main.nf.test new file mode 100644 index 00000000000..d8805c4fca2 --- /dev/null +++ b/modules/nf-core/mifaser/tests/main.nf.test @@ -0,0 +1,73 @@ +nextflow_process { + + name "Test Process MIFASER" + script "../main.nf" + process "MIFASER" + tag "modules" + tag "modules_nfcore" + tag "mifaser" + tag "untar" + + setup { + run("UNTAR") { + script "modules/nf-core/untar/main.nf" + process { + """ + input[0] = Channel.of([ + [], + file( + 'https://github.com/nf-core/test-datasets/raw/refs/heads/funcprofiler/data/database/mifaser/GS-24-all.tar.gz', + checkIfExists: true + ) + ]) + """ + } + } + } + + test("sarscov2 - single-end fastq") { + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.multi_ec, + process.out.analysis, + process.out.ec_counts, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } + ) + } + } + + test("sarscov2 - single-end fastq - stub") { + options "-stub" + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ] + input[1] = UNTAR.out.untar.map{ it[1] } + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} From 6948d5ff9aed4d7f6ee3b5c734215ed1a129ce9c Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Thu, 14 May 2026 10:51:42 +1000 Subject: [PATCH 05/10] mifaser/mifaser: add test snapshot Co-authored-by: Nick Waters Co-authored-by: Mirae Baichoo --- .../nf-core/mifaser/tests/main.nf.test.snap | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 modules/nf-core/mifaser/tests/main.nf.test.snap diff --git a/modules/nf-core/mifaser/tests/main.nf.test.snap b/modules/nf-core/mifaser/tests/main.nf.test.snap new file mode 100644 index 00000000000..ede2fdc4233 --- /dev/null +++ b/modules/nf-core/mifaser/tests/main.nf.test.snap @@ -0,0 +1,126 @@ +{ + "sarscov2 - single-end fastq - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test_multi_ec.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test_analysis.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test_ec_count.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + "MIFASER", + "mi-faser", + "mifaser 1.64 (07/21/25)" + ] + ], + "analysis": [ + [ + { + "id": "test", + "single_end": true + }, + "test_analysis.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ec_counts": [ + [ + { + "id": "test", + "single_end": true + }, + "test_ec_count.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "multi_ec": [ + [ + { + "id": "test", + "single_end": true + }, + "test_multi_ec.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_mifaser": [ + [ + "MIFASER", + "mi-faser", + "mifaser 1.64 (07/21/25)" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.4" + }, + "timestamp": "2026-05-12T14:06:57.628532" + }, + "sarscov2 - single-end fastq": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test_multi_ec.tsv:md5,08ad0cac1771a190e63cd76a3b3ab686" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test_analysis.tsv:md5,722399e3bfd7af4273b36779a111db8a" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test_ec_count.tsv:md5,195e3e0db1dd8b603a7e8d91e85e480d" + ] + ], + { + "versions_mifaser": [ + [ + "MIFASER", + "mi-faser", + "mifaser 1.64 (07/21/25)" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.10.4" + }, + "timestamp": "2026-05-12T14:06:46.076826" + } +} \ No newline at end of file From aed967858a664585daf340565c16399db2e08537 Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Fri, 15 May 2026 12:43:32 +1000 Subject: [PATCH 06/10] mifaser: switch to biocontainers 1.60, fix db path Use quay.io/biocontainers/mifaser:1.60--pyh106432d_0 instead of ghcr.io/vdblab/mifaser:1.64d. Prepend \$PWD to staged db path so mifaser 1.60 resolves --databasefolder as absolute path rather than relative to its Python package directory. Co-authored-by: Nick Waters --- modules/nf-core/mifaser/main.nf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/mifaser/main.nf b/modules/nf-core/mifaser/main.nf index b5ee22e40c4..9bffc0a2587 100644 --- a/modules/nf-core/mifaser/main.nf +++ b/modules/nf-core/mifaser/main.nf @@ -3,7 +3,9 @@ process MIFASER { label 'process_medium' conda "${moduleDir}/environment.yml" - container 'ghcr.io/vdblab/mifaser:1.64d' + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mifaser:1.60--pyh106432d_0' : + 'quay.io/biocontainers/mifaser:1.60--pyh106432d_0' }" input: tuple val(meta), path(reads) @@ -28,7 +30,7 @@ process MIFASER { ${input_flag} ${reads} \\ --threads 1 \\ --cpu ${task.cpus} \\ - --databasefolder ${db} \\ + --databasefolder \$PWD/${db} \\ --outputfolder mifaser-${prefix}/ for suf in multi_ec.tsv analysis.tsv ec_count.tsv; do From 3806226ce2a12f980e8841ca77d5c2d596a5beb9 Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Fri, 15 May 2026 13:01:25 +1000 Subject: [PATCH 07/10] mifaser: correct path of test file --- modules/nf-core/mifaser/tests/main.nf.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/mifaser/tests/main.nf.test b/modules/nf-core/mifaser/tests/main.nf.test index d8805c4fca2..a2e8ed9642a 100644 --- a/modules/nf-core/mifaser/tests/main.nf.test +++ b/modules/nf-core/mifaser/tests/main.nf.test @@ -33,7 +33,7 @@ nextflow_process { [ id:'test', single_end:true ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ] - input[1] = UNTAR.out.untar.map{ it[1] } + input[1] = UNTAR.out.untar.map{ "${it[1]}/database/mifaser/GS-24-all" } """ } } @@ -59,7 +59,7 @@ nextflow_process { [ id:'test', single_end:true ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ] - input[1] = UNTAR.out.untar.map{ it[1] } + input[1] = UNTAR.out.untar.map{ "${it[1]}/database/mifaser/GS-24-all" } """ } } From 51ace6ab2b64ef4d36f6c5882096bebb34d2ed87 Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Fri, 15 May 2026 13:16:06 +1000 Subject: [PATCH 08/10] mifaser: fix Java syntax error --- modules/nf-core/mifaser/tests/main.nf.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/mifaser/tests/main.nf.test b/modules/nf-core/mifaser/tests/main.nf.test index a2e8ed9642a..fa7a2392b11 100644 --- a/modules/nf-core/mifaser/tests/main.nf.test +++ b/modules/nf-core/mifaser/tests/main.nf.test @@ -33,7 +33,7 @@ nextflow_process { [ id:'test', single_end:true ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ] - input[1] = UNTAR.out.untar.map{ "${it[1]}/database/mifaser/GS-24-all" } + input[1] = UNTAR.out.untar.map{ meta, dir -> dir.resolve("database/mifaser/GS-24-all") } """ } } @@ -59,7 +59,7 @@ nextflow_process { [ id:'test', single_end:true ], [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] ] - input[1] = UNTAR.out.untar.map{ "${it[1]}/database/mifaser/GS-24-all" } + input[1] = UNTAR.out.untar.map{ meta, dir -> dir.resolve("database/mifaser/GS-24-all") } """ } } From 386b2a4c733a764fbe6ed88832de8f3c7ec4fa86 Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Fri, 15 May 2026 14:21:28 +1000 Subject: [PATCH 09/10] mifaser: update snapshot --- .../nf-core/mifaser/tests/main.nf.test.snap | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/nf-core/mifaser/tests/main.nf.test.snap b/modules/nf-core/mifaser/tests/main.nf.test.snap index ede2fdc4233..1686e28a71d 100644 --- a/modules/nf-core/mifaser/tests/main.nf.test.snap +++ b/modules/nf-core/mifaser/tests/main.nf.test.snap @@ -33,7 +33,7 @@ [ "MIFASER", "mi-faser", - "mifaser 1.64 (07/21/25)" + "mifaser 1.60 (03/23/20)" ] ], "analysis": [ @@ -67,16 +67,16 @@ [ "MIFASER", "mi-faser", - "mifaser 1.64 (07/21/25)" + "mifaser 1.60 (03/23/20)" ] ] } ], + "timestamp": "2026-05-15T14:21:18.968578", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.4" - }, - "timestamp": "2026-05-12T14:06:57.628532" + "nf-test": "0.9.5", + "nextflow": "26.04.1" + } }, "sarscov2 - single-end fastq": { "content": [ @@ -112,15 +112,15 @@ [ "MIFASER", "mi-faser", - "mifaser 1.64 (07/21/25)" + "mifaser 1.60 (03/23/20)" ] ] } ], + "timestamp": "2026-05-15T14:21:10.040918", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.4" - }, - "timestamp": "2026-05-12T14:06:46.076826" + "nf-test": "0.9.5", + "nextflow": "26.04.1" + } } } \ No newline at end of file From 866234dac2786141d4084d0da1bc13113a3856f6 Mon Sep 17 00:00:00 2001 From: Vini Salazar <17276653+vinisalazar@users.noreply.github.com> Date: Sun, 17 May 2026 13:53:54 +1000 Subject: [PATCH 10/10] mifaser: bump to 1.64, use each path(db) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update container and conda env to mifaser 1.64. Change db input from `path db` to `each path(db)` so the database is repeated for every incoming sample. Note: Singularity image at depot.galaxyproject.org for 1.64 may lag behind bioconda — Docker (quay.io) confirmed working. Co-authored-by: Carolin Schwitalla --- modules/nf-core/mifaser/environment.yml | 2 +- modules/nf-core/mifaser/main.nf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/mifaser/environment.yml b/modules/nf-core/mifaser/environment.yml index 05ab4d7d03b..62896ba4de8 100644 --- a/modules/nf-core/mifaser/environment.yml +++ b/modules/nf-core/mifaser/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::mifaser=1.60 + - bioconda::mifaser=1.64 diff --git a/modules/nf-core/mifaser/main.nf b/modules/nf-core/mifaser/main.nf index 9bffc0a2587..17987cb45bb 100644 --- a/modules/nf-core/mifaser/main.nf +++ b/modules/nf-core/mifaser/main.nf @@ -4,12 +4,12 @@ process MIFASER { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mifaser:1.60--pyh106432d_0' : - 'quay.io/biocontainers/mifaser:1.60--pyh106432d_0' }" + 'https://depot.galaxyproject.org/singularity/mifaser:1.64--pyh106432d_0' : + 'quay.io/biocontainers/mifaser:1.64--pyh106432d_0' }" input: tuple val(meta), path(reads) - path db + each path(db) output: tuple val(meta), path("*multi_ec.tsv"), emit: multi_ec