From 567ea92a923f4faa9b0fb893b5c7953e9da2c85e Mon Sep 17 00:00:00 2001 From: erkutilaslan Date: Mon, 28 Oct 2024 11:45:21 +0100 Subject: [PATCH 01/18] add module bbmap/clumpify --- modules.json | 5 ++ .../nf-core/bbmap/clumpify/environment.yml | 5 ++ modules/nf-core/bbmap/clumpify/main.nf | 38 ++++++++++ modules/nf-core/bbmap/clumpify/meta.yml | 56 +++++++++++++++ .../nf-core/bbmap/clumpify/tests/main.nf.test | 72 +++++++++++++++++++ .../bbmap/clumpify/tests/main.nf.test.snap | 49 +++++++++++++ workflows/seqinspector.nf | 12 ++++ 7 files changed, 237 insertions(+) create mode 100644 modules/nf-core/bbmap/clumpify/environment.yml create mode 100644 modules/nf-core/bbmap/clumpify/main.nf create mode 100644 modules/nf-core/bbmap/clumpify/meta.yml create mode 100644 modules/nf-core/bbmap/clumpify/tests/main.nf.test create mode 100644 modules/nf-core/bbmap/clumpify/tests/main.nf.test.snap diff --git a/modules.json b/modules.json index 8e632d50..bf8f5f02 100644 --- a/modules.json +++ b/modules.json @@ -5,6 +5,11 @@ "https://github.com/nf-core/modules.git": { "modules": { "nf-core": { + "bbmap/clumpify": { + "branch": "master", + "git_sha": "a1abf90966a2a4016d3c3e41e228bfcbd4811ccc", + "installed_by": ["modules"] + }, "fastqc": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", diff --git a/modules/nf-core/bbmap/clumpify/environment.yml b/modules/nf-core/bbmap/clumpify/environment.yml new file mode 100644 index 00000000..a2f65506 --- /dev/null +++ b/modules/nf-core/bbmap/clumpify/environment.yml @@ -0,0 +1,5 @@ +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::bbmap=39.10 diff --git a/modules/nf-core/bbmap/clumpify/main.nf b/modules/nf-core/bbmap/clumpify/main.nf new file mode 100644 index 00000000..fc6a85ad --- /dev/null +++ b/modules/nf-core/bbmap/clumpify/main.nf @@ -0,0 +1,38 @@ +process BBMAP_CLUMPIFY { + tag "$meta.id" + label 'process_single' + label 'process_high_memory' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bbmap:39.10--h92535d8_0': + 'biocontainers/bbmap:39.10--h92535d8_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path('*.fastq.gz'), emit: reads + tuple val(meta), path('*.log') , emit: log + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def raw = meta.single_end ? "in=$reads" : "in1=${reads[0]} in2=${reads[1]}" + def clumped = meta.single_end ? "out=${prefix}.clumped.fastq.gz" : "out1=${prefix}_1.clumped.fastq.gz out2=${prefix}_2.clumped.fastq.gz" + """ + clumpify.sh \\ + $raw \\ + $clumped \\ + $args \\ + &> ${prefix}.clumpify.log + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bbmap: \$(bbversion.sh | grep -v "Duplicate cpuset") + END_VERSIONS + """ +} diff --git a/modules/nf-core/bbmap/clumpify/meta.yml b/modules/nf-core/bbmap/clumpify/meta.yml new file mode 100644 index 00000000..7db435cd --- /dev/null +++ b/modules/nf-core/bbmap/clumpify/meta.yml @@ -0,0 +1,56 @@ +name: bbmap_clumpify +description: Create 30% Smaller, Faster Gzipped Fastq Files. And remove duplicates +keywords: + - clumping fastqs + - smaller fastqs + - deduping + - fastq +tools: + - bbmap: + description: BBMap is a short read aligner, as well as various other bioinformatic + tools. + homepage: https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/clumpify-guide/ + documentation: https://www.biostars.org/p/225338/ + licence: ["UC-LBL license (see package)"] + identifier: biotools:bbmap +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. +output: + - reads: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.fastq.gz": + type: file + description: The reordered/clumped (and if necessary deduped) fastq reads + pattern: "*.clumped.fastq.gz" + - log: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.log": + type: file + description: Clumpify log file + pattern: "*clumpify.log" + - versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@tamuanand" +maintainers: + - "@tamuanand" diff --git a/modules/nf-core/bbmap/clumpify/tests/main.nf.test b/modules/nf-core/bbmap/clumpify/tests/main.nf.test new file mode 100644 index 00000000..f43b8767 --- /dev/null +++ b/modules/nf-core/bbmap/clumpify/tests/main.nf.test @@ -0,0 +1,72 @@ + +nextflow_process { + + name "Test Process BBMAP_CLUMPIFY" + script "../main.nf" + process "BBMAP_CLUMPIFY" + + tag "modules" + tag "modules_nfcore" + tag "bbmap" + tag "bbmap/clumpify" + + test("test-bbmap-clumpify-single-end") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) + ] + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.reads, + file(process.out.log[0][1]).name, + process.out.versions + ).match() + } + ) + } + } + + test("test-bbmap-clumpify-paired-end") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.reads, + file(process.out.log[0][1]).name, + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/bbmap/clumpify/tests/main.nf.test.snap b/modules/nf-core/bbmap/clumpify/tests/main.nf.test.snap new file mode 100644 index 00000000..e84c345f --- /dev/null +++ b/modules/nf-core/bbmap/clumpify/tests/main.nf.test.snap @@ -0,0 +1,49 @@ +{ + "test-bbmap-clumpify-paired-end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.clumped.fastq.gz:md5,27e51643262c1ef3905c4be184c3814c", + "test_2.clumped.fastq.gz:md5,c70ab7bbd44d6b6fadd6a1a79ef1648f" + ] + ] + ], + "test.clumpify.log", + [ + "versions.yml:md5,fdf0404f694fca43bcf9be6458d927cd" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-19T16:16:59.10822554" + }, + "test-bbmap-clumpify-single-end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.clumped.fastq.gz:md5,27e51643262c1ef3905c4be184c3814c" + ] + ], + "test.clumpify.log", + [ + "versions.yml:md5,fdf0404f694fca43bcf9be6458d927cd" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-10-19T16:16:36.9005326" + } +} \ No newline at end of file diff --git a/workflows/seqinspector.nf b/workflows/seqinspector.nf index ea628117..4b633651 100644 --- a/workflows/seqinspector.nf +++ b/workflows/seqinspector.nf @@ -4,6 +4,8 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ include { FASTQC } from '../modules/nf-core/fastqc/main' +include { BBMAP_CLUMPIFY } from '../modules/nf-core/bbmap/clumpify/main' + include { MULTIQC as MULTIQC_GLOBAL } from '../modules/nf-core/multiqc/main' include { MULTIQC as MULTIQC_PER_TAG } from '../modules/nf-core/multiqc/main' @@ -39,6 +41,16 @@ workflow SEQINSPECTOR { ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip) ch_versions = ch_versions.mix(FASTQC.out.versions.first()) + // + // MODULE: Run BBMAP_CLUMPIFY + // + BBMAP_CLUMPIFY ( + ch_samplesheet + ) +// ch_multiqc_files = ch_multiqc_files.mix(BBMAP_CLUMPIFY.out.zip.collect{it[1]}) + ch_versions = ch_versions.mix(BBMAP_CLUMPIFY.out.versions) + + // // Collate and save software versions // From 541cb3cc9094cfcfd7804e7bb6ed3e4062280aa9 Mon Sep 17 00:00:00 2001 From: erkutilaslan Date: Mon, 28 Oct 2024 15:28:37 +0100 Subject: [PATCH 02/18] cleanup code --- workflows/seqinspector.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/workflows/seqinspector.nf b/workflows/seqinspector.nf index 4b633651..59f19e5e 100644 --- a/workflows/seqinspector.nf +++ b/workflows/seqinspector.nf @@ -47,7 +47,6 @@ workflow SEQINSPECTOR { BBMAP_CLUMPIFY ( ch_samplesheet ) -// ch_multiqc_files = ch_multiqc_files.mix(BBMAP_CLUMPIFY.out.zip.collect{it[1]}) ch_versions = ch_versions.mix(BBMAP_CLUMPIFY.out.versions) From c2fd2d0d7c1e9fe248e0b5e61dde060e50f09072 Mon Sep 17 00:00:00 2001 From: erkutilaslan Date: Mon, 28 Oct 2024 16:58:01 +0100 Subject: [PATCH 03/18] fix lint errors --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index c8838224..8d85bdce 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1,4 +1,4 @@ -/* +/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Config file for defining DSL2 per module options and publishing paths ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From cd4acf50bc785e21a03752aa41756058a90c5b41 Mon Sep 17 00:00:00 2001 From: erkutilaslan Date: Tue, 29 Oct 2024 11:41:14 +0100 Subject: [PATCH 04/18] fix comment --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 8d85bdce..c8838224 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1,4 +1,4 @@ -/ +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Config file for defining DSL2 per module options and publishing paths ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 50010e0e3181c7ee46568fb12f9b8cb8a4eed476 Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Fri, 12 Jun 2026 12:59:53 +0200 Subject: [PATCH 05/18] Merging dev --- .../bbmap/clumpify/bbmap-clumpify.diff | 19 + .../nf-core/bbmap/clumpify/environment.yml | 5 +- modules/nf-core/bbmap/clumpify/main.nf | 14 +- modules/nf-core/bbmap/clumpify/meta.yml | 51 +- .../nf-core/bwamem2/index/tests/main.nf.test | 54 + .../bwamem2/index/tests/main.nf.test.snap | 108 ++ .../nf-core/bwamem2/mem/tests/main.nf.test | 173 +++ .../bwamem2/mem/tests/main.nf.test.snap | 162 ++ modules/nf-core/checkqc/tests/main.nf.test | 104 ++ .../nf-core/checkqc/tests/main.nf.test.snap | 84 + modules/nf-core/checkqc/tests/nextflow.config | 5 + modules/nf-core/fastp/tests/main.nf.test | 661 ++++++++ modules/nf-core/fastp/tests/main.nf.test.snap | 1376 +++++++++++++++++ .../fastp/tests/nextflow.interleaved.config | 5 + .../fastp/tests/nextflow.save_failed.config | 5 + modules/nf-core/fastqe/tests/main.nf.test | 100 ++ .../nf-core/fastqe/tests/main.nf.test.snap | 110 ++ .../fastqscreen/tests/main.nf.test | 120 ++ .../fastqscreen/tests/main.nf.test.snap | 115 ++ .../fastqscreen/tests/nextflow.config | 5 + modules/nf-core/fq/lint/tests/main.nf.test | 92 ++ .../nf-core/fq/lint/tests/main.nf.test.snap | 19 + .../kraken2/kraken2/tests/main.nf.test | 213 +++ .../kraken2/kraken2/tests/main.nf.test.snap | 181 +++ .../krona/ktimporttaxonomy/tests/main.nf.test | 63 + .../ktimporttaxonomy/tests/main.nf.test.snap | 47 + .../krona/ktupdatetaxonomy/tests/main.nf.test | 52 + .../ktupdatetaxonomy/tests/main.nf.test.snap | 42 + .../multiqc/tests/custom_prefix.config | 5 + modules/nf-core/multiqcsav/tests/main.nf.test | 118 ++ .../multiqcsav/tests/main.nf.test.snap | 208 +++ .../nf-core/multiqcsav/tests/nextflow.config | 5 + .../collecthsmetrics/tests/main.nf.test | 221 +++ .../collecthsmetrics/tests/main.nf.test.snap | 639 ++++++++ .../collectmultiplemetrics/tests/main.nf.test | 186 +++ .../tests/main.nf.test.snap | 242 +++ .../tests/main.nf.test | 55 + .../tests/main.nf.test.snap | 47 + .../nf-core/samtools/faidx/tests/main.nf.test | 253 +++ .../samtools/faidx/tests/main.nf.test.snap | 352 +++++ .../samtools/faidx/tests/nextflow.config | 6 + .../samtools/index/tests/csi.nextflow.config | 6 + .../nf-core/samtools/index/tests/main.nf.test | 155 ++ .../samtools/index/tests/main.nf.test.snap | 156 ++ .../nf-core/seqfu/stats/tests/main.nf.test | 81 + .../seqfu/stats/tests/main.nf.test.snap | 104 ++ .../nf-core/seqtk/sample/tests/main.nf.test | 102 ++ .../seqtk/sample/tests/main.nf.test.snap | 174 +++ .../seqtk/sample/tests/standard.config | 6 + modules/nf-core/sequali/tests/main.nf.test | 171 ++ .../nf-core/sequali/tests/main.nf.test.snap | 287 ++++ modules/nf-core/toulligqc/tests/main.nf.test | 130 ++ .../nf-core/toulligqc/tests/main.nf.test.snap | 335 ++++ .../nf-core/toulligqc/tests/nextflow.config | 9 + modules/nf-core/untar/tests/main.nf.test | 97 ++ modules/nf-core/untar/tests/main.nf.test.snap | 118 ++ .../utils_nfcore_pipeline/tests/main.nf.test | 29 + .../tests/main.nf.test.snap | 19 + 58 files changed, 8277 insertions(+), 24 deletions(-) create mode 100644 modules/nf-core/bbmap/clumpify/bbmap-clumpify.diff create mode 100644 modules/nf-core/bwamem2/index/tests/main.nf.test create mode 100644 modules/nf-core/bwamem2/index/tests/main.nf.test.snap create mode 100644 modules/nf-core/bwamem2/mem/tests/main.nf.test create mode 100644 modules/nf-core/bwamem2/mem/tests/main.nf.test.snap create mode 100644 modules/nf-core/checkqc/tests/main.nf.test create mode 100644 modules/nf-core/checkqc/tests/main.nf.test.snap create mode 100644 modules/nf-core/checkqc/tests/nextflow.config create mode 100644 modules/nf-core/fastp/tests/main.nf.test create mode 100644 modules/nf-core/fastp/tests/main.nf.test.snap create mode 100644 modules/nf-core/fastp/tests/nextflow.interleaved.config create mode 100644 modules/nf-core/fastp/tests/nextflow.save_failed.config create mode 100644 modules/nf-core/fastqe/tests/main.nf.test create mode 100644 modules/nf-core/fastqe/tests/main.nf.test.snap create mode 100644 modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test create mode 100644 modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test.snap create mode 100644 modules/nf-core/fastqscreen/fastqscreen/tests/nextflow.config create mode 100644 modules/nf-core/fq/lint/tests/main.nf.test create mode 100644 modules/nf-core/fq/lint/tests/main.nf.test.snap create mode 100644 modules/nf-core/kraken2/kraken2/tests/main.nf.test create mode 100644 modules/nf-core/kraken2/kraken2/tests/main.nf.test.snap create mode 100644 modules/nf-core/krona/ktimporttaxonomy/tests/main.nf.test create mode 100644 modules/nf-core/krona/ktimporttaxonomy/tests/main.nf.test.snap create mode 100644 modules/nf-core/krona/ktupdatetaxonomy/tests/main.nf.test create mode 100644 modules/nf-core/krona/ktupdatetaxonomy/tests/main.nf.test.snap create mode 100644 modules/nf-core/multiqc/tests/custom_prefix.config create mode 100644 modules/nf-core/multiqcsav/tests/main.nf.test create mode 100644 modules/nf-core/multiqcsav/tests/main.nf.test.snap create mode 100644 modules/nf-core/multiqcsav/tests/nextflow.config create mode 100644 modules/nf-core/picard/collecthsmetrics/tests/main.nf.test create mode 100644 modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap create mode 100644 modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test create mode 100644 modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap create mode 100644 modules/nf-core/picard/createsequencedictionary/tests/main.nf.test create mode 100644 modules/nf-core/picard/createsequencedictionary/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/faidx/tests/main.nf.test create mode 100644 modules/nf-core/samtools/faidx/tests/main.nf.test.snap create mode 100644 modules/nf-core/samtools/faidx/tests/nextflow.config create mode 100644 modules/nf-core/samtools/index/tests/csi.nextflow.config create mode 100644 modules/nf-core/samtools/index/tests/main.nf.test create mode 100644 modules/nf-core/samtools/index/tests/main.nf.test.snap create mode 100644 modules/nf-core/seqfu/stats/tests/main.nf.test create mode 100644 modules/nf-core/seqfu/stats/tests/main.nf.test.snap create mode 100644 modules/nf-core/seqtk/sample/tests/main.nf.test create mode 100644 modules/nf-core/seqtk/sample/tests/main.nf.test.snap create mode 100644 modules/nf-core/seqtk/sample/tests/standard.config create mode 100644 modules/nf-core/sequali/tests/main.nf.test create mode 100644 modules/nf-core/sequali/tests/main.nf.test.snap create mode 100644 modules/nf-core/toulligqc/tests/main.nf.test create mode 100644 modules/nf-core/toulligqc/tests/main.nf.test.snap create mode 100644 modules/nf-core/toulligqc/tests/nextflow.config create mode 100644 modules/nf-core/untar/tests/main.nf.test create mode 100644 modules/nf-core/untar/tests/main.nf.test.snap create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test.snap diff --git a/modules/nf-core/bbmap/clumpify/bbmap-clumpify.diff b/modules/nf-core/bbmap/clumpify/bbmap-clumpify.diff new file mode 100644 index 00000000..b542cf66 --- /dev/null +++ b/modules/nf-core/bbmap/clumpify/bbmap-clumpify.diff @@ -0,0 +1,19 @@ +Changes in component 'nf-core/bbmap/clumpify' +'modules/nf-core/bbmap/clumpify/meta.yml' is unchanged +'modules/nf-core/bbmap/clumpify/environment.yml' is unchanged +Changes in 'bbmap/clumpify/main.nf': +--- modules/nf-core/bbmap/clumpify/main.nf ++++ modules/nf-core/bbmap/clumpify/main.nf +@@ -13,7 +13,7 @@ + + output: + tuple val(meta), path('*.fastq.gz'), emit: reads +- tuple val(meta), path('*.log') , emit: log ++ tuple val(meta), val("${task.process}"), val('bbmap'), path("*.log"), emit: log, topic: multiqc_files + tuple val("${task.process}"), val('bbmap'), eval('bbversion.sh | grep -v "Duplicate cpuset"'), emit: versions_bbmap, topic: versions + + when: + +'modules/nf-core/bbmap/clumpify/tests/main.nf.test' was removed +'modules/nf-core/bbmap/clumpify/tests/main.nf.test.snap' was removed +************************************************************ diff --git a/modules/nf-core/bbmap/clumpify/environment.yml b/modules/nf-core/bbmap/clumpify/environment.yml index a2f65506..a33ddca8 100644 --- a/modules/nf-core/bbmap/clumpify/environment.yml +++ b/modules/nf-core/bbmap/clumpify/environment.yml @@ -1,5 +1,8 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda dependencies: - - bioconda::bbmap=39.10 + - bioconda::bbmap=39.18 + - pigz=2.8 diff --git a/modules/nf-core/bbmap/clumpify/main.nf b/modules/nf-core/bbmap/clumpify/main.nf index fc6a85ad..3402895b 100644 --- a/modules/nf-core/bbmap/clumpify/main.nf +++ b/modules/nf-core/bbmap/clumpify/main.nf @@ -4,17 +4,17 @@ process BBMAP_CLUMPIFY { label 'process_high_memory' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bbmap:39.10--h92535d8_0': - 'biocontainers/bbmap:39.10--h92535d8_0' }" + container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ? + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/5a/5aae5977ff9de3e01ff962dc495bfa23f4304c676446b5fdf2de5c7edfa2dc4e/data' : + 'community.wave.seqera.io/library/bbmap_pigz:07416fe99b090fa9' }" input: tuple val(meta), path(reads) output: tuple val(meta), path('*.fastq.gz'), emit: reads - tuple val(meta), path('*.log') , emit: log - path "versions.yml" , emit: versions + tuple val(meta), val("${task.process}"), val('bbmap'), path("*.log"), emit: log, topic: multiqc_files + tuple val("${task.process}"), val('bbmap'), eval('bbversion.sh | grep -v "Duplicate cpuset"'), emit: versions_bbmap, topic: versions when: task.ext.when == null || task.ext.when @@ -30,9 +30,5 @@ process BBMAP_CLUMPIFY { $clumped \\ $args \\ &> ${prefix}.clumpify.log - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bbmap: \$(bbversion.sh | grep -v "Duplicate cpuset") - END_VERSIONS """ } diff --git a/modules/nf-core/bbmap/clumpify/meta.yml b/modules/nf-core/bbmap/clumpify/meta.yml index 7db435cd..478d4bc7 100644 --- a/modules/nf-core/bbmap/clumpify/meta.yml +++ b/modules/nf-core/bbmap/clumpify/meta.yml @@ -1,5 +1,6 @@ name: bbmap_clumpify -description: Create 30% Smaller, Faster Gzipped Fastq Files. And remove duplicates +description: Create 30% Smaller, Faster Gzipped Fastq Files. And remove + duplicates keywords: - clumping fastqs - smaller fastqs @@ -7,11 +8,12 @@ keywords: - fastq tools: - bbmap: - description: BBMap is a short read aligner, as well as various other bioinformatic - tools. + description: BBMap is a short read aligner, as well as various other + bioinformatic tools. homepage: https://jgi.doe.gov/data-and-tools/software-tools/bbtools/bb-tools-user-guide/clumpify-guide/ documentation: https://www.biostars.org/p/225338/ - licence: ["UC-LBL license (see package)"] + licence: + - "UC-LBL license (see package)" identifier: biotools:bbmap input: - - meta: @@ -24,19 +26,23 @@ input: description: | List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. + ontologies: [] output: - - reads: - - meta: + reads: + - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - "*.fastq.gz": type: file - description: The reordered/clumped (and if necessary deduped) fastq reads + description: The reordered/clumped (and if necessary deduped) fastq + reads pattern: "*.clumped.fastq.gz" - - log: - - meta: + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + log: + - - meta: type: map description: | Groovy Map containing sample information @@ -45,11 +51,28 @@ output: type: file description: Clumpify log file pattern: "*clumpify.log" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions_bbmap: + - - "${task.process}": + type: string + description: The name of the process + - bbmap: + type: string + description: The name of the tool + - bbversion.sh | grep -v "Duplicate cpuset": + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - "${task.process}": + type: string + description: The name of the process + - bbmap: + type: string + description: The name of the tool + - bbversion.sh | grep -v "Duplicate cpuset": + type: eval + description: The expression to obtain the version of the tool authors: - "@tamuanand" maintainers: diff --git a/modules/nf-core/bwamem2/index/tests/main.nf.test b/modules/nf-core/bwamem2/index/tests/main.nf.test new file mode 100644 index 00000000..3ee91048 --- /dev/null +++ b/modules/nf-core/bwamem2/index/tests/main.nf.test @@ -0,0 +1,54 @@ +nextflow_process { + + name "Test Process BWAMEM2_INDEX" + tag "modules_nfcore" + tag "modules" + tag "bwamem2" + tag "bwamem2/index" + script "../main.nf" + process "BWAMEM2_INDEX" + + test("fasta") { + + when { + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [id: 'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/bwamem2/index/tests/main.nf.test.snap b/modules/nf-core/bwamem2/index/tests/main.nf.test.snap new file mode 100644 index 00000000..776e87be --- /dev/null +++ b/modules/nf-core/bwamem2/index/tests/main.nf.test.snap @@ -0,0 +1,108 @@ +{ + "fasta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "genome.fasta.0123:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.bwt.2bit.64:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.pac:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + [ + "BWAMEM2_INDEX", + "bwamem2", + "2.2.1" + ] + ], + "index": [ + [ + { + "id": "test" + }, + [ + "genome.fasta.0123:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.bwt.2bit.64:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.pac:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions_bwamem2": [ + [ + "BWAMEM2_INDEX", + "bwamem2", + "2.2.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-09T16:19:38.013344" + }, + "fasta": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "genome.fasta.0123:md5,b02870de80106104abcb03cd9463e7d8", + "genome.fasta.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e", + "genome.fasta.ann:md5,c32e11f6c859f166c7525a9c1d583567", + "genome.fasta.bwt.2bit.64:md5,d097a1b82dee375d41a1ea69895a9216", + "genome.fasta.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66" + ] + ] + ], + "1": [ + [ + "BWAMEM2_INDEX", + "bwamem2", + "2.2.1" + ] + ], + "index": [ + [ + { + "id": "test" + }, + [ + "genome.fasta.0123:md5,b02870de80106104abcb03cd9463e7d8", + "genome.fasta.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e", + "genome.fasta.ann:md5,c32e11f6c859f166c7525a9c1d583567", + "genome.fasta.bwt.2bit.64:md5,d097a1b82dee375d41a1ea69895a9216", + "genome.fasta.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66" + ] + ] + ], + "versions_bwamem2": [ + [ + "BWAMEM2_INDEX", + "bwamem2", + "2.2.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-09T16:19:32.542622" + } +} \ No newline at end of file diff --git a/modules/nf-core/bwamem2/mem/tests/main.nf.test b/modules/nf-core/bwamem2/mem/tests/main.nf.test new file mode 100644 index 00000000..be33a3a7 --- /dev/null +++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test @@ -0,0 +1,173 @@ +nextflow_process { + + name "Test Process BWAMEM2_MEM" + script "../main.nf" + process "BWAMEM2_MEM" + + tag "modules" + tag "modules_nfcore" + tag "bwamem2" + tag "bwamem2/mem" + tag "bwamem2/index" + + setup { + run("BWAMEM2_INDEX") { + script "../../index/main.nf" + process { + """ + input[0] = Channel.of([ + [:], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] + ]) + """ + } + } + } + + test("sarscov2 - fastq, index, fasta, false") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + input[1] = BWAMEM2_INDEX.out.index + input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]]) + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } + ) + } + } + + test("sarscov2 - fastq, index, fasta, true") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + input[1] = BWAMEM2_INDEX.out.index + input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]]) + input[3] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } + ) + } + } + + test("sarscov2 - [fastq1, fastq2], index, fasta, false") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = BWAMEM2_INDEX.out.index + input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]]) + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } + ) + } + } + + test("sarscov2 - [fastq1, fastq2], index, fasta, true") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = BWAMEM2_INDEX.out.index + input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]]) + input[3] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getHeaderMD5(), + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } + ) + } + } + + test("sarscov2 - [fastq1, fastq2], index, fasta, true - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = BWAMEM2_INDEX.out.index + input[2] = Channel.of([[:], [file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]]) + input[3] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } +} diff --git a/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap new file mode 100644 index 00000000..06d854b0 --- /dev/null +++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap @@ -0,0 +1,162 @@ +{ + "sarscov2 - [fastq1, fastq2], index, fasta, false": { + "content": [ + "e414c2d48e2e44c2c52c20ecd88e8bd8", + "57aeef88ed701a8ebc8e2f0a381b2a6", + { + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ], + "versions_samtools": [ + [ + "BWAMEM2_MEM", + "samtools", + "1.22.1" + ] + ] + } + ], + "timestamp": "2026-02-19T11:51:27.481278728", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 - [fastq1, fastq2], index, fasta, true - stub": { + "content": [ + { + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "sam": [ + + ], + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ], + "versions_samtools": [ + [ + "BWAMEM2_MEM", + "samtools", + "1.22.1" + ] + ] + } + ], + "timestamp": "2026-02-19T11:54:06.902806102", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 - [fastq1, fastq2], index, fasta, true": { + "content": [ + "716ed1ef39deaad346ca7cf86e08f959", + "af8628d9df18b2d3d4f6fd47ef2bb872", + { + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ], + "versions_samtools": [ + [ + "BWAMEM2_MEM", + "samtools", + "1.22.1" + ] + ] + } + ], + "timestamp": "2026-02-19T11:51:40.483217643", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 - fastq, index, fasta, false": { + "content": [ + "283a83f604f3f5338acedfee349dccf4", + "798439cbd7fd81cbcc5078022dc5479d", + { + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ], + "versions_samtools": [ + [ + "BWAMEM2_MEM", + "samtools", + "1.22.1" + ] + ] + } + ], + "timestamp": "2026-02-19T11:51:02.459481643", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 - fastq, index, fasta, true": { + "content": [ + "ed99048bb552cac58e39923b550b6d5b", + "94fcf617f5b994584c4e8d4044e16b4f", + { + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ], + "versions_samtools": [ + [ + "BWAMEM2_MEM", + "samtools", + "1.22.1" + ] + ] + } + ], + "timestamp": "2026-02-19T11:51:15.170720681", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/checkqc/tests/main.nf.test b/modules/nf-core/checkqc/tests/main.nf.test new file mode 100644 index 00000000..ea35102c --- /dev/null +++ b/modules/nf-core/checkqc/tests/main.nf.test @@ -0,0 +1,104 @@ +nextflow_process { + + name "Test Process CHECKQC" + script "../main.nf" + process "CHECKQC" + tag "modules" + tag "modules_nfcore" + tag "untar" + tag "checkqc" + + test("homo_sapiens illumina test_interop_bcl2fastqstats_flowcell - QC OK") { + config "./nextflow.config" + + + when { + process { + """ + input[0] = Channel.of([[id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/interop_bcl2fastqstats/test_flowcell_stats.tar.gz', checkIfExists: true)]) + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.report }, + { assert process.out.report.size() == 1 }, + { assert process.out.report.get(0).get(1) ==~ ".*/checkqc_report.json" }, + { assert path(process.out.report.get(0).get(1)).json.exit_status == 0 }, + { assert path(process.out.report.get(0).get(1)).json.run_summary.instrument_and_reagent_type == "hiseq2500_rapidhighoutput_v4" } + ) + } + + } + test("homo_sapiens illumina test_miseq_noRunParameters - Log Error: no File") { + config "./nextflow.config" + + setup { + run("UNTAR") { + script "../../untar/main.nf" + process { + """ + input[0] = Channel.of([[id: 'test_no_xml'], file('https://github.com/nf-core/test-datasets/raw/demultiplex/testdata/MiSeq/220422_M11111_0222_000000000-K9H97.tar.gz', checkIfExists: true)]) + """ + } + } + } + + when { + process { + """ + input[0] = UNTAR.out.untar + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert process.stdout.any { it.contains("ERROR Could not find [R|r]unParameters.xml") } } + ) + } + + } + + test("homo_sapiens illumina test_interop_bcl2fastqstats_flowcell - QC Error") { + + setup { + run("UNTAR") { + script "../../untar/main.nf" + process { + """ + input[0] = Channel.of([[id: 'test_no_downgrade_errors'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/interop_bcl2fastqstats/test_flowcell_stats.tar.gz', checkIfExists: true)]) + """ + } + } + } + + when { + process { + """ + input[0] = UNTAR.out.untar + input[1] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert process.out.report }, + { assert process.out.report.size() == 1 }, + { assert process.out.report.get(0).get(1) ==~ ".*/checkqc_report.json" }, + { assert path(process.out.report.get(0).get(1)).json.exit_status == 1 }, + { assert path(process.out.report.get(0).get(1)).json.run_summary.handlers.find { it.name == 'UndeterminedPercentageHandler' }.error == 9 } + ) + } + + } + } diff --git a/modules/nf-core/checkqc/tests/main.nf.test.snap b/modules/nf-core/checkqc/tests/main.nf.test.snap new file mode 100644 index 00000000..56410f5f --- /dev/null +++ b/modules/nf-core/checkqc/tests/main.nf.test.snap @@ -0,0 +1,84 @@ +{ + "homo_sapiens illumina test_interop_bcl2fastqstats_flowcell - QC Error": { + "content": [ + { + "0": [ + [ + { + "id": "test_no_downgrade_errors" + }, + "checkqc_report.json:md5,ffb2efadbcfe9dfb8a3c665e80519073" + ] + ], + "1": [ + [ + "CHECKQC", + "checkqc", + "4.1.0" + ] + ], + "report": [ + [ + { + "id": "test_no_downgrade_errors" + }, + "checkqc_report.json:md5,ffb2efadbcfe9dfb8a3c665e80519073" + ] + ], + "versions_checkqc": [ + [ + "CHECKQC", + "checkqc", + "4.1.0" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-04T20:22:15.072887659" + }, + "homo_sapiens illumina test_interop_bcl2fastqstats_flowcell - QC OK": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "checkqc_report.json:md5,c684032b1172084ee1adbbf8461b9834" + ] + ], + "1": [ + [ + "CHECKQC", + "checkqc", + "4.1.0" + ] + ], + "report": [ + [ + { + "id": "test" + }, + "checkqc_report.json:md5,c684032b1172084ee1adbbf8461b9834" + ] + ], + "versions_checkqc": [ + [ + "CHECKQC", + "checkqc", + "4.1.0" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.3" + }, + "timestamp": "2026-02-04T20:21:02.2386139" + } +} \ No newline at end of file diff --git a/modules/nf-core/checkqc/tests/nextflow.config b/modules/nf-core/checkqc/tests/nextflow.config new file mode 100644 index 00000000..50daa2d4 --- /dev/null +++ b/modules/nf-core/checkqc/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: CHECKQC { + ext.args = '--downgrade-errors ReadsPerSampleHandler' + } +} diff --git a/modules/nf-core/fastp/tests/main.nf.test b/modules/nf-core/fastp/tests/main.nf.test new file mode 100644 index 00000000..b7901578 --- /dev/null +++ b/modules/nf-core/fastp/tests/main.nf.test @@ -0,0 +1,661 @@ +nextflow_process { + + name "Test Process FASTP" + script "../main.nf" + process "FASTP" + tag "modules" + tag "modules_nfcore" + tag "fastp" + + test("test_fastp_single_end") { + + when { + + process { + """ + adapter_fasta = [] // empty list for no adapter file! + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, + { assert snapshot( + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.findAll { key, val -> key.startsWith('versions') }).match() + } + ) + } + } + + test("test_fastp_paired_end") { + + when { + + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, + { assert snapshot( + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.findAll { key, val -> key.startsWith('versions') }).match() } + ) + } + } + + test("fastp test_fastp_interleaved") { + + config './nextflow.interleaved.config' + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("paired end (151 cycles + 151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, + { assert process.out.reads_fail == [] }, + { assert process.out.reads_merged == [] }, + { assert snapshot( + process.out.reads, + process.out.findAll { key, val -> key.startsWith('versions') }).match() } + ) + } + } + + test("test_fastp_single_end_trim_fail") { + + when { + + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = true + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, + { assert snapshot( + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.findAll { key, val -> key.startsWith('versions') }).match() } + ) + } + } + + test("test_fastp_paired_end_trim_fail") { + + config './nextflow.save_failed.config' + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = true + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 162") }, + { assert snapshot( + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.findAll { key, val -> key.startsWith('versions') }).match() } + ) + } + } + + test("test_fastp_paired_end_merged") { + + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = true + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("total reads: 75") }, + { assert snapshot( + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.findAll { key, val -> key.startsWith('versions') }).match() }, + ) + } + } + + test("test_fastp_paired_end_merged_adapterlist") { + + when { + process { + """ + adapter_fasta = file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = true + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ], + adapter_fasta + ]) + input[1] = false + input[2] = false + input[3] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("
") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("total bases: 13683") }, + { assert snapshot( + process.out.reads, + process.out.reads_fail, + process.out.reads_merged, + process.out.findAll { key, val -> key.startsWith('versions') }).match() } + ) + } + } + + test("test_fastp_single_end_qc_only") { + + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = true + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("single end (151 cycles)") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("reads passed filter: 99") }, + { assert snapshot( + process.out.reads, + process.out.reads, + process.out.reads_fail, + process.out.reads_fail, + process.out.reads_merged, + process.out.reads_merged, + process.out.findAll { key, val -> key.startsWith('versions') }).match() } + ) + } + } + + test("test_fastp_paired_end_qc_only") { + + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = true + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.html.get(0).get(1)).getText().contains("The input has little adapter percentage (~0.000000%), probably it's trimmed before.") }, + { assert path(process.out.log.get(0).get(1)).getText().contains("Q30 bases: 12281(88.3716%)") }, + { assert snapshot( + process.out.reads, + process.out.reads, + process.out.reads_fail, + process.out.reads_fail, + process.out.reads_merged, + process.out.reads_merged, + process.out.findAll { key, val -> key.startsWith('versions') }).match() } + ) + } + } + + test("test_fastp_single_end - stub") { + + options "-stub" + + when { + + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end - stub") { + + options "-stub" + + when { + + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("fastp - stub test_fastp_interleaved") { + + options "-stub" + + config './nextflow.interleaved.config' + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_single_end_trim_fail - stub") { + + options "-stub" + + when { + + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = true + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end_trim_fail - stub") { + + options "-stub" + + config './nextflow.save_failed.config' + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = true + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end_merged - stub") { + + options "-stub" + + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = true + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end_merged_adapterlist - stub") { + + options "-stub" + + when { + process { + """ + adapter_fasta = file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) + discard_trimmed_pass = false + save_trimmed_fail = false + save_merged = true + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_single_end_qc_only - stub") { + + options "-stub" + + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = true + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_fastp_paired_end_qc_only - stub") { + + options "-stub" + + when { + process { + """ + adapter_fasta = [] + discard_trimmed_pass = true + save_trimmed_fail = false + save_merged = false + + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ], + adapter_fasta + ]) + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } +} diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap new file mode 100644 index 00000000..ffcdcfe8 --- /dev/null +++ b/modules/nf-core/fastp/tests/main.nf.test.snap @@ -0,0 +1,1376 @@ +{ + "test_fastp_single_end_qc_only - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:47.020865265", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_R2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + ] + ] + ], + [ + + ], + [ + + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:15.241140265", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end_merged_adapterlist": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_R2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + ] + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" + ] + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:46.580863399", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_single_end_qc_only": { + "content": [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:52.472110573", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end_trim_fail": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", + "test_R2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" + ] + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", + "test_R1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", + "test_R2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" + ] + ] + ], + [ + + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:33.495837144", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "fastp - stub test_fastp_interleaved": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:16.687251228", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_single_end - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:04.595682977", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end_merged_adapterlist - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:41.250046053", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end_merged - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:34.778759397", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end_merged": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_R2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + ] + ] + ], + [ + + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" + ] + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:39.842168047", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:10.810769812", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_single_end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7" + ] + ], + [ + + ], + [ + + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:08.775224044", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_single_end_trim_fail - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "5": [ + + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_fail": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "reads_merged": [ + + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:22.515897105", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end_trim_fail - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "5": [ + + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_fail": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "reads_merged": [ + + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:28.669851984", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "fastp test_fastp_interleaved": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,217d62dc13a23e92513a1bd8e1bcea39" + ] + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:21.378126443", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_single_end_trim_fail": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7" + ] + ], + [ + [ + { + "id": "test", + "single_end": true + }, + "test.fail.fastq.gz:md5,3e4aaadb66a5b8fc9b881bf39c227abd" + ] + ], + [ + + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:27.223877742", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end_qc_only": { + "content": [ + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + [ + + ], + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:06:58.764409116", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "test_fastp_paired_end_qc_only - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "json": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.json:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "log": [ + [ + { + "id": "test", + "single_end": false + }, + "test.fastp.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "reads": [ + + ], + "reads_fail": [ + + ], + "reads_merged": [ + + ], + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.1.0" + ] + ] + } + ], + "timestamp": "2026-03-08T13:07:53.18211408", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/fastp/tests/nextflow.interleaved.config b/modules/nf-core/fastp/tests/nextflow.interleaved.config new file mode 100644 index 00000000..4be8dbd2 --- /dev/null +++ b/modules/nf-core/fastp/tests/nextflow.interleaved.config @@ -0,0 +1,5 @@ +process { + withName: FASTP { + ext.args = "--interleaved_in -e 30" + } +} diff --git a/modules/nf-core/fastp/tests/nextflow.save_failed.config b/modules/nf-core/fastp/tests/nextflow.save_failed.config new file mode 100644 index 00000000..53b61b0c --- /dev/null +++ b/modules/nf-core/fastp/tests/nextflow.save_failed.config @@ -0,0 +1,5 @@ +process { + withName: FASTP { + ext.args = "-e 30" + } +} diff --git a/modules/nf-core/fastqe/tests/main.nf.test b/modules/nf-core/fastqe/tests/main.nf.test new file mode 100644 index 00000000..3e7b179f --- /dev/null +++ b/modules/nf-core/fastqe/tests/main.nf.test @@ -0,0 +1,100 @@ +// nf-core modules test fastqe +nextflow_process { + + name "Test Process FASTQE" + script "../main.nf" + process "FASTQE" + + tag "modules" + tag "modules_nfcore" + tag "fastqe" + + test("sarscov2 single-end [fastq]") { + + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assert process.success + assertAll ( + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + + test("sarscov2 paired-end [fastq]") { + + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assert process.success + assertAll ( + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + + test("sarscov2 single-end [fastq] - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id: 'test', single_end:true ], + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assert process.success + assertAll ( + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + + test("sarscov2 paired-end [fastq] - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ] + ]) + """ + } + } + + then { + assert process.success + assertAll ( + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + +} diff --git a/modules/nf-core/fastqe/tests/main.nf.test.snap b/modules/nf-core/fastqe/tests/main.nf.test.snap new file mode 100644 index 00000000..14879d9b --- /dev/null +++ b/modules/nf-core/fastqe/tests/main.nf.test.snap @@ -0,0 +1,110 @@ +{ + "sarscov2 single-end [fastq] - stub": { + "content": [ + { + "tsv": [ + [ + { + "id": "test", + "single_end": true + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_fastqe": [ + [ + "FASTQE", + "fastqe", + "0.5.2" + ] + ] + } + ], + "timestamp": "2026-03-12T11:09:13.561506822", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 paired-end [fastq]": { + "content": [ + { + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,aceceddba6e4b5a968d54a6db46238da" + ] + ], + "versions_fastqe": [ + [ + "FASTQE", + "fastqe", + "0.5.2" + ] + ] + } + ], + "timestamp": "2026-03-12T11:09:07.400602619", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 paired-end [fastq] - stub": { + "content": [ + { + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_fastqe": [ + [ + "FASTQE", + "fastqe", + "0.5.2" + ] + ] + } + ], + "timestamp": "2026-03-12T11:09:20.554751488", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 single-end [fastq]": { + "content": [ + { + "tsv": [ + [ + { + "id": "test", + "single_end": true + }, + "test.tsv:md5,16d66ef19b5f2694aaeae9c3727c3a61" + ] + ], + "versions_fastqe": [ + [ + "FASTQE", + "fastqe", + "0.5.2" + ] + ] + } + ], + "timestamp": "2026-03-12T11:08:59.143670896", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test b/modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test new file mode 100644 index 00000000..99012d73 --- /dev/null +++ b/modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test @@ -0,0 +1,120 @@ +nextflow_process { + + name "Test Process FASTQSCREEN_FASTQSCREEN" + script "../main.nf" + process "FASTQSCREEN_FASTQSCREEN" + + tag "modules" + tag "modules_nfcore" + tag "bowtie2/build" + tag "fastqscreen" + tag "fastqscreen/buildfromindex" + tag "fastqscreen/fastqscreen" + tag "buildfromindex" + tag "modules_fastqscreen" + + setup { + + run("BOWTIE2_BUILD") { + script "../../../bowtie2/build/main.nf" + process { + """ + input[0] = channel.of([ + [id: "sarscov2"], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ], [ + [id: "human"], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) + ]) + """ + } + } + + run("FASTQSCREEN_BUILDFROMINDEX") { + script "../../../fastqscreen/buildfromindex/main.nf" + process { + """ + input[0] = BOWTIE2_BUILD.out.index.map{meta, index -> meta.id}.collect() + input[1] = BOWTIE2_BUILD.out.index.map{meta, index -> index}.collect() + """ + } + } + } + + test("sarscov2 - human") { + + 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] = FASTQSCREEN_BUILDFROMINDEX.out.database + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.txt[0][1]).name, + file(process.out.png[0][1]).name, + file(process.out.html[0][1]).name, + process.out.findAll { key, val -> key.startsWith("versions")} + ).match() } + ) + } + } + + test("sarscov2 - human - tags") { + config './nextflow.config' + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], + [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ] + input[1] = FASTQSCREEN_BUILDFROMINDEX.out.database + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.txt, + process.out.fastq, + path(process.out.html[0][1]).readLines()[0..10], + file(process.out.png[0][1]).name + ).match() } + ) + } + } + + test("sarscov2 - human - 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] = FASTQSCREEN_BUILDFROMINDEX.out.database + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } +} diff --git a/modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test.snap b/modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test.snap new file mode 100644 index 00000000..a07c36c8 --- /dev/null +++ b/modules/nf-core/fastqscreen/fastqscreen/tests/main.nf.test.snap @@ -0,0 +1,115 @@ +{ + "sarscov2 - human": { + "content": [ + "test_1_screen.txt", + "test_1_screen.png", + "test_1_screen.html", + { + "versions_fastqscreen": [ + [ + "FASTQSCREEN_FASTQSCREEN", + "fastqscreen", + "0.16.0" + ] + ] + } + ], + "timestamp": "2026-02-19T14:07:14.82793136", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "sarscov2 - human - tags": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test_1_screen.txt:md5,7c0e31428663cce39b49f50cff70b02d" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.tagged.fastq.gz:md5,f742b162c43ce28f80b89608d5c47f3d", + "test_1.tagged_filter.fastq.gz:md5,28527a76bb0bb3fce0ee76afe01e90aa" + ] + ] + ], + [ + "", + "", + "", + "", + "", + "", + "\t", + "\tFastQ Screen Processing Report - test_1.fastq.gz", + "\t