From 66715b50152550feaedad92a8dfe287accf6c747 Mon Sep 17 00:00:00 2001 From: Lara Ianov Date: Thu, 12 Mar 2026 18:35:31 -0500 Subject: [PATCH 1/8] updated all modules and subworkflows, mostly for syntax needs --- modules.json | 60 +- .../nf-core/bamtools/split/environment.yml | 4 +- modules/nf-core/bamtools/split/main.nf | 15 +- modules/nf-core/bamtools/split/meta.yml | 68 +- .../nf-core/bamtools/split/tests/main.nf.test | 81 + .../bamtools/split/tests/main.nf.test.snap | 143 ++ .../bamtools/split/tests/nextflow.config | 5 + modules/nf-core/cat/cat/environment.yml | 6 +- modules/nf-core/cat/cat/main.nf | 11 +- modules/nf-core/cat/cat/meta.yml | 61 +- modules/nf-core/cat/cat/tests/main.nf.test | 76 +- .../nf-core/cat/cat/tests/main.nf.test.snap | 274 +++- modules/nf-core/cat/cat/tests/nextflow.config | 6 + .../cat/tests/nextflow_unzipped_zipped.config | 6 - .../cat/tests/nextflow_zipped_unzipped.config | 8 - modules/nf-core/cat/cat/tests/tags.yml | 2 - modules/nf-core/cat/fastq/environment.yml | 11 +- modules/nf-core/cat/fastq/main.nf | 78 +- modules/nf-core/cat/fastq/meta.yml | 71 +- modules/nf-core/cat/fastq/tests/main.nf.test | 295 +++- .../nf-core/cat/fastq/tests/main.nf.test.snap | 477 +++++- modules/nf-core/cat/fastq/tests/tags.yml | 2 - .../dumpsoftwareversions/environment.yml | 6 +- .../custom/dumpsoftwareversions/main.nf | 14 +- .../custom/dumpsoftwareversions/meta.yml | 42 +- .../templates/dumpsoftwareversions.py | 6 +- .../dumpsoftwareversions/tests/main.nf.test | 8 +- .../tests/main.nf.test.snap | 16 +- .../dumpsoftwareversions/tests/tags.yml | 2 - modules/nf-core/fastqc/environment.yml | 2 + modules/nf-core/fastqc/main.nf | 20 +- modules/nf-core/fastqc/meta.yml | 62 +- modules/nf-core/fastqc/tests/main.nf.test | 12 +- .../nf-core/fastqc/tests/main.nf.test.snap | 228 ++- .../nf-core/minimap2/align/environment.yml | 10 +- modules/nf-core/minimap2/align/main.nf | 40 +- modules/nf-core/minimap2/align/meta.yml | 116 +- .../nf-core/minimap2/align/tests/main.nf.test | 14 +- .../minimap2/align/tests/main.nf.test.snap | 232 ++- modules/nf-core/minimap2/align/tests/tags.yml | 2 - .../nf-core/minimap2/index/environment.yml | 6 +- modules/nf-core/minimap2/index/main.nf | 16 +- modules/nf-core/minimap2/index/meta.yml | 68 +- .../minimap2/index/minimap2-index.diff | 7 +- .../nf-core/minimap2/index/tests/main.nf.test | 24 +- .../minimap2/index/tests/main.nf.test.snap | 52 +- modules/nf-core/minimap2/index/tests/tags.yml | 2 - modules/nf-core/multiqc/environment.yml | 4 +- modules/nf-core/multiqc/main.nf | 51 +- modules/nf-core/multiqc/meta.yml | 103 +- .../multiqc/tests/custom_prefix.config | 5 + modules/nf-core/multiqc/tests/main.nf.test | 133 +- .../nf-core/multiqc/tests/main.nf.test.snap | 137 +- modules/nf-core/multiqc/tests/tags.yml | 2 - modules/nf-core/nanocomp/environment.yml | 2 +- modules/nf-core/nanocomp/main.nf | 67 +- modules/nf-core/nanocomp/meta.yml | 164 +- modules/nf-core/nanocomp/nanocomp.diff | 2 +- .../nf-core/nanocomp/tests/main.nf.test.snap | 26 +- modules/nf-core/nanoplot/environment.yml | 6 +- modules/nf-core/nanoplot/main.nf | 19 +- modules/nf-core/nanoplot/meta.yml | 90 +- modules/nf-core/nanoplot/tests/main.nf.test | 43 +- .../nf-core/nanoplot/tests/main.nf.test.snap | 78 +- .../picard/markduplicates/environment.yml | 5 +- modules/nf-core/picard/markduplicates/main.nf | 55 +- .../nf-core/picard/markduplicates/meta.yml | 49 +- .../picard/markduplicates/tests/main.nf.test | 12 +- .../markduplicates/tests/main.nf.test.snap | 207 +-- .../markduplicates/tests/nextflow.config | 2 +- .../picard/markduplicates/tests/tags.yml | 2 - modules/nf-core/pigz/compress/environment.yml | 4 +- modules/nf-core/pigz/compress/main.nf | 13 +- modules/nf-core/pigz/compress/meta.yml | 73 +- .../nf-core/pigz/compress/tests/main.nf.test | 10 +- .../pigz/compress/tests/main.nf.test.snap | 55 +- modules/nf-core/pigz/compress/tests/tags.yml | 2 - modules/nf-core/pigz/uncompress/main.nf | 8 +- modules/nf-core/pigz/uncompress/meta.yml | 57 +- .../pigz/uncompress/tests/main.nf.test | 27 +- .../pigz/uncompress/tests/main.nf.test.snap | 43 +- .../nf-core/pigz/uncompress/tests/tags.yml | 2 - .../rseqc/readdistribution/environment.yml | 8 +- .../nf-core/rseqc/readdistribution/main.nf | 18 +- .../nf-core/rseqc/readdistribution/meta.yml | 68 +- .../rseqc/readdistribution/tests/main.nf.test | 32 +- .../readdistribution/tests/main.nf.test.snap | 63 +- .../rseqc/readdistribution/tests/tags.yml | 2 - .../nf-core/samtools/faidx/environment.yml | 12 +- modules/nf-core/samtools/faidx/main.nf | 29 +- modules/nf-core/samtools/faidx/meta.yml | 133 +- .../nf-core/samtools/faidx/tests/main.nf.test | 210 ++- .../samtools/faidx/tests/main.nf.test.snap | 301 ++-- .../samtools/faidx/tests/nextflow.config | 2 +- .../samtools/faidx/tests/nextflow2.config | 6 - modules/nf-core/samtools/faidx/tests/tags.yml | 2 - .../nf-core/samtools/flagstat/environment.yml | 10 +- modules/nf-core/samtools/flagstat/main.nf | 31 +- modules/nf-core/samtools/flagstat/meta.yml | 80 +- .../samtools/flagstat/tests/main.nf.test | 28 +- .../samtools/flagstat/tests/main.nf.test.snap | 94 +- .../nf-core/samtools/flagstat/tests/tags.yml | 2 - .../nf-core/samtools/idxstats/environment.yml | 10 +- modules/nf-core/samtools/idxstats/main.nf | 18 +- modules/nf-core/samtools/idxstats/meta.yml | 77 +- .../samtools/idxstats/tests/main.nf.test | 35 +- .../samtools/idxstats/tests/main.nf.test.snap | 46 +- .../nf-core/samtools/idxstats/tests/tags.yml | 2 - .../nf-core/samtools/index/environment.yml | 10 +- modules/nf-core/samtools/index/main.nf | 25 +- modules/nf-core/samtools/index/meta.yml | 97 +- .../nf-core/samtools/index/tests/main.nf.test | 102 +- .../samtools/index/tests/main.nf.test.snap | 142 +- modules/nf-core/samtools/index/tests/tags.yml | 2 - .../nf-core/samtools/merge/environment.yml | 10 +- modules/nf-core/samtools/merge/main.nf | 23 +- modules/nf-core/samtools/merge/meta.yml | 161 +- .../nf-core/samtools/merge/tests/index.config | 3 - .../nf-core/samtools/merge/tests/main.nf.test | 208 ++- .../samtools/merge/tests/main.nf.test.snap | 392 +++-- .../samtools/merge/tests/nextflow.config | 5 + modules/nf-core/samtools/merge/tests/tags.yml | 2 - modules/nf-core/samtools/sort/environment.yml | 10 +- modules/nf-core/samtools/sort/main.nf | 63 +- modules/nf-core/samtools/sort/meta.yml | 159 +- .../nf-core/samtools/sort/tests/main.nf.test | 256 ++- .../samtools/sort/tests/main.nf.test.snap | 358 +++-- .../samtools/sort/tests/nextflow.config | 1 - .../samtools/sort/tests/nextflow_cram.config | 8 + modules/nf-core/samtools/sort/tests/tags.yml | 3 - .../nf-core/samtools/stats/environment.yml | 10 +- modules/nf-core/samtools/stats/main.nf | 21 +- modules/nf-core/samtools/stats/meta.yml | 95 +- .../nf-core/samtools/stats/tests/main.nf.test | 60 +- .../samtools/stats/tests/main.nf.test.snap | 134 +- modules/nf-core/samtools/stats/tests/tags.yml | 2 - modules/nf-core/samtools/view/environment.yml | 10 +- modules/nf-core/samtools/view/main.nf | 95 +- modules/nf-core/samtools/view/meta.yml | 205 ++- .../nf-core/samtools/view/tests/bam.config | 3 - .../samtools/view/tests/bam_index.config | 3 - .../nf-core/samtools/view/tests/main.nf.test | 396 +++-- .../samtools/view/tests/main.nf.test.snap | 1431 +++++++++++------ .../samtools/view/tests/nextflow.config | 5 + modules/nf-core/samtools/view/tests/tags.yml | 2 - modules/nf-core/toulligqc/environment.yml | 10 +- modules/nf-core/toulligqc/main.nf | 53 +- modules/nf-core/toulligqc/meta.yml | 127 +- modules/nf-core/toulligqc/tests/main.nf.test | 61 +- .../nf-core/toulligqc/tests/main.nf.test.snap | 136 +- modules/nf-core/toulligqc/tests/tags.yml | 2 - .../nf-core/umitools/dedup/environment.yml | 12 +- modules/nf-core/umitools/dedup/main.nf | 21 +- modules/nf-core/umitools/dedup/meta.yml | 65 +- .../nf-core/umitools/dedup/tests/main.nf.test | 6 +- .../umitools/dedup/tests/main.nf.test.snap | 54 +- modules/nf-core/umitools/dedup/tests/tags.yml | 2 - modules/nf-core/unzipfiles/meta.yml | 18 +- modules/nf-core/unzipfiles/tests/tags.yml | 2 - .../nf-core/bam_sort_stats_samtools/main.nf | 10 +- .../tests/main.nf.test | 74 +- .../tests/main.nf.test.snap | 286 +++- .../bam_sort_stats_samtools/tests/tags.yml | 2 - .../nf-core/bam_stats_samtools/main.nf | 7 - .../bam_stats_samtools/tests/main.nf.test | 113 +- .../tests/main.nf.test.snap | 307 +++- .../nf-core/bam_stats_samtools/tests/tags.yml | 2 - .../utils_nextflow_pipeline/tests/tags.yml | 2 - .../nf-core/utils_nfcore_pipeline/main.nf | 66 +- .../{main.workflow.nf.test => main.nf.test} | 0 ...orkflow.nf.test.snap => main.nf.test.snap} | 0 .../utils_nfcore_pipeline/tests/tags.yml | 2 - .../nf-core/utils_nfschema_plugin/main.nf | 41 +- .../utils_nfschema_plugin/tests/main.nf.test | 56 + .../tests/nextflow.config | 4 +- 175 files changed, 8099 insertions(+), 3598 deletions(-) create mode 100644 modules/nf-core/bamtools/split/tests/main.nf.test create mode 100644 modules/nf-core/bamtools/split/tests/main.nf.test.snap create mode 100644 modules/nf-core/bamtools/split/tests/nextflow.config create mode 100644 modules/nf-core/cat/cat/tests/nextflow.config delete mode 100644 modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config delete mode 100644 modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config delete mode 100644 modules/nf-core/cat/cat/tests/tags.yml delete mode 100644 modules/nf-core/cat/fastq/tests/tags.yml delete mode 100644 modules/nf-core/custom/dumpsoftwareversions/tests/tags.yml delete mode 100644 modules/nf-core/minimap2/align/tests/tags.yml delete mode 100644 modules/nf-core/minimap2/index/tests/tags.yml create mode 100644 modules/nf-core/multiqc/tests/custom_prefix.config delete mode 100644 modules/nf-core/multiqc/tests/tags.yml delete mode 100644 modules/nf-core/picard/markduplicates/tests/tags.yml delete mode 100644 modules/nf-core/pigz/compress/tests/tags.yml delete mode 100644 modules/nf-core/pigz/uncompress/tests/tags.yml delete mode 100644 modules/nf-core/rseqc/readdistribution/tests/tags.yml delete mode 100644 modules/nf-core/samtools/faidx/tests/nextflow2.config delete mode 100644 modules/nf-core/samtools/faidx/tests/tags.yml delete mode 100644 modules/nf-core/samtools/flagstat/tests/tags.yml delete mode 100644 modules/nf-core/samtools/idxstats/tests/tags.yml delete mode 100644 modules/nf-core/samtools/index/tests/tags.yml delete mode 100644 modules/nf-core/samtools/merge/tests/index.config create mode 100644 modules/nf-core/samtools/merge/tests/nextflow.config delete mode 100644 modules/nf-core/samtools/merge/tests/tags.yml create mode 100644 modules/nf-core/samtools/sort/tests/nextflow_cram.config delete mode 100644 modules/nf-core/samtools/sort/tests/tags.yml delete mode 100644 modules/nf-core/samtools/stats/tests/tags.yml delete mode 100644 modules/nf-core/samtools/view/tests/bam.config delete mode 100644 modules/nf-core/samtools/view/tests/bam_index.config create mode 100644 modules/nf-core/samtools/view/tests/nextflow.config delete mode 100644 modules/nf-core/samtools/view/tests/tags.yml delete mode 100644 modules/nf-core/toulligqc/tests/tags.yml delete mode 100644 modules/nf-core/umitools/dedup/tests/tags.yml delete mode 100644 modules/nf-core/unzipfiles/tests/tags.yml delete mode 100644 subworkflows/nf-core/bam_sort_stats_samtools/tests/tags.yml delete mode 100644 subworkflows/nf-core/bam_stats_samtools/tests/tags.yml delete mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml rename subworkflows/nf-core/utils_nfcore_pipeline/tests/{main.workflow.nf.test => main.nf.test} (100%) rename subworkflows/nf-core/utils_nfcore_pipeline/tests/{main.workflow.nf.test.snap => main.nf.test.snap} (100%) delete mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml diff --git a/modules.json b/modules.json index bfbd1568..a67b9876 100644 --- a/modules.json +++ b/modules.json @@ -7,134 +7,134 @@ "nf-core": { "bamtools/split": { "branch": "master", - "git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5", + "git_sha": "8c8ee20d5b87647b24df0c95296b2a9854a139aa", "installed_by": ["modules"] }, "cat/cat": { "branch": "master", - "git_sha": "9437e6053dccf4aafa022bfd6e7e9de67e625af8", + "git_sha": "7ed72ef972290b93d0bdd7c60ff00a693250f77a", "installed_by": ["modules"] }, "cat/fastq": { "branch": "master", - "git_sha": "0997b47c93c06b49aa7b3fefda87e728312cf2ca", + "git_sha": "5d28ea7cfaebcfae6f74d1067ea766d8ff19dff3", "installed_by": ["modules"], "patch": "modules/nf-core/cat/fastq/cat-fastq.diff" }, "custom/dumpsoftwareversions": { "branch": "master", - "git_sha": "de45447d060b8c8b98575bc637a4a575fd0638e1", + "git_sha": "ad65d06c959cff1da9e94c4a972deaf7430931fa", "installed_by": ["modules"] }, "fastqc": { "branch": "master", - "git_sha": "dc94b6ee04a05ddb9f7ae050712ff30a13149164", + "git_sha": "3009f27c4e4b6e99da4eeebe82799e13924a4a1f", "installed_by": ["modules"] }, "minimap2/align": { "branch": "master", - "git_sha": "a33ef9475558c6b8da08c5f522ddaca1ec810306", + "git_sha": "5c9f8d5b7671237c906abadc9ff732b301ca15ca", "installed_by": ["modules"] }, "minimap2/index": { "branch": "master", - "git_sha": "72e277acfd9e61a9f1368eafb4a9e83f5bcaa9f5", + "git_sha": "14980f759266eec42dac401fcafeb83d6c957b41", "installed_by": ["modules"], "patch": "modules/nf-core/minimap2/index/minimap2-index.diff" }, "multiqc": { "branch": "master", - "git_sha": "f0719ae309075ae4a291533883847c3f7c441dad", + "git_sha": "2c73cc8fa92cf48de3da0b643fdf357a8a290b36", "installed_by": ["modules"] }, "nanocomp": { "branch": "master", - "git_sha": "f0c766af7e897ecf52c13f5424426f06d221194b", + "git_sha": "2956d489fac13be1b7c8d54effd766a1965cd3de", "installed_by": ["modules"], "patch": "modules/nf-core/nanocomp/nanocomp.diff" }, "nanoplot": { "branch": "master", - "git_sha": "a31407dfaf0cb0d04768d5cb439fc6f4523a6981", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["modules"], "patch": "modules/nf-core/nanoplot/nanoplot.diff" }, "picard/markduplicates": { "branch": "master", - "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", + "git_sha": "a631e12055f6c23ba2c942d3902b3ed1b9eed859", "installed_by": ["modules"] }, "pigz/compress": { "branch": "master", - "git_sha": "c00055a0b13d622b4f1f51a8e5be31deaf99ded7", + "git_sha": "c908ccaf0a5c802b6f8e814d8c5cf85da2364222", "installed_by": ["modules"] }, "pigz/uncompress": { "branch": "master", - "git_sha": "c00055a0b13d622b4f1f51a8e5be31deaf99ded7", + "git_sha": "f84336b7fa91a65aa61d215b8c109fbb8e4b4ac6", "installed_by": ["modules"], "patch": "modules/nf-core/pigz/uncompress/pigz-uncompress.diff" }, "rseqc/readdistribution": { "branch": "master", - "git_sha": "6c7d8f1d6247655e4bc4d97f37b68b2461f645f6", + "git_sha": "eed5d14302a6c9070dcc25feeab707a27a4b3254", "installed_by": ["modules"] }, "samtools/faidx": { "branch": "master", - "git_sha": "aeb02a39d4c463598bfdcb2d964dbb7acbcf1298", + "git_sha": "b2e78932ef01165fd85829513eaca29eff8e640a", "installed_by": ["modules"] }, "samtools/flagstat": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", "installed_by": ["bam_stats_samtools"] }, "samtools/idxstats": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", "installed_by": ["bam_stats_samtools"] }, "samtools/index": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", "installed_by": ["bam_sort_stats_samtools"] }, "samtools/merge": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "440edf75d8782913115a7b72a88392a227f72cc1", "installed_by": ["modules"] }, "samtools/sort": { "branch": "master", - "git_sha": "4352dbdb09ec40db71e9b172b97a01dcf5622c26", + "git_sha": "5cb9a8694da0a0e550921636bb60bc8c56445fd7", "installed_by": ["bam_sort_stats_samtools"] }, "samtools/stats": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "fe93fde0845f907fc91ad7cc7d797930408824df", "installed_by": ["bam_stats_samtools"] }, "samtools/view": { "branch": "master", - "git_sha": "0bd7d2333a88483aa0476acea172e9f5f6dd83bb", + "git_sha": "b2e78932ef01165fd85829513eaca29eff8e640a", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/view/samtools-view.diff" }, "toulligqc": { "branch": "master", - "git_sha": "061a322293b3487e53f044304710e54cbf657717", + "git_sha": "d9137377f4dd6246242829772eb1949b96de1ef0", "installed_by": ["modules"], "patch": "modules/nf-core/toulligqc/toulligqc.diff" }, "umitools/dedup": { "branch": "master", - "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", + "git_sha": "bd6d730b3f32742f402189113ba9480006a3350f", "installed_by": ["modules"] }, "unzipfiles": { "branch": "master", - "git_sha": "81880787133db07d9b4c1febd152c090eb8325dc", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] } } @@ -143,27 +143,27 @@ "nf-core": { "bam_sort_stats_samtools": { "branch": "master", - "git_sha": "4352dbdb09ec40db71e9b172b97a01dcf5622c26", + "git_sha": "7ac6cbe7c17c2dad685da7f70496c8f48ea48687", "installed_by": ["subworkflows"] }, "bam_stats_samtools": { "branch": "master", - "git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62", + "git_sha": "7ac6cbe7c17c2dad685da7f70496c8f48ea48687", "installed_by": ["bam_sort_stats_samtools"] }, "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "c2b22d85f30a706a3073387f30380704fcae013b", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "1b89f75f1aa2021ec3360d0deccd0f6e97240551", + "git_sha": "f0b535b3ae20080f8db03dd5388876ad1ec29d70", "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", "installed_by": ["subworkflows"] } } diff --git a/modules/nf-core/bamtools/split/environment.yml b/modules/nf-core/bamtools/split/environment.yml index 995d25ee..5ee33607 100644 --- a/modules/nf-core/bamtools/split/environment.yml +++ b/modules/nf-core/bamtools/split/environment.yml @@ -1,7 +1,7 @@ -name: bamtools_split +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - bioconda::bamtools=2.5.2 diff --git a/modules/nf-core/bamtools/split/main.nf b/modules/nf-core/bamtools/split/main.nf index 7c36501c..e26c4688 100644 --- a/modules/nf-core/bamtools/split/main.nf +++ b/modules/nf-core/bamtools/split/main.nf @@ -12,7 +12,7 @@ process BAMTOOLS_SPLIT { output: tuple val(meta), path("*.bam"), emit: bam - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bamtools'), eval("bamtools --version | sed '2!d;s/bamtools //g'"), emit: versions_bamtools, topic: versions when: task.ext.when == null || task.ext.when @@ -20,7 +20,7 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_list = bam.collect{"-in $it"}.join(' ') + def input_list = bam.collect{ bam_file -> "-in ${bam_file}"}.join(' ') """ bamtools \\ merge \\ @@ -29,10 +29,13 @@ process BAMTOOLS_SPLIT { split \\ -stub $prefix \\ $args + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bamtools: \$( bamtools --version | grep -e 'bamtools' | sed 's/^.*bamtools //' ) - END_VERSIONS + stub: + def prefix = task.ext.prefix ?: "${meta.id}" """ + touch ${prefix}.split1.bam + touch ${prefix}.unmapped.bam + """ + } diff --git a/modules/nf-core/bamtools/split/meta.yml b/modules/nf-core/bamtools/split/meta.yml index e42242bb..921c7401 100644 --- a/modules/nf-core/bamtools/split/meta.yml +++ b/modules/nf-core/bamtools/split/meta.yml @@ -1,5 +1,6 @@ name: bamtools_split -description: BamTools provides both a programmer's API and an end-user's toolkit for handling BAM files. +description: BamTools provides both a programmer's API and an end-user's toolkit for + handling BAM files. keywords: - bamtools - bamtools/split @@ -13,33 +14,54 @@ tools: documentation: https://github.com/pezmaster31/bamtools/wiki tool_dev_url: http://github.com/pezmaster31/bamtools licence: ["MIT"] + identifier: biotools:bamtools input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - bam: - type: file - description: A list of one or more BAM files to merge and then split - pattern: "*.bam" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: A list of one or more BAM files to merge and then split + pattern: "*.bam" + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - bam: - type: file - description: Several Bam files - pattern: "*.bam" + bam: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.bam": + type: file + description: Several Bam files + pattern: "*.bam" + ontologies: [] + versions_bamtools: + - - "${task.process}": + type: string + description: The name of the process + - bamtools: + type: string + description: The name of the tool + - "bamtools --version | sed '2!d;s/bamtools //g'": + type: eval + description: The expression to obtain the version of the tool authors: - "@sguizard" - "@matthdsm" maintainers: - "@sguizard" - "@matthdsm" +topics: + versions: + - - "${task.process}": + type: string + description: The name of the process + - bamtools: + type: string + description: The name of the tool + - "bamtools --version | sed '2!d;s/bamtools //g'": + type: eval + description: The expression to obtain the version of the tool diff --git a/modules/nf-core/bamtools/split/tests/main.nf.test b/modules/nf-core/bamtools/split/tests/main.nf.test new file mode 100644 index 00000000..9407cb35 --- /dev/null +++ b/modules/nf-core/bamtools/split/tests/main.nf.test @@ -0,0 +1,81 @@ +nextflow_process { + + name "Test Process BAMTOOLS_SPLIT" + script "../main.nf" + process "BAMTOOLS_SPLIT" + + tag "modules" + tag "modules_nfcore" + tag "bamtools" + tag "bamtools/split" + + config "./nextflow.config" + test("single_bam") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("two_bams") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("single_bam - stub") { + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bamtools/split/tests/main.nf.test.snap b/modules/nf-core/bamtools/split/tests/main.nf.test.snap new file mode 100644 index 00000000..0706cb42 --- /dev/null +++ b/modules/nf-core/bamtools/split/tests/main.nf.test.snap @@ -0,0 +1,143 @@ +{ + "two_bams": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test.REF_chr22.bam:md5,b7dc50e0edf9c6bfc2e3b0e6d074dc07", + "test.REF_unmapped.bam:md5,e0754bf72c51543b2d745d96537035fb" + ] + ] + ], + "1": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + [ + "test.REF_chr22.bam:md5,b7dc50e0edf9c6bfc2e3b0e6d074dc07", + "test.REF_unmapped.bam:md5,e0754bf72c51543b2d745d96537035fb" + ] + ] + ], + "versions_bamtools": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ] + } + ], + "timestamp": "2026-03-11T18:54:32.314097039", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "single_bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test.split1.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.unmapped.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + [ + "test.split1.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.unmapped.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions_bamtools": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ] + } + ], + "timestamp": "2026-03-11T18:54:44.733616549", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + }, + "single_bam": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "test.REF_chr22.bam:md5,b7dc50e0edf9c6bfc2e3b0e6d074dc07", + "test.REF_unmapped.bam:md5,e0754bf72c51543b2d745d96537035fb" + ] + ] + ], + "1": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ], + "bam": [ + [ + { + "id": "test" + }, + [ + "test.REF_chr22.bam:md5,b7dc50e0edf9c6bfc2e3b0e6d074dc07", + "test.REF_unmapped.bam:md5,e0754bf72c51543b2d745d96537035fb" + ] + ] + ], + "versions_bamtools": [ + [ + "BAMTOOLS_SPLIT", + "bamtools", + "2.5.2" + ] + ] + } + ], + "timestamp": "2026-03-11T18:54:19.303851983", + "meta": { + "nf-test": "0.9.4", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/bamtools/split/tests/nextflow.config b/modules/nf-core/bamtools/split/tests/nextflow.config new file mode 100644 index 00000000..abaed7eb --- /dev/null +++ b/modules/nf-core/bamtools/split/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: BAMTOOLS_SPLIT { + ext.args = '-reference' + } +} diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml index 17a04ef2..98511769 100644 --- a/modules/nf-core/cat/cat/environment.yml +++ b/modules/nf-core/cat/cat/environment.yml @@ -1,7 +1,7 @@ -name: cat_cat +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - conda-forge::pigz=2.3.4 + - conda-forge::pigz=2.8 diff --git a/modules/nf-core/cat/cat/main.nf b/modules/nf-core/cat/cat/main.nf index adbdbd7b..15274c4c 100644 --- a/modules/nf-core/cat/cat/main.nf +++ b/modules/nf-core/cat/cat/main.nf @@ -4,15 +4,15 @@ process CAT_CAT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pigz:2.3.4' : - 'biocontainers/pigz:2.3.4' }" + 'https://depot.galaxyproject.org/singularity/pigz:2.8' : + 'biocontainers/pigz:2.8' }" input: tuple val(meta), path(files_in) output: tuple val(meta), path("${prefix}"), emit: file_out - path "versions.yml" , emit: versions + tuple val("${task.process}"), val("pigz"), eval("pigz --version 2>&1 | sed 's/pigz //g'"), topic: versions, emit: versions_cat when: task.ext.when == null || task.ext.when @@ -20,7 +20,7 @@ process CAT_CAT { script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' - def file_list = files_in.collect { it.toString() } + def file_list = files_in.collect { file -> file.toString() } // choose appropriate concatenation tool depending on input and output format @@ -55,7 +55,7 @@ process CAT_CAT { """ stub: - def file_list = files_in.collect { it.toString() } + def file_list = files_in.collect { file -> file.toString() } prefix = task.ext.prefix ?: "${meta.id}${file_list[0].substring(file_list[0].lastIndexOf('.'))}" if(file_list.contains(prefix.trim())) { error "The name of the input file can't be the same as for the output prefix in the " + @@ -76,4 +76,3 @@ def getFileSuffix(filename) { def match = filename =~ /^.*?((\.\w{1,5})?(\.\w{1,5}\.gz$))/ return match ? match[0][1] : filename.substring(filename.lastIndexOf('.')) } - diff --git a/modules/nf-core/cat/cat/meta.yml b/modules/nf-core/cat/cat/meta.yml index 00a8db0b..36a7359b 100644 --- a/modules/nf-core/cat/cat/meta.yml +++ b/modules/nf-core/cat/cat/meta.yml @@ -9,25 +9,52 @@ tools: description: Just concatenation documentation: https://man7.org/linux/man-pages/man1/cat.1.html licence: ["GPL-3.0-or-later"] + identifier: "" input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - files_in: - type: file - description: List of compressed / uncompressed files - pattern: "*" + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - files_in: + type: file + description: List of compressed / uncompressed files + pattern: "*" + ontologies: [] output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - file_out: - type: file - description: Concatenated file. Will be gzipped if file_out ends with ".gz" - pattern: "${file_out}" + file_out: + - - meta: + type: map + description: Groovy Map containing sample information + - ${prefix}: + type: file + description: Concatenated file. Will be gzipped if file_out ends with + ".gz" + pattern: "${file_out}" + ontologies: [] + versions_cat: + - - ${task.process}: + type: string + description: The name of the process + - pigz: + type: string + description: The name of the tool + - "pigz --version 2>&1 | sed 's/pigz //g'": + type: eval + description: The expression to obtain the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - pigz: + type: string + description: The name of the tool + - "pigz --version 2>&1 | sed 's/pigz //g'": + type: eval + description: The expression to obtain the version of the tool + authors: - "@erikrikarddaniel" - "@FriederikeHanssen" diff --git a/modules/nf-core/cat/cat/tests/main.nf.test b/modules/nf-core/cat/cat/tests/main.nf.test index fcee2d19..030c6649 100644 --- a/modules/nf-core/cat/cat/tests/main.nf.test +++ b/modules/nf-core/cat/cat/tests/main.nf.test @@ -3,16 +3,14 @@ nextflow_process { name "Test Process CAT_CAT" script "../main.nf" process "CAT_CAT" + tag "modules" tag "modules_nfcore" tag "cat" tag "cat/cat" - test("test_cat_name_conflict") { + test("sarscov2 - genome - error: name conflict") { when { - params { - outdir = "${outputDir}" - } process { """ input[0] = @@ -29,16 +27,14 @@ nextflow_process { then { assertAll( { assert !process.success }, - { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") } + { assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") }, + { assert snapshot(process.out).match() } ) } } - test("test_cat_unzipped_unzipped") { + test("sarscov2 - [ fasta, sizes ] - unzipped") { when { - params { - outdir = "${outputDir}" - } process { """ input[0] = @@ -61,11 +57,8 @@ nextflow_process { } - test("test_cat_zipped_zipped") { + test("sarscov2 - [ gff3_gz, maf_gz ] - zipped") { when { - params { - outdir = "${outputDir}" - } process { """ input[0] = @@ -80,21 +73,20 @@ nextflow_process { } } then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_zipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_zipped_zipped_size")} + { assert snapshot(process.out).match() + } ) } } - test("test_cat_zipped_unzipped") { - config './nextflow_zipped_unzipped.config' + test("sarscov2 - [ gff3_gz, maf_gz ] - unzipped") { + config './nextflow.config' when { params { - outdir = "${outputDir}" + cat_prefix = "cat.txt" } process { """ @@ -119,11 +111,12 @@ nextflow_process { } - test("test_cat_unzipped_zipped") { - config './nextflow_unzipped_zipped.config' + test("sarscov2 - [ fasta, sizes ] - zipped") { + config './nextflow.config' + when { params { - outdir = "${outputDir}" + cat_prefix = "cat.txt.gz" } process { """ @@ -139,21 +132,44 @@ nextflow_process { } } then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_unzipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_unzipped_zipped_size")} + { assert snapshot(process.out).match() } ) } } - test("test_cat_one_file_unzipped_zipped") { - config './nextflow_unzipped_zipped.config' + test("sarscov2 - fasta - zipped") { + config './nextflow.config' + when { params { - outdir = "${outputDir}" + cat_prefix = "cat.txt.gz" + } + process { + """ + input[0] = + [ + [ id:'test', single_end:true ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + ] + """ } + } + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 - fasta - unzipped - stub") { + options "-stub" + + when { process { """ input[0] = @@ -167,11 +183,9 @@ nextflow_process { } } then { - def lines = path(process.out.file_out.get(0).get(1)).linesGzip assertAll( { assert process.success }, - { assert snapshot(lines[0..5]).match("test_cat_one_file_unzipped_zipped_lines") }, - { assert snapshot(lines.size()).match("test_cat_one_file_unzipped_zipped_size")} + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/cat/cat/tests/main.nf.test.snap b/modules/nf-core/cat/cat/tests/main.nf.test.snap index 423571ba..5b4e4cc3 100644 --- a/modules/nf-core/cat/cat/tests/main.nf.test.snap +++ b/modules/nf-core/cat/cat/tests/main.nf.test.snap @@ -1,11 +1,5 @@ { - "test_cat_unzipped_zipped_size": { - "content": [ - 375 - ], - "timestamp": "2023-10-16T14:33:08.049445686" - }, - "test_cat_unzipped_unzipped": { + "sarscov2 - [ gff3_gz, maf_gz ] - unzipped": { "content": [ { "0": [ @@ -14,11 +8,15 @@ "id": "test", "single_end": true }, - "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" + "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" ] ], "1": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + [ + "CAT_CAT", + "pigz", + "2.8" + ] ], "file_out": [ [ @@ -26,17 +24,25 @@ "id": "test", "single_end": true }, - "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" + "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" ] ], - "versions": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] ] } ], - "timestamp": "2023-10-16T14:32:18.500464399" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T09:08:31.479828" }, - "test_cat_zipped_unzipped": { + "sarscov2 - fasta - unzipped - stub": { "content": [ { "0": [ @@ -45,11 +51,15 @@ "id": "test", "single_end": true }, - "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + [ + "CAT_CAT", + "pigz", + "2.8" + ] ], "file_out": [ [ @@ -57,65 +67,217 @@ "id": "test", "single_end": true }, - "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,115ed6177ebcff24eb99d503fa5ef894" + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] ] } ], - "timestamp": "2023-10-16T14:32:49.642741302" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:16:28.118094" }, - "test_cat_zipped_zipped_lines": { + "sarscov2 - [ fasta, sizes ] - zipped": { "content": [ - [ - "MT192765.1\tGenbank\ttranscript\t259\t29667\t.\t+\t.\tID=unknown_transcript_1;geneID=orf1ab;gene_name=orf1ab", - "MT192765.1\tGenbank\tgene\t259\t21548\t.\t+\t.\tParent=unknown_transcript_1", - "MT192765.1\tGenbank\tCDS\t259\t13461\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1", - "MT192765.1\tGenbank\tCDS\t13461\t21548\t.\t+\t0\tParent=unknown_transcript_1;exception=\"ribosomal slippage\";gbkey=CDS;gene=orf1ab;note=\"pp1ab;translated=by -1 ribosomal frameshift\";product=\"orf1ab polyprotein\";protein_id=QIK50426.1", - "MT192765.1\tGenbank\tCDS\t21556\t25377\t.\t+\t0\tParent=unknown_transcript_1;gbkey=CDS;gene=S;note=\"structural protein\";product=\"surface glycoprotein\";protein_id=QIK50427.1", - "MT192765.1\tGenbank\tgene\t21556\t25377\t.\t+\t.\tParent=unknown_transcript_1" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt.gz:md5,f44b33a0e441ad58b2d3700270e2dbe2" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt.gz:md5,f44b33a0e441ad58b2d3700270e2dbe2" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } ], - "timestamp": "2023-10-16T14:32:33.629048645" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:15:56.529595" }, - "test_cat_unzipped_zipped_lines": { + "sarscov2 - genome - error: name conflict": { "content": [ - [ - ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", - "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT", - "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG", - "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", - "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", - "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" - ] + { + "0": [ + + ], + "1": [ + + ], + "file_out": [ + + ], + "versions_cat": [ + + ] + } ], - "timestamp": "2023-10-16T14:33:08.038830506" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:14:54.496538" }, - "test_cat_one_file_unzipped_zipped_lines": { + "sarscov2 - [ fasta, sizes ] - unzipped": { "content": [ - [ - ">MT192765.1 Severe acute respiratory syndrome coronavirus 2 isolate SARS-CoV-2/human/USA/PC00101P/2020, complete genome", - "GTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAAAATCTGT", - "GTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGGACACGAG", - "TAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTTTGTCCGG", - "GTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTT", - "ACAGGTTCGCGACGTGCTCGTACGTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAG" - ] + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fasta:md5,f44b33a0e441ad58b2d3700270e2dbe2" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } ], - "timestamp": "2023-10-16T14:33:21.39642399" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T11:26:29.942203" }, - "test_cat_zipped_zipped_size": { + "sarscov2 - [ gff3_gz, maf_gz ] - zipped": { "content": [ - 78 + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.gff3.gz:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "test.gff3.gz:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } ], - "timestamp": "2023-10-16T14:32:33.641869244" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T11:26:45.679401" }, - "test_cat_one_file_unzipped_zipped_size": { + "sarscov2 - fasta - zipped": { "content": [ - 374 + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt.gz:md5,6e9fe4042a72f2345f644f239272b7e6" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt.gz:md5,6e9fe4042a72f2345f644f239272b7e6" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } ], - "timestamp": "2023-10-16T14:33:21.4094373" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:16:12.439911" } } \ No newline at end of file diff --git a/modules/nf-core/cat/cat/tests/nextflow.config b/modules/nf-core/cat/cat/tests/nextflow.config new file mode 100644 index 00000000..5bc9bf50 --- /dev/null +++ b/modules/nf-core/cat/cat/tests/nextflow.config @@ -0,0 +1,6 @@ + +process { + withName: CAT_CAT { + ext.prefix = "${params.cat_prefix}" + } +} diff --git a/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config b/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config deleted file mode 100644 index ec26b0fd..00000000 --- a/modules/nf-core/cat/cat/tests/nextflow_unzipped_zipped.config +++ /dev/null @@ -1,6 +0,0 @@ - -process { - withName: CAT_CAT { - ext.prefix = 'cat.txt.gz' - } -} diff --git a/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config b/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config deleted file mode 100644 index fbc79783..00000000 --- a/modules/nf-core/cat/cat/tests/nextflow_zipped_unzipped.config +++ /dev/null @@ -1,8 +0,0 @@ - -process { - - withName: CAT_CAT { - ext.prefix = 'cat.txt' - } - -} diff --git a/modules/nf-core/cat/cat/tests/tags.yml b/modules/nf-core/cat/cat/tests/tags.yml deleted file mode 100644 index 37b578f5..00000000 --- a/modules/nf-core/cat/cat/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -cat/cat: - - modules/nf-core/cat/cat/** diff --git a/modules/nf-core/cat/fastq/environment.yml b/modules/nf-core/cat/fastq/environment.yml index 8c69b121..9b926b1f 100644 --- a/modules/nf-core/cat/fastq/environment.yml +++ b/modules/nf-core/cat/fastq/environment.yml @@ -1,7 +1,12 @@ -name: cat_fastq +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - conda-forge::coreutils=8.30 + - conda-forge::coreutils=9.5 + - conda-forge::grep=3.11 + - conda-forge::gzip=1.13 + - conda-forge::lbzip2=2.5 + - conda-forge::sed=4.8 + - conda-forge::tar=1.34 diff --git a/modules/nf-core/cat/fastq/main.nf b/modules/nf-core/cat/fastq/main.nf index d93005eb..e70af3d1 100644 --- a/modules/nf-core/cat/fastq/main.nf +++ b/modules/nf-core/cat/fastq/main.nf @@ -1,65 +1,69 @@ process CAT_FASTQ { - tag "$meta.id" + tag "${meta.id}" label 'process_single' conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : - 'nf-core/ubuntu:20.04' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/52/52ccce28d2ab928ab862e25aae26314d69c8e38bd41ca9431c67ef05221348aa/data' + : 'community.wave.seqera.io/library/coreutils_grep_gzip_lbzip2_pruned:838ba80435a629f8'}" input: tuple val(meta), path(reads, stageAs: "input*/*") output: tuple val(meta), path("*.merged.fastq.gz"), emit: reads - path "versions.yml" , emit: versions + tuple val("${task.process}"), val("cat"), eval("cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//'"), emit: versions_cat, topic: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def read_list_str = reads instanceof List ? reads.join(' ') : reads.toString() - def single_end_flag = meta.single_end ? '--single_end' : '' - - """ - cat_fastq.py \\ - --prefix ${prefix} \\ - ${single_end_flag} \\ - --reads ${read_list_str} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - python: \$(python --version | sed 's/Python //') - END_VERSIONS - """ + def readList = reads instanceof List ? reads.collect { item -> item.toString() } : [reads.toString()] + def compress = readList[0]?.endsWith('.gz') ? '' : '| gzip' + if (meta.single_end) { + if (readList.size >= 1) { + """ + cat ${readList.join(' ')} ${compress} > ${prefix}.merged.fastq.gz + """ + } else { + error("Could not find any FASTQ files to concatenate in the process input") + } + } + else { + if (readList.size >= 2) { + def read1 = [] + def read2 = [] + readList.eachWithIndex { v, ix -> (ix & 1 ? read2 : read1) << v } + """ + cat ${read1.join(' ')} ${compress} > ${prefix}_1.merged.fastq.gz + cat ${read2.join(' ')} ${compress} > ${prefix}_2.merged.fastq.gz + """ + } else { + error("Could not find any FASTQ file pairs to concatenate in the process input") + } + } stub: def prefix = task.ext.prefix ?: "${meta.id}" - def readList = reads instanceof List ? reads.collect{ it.toString() } : [reads.toString()] + def readList = reads instanceof List ? reads.collect { item -> item.toString() } : [reads.toString()] if (meta.single_end) { - if (readList.size > 1) { + if (readList.size >= 1) { """ - touch ${prefix}.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS + echo '' | gzip > ${prefix}.merged.fastq.gz """ + } else { + error("Could not find any FASTQ files to concatenate in the process input") } - } else { - if (readList.size > 2) { + } + else { + if (readList.size >= 2) { """ - touch ${prefix}_1.merged.fastq.gz - touch ${prefix}_2.merged.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cat: \$(echo \$(cat --version 2>&1) | sed 's/^.*coreutils) //; s/ .*\$//') - END_VERSIONS + echo '' | gzip > ${prefix}_1.merged.fastq.gz + echo '' | gzip > ${prefix}_2.merged.fastq.gz """ + } else { + error("Could not find any FASTQ file pairs to concatenate in the process input") } } } diff --git a/modules/nf-core/cat/fastq/meta.yml b/modules/nf-core/cat/fastq/meta.yml index db4ac3c7..6fefd6e0 100644 --- a/modules/nf-core/cat/fastq/meta.yml +++ b/modules/nf-core/cat/fastq/meta.yml @@ -1,39 +1,64 @@ name: cat_fastq -description: Concatenates fastq files +description: Concatenates fastq files. Supports both compressed (.gz) and uncompressed inputs; uncompressed files are automatically gzip-compressed during concatenation. keywords: - cat - fastq - concatenate + - compress tools: - cat: description: | The cat utility reads files sequentially, writing them to the standard output. documentation: https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html licence: ["GPL-3.0-or-later"] + identifier: "" 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 to be concatenated. + - - 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 to be concatenated. + Accepts both gzip-compressed (.fastq.gz) and uncompressed (.fastq) files. + ontologies: [] output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: Merged fastq file - pattern: "*.{merged.fastq.gz}" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + reads: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.merged.fastq.gz": + type: file + description: Merged fastq file + pattern: "*.{merged.fastq.gz}" + ontologies: [] + versions_cat: + - - ${task.process}: + type: string + description: The process the versions were collected from + - cat: + type: string + description: The tool name + - cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//': + 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 + - cat: + type: string + description: The tool name + - cat --version 2>&1 | head -n 1 | sed 's/^.*coreutils) //; s/ .*\$//': + type: eval + description: The expression to obtain the version of the tool + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test b/modules/nf-core/cat/fastq/tests/main.nf.test index dab2e14c..21052d90 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test +++ b/modules/nf-core/cat/fastq/tests/main.nf.test @@ -7,13 +7,11 @@ nextflow_process { tag "modules_nfcore" tag "cat" tag "cat/fastq" + tag "gunzip" test("test_cat_fastq_single_end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -36,9 +34,6 @@ nextflow_process { test("test_cat_fastq_paired_end") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -63,9 +58,6 @@ nextflow_process { test("test_cat_fastq_single_end_same_name") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -88,9 +80,6 @@ nextflow_process { test("test_cat_fastq_paired_end_same_name") { when { - params { - outdir = "$outputDir" - } process { """ input[0] = Channel.of([ @@ -112,12 +101,202 @@ nextflow_process { } } + test("test_cat_fastq_single_end_uncompressed") { + + setup { + run("GUNZIP") { + script "../../../gunzip/main.nf" + process { + """ + input[0] = Channel.of( + [[ id:'r1' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)], + [[ id:'r2' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)] + ) + """ + } + } + } + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + .toSortedList { a, b -> a[0].id <=> b[0].id } + .map { items -> [[ id: 'test', single_end: true ], items.collect { it[1] }] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_paired_end_uncompressed") { + + setup { + run("GUNZIP") { + script "../../../gunzip/main.nf" + process { + """ + input[0] = Channel.of( + [[ id:'a' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)], + [[ id:'b' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)], + [[ id:'c' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true)], + [[ id:'d' ], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true)] + ) + """ + } + } + } + + when { + process { + """ + input[0] = GUNZIP.out.gunzip + .toSortedList { a, b -> a[0].id <=> b[0].id } + .map { items -> [[ id: 'test', single_end: false ], items.collect { it[1] }] } + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + test("test_cat_fastq_single_end_single_file") { when { - params { - outdir = "$outputDir" + 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)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end - stub") { + + options "-stub" + + 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), + 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).match() } + ) + } + } + + test("test_cat_fastq_paired_end - 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), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test2_2.fastq.gz', checkIfExists: true)] + ]) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test_cat_fastq_single_end_same_name - stub") { + + options "-stub" + + 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), + 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).match() } + ) + } + } + + test("test_cat_fastq_paired_end_same_name - 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), + 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).match() } + ) + } + } + + test("test_cat_fastq_single_end_single_file - stub") { + + options "-stub" + + when { process { """ input[0] = Channel.of([ @@ -135,4 +314,92 @@ nextflow_process { ) } } + + test("test_cat_fastq_single_end_no_files") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_paired_end_no_files") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_single_end_no_files - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } + + test("test_cat_fastq_paired_end_no_files - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert process.failed }, + { assert snapshot(process.stdout.find { it.contains("-- Check script") }.split(" -- Check script")[0]).match() } + ) + } + } } diff --git a/modules/nf-core/cat/fastq/tests/main.nf.test.snap b/modules/nf-core/cat/fastq/tests/main.nf.test.snap index 43dfe28f..6375b2ab 100644 --- a/modules/nf-core/cat/fastq/tests/main.nf.test.snap +++ b/modules/nf-core/cat/fastq/tests/main.nf.test.snap @@ -1,4 +1,247 @@ { + "test_cat_fastq_paired_end_no_files - stub": { + "content": [ + " Could not find any FASTQ file pairs to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:51.248685461" + }, + "test_cat_fastq_single_end_single_file": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:42.84401526" + }, + "test_cat_fastq_paired_end_same_name": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:36.820489323" + }, + "test_cat_fastq_paired_end_same_name - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:06.262192935" + }, + "test_cat_fastq_single_end_uncompressed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-02-09T10:03:24.344628" + }, + "test_cat_fastq_paired_end_uncompressed": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", + "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + ] + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-02-09T10:03:37.568053" + }, "test_cat_fastq_single_end": { "content": [ { @@ -12,7 +255,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -23,12 +270,20 @@ "test.merged.fastq.gz:md5,ee314a9bd568d06617171b0c85f508da" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:30:39.816981" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:18.859169785" }, "test_cat_fastq_single_end_same_name": { "content": [ @@ -43,7 +298,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -54,14 +313,22 @@ "test.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:32:35.229332" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:30.942615287" }, - "test_cat_fastq_single_end_single_file": { + "test_cat_fastq_single_end - stub": { "content": [ { "0": [ @@ -70,11 +337,15 @@ "id": "test", "single_end": true }, - "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -82,17 +353,88 @@ "id": "test", "single_end": true }, - "test.merged.fastq.gz:md5,4161df271f9bfcd25d5845a1e220dbec" + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:34:00.058829" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:48.827990633" }, - "test_cat_fastq_paired_end_same_name": { + "test_cat_fastq_paired_end_no_files": { + "content": [ + " Could not find any FASTQ file pairs to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:40.806088747" + }, + "test_cat_fastq_single_end_no_files - stub": { + "content": [ + " Could not find any FASTQ files to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:45.852365218" + }, + "test_cat_fastq_single_end_same_name - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:00.586584379" + }, + "test_cat_fastq_paired_end": { "content": [ { "0": [ @@ -108,7 +450,11 @@ ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -122,14 +468,32 @@ ] ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:33:33.031555" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:25.159365603" }, - "test_cat_fastq_paired_end": { + "test_cat_fastq_single_end_no_files": { + "content": [ + " Could not find any FASTQ files to concatenate in the process input" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-02-25T17:14:35.695192409" + }, + "test_cat_fastq_paired_end - stub": { "content": [ { "0": [ @@ -139,13 +503,17 @@ "single_end": false }, [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], "1": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ], "reads": [ [ @@ -154,16 +522,67 @@ "single_end": false }, [ - "test_1.merged.fastq.gz:md5,3ad9406595fafec8172368f9cd0b6a22", - "test_2.merged.fastq.gz:md5,a52cab0b840c7178b0ea83df1fdbe8d5" + "test_1.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_2.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], - "versions": [ - "versions.yml:md5,d42d6e24d67004608495883e00bd501b" + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:31:54.850702874" + }, + "test_cat_fastq_single_end_single_file - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] + ], + "reads": [ + [ + { + "id": "test", + "single_end": true + }, + "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions_cat": [ + [ + "CAT_FASTQ", + "cat", + "9.5" + ] ] } ], - "timestamp": "2024-01-17T17:32:02.270935" + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T14:32:11.746498148" } } \ No newline at end of file diff --git a/modules/nf-core/cat/fastq/tests/tags.yml b/modules/nf-core/cat/fastq/tests/tags.yml deleted file mode 100644 index 6ac43614..00000000 --- a/modules/nf-core/cat/fastq/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -cat/fastq: - - modules/nf-core/cat/fastq/** diff --git a/modules/nf-core/custom/dumpsoftwareversions/environment.yml b/modules/nf-core/custom/dumpsoftwareversions/environment.yml index b48ced26..c3b3413f 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/environment.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/environment.yml @@ -1,7 +1,7 @@ -name: custom_dumpsoftwareversions +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda - - defaults dependencies: - - bioconda::multiqc=1.20 + - bioconda::multiqc=1.27 diff --git a/modules/nf-core/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf index 105f9265..874e18cc 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf @@ -4,8 +4,8 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.20--pyhdfd78af_0' : - 'biocontainers/multiqc:1.20--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.27--pyhdfd78af_0' : + 'biocontainers/multiqc:1.27--pyhdfd78af_0' }" input: path versions @@ -19,6 +19,14 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def deprecation_message = """ +WARNING: This module has been deprecated. + +Reason: +This module is no longer recommended for use, as it is replaced by the function softwareVersionsToYAML +in the utils_nfcore_pipeline subworkflow that is included in the nf-core template. + +""" + assert false: deprecation_message template 'dumpsoftwareversions.py' } diff --git a/modules/nf-core/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml index 5f15a5fd..b81907e6 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/meta.yml +++ b/modules/nf-core/custom/dumpsoftwareversions/meta.yml @@ -1,34 +1,48 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: custom_dumpsoftwareversions -description: Custom module used to dump software versions within the nf-core pipeline template +description: Custom module used to dump software versions within the nf-core pipeline + template keywords: - custom - dump - version tools: - custom: - description: Custom module used to dump software versions within the nf-core pipeline template + description: Custom module used to dump software versions within the nf-core pipeline + template homepage: https://github.com/nf-core/tools documentation: https://github.com/nf-core/tools licence: ["MIT"] + identifier: "" input: - versions: type: file description: YML file containing software versions pattern: "*.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML output: - - yml: - type: file - description: Standard YML file containing software versions - pattern: "software_versions.yml" - - mqc_yml: - type: file - description: MultiQC custom content YML file containing software versions - pattern: "software_versions_mqc.yml" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + yml: + - software_versions.yml: + type: file + description: Standard YML file containing software versions + pattern: "software_versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + mqc_yml: + - software_versions_mqc.yml: + type: file + description: MultiQC custom content YML file containing software versions + pattern: "software_versions_mqc.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@drpatelh" - "@grst" diff --git a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py index da033408..aa40e5e3 100755 --- a/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py +++ b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py @@ -3,11 +3,11 @@ """Provide functions to merge multiple versions.yml files.""" - -import yaml import platform from textwrap import dedent +import yaml + def _make_versions_html(versions): """Generate a tabular HTML output of all versions for MultiQC.""" @@ -37,7 +37,7 @@ def _make_versions_html(versions): dedent( f"""\\ - {process if (i == 0) else ''} + {process if (i == 0) else ""} {tool} {version} diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test index b1e1630b..296c2c90 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test @@ -30,13 +30,7 @@ nextflow_process { then { assertAll( - { assert process.success }, - { assert snapshot( - process.out.versions, - file(process.out.mqc_yml[0]).readLines()[0..10], - file(process.out.yml[0]).readLines()[0..7] - ).match() - } + { assert process.failed } ) } } diff --git a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap index 5f59a936..74e42fb1 100644 --- a/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap +++ b/modules/nf-core/custom/dumpsoftwareversions/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "Should run without failures": { "content": [ [ - "versions.yml:md5,76d454d92244589d32455833f7c1ba6d" + "versions.yml:md5,42bedca466554ea4ad0b586f8a18be28" ], [ "data: \"