From 62e1dae4c289a790ec31916da81d418cbadd3a3e Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Wed, 29 Apr 2026 20:18:16 +0000 Subject: [PATCH 1/9] first draft of fgumi/extract --- modules/nf-core/fgumi/extract/environment.yml | 7 ++ modules/nf-core/fgumi/extract/main.nf | 40 +++++++++ modules/nf-core/fgumi/extract/meta.yml | 63 ++++++++++++++ .../nf-core/fgumi/extract/tests/main.nf.test | 61 ++++++++++++++ .../fgumi/extract/tests/main.nf.test.snap | 84 +++++++++++++++++++ 5 files changed, 255 insertions(+) create mode 100644 modules/nf-core/fgumi/extract/environment.yml create mode 100644 modules/nf-core/fgumi/extract/main.nf create mode 100644 modules/nf-core/fgumi/extract/meta.yml create mode 100644 modules/nf-core/fgumi/extract/tests/main.nf.test create mode 100644 modules/nf-core/fgumi/extract/tests/main.nf.test.snap diff --git a/modules/nf-core/fgumi/extract/environment.yml b/modules/nf-core/fgumi/extract/environment.yml new file mode 100644 index 000000000000..7960b0e5a1cf --- /dev/null +++ b/modules/nf-core/fgumi/extract/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::fgumi=0.2.0" diff --git a/modules/nf-core/fgumi/extract/main.nf b/modules/nf-core/fgumi/extract/main.nf new file mode 100644 index 000000000000..036ef5b845bf --- /dev/null +++ b/modules/nf-core/fgumi/extract/main.nf @@ -0,0 +1,40 @@ +process FGUMI_EXTRACT { + tag "${meta.id}" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/a5/a510706f3481fae12ff6100d6e4ad298b8bf464a2d93a6afe35e9cf26542d080/data' + : 'community.wave.seqera.io/library/fgumi:0.2.0--fe028e7a64e5da27'}" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.bam"), emit: bam + tuple val("${task.process}"), val('fgumi'), eval('fgumi --version | sed "s/^fgumi //"'), topic: versions, emit: versions_fgumi + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: meta.id + def sample = args.contains('--sample') ? '' : "--sample ${meta.id}" + def library = args.contains('--library') ? '' : "--library ${meta.id}" + + """ + fgumi extract \\ + --inputs ${reads.join(' ')} \\ + --output ${prefix}.bam \\ + ${sample} \\ + ${library} \\ + ${args} + """ + + stub: + def prefix = task.ext.prefix ?: meta.id + """ + touch ${prefix}.bam + """ +} diff --git a/modules/nf-core/fgumi/extract/meta.yml b/modules/nf-core/fgumi/extract/meta.yml new file mode 100644 index 000000000000..b11fbcfbd1c1 --- /dev/null +++ b/modules/nf-core/fgumi/extract/meta.yml @@ -0,0 +1,63 @@ +name: fgumi_extract +description: Extract unique molecular indices (UMIs) from FASTQ files and write an unaligned BAM file. +keywords: + - umi + - extract + - fastq + - bam +tools: + - fgumi: + description: High-performance tools for working with UMI-tagged sequencing data. + homepage: https://github.com/fulcrumgenomics/fgumi + documentation: https://docs.rs/fgumi + tool_dev_url: https://github.com/fulcrumgenomics/fgumi + licence: ["MIT"] +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Input FASTQ files used for UMI extraction. + pattern: "*.fastq.gz" + ontologies: [] +output: + bam: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: Unaligned BAM with extracted UMIs in SAM tags. + pattern: "*.bam" + ontologies: [] + versions_fgumi: + - - ${task.process}: + type: string + description: The process the versions were collected from + - fgumi: + type: string + description: The tool name + - 'fgumi --version | sed "s/^fgumi //"': + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - fgumi: + type: string + description: The tool name + - 'fgumi --version | sed "s/^fgumi //"': + type: eval + description: The expression to obtain the version of the tool +authors: + - "@atrigila" +maintainers: + - "@atrigila" diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test b/modules/nf-core/fgumi/extract/tests/main.nf.test new file mode 100644 index 000000000000..1b0bdc26dd52 --- /dev/null +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test @@ -0,0 +1,61 @@ +nextflow_process { + + name "Test Process FGUMI_EXTRACT" + script "../main.nf" + process "FGUMI_EXTRACT" + + tag "modules" + tag "modules_nfcore" + tag "fgumi" + tag "fgumi/extract" + + test("homo_sapiens - [fastq1, fastq2]") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert snapshot(process.out).match() } + ) + } + + } + + test("homo_sapiens - [fastq1, fastq2] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert snapshot(process.out).match() } + ) + } + + } +} diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap new file mode 100644 index 000000000000..51efe1a38baa --- /dev/null +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap @@ -0,0 +1,84 @@ +{ + "homo_sapiens - [fastq1, fastq2]": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bam:md5,0b06fac2943d2128fbb391f7da0948e3" + ] + ], + "1": [ + [ + "FGUMI_EXTRACT", + "fgumi", + "0.2.0" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,0b06fac2943d2128fbb391f7da0948e3" + ] + ], + "versions_fgumi": [ + [ + "FGUMI_EXTRACT", + "fgumi", + "0.2.0" + ] + ] + } + ], + "timestamp": "2026-04-29T20:16:44.87275989", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "homo_sapiens - [fastq1, fastq2] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + "FGUMI_EXTRACT", + "fgumi", + "0.2.0" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_fgumi": [ + [ + "FGUMI_EXTRACT", + "fgumi", + "0.2.0" + ] + ] + } + ], + "timestamp": "2026-04-29T19:49:25.098129043", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file From 58c621fe3c5dcdaeeee82558ede9b8a38c82e631 Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Mon, 4 May 2026 22:22:44 +0200 Subject: [PATCH 2/9] update fgumi --- modules/nf-core/fgumi/extract/main.nf | 13 +++--- .../nf-core/fgumi/extract/tests/main.nf.test | 44 ++++++++++++++++++- .../fgumi/extract/tests/main.nf.test.snap | 34 +------------- .../fgumi/extract/tests/nextflow.config | 6 +++ 4 files changed, 56 insertions(+), 41 deletions(-) create mode 100644 modules/nf-core/fgumi/extract/tests/nextflow.config diff --git a/modules/nf-core/fgumi/extract/main.nf b/modules/nf-core/fgumi/extract/main.nf index 036ef5b845bf..75369c834394 100644 --- a/modules/nf-core/fgumi/extract/main.nf +++ b/modules/nf-core/fgumi/extract/main.nf @@ -1,6 +1,6 @@ process FGUMI_EXTRACT { tag "${meta.id}" - label 'process_low' + label 'process_single' conda "${moduleDir}/environment.yml" container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container @@ -19,21 +19,20 @@ process FGUMI_EXTRACT { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: meta.id - def sample = args.contains('--sample') ? '' : "--sample ${meta.id}" - def library = args.contains('--library') ? '' : "--library ${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" + if (!args.contains('--sample') || !args.contains('--library')) { + error("fgumi extract requires both --sample and --library to be supplied via task.ext.args") + } """ fgumi extract \\ --inputs ${reads.join(' ')} \\ --output ${prefix}.bam \\ - ${sample} \\ - ${library} \\ ${args} """ stub: - def prefix = task.ext.prefix ?: meta.id + def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.bam """ diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test b/modules/nf-core/fgumi/extract/tests/main.nf.test index 1b0bdc26dd52..373d5ee85291 100644 --- a/modules/nf-core/fgumi/extract/tests/main.nf.test +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test @@ -9,9 +9,15 @@ nextflow_process { tag "fgumi" tag "fgumi/extract" + config "./nextflow.config" + test("homo_sapiens - [fastq1, fastq2]") { when { + params { + module_args = '--library test' + prefix = '' + } process { """ input[0] = [ @@ -27,17 +33,50 @@ nextflow_process { then { assertAll( - { assert snapshot(process.out).match() } + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } + test("homo_sapiens - [fastq1, fastq2] - missing library") { + + when { + params { + module_args = '--read-structures +T +M' + prefix = '' + } + process { + """ + input[0] = [ + [ id:'test' ], + [ + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert !process.success }, + { assert process.errorReport.contains('fgumi extract requires both --sample and --library') } + ) + } + } + test("homo_sapiens - [fastq1, fastq2] - stub") { options "-stub" when { + params { + module_args = "--sample test --library test --read-structures +T +M" + prefix = '' + } process { """ input[0] = [ @@ -53,7 +92,8 @@ nextflow_process { then { assertAll( - { assert snapshot(process.out).match() } + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } ) } diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap index 51efe1a38baa..1bba8ef32d0f 100644 --- a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap @@ -2,21 +2,6 @@ "homo_sapiens - [fastq1, fastq2]": { "content": [ { - "0": [ - [ - { - "id": "test" - }, - "test.bam:md5,0b06fac2943d2128fbb391f7da0948e3" - ] - ], - "1": [ - [ - "FGUMI_EXTRACT", - "fgumi", - "0.2.0" - ] - ], "bam": [ [ { @@ -34,7 +19,7 @@ ] } ], - "timestamp": "2026-04-29T20:16:44.87275989", + "timestamp": "2026-05-04T22:22:16.912892888", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" @@ -43,21 +28,6 @@ "homo_sapiens - [fastq1, fastq2] - stub": { "content": [ { - "0": [ - [ - { - "id": "test" - }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - "FGUMI_EXTRACT", - "fgumi", - "0.2.0" - ] - ], "bam": [ [ { @@ -75,7 +45,7 @@ ] } ], - "timestamp": "2026-04-29T19:49:25.098129043", + "timestamp": "2026-05-04T22:10:38.368295554", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" diff --git a/modules/nf-core/fgumi/extract/tests/nextflow.config b/modules/nf-core/fgumi/extract/tests/nextflow.config new file mode 100644 index 000000000000..2cc0d7b7268d --- /dev/null +++ b/modules/nf-core/fgumi/extract/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: FGUMI_EXTRACT { + ext.args = { "--sample ${meta.id} ${params.module_args}" } + ext.prefix = params.prefix + } +} \ No newline at end of file From 84e5bfcaa572b8c72c3a70c48d14870398d7b7a6 Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Tue, 5 May 2026 17:50:05 +0200 Subject: [PATCH 3/9] add library --- modules/nf-core/fgumi/extract/tests/main.nf.test | 2 +- modules/nf-core/fgumi/extract/tests/main.nf.test.snap | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test b/modules/nf-core/fgumi/extract/tests/main.nf.test index 373d5ee85291..5a610bd0c6f0 100644 --- a/modules/nf-core/fgumi/extract/tests/main.nf.test +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test @@ -15,7 +15,7 @@ nextflow_process { when { params { - module_args = '--library test' + module_args = '--library illumina' prefix = '' } process { diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap index 1bba8ef32d0f..c8ea4ce2adad 100644 --- a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "test" }, - "test.bam:md5,0b06fac2943d2128fbb391f7da0948e3" + "test.bam:md5,9c2476e5c354f57bed109e582b8953be" ] ], "versions_fgumi": [ @@ -19,7 +19,7 @@ ] } ], - "timestamp": "2026-05-04T22:22:16.912892888", + "timestamp": "2026-05-05T17:49:43.490283983", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" From 517df53b3eba99b7300e824c127a0dbd0acb7a23 Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Thu, 7 May 2026 12:40:59 +0000 Subject: [PATCH 4/9] add default prefix, fix linting --- modules/nf-core/fgumi/extract/main.nf | 4 ++-- .../nf-core/fgumi/extract/tests/main.nf.test.snap | 12 ++++++------ modules/nf-core/fgumi/extract/tests/nextflow.config | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/nf-core/fgumi/extract/main.nf b/modules/nf-core/fgumi/extract/main.nf index 75369c834394..a7b01a5b019d 100644 --- a/modules/nf-core/fgumi/extract/main.nf +++ b/modules/nf-core/fgumi/extract/main.nf @@ -19,7 +19,7 @@ process FGUMI_EXTRACT { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}.fgumi_extract" if (!args.contains('--sample') || !args.contains('--library')) { error("fgumi extract requires both --sample and --library to be supplied via task.ext.args") } @@ -32,7 +32,7 @@ process FGUMI_EXTRACT { """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}.fgumi_extract" """ touch ${prefix}.bam """ diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap index c8ea4ce2adad..a9cb8e883913 100644 --- a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "test" }, - "test.bam:md5,9c2476e5c354f57bed109e582b8953be" + "test.fgumi_extract.bam:md5,8d7b8ec04bbfe4285cddced4c82aea7d" ] ], "versions_fgumi": [ @@ -19,10 +19,10 @@ ] } ], - "timestamp": "2026-05-05T17:49:43.490283983", + "timestamp": "2026-05-07T12:35:44.755887347", "meta": { "nf-test": "0.9.5", - "nextflow": "25.10.4" + "nextflow": "26.04.0" } }, "homo_sapiens - [fastq1, fastq2] - stub": { @@ -33,7 +33,7 @@ { "id": "test" }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.fgumi_extract.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions_fgumi": [ @@ -45,10 +45,10 @@ ] } ], - "timestamp": "2026-05-04T22:10:38.368295554", + "timestamp": "2026-05-07T12:36:12.822185537", "meta": { "nf-test": "0.9.5", - "nextflow": "25.10.4" + "nextflow": "26.04.0" } } } \ No newline at end of file diff --git a/modules/nf-core/fgumi/extract/tests/nextflow.config b/modules/nf-core/fgumi/extract/tests/nextflow.config index 2cc0d7b7268d..de08c1b03ce7 100644 --- a/modules/nf-core/fgumi/extract/tests/nextflow.config +++ b/modules/nf-core/fgumi/extract/tests/nextflow.config @@ -3,4 +3,4 @@ process { ext.args = { "--sample ${meta.id} ${params.module_args}" } ext.prefix = params.prefix } -} \ No newline at end of file +} From 045536e863ef58ba5300000e0f7cf01e54339f67 Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Thu, 7 May 2026 12:50:58 +0000 Subject: [PATCH 5/9] remove default prefix --- modules/nf-core/fgumi/extract/main.nf | 4 ++-- modules/nf-core/fgumi/extract/tests/main.nf.test.snap | 8 ++++---- modules/nf-core/fgumi/extract/tests/nextflow.config | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/nf-core/fgumi/extract/main.nf b/modules/nf-core/fgumi/extract/main.nf index a7b01a5b019d..75369c834394 100644 --- a/modules/nf-core/fgumi/extract/main.nf +++ b/modules/nf-core/fgumi/extract/main.nf @@ -19,7 +19,7 @@ process FGUMI_EXTRACT { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}.fgumi_extract" + def prefix = task.ext.prefix ?: "${meta.id}" if (!args.contains('--sample') || !args.contains('--library')) { error("fgumi extract requires both --sample and --library to be supplied via task.ext.args") } @@ -32,7 +32,7 @@ process FGUMI_EXTRACT { """ stub: - def prefix = task.ext.prefix ?: "${meta.id}.fgumi_extract" + def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.bam """ diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap index a9cb8e883913..8c054cafd78c 100644 --- a/modules/nf-core/fgumi/extract/tests/main.nf.test.snap +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test.snap @@ -7,7 +7,7 @@ { "id": "test" }, - "test.fgumi_extract.bam:md5,8d7b8ec04bbfe4285cddced4c82aea7d" + "test.bam:md5,9c2476e5c354f57bed109e582b8953be" ] ], "versions_fgumi": [ @@ -19,7 +19,7 @@ ] } ], - "timestamp": "2026-05-07T12:35:44.755887347", + "timestamp": "2026-05-07T12:48:51.477812468", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" @@ -33,7 +33,7 @@ { "id": "test" }, - "test.fgumi_extract.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions_fgumi": [ @@ -45,7 +45,7 @@ ] } ], - "timestamp": "2026-05-07T12:36:12.822185537", + "timestamp": "2026-05-07T12:49:21.767581495", "meta": { "nf-test": "0.9.5", "nextflow": "26.04.0" diff --git a/modules/nf-core/fgumi/extract/tests/nextflow.config b/modules/nf-core/fgumi/extract/tests/nextflow.config index de08c1b03ce7..3462c8fa06f7 100644 --- a/modules/nf-core/fgumi/extract/tests/nextflow.config +++ b/modules/nf-core/fgumi/extract/tests/nextflow.config @@ -1,6 +1,5 @@ process { withName: FGUMI_EXTRACT { ext.args = { "--sample ${meta.id} ${params.module_args}" } - ext.prefix = params.prefix } } From 84535d093fc2ac52618eae94ad57821273b9d06c Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Thu, 7 May 2026 13:03:30 +0000 Subject: [PATCH 6/9] remove unused prefix --- modules/nf-core/fgumi/extract/tests/main.nf.test | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test b/modules/nf-core/fgumi/extract/tests/main.nf.test index 5a610bd0c6f0..2a511eaef5fa 100644 --- a/modules/nf-core/fgumi/extract/tests/main.nf.test +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test @@ -16,7 +16,6 @@ nextflow_process { when { params { module_args = '--library illumina' - prefix = '' } process { """ @@ -45,7 +44,6 @@ nextflow_process { when { params { module_args = '--read-structures +T +M' - prefix = '' } process { """ @@ -75,7 +73,6 @@ nextflow_process { when { params { module_args = "--sample test --library test --read-structures +T +M" - prefix = '' } process { """ From c960d2e5f0be1b3831eebb75b71dc8da7994d0cf Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Thu, 7 May 2026 16:50:27 +0000 Subject: [PATCH 7/9] add sample and library as mandatory args --- modules/nf-core/fgumi/extract/main.nf | 7 +++---- modules/nf-core/fgumi/extract/meta.yml | 6 ++++++ modules/nf-core/fgumi/extract/tests/nextflow.config | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/nf-core/fgumi/extract/main.nf b/modules/nf-core/fgumi/extract/main.nf index 75369c834394..214452691d70 100644 --- a/modules/nf-core/fgumi/extract/main.nf +++ b/modules/nf-core/fgumi/extract/main.nf @@ -8,7 +8,7 @@ process FGUMI_EXTRACT { : 'community.wave.seqera.io/library/fgumi:0.2.0--fe028e7a64e5da27'}" input: - tuple val(meta), path(reads) + tuple val(meta), path(reads), val(sample), val(library) output: tuple val(meta), path("*.bam"), emit: bam @@ -20,14 +20,13 @@ process FGUMI_EXTRACT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - if (!args.contains('--sample') || !args.contains('--library')) { - error("fgumi extract requires both --sample and --library to be supplied via task.ext.args") - } """ fgumi extract \\ --inputs ${reads.join(' ')} \\ --output ${prefix}.bam \\ + --sample "${sample}" \\ + --library "${library}" \\ ${args} """ diff --git a/modules/nf-core/fgumi/extract/meta.yml b/modules/nf-core/fgumi/extract/meta.yml index b11fbcfbd1c1..a7d3288986b6 100644 --- a/modules/nf-core/fgumi/extract/meta.yml +++ b/modules/nf-core/fgumi/extract/meta.yml @@ -23,6 +23,12 @@ input: description: Input FASTQ files used for UMI extraction. pattern: "*.fastq.gz" ontologies: [] + - sample: + type: string + description: Sample name to store in the output BAM read group. + - library: + type: string + description: Library name to store in the output BAM read group. output: bam: - - meta: diff --git a/modules/nf-core/fgumi/extract/tests/nextflow.config b/modules/nf-core/fgumi/extract/tests/nextflow.config index 3462c8fa06f7..54ef88450854 100644 --- a/modules/nf-core/fgumi/extract/tests/nextflow.config +++ b/modules/nf-core/fgumi/extract/tests/nextflow.config @@ -1,5 +1,5 @@ process { withName: FGUMI_EXTRACT { - ext.args = { "--sample ${meta.id} ${params.module_args}" } + ext.args = { "${params.module_args}" } } } From 6351f2c575cade557ae972f2c07473b7ac47936e Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Thu, 7 May 2026 18:45:46 +0000 Subject: [PATCH 8/9] update tests --- modules/nf-core/fgumi/extract/main.nf | 8 ++-- .../nf-core/fgumi/extract/tests/main.nf.test | 37 +++---------------- 2 files changed, 10 insertions(+), 35 deletions(-) diff --git a/modules/nf-core/fgumi/extract/main.nf b/modules/nf-core/fgumi/extract/main.nf index 214452691d70..fb17d5adf0d5 100644 --- a/modules/nf-core/fgumi/extract/main.nf +++ b/modules/nf-core/fgumi/extract/main.nf @@ -8,7 +8,7 @@ process FGUMI_EXTRACT { : 'community.wave.seqera.io/library/fgumi:0.2.0--fe028e7a64e5da27'}" input: - tuple val(meta), path(reads), val(sample), val(library) + tuple val(meta), path(reads), val(library) output: tuple val(meta), path("*.bam"), emit: bam @@ -25,9 +25,9 @@ process FGUMI_EXTRACT { fgumi extract \\ --inputs ${reads.join(' ')} \\ --output ${prefix}.bam \\ - --sample "${sample}" \\ - --library "${library}" \\ - ${args} + ${args} \\ + --sample ${prefix} \\ + --library "${library}" """ stub: diff --git a/modules/nf-core/fgumi/extract/tests/main.nf.test b/modules/nf-core/fgumi/extract/tests/main.nf.test index 2a511eaef5fa..44ce2572e72d 100644 --- a/modules/nf-core/fgumi/extract/tests/main.nf.test +++ b/modules/nf-core/fgumi/extract/tests/main.nf.test @@ -15,7 +15,7 @@ nextflow_process { when { params { - module_args = '--library illumina' + module_args = '' } process { """ @@ -24,7 +24,8 @@ nextflow_process { [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) - ] + ], + 'illumina', ] """ } @@ -39,40 +40,13 @@ nextflow_process { } - test("homo_sapiens - [fastq1, fastq2] - missing library") { - - when { - params { - module_args = '--read-structures +T +M' - } - process { - """ - input[0] = [ - [ id:'test' ], - [ - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) - ] - ] - """ - } - } - - then { - assertAll( - { assert !process.success }, - { assert process.errorReport.contains('fgumi extract requires both --sample and --library') } - ) - } - } - test("homo_sapiens - [fastq1, fastq2] - stub") { options "-stub" when { params { - module_args = "--sample test --library test --read-structures +T +M" + module_args = "--read-structures +T +M" } process { """ @@ -81,7 +55,8 @@ nextflow_process { [ file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz', checkIfExists: true) - ] + ], + 'test', ] """ } From cfef819fbeb25a313d04c24f824c8f4c5fd4e9e3 Mon Sep 17 00:00:00 2001 From: Anabella Trigila <18577080+atrigila@users.noreply.github.com> Date: Thu, 7 May 2026 18:51:40 +0000 Subject: [PATCH 9/9] fix linting --- modules/nf-core/fgumi/extract/meta.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/fgumi/extract/meta.yml b/modules/nf-core/fgumi/extract/meta.yml index a7d3288986b6..7d62b590c47e 100644 --- a/modules/nf-core/fgumi/extract/meta.yml +++ b/modules/nf-core/fgumi/extract/meta.yml @@ -1,5 +1,6 @@ name: fgumi_extract -description: Extract unique molecular indices (UMIs) from FASTQ files and write an unaligned BAM file. +description: Extract unique molecular indices (UMIs) from FASTQ files and write + an unaligned BAM file. keywords: - umi - extract @@ -7,11 +8,14 @@ keywords: - bam tools: - fgumi: - description: High-performance tools for working with UMI-tagged sequencing data. + description: High-performance tools for working with UMI-tagged sequencing + data. homepage: https://github.com/fulcrumgenomics/fgumi documentation: https://docs.rs/fgumi tool_dev_url: https://github.com/fulcrumgenomics/fgumi - licence: ["MIT"] + licence: + - "MIT" + identifier: "" input: - - meta: type: map @@ -22,10 +26,8 @@ input: type: file description: Input FASTQ files used for UMI extraction. pattern: "*.fastq.gz" - ontologies: [] - - sample: - type: string - description: Sample name to store in the output BAM read group. + ontologies: + - edam: http://edamontology.org/format_3989 - library: type: string description: Library name to store in the output BAM read group. @@ -51,7 +53,6 @@ output: - 'fgumi --version | sed "s/^fgumi //"': type: eval description: The expression to obtain the version of the tool - topics: versions: - - ${task.process}: