From ea5d11aa93bebf2ffa8a28195b42764334f3db5e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 23 Jun 2025 12:49:27 +0200 Subject: [PATCH 001/202] back to dev --- assets/multiqc_config.yml | 2 +- nextflow.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 53ed49db..e8d8173d 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -1,5 +1,5 @@ report_comment: > - This report has been generated by the nf-cmgg/preprocessing analysis pipeline. report_section_order: "nf-cmgg-preprocessing-methods-description": diff --git a/nextflow.config b/nextflow.config index cb90bae7..27cb9abd 100644 --- a/nextflow.config +++ b/nextflow.config @@ -255,7 +255,7 @@ manifest { description = """Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data.""" mainScript = 'main.nf' nextflowVersion = '!>=25.04.0' - version = '2.0.6' + version = 'dev' doi = '' } From cf1da3083adf3830447acb495669a7188bd8b0c5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:52:13 +0200 Subject: [PATCH 002/202] coverage - filter seqcap genelists --- modules/local/panelcoverage/main.nf | 3 +- subworkflows/local/coverage/main.nf | 28 ++- .../subworkflows/local/coverage/main.nf.test | 35 ++- .../local/coverage/main.nf.test.snap | 238 +++++++++++++++++- 4 files changed, 282 insertions(+), 22 deletions(-) diff --git a/modules/local/panelcoverage/main.nf b/modules/local/panelcoverage/main.nf index 992d4b99..7b38328a 100644 --- a/modules/local/panelcoverage/main.nf +++ b/modules/local/panelcoverage/main.nf @@ -8,8 +8,7 @@ process PANELCOVERAGE { 'biocontainers/bedtools:2.31.1--hf5e1c6e_1' }" input: - tuple val(meta), path(perbase), path(perbase_index) - path(genelists) + tuple val(meta), path(perbase), path(perbase_index), path(genelists) output: tuple val(meta), path("*.mosdepth.region.dist.txt"), emit: regiondist diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 331d9d60..634ecf02 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -16,7 +16,7 @@ workflow COVERAGE { MOSDEPTH( ch_meta_cram_crai_fasta_fai_roi.map{ - meta, cram, crai, fasta, fai, roi -> + meta, cram, crai, fasta, _fai, roi -> return [meta, cram, crai, roi, fasta] } ) @@ -24,17 +24,37 @@ workflow COVERAGE { SAMTOOLS_COVERAGE( ch_meta_cram_crai_fasta_fai_roi.map{ - meta, cram, crai, fasta, fai, roi -> + meta, cram, crai, fasta, fai, _roi -> return [meta, cram, crai, fasta, fai] } ) ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) ch_coverageqc_files = ch_coverageqc_files.merge(SAMTOOLS_COVERAGE.out.coverage) + ch_genelists.view() + PANELCOVERAGE( MOSDEPTH.out.per_base_bed - .join(MOSDEPTH.out.per_base_csi), - ch_genelists + .join(MOSDEPTH.out.per_base_csi) + .combine(ch_genelists) + .map{meta, bed, index, genelists -> + if (genelists !instanceof List){ + // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... + genelists = [genelists] + } + def filtered_genelists = meta.tag.toLowerCase() == "seqcap" ? + genelists.findAll{it.name.toLowerCase().contains("seqcap")} : + genelists.findAll{!it.name.toLowerCase().contains("seqcap")} + + if (filtered_genelists.size() > 0) { + return [ + meta, + bed, + index, + filtered_genelists + ] + } + } ) ch_versions = ch_versions.mix(PANELCOVERAGE.out.versions.first()) ch_coverageqc_files = ch_coverageqc_files.mix(PANELCOVERAGE.out.regiondist) diff --git a/tests/subworkflows/local/coverage/main.nf.test b/tests/subworkflows/local/coverage/main.nf.test index 17e8b833..8792b87c 100644 --- a/tests/subworkflows/local/coverage/main.nf.test +++ b/tests/subworkflows/local/coverage/main.nf.test @@ -8,14 +8,14 @@ nextflow_workflow { tag "subworkflows/local" tag "subworkflows/local/coverage" - test("Coverage") { + test("Coverage - seqcap") { when { workflow { """ // ch_meta_cram_crai_fasta_fai_roi input[0] = Channel.of([ - [id: "test", single_end: false], // meta + [id: "test", single_end: false, tag: "seqcap"], // meta file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram.crai", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", checkIfExists: true), @@ -23,7 +23,36 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - input[1] = Channel.of([ + input[1] = Channel.value([ + file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/genelists/genelist_chr21_per_exon.bed",checkIfExists:true) + ]) + """ + } + } + + then { + assert workflow.success + assert snapshot(workflow.out).match() + } + + } + + test("Coverage - WES") { + + when { + workflow { + """ + // ch_meta_cram_crai_fasta_fai_roi + input[0] = Channel.of([ + [id: "test", single_end: false, tag: "WES"], // meta + file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram", checkIfExists: true), + file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram.crai", checkIfExists: true), + file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", checkIfExists: true), + file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", checkIfExists: true), + file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), + ]) + // genelists + input[1] = Channel.value([ file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/genelists/genelist_chr21_per_exon.bed",checkIfExists:true) ]) """ diff --git a/tests/subworkflows/local/coverage/main.nf.test.snap b/tests/subworkflows/local/coverage/main.nf.test.snap index 068dc48d..5e1a6c31 100644 --- a/tests/subworkflows/local/coverage/main.nf.test.snap +++ b/tests/subworkflows/local/coverage/main.nf.test.snap @@ -1,12 +1,13 @@ { - "Coverage": { + "Coverage - WES": { "content": [ { "0": [ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" ] @@ -15,7 +16,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" ] @@ -24,7 +26,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" ] @@ -33,7 +36,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] @@ -42,7 +46,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,e5c7b4f381721888249c57aa55be2d34" ] @@ -56,7 +61,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" ] @@ -65,7 +71,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" ] @@ -74,7 +81,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" ] @@ -83,7 +91,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,e5c7b4f381721888249c57aa55be2d34" ] @@ -92,7 +101,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "WES" }, "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] @@ -106,8 +116,210 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.1" + "nextflow": "25.04.4" + }, + "timestamp": "2025-06-23T14:45:47.730036" + }, + "Coverage - seqcap": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + ] + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", + "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + ], + "mosdepth_global": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" + ] + ], + "mosdepth_regions": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" + ] + ], + "mosdepth_summary": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + ] + ], + "panelcoverage": [ + + ], + "samtools_coverage": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + ] + ], + "versions": [ + "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", + "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-06-23T13:40:00.179558" + }, + "Coverage": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" + ] + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + ] + ], + "4": [ + + ], + "5": [ + "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", + "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + ], + "mosdepth_global": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" + ] + ], + "mosdepth_regions": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" + ] + ], + "mosdepth_summary": [ + [ + { + "id": "test", + "single_end": false + }, + "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + ] + ], + "panelcoverage": [ + + ], + "samtools_coverage": [ + [ + { + "id": "test", + "single_end": false + }, + "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + ] + ], + "versions": [ + "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", + "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" }, - "timestamp": "2024-11-19T15:25:37.147132" + "timestamp": "2025-06-23T13:34:58.331928" } } \ No newline at end of file From 0c8f087d9aa31bb0006b36677c0525e658472a19 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 23 Jun 2025 14:54:17 +0200 Subject: [PATCH 003/202] fix module tests --- tests/modules/local/panelcoverage/main.nf.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/modules/local/panelcoverage/main.nf.test b/tests/modules/local/panelcoverage/main.nf.test index 3d3f351d..4a2dd77d 100644 --- a/tests/modules/local/panelcoverage/main.nf.test +++ b/tests/modules/local/panelcoverage/main.nf.test @@ -17,9 +17,9 @@ nextflow_process { [id: "test", single_end: false ], file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/bed/sample1.per-base.bed.gz", checkIfExists:true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/bed/sample1.per-base.bed.gz.csi", checkIfExists:true), - ] - input[1] = [ - file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/genelists/genelist_chr21_per_exon.bed",checkIfExists:true) + [ + file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/genelists/genelist_chr21_per_exon.bed",checkIfExists:true) + ] ] """ } From 503fa15976c9a96de25f12005268b382a6c994fa Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 23 Jun 2025 21:13:33 +0200 Subject: [PATCH 004/202] MQC: disable plot export --- assets/multiqc_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index e8d8173d..f0b699ec 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -8,7 +8,7 @@ report_section_order: order: -1001 "nf-cmgg-preprocessing-summary": order: -1002 -export_plots: true +export_plots: false disable_version_detection: true bclconvert: create_undetermined_barcode_barplots: true From f9ad2f137525e5122a670d4fde367a9197d21f62 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 5 Sep 2025 16:31:38 +0200 Subject: [PATCH 005/202] only use first versions of modules --- nextflow_schema.json | 4 ++ subworkflows/local/bam_qc/main.nf | 18 ++++---- subworkflows/local/coverage/main.nf | 4 +- subworkflows/local/fastq_align_rna/main.nf | 2 +- .../local/fastq_to_aligned_cram/main.nf | 11 ++--- .../local/fastq_to_unaligned_cram/main.nf | 4 +- subworkflows/nf-core/bcl_demultiplex/main.nf | 4 +- subworkflows/nf-core/fastq_align_dna/main.nf | 10 ++--- workflows/preprocessing.nf | 41 ++++++++++--------- 9 files changed, 52 insertions(+), 46 deletions(-) diff --git a/nextflow_schema.json b/nextflow_schema.json index 6a2a3685..266484fe 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -38,6 +38,10 @@ "type": "string", "description": "MultiQC report title. Printed as page header, used for filename if not otherwise specified.", "fa_icon": "fas fa-file-signature" + }, + "genomes": { + "type": "object", + "hidden": true } } }, diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index 392bcd10..0cb82f0c 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -17,21 +17,21 @@ workflow BAM_QC { ch_versions = Channel.empty() ch_bam_bai_roi_fasta_fai_dict - .map{ meta, bam, bai, roi, fasta, fai, dict -> return [meta, bam, bai, fasta]} + .map{ meta, bam, bai, _roi, fasta, _fai, _dict -> return [meta, bam, bai, fasta]} .set{ ch_bam_bai_fasta } SAMTOOLS_STATS ( ch_bam_bai_fasta ) - ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions) + ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions.first()) ch_bam_bai_fasta - .map{ meta, bam, bai, fasta -> return [meta, bam, bai]} + .map{ meta, bam, bai, _fasta -> return [meta, bam, bai]} .set{ ch_bam_bai } SAMTOOLS_FLAGSTAT ( ch_bam_bai ) - ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions) + ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions.first()) SAMTOOLS_IDXSTATS ( ch_bam_bai ) - ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions) + ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions.first()) ch_picard_hsmetrics = Channel.empty() ch_picard_multiplemetrics = Channel.empty() @@ -39,11 +39,11 @@ workflow BAM_QC { if (!disable_picard) { ch_bam_bai_roi_fasta_fai_dict - .map{ meta, bam, bai, roi, fasta, fai, dict -> return [meta, bam, bai, fasta, fai]} + .map{ meta, bam, bai, _roi, fasta, fai, _dict -> return [meta, bam, bai, fasta, fai]} .set{ ch_bam_bai_fasta_fai } PICARD_COLLECTMULTIPLEMETRICS ( ch_bam_bai_fasta_fai ) - ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions) + ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) ch_picard_multiplemetrics = ch_picard_multiplemetrics.mix(PICARD_COLLECTMULTIPLEMETRICS.out.metrics) ch_bam_bai_roi_fasta_fai_dict @@ -56,11 +56,11 @@ workflow BAM_QC { .set{ch_picard} PICARD_COLLECTWGSMETRICS ( ch_picard.wgsmetrics, [] ) - ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions) + ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) ch_picard_wgsmetrics = ch_picard_wgsmetrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) PICARD_COLLECTHSMETRICS ( ch_picard.hsmetrics ) - ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions) + ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) ch_picard_hsmetrics = ch_picard_hsmetrics.mix(PICARD_COLLECTHSMETRICS.out.metrics) } diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 331d9d60..a5aedeae 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -16,7 +16,7 @@ workflow COVERAGE { MOSDEPTH( ch_meta_cram_crai_fasta_fai_roi.map{ - meta, cram, crai, fasta, fai, roi -> + meta, cram, crai, fasta, _fai, roi -> return [meta, cram, crai, roi, fasta] } ) @@ -24,7 +24,7 @@ workflow COVERAGE { SAMTOOLS_COVERAGE( ch_meta_cram_crai_fasta_fai_roi.map{ - meta, cram, crai, fasta, fai, roi -> + meta, cram, crai, fasta, fai, _roi -> return [meta, cram, crai, fasta, fai] } ) diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index 5ec99dc9..e78ec428 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -36,7 +36,7 @@ workflow FASTQ_ALIGN_RNA { STAR_ALIGN.out.log_progress, STAR_ALIGN.out.log_out ) - ch_versions = ch_versions.mix(STAR_ALIGN.out.versions) + ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) emit: bam = ch_bam // channel: [ [meta], bam ] diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index ee57fd08..2ec92389 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -103,21 +103,21 @@ workflow FASTQ_TO_CRAM { // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta) BIOBAMBAM_BAMSORMADUP(ch_bam_fasta) ch_markdup_index = ch_markdup_index.mix(BIOBAMBAM_BAMSORMADUP.out.bam.join(BIOBAMBAM_BAMSORMADUP.out.bam_index, failOnMismatch:true, failOnDuplicate:true)) - ch_multiqc_files = ch_multiqc_files.mix( BIOBAMBAM_BAMSORMADUP.out.metrics.map { meta, metrics -> return metrics} ) - ch_versions = ch_versions.mix(BIOBAMBAM_BAMSORMADUP.out.versions) + ch_multiqc_files = ch_multiqc_files.mix( BIOBAMBAM_BAMSORMADUP.out.metrics.map { _meta, metrics -> return metrics} ) + ch_versions = ch_versions.mix(BIOBAMBAM_BAMSORMADUP.out.versions.first()) } else if ( markdup == "samtools") { SAMTOOLS_SORMADUP(ch_bam_fasta) ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORMADUP.out.cram.join(SAMTOOLS_SORMADUP.out.crai, failOnMismatch:true, failOnDuplicate:true)) - ch_multiqc_files = ch_multiqc_files.mix( SAMTOOLS_SORMADUP.out.metrics.map { meta, metrics -> return metrics} ) - ch_versions = ch_versions.mix(SAMTOOLS_SORMADUP.out.versions) + ch_multiqc_files = ch_multiqc_files.mix( SAMTOOLS_SORMADUP.out.metrics.map { _meta, metrics -> return metrics} ) + ch_versions = ch_versions.mix(SAMTOOLS_SORMADUP.out.versions.first()) } else if ( markdup == "false" || markdup == false) { // Merge bam files and compress // SAMTOOLS_SORT([meta, [bam, bam], fasta]) SAMTOOLS_SORT(ch_bam_fasta) ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORT.out.cram.join(SAMTOOLS_SORT.out.crai, failOnMismatch:true, failOnDuplicate:true)) - ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions) + ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first()) } else { error "markdup: ${markdup} not supported" @@ -146,6 +146,7 @@ workflow FASTQ_TO_CRAM { .set {ch_bam_bai_fasta_fai} SAMTOOLS_CONVERT(ch_bam_bai_fasta_fai) + ch_versions = ch_versions.mix(SAMTOOLS_CONVERT.out.versions.first()) ch_markdup_index.cram .mix( diff --git a/subworkflows/local/fastq_to_unaligned_cram/main.nf b/subworkflows/local/fastq_to_unaligned_cram/main.nf index 28bdcbfe..8cb1911b 100644 --- a/subworkflows/local/fastq_to_unaligned_cram/main.nf +++ b/subworkflows/local/fastq_to_unaligned_cram/main.nf @@ -27,7 +27,7 @@ workflow FASTQ_TO_UCRAM { // SAMTOOLS_IMPORT([meta, fastq]) SAMTOOLS_IMPORT(ch_fastq) - ch_versions = ch_versions.mix(SAMTOOLS_IMPORT.out.versions) + ch_versions = ch_versions.mix(SAMTOOLS_IMPORT.out.versions.first()) SAMTOOLS_IMPORT.out.cram .map { @@ -66,7 +66,7 @@ workflow FASTQ_TO_UCRAM { // Merge bam files per sample SAMTOOLS_CAT(ch_ubam_per_sample) - ch_versions = ch_versions.mix(SAMTOOLS_CAT.out.versions) + ch_versions = ch_versions.mix(SAMTOOLS_CAT.out.versions.first()) emit: cram = SAMTOOLS_CAT.out.cram // [meta, cram] diff --git a/subworkflows/nf-core/bcl_demultiplex/main.nf b/subworkflows/nf-core/bcl_demultiplex/main.nf index 5526fc41..e7905cdb 100644 --- a/subworkflows/nf-core/bcl_demultiplex/main.nf +++ b/subworkflows/nf-core/bcl_demultiplex/main.nf @@ -49,7 +49,7 @@ workflow BCL_DEMULTIPLEX { ch_fastq = ch_fastq.mix(BCLCONVERT.out.fastq) ch_interop = ch_interop.mix(BCLCONVERT.out.interop) ch_reports = ch_reports.mix(BCLCONVERT.out.reports) - ch_versions = ch_versions.mix(BCLCONVERT.out.versions) + ch_versions = ch_versions.mix(BCLCONVERT.out.versions.first()) } // MODULE: bcl2fastq @@ -60,7 +60,7 @@ workflow BCL_DEMULTIPLEX { ch_interop = ch_interop.mix(BCL2FASTQ.out.interop) ch_reports = ch_reports.mix(BCL2FASTQ.out.reports) ch_stats = ch_stats.mix(BCL2FASTQ.out.stats) - ch_versions = ch_versions.mix(BCL2FASTQ.out.versions) + ch_versions = ch_versions.mix(BCL2FASTQ.out.versions.first()) } // Generate meta for each fastq diff --git a/subworkflows/nf-core/fastq_align_dna/main.nf b/subworkflows/nf-core/fastq_align_dna/main.nf index 80414235..e6636ae8 100644 --- a/subworkflows/nf-core/fastq_align_dna/main.nf +++ b/subworkflows/nf-core/fastq_align_dna/main.nf @@ -48,26 +48,26 @@ workflow FASTQ_ALIGN_DNA { // Align fastq files to reference genome and (optionally) sort BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) // if aligner is bowtie2 ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) - ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions) + ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions.first()) BWAMEM1_MEM (ch_to_align.bwamem, sort) // If aligner is bwa-mem ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) - ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions) + ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions.first()) BWAMEM2_MEM (ch_to_align.bwamem2, sort) // If aligner is bwa-mem2 ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) - ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions) + ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions.first()) DRAGMAP_ALIGN(ch_to_align.dragmap, sort) // If aligner is dragmap ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) - ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions) + ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions.first()) SNAP_ALIGN(ch_to_align.snap) // If aligner is snap ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) ch_bam_index.mix(SNAP_ALIGN.out.bai) - ch_versions = ch_versions.mix(SNAP_ALIGN.out.versions) + ch_versions = ch_versions.mix(SNAP_ALIGN.out.versions.first()) emit: bam = ch_bam // channel: [ [meta], bam ] diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index d23a17b1..36f6fe4c 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -79,8 +79,8 @@ workflow PREPROCESSING { BCL_DEMULTIPLEX(ch_illumina_flowcell.flowcell, "bclconvert") BCL_DEMULTIPLEX.out.fastq.dump(tag: "DEMULTIPLEX: fastq",pretty: true) ch_multiqc_files = ch_multiqc_files.mix( - BCL_DEMULTIPLEX.out.reports.map { meta, reports -> return reports}, - BCL_DEMULTIPLEX.out.stats.map { meta, stats -> return stats } + BCL_DEMULTIPLEX.out.reports.map { _meta, reports -> return reports}, + BCL_DEMULTIPLEX.out.stats.map { _meta, stats -> return stats } ) ch_versions = ch_versions.mix(BCL_DEMULTIPLEX.out.versions) @@ -180,7 +180,7 @@ workflow PREPROCESSING { // Count the number of samples per samplename .map{ meta, reads -> [meta.samplename, [meta, reads]]} .groupTuple() - .map{ samplename, meta_fastq -> [meta_fastq, meta_fastq.size()]} + .map{ _samplename, meta_fastq -> [meta_fastq, meta_fastq.size()]} .transpose() .map{meta_fastq, count -> [meta_fastq[0] + ['count': count], meta_fastq[1]]} // Clean up metadata @@ -202,8 +202,8 @@ workflow PREPROCESSING { // Run QC, trimming and adapter removal // FASTP([meta, fastq], adapter_fasta, save_trimmed, save_merged) FASTP(ch_fastq_per_sample, [], false, false, false) - ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json.map { meta, json -> return json} ) - ch_versions = ch_versions.mix(FASTP.out.versions) + ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json.map { _meta, json -> return json} ) + ch_versions = ch_versions.mix(FASTP.out.versions.first()) // edit meta.id to match sample name FASTP.out.reads @@ -225,7 +225,7 @@ workflow PREPROCESSING { ] } // split samples into human and non human data - .branch { meta, reads -> + .branch { meta, _reads -> supported: meta.genome_data instanceof Map && meta.genome_data.size() > 0 other: true } @@ -281,7 +281,7 @@ workflow PREPROCESSING { */ FASTQ_TO_CRAM.out.cram_crai - .filter{ meta, cram, crai -> + .filter{ meta, _cram, _crai -> meta.tag != "SNP" } .set{ch_no_snp_samples} @@ -318,10 +318,10 @@ workflow PREPROCESSING { if (params.run_coverage == true || params.run_coverage == "true") { COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) ch_multiqc_files = ch_multiqc_files.mix( - COVERAGE.out.mosdepth_summary .map{ meta, txt -> return txt }, - COVERAGE.out.mosdepth_global .map{ meta, txt -> return txt }, - COVERAGE.out.mosdepth_regions .map{ meta, txt -> return txt }, - COVERAGE.out.samtools_coverage.map{ meta, txt -> return txt }, + COVERAGE.out.mosdepth_summary .map{ _meta, txt -> return txt }, + COVERAGE.out.mosdepth_global .map{ _meta, txt -> return txt }, + COVERAGE.out.mosdepth_regions .map{ _meta, txt -> return txt }, + COVERAGE.out.samtools_coverage.map{ _meta, txt -> return txt }, ) ch_versions = ch_versions.mix(COVERAGE.out.versions) } @@ -359,12 +359,12 @@ workflow PREPROCESSING { BAM_QC(ch_cram_crai_roi_fasta_fai_dict, params.disable_picard_metrics) ch_multiqc_files = ch_multiqc_files.mix( - BAM_QC.out.samtools_stats .map{ meta, txt -> return txt }, - BAM_QC.out.samtools_flagstat .map{ meta, txt -> return txt }, - BAM_QC.out.samtools_idxstats .map{ meta, txt -> return txt }, - BAM_QC.out.picard_multiplemetrics .map{ meta, txt -> return txt }, - BAM_QC.out.picard_wgsmetrics .map{ meta, txt -> return txt }, - BAM_QC.out.picard_hsmetrics .map{ meta, txt -> return txt }, + BAM_QC.out.samtools_stats .map{ _meta, txt -> return txt }, + BAM_QC.out.samtools_flagstat .map{ _meta, txt -> return txt }, + BAM_QC.out.samtools_idxstats .map{ _meta, txt -> return txt }, + BAM_QC.out.picard_multiplemetrics .map{ _meta, txt -> return txt }, + BAM_QC.out.picard_wgsmetrics .map{ _meta, txt -> return txt }, + BAM_QC.out.picard_hsmetrics .map{ _meta, txt -> return txt }, ) ch_versions = ch_versions.mix(BAM_QC.out.versions) @@ -374,7 +374,8 @@ workflow PREPROCESSING { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - MD5SUM(FASTQ_TO_CRAM.out.cram_crai.map{ meta, cram, crai -> return [meta,cram] }, false) + MD5SUM(FASTQ_TO_CRAM.out.cram_crai.map{ meta, cram, _crai -> return [meta,cram] }, false) + ch_versions = ch_versions.mix(MD5SUM.out.versions.first()) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -445,8 +446,8 @@ def readgroup_from_fastq(path) { if (fields.size() >= 7) { // CASAVA 1.8+ format, from https://support.illumina.com/help/BaseSpace_OLH_009008/Content/Source/Informatics/BS/FileFormat_FASTQ-files_swBS.htm // "@::::::: :::" - def sequencer_serial = fields[0] - def run_nubmer = fields[1] + // def sequencer_serial = fields[0] + // def run_number = fields[1] def fcid = fields[2] def lane = fields[3] def index = fields[-1] =~ /[GATC+-]/ ? fields[-1] : "" From b69fc6a0f7d7cd6d34e0d1d7e09ebeae14ba8667 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 11 Sep 2025 11:32:45 +0200 Subject: [PATCH 006/202] Update regex pattern for BED file path validation Fixes #131 --- assets/schema_input.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index beaa2eb6..c6521e05 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -69,7 +69,7 @@ "type": "string", "format": "file-path", "description": "Region of interest BED file for coverage analysis", - "pattern": "^[a-zA-Z0-9_]+.bed$", + "pattern": "^.*/[^/]+\.bed$", "default": null }, "lane": { From d931a683e5af5371440f5c80724b1a9811603624 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 11 Sep 2025 12:14:09 +0200 Subject: [PATCH 007/202] linting --- assets/multiqc_config.yml | 2 +- assets/schema_input.json | 2 +- nextflow.config | 4 ++-- nf-test.config | 7 +++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index f0b699ec..e8d8173d 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -8,7 +8,7 @@ report_section_order: order: -1001 "nf-cmgg-preprocessing-summary": order: -1002 -export_plots: false +export_plots: true disable_version_detection: true bclconvert: create_undetermined_barcode_barplots: true diff --git a/assets/schema_input.json b/assets/schema_input.json index c6521e05..0e0d30d9 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -69,7 +69,7 @@ "type": "string", "format": "file-path", "description": "Region of interest BED file for coverage analysis", - "pattern": "^.*/[^/]+\.bed$", + "pattern": "^.*/[^/]+\\.bed$", "default": null }, "lane": { diff --git a/nextflow.config b/nextflow.config index 27cb9abd..3aeba7ac 100644 --- a/nextflow.config +++ b/nextflow.config @@ -66,8 +66,8 @@ params { // Load base.config by default for all pipelines includeConfig 'conf/base.config' -// Load nf-core custom profiles from different Institutions -includeConfig "${params.custom_config_base}/nfcore_custom.config" +// Load nf-core custom profiles from different institutions +includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" // Load nf-cmgg cluster profiles includeConfig !System.getenv('NXF_OFFLINE') ? "https://raw.githubusercontent.com/nf-cmgg/configs/main/clusters/cmgg_clusters.config" : "/dev/null" diff --git a/nf-test.config b/nf-test.config index 0688f302..aa727c88 100644 --- a/nf-test.config +++ b/nf-test.config @@ -1,8 +1,7 @@ config { - - testsDir "tests" - workDir ".nf-test" - configFile "tests/config/nf-test.config" + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "tests/nextflow.config" profile "docker" options "-dump-channels" From 4292758404aec0ff7a0bb75b1954cafbcb497fd3 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 11 Sep 2025 13:09:24 +0200 Subject: [PATCH 008/202] Update assets/schema_input.json Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- assets/schema_input.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index 0e0d30d9..e0ba1632 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -69,7 +69,7 @@ "type": "string", "format": "file-path", "description": "Region of interest BED file for coverage analysis", - "pattern": "^.*/[^/]+\\.bed$", + "pattern": "^\\S+\\.bed$", "default": null }, "lane": { From b173054a50c9d14a3b480b63968be633a9c0dbff Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 11 Sep 2025 11:32:45 +0200 Subject: [PATCH 009/202] Update regex pattern for BED file path validation Fixes #131 --- assets/schema_input.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index beaa2eb6..c6521e05 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -69,7 +69,7 @@ "type": "string", "format": "file-path", "description": "Region of interest BED file for coverage analysis", - "pattern": "^[a-zA-Z0-9_]+.bed$", + "pattern": "^.*/[^/]+\.bed$", "default": null }, "lane": { From 1b340515f7f47e3f17c62e9f39566193140c0aca Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 11 Sep 2025 12:14:09 +0200 Subject: [PATCH 010/202] linting --- assets/multiqc_config.yml | 2 +- assets/schema_input.json | 2 +- nextflow.config | 4 ++-- nf-test.config | 7 +++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index f0b699ec..e8d8173d 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -8,7 +8,7 @@ report_section_order: order: -1001 "nf-cmgg-preprocessing-summary": order: -1002 -export_plots: false +export_plots: true disable_version_detection: true bclconvert: create_undetermined_barcode_barplots: true diff --git a/assets/schema_input.json b/assets/schema_input.json index c6521e05..0e0d30d9 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -69,7 +69,7 @@ "type": "string", "format": "file-path", "description": "Region of interest BED file for coverage analysis", - "pattern": "^.*/[^/]+\.bed$", + "pattern": "^.*/[^/]+\\.bed$", "default": null }, "lane": { diff --git a/nextflow.config b/nextflow.config index 27cb9abd..3aeba7ac 100644 --- a/nextflow.config +++ b/nextflow.config @@ -66,8 +66,8 @@ params { // Load base.config by default for all pipelines includeConfig 'conf/base.config' -// Load nf-core custom profiles from different Institutions -includeConfig "${params.custom_config_base}/nfcore_custom.config" +// Load nf-core custom profiles from different institutions +includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" // Load nf-cmgg cluster profiles includeConfig !System.getenv('NXF_OFFLINE') ? "https://raw.githubusercontent.com/nf-cmgg/configs/main/clusters/cmgg_clusters.config" : "/dev/null" diff --git a/nf-test.config b/nf-test.config index 0688f302..aa727c88 100644 --- a/nf-test.config +++ b/nf-test.config @@ -1,8 +1,7 @@ config { - - testsDir "tests" - workDir ".nf-test" - configFile "tests/config/nf-test.config" + testsDir "." + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + configFile "tests/nextflow.config" profile "docker" options "-dump-channels" From 2dfe6e8273236404bb88c1cd9a197143f3a83af5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 11 Sep 2025 13:09:24 +0200 Subject: [PATCH 011/202] Update assets/schema_input.json Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com> --- assets/schema_input.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index 0e0d30d9..e0ba1632 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -69,7 +69,7 @@ "type": "string", "format": "file-path", "description": "Region of interest BED file for coverage analysis", - "pattern": "^.*/[^/]+\\.bed$", + "pattern": "^\\S+\\.bed$", "default": null }, "lane": { From b4c6e2b7a3b4f802498a0fbe9f72b3184b1a039b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:10:25 +0200 Subject: [PATCH 012/202] nextflow lint all the things --- conf/base.config | 40 +- conf/igenomes.config | 137 +++-- conf/modules.config | 313 +++++------ conf/profiles/WES.config | 10 +- conf/profiles/WGS.config | 10 +- conf/profiles/copgt.config | 16 +- conf/profiles/s3_ugent.config | 4 +- conf/profiles/sWGS.config | 7 +- conf/test.config | 20 +- conf/test_full.config | 4 +- main.nf | 81 ++- modules/local/panelcoverage/main.nf | 14 +- nextflow.config | 2 +- subworkflows/local/bam_qc/main.nf | 64 ++- subworkflows/local/coverage/main.nf | 100 ++-- subworkflows/local/fastq_align_rna/main.nf | 52 +- .../local/fastq_to_aligned_cram/main.nf | 186 +++---- .../local/fastq_to_unaligned_cram/main.nf | 61 +-- .../main.nf | 67 ++- tests/config/igenomes_test.config | 16 +- tests/config/nf-test.config | 6 +- workflows/preprocessing.nf | 496 +++++++++--------- 22 files changed, 862 insertions(+), 844 deletions(-) diff --git a/conf/base.config b/conf/base.config index 5008f965..2caf89e5 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,45 +10,45 @@ process { - cpus = { 1 * task.attempt } - memory = { 8.GB * task.attempt } - time = { 4.h * task.attempt } + cpus = { 1 * task.attempt } + memory = { 8.GB * task.attempt } + time = { 4.h * task.attempt } errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' } maxRetries = 1 maxErrors = '-1' // Process-specific resource requirements - withLabel:process_single { - cpus = { 1 } + withLabel: process_single { + cpus = { 1 } memory = { 8.GB * task.attempt } - time = { 4.h * task.attempt } + time = { 4.h * task.attempt } } - withLabel:process_low { - cpus = { 2 * task.attempt } + withLabel: process_low { + cpus = { 2 * task.attempt } memory = { 16.GB * task.attempt } - time = { 4.h * task.attempt } + time = { 4.h * task.attempt } } - withLabel:process_medium { - cpus = { 8 * task.attempt } + withLabel: process_medium { + cpus = { 8 * task.attempt } memory = { 64.GB * task.attempt } - time = { 8.h * task.attempt } + time = { 8.h * task.attempt } } - withLabel:process_high { - cpus = { 16 * task.attempt } + withLabel: process_high { + cpus = { 16 * task.attempt } memory = { 128.GB * task.attempt } - time = { 16.h * task.attempt } + time = { 16.h * task.attempt } } - withLabel:process_long { - time = { 72.h * task.attempt } + withLabel: process_long { + time = { 72.h * task.attempt } } - withLabel:process_high_memory { + withLabel: process_high_memory { memory = { 200.GB * task.attempt } } - withLabel:error_ignore { + withLabel: error_ignore { errorStrategy = 'ignore' } - withLabel:error_retry { + withLabel: error_retry { errorStrategy = 'retry' maxRetries = 2 } diff --git a/conf/igenomes.config b/conf/igenomes.config index 07e67809..27ed34c8 100644 --- a/conf/igenomes.config +++ b/conf/igenomes.config @@ -10,97 +10,96 @@ params { genomes { - "GRCh38" { + GRCh38 { // Genome reference - fai = "${params.igenomes_base}/Hsapiens/GRCh38/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set.fna.fai" - fasta = "${params.igenomes_base}/Hsapiens/GRCh38/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set.fna" - dict = "${params.igenomes_base}/Hsapiens/GRCh38/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set.dict" - gtf = "${params.igenomes_base}/Hsapiens/GRCh38/seq/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.gtf" + fai = "${params.igenomes_base}/Hsapiens/GRCh38/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set.fna.fai" + fasta = "${params.igenomes_base}/Hsapiens/GRCh38/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set.fna" + dict = "${params.igenomes_base}/Hsapiens/GRCh38/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set.dict" + gtf = "${params.igenomes_base}/Hsapiens/GRCh38/seq/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.gtf" // Aligner reference - bowtie2 = "${params.igenomes_base}/Hsapiens/GRCh38/bowtie2" - bwamem = "${params.igenomes_base}/Hsapiens/GRCh38/bwa" - bwamem2 = "${params.igenomes_base}/Hsapiens/GRCh38/bwamem2" - dragmap = "${params.igenomes_base}/Hsapiens/GRCh38/dragmap" - snap = "${params.igenomes_base}/Hsapiens/GRCh38/snapaligner" - star = "${params.igenomes_base}/Hsapiens/GRCh38/star" + bowtie2 = "${params.igenomes_base}/Hsapiens/GRCh38/bowtie2" + bwamem = "${params.igenomes_base}/Hsapiens/GRCh38/bwa" + bwamem2 = "${params.igenomes_base}/Hsapiens/GRCh38/bwamem2" + dragmap = "${params.igenomes_base}/Hsapiens/GRCh38/dragmap" + snap = "${params.igenomes_base}/Hsapiens/GRCh38/snapaligner" + star = "${params.igenomes_base}/Hsapiens/GRCh38/star" // ROI's - roi_copgt = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_coPGT-M_analyses_ROI_v1.bed" - roi_wes = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" + roi_copgt = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_coPGT-M_analyses_ROI_v1.bed" + roi_wes = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" } - "GRCm39" { + GRCm39 { // Genome reference - fai = "${params.igenomes_base}/Mmusculus/GRCm39/seq/GCF_000001635.27_GRCm39_genomic.fna.fai" - fasta = "${params.igenomes_base}/Mmusculus/GRCm39/seq/GCF_000001635.27_GRCm39_genomic.fna" - dict = "${params.igenomes_base}/Mmusculus/GRCm39/seq/GCF_000001635.27_GRCm39_genomic.dict" - gtf = "${params.igenomes_base}/Mmusculus/GRCm39/seq/GCF_000001635.27_GRCm39_genomic.gtf" + fai = "${params.igenomes_base}/Mmusculus/GRCm39/seq/GCF_000001635.27_GRCm39_genomic.fna.fai" + fasta = "${params.igenomes_base}/Mmusculus/GRCm39/seq/GCF_000001635.27_GRCm39_genomic.fna" + dict = "${params.igenomes_base}/Mmusculus/GRCm39/seq/GCF_000001635.27_GRCm39_genomic.dict" + gtf = "${params.igenomes_base}/Mmusculus/GRCm39/seq/GCF_000001635.27_GRCm39_genomic.gtf" // Aligner reference - bowtie2 = "${params.igenomes_base}/Mmusculus/GRCm39/bowtie2" - bwamem = "${params.igenomes_base}/Mmusculus/GRCm39/bwa" - bwamem2 = "${params.igenomes_base}/Mmusculus/GRCm39/bwamem2" - dragmap = "${params.igenomes_base}/Mmusculus/GRCm39/dragmap" - snap = "${params.igenomes_base}/Mmusculus/GRCm39/snapaligner" - star = "${params.igenomes_base}/Mmusculus/GRCm39/star" + bowtie2 = "${params.igenomes_base}/Mmusculus/GRCm39/bowtie2" + bwamem = "${params.igenomes_base}/Mmusculus/GRCm39/bwa" + bwamem2 = "${params.igenomes_base}/Mmusculus/GRCm39/bwamem2" + dragmap = "${params.igenomes_base}/Mmusculus/GRCm39/dragmap" + snap = "${params.igenomes_base}/Mmusculus/GRCm39/snapaligner" + star = "${params.igenomes_base}/Mmusculus/GRCm39/star" } - "mm10" { + mm10 { // Genome reference - fai = "${params.igenomes_base}/Mmusculus/mm10/seq/mm10.fa.fai" - fasta = "${params.igenomes_base}/Mmusculus/mm10/seq/mm10.fa" - dict = "${params.igenomes_base}/Mmusculus/mm10/seq/mm10.dict" - gtf = "${params.igenomes_base}/Mmusculus/mm10/seq/Mus_musculus.GRCm38.102.chr.gtf" + fai = "${params.igenomes_base}/Mmusculus/mm10/seq/mm10.fa.fai" + fasta = "${params.igenomes_base}/Mmusculus/mm10/seq/mm10.fa" + dict = "${params.igenomes_base}/Mmusculus/mm10/seq/mm10.dict" + gtf = "${params.igenomes_base}/Mmusculus/mm10/seq/Mus_musculus.GRCm38.102.chr.gtf" // Aligner reference - bowtie2 = "${params.igenomes_base}/Mmusculus/mm10/bowtie2" - bwamem = "${params.igenomes_base}/Mmusculus/mm10/bwa" - bwamem2 = "${params.igenomes_base}/Mmusculus/mm10/bwamem2" - dragmap = "${params.igenomes_base}/Mmusculus/mm10/dragmap" - snap = "${params.igenomes_base}/Mmusculus/mm10/snapaligner" - star = "${params.igenomes_base}/Mmusculus/mm10/star" + bowtie2 = "${params.igenomes_base}/Mmusculus/mm10/bowtie2" + bwamem = "${params.igenomes_base}/Mmusculus/mm10/bwa" + bwamem2 = "${params.igenomes_base}/Mmusculus/mm10/bwamem2" + dragmap = "${params.igenomes_base}/Mmusculus/mm10/dragmap" + snap = "${params.igenomes_base}/Mmusculus/mm10/snapaligner" + star = "${params.igenomes_base}/Mmusculus/mm10/star" } - "GRCz11" { + GRCz11 { // Genome reference - fai = "${params.igenomes_base}/Drerio/GRCz11/seq/GCF_000002035.6_GRCz11_genomic.fna.fai" - fasta = "${params.igenomes_base}/Drerio/GRCz11/seq/GCF_000002035.6_GRCz11_genomic.fna" - dict = "${params.igenomes_base}/Drerio/GRCz11/seq/GCF_000002035.6_GRCz11_genomic.dict" - gtf = "${params.igenomes_base}/Drerio/GRCz11/seq/GCF_000002035.6_GRCz11_genomic.gtf" + fai = "${params.igenomes_base}/Drerio/GRCz11/seq/GCF_000002035.6_GRCz11_genomic.fna.fai" + fasta = "${params.igenomes_base}/Drerio/GRCz11/seq/GCF_000002035.6_GRCz11_genomic.fna" + dict = "${params.igenomes_base}/Drerio/GRCz11/seq/GCF_000002035.6_GRCz11_genomic.dict" + gtf = "${params.igenomes_base}/Drerio/GRCz11/seq/GCF_000002035.6_GRCz11_genomic.gtf" // Aligner reference - bowtie2 = "${params.igenomes_base}/Drerio/GRCz11/bowtie2" - bwamem = "${params.igenomes_base}/Drerio/GRCz11/bwa" - bwamem2 = "${params.igenomes_base}/Drerio/GRCz11/bwamem2" - dragmap = "${params.igenomes_base}/Drerio/GRCz11/dragmap" - snap = "${params.igenomes_base}/Drerio/GRCz11/snapaligner" - star = "${params.igenomes_base}/Drerio/GRCz11/star" + bowtie2 = "${params.igenomes_base}/Drerio/GRCz11/bowtie2" + bwamem = "${params.igenomes_base}/Drerio/GRCz11/bwa" + bwamem2 = "${params.igenomes_base}/Drerio/GRCz11/bwamem2" + dragmap = "${params.igenomes_base}/Drerio/GRCz11/dragmap" + snap = "${params.igenomes_base}/Drerio/GRCz11/snapaligner" + star = "${params.igenomes_base}/Drerio/GRCz11/star" } // Legacy bcbio references - "hg38" { - fai = "${params.igenomes_base}/Hsapiens/hg38/seq/hg38.fa.fai" - fasta = "${params.igenomes_base}/Hsapiens/hg38/seq/hg38.fa" - dict = "${params.igenomes_base}/Hsapiens/hg38/seq/hg38.dict" - gtf = "${params.igenomes_base}/Hsapiens/hg38/seq/hg38.gtf" + hg38 { + fai = "${params.igenomes_base}/Hsapiens/hg38/seq/hg38.fa.fai" + fasta = "${params.igenomes_base}/Hsapiens/hg38/seq/hg38.fa" + dict = "${params.igenomes_base}/Hsapiens/hg38/seq/hg38.dict" + gtf = "${params.igenomes_base}/Hsapiens/hg38/seq/hg38.gtf" - bowtie2 = "${params.igenomes_base}/Hsapiens/hg38/bowtie2" - bwamem = "${params.igenomes_base}/Hsapiens/hg38/bwa" - bwamem2 = "${params.igenomes_base}/Hsapiens/hg38/bwamem2" - dragmap = "${params.igenomes_base}/Hsapiens/hg38/dragmap" - snap = "${params.igenomes_base}/Hsapiens/hg38/snapaligner" - star = "${params.igenomes_base}/Hsapiens/hg38/star" + bowtie2 = "${params.igenomes_base}/Hsapiens/hg38/bowtie2" + bwamem = "${params.igenomes_base}/Hsapiens/hg38/bwa" + bwamem2 = "${params.igenomes_base}/Hsapiens/hg38/bwamem2" + dragmap = "${params.igenomes_base}/Hsapiens/hg38/dragmap" + snap = "${params.igenomes_base}/Hsapiens/hg38/snapaligner" + star = "${params.igenomes_base}/Hsapiens/hg38/star" } - "hg38-noalt" { - fai = "${params.igenomes_base}/Hsapiens/hg38-noalt/seq/hg38-noalt.fa.fai" - fasta = "${params.igenomes_base}/Hsapiens/hg38-noalt/seq/hg38-noalt.fa" - dict = "${params.igenomes_base}/Hsapiens/hg38-noalt/seq/hg38-noalt.dict" - gtf = "${params.igenomes_base}/Hsapiens/hg38-noalt/seq/hg38-noalt.gtf" + 'hg38-noalt' { + fai = "${params.igenomes_base}/Hsapiens/hg38-noalt/seq/hg38-noalt.fa.fai" + fasta = "${params.igenomes_base}/Hsapiens/hg38-noalt/seq/hg38-noalt.fa" + dict = "${params.igenomes_base}/Hsapiens/hg38-noalt/seq/hg38-noalt.dict" + gtf = "${params.igenomes_base}/Hsapiens/hg38-noalt/seq/hg38-noalt.gtf" - bowtie2 = "${params.igenomes_base}/Hsapiens/hg38-noalt/bowtie2" - bwamem = "${params.igenomes_base}/Hsapiens/hg38-noalt/bwa" - bwamem2 = "${params.igenomes_base}/Hsapiens/hg38-noalt/bwamem2" - dragmap = "${params.igenomes_base}/Hsapiens/hg38-noalt/dragmap" - snap = "${params.igenomes_base}/Hsapiens/hg38-noalt/snapaligner" - star = "${params.igenomes_base}/Hsapiens/hg38-noalt/star" + bowtie2 = "${params.igenomes_base}/Hsapiens/hg38-noalt/bowtie2" + bwamem = "${params.igenomes_base}/Hsapiens/hg38-noalt/bwa" + bwamem2 = "${params.igenomes_base}/Hsapiens/hg38-noalt/bwamem2" + dragmap = "${params.igenomes_base}/Hsapiens/hg38-noalt/dragmap" + snap = "${params.igenomes_base}/Hsapiens/hg38-noalt/snapaligner" + star = "${params.igenomes_base}/Hsapiens/hg38-noalt/star" } } } - diff --git a/conf/modules.config b/conf/modules.config index 3def8896..4860b8e9 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -13,93 +13,93 @@ process { publishDir = [ - path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}"}, + path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals("versions.yml") ? null : filename } + saveAs: { filename -> filename.equals("versions.yml") ? null : filename }, ] // BCL convert withName: BCLCONVERT { - ext.args = {[ - meta.lane ? "--bcl-only-lane ${meta.lane}" : "", - "--force", - "--bcl-num-parallel-tiles ${task.cpus}", - "--bcl-num-conversion-threads ${task.cpus}", - "--bcl-num-compression-threads ${task.cpus}", - ].join(" ").trim()} + ext.args = { + [ + meta.lane ? "--bcl-only-lane ${meta.lane}" : "", + "--force", + "--bcl-num-parallel-tiles ${task.cpus}", + "--bcl-num-conversion-threads ${task.cpus}", + "--bcl-num-compression-threads ${task.cpus}", + ].join(" ").trim() + } publishDir = [ [ - // Gather and write InterOp files path: { "${params.outdir}/InterOp" }, mode: params.publish_dir_mode, overwrite: true, pattern: "**.bin", - saveAs: {filename -> filename.split("/")[-1] } + saveAs: { filename -> filename.split("/")[-1] }, ], [ - // Fetch RunInfo.xml path: { meta.lane ? "${params.outdir}/Reports/L00${meta.lane}" : "${params.outdir}/Reports/" }, mode: params.publish_dir_mode, pattern: "RunInfo.xml", overwrite: true, - saveAs: {filename -> filename.split("/")[-1] } + saveAs: { filename -> filename.split("/")[-1] }, ], [ - // Gather and write Reports path: { meta.lane ? "${params.outdir}/Reports/L00${meta.lane}" : "${params.outdir}/Reports/" }, mode: params.publish_dir_mode, pattern: "Reports", overwrite: true, - saveAs: {filename -> filename.split("/")[-1] } + saveAs: { filename -> filename.split("/")[-1] }, ], [ - // Gather and write Logs path: { meta.lane ? "${params.outdir}/Logs/L00${meta.lane}" : "${params.outdir}/Logs/" }, mode: params.publish_dir_mode, pattern: "Logs", overwrite: true, - saveAs: {filename -> filename.split("/")[-1] } + saveAs: { filename -> filename.split("/")[-1] }, ], [ - // don't write the fastq's pattern: "**.fastq.gz", - enabled: false - ] + enabled: false, + ], ] } // FastP withName: FASTP { - ext.args = {[ - meta.single_end && reads.size() > 5000000000 ? "--split_by_lines 400000000": "", - !meta.single_end && reads.any{ f -> f.size() > 5000000000 } ? "--split_by_lines 400000000": "", - params.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", - params.trim_front > 0 ? "--trim_front1 ${params.trim_front}" : "", - params.trim_tail > 0 ? "--trim_tail1 ${params.trim_tail}" : "", - params.adapter_R1 ? "--adapter_sequence ${params.adapter_R1}" : "", - params.adapter_R2 ? "--adapter_sequence_r2 ${params.adapter_R2}" : "", - "--compression 1" - ].join(" ").trim()} + ext.args = { + [ + meta.single_end && reads.size() > 5000000000 ? "--split_by_lines 400000000" : "", + !meta.single_end && reads.any { f -> f.size() > 5000000000 } ? "--split_by_lines 400000000" : "", + params.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", + params.trim_front > 0 ? "--trim_front1 ${params.trim_front}" : "", + params.trim_tail > 0 ? "--trim_tail1 ${params.trim_tail}" : "", + params.adapter_R1 ? "--adapter_sequence ${params.adapter_R1}" : "", + params.adapter_R2 ? "--adapter_sequence_r2 ${params.adapter_R2}" : "", + "--compression 1", + ].join(" ").trim() + } publishDir = [ [ path: { "${params.outdir}/${meta.samplename}" }, mode: params.publish_dir_mode, - pattern: "*.{html,json}" - ], + pattern: "*.{html,json}", + ] ] } // FASTQ_TO_UCRAM //// Samtools Import - withName: ".*FASTQ_TO_UCRAM:SAMTOOLS_IMPORT" { - label = "process_medium" - // WARNING: Do NOT escape the RG tag tabs when adding a readgroup - ext.args = {[ - meta.readgroup ? "--rg-line \"@RG\t" + meta.readgroup.findResults{ it.value?.trim() ? "$it.key:$it.value" : null }.join("\t") + "\"" : "", - "--output-fmt cram", - "--output-fmt-option archive" - ].join(" ").trim()} - publishDir = [ enabled: false ] + withName: '.*FASTQ_TO_UCRAM:SAMTOOLS_IMPORT' { + label = "process_medium" + ext.args = { + [ + meta.readgroup ? "--rg-line \"@RG\t" + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join("\t") + "\"" : "", + "--output-fmt cram", + "--output-fmt-option archive", + ].join(" ").trim() + } + publishDir = [enabled: false] } // FASTQ_TO_CRAM @@ -115,44 +115,50 @@ process { // FASTQ_ALIGN_DNA - withName:".*:FASTQ_ALIGN_DNA:.*" { - publishDir = [ enabled: false ] + withName: '.*:FASTQ_ALIGN_DNA:.*' { + publishDir = [enabled: false] } //// Bowtie2 withName: BOWTIE2_ALIGN { - ext.args = {[ - "--local", - "--fast-local", - meta.readgroup ? "--rg-id ${meta.readgroup.ID}": "", - meta.readgroup ? "--rg " + meta.readgroup.findResults{ it.value?.trim() ? "$it.key:$it.value" : null }.join(" --rg ") : "" - ].join(" ").trim()} - ext.args2 = "--fast" + ext.args = { + [ + "--local", + "--fast-local", + meta.readgroup ? "--rg-id ${meta.readgroup.ID}" : "", + meta.readgroup ? "--rg " + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join(" --rg ") : "", + ].join(" ").trim() + } + ext.args2 = "--fast" publishDir = [ - path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}"}, + path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}" }, mode: params.publish_dir_mode, - pattern: "*.log" + pattern: "*.log", ] } //// BWA mem/BWA mem2 - withName: "BWAMEM.*_MEM" { - ext.args = {[ - "-K 100000000", - "-p", - "-v 3", - "-Y", - "-c 250", - meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults{ it.value?.trim() ? "$it.key:$it.value" : null }.join("\\t") + "\"" : "" - ].join(" ").trim()} + withName: 'BWAMEM.*_MEM' { + ext.args = { + [ + "-K 100000000", + "-p", + "-v 3", + "-Y", + "-c 250", + meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join("\\t") + "\"" : "", + ].join(" ").trim() + } ext.args2 = "--fast" } //// DRAGEN withName: DRAGMAP_ALIGN { - ext.args = {[ - meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults{ it.value?.trim() ? "$it.key:$it.value" : null }.join("\\t") + "\"" : "" - ].join(" ").trim()} + ext.args = { + [ + meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join("\\t") + "\"" : "" + ].join(" ").trim() + } ext.args2 = "--fast" } @@ -166,151 +172,147 @@ process { //// SNAP withName: SNAP_ALIGN { - ext.args = {[ - "-b-", - "-sm 20", - "-I", - "-hc-", - "-S id", - "-sa", - "-xf 2", - meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults{ it.value?.trim() ? "$it.key:$it.value" : null }.join("\\t") + "\"" : "" - ].join(" ").trim()} + ext.args = { + [ + "-b-", + "-sm 20", + "-I", + "-hc-", + "-S id", + "-sa", + "-xf 2", + meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join("\\t") + "\"" : "", + ].join(" ").trim() + } } // FASTQ_ALIGN_RNA - withName:".*FASTQ_ALIGN_RNA:.*" { - publishDir = [ enabled: false ] + withName: '.*FASTQ_ALIGN_RNA:.*' { + publishDir = [enabled: false] } withName: STAR_ALIGN { - ext.args = {[ - // support compressed inputs - "--readFilesCommand gunzip -c", - // basic 2-pass mapping, with all 1st pass junctions inserted into the genome indices on the fly - "--twopassMode Basic", - // output unsorted BAM - "--outSAMtype BAM Unsorted", - // output unmapped reads in the unsorted bam file - "--outSAMunmapped Within", - // output all the fields in the SAM format - "--outSAMattributes All", - // the minimum mapped length of two segments in a chimeric alignment - "--chimSegmentMin 20", - // alignment will be output only if it has no more mismatches than this value. - "--outFilterMismatchNmax 4", - // set the readgroup info, if available. Flag arg MUST start with 'ID' tag - meta.readgroup ? "--outSAMattrRGline \"ID:${meta.readgroup.ID}" + meta.readgroup.findResults{ it.value?.trim() && it.key != "ID" ? "$it.key:$it.value" : null }.join(" ") + "\"" : "" - ].join(" ").trim()} + ext.args = { + [ + "--readFilesCommand gunzip -c", + "--twopassMode Basic", + "--outSAMtype BAM Unsorted", + "--outSAMunmapped Within", + "--outSAMattributes All", + "--chimSegmentMin 20", + "--outFilterMismatchNmax 4", + meta.readgroup ? "--outSAMattrRGline \"ID:${meta.readgroup.ID}" + meta.readgroup.findResults { it.value?.trim() && it.key != "ID" ? "${it.key}:${it.value}" : null }.join(" ") + "\"" : "", + ].join(" ").trim() + } } //// Samtools sormadup - withName: ".*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP" { - ext.prefix = {"${meta.id}.merged"} - ext.args5 = {[ - "-s", // print some stats - "--json", // output stats in json format for MultiQC - "-d 2500", // The optical duplicate distance - params.umi_aware ? "--barcode-name" : "", // Use the UMI/barcode embedded in the read name (eigth colon delimited part). - "--write-index", // Write csi/crai index - "--output-fmt cram", // Output format - "--output-fmt-option archive" // Cram compression level - ].join(" ").trim()} + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { + ext.prefix = { "${meta.id}.merged" } + ext.args5 = { + [ + "-s", + "--json", + "-d 2500", + params.umi_aware ? "--barcode-name" : "", + "--write-index", + "--output-fmt cram", + "--output-fmt-option archive", + ].join(" ").trim() + } publishDir = [ [ path: { "${params.outdir}/${meta.samplename}" }, mode: params.publish_dir_mode, pattern: "*metrics*", - saveAs: {filename -> filename.replace("metrics", "duplicate_metrics").replace(".merged","")} + saveAs: { filename -> filename.replace("metrics", "duplicate_metrics").replace(".merged", "") }, ], [ path: { "${params.outdir}/${meta.samplename}" }, mode: params.publish_dir_mode, pattern: "*cram*", - saveAs: {filename -> filename.replace(".merged", "")} + saveAs: { filename -> filename.replace(".merged", "") }, ], ] } //// Samtools multisort - withName: ".*FASTQ_TO_CRAM:SAMTOOLS_SORT" { - ext.prefix = {"${meta.id}.merged"} - ext.args = {[ - "--write-index", - "--output-fmt cram", - "--output-fmt-option archive" - ].join(" ").trim()} + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.merged" } + ext.args = { + [ + "--write-index", + "--output-fmt cram", + "--output-fmt-option archive", + ].join(" ").trim() + } publishDir = [ [ path: { "${params.outdir}/${meta.samplename}" }, mode: params.publish_dir_mode, pattern: "*cram*", - saveAs: {filename -> filename.replace(".merged", "")} - ], + saveAs: { filename -> filename.replace(".merged", "") }, + ] ] } //// BioBamBam Bamsormadup - withName: ".*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP" { - ext.prefix = {"${meta.id}.merged"} - ext.args = {[ - "indexfilename=${meta.id}.merged.bam.bai", - "optminpixeldif=2500" - ].join(" ").trim()} - ext.args2 = "exclude=QCFAIL" + withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' { + ext.prefix = { "${meta.id}.merged" } + ext.args = { + [ + "indexfilename=${meta.id}.merged.bam.bai", + "optminpixeldif=2500", + ].join(" ").trim() + } + ext.args2 = "exclude=QCFAIL" publishDir = [ [ path: { "${params.outdir}/${meta.samplename}" }, mode: params.publish_dir_mode, pattern: "*metrics*", - saveAs: {filename -> filename.replace("metrics", "duplicate_metrics").replace(".merged","")} + saveAs: { filename -> filename.replace("metrics", "duplicate_metrics").replace(".merged", "") }, ] ] } //// Samtools convert - withName: ".*FASTQ_TO_CRAM:SAMTOOLS_CONVERT" { - cpus = 8 - memory = 64.GB - ext.args = {[ - "-C", - "--output-fmt cram", - "--output-fmt-option archive" - ].join(" ").trim()} + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' { + cpus = 8 + memory = 64.GB + ext.args = { + [ + "-C", + "--output-fmt cram", + "--output-fmt-option archive", + ].join(" ").trim() + } publishDir = [ [ path: { "${params.outdir}/${meta.samplename}" }, mode: params.publish_dir_mode, pattern: "*cram*", - saveAs: {filename -> filename.replace(".merged", "")} - ], + saveAs: { filename -> filename.replace(".merged", "") }, + ] ] } // coverage //// Mosdepth - withName: ".*COVERAGE:MOSDEPTH" { - cpus = 4 - memory = { 4.GB * task.attempt } - // filter reads with flag 1804 - // read unmapped (0x4) - // mate unmapped (0x8)* - // not primary alignment (0x100) - // read fails platform/vendor quality checks (0x200) - // read is PCR or optical duplicate (0x400) - // filter reads with MAPQ < 1 - // quantize coverage to 4 bins + withName: '.*COVERAGE:MOSDEPTH' { + cpus = 4 + memory = { 4.GB * task.attempt } ext.args = [ "--flag 1804", "--mapq 1", - "--quantize 0:1:4:" + "--quantize 0:1:4:", ].join(" ").trim() } //// Samtools coverage - withName: ".*:COVERAGE:SAMTOOLS_COVERAGE" { - ext.prefix = {"${meta.id}.coverage"} + withName: '.*:COVERAGE:SAMTOOLS_COVERAGE' { + ext.prefix = { "${meta.id}.coverage" } } //// CoverageQC (Multiqc) @@ -325,34 +327,33 @@ process { path: { "${params.outdir}/${meta.samplename}" }, mode: params.publish_dir_mode, pattern: "*.md5", - saveAs: {filename -> filename.replace(".merged", "")} + saveAs: { filename -> filename.replace(".merged", "") }, ] ] } // QC - withName: ".*BAM_QC.*" { + withName: '.*BAM_QC.*' { cpus = 1 } //// Picard - withName: ".*PICARD.*" { - memory = { 8.GB * task.attempt } + withName: '.*PICARD.*' { + memory = { 8.GB * task.attempt } ext.args = "--MAX_RECORDS_IN_RAM 15000000" } // MultiQC - withName: 'MULTIQC' { - ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + withName: MULTIQC { + ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' } publishDir = [ path: { "${params.outdir}/multiqc" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, ] } - } env { diff --git a/conf/profiles/WES.config b/conf/profiles/WES.config index ea2298c4..cc0a4acc 100644 --- a/conf/profiles/WES.config +++ b/conf/profiles/WES.config @@ -1,7 +1,7 @@ params { - aligner = "snap" - run_coverage = true - disable_picard_metrics = false - roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" - genelists = "${params.igenomes_base}/Hsapiens/GRCh38/regions/genelists" + aligner = "snap" + run_coverage = true + disable_picard_metrics = false + roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" + genelists = "${params.igenomes_base}/Hsapiens/GRCh38/regions/genelists" } diff --git a/conf/profiles/WGS.config b/conf/profiles/WGS.config index 39180f15..2e1f2c11 100644 --- a/conf/profiles/WGS.config +++ b/conf/profiles/WGS.config @@ -1,7 +1,7 @@ params { - aligner = "snap" - markdup = "samtools" - umi_aware = true - run_coverage = true - disable_picard_metrics = false + aligner = "snap" + markdup = "samtools" + umi_aware = true + run_coverage = true + disable_picard_metrics = false } diff --git a/conf/profiles/copgt.config b/conf/profiles/copgt.config index 71ba2c69..21a5bb45 100644 --- a/conf/profiles/copgt.config +++ b/conf/profiles/copgt.config @@ -1,14 +1,14 @@ params { - aligner = "snap" - run_coverage = true - disable_picard_metrics = true - roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_coPGT-M_analyses_ROI_v1.bed" + aligner = "snap" + run_coverage = true + disable_picard_metrics = true + roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_coPGT-M_analyses_ROI_v1.bed" // trimming options - skip_trimming = false - trim_front = 6 - adapter_R1 = "CAGATC" + skip_trimming = false + trim_front = 6 + adapter_R1 = "CAGATC" // markduplicates options - markdup = false + markdup = false } diff --git a/conf/profiles/s3_ugent.config b/conf/profiles/s3_ugent.config index 12648118..d29f80a0 100644 --- a/conf/profiles/s3_ugent.config +++ b/conf/profiles/s3_ugent.config @@ -1,7 +1,7 @@ aws { client { - endpoint = "https://s3.ugent.be" - protocol = "https" + endpoint = "https://s3.ugent.be" + protocol = "https" s3PathStyleAccess = true connectionTimeout = 60000 } diff --git a/conf/profiles/sWGS.config b/conf/profiles/sWGS.config index f34e5eb0..11be5b28 100644 --- a/conf/profiles/sWGS.config +++ b/conf/profiles/sWGS.config @@ -1,6 +1,5 @@ params { - aligner = "bowtie2" - run_coverage = false - disable_picard_metrics = true + aligner = "bowtie2" + run_coverage = false + disable_picard_metrics = true } - diff --git a/conf/test.config b/conf/test.config index 4b9d390e..930c4538 100644 --- a/conf/test.config +++ b/conf/test.config @@ -15,24 +15,26 @@ params { config_profile_description = 'Minimal test dataset to check pipeline function' // Input data - input = "${projectDir}/tests/inputs/fastq.yml" - igenomes_base = "s3://reference-data/genomes" - aligner = "bwamem" + input = "${projectDir}/tests/inputs/fastq.yml" + igenomes_base = "s3://reference-data/genomes" + aligner = "bwamem" } process { resourceLimits = [ cpus: 2, memory: 6.GB, - time: 6.h + time: 6.h, ] withName: BCLCONVERT { - ext.args = {[ - meta.lane ? "--bcl-only-lane ${meta.lane}" : "", - "--force", - "--first-tile-only true" - ].join(" ").trim()} + ext.args = { + [ + meta.lane ? "--bcl-only-lane ${meta.lane}" : "", + "--force", + "--first-tile-only true", + ].join(" ").trim() + } } } diff --git a/conf/test_full.config b/conf/test_full.config index 07c5c697..1d49a288 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -17,8 +17,8 @@ params { // Input data for full size test // TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA) // TODO nf-core: Give any required params for the test so that command line flags are not needed - input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' + input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' // Genome references - genome = 'R64-1-1' + genome = 'R64-1-1' } diff --git a/main.nf b/main.nf index 466854ee..4ef95130 100644 --- a/main.nf +++ b/main.nf @@ -18,43 +18,6 @@ nextflow.enable.dsl = 2 include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_preprocessing_pipeline' include { PREPROCESSING } from './workflows/preprocessing' include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_preprocessing_pipeline' - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - NAMED WORKFLOWS FOR PIPELINE -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -// -// WORKFLOW: Run main analysis pipeline depending on type of input -// -workflow NFCMGG_PREPROCESSING { - - take: - samplesheet // channel: samplesheet read in from --input - genomes // map: genome reference files - aligner // string: aligner to use - markdup // string: markdup method to use - roi // string: region of interest to use - genelists // file: directory containing genelist bed files for coverage analysis - main: - - // - // WORKFLOW: Run pipeline - // - PREPROCESSING ( - samplesheet, - genomes, - aligner, - markdup, - roi, - genelists - ) - - emit: - multiqc_report = PREPROCESSING.out.multiqc_report // channel: /path/to/multiqc_report.html - -} /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ RUN MAIN WORKFLOW @@ -63,23 +26,21 @@ workflow NFCMGG_PREPROCESSING { workflow { - main: - // // SUBWORKFLOW: Run initialisation tasks // - PIPELINE_INITIALISATION ( + PIPELINE_INITIALISATION( params.version, params.validate_params, args, params.outdir, - params.input + params.input, ) // // WORKFLOW: Run main workflow // - NFCMGG_PREPROCESSING ( + NFCMGG_PREPROCESSING( PIPELINE_INITIALISATION.out.samplesheet, params.genomes, params.aligner, @@ -91,19 +52,49 @@ workflow { // // SUBWORKFLOW: Run completion tasks // - PIPELINE_COMPLETION ( + PIPELINE_COMPLETION( params.email, params.email_on_fail, params.plaintext_email, params.outdir, params.monochrome_logs, params.hook_url, - NFCMGG_PREPROCESSING.out.multiqc_report + NFCMGG_PREPROCESSING.out.multiqc_report, ) } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - THE END + NAMED WORKFLOWS FOR PIPELINE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +// +// WORKFLOW: Run main analysis pipeline depending on type of input +// +workflow NFCMGG_PREPROCESSING { + take: + samplesheet // channel: samplesheet read in from --input + genomes // map: genome reference files + aligner // string: aligner to use + markdup // string: markdup method to use + roi // string: region of interest to use + genelists // file: directory containing genelist bed files for coverage analysis + + main: + + // + // WORKFLOW: Run pipeline + // + PREPROCESSING( + samplesheet, + genomes, + aligner, + markdup, + roi, + genelists, + ) + + emit: + multiqc_report = PREPROCESSING.out.multiqc_report // channel: /path/to/multiqc_report.html +} diff --git a/modules/local/panelcoverage/main.nf b/modules/local/panelcoverage/main.nf index 7b38328a..a731f817 100644 --- a/modules/local/panelcoverage/main.nf +++ b/modules/local/panelcoverage/main.nf @@ -1,18 +1,18 @@ process PANELCOVERAGE { - 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/bedtools:2.31.1--hf5e1c6e_1' : - 'biocontainers/bedtools:2.31.1--hf5e1c6e_1' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container + ? 'https://depot.galaxyproject.org/singularity/bedtools:2.31.1--hf5e1c6e_1' + : 'biocontainers/bedtools:2.31.1--hf5e1c6e_1'}" input: tuple val(meta), path(perbase), path(perbase_index), path(genelists) output: tuple val(meta), path("*.mosdepth.region.dist.txt"), emit: regiondist - path "versions.yml" , emit: versions + path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when @@ -20,7 +20,7 @@ process PANELCOVERAGE { script: def prefix = task.ext.prefix ?: "${meta.id}" """ - for GENELIST in $genelists + for GENELIST in ${genelists} do cmgg_genelists regiondist --samplename ${prefix} --perbase ${perbase} --genelist \$GENELIST done @@ -35,7 +35,7 @@ process PANELCOVERAGE { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - for GENELIST in $genelists + for GENELIST in ${genelists} do name=\$(basename \$GENELIST .bed) touch ${prefix}_\${name}.mosdepth.region.dist.txt diff --git a/nextflow.config b/nextflow.config index 3aeba7ac..00399037 100644 --- a/nextflow.config +++ b/nextflow.config @@ -250,7 +250,7 @@ dag { manifest { name = 'nf-cmgg/preprocessing' - author = """CMGG ICT team""" + contributors = """CMGG ICT team""" homePage = 'https://github.com/nf-cmgg/preprocessing' description = """Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data.""" mainScript = 'main.nf' diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index 0cb82f0c..a87c62f6 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -1,7 +1,7 @@ // samtools modules -include { SAMTOOLS_STATS } from '../../../modules/nf-core/samtools/stats/main' -include { SAMTOOLS_IDXSTATS } from '../../../modules/nf-core/samtools/idxstats/main' -include { SAMTOOLS_FLAGSTAT } from '../../../modules/nf-core/samtools/flagstat/main' +include { SAMTOOLS_STATS } from '../../../modules/nf-core/samtools/stats/main' +include { SAMTOOLS_IDXSTATS } from '../../../modules/nf-core/samtools/idxstats/main' +include { SAMTOOLS_FLAGSTAT } from '../../../modules/nf-core/samtools/flagstat/main' // picard modules include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/nf-core/picard/collectmultiplemetrics/main' @@ -10,27 +10,31 @@ include { PICARD_COLLECTWGSMETRICS } from '../../../modules/nf-core/picard/ workflow BAM_QC { take: - ch_bam_bai_roi_fasta_fai_dict // channel: [ val(meta), path(bam), path(bai), path(roi), path(fasta), path(fai), path(dict)] - disable_picard // boolean + ch_bam_bai_roi_fasta_fai_dict // channel: [ val(meta), path(bam), path(bai), path(roi), path(fasta), path(fai), path(dict)] + disable_picard // boolean main: ch_versions = Channel.empty() ch_bam_bai_roi_fasta_fai_dict - .map{ meta, bam, bai, _roi, fasta, _fai, _dict -> return [meta, bam, bai, fasta]} - .set{ ch_bam_bai_fasta } + .map { meta, bam, bai, _roi, fasta, _fai, _dict -> + return [meta, bam, bai, fasta] + } + .set { ch_bam_bai_fasta } - SAMTOOLS_STATS ( ch_bam_bai_fasta ) + SAMTOOLS_STATS(ch_bam_bai_fasta) ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions.first()) ch_bam_bai_fasta - .map{ meta, bam, bai, _fasta -> return [meta, bam, bai]} - .set{ ch_bam_bai } + .map { meta, bam, bai, _fasta -> + return [meta, bam, bai] + } + .set { ch_bam_bai } - SAMTOOLS_FLAGSTAT ( ch_bam_bai ) + SAMTOOLS_FLAGSTAT(ch_bam_bai) ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions.first()) - SAMTOOLS_IDXSTATS ( ch_bam_bai ) + SAMTOOLS_IDXSTATS(ch_bam_bai) ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions.first()) ch_picard_hsmetrics = Channel.empty() @@ -39,37 +43,39 @@ workflow BAM_QC { if (!disable_picard) { ch_bam_bai_roi_fasta_fai_dict - .map{ meta, bam, bai, _roi, fasta, fai, _dict -> return [meta, bam, bai, fasta, fai]} - .set{ ch_bam_bai_fasta_fai } + .map { meta, bam, bai, _roi, fasta, fai, _dict -> + return [meta, bam, bai, fasta, fai] + } + .set { ch_bam_bai_fasta_fai } - PICARD_COLLECTMULTIPLEMETRICS ( ch_bam_bai_fasta_fai ) + PICARD_COLLECTMULTIPLEMETRICS(ch_bam_bai_fasta_fai) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) ch_picard_multiplemetrics = ch_picard_multiplemetrics.mix(PICARD_COLLECTMULTIPLEMETRICS.out.metrics) ch_bam_bai_roi_fasta_fai_dict - .branch{ meta, bam, bai, roi, fasta, fai, dict -> - hsmetrics : roi != [] + .branch { meta, bam, bai, roi, fasta, fai, dict -> + hsmetrics: roi != [] return [meta, bam, bai, roi, roi, fasta, fai, dict] - wgsmetrics : roi == [] + wgsmetrics: roi == [] return [meta, bam, bai, fasta, fai] - } - .set{ch_picard} + } + .set { ch_picard } - PICARD_COLLECTWGSMETRICS ( ch_picard.wgsmetrics, [] ) + PICARD_COLLECTWGSMETRICS(ch_picard.wgsmetrics, []) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) ch_picard_wgsmetrics = ch_picard_wgsmetrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) - PICARD_COLLECTHSMETRICS ( ch_picard.hsmetrics ) + PICARD_COLLECTHSMETRICS(ch_picard.hsmetrics) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) ch_picard_hsmetrics = ch_picard_hsmetrics.mix(PICARD_COLLECTHSMETRICS.out.metrics) } emit: - samtools_stats = SAMTOOLS_STATS.out.stats - samtools_flagstat = SAMTOOLS_FLAGSTAT.out.flagstat - samtools_idxstats = SAMTOOLS_IDXSTATS.out.idxstats - picard_multiplemetrics = ch_picard_multiplemetrics - picard_wgsmetrics = ch_picard_wgsmetrics - picard_hsmetrics = ch_picard_hsmetrics - versions = ch_versions + samtools_stats = SAMTOOLS_STATS.out.stats + samtools_flagstat = SAMTOOLS_FLAGSTAT.out.flagstat + samtools_idxstats = SAMTOOLS_IDXSTATS.out.idxstats + picard_multiplemetrics = ch_picard_multiplemetrics + picard_wgsmetrics = ch_picard_wgsmetrics + picard_hsmetrics = ch_picard_hsmetrics + versions = ch_versions } diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 634ecf02..bf3b187b 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -1,69 +1,65 @@ #!/usr/bin/env nextflow // MODULES -include { MOSDEPTH } from "../../../modules/nf-core/mosdepth/main.nf" -include { SAMTOOLS_COVERAGE } from "../../../modules/nf-core/samtools/coverage/main" -include { PANELCOVERAGE } from "../../../modules/local/panelcoverage/main" +include { MOSDEPTH } from "../../../modules/nf-core/mosdepth/main.nf" +include { SAMTOOLS_COVERAGE } from "../../../modules/nf-core/samtools/coverage/main" +include { PANELCOVERAGE } from "../../../modules/local/panelcoverage/main" workflow COVERAGE { take: - ch_meta_cram_crai_fasta_fai_roi // channel: [mandatory] [meta, cram, crai, fasta, fai, roi] - ch_genelists // channel: [optional] [genelists] + ch_meta_cram_crai_fasta_fai_roi // channel: [mandatory] [meta, cram, crai, fasta, fai, roi] + ch_genelists // channel: [optional] [genelists] + main: - ch_versions = Channel.empty() - ch_coverageqc_files = Channel.empty() + ch_versions = Channel.empty() + ch_coverageqc_files = Channel.empty() - MOSDEPTH( - ch_meta_cram_crai_fasta_fai_roi.map{ - meta, cram, crai, fasta, _fai, roi -> - return [meta, cram, crai, roi, fasta] - } - ) - ch_versions = ch_versions.mix(MOSDEPTH.out.versions.first()) + MOSDEPTH( + ch_meta_cram_crai_fasta_fai_roi.map { meta, cram, crai, fasta, _fai, roi -> + return [meta, cram, crai, roi, fasta] + } + ) + ch_versions = ch_versions.mix(MOSDEPTH.out.versions.first()) - SAMTOOLS_COVERAGE( - ch_meta_cram_crai_fasta_fai_roi.map{ - meta, cram, crai, fasta, fai, _roi -> - return [meta, cram, crai, fasta, fai] - } - ) - ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) - ch_coverageqc_files = ch_coverageqc_files.merge(SAMTOOLS_COVERAGE.out.coverage) + SAMTOOLS_COVERAGE( + ch_meta_cram_crai_fasta_fai_roi.map { meta, cram, crai, fasta, fai, _roi -> + return [meta, cram, crai, fasta, fai] + } + ) + ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) + ch_coverageqc_files = ch_coverageqc_files.merge(SAMTOOLS_COVERAGE.out.coverage) - ch_genelists.view() + ch_genelists.view() - PANELCOVERAGE( - MOSDEPTH.out.per_base_bed - .join(MOSDEPTH.out.per_base_csi) - .combine(ch_genelists) - .map{meta, bed, index, genelists -> - if (genelists !instanceof List){ - // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... - genelists = [genelists] - } - def filtered_genelists = meta.tag.toLowerCase() == "seqcap" ? - genelists.findAll{it.name.toLowerCase().contains("seqcap")} : - genelists.findAll{!it.name.toLowerCase().contains("seqcap")} + PANELCOVERAGE( + MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).map { meta, bed, index, genelists -> + if (genelists !instanceof List) { + // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... + genelists = [genelists] + } + def filtered_genelists = meta.tag.toLowerCase() == "seqcap" + ? genelists.findAll { it.name.toLowerCase().contains("seqcap") } + : genelists.findAll { !it.name.toLowerCase().contains("seqcap") } - if (filtered_genelists.size() > 0) { - return [ - meta, - bed, - index, - filtered_genelists - ] - } + if (filtered_genelists.size() > 0) { + return [ + meta, + bed, + index, + filtered_genelists, + ] } - ) - ch_versions = ch_versions.mix(PANELCOVERAGE.out.versions.first()) - ch_coverageqc_files = ch_coverageqc_files.mix(PANELCOVERAGE.out.regiondist) + } + ) + ch_versions = ch_versions.mix(PANELCOVERAGE.out.versions.first()) + ch_coverageqc_files = ch_coverageqc_files.mix(PANELCOVERAGE.out.regiondist) emit: - mosdepth_summary = MOSDEPTH.out.summary_txt - mosdepth_global = MOSDEPTH.out.global_txt - mosdepth_regions = MOSDEPTH.out.regions_txt - samtools_coverage = SAMTOOLS_COVERAGE.out.coverage - panelcoverage = PANELCOVERAGE.out.regiondist - versions = ch_versions + mosdepth_summary = MOSDEPTH.out.summary_txt + mosdepth_global = MOSDEPTH.out.global_txt + mosdepth_regions = MOSDEPTH.out.regions_txt + samtools_coverage = SAMTOOLS_COVERAGE.out.coverage + panelcoverage = PANELCOVERAGE.out.regiondist + versions = ch_versions } diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index e78ec428..859ca5a3 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -9,37 +9,39 @@ include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" workflow FASTQ_ALIGN_RNA { take: - ch_reads_aligner_index_gtf // channel: [mandatory] reads, aligner, index, gtf + ch_reads_aligner_index_gtf // channel: [mandatory] reads, aligner, index, gtf main: - ch_bam = Channel.empty() - ch_reports = Channel.empty() - ch_versions = Channel.empty() + ch_bam = Channel.empty() + ch_reports = Channel.empty() + ch_versions = Channel.empty() - ch_reads_aligner_index_gtf.branch { meta, reads, aligner, index, gtf -> + ch_reads_aligner_index_gtf + .branch { meta, reads, aligner, index, gtf -> star: aligner == 'star' - return [meta, reads, index, gtf] + return [meta, reads, index, gtf] other: true } - .set{ch_to_align} - - // Throw error for all samples with unsupported aligners - ch_to_align.other.map{ meta, _reads, aligner, _index, _fasta -> - error "Unsupported aligner ${aligner} for sample ${meta.id}" - } - - // Align fastq files to reference genome - STAR_ALIGN(ch_to_align.star, "Illumina", "CMGG") // if aligner is STAR - ch_bam = ch_bam.mix(STAR_ALIGN.out.bam) - ch_reports = ch_reports.mix( - STAR_ALIGN.out.log_final, - STAR_ALIGN.out.log_progress, - STAR_ALIGN.out.log_out - ) - ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) + .set { ch_to_align } + + // Throw error for all samples with unsupported aligners + ch_to_align.other.map { meta, _reads, aligner, _index, _fasta -> + error("Unsupported aligner ${aligner} for sample ${meta.id}") + } + + // Align fastq files to reference genome + STAR_ALIGN(ch_to_align.star, "Illumina", "CMGG") + // if aligner is STAR + ch_bam = ch_bam.mix(STAR_ALIGN.out.bam) + ch_reports = ch_reports.mix( + STAR_ALIGN.out.log_final, + STAR_ALIGN.out.log_progress, + STAR_ALIGN.out.log_out, + ) + ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) emit: - bam = ch_bam // channel: [ [meta], bam ] - reports = ch_reports // channel: [ [meta], log ] - versions = ch_versions // channel: [ versions.yml ] + bam = ch_bam // channel: [ [meta], bam ] + reports = ch_reports // channel: [ [meta], log ] + versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index 2ec92389..afed2cc2 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -11,152 +11,156 @@ include { SAMTOOLS_SORMADUP } from "../../../modules/nf-core/samtools/sormad include { SAMTOOLS_SORT } from "../../../modules/nf-core/samtools/sort/main" // SUBWORKFLOWS -include { FASTQ_ALIGN_DNA } from '../../nf-core/fastq_align_dna/main' -include { FASTQ_ALIGN_RNA } from '../../local/fastq_align_rna/main' +include { FASTQ_ALIGN_DNA } from '../../nf-core/fastq_align_dna/main' +include { FASTQ_ALIGN_RNA } from '../../local/fastq_align_rna/main' // FUNCTIONS -include { getGenomeAttribute } from '../../local/utils_nfcore_preprocessing_pipeline' +include { getGenomeAttribute } from '../../local/utils_nfcore_preprocessing_pipeline' workflow FASTQ_TO_CRAM { take: - ch_meta_reads_aligner_index_fasta_gtf // channel: [mandatory] [meta, [fastq, ...], aligner [bowtie2, bwamem, bwamem2, dragmap, snap, star], aligner_index, fasta, gtf] - markdup // string: [optional ] markdup [bamsormadup, samtools, false] + ch_meta_reads_aligner_index_fasta_gtf // channel: [mandatory] [meta, [fastq, ...], aligner [bowtie2, bwamem, bwamem2, dragmap, snap, star], aligner_index, fasta, gtf] + markdup // string: [optional ] markdup [bamsormadup, samtools, false] main: - ch_versions = Channel.empty() - ch_multiqc_files = Channel.empty() + ch_versions = Channel.empty() + ch_multiqc_files = Channel.empty() - /* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: ALIGNMENT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_meta_reads_aligner_index_fasta_gtf.dump(tag: "FASTQ_TO_CRAM: reads to align",pretty: true) + ch_meta_reads_aligner_index_fasta_gtf.dump(tag: "FASTQ_TO_CRAM: reads to align", pretty: true) - ch_meta_reads_aligner_index_fasta_gtf - .branch { meta, reads, aligner, index, fasta, gtf -> - rna: meta.sample_type == "RNA" - return [meta, reads, "star", index, gtf] - dna: meta.sample_type == "DNA" || meta.sample_type == "Tissue" - return [meta, reads, aligner, index, fasta] - } - .set { ch_meta_reads_aligner_index_fasta_datatype } - - // align fastq files per sample - // ALIGNMENT([meta,fastq], index, sort) - FASTQ_ALIGN_DNA( - ch_meta_reads_aligner_index_fasta_datatype.dna, - false - ) - ch_versions = ch_versions.mix(FASTQ_ALIGN_DNA.out.versions) - - FASTQ_ALIGN_RNA( - ch_meta_reads_aligner_index_fasta_datatype.rna - ) - ch_versions = ch_versions.mix(FASTQ_ALIGN_DNA.out.versions) - - /* + ch_meta_reads_aligner_index_fasta_gtf + .branch { meta, reads, aligner, index, fasta, gtf -> + rna: meta.sample_type == "RNA" + return [meta, reads, "star", index, gtf] + dna: meta.sample_type == "DNA" || meta.sample_type == "Tissue" + return [meta, reads, aligner, index, fasta] + } + .set { ch_meta_reads_aligner_index_fasta_datatype } + + // align fastq files per sample + // ALIGNMENT([meta,fastq], index, sort) + FASTQ_ALIGN_DNA( + ch_meta_reads_aligner_index_fasta_datatype.dna, + false, + ) + ch_versions = ch_versions.mix(FASTQ_ALIGN_DNA.out.versions) + + FASTQ_ALIGN_RNA( + ch_meta_reads_aligner_index_fasta_datatype.rna + ) + ch_versions = ch_versions.mix(FASTQ_ALIGN_DNA.out.versions) + + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: MARK DUPLICATES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - FASTQ_ALIGN_DNA.out.bam + FASTQ_ALIGN_DNA.out.bam .mix(FASTQ_ALIGN_RNA.out.bam) - .map { - meta, files -> + .map { meta, files -> def gk = (meta.chunks as Integer ?: 1) return [ groupKey( - // Remove the chunk prefix from the id when present, remove readgroup and chunks from meta meta - meta.subMap('readgroup', 'chunks') + [id: meta.id ==~ /^\d{4}\..*$/ ? meta.id[5..-1] : meta.id], - gk + gk, ), - files + files, ] } - .groupTuple() // Group all files in the same lane - .map { - meta, files -> + .groupTuple() + .map { meta, files -> def gk = (meta.count as Integer ?: 1) return [ groupKey( - // drop count and set id to samplename meta - meta.subMap('count') + [id: meta.samplename ?: meta.id], - gk + gk, ), - files + files, ] } - .groupTuple() // Group all files from the same sample + .groupTuple() .map { meta, files -> return [meta, files.flatten(), getGenomeAttribute(meta.genome_data, 'fasta')] } - .set{ch_bam_fasta} - ch_bam_fasta.dump(tag: "FASTQ_TO_CRAM: aligned bam per sample", pretty: true) - - ch_markdup_index = Channel.empty() - - if ( markdup == "bamsormadup") { - // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta) - BIOBAMBAM_BAMSORMADUP(ch_bam_fasta) - ch_markdup_index = ch_markdup_index.mix(BIOBAMBAM_BAMSORMADUP.out.bam.join(BIOBAMBAM_BAMSORMADUP.out.bam_index, failOnMismatch:true, failOnDuplicate:true)) - ch_multiqc_files = ch_multiqc_files.mix( BIOBAMBAM_BAMSORMADUP.out.metrics.map { _meta, metrics -> return metrics} ) - ch_versions = ch_versions.mix(BIOBAMBAM_BAMSORMADUP.out.versions.first()) - } - else if ( markdup == "samtools") { - SAMTOOLS_SORMADUP(ch_bam_fasta) - ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORMADUP.out.cram.join(SAMTOOLS_SORMADUP.out.crai, failOnMismatch:true, failOnDuplicate:true)) - ch_multiqc_files = ch_multiqc_files.mix( SAMTOOLS_SORMADUP.out.metrics.map { _meta, metrics -> return metrics} ) - ch_versions = ch_versions.mix(SAMTOOLS_SORMADUP.out.versions.first()) - } - else if ( markdup == "false" || markdup == false) { - // Merge bam files and compress - // SAMTOOLS_SORT([meta, [bam, bam], fasta]) - SAMTOOLS_SORT(ch_bam_fasta) - ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORT.out.cram.join(SAMTOOLS_SORT.out.crai, failOnMismatch:true, failOnDuplicate:true)) - ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first()) - } - else { - error "markdup: ${markdup} not supported" - } - ch_markdup_index.dump(tag: "FASTQ_TO_CRAM: postprocessed bam", pretty: true) - - /* + .set { ch_bam_fasta } + ch_bam_fasta.dump(tag: "FASTQ_TO_CRAM: aligned bam per sample", pretty: true) + + ch_markdup_index = Channel.empty() + + if (markdup == "bamsormadup") { + // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta) + BIOBAMBAM_BAMSORMADUP(ch_bam_fasta) + ch_markdup_index = ch_markdup_index.mix(BIOBAMBAM_BAMSORMADUP.out.bam.join(BIOBAMBAM_BAMSORMADUP.out.bam_index, failOnMismatch: true, failOnDuplicate: true)) + ch_multiqc_files = ch_multiqc_files.mix( + BIOBAMBAM_BAMSORMADUP.out.metrics.map { _meta, metrics -> + return metrics + } + ) + ch_versions = ch_versions.mix(BIOBAMBAM_BAMSORMADUP.out.versions.first()) + } + else if (markdup == "samtools") { + SAMTOOLS_SORMADUP(ch_bam_fasta) + ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORMADUP.out.cram.join(SAMTOOLS_SORMADUP.out.crai, failOnMismatch: true, failOnDuplicate: true)) + ch_multiqc_files = ch_multiqc_files.mix( + SAMTOOLS_SORMADUP.out.metrics.map { _meta, metrics -> + return metrics + } + ) + ch_versions = ch_versions.mix(SAMTOOLS_SORMADUP.out.versions.first()) + } + else if (markdup == "false" || markdup == false) { + // Merge bam files and compress + // SAMTOOLS_SORT([meta, [bam, bam], fasta]) + SAMTOOLS_SORT(ch_bam_fasta) + ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORT.out.cram.join(SAMTOOLS_SORT.out.crai, failOnMismatch: true, failOnDuplicate: true)) + ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first()) + } + else { + error("markdup: ${markdup} not supported") + } + ch_markdup_index.dump(tag: "FASTQ_TO_CRAM: postprocessed bam", pretty: true) + + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // COMPRESSION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_markdup_index + ch_markdup_index .branch { meta, reads, index -> bam: reads.getExtension() == "bam" - return [meta, reads, index] + return [meta, reads, index] cram: reads.getExtension() == "cram" - return [meta, reads, index] + return [meta, reads, index] } - .set {ch_markdup_index} + .set { ch_markdup_index } - ch_markdup_index.bam + ch_markdup_index.bam .map { meta, bam, bai -> bam_bai: [meta, bam, bai, getGenomeAttribute(meta.genome_data, 'fasta'), getGenomeAttribute(meta.genome_data, 'fai')] } - .set {ch_bam_bai_fasta_fai} + .set { ch_bam_bai_fasta_fai } - SAMTOOLS_CONVERT(ch_bam_bai_fasta_fai) - ch_versions = ch_versions.mix(SAMTOOLS_CONVERT.out.versions.first()) + SAMTOOLS_CONVERT(ch_bam_bai_fasta_fai) + ch_versions = ch_versions.mix(SAMTOOLS_CONVERT.out.versions.first()) - ch_markdup_index.cram + ch_markdup_index.cram .mix( - SAMTOOLS_CONVERT.out.cram.join(SAMTOOLS_CONVERT.out.crai, failOnMismatch:true, failOnDuplicate:true) + SAMTOOLS_CONVERT.out.cram.join(SAMTOOLS_CONVERT.out.crai, failOnMismatch: true, failOnDuplicate: true) ) - .set{ch_cram_crai} - ch_cram_crai.dump(tag: "FASTQ_TO_CRAM: cram and crai", pretty: true) + .set { ch_cram_crai } + ch_cram_crai.dump(tag: "FASTQ_TO_CRAM: cram and crai", pretty: true) emit: - cram_crai = ch_cram_crai - multiqc_files = ch_multiqc_files - versions = ch_versions + cram_crai = ch_cram_crai + multiqc_files = ch_multiqc_files + versions = ch_versions } diff --git a/subworkflows/local/fastq_to_unaligned_cram/main.nf b/subworkflows/local/fastq_to_unaligned_cram/main.nf index 8cb1911b..37dc0527 100644 --- a/subworkflows/local/fastq_to_unaligned_cram/main.nf +++ b/subworkflows/local/fastq_to_unaligned_cram/main.nf @@ -4,72 +4,65 @@ // Take fastq; convert to ubam and compress // MODULES -include { SAMTOOLS_CAT } from '../../../modules/nf-core/samtools/cat/main' -include { SAMTOOLS_IMPORT } from "../../../modules/nf-core/samtools/import/main" -include { MD5SUM } from "../../../modules/nf-core/md5sum/main" +include { SAMTOOLS_CAT } from '../../../modules/nf-core/samtools/cat/main' +include { SAMTOOLS_IMPORT } from "../../../modules/nf-core/samtools/import/main" +include { MD5SUM } from "../../../modules/nf-core/md5sum/main" workflow FASTQ_TO_UCRAM { take: - ch_fastq // channel: [mandatory] [meta, [fastq, ...]] + ch_fastq // channel: [mandatory] [meta, [fastq, ...]] main: - ch_versions = Channel.empty() + ch_versions = Channel.empty() - /* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: FASTQ TO BAM CONVERSION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_fastq - .dump(tag: "FASTQ_TO_UCRAM: reads to convert",pretty: true) + ch_fastq.dump(tag: "FASTQ_TO_UCRAM: reads to convert", pretty: true) - // SAMTOOLS_IMPORT([meta, fastq]) - SAMTOOLS_IMPORT(ch_fastq) - ch_versions = ch_versions.mix(SAMTOOLS_IMPORT.out.versions.first()) + // SAMTOOLS_IMPORT([meta, fastq]) + SAMTOOLS_IMPORT(ch_fastq) + ch_versions = ch_versions.mix(SAMTOOLS_IMPORT.out.versions.first()) - SAMTOOLS_IMPORT.out.cram - .map { - // set id to samplename, drop readgroup and count meta values - meta, files -> + SAMTOOLS_IMPORT.out.cram + .map { meta, files -> def gk = (meta.chunks as Integer ?: 1) return [ groupKey( - // replace id by samplename, drop readgroup meta and chunks meta - meta.subMap('id', 'readgroup', 'chunks') + [id: meta.samplename ? meta.samplename + ".unaligned" : meta.id + ".unaligned"], - gk + gk, ), - files + files, ] } - .groupTuple(by:[0]) - .dump(tag: "FASTQ_TO_UCRAM: unaligned cram per replicate",pretty: true) - .map { - meta, files -> + .groupTuple(by: [0]) + .dump(tag: "FASTQ_TO_UCRAM: unaligned cram per replicate", pretty: true) + .map { meta, files -> def gk = (meta.count as Integer ?: 1) return [ groupKey( - // drop count meta - meta.subMap('count'), - gk + gk, ), - files + files, ] } - .groupTuple(by:[0]) + .groupTuple(by: [0]) .map { meta, files -> return [meta, files.flatten()] } - .dump(tag: "FASTQ_TO_UCRAM: unaligned cram per sample",pretty: true) - .set{ch_ubam_per_sample} + .dump(tag: "FASTQ_TO_UCRAM: unaligned cram per sample", pretty: true) + .set { ch_ubam_per_sample } - // Merge bam files per sample - SAMTOOLS_CAT(ch_ubam_per_sample) - ch_versions = ch_versions.mix(SAMTOOLS_CAT.out.versions.first()) + // Merge bam files per sample + SAMTOOLS_CAT(ch_ubam_per_sample) + ch_versions = ch_versions.mix(SAMTOOLS_CAT.out.versions.first()) emit: - cram = SAMTOOLS_CAT.out.cram // [meta, cram] - versions = ch_versions // versions - + cram = SAMTOOLS_CAT.out.cram // [meta, cram] + versions = ch_versions // versions } diff --git a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf index f80a2639..d0081217 100644 --- a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf @@ -8,17 +8,17 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' -include { paramsSummaryMap } from 'plugin/nf-schema' -include { samplesheetToList } from 'plugin/nf-schema' -include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' -include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' -include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' -include { dashedLine } from '../../nf-core/utils_nfcore_pipeline' -include { nfCoreLogo } from '../../nf-core/utils_nfcore_pipeline' -include { imNotification } from '../../nf-core/utils_nfcore_pipeline' -include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' -include { workflowCitation } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' +include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' +include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' +include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' +include { dashedLine } from '../../nf-core/utils_nfcore_pipeline' +include { nfCoreLogo } from '../../nf-core/utils_nfcore_pipeline' +include { imNotification } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' +include { workflowCitation } from '../../nf-core/utils_nfcore_pipeline' /* ======================================================================================== @@ -27,7 +27,6 @@ include { workflowCitation } from '../../nf-core/utils_nfcore_pipeline' */ workflow PIPELINE_INITIALISATION { - take: version // boolean: Display version and exit validate_params // boolean: Boolean whether to validate parameters against the schema at runtime @@ -42,26 +41,26 @@ workflow PIPELINE_INITIALISATION { // // Print version and exit if required and dump pipeline parameters to JSON file // - UTILS_NEXTFLOW_PIPELINE ( + UTILS_NEXTFLOW_PIPELINE( version, true, outdir, - workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1 + workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1, ) // // Validate parameters and generate parameter summary to stdout // - UTILS_NFSCHEMA_PLUGIN ( + UTILS_NFSCHEMA_PLUGIN( workflow, validate_params, - null + null, ) // // Check config provided to the pipeline // - UTILS_NFCORE_PIPELINE ( + UTILS_NFCORE_PIPELINE( nextflow_cli_args ) // @@ -72,8 +71,7 @@ workflow PIPELINE_INITIALISATION { // // Create channel from input file provided through params.input // - Channel - .fromList(samplesheetToList(input, "assets/schema_input.json")) + Channel.fromList(samplesheetToList(input, "assets/schema_input.json")) .set { ch_samplesheet } emit: @@ -88,7 +86,6 @@ workflow PIPELINE_INITIALISATION { */ workflow PIPELINE_COMPLETION { - take: email // string: email address email_on_fail // string: email address sent on pipeline failure @@ -137,12 +134,12 @@ def validateInputSamplesheet(input) { def (metas, fastqs) = input[1..2] // Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end - def endedness_ok = metas.collect{ meta -> meta.single_end }.unique().size == 1 + def endedness_ok = metas.collect { meta -> meta.single_end }.unique().size == 1 if (!endedness_ok) { error("Please check input samplesheet -> Multiple runs of a sample must be of the same datatype i.e. single-end or paired-end: ${metas[0].id}") } - return [ metas[0], fastqs ] + return [metas[0], fastqs] } // @@ -151,7 +148,8 @@ def validateInputSamplesheet(input) { def getGenomeAttribute(genome, attribute) { if (genome instanceof Map && genome.containsKey(attribute)) { return nextflow.Nextflow.file(genome[attribute], checkIfExists: true) - } else { + } + else { nextflow.Nextflow.error("Genome config does not contain attribute ${attribute}") } return null @@ -162,11 +160,7 @@ def getGenomeAttribute(genome, attribute) { // def genomeExistsError() { if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { - def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + - " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + - " Currently, the available genome keys are:\n" + - " ${params.genomes.keySet().join(", ")}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + " Currently, the available genome keys are:\n" + " ${params.genomes.keySet().join(", ")}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" error(error_string) } } @@ -179,9 +173,9 @@ def toolCitationText() { // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "Tool (Foo et al. 2023)" : "", // Uncomment function in methodsDescriptionText to render in MultiQC report def citation_text = [ - "Tools used in the workflow included:", - "MultiQC (Ewels et al. 2016)", - ].join(' ').trim() + "Tools used in the workflow included:", + "MultiQC (Ewels et al. 2016)", + ].join(' ').trim() return citation_text } @@ -191,8 +185,8 @@ def toolBibliographyText() { // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "
  • Author (2023) Pub name, Journal, DOI
  • " : "", // Uncomment function in methodsDescriptionText to render in MultiQC report def reference_text = [ - "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • ", - ].join(' ').trim() + "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • " + ].join(' ').trim() return reference_text } @@ -214,7 +208,10 @@ def methodsDescriptionText(mqc_methods_yaml) { temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), " } meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2) - } else meta["doi_text"] = "" + } + else { + meta["doi_text"] = "" + } meta["nodoi_text"] = meta.manifest_map.doi ? "" : "
  • If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used.
  • " // Tool references @@ -228,7 +225,7 @@ def methodsDescriptionText(mqc_methods_yaml) { def methods_text = mqc_methods_yaml.text - def engine = new groovy.text.SimpleTemplateEngine() + def engine = new groovy.text.SimpleTemplateEngine() def description_html = engine.createTemplate(methods_text).make(meta) return description_html.toString() diff --git a/tests/config/igenomes_test.config b/tests/config/igenomes_test.config index 3b3e3263..80984075 100644 --- a/tests/config/igenomes_test.config +++ b/tests/config/igenomes_test.config @@ -1,20 +1,20 @@ params { genomes { GRCh38 { - bwamem = "s3://test-data/genomics/homo_sapiens/genome/bwa/" - dict = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict" - fai = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" - fasta = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" - star = "s3://test-data/genomics/homo_sapiens/genome/star/" - gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + bwamem = "s3://test-data/genomics/homo_sapiens/genome/bwa/" + dict = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict" + fai = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + fasta = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + star = "s3://test-data/genomics/homo_sapiens/genome/star/" + gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" } } } aws { client { - endpoint = "https://s3.ugent.be" - protocol = "https" + endpoint = "https://s3.ugent.be" + protocol = "https" s3PathStyleAccess = true connectionTimeout = 60000 } diff --git a/tests/config/nf-test.config b/tests/config/nf-test.config index 68e597f9..c24e5c2f 100644 --- a/tests/config/nf-test.config +++ b/tests/config/nf-test.config @@ -2,14 +2,14 @@ process { resourceLimits = [ cpus: 2, memory: 6.GB, - time: 6.h + time: 6.h, ] } aws { client { - endpoint = "https://s3.ugent.be" - protocol = "https" + endpoint = "https://s3.ugent.be" + protocol = "https" s3PathStyleAccess = true connectionTimeout = 60000 } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 36f6fe4c..bf939975 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -1,4 +1,4 @@ -include { samplesheetToList } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -34,7 +34,6 @@ include { getGenomeAttribute } from '../subworkflows/local/utils_nfcore_prep */ workflow PREPROCESSING { - take: ch_samplesheet // channel: samplesheet read in from --input genomes // map: genome reference files @@ -48,151 +47,156 @@ workflow PREPROCESSING { ch_multiqc_files = Channel.empty() ch_samplesheet - .branch {meta, fastq_1, fastq_2, samplesheet, sampleinfo, flowcell -> - illumina_flowcell : (flowcell && samplesheet && sampleinfo) && !(fastq_1 || fastq_2) + .branch { meta, fastq_1, fastq_2, samplesheet, sampleinfo, flowcell -> + illumina_flowcell: (flowcell && samplesheet && sampleinfo) && !(fastq_1 || fastq_2) return [meta, samplesheet, sampleinfo, flowcell] - fastq : (fastq_1) && !(flowcell || samplesheet || sampleinfo) + fastq: (fastq_1) && !(flowcell || samplesheet || sampleinfo) return [meta, [fastq_1, fastq_2].findAll()] - other: true - error "Unable to determine input type, please check inputs" - } - .set{ch_inputs_from_samplesheet} + other: true + error("Unable to determine input type, please check inputs") + } + .set { ch_inputs_from_samplesheet } - roi = roi ? file(roi, checkIfExists:true) : null + roi = roi ? file(roi, checkIfExists: true) : null - genelists = genelists ? Channel.value(file(genelists + "/*.bed", checkIfExists:true)) : Channel.empty() + genelists = genelists ? Channel.value(file(genelists + "/*.bed", checkIfExists: true)) : Channel.empty() -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // PROCESS FLOWCELL INPUTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ ch_inputs_from_samplesheet.illumina_flowcell - .multiMap { meta, samplesheet, sampleinfo, flowcell -> - flowcell: [meta, samplesheet, flowcell] - info : samplesheetToList(sampleinfo, "assets/schema_sampleinfo.json") - } - .set{ ch_illumina_flowcell } + .multiMap { meta, samplesheet, sampleinfo, flowcell -> + flowcell: [meta, samplesheet, flowcell] + info: samplesheetToList(sampleinfo, "assets/schema_sampleinfo.json") + } + .set { ch_illumina_flowcell } // BCL_DEMULTIPLEX([meta, samplesheet, flowcell], demultiplexer) BCL_DEMULTIPLEX(ch_illumina_flowcell.flowcell, "bclconvert") - BCL_DEMULTIPLEX.out.fastq.dump(tag: "DEMULTIPLEX: fastq",pretty: true) + BCL_DEMULTIPLEX.out.fastq.dump(tag: "DEMULTIPLEX: fastq", pretty: true) ch_multiqc_files = ch_multiqc_files.mix( - BCL_DEMULTIPLEX.out.reports.map { _meta, reports -> return reports}, - BCL_DEMULTIPLEX.out.stats.map { _meta, stats -> return stats } + BCL_DEMULTIPLEX.out.reports.map { _meta, reports -> + return reports + }, + BCL_DEMULTIPLEX.out.stats.map { _meta, stats -> + return stats + }, ) ch_versions = ch_versions.mix(BCL_DEMULTIPLEX.out.versions) BCL_DEMULTIPLEX.out.fastq - .map{meta, fastq -> [meta.samplename, meta, fastq]} - .set{ch_demultiplexed_fastq} + .map { meta, fastq -> [meta.samplename, meta, fastq] } + .set { ch_demultiplexed_fastq } ch_illumina_flowcell.info - .flatten() - .transpose() - .map{sampleinfo -> [sampleinfo.samplename, sampleinfo]} - .set{ch_sampleinfo} + .flatten() + .transpose() + .map { sampleinfo -> [sampleinfo.samplename, sampleinfo] } + .set { ch_sampleinfo } // Merge fastq meta with sample info ch_demultiplexed_fastq - .combine(ch_sampleinfo, by: 0) - .map { samplename, meta, fastq, sampleinfo -> - def new_meta = meta + sampleinfo - def readgroup = readgroup_from_fastq(fastq[0]) - readgroup = readgroup + ['SM': samplename, 'LB': new_meta.library ?: ""] - new_meta = new_meta + ['readgroup' : readgroup] - return [ new_meta, fastq ] - } - .groupTuple( by: [0]) - .map { meta, fq -> - return [meta, fq.flatten().unique()] - } - .set {ch_demultiplexed_fastq_with_sampleinfo} -/* + .combine(ch_sampleinfo, by: 0) + .map { samplename, meta, fastq, sampleinfo -> + def new_meta = meta + sampleinfo + def readgroup = readgroup_from_fastq(fastq[0]) + readgroup = readgroup + ['SM': samplename, 'LB': new_meta.library ?: ""] + new_meta = new_meta + ['readgroup': readgroup] + return [new_meta, fastq] + } + .groupTuple(by: [0]) + .map { meta, fq -> + return [meta, fq.flatten().unique()] + } + .set { ch_demultiplexed_fastq_with_sampleinfo } + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // PROCESS FASTQ INPUTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ ch_inputs_from_samplesheet.fastq - .map { meta, fastq -> - // if no fastq_2, then single-end - def single_end = fastq[1] ? false : true - // add readgroup metadata - def rg = readgroup_from_fastq(fastq[0]) - // if the sample name starts with "snp_", remove it so the sampletracking works later on. - def samplename = meta.samplename.startsWith("snp_") ? meta.samplename.substring(4) : meta.samplename - rg = rg + [ 'SM': samplename, - 'LB': meta.library ?: "", - 'PL': meta.platform ?: rg.PL, - 'ID': meta.readgroup ?: rg.ID - ] - def meta_with_readgroup = meta + ['single_end': single_end, 'readgroup': rg] - return [meta_with_readgroup, fastq] - } - .set {ch_input_fastq} + .map { meta, fastq -> + // if no fastq_2, then single-end + def single_end = fastq[1] ? false : true + // add readgroup metadata + def rg = readgroup_from_fastq(fastq[0]) + // if the sample name starts with "snp_", remove it so the sampletracking works later on. + def samplename = meta.samplename.startsWith("snp_") ? meta.samplename.substring(4) : meta.samplename + rg = rg + [ + 'SM': samplename, + 'LB': meta.library ?: "", + 'PL': meta.platform ?: rg.PL, + 'ID': meta.readgroup ?: rg.ID, + ] + def meta_with_readgroup = meta + ['single_end': single_end, 'readgroup': rg] + return [meta_with_readgroup, fastq] + } + .set { ch_input_fastq } -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ASSOCIATE CORRECT GENOME AND COUNT SAMPLE REPLICATES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ ch_input_fastq - .mix(ch_demultiplexed_fastq_with_sampleinfo) - // Add the genome config to the tuple - // set genome based on organism key - .map{ meta, reads -> - if (meta.organism && !meta.genome) { - if (meta.organism ==~ /(?i)Homo[\s_]sapiens/) { - meta = meta + ["genome":"GRCh38"] - } else if (meta.organism ==~ /(?i)Mus[\s_]musculus/) { - meta = meta + ["genome":"mm10"] - } else if (meta.organism ==~/(?i)Danio[\s_]rerio/) { - meta = meta + ["genome":"GRCz11"] - } else { - meta = meta + ["genome": null ] + .mix(ch_demultiplexed_fastq_with_sampleinfo) + .map { meta, reads -> + if (meta.organism && !meta.genome) { + if (meta.organism ==~ /(?i)Homo[\s_]sapiens/) { + meta = meta + ["genome": "GRCh38"] + } + else if (meta.organism ==~ /(?i)Mus[\s_]musculus/) { + meta = meta + ["genome": "mm10"] + } + else if (meta.organism ==~ /(?i)Danio[\s_]rerio/) { + meta = meta + ["genome": "GRCz11"] + } + else { + meta = meta + ["genome": null] + } } + if (genomes && genomes[meta.genome]) { + meta = meta + ["genome_data": genomes[meta.genome]] + } + else { + meta = meta + ["genome_data": [:]] + } + // set the aligner + if (aligner && !meta.aligner) { + meta = meta + ["aligner": aligner] + } + // set the ROI + // // Special case for coPGT samples + // // if there's no global ROI AND no sample speficic ROI + // // AND the sample tag is "coPGT-M", set the sample ROI to "roi_copgt" + if (!roi && !meta.roi && meta.tag == "coPGT-M") { + meta = meta + ["roi": getGenomeAttribute(meta.genome_data, "roi_copgt")] + } + // // if there's a global ROI AND no sample specific ROI + // // set the global ROI to the sample + if (roi && !meta.roi) { + meta = meta + ["roi": roi] + } + return [meta, reads] } - if (genomes && genomes[meta.genome]){ - meta = meta + ["genome_data": genomes[meta.genome]] - } else { - meta = meta + ["genome_data": [:]] - } - // set the aligner - if (aligner && !meta.aligner) { - meta = meta + ["aligner": aligner] - } - // set the ROI - // // Special case for coPGT samples - // // if there's no global ROI AND no sample speficic ROI - // // AND the sample tag is "coPGT-M", set the sample ROI to "roi_copgt" - if (!roi && !meta.roi && meta.tag == "coPGT-M") { - meta = meta + ["roi": getGenomeAttribute(meta.genome_data, "roi_copgt")] - } - // // if there's a global ROI AND no sample specific ROI - // // set the global ROI to the sample - if (roi && !meta.roi) { - meta = meta + ["roi": roi] + .map { meta, reads -> [meta.samplename, [meta, reads]] } + .groupTuple() + .map { _samplename, meta_fastq -> [meta_fastq, meta_fastq.size()] } + .transpose() + .map { meta_fastq, count -> [meta_fastq[0] + ['count': count], meta_fastq[1]] } + .map { meta, fastq -> + return [meta - meta.subMap('fcid', 'lane', 'library'), fastq] } - return [meta, reads] - } - // Count the number of samples per samplename - .map{ meta, reads -> [meta.samplename, [meta, reads]]} - .groupTuple() - .map{ _samplename, meta_fastq -> [meta_fastq, meta_fastq.size()]} - .transpose() - .map{meta_fastq, count -> [meta_fastq[0] + ['count': count], meta_fastq[1]]} - // Clean up metadata - .map{meta, fastq -> - return [meta - meta.subMap('fcid','lane','library'), fastq] - } - .set{ch_fastq_per_sample} + .set { ch_fastq_per_sample } - ch_fastq_per_sample.dump(tag:"FASTQ per sample", pretty: true) + ch_fastq_per_sample.dump(tag: "FASTQ per sample", pretty: true) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // FASTQ TRIMMING AND QC ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -202,40 +206,41 @@ workflow PREPROCESSING { // Run QC, trimming and adapter removal // FASTP([meta, fastq], adapter_fasta, save_trimmed, save_merged) FASTP(ch_fastq_per_sample, [], false, false, false) - ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json.map { _meta, json -> return json} ) - ch_versions = ch_versions.mix(FASTP.out.versions.first()) + ch_multiqc_files = ch_multiqc_files.mix( + FASTP.out.json.map { _meta, json -> + return json + } + ) + ch_versions = ch_versions.mix(FASTP.out.versions.first()) // edit meta.id to match sample name FASTP.out.reads - .map { meta, reads -> - def read_files = meta.single_end.toBoolean() ? reads : reads.sort{ a,b -> a.getName().tokenize('.')[0] <=> b.getName().tokenize('.')[0] }.collate(2) - return [ - meta + [ chunks: read_files instanceof List ? read_files.size() : [read_files].size() ], - read_files - ] - } - // transpose to get read pairs - .transpose() - // set new meta.id to include split number - .map { meta, reads -> - def new_id = reads instanceof List ? reads[0].getName() - ~/_1.fastp.*/ : reads.getName() - ~/.fastp.*/ - return [ - meta - meta.subMap('id') + [ id: new_id ], - reads - ] - } - // split samples into human and non human data - .branch { meta, _reads -> - supported: meta.genome_data instanceof Map && meta.genome_data.size() > 0 - other: true - } - .set { ch_trimmed_reads } + .map { meta, reads -> + def read_files = meta.single_end.toBoolean() ? reads : reads.sort { a, b -> a.getName().tokenize('.')[0] <=> b.getName().tokenize('.')[0] }.collate(2) + return [ + meta + [chunks: read_files instanceof List ? read_files.size() : [read_files].size()], + read_files, + ] + } + .transpose() + .map { meta, reads -> + def new_id = reads instanceof List ? reads[0].getName() - ~/_1.fastp.*/ : reads.getName() - ~/.fastp.*/ + return [ + meta - meta.subMap('id') + [id: new_id], + reads, + ] + } + .branch { meta, _reads -> + supported: meta.genome_data instanceof Map && meta.genome_data.size() > 0 + other: true + } + .set { ch_trimmed_reads } - ch_trimmed_reads.supported.dump(tag:"Supported trimmed reads per sample", pretty: true) - ch_trimmed_reads.other.dump(tag:"Other trimmed reads per sample", pretty: true) + ch_trimmed_reads.supported.dump(tag: "Supported trimmed reads per sample", pretty: true) + ch_trimmed_reads.other.dump(tag: "Other trimmed reads per sample", pretty: true) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: FASTQ TO UNALIGNED CRAM CONVERSION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -244,35 +249,36 @@ workflow PREPROCESSING { FASTQ_TO_UCRAM(ch_trimmed_reads.other) ch_versions = ch_versions.mix(FASTQ_TO_UCRAM.out.versions) -/* + /* /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: FASTQ TO ALIGNED CRAM CONVERSION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_trimmed_reads.supported.map{ meta, reads -> - return [ - meta, - reads, - meta.aligner, - getGenomeAttribute(meta.genome_data, meta.aligner), - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "gtf") + ch_trimmed_reads.supported + .map { meta, reads -> + return [ + meta, + reads, + meta.aligner, + getGenomeAttribute(meta.genome_data, meta.aligner), + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "gtf"), ] - } - .set{ch_meta_reads_aligner_index_fasta_gtf} + } + .set { ch_meta_reads_aligner_index_fasta_gtf } FASTQ_TO_CRAM( ch_meta_reads_aligner_index_fasta_gtf, - markdup + markdup, ) ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.multiqc_files) ch_versions = ch_versions.mix(FASTQ_TO_CRAM.out.versions) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: FILTER SAMPLES WITH 'SNP' TAG // samples with SNP tag contain only data for sample tracking @@ -281,103 +287,130 @@ workflow PREPROCESSING { */ FASTQ_TO_CRAM.out.cram_crai - .filter{ meta, _cram, _crai -> - meta.tag != "SNP" - } - .set{ch_no_snp_samples} + .filter { meta, _cram, _crai -> + meta.tag != "SNP" + } + .set { ch_no_snp_samples } -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: COVERAGE ANALYSIS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ ch_no_snp_samples - .map { meta, cram, crai -> - if (meta.roi) { - return [ - meta, - cram, - crai, - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - file(meta.roi, checkIfExists:true), - ] - } else { - return [ - meta, - cram, - crai, - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - [], - ] + .map { meta, cram, crai -> + if (meta.roi) { + return [ + meta, + cram, + crai, + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "fai"), + file(meta.roi, checkIfExists: true), + ] + } + else { + return [ + meta, + cram, + crai, + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "fai"), + [], + ] + } } - } - .set{ch_cram_crai_fasta_fai_roi} + .set { ch_cram_crai_fasta_fai_roi } if (params.run_coverage == true || params.run_coverage == "true") { COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) ch_multiqc_files = ch_multiqc_files.mix( - COVERAGE.out.mosdepth_summary .map{ _meta, txt -> return txt }, - COVERAGE.out.mosdepth_global .map{ _meta, txt -> return txt }, - COVERAGE.out.mosdepth_regions .map{ _meta, txt -> return txt }, - COVERAGE.out.samtools_coverage.map{ _meta, txt -> return txt }, + COVERAGE.out.mosdepth_summary.map { _meta, txt -> + return txt + }, + COVERAGE.out.mosdepth_global.map { _meta, txt -> + return txt + }, + COVERAGE.out.mosdepth_regions.map { _meta, txt -> + return txt + }, + COVERAGE.out.samtools_coverage.map { _meta, txt -> + return txt + }, ) ch_versions = ch_versions.mix(COVERAGE.out.versions) } -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: QC FOR ALIGNMENTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ ch_no_snp_samples - .map { meta, cram, crai -> - if (meta.roi) { - return [ - meta, - cram, - crai, - file(meta.roi, checkIfExists:true), - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - getGenomeAttribute(meta.genome_data, "dict"), - ] - } else { - return [ - meta, - cram, - crai, - [], - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - getGenomeAttribute(meta.genome_data, "dict"), - ] + .map { meta, cram, crai -> + if (meta.roi) { + return [ + meta, + cram, + crai, + file(meta.roi, checkIfExists: true), + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "fai"), + getGenomeAttribute(meta.genome_data, "dict"), + ] + } + else { + return [ + meta, + cram, + crai, + [], + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "fai"), + getGenomeAttribute(meta.genome_data, "dict"), + ] + } } - } - .set{ch_cram_crai_roi_fasta_fai_dict} + .set { ch_cram_crai_roi_fasta_fai_dict } BAM_QC(ch_cram_crai_roi_fasta_fai_dict, params.disable_picard_metrics) ch_multiqc_files = ch_multiqc_files.mix( - BAM_QC.out.samtools_stats .map{ _meta, txt -> return txt }, - BAM_QC.out.samtools_flagstat .map{ _meta, txt -> return txt }, - BAM_QC.out.samtools_idxstats .map{ _meta, txt -> return txt }, - BAM_QC.out.picard_multiplemetrics .map{ _meta, txt -> return txt }, - BAM_QC.out.picard_wgsmetrics .map{ _meta, txt -> return txt }, - BAM_QC.out.picard_hsmetrics .map{ _meta, txt -> return txt }, + BAM_QC.out.samtools_stats.map { _meta, txt -> + return txt + }, + BAM_QC.out.samtools_flagstat.map { _meta, txt -> + return txt + }, + BAM_QC.out.samtools_idxstats.map { _meta, txt -> + return txt + }, + BAM_QC.out.picard_multiplemetrics.map { _meta, txt -> + return txt + }, + BAM_QC.out.picard_wgsmetrics.map { _meta, txt -> + return txt + }, + BAM_QC.out.picard_hsmetrics.map { _meta, txt -> + return txt + }, ) ch_versions = ch_versions.mix(BAM_QC.out.versions) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: CHECKSUMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - MD5SUM(FASTQ_TO_CRAM.out.cram_crai.map{ meta, cram, _crai -> return [meta,cram] }, false) + MD5SUM( + FASTQ_TO_CRAM.out.cram_crai.map { meta, cram, _crai -> + return [meta, cram] + }, + false, + ) ch_versions = ch_versions.mix(MD5SUM.out.versions.first()) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // AGGREGATE QC ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -392,29 +425,29 @@ workflow PREPROCESSING { // // MODULE: MultiQC // - ch_multiqc_config = Channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true) - ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config, checkIfExists: true) : Channel.empty() - ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo, checkIfExists: true) : Channel.empty() - summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") - ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) - ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) - ch_methods_description = Channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) - ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) - ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) - ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) - - MULTIQC ( + ch_multiqc_config = Channel.fromPath("${projectDir}/assets/multiqc_config.yml", checkIfExists: true) + ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config, checkIfExists: true) : Channel.empty() + ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo, checkIfExists: true) : Channel.empty() + summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) + ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) + ch_methods_description = Channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) + ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) + ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) + + MULTIQC( ch_multiqc_files.collect(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), [], - [] + [], ) emit: multiqc_report = MULTIQC.out.report.toList() // channel: /path/to/multiqc_report.html - versions = ch_versions // channel: [ path(versions.yml) ] + versions = ch_versions // channel: [ path(versions.yml) ] } /* @@ -448,22 +481,17 @@ def readgroup_from_fastq(path) { // "@::::::: :::" // def sequencer_serial = fields[0] // def run_number = fields[1] - def fcid = fields[2] - def lane = fields[3] - def index = fields[-1] =~ /[GATC+-]/ ? fields[-1] : "" + def fcid = fields[2] + def lane = fields[3] + def index = fields[-1] =~ /[GATC+-]/ ? fields[-1] : "" - rg.ID = [fcid,lane].join(".") + rg.ID = [fcid, lane].join(".") rg.PU = [fcid, lane, index].findAll().join(".") rg.PL = "ILLUMINA" - } else if (fields.size() == 5) { + } + else if (fields.size() == 5) { def fcid = fields[0] rg.ID = fcid } return rg } - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - THE END -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ From 0d42714f15e9566dca316d45047c606670b81ac0 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 17 Sep 2025 17:02:08 +0200 Subject: [PATCH 013/202] bump WES ROI --- conf/igenomes.config | 2 +- conf/profiles/WES.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/igenomes.config b/conf/igenomes.config index 27ed34c8..3a6ea697 100644 --- a/conf/igenomes.config +++ b/conf/igenomes.config @@ -27,7 +27,7 @@ params { // ROI's roi_copgt = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_coPGT-M_analyses_ROI_v1.bed" - roi_wes = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" + roi_wes = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v7.bed" } GRCm39 { // Genome reference diff --git a/conf/profiles/WES.config b/conf/profiles/WES.config index cc0a4acc..e7dd235b 100644 --- a/conf/profiles/WES.config +++ b/conf/profiles/WES.config @@ -2,6 +2,6 @@ params { aligner = "snap" run_coverage = true disable_picard_metrics = false - roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" + roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v7.bed" genelists = "${params.igenomes_base}/Hsapiens/GRCh38/regions/genelists" } From 534d13e7470f15128ecd0ccf1434af9458690b1e Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 3 Nov 2025 17:15:04 +0100 Subject: [PATCH 014/202] small fixes before conversion --- nextflow.config | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/nextflow.config b/nextflow.config index 00399037..6022b555 100644 --- a/nextflow.config +++ b/nextflow.config @@ -250,13 +250,29 @@ dag { manifest { name = 'nf-cmgg/preprocessing' - contributors = """CMGG ICT team""" homePage = 'https://github.com/nf-cmgg/preprocessing' description = """Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data.""" mainScript = 'main.nf' - nextflowVersion = '!>=25.04.0' + nextflowVersion = '!>=25.10.0' version = 'dev' doi = '' + contributors = [ + [ + name: 'Matthias De Smet', + affiliation: 'Center For Medical Genetics Ghent', + email: 'matthias.desmet@ugent.be', + github: '@matthsdsm', + contribution: ["author", "maintainer"], // List of contribution types ('author', 'maintainer' or 'contributor') + ], + [ + name: 'Nicolas Vannieuwkerke', + affiliation: 'Center For Medical Genetics Ghent', + email: 'nicolas.vannieuwkerke@ugent.be', + github: '@nvnieuwk', + contribution: ["maintainer"], // List of contribution types ('author', 'maintainer' or 'contributor') + orcid: '0009-0003-5619-1555' + ], + ] } validation { @@ -284,3 +300,6 @@ validation { // Load modules.config for DSL2 module specific options includeConfig 'conf/modules.config' + +workflow.output.mode = params.publish_dir_mode +outputDir = params.outdir From f8e5bb7fb002539fca83c5914144a413e2c0e2f8 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 3 Nov 2025 17:15:18 +0100 Subject: [PATCH 015/202] convert bclconvert output --- conf/modules.config | 34 ------------- main.nf | 53 +++++++------------- subworkflows/nf-core/bcl_demultiplex/main.nf | 3 ++ workflows/preprocessing.nf | 3 ++ 4 files changed, 23 insertions(+), 70 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 4860b8e9..0157c825 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -29,40 +29,6 @@ process { "--bcl-num-compression-threads ${task.cpus}", ].join(" ").trim() } - publishDir = [ - [ - path: { "${params.outdir}/InterOp" }, - mode: params.publish_dir_mode, - overwrite: true, - pattern: "**.bin", - saveAs: { filename -> filename.split("/")[-1] }, - ], - [ - path: { meta.lane ? "${params.outdir}/Reports/L00${meta.lane}" : "${params.outdir}/Reports/" }, - mode: params.publish_dir_mode, - pattern: "RunInfo.xml", - overwrite: true, - saveAs: { filename -> filename.split("/")[-1] }, - ], - [ - path: { meta.lane ? "${params.outdir}/Reports/L00${meta.lane}" : "${params.outdir}/Reports/" }, - mode: params.publish_dir_mode, - pattern: "Reports", - overwrite: true, - saveAs: { filename -> filename.split("/")[-1] }, - ], - [ - path: { meta.lane ? "${params.outdir}/Logs/L00${meta.lane}" : "${params.outdir}/Logs/" }, - mode: params.publish_dir_mode, - pattern: "Logs", - overwrite: true, - saveAs: { filename -> filename.split("/")[-1] }, - ], - [ - pattern: "**.fastq.gz", - enabled: false, - ], - ] } // FastP diff --git a/main.nf b/main.nf index 4ef95130..2122b585 100644 --- a/main.nf +++ b/main.nf @@ -26,6 +26,7 @@ include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_prep workflow { + main: // // SUBWORKFLOW: Run initialisation tasks // @@ -40,7 +41,7 @@ workflow { // // WORKFLOW: Run main workflow // - NFCMGG_PREPROCESSING( + PREPROCESSING( PIPELINE_INITIALISATION.out.samplesheet, params.genomes, params.aligner, @@ -59,42 +60,22 @@ workflow { params.outdir, params.monochrome_logs, params.hook_url, - NFCMGG_PREPROCESSING.out.multiqc_report, + PREPROCESSING.out.multiqc_report, ) -} - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - NAMED WORKFLOWS FOR PIPELINE -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ -// -// WORKFLOW: Run main analysis pipeline depending on type of input -// -workflow NFCMGG_PREPROCESSING { - take: - samplesheet // channel: samplesheet read in from --input - genomes // map: genome reference files - aligner // string: aligner to use - markdup // string: markdup method to use - roi // string: region of interest to use - genelists // file: directory containing genelist bed files for coverage analysis - - main: - - // - // WORKFLOW: Run pipeline - // - PREPROCESSING( - samplesheet, - genomes, - aligner, - markdup, - roi, - genelists, - ) + publish: + demultiplex_interop = PREPROCESSING.out.demultiplex_interop + demultiplex_reports = PREPROCESSING.out.demultiplex_reports.map { meta, reports -> [ meta, files("${reports.toUri()}/*") ] }.transpose(by:1) + demultiplex_logs = PREPROCESSING.out.demultiplex_logs.map { meta, logs -> [ meta, files("${logs.toUri()}/*") ] }.transpose(by:1) +} - emit: - multiqc_report = PREPROCESSING.out.multiqc_report // channel: /path/to/multiqc_report.html +output { + // TODO also add the RunInfo.xml file as output, needs a module update + demultiplex_interop { path "InterOp" } + demultiplex_reports { path { meta, report -> + report >> (meta.lane ? "Reports/LOO${meta.lane}/${report.name}" as String : "Reports/${report.name}") + } } + demultiplex_logs { path { meta, log -> + log >> (meta.lane ? "Logs/LOO${meta.lane}/${log.name}" as String : "Logs/${log.name}") + } } } diff --git a/subworkflows/nf-core/bcl_demultiplex/main.nf b/subworkflows/nf-core/bcl_demultiplex/main.nf index e7905cdb..48e08613 100644 --- a/subworkflows/nf-core/bcl_demultiplex/main.nf +++ b/subworkflows/nf-core/bcl_demultiplex/main.nf @@ -18,6 +18,7 @@ workflow BCL_DEMULTIPLEX { ch_reports = Channel.empty() ch_stats = Channel.empty() ch_interop = Channel.empty() + ch_logs = channel.empty() // Split flowcells into separate channels containing run as tar and run as path // https://nextflow.slack.com/archives/C02T98A23U7/p1650963988498929 @@ -49,6 +50,7 @@ workflow BCL_DEMULTIPLEX { ch_fastq = ch_fastq.mix(BCLCONVERT.out.fastq) ch_interop = ch_interop.mix(BCLCONVERT.out.interop) ch_reports = ch_reports.mix(BCLCONVERT.out.reports) + ch_logs = ch_logs.mix(BCLCONVERT.out.logs) ch_versions = ch_versions.mix(BCLCONVERT.out.versions.first()) } @@ -132,5 +134,6 @@ workflow BCL_DEMULTIPLEX { reports = ch_reports stats = ch_stats interop = ch_interop + logs = ch_logs versions = ch_versions } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index bf939975..19ee316b 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -446,6 +446,9 @@ workflow PREPROCESSING { ) emit: + demultiplex_interop = BCL_DEMULTIPLEX.out.interop + demultiplex_reports = BCL_DEMULTIPLEX.out.reports + demultiplex_logs = BCL_DEMULTIPLEX.out.logs multiqc_report = MULTIQC.out.report.toList() // channel: /path/to/multiqc_report.html versions = ch_versions // channel: [ path(versions.yml) ] } From 2c3949f1a9ca07a571f2e7cba33884b745c00c58 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 3 Nov 2025 17:31:53 +0100 Subject: [PATCH 016/202] fix more bclconvert outputs --- main.nf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.nf b/main.nf index 2122b585..572c11e4 100644 --- a/main.nf +++ b/main.nf @@ -64,14 +64,16 @@ workflow { ) publish: - demultiplex_interop = PREPROCESSING.out.demultiplex_interop + demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by:1) demultiplex_reports = PREPROCESSING.out.demultiplex_reports.map { meta, reports -> [ meta, files("${reports.toUri()}/*") ] }.transpose(by:1) demultiplex_logs = PREPROCESSING.out.demultiplex_logs.map { meta, logs -> [ meta, files("${logs.toUri()}/*") ] }.transpose(by:1) } output { // TODO also add the RunInfo.xml file as output, needs a module update - demultiplex_interop { path "InterOp" } + demultiplex_interop { path { _meta, bin -> + bin >> "Interop/${bin.name}" + } } demultiplex_reports { path { meta, report -> report >> (meta.lane ? "Reports/LOO${meta.lane}/${report.name}" as String : "Reports/${report.name}") } } From 93a0496e2d798ff8aec6bb29768e3b4e087bac74 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 4 Nov 2025 13:58:53 +0100 Subject: [PATCH 017/202] finish conversion of the output handling --- conf/modules.config | 89 +- main.nf | 83 +- nf-test.config | 4 + subworkflows/local/bam_qc/main.nf | 29 +- subworkflows/local/coverage/main.nf | 21 +- .../local/fastq_to_aligned_cram/main.nf | 21 +- .../local/fastq_to_unaligned_cram/main.nf | 1 - tests/nextflow.config | 1 + tests/workflows/preprocessing.nf.test | 42 +- tests/workflows/preprocessing.nf.test.snap | 1531 ++++++++++++++++- workflows/preprocessing.nf | 62 +- 11 files changed, 1711 insertions(+), 173 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 0157c825..d7e5b2da 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -12,11 +12,11 @@ process { - publishDir = [ - path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals("versions.yml") ? null : filename }, - ] + // publishDir = [ + // path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}" }, + // mode: params.publish_dir_mode, + // saveAs: { filename -> filename.equals("versions.yml") ? null : filename }, + // ] // BCL convert withName: BCLCONVERT { @@ -45,13 +45,6 @@ process { "--compression 1", ].join(" ").trim() } - publishDir = [ - [ - path: { "${params.outdir}/${meta.samplename}" }, - mode: params.publish_dir_mode, - pattern: "*.{html,json}", - ] - ] } // FASTQ_TO_UCRAM @@ -65,7 +58,6 @@ process { "--output-fmt-option archive", ].join(" ").trim() } - publishDir = [enabled: false] } // FASTQ_TO_CRAM @@ -79,12 +71,6 @@ process { // LB : library prep // SM : samplename - - // FASTQ_ALIGN_DNA - withName: '.*:FASTQ_ALIGN_DNA:.*' { - publishDir = [enabled: false] - } - //// Bowtie2 withName: BOWTIE2_ALIGN { ext.args = { @@ -96,11 +82,6 @@ process { ].join(" ").trim() } ext.args2 = "--fast" - publishDir = [ - path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}" }, - mode: params.publish_dir_mode, - pattern: "*.log", - ] } //// BWA mem/BWA mem2 @@ -152,11 +133,6 @@ process { } } - // FASTQ_ALIGN_RNA - withName: '.*FASTQ_ALIGN_RNA:.*' { - publishDir = [enabled: false] - } - withName: STAR_ALIGN { ext.args = { [ @@ -187,20 +163,6 @@ process { "--output-fmt-option archive", ].join(" ").trim() } - publishDir = [ - [ - path: { "${params.outdir}/${meta.samplename}" }, - mode: params.publish_dir_mode, - pattern: "*metrics*", - saveAs: { filename -> filename.replace("metrics", "duplicate_metrics").replace(".merged", "") }, - ], - [ - path: { "${params.outdir}/${meta.samplename}" }, - mode: params.publish_dir_mode, - pattern: "*cram*", - saveAs: { filename -> filename.replace(".merged", "") }, - ], - ] } //// Samtools multisort @@ -213,14 +175,6 @@ process { "--output-fmt-option archive", ].join(" ").trim() } - publishDir = [ - [ - path: { "${params.outdir}/${meta.samplename}" }, - mode: params.publish_dir_mode, - pattern: "*cram*", - saveAs: { filename -> filename.replace(".merged", "") }, - ] - ] } //// BioBamBam Bamsormadup @@ -233,14 +187,6 @@ process { ].join(" ").trim() } ext.args2 = "exclude=QCFAIL" - publishDir = [ - [ - path: { "${params.outdir}/${meta.samplename}" }, - mode: params.publish_dir_mode, - pattern: "*metrics*", - saveAs: { filename -> filename.replace("metrics", "duplicate_metrics").replace(".merged", "") }, - ] - ] } //// Samtools convert @@ -254,14 +200,6 @@ process { "--output-fmt-option archive", ].join(" ").trim() } - publishDir = [ - [ - path: { "${params.outdir}/${meta.samplename}" }, - mode: params.publish_dir_mode, - pattern: "*cram*", - saveAs: { filename -> filename.replace(".merged", "") }, - ] - ] } // coverage @@ -286,18 +224,6 @@ process { // ext.args = { "--title \"Coverage ${meta.samplename ?: meta.id}\" } // } - // Checksums - withName: MD5SUM { - publishDir = [ - [ - path: { "${params.outdir}/${meta.samplename}" }, - mode: params.publish_dir_mode, - pattern: "*.md5", - saveAs: { filename -> filename.replace(".merged", "") }, - ] - ] - } - // QC withName: '.*BAM_QC.*' { @@ -314,11 +240,6 @@ process { // MultiQC withName: MULTIQC { ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' } - publishDir = [ - path: { "${params.outdir}/multiqc" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - ] } } diff --git a/main.nf b/main.nf index 572c11e4..9b07d959 100644 --- a/main.nf +++ b/main.nf @@ -67,17 +67,94 @@ workflow { demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by:1) demultiplex_reports = PREPROCESSING.out.demultiplex_reports.map { meta, reports -> [ meta, files("${reports.toUri()}/*") ] }.transpose(by:1) demultiplex_logs = PREPROCESSING.out.demultiplex_logs.map { meta, logs -> [ meta, files("${logs.toUri()}/*") ] }.transpose(by:1) + fastp_json = PREPROCESSING.out.fastp_json + fastp_html = PREPROCESSING.out.fastp_html + ucrams = PREPROCESSING.out.ucrams + crams = PREPROCESSING.out.crams + align_reports = PREPROCESSING.out.align_reports + sormadup_metrics = PREPROCESSING.out.sormadup_metrics + mosdepth_global = PREPROCESSING.out.mosdepth_global + mosdepth_summary = PREPROCESSING.out.mosdepth_summary + mosdepth_regions = PREPROCESSING.out.mosdepth_regions + mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 + mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed + mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi + mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed + mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi + mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed + mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi + mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi + samtools_coverage = PREPROCESSING.out.samtools_coverage + panelcoverage = PREPROCESSING.out.panelcoverage + samtools_stats = PREPROCESSING.out.samtools_stats + samtools_flagstat = PREPROCESSING.out.samtools_flagstat + samtools_idxstats = PREPROCESSING.out.samtools_idxstats + picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics + picard_multiplemetrics_pdf = PREPROCESSING.out.picard_multiplemetrics_pdf + picard_wgsmetrics = PREPROCESSING.out.picard_wgsmetrics + picard_hsmetrics = PREPROCESSING.out.picard_hsmetrics + md5sums = PREPROCESSING.out.md5sums + multiqc_report = PREPROCESSING.out.multiqc_report + multiqc_data = PREPROCESSING.out.multiqc_data + multiqc_plots = PREPROCESSING.out.multiqc_plots + } output { - // TODO also add the RunInfo.xml file as output, needs a module update demultiplex_interop { path { _meta, bin -> bin >> "Interop/${bin.name}" } } demultiplex_reports { path { meta, report -> - report >> (meta.lane ? "Reports/LOO${meta.lane}/${report.name}" as String : "Reports/${report.name}") + def out_path = meta.lane ? "Reports/LOO${meta.lane}/${report.name}" as String : "Reports/${report.name}" + report >> out_path } } demultiplex_logs { path { meta, log -> - log >> (meta.lane ? "Logs/LOO${meta.lane}/${log.name}" as String : "Logs/${log.name}") + def out_path = meta.lane ? "Logs/LOO${meta.lane}/${log.name}" as String : "Logs/${log.name}" + log >> out_path + } } + fastp_json { path { meta, json -> + json >> "${meta.samplename}/${json.name}" + } } + fastp_html { path { meta, html -> + html >> "${meta.samplename}/${html.name}" + } } + ucrams { path { meta, cram -> + cram >> "${meta.samplename}/${meta.samplename}.unaligned.cram" + } } + crams { path { meta, cram, crai -> + cram >> "${meta.samplename}/${meta.samplename}.cram" + crai >> "${meta.samplename}/${meta.samplename}.cram.crai" + } } + align_reports { path { meta, log -> + log >> "${meta.samplename}/${log.name}" + } } + sormadup_metrics { path { meta, metrics -> + metrics >> "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" } } + mosdepth_global { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_summary { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_regions { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_per_base_d4 { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_per_base_bed { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_per_base_csi { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_regions_bed { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_regions_csi { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_quantized_bed { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_quantized_csi { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_thresholds_bed { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_thresholds_csi { path { meta, _file -> "${meta.samplename}/" } } + samtools_coverage { path { meta, _file -> "${meta.samplename}/" } } + panelcoverage { path { meta, _file -> "${meta.samplename}/" } } + samtools_stats { path { meta, _file -> "${meta.samplename}/" } } + samtools_flagstat { path { meta, _file -> "${meta.samplename}/" } } + samtools_idxstats { path { meta, _file -> "${meta.samplename}/" } } + picard_multiplemetrics { path { meta, _file -> "${meta.samplename}/" } } + picard_multiplemetrics_pdf { path { meta, _file -> "${meta.samplename}/" } } + picard_wgsmetrics { path { meta, _file -> "${meta.samplename}/" } } + picard_hsmetrics { path { meta, _file -> "${meta.samplename}/" } } + md5sums { path { meta, _file -> "${meta.samplename}/" } } + multiqc_report { path "multiqc/" } + multiqc_data { path "multiqc/" } + multiqc_plots { path "multiqc/" } } diff --git a/nf-test.config b/nf-test.config index aa727c88..f35650da 100644 --- a/nf-test.config +++ b/nf-test.config @@ -5,4 +5,8 @@ config { profile "docker" options "-dump-channels" + plugins { + load "nft-utils@0.0.7" + } + } diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index a87c62f6..f779364e 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -37,9 +37,10 @@ workflow BAM_QC { SAMTOOLS_IDXSTATS(ch_bam_bai) ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions.first()) - ch_picard_hsmetrics = Channel.empty() - ch_picard_multiplemetrics = Channel.empty() - ch_picard_wgsmetrics = Channel.empty() + ch_picard_hsmetrics = channel.empty() + ch_picard_multiplemetrics = channel.empty() + ch_picard_multiplemetrics_pdf = channel.empty() + ch_picard_wgsmetrics = channel.empty() if (!disable_picard) { ch_bam_bai_roi_fasta_fai_dict @@ -50,7 +51,8 @@ workflow BAM_QC { PICARD_COLLECTMULTIPLEMETRICS(ch_bam_bai_fasta_fai) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) - ch_picard_multiplemetrics = ch_picard_multiplemetrics.mix(PICARD_COLLECTMULTIPLEMETRICS.out.metrics) + ch_picard_multiplemetrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics + ch_picard_multiplemetrics_pdf = PICARD_COLLECTMULTIPLEMETRICS.out.pdf ch_bam_bai_roi_fasta_fai_dict .branch { meta, bam, bai, roi, fasta, fai, dict -> @@ -63,19 +65,20 @@ workflow BAM_QC { PICARD_COLLECTWGSMETRICS(ch_picard.wgsmetrics, []) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) - ch_picard_wgsmetrics = ch_picard_wgsmetrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) + ch_picard_wgsmetrics = PICARD_COLLECTWGSMETRICS.out.metrics PICARD_COLLECTHSMETRICS(ch_picard.hsmetrics) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) - ch_picard_hsmetrics = ch_picard_hsmetrics.mix(PICARD_COLLECTHSMETRICS.out.metrics) + ch_picard_hsmetrics = PICARD_COLLECTHSMETRICS.out.metrics } emit: - samtools_stats = SAMTOOLS_STATS.out.stats - samtools_flagstat = SAMTOOLS_FLAGSTAT.out.flagstat - samtools_idxstats = SAMTOOLS_IDXSTATS.out.idxstats - picard_multiplemetrics = ch_picard_multiplemetrics - picard_wgsmetrics = ch_picard_wgsmetrics - picard_hsmetrics = ch_picard_hsmetrics - versions = ch_versions + samtools_stats = SAMTOOLS_STATS.out.stats + samtools_flagstat = SAMTOOLS_FLAGSTAT.out.flagstat + samtools_idxstats = SAMTOOLS_IDXSTATS.out.idxstats + picard_multiplemetrics = ch_picard_multiplemetrics + picard_multiplemetrics_pdf = ch_picard_multiplemetrics_pdf + picard_wgsmetrics = ch_picard_wgsmetrics + picard_hsmetrics = ch_picard_hsmetrics + versions = ch_versions } diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index bf3b187b..d59ace12 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -56,10 +56,19 @@ workflow COVERAGE { ch_coverageqc_files = ch_coverageqc_files.mix(PANELCOVERAGE.out.regiondist) emit: - mosdepth_summary = MOSDEPTH.out.summary_txt - mosdepth_global = MOSDEPTH.out.global_txt - mosdepth_regions = MOSDEPTH.out.regions_txt - samtools_coverage = SAMTOOLS_COVERAGE.out.coverage - panelcoverage = PANELCOVERAGE.out.regiondist - versions = ch_versions + mosdepth_global = MOSDEPTH.out.global_txt + mosdepth_summary = MOSDEPTH.out.summary_txt + mosdepth_regions = MOSDEPTH.out.regions_txt + mosdepth_per_base_d4 = MOSDEPTH.out.per_base_d4 + mosdepth_per_base_bed = MOSDEPTH.out.per_base_bed + mosdepth_per_base_csi = MOSDEPTH.out.per_base_csi + mosdepth_regions_bed = MOSDEPTH.out.regions_bed + mosdepth_regions_csi = MOSDEPTH.out.regions_csi + mosdepth_quantized_bed = MOSDEPTH.out.quantized_bed + mosdepth_quantized_csi = MOSDEPTH.out.quantized_csi + mosdepth_thresholds_bed = MOSDEPTH.out.thresholds_bed + mosdepth_thresholds_csi = MOSDEPTH.out.thresholds_csi + samtools_coverage = SAMTOOLS_COVERAGE.out.coverage + panelcoverage = PANELCOVERAGE.out.regiondist + versions = ch_versions } diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index afed2cc2..49199684 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -25,7 +25,7 @@ workflow FASTQ_TO_CRAM { main: ch_versions = Channel.empty() - ch_multiqc_files = Channel.empty() + ch_sormadup_metrics = Channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -99,21 +99,13 @@ workflow FASTQ_TO_CRAM { // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta) BIOBAMBAM_BAMSORMADUP(ch_bam_fasta) ch_markdup_index = ch_markdup_index.mix(BIOBAMBAM_BAMSORMADUP.out.bam.join(BIOBAMBAM_BAMSORMADUP.out.bam_index, failOnMismatch: true, failOnDuplicate: true)) - ch_multiqc_files = ch_multiqc_files.mix( - BIOBAMBAM_BAMSORMADUP.out.metrics.map { _meta, metrics -> - return metrics - } - ) + ch_sormadup_metrics = ch_sormadup_metrics.mix(BIOBAMBAM_BAMSORMADUP.out.metrics) ch_versions = ch_versions.mix(BIOBAMBAM_BAMSORMADUP.out.versions.first()) } else if (markdup == "samtools") { SAMTOOLS_SORMADUP(ch_bam_fasta) ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORMADUP.out.cram.join(SAMTOOLS_SORMADUP.out.crai, failOnMismatch: true, failOnDuplicate: true)) - ch_multiqc_files = ch_multiqc_files.mix( - SAMTOOLS_SORMADUP.out.metrics.map { _meta, metrics -> - return metrics - } - ) + ch_sormadup_metrics = ch_sormadup_metrics.mix(SAMTOOLS_SORMADUP.out.metrics) ch_versions = ch_versions.mix(SAMTOOLS_SORMADUP.out.versions.first()) } else if (markdup == "false" || markdup == false) { @@ -160,7 +152,8 @@ workflow FASTQ_TO_CRAM { ch_cram_crai.dump(tag: "FASTQ_TO_CRAM: cram and crai", pretty: true) emit: - cram_crai = ch_cram_crai - multiqc_files = ch_multiqc_files - versions = ch_versions + cram_crai = ch_cram_crai + sormadup_metrics = ch_sormadup_metrics + align_reports = FASTQ_ALIGN_DNA.out.reports + versions = ch_versions } diff --git a/subworkflows/local/fastq_to_unaligned_cram/main.nf b/subworkflows/local/fastq_to_unaligned_cram/main.nf index 37dc0527..1c458a2b 100644 --- a/subworkflows/local/fastq_to_unaligned_cram/main.nf +++ b/subworkflows/local/fastq_to_unaligned_cram/main.nf @@ -6,7 +6,6 @@ // MODULES include { SAMTOOLS_CAT } from '../../../modules/nf-core/samtools/cat/main' include { SAMTOOLS_IMPORT } from "../../../modules/nf-core/samtools/import/main" -include { MD5SUM } from "../../../modules/nf-core/md5sum/main" workflow FASTQ_TO_UCRAM { take: diff --git a/tests/nextflow.config b/tests/nextflow.config index e69de29b..548fbe63 100644 --- a/tests/nextflow.config +++ b/tests/nextflow.config @@ -0,0 +1 @@ +includeConfig "config/nf-test.config" diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index 0bb017be..2f1c5e4c 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -57,8 +57,18 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - file(workflow.out.multiqc_report[0][0]).name, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:[ + "multiqc_report", + "multiqc_plots", + "multiqc_data", + "md5sums", + "fastp_html", + "crams", + "picard_wgsmetrics", + "picard_multiplemetrics_pdf", + "picard_multiplemetrics", + "picard_hsmetrics" + ]) ).match() } } @@ -113,8 +123,18 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - file(workflow.out.multiqc_report[0][0]).name, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:[ + "multiqc_report", + "multiqc_plots", + "multiqc_data", + "md5sums", + "fastp_html", + "crams", + "picard_wgsmetrics", + "picard_multiplemetrics_pdf", + "picard_multiplemetrics", + "picard_hsmetrics" + ]) ).match() } } @@ -172,8 +192,18 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - file(workflow.out.multiqc_report[0][0]).name, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:[ + "multiqc_report", + "multiqc_plots", + "multiqc_data", + "md5sums", + "fastp_html", + "crams", + "picard_wgsmetrics", + "picard_multiplemetrics_pdf", + "picard_multiplemetrics", + "picard_hsmetrics" + ]) ).match() } } diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 80141e0d..8bd43a7e 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -1,67 +1,1510 @@ { "preprocessing - fastq - bwa - bamsormadup - roi": { "content": [ - "multiqc_report.html", - [ - "versions.yml:md5,321e55c8f19102dc87a10e981635edda", - "versions.yml:md5,3e9382a1dc62d4f405bcfb58fe6b7768", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,84a41fdb642c270c5f36846cd7d8f033", - "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", - "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", - "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", - "versions.yml:md5,ebdd9fe0c553612c66238375b920f178", - "versions.yml:md5,fecf2763ae04725fa0ca7c995018dcea" - ] + { + "align_reports": [ + + ], + "crams": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + } + }, + "sample1.cram", + "sample1.cram.crai" + ] + ], + "demultiplex_interop": [ + + ], + "demultiplex_logs": [ + + ], + "demultiplex_reports": [ + + ], + "fastp_html": [ + [ + { + "aligner": "bwamem", + "count": 1, + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "readgroup": { + "CN": "CMGG", + "ID": "H5T2YDSX3.1", + "LB": "test", + "PL": "ILLUMINA", + "PU": "H5T2YDSX3.1", + "SM": "sample1" + }, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + }, + "sample1.fastp.html" + ] + ], + "fastp_json": [ + [ + { + "id": "sample1", + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "readgroup": { + "CN": "CMGG", + "ID": "H5T2YDSX3.1", + "PU": "H5T2YDSX3.1", + "PL": "ILLUMINA", + "SM": "sample1", + "LB": "test" + }, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "count": 1 + }, + "sample1.fastp.json:md5,543fb8fe4512975ce7dafd5287cae601" + ] + ], + "md5sums": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + } + }, + "sample1.md5" + ] + ], + "mosdepth_global": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.mosdepth.global.dist.txt:md5,4574a0f755903d7ab7aa07297cc1efee" + ] + ], + "mosdepth_per_base_bed": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.per-base.bed.gz:md5,46115d39863826ae9199340c2eb888a6" + ] + ], + "mosdepth_per_base_csi": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.per-base.bed.gz.csi:md5,12fdbaf668bda28541b869adecc15dc7" + ] + ], + "mosdepth_per_base_d4": [ + + ], + "mosdepth_quantized_bed": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.quantized.bed.gz:md5,d54d469a692c3fe4a4e1db02c08be518" + ] + ], + "mosdepth_quantized_csi": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.quantized.bed.gz.csi:md5,ac24f9c737b984091364b3c5b1f45567" + ] + ], + "mosdepth_regions": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.mosdepth.region.dist.txt:md5,388e05b0b4d7754be6fdc0b1b6eabed9" + ] + ], + "mosdepth_regions_bed": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.regions.bed.gz:md5,63a7fee57ae572a661fba2d14c6db1b4" + ] + ], + "mosdepth_regions_csi": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.regions.bed.gz.csi:md5,531956423eb6b53186ae4adc39e0e61e" + ] + ], + "mosdepth_summary": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.mosdepth.summary.txt:md5,cfd81f854b864f9630e8831b48cfc9a0" + ] + ], + "mosdepth_thresholds_bed": [ + + ], + "mosdepth_thresholds_csi": [ + + ], + "multiqc_data": [ + "multiqc_data" + ], + "multiqc_plots": [ + "multiqc_plots" + ], + "multiqc_report": [ + [ + "multiqc_report.html" + ] + ], + "panelcoverage": [ + + ], + "picard_hsmetrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + } + }, + "sample1.CollectHsMetrics.coverage_metrics" + ] + ], + "picard_multiplemetrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + } + }, + [ + "sample1.CollectMultipleMetrics.alignment_summary_metrics", + "sample1.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "sample1.CollectMultipleMetrics.quality_by_cycle_metrics", + "sample1.CollectMultipleMetrics.quality_distribution_metrics" + ] + ] + ], + "picard_multiplemetrics_pdf": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + } + }, + [ + "sample1.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "sample1.CollectMultipleMetrics.quality_by_cycle.pdf", + "sample1.CollectMultipleMetrics.quality_distribution.pdf", + "sample1.CollectMultipleMetrics.read_length_histogram.pdf" + ] + ] + ], + "picard_wgsmetrics": [ + + ], + "samtools_coverage": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.coverage.txt:md5,82e6e6b4163459aeca0b9dd40ef67d13" + ] + ], + "samtools_flagstat": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.flagstat:md5,da197e74ff53116dd9b8b1241f468aac" + ] + ], + "samtools_idxstats": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.idxstats:md5,4e1b204d3bb59e42022c5d84be705ed8" + ] + ], + "samtools_stats": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.stats:md5,0653e8f1834d58c557ad463c36ae6b61" + ] + ], + "sormadup_metrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" + ] + ], + "ucrams": [ + + ], + "versions": [ + "versions.yml:md5,321e55c8f19102dc87a10e981635edda", + "versions.yml:md5,3e9382a1dc62d4f405bcfb58fe6b7768", + "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", + "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", + "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", + "versions.yml:md5,7b30e3b870fe318aeef6b4bffc51eb87", + "versions.yml:md5,84a41fdb642c270c5f36846cd7d8f033", + "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", + "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", + "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", + "versions.yml:md5,ebdd9fe0c553612c66238375b920f178", + "versions.yml:md5,fecf2763ae04725fa0ca7c995018dcea" + ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.3" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-04T14:32:22.782118028" + "timestamp": "2025-11-04T13:30:49.340803877" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ - "multiqc_report.html", - [ - "versions.yml:md5,321e55c8f19102dc87a10e981635edda", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", - "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", - "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868" - ] + { + "align_reports": [ + + ], + "crams": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + } + }, + "sample1.cram", + "sample1.cram.crai" + ] + ], + "demultiplex_interop": [ + + ], + "demultiplex_logs": [ + + ], + "demultiplex_reports": [ + + ], + "fastp_html": [ + [ + { + "aligner": "bwamem", + "count": 1, + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "readgroup": { + "CN": "CMGG", + "ID": "H5T2YDSX3.1", + "LB": "test", + "PL": "ILLUMINA", + "PU": "H5T2YDSX3.1", + "SM": "sample1" + }, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + }, + "sample1.fastp.html" + ] + ], + "fastp_json": [ + [ + { + "id": "sample1", + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "readgroup": { + "CN": "CMGG", + "ID": "H5T2YDSX3.1", + "PU": "H5T2YDSX3.1", + "PL": "ILLUMINA", + "SM": "sample1", + "LB": "test" + }, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "count": 1 + }, + "sample1.fastp.json:md5,543fb8fe4512975ce7dafd5287cae601" + ] + ], + "md5sums": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" + } + }, + "sample1.md5" + ] + ], + "mosdepth_global": [ + + ], + "mosdepth_per_base_bed": [ + + ], + "mosdepth_per_base_csi": [ + + ], + "mosdepth_per_base_d4": [ + + ], + "mosdepth_quantized_bed": [ + + ], + "mosdepth_quantized_csi": [ + + ], + "mosdepth_regions": [ + + ], + "mosdepth_regions_bed": [ + + ], + "mosdepth_regions_csi": [ + + ], + "mosdepth_summary": [ + + ], + "mosdepth_thresholds_bed": [ + + ], + "mosdepth_thresholds_csi": [ + + ], + "multiqc_data": [ + "multiqc_data" + ], + "multiqc_plots": [ + "multiqc_plots" + ], + "multiqc_report": [ + [ + "multiqc_report.html" + ] + ], + "panelcoverage": [ + + ], + "picard_hsmetrics": [ + + ], + "picard_multiplemetrics": [ + + ], + "picard_multiplemetrics_pdf": [ + + ], + "picard_wgsmetrics": [ + + ], + "samtools_coverage": [ + + ], + "samtools_flagstat": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.flagstat:md5,da197e74ff53116dd9b8b1241f468aac" + ] + ], + "samtools_idxstats": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.idxstats:md5,4e1b204d3bb59e42022c5d84be705ed8" + ] + ], + "samtools_stats": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.stats:md5,0653e8f1834d58c557ad463c36ae6b61" + ] + ], + "sormadup_metrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WES", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "id": "sample1" + } + }, + "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" + ] + ], + "ucrams": [ + + ], + "versions": [ + "versions.yml:md5,321e55c8f19102dc87a10e981635edda", + "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", + "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", + "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", + "versions.yml:md5,7b30e3b870fe318aeef6b4bffc51eb87", + "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", + "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", + "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868" + ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.3" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-04T14:36:49.460737865" + "timestamp": "2025-11-04T13:36:14.450163857" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ - "multiqc_report.html", - [ - "versions.yml:md5,2dbfdf50978986550dbe621f1d49fea7", - "versions.yml:md5,321e55c8f19102dc87a10e981635edda", - "versions.yml:md5,3e9382a1dc62d4f405bcfb58fe6b7768", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,84a41fdb642c270c5f36846cd7d8f033", - "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", - "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", - "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", - "versions.yml:md5,fecf2763ae04725fa0ca7c995018dcea" - ] + { + "align_reports": [ + + ], + "crams": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" + } + }, + "sample1.cram", + "sample1.cram.crai" + ] + ], + "demultiplex_interop": [ + + ], + "demultiplex_logs": [ + + ], + "demultiplex_reports": [ + + ], + "fastp_html": [ + [ + { + "aligner": "bwamem", + "count": 1, + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "readgroup": { + "CN": "CMGG", + "ID": "H5T2YDSX3.1", + "LB": "test", + "PL": "ILLUMINA", + "PU": "H5T2YDSX3.1", + "SM": "sample1" + }, + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" + }, + "sample1.fastp.html" + ] + ], + "fastp_json": [ + [ + { + "id": "sample1", + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "readgroup": { + "CN": "CMGG", + "ID": "H5T2YDSX3.1", + "PU": "H5T2YDSX3.1", + "PL": "ILLUMINA", + "SM": "sample1", + "LB": "test" + }, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "count": 1 + }, + "sample1.fastp.json:md5,543fb8fe4512975ce7dafd5287cae601" + ] + ], + "md5sums": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" + } + }, + "sample1.md5" + ] + ], + "mosdepth_global": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.mosdepth.global.dist.txt:md5,4574a0f755903d7ab7aa07297cc1efee" + ] + ], + "mosdepth_per_base_bed": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.per-base.bed.gz:md5,46115d39863826ae9199340c2eb888a6" + ] + ], + "mosdepth_per_base_csi": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.per-base.bed.gz.csi:md5,12fdbaf668bda28541b869adecc15dc7" + ] + ], + "mosdepth_per_base_d4": [ + + ], + "mosdepth_quantized_bed": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.quantized.bed.gz:md5,d54d469a692c3fe4a4e1db02c08be518" + ] + ], + "mosdepth_quantized_csi": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.quantized.bed.gz.csi:md5,ac24f9c737b984091364b3c5b1f45567" + ] + ], + "mosdepth_regions": [ + + ], + "mosdepth_regions_bed": [ + + ], + "mosdepth_regions_csi": [ + + ], + "mosdepth_summary": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.mosdepth.summary.txt:md5,9799b90b7db86a6eab36f33b04a67ae0" + ] + ], + "mosdepth_thresholds_bed": [ + + ], + "mosdepth_thresholds_csi": [ + + ], + "multiqc_data": [ + "multiqc_data" + ], + "multiqc_plots": [ + "multiqc_plots" + ], + "multiqc_report": [ + [ + "multiqc_report.html" + ] + ], + "panelcoverage": [ + + ], + "picard_hsmetrics": [ + + ], + "picard_multiplemetrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" + } + }, + [ + "sample1.CollectMultipleMetrics.alignment_summary_metrics", + "sample1.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "sample1.CollectMultipleMetrics.quality_by_cycle_metrics", + "sample1.CollectMultipleMetrics.quality_distribution_metrics" + ] + ] + ], + "picard_multiplemetrics_pdf": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" + } + }, + [ + "sample1.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "sample1.CollectMultipleMetrics.quality_by_cycle.pdf", + "sample1.CollectMultipleMetrics.quality_distribution.pdf", + "sample1.CollectMultipleMetrics.read_length_histogram.pdf" + ] + ] + ], + "picard_wgsmetrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "aligner": "bwamem", + "genome": "GRCh38", + "genome_data": { + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "id": "sample1", + "organism": "Homo sapiens", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" + } + }, + "sample1.CollectWgsMetrics.coverage_metrics" + ] + ], + "samtools_coverage": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.coverage.txt:md5,82e6e6b4163459aeca0b9dd40ef67d13" + ] + ], + "samtools_flagstat": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.flagstat:md5,da197e74ff53116dd9b8b1241f468aac" + ] + ], + "samtools_idxstats": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.idxstats:md5,4e1b204d3bb59e42022c5d84be705ed8" + ] + ], + "samtools_stats": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.stats:md5,0653e8f1834d58c557ad463c36ae6b61" + ] + ], + "sormadup_metrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "samplename": "sample1", + "organism": "Homo sapiens", + "tag": "WGS", + "sample_type": "DNA", + "single_end": false, + "genome": "GRCh38", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + }, + "aligner": "bwamem", + "id": "sample1" + } + }, + "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" + ] + ], + "ucrams": [ + + ], + "versions": [ + "versions.yml:md5,2dbfdf50978986550dbe621f1d49fea7", + "versions.yml:md5,321e55c8f19102dc87a10e981635edda", + "versions.yml:md5,3e9382a1dc62d4f405bcfb58fe6b7768", + "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", + "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", + "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", + "versions.yml:md5,7b30e3b870fe318aeef6b4bffc51eb87", + "versions.yml:md5,84a41fdb642c270c5f36846cd7d8f033", + "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", + "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", + "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", + "versions.yml:md5,fecf2763ae04725fa0ca7c995018dcea" + ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.3" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-04T14:35:21.629978137" + "timestamp": "2025-11-04T13:34:27.74379172" } } \ No newline at end of file diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 19ee316b..c3e13fd3 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -274,7 +274,7 @@ workflow PREPROCESSING { markdup, ) - ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.multiqc_files) + ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.sormadup_metrics.map { _meta, metrics -> metrics }) ch_versions = ch_versions.mix(FASTQ_TO_CRAM.out.versions) @@ -322,7 +322,21 @@ workflow PREPROCESSING { } .set { ch_cram_crai_fasta_fai_roi } - if (params.run_coverage == true || params.run_coverage == "true") { + def mosdepth_global_out = channel.empty() + def mosdepth_summary_out = channel.empty() + def mosdepth_regions_out = channel.empty() + def mosdepth_per_base_d4_out = channel.empty() + def mosdepth_per_base_bed_out = channel.empty() + def mosdepth_per_base_csi_out = channel.empty() + def mosdepth_regions_bed_out = channel.empty() + def mosdepth_regions_csi_out = channel.empty() + def mosdepth_quantized_bed_out = channel.empty() + def mosdepth_quantized_csi_out = channel.empty() + def mosdepth_thresholds_bed_out = channel.empty() + def mosdepth_thresholds_csi_out = channel.empty() + def samtools_coverage_out = channel.empty() + def panelcoverage_out = channel.empty() + if (params.run_coverage) { COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) ch_multiqc_files = ch_multiqc_files.mix( COVERAGE.out.mosdepth_summary.map { _meta, txt -> @@ -338,6 +352,20 @@ workflow PREPROCESSING { return txt }, ) + mosdepth_global_out = COVERAGE.out.mosdepth_global + mosdepth_summary_out = COVERAGE.out.mosdepth_summary + mosdepth_regions_out = COVERAGE.out.mosdepth_regions + mosdepth_per_base_d4_out = COVERAGE.out.mosdepth_per_base_d4 + mosdepth_per_base_bed_out = COVERAGE.out.mosdepth_per_base_bed + mosdepth_per_base_csi_out = COVERAGE.out.mosdepth_per_base_csi + mosdepth_regions_bed_out = COVERAGE.out.mosdepth_regions_bed + mosdepth_regions_csi_out = COVERAGE.out.mosdepth_regions_csi + mosdepth_quantized_bed_out = COVERAGE.out.mosdepth_quantized_bed + mosdepth_quantized_csi_out = COVERAGE.out.mosdepth_quantized_csi + mosdepth_thresholds_bed_out = COVERAGE.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi_out = COVERAGE.out.mosdepth_thresholds_csi + samtools_coverage_out = COVERAGE.out.samtools_coverage + panelcoverage_out = COVERAGE.out.panelcoverage ch_versions = ch_versions.mix(COVERAGE.out.versions) } @@ -449,7 +477,37 @@ workflow PREPROCESSING { demultiplex_interop = BCL_DEMULTIPLEX.out.interop demultiplex_reports = BCL_DEMULTIPLEX.out.reports demultiplex_logs = BCL_DEMULTIPLEX.out.logs + fastp_json = FASTP.out.json + fastp_html = FASTP.out.html + ucrams = FASTQ_TO_UCRAM.out.cram + crams = FASTQ_TO_CRAM.out.cram_crai + align_reports = FASTQ_TO_CRAM.out.align_reports + sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics + mosdepth_global = mosdepth_global_out + mosdepth_summary = mosdepth_summary_out + mosdepth_regions = mosdepth_regions_out + mosdepth_per_base_d4 = mosdepth_per_base_d4_out + mosdepth_per_base_bed = mosdepth_per_base_bed_out + mosdepth_per_base_csi = mosdepth_per_base_csi_out + mosdepth_regions_bed = mosdepth_regions_bed_out + mosdepth_regions_csi = mosdepth_regions_csi_out + mosdepth_quantized_bed = mosdepth_quantized_bed_out + mosdepth_quantized_csi = mosdepth_quantized_csi_out + mosdepth_thresholds_bed = mosdepth_thresholds_bed_out + mosdepth_thresholds_csi = mosdepth_thresholds_csi_out + samtools_coverage = samtools_coverage_out + panelcoverage = panelcoverage_out + samtools_stats = BAM_QC.out.samtools_stats + samtools_flagstat = BAM_QC.out.samtools_flagstat + samtools_idxstats = BAM_QC.out.samtools_idxstats + picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics + picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf + picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics + picard_hsmetrics = BAM_QC.out.picard_hsmetrics + md5sums = MD5SUM.out.checksum multiqc_report = MULTIQC.out.report.toList() // channel: /path/to/multiqc_report.html + multiqc_data = MULTIQC.out.data + multiqc_plots = MULTIQC.out.plots versions = ch_versions // channel: [ path(versions.yml) ] } From fade37ec6ba6ae0868230b26d08eebbe49e3be7a Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 4 Nov 2025 14:48:51 +0100 Subject: [PATCH 018/202] fix subwf tests --- conf/modules.config | 6 - tests/subworkflows/local/bam_qc/main.nf.test | 31 +- .../local/bam_qc/main.nf.test.snap | 293 +++++++++++----- .../local/coverage/main.nf.test.snap | 317 ++++++++++++++---- .../local/fastq_align_rna/main.nf.test | 4 +- .../local/fastq_align_rna/main.nf.test.snap | 120 +++---- .../local/fastq_to_aligned_cram/main.nf.test | 20 +- .../fastq_to_aligned_cram/main.nf.test.snap | 285 ++++++++++++---- .../fastq_to_unaligned_cram/main.nf.test | 3 +- .../fastq_to_unaligned_cram/main.nf.test.snap | 28 +- 10 files changed, 771 insertions(+), 336 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index d7e5b2da..00f0f28e 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -12,12 +12,6 @@ process { - // publishDir = [ - // path: { meta.samplename ? "${params.outdir}/${meta.samplename}" : "${params.outdir}" }, - // mode: params.publish_dir_mode, - // saveAs: { filename -> filename.equals("versions.yml") ? null : filename }, - // ] - // BCL convert withName: BCLCONVERT { ext.args = { diff --git a/tests/subworkflows/local/bam_qc/main.nf.test b/tests/subworkflows/local/bam_qc/main.nf.test index 68bc3cc9..90e3c564 100644 --- a/tests/subworkflows/local/bam_qc/main.nf.test +++ b/tests/subworkflows/local/bam_qc/main.nf.test @@ -32,11 +32,12 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - workflow.out.samtools_stats, - workflow.out.samtools_flagstat, - workflow.out.samtools_idxstats, - file(workflow.out.picard_multiplemetrics[0][1][0]).name, - file(workflow.out.picard_hsmetrics[0][1]).name, + sanitizeOutput(workflow.out, unstableKeys:[ + "picard_wgsmetrics", + "picard_multiplemetrics_pdf", + "picard_multiplemetrics", + "picard_hsmetrics" + ]) ).match() } @@ -65,11 +66,12 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - workflow.out.samtools_stats, - workflow.out.samtools_flagstat, - workflow.out.samtools_idxstats, - file(workflow.out.picard_multiplemetrics[0][1][0]).name, - file(workflow.out.picard_wgsmetrics[0][1]).name, + sanitizeOutput(workflow.out, unstableKeys:[ + "picard_wgsmetrics", + "picard_multiplemetrics_pdf", + "picard_multiplemetrics", + "picard_hsmetrics" + ]) ).match() } } @@ -97,9 +99,12 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - workflow.out.samtools_stats, - workflow.out.samtools_flagstat, - workflow.out.samtools_idxstats, + sanitizeOutput(workflow.out, unstableKeys:[ + "picard_wgsmetrics", + "picard_multiplemetrics_pdf", + "picard_multiplemetrics", + "picard_hsmetrics" + ]) ).match() } } diff --git a/tests/subworkflows/local/bam_qc/main.nf.test.snap b/tests/subworkflows/local/bam_qc/main.nf.test.snap index 776c3f35..daa07dff 100644 --- a/tests/subworkflows/local/bam_qc/main.nf.test.snap +++ b/tests/subworkflows/local/bam_qc/main.nf.test.snap @@ -1,114 +1,231 @@ { "Bam QC - HSmetrics": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" + { + "picard_hsmetrics": [ + [ + { + "id": "test", + "single_end": false + }, + "test.CollectHsMetrics.coverage_metrics" + ] + ], + "picard_multiplemetrics": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.CollectMultipleMetrics.alignment_summary_metrics", + "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "test.CollectMultipleMetrics.insert_size_metrics", + "test.CollectMultipleMetrics.quality_by_cycle_metrics", + "test.CollectMultipleMetrics.quality_distribution_metrics" + ] + ] + ], + "picard_multiplemetrics_pdf": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "test.CollectMultipleMetrics.insert_size_histogram.pdf", + "test.CollectMultipleMetrics.quality_by_cycle.pdf", + "test.CollectMultipleMetrics.quality_distribution.pdf", + "test.CollectMultipleMetrics.read_length_histogram.pdf" + ] + ] + ], + "picard_wgsmetrics": [ + + ], + "samtools_flagstat": [ + [ + { + "id": "test", + "single_end": false + }, + "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" + ] + ], + "samtools_idxstats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" + ] + ], + "samtools_stats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" + ] + ], + "versions": [ + "versions.yml:md5,1e3d06d4435935cb6c01c1d94dad41c3", + "versions.yml:md5,25efd393aac661d8cb2aa8669127abac", + "versions.yml:md5,28cad528cb128dd7bdad050758f1801c", + "versions.yml:md5,ebcad29c0749995f2306fbcf31b03c8c", + "versions.yml:md5,ff0b9222ca016f9d2a7fa1d24010eccf" ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" - ] - ], - "test.CollectMultipleMetrics.alignment_summary_metrics", - "test.CollectHsMetrics.coverage_metrics" + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.1" + "nextflow": "25.10.0" }, - "timestamp": "2024-11-19T15:23:54.440455" + "timestamp": "2025-11-04T14:17:45.293786329" }, "Bam QC - Samtools": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" + { + "picard_hsmetrics": [ + + ], + "picard_multiplemetrics": [ + + ], + "picard_multiplemetrics_pdf": [ + + ], + "picard_wgsmetrics": [ + + ], + "samtools_flagstat": [ + [ + { + "id": "test", + "single_end": false + }, + "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" + ] + ], + "samtools_idxstats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" + ] + ], + "samtools_stats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" + ] + ], + "versions": [ + "versions.yml:md5,1e3d06d4435935cb6c01c1d94dad41c3", + "versions.yml:md5,28cad528cb128dd7bdad050758f1801c", + "versions.yml:md5,ff0b9222ca016f9d2a7fa1d24010eccf" ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" - ] - ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.1" + "nextflow": "25.10.0" }, - "timestamp": "2024-11-19T15:25:06.200354" + "timestamp": "2025-11-04T14:19:09.897986912" }, "Bam QC - WGSmetrics": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" - ] - ], - [ - [ - { - "id": "test", - "single_end": false - }, - "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" + { + "picard_hsmetrics": [ + + ], + "picard_multiplemetrics": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.CollectMultipleMetrics.alignment_summary_metrics", + "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "test.CollectMultipleMetrics.insert_size_metrics", + "test.CollectMultipleMetrics.quality_by_cycle_metrics", + "test.CollectMultipleMetrics.quality_distribution_metrics" + ] + ] + ], + "picard_multiplemetrics_pdf": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "test.CollectMultipleMetrics.insert_size_histogram.pdf", + "test.CollectMultipleMetrics.quality_by_cycle.pdf", + "test.CollectMultipleMetrics.quality_distribution.pdf", + "test.CollectMultipleMetrics.read_length_histogram.pdf" + ] + ] + ], + "picard_wgsmetrics": [ + [ + { + "id": "test", + "single_end": false + }, + "test.CollectWgsMetrics.coverage_metrics" + ] + ], + "samtools_flagstat": [ + [ + { + "id": "test", + "single_end": false + }, + "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" + ] + ], + "samtools_idxstats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" + ] + ], + "samtools_stats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" + ] + ], + "versions": [ + "versions.yml:md5,1e3d06d4435935cb6c01c1d94dad41c3", + "versions.yml:md5,25efd393aac661d8cb2aa8669127abac", + "versions.yml:md5,28cad528cb128dd7bdad050758f1801c", + "versions.yml:md5,5da695471744af2707c6864e2773aa27", + "versions.yml:md5,ff0b9222ca016f9d2a7fa1d24010eccf" ] - ], - "test.CollectMultipleMetrics.alignment_summary_metrics", - "test.CollectWgsMetrics.coverage_metrics" + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.1" + "nextflow": "25.10.0" }, - "timestamp": "2024-11-19T15:24:51.243661" + "timestamp": "2025-11-04T14:18:47.271352687" } } \ No newline at end of file diff --git a/tests/subworkflows/local/coverage/main.nf.test.snap b/tests/subworkflows/local/coverage/main.nf.test.snap index 5e1a6c31..7c779621 100644 --- a/tests/subworkflows/local/coverage/main.nf.test.snap +++ b/tests/subworkflows/local/coverage/main.nf.test.snap @@ -9,7 +9,7 @@ "single_end": false, "tag": "WES" }, - "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" ] ], "1": [ @@ -19,9 +19,40 @@ "single_end": false, "tag": "WES" }, - "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" + "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + ] + ], + "10": [ + + ], + "11": [ + + ], + "12": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] ], + "13": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,e5c7b4f381721888249c57aa55be2d34" + ] + ], + "14": [ + "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", + "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", + "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + ], "2": [ [ { @@ -33,29 +64,67 @@ ] ], "3": [ + + ], + "4": [ [ { "id": "test", "single_end": false, "tag": "WES" }, - "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + "test.per-base.bed.gz:md5,c89a207273626f8415df1710bc522e8e" ] ], - "4": [ + "5": [ [ { "id": "test", "single_end": false, "tag": "WES" }, - "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,e5c7b4f381721888249c57aa55be2d34" + "test.per-base.bed.gz.csi:md5,6593f9115e934350c326206088e8bc7c" ] ], - "5": [ - "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", - "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", - "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + "6": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.regions.bed.gz:md5,82848481047cda38748ec0409db8a669" + ] + ], + "7": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.regions.bed.gz.csi:md5,68d13d373b9fd8b92535f566e77ed036" + ] + ], + "8": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.quantized.bed.gz:md5,8975e3f5a62bb2ea6f349539daf8e9a4" + ] + ], + "9": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.quantized.bed.gz.csi:md5,39f0a425a3f11134e247141c0890fa89" + ] ], "mosdepth_global": [ [ @@ -67,6 +136,49 @@ "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" ] ], + "mosdepth_per_base_bed": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.per-base.bed.gz:md5,c89a207273626f8415df1710bc522e8e" + ] + ], + "mosdepth_per_base_csi": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.per-base.bed.gz.csi:md5,6593f9115e934350c326206088e8bc7c" + ] + ], + "mosdepth_per_base_d4": [ + + ], + "mosdepth_quantized_bed": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.quantized.bed.gz:md5,8975e3f5a62bb2ea6f349539daf8e9a4" + ] + ], + "mosdepth_quantized_csi": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.quantized.bed.gz.csi:md5,39f0a425a3f11134e247141c0890fa89" + ] + ], "mosdepth_regions": [ [ { @@ -77,6 +189,26 @@ "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" ] ], + "mosdepth_regions_bed": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.regions.bed.gz:md5,82848481047cda38748ec0409db8a669" + ] + ], + "mosdepth_regions_csi": [ + [ + { + "id": "test", + "single_end": false, + "tag": "WES" + }, + "test.regions.bed.gz.csi:md5,68d13d373b9fd8b92535f566e77ed036" + ] + ], "mosdepth_summary": [ [ { @@ -86,6 +218,12 @@ }, "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" ] + ], + "mosdepth_thresholds_bed": [ + + ], + "mosdepth_thresholds_csi": [ + ], "panelcoverage": [ [ @@ -116,9 +254,9 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.4" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-23T14:45:47.730036" + "timestamp": "2025-11-04T14:20:02.213734734" }, "Coverage - seqcap": { "content": [ @@ -130,7 +268,7 @@ "single_end": false, "tag": "seqcap" }, - "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" ] ], "1": [ @@ -140,9 +278,32 @@ "single_end": false, "tag": "seqcap" }, - "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" + "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + ] + ], + "10": [ + + ], + "11": [ + + ], + "12": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] ], + "13": [ + + ], + "14": [ + "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", + "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + ], "2": [ [ { @@ -154,149 +315,166 @@ ] ], "3": [ + + ], + "4": [ [ { "id": "test", "single_end": false, "tag": "seqcap" }, - "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + "test.per-base.bed.gz:md5,c89a207273626f8415df1710bc522e8e" ] - ], - "4": [ - ], "5": [ - "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", - "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" - ], - "mosdepth_global": [ [ { "id": "test", "single_end": false, "tag": "seqcap" }, - "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" + "test.per-base.bed.gz.csi:md5,6593f9115e934350c326206088e8bc7c" ] ], - "mosdepth_regions": [ + "6": [ [ { "id": "test", "single_end": false, "tag": "seqcap" }, - "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" + "test.regions.bed.gz:md5,82848481047cda38748ec0409db8a669" ] ], - "mosdepth_summary": [ + "7": [ [ { "id": "test", "single_end": false, "tag": "seqcap" }, - "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + "test.regions.bed.gz.csi:md5,68d13d373b9fd8b92535f566e77ed036" ] ], - "panelcoverage": [ - - ], - "samtools_coverage": [ + "8": [ [ { "id": "test", "single_end": false, "tag": "seqcap" }, - "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + "test.quantized.bed.gz:md5,8975e3f5a62bb2ea6f349539daf8e9a4" ] ], - "versions": [ - "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", - "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" - }, - "timestamp": "2025-06-23T13:40:00.179558" - }, - "Coverage": { - "content": [ - { - "0": [ + "9": [ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "seqcap" }, - "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" + "test.quantized.bed.gz.csi:md5,39f0a425a3f11134e247141c0890fa89" ] ], - "1": [ + "mosdepth_global": [ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "seqcap" }, "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" ] ], - "2": [ + "mosdepth_per_base_bed": [ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "seqcap" }, - "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" + "test.per-base.bed.gz:md5,c89a207273626f8415df1710bc522e8e" ] ], - "3": [ + "mosdepth_per_base_csi": [ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "seqcap" }, - "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + "test.per-base.bed.gz.csi:md5,6593f9115e934350c326206088e8bc7c" ] ], - "4": [ + "mosdepth_per_base_d4": [ ], - "5": [ - "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", - "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + "mosdepth_quantized_bed": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.quantized.bed.gz:md5,8975e3f5a62bb2ea6f349539daf8e9a4" + ] ], - "mosdepth_global": [ + "mosdepth_quantized_csi": [ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "seqcap" }, - "test.mosdepth.global.dist.txt:md5,ceec5e216dac6a4e15b961713ee8b16c" + "test.quantized.bed.gz.csi:md5,39f0a425a3f11134e247141c0890fa89" ] ], "mosdepth_regions": [ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "seqcap" }, "test.mosdepth.region.dist.txt:md5,baffaa91e753347fd44c2e6e0a618d1f" ] ], + "mosdepth_regions_bed": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.regions.bed.gz:md5,82848481047cda38748ec0409db8a669" + ] + ], + "mosdepth_regions_csi": [ + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test.regions.bed.gz.csi:md5,68d13d373b9fd8b92535f566e77ed036" + ] + ], "mosdepth_summary": [ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "seqcap" }, "test.mosdepth.summary.txt:md5,c929389c608f49ca01d800fb5cc94bb9" ] + ], + "mosdepth_thresholds_bed": [ + + ], + "mosdepth_thresholds_csi": [ + ], "panelcoverage": [ @@ -305,7 +483,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "tag": "seqcap" }, "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] @@ -318,8 +497,8 @@ ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-23T13:34:58.331928" + "timestamp": "2025-11-04T14:19:32.672589279" } } \ No newline at end of file diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test b/tests/subworkflows/local/fastq_align_rna/main.nf.test index 05f22be6..caf71651 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test @@ -39,9 +39,7 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - workflow.out.bam.collect { it.collect { it instanceof Map ? it : file(it).name } }, - workflow.out.reports.collect { it.collect { it instanceof Map ? it : file(it).name } }, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:["bam", "reports"]) ).match() } diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap index cb4a1d6d..bd1553c9 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap @@ -1,71 +1,73 @@ { "fastq align rna - star": { "content": [ - [ - [ - { - "id": "test", - "samplename": "test", - "single_end": false, - "sample_type": "RNA", - "genome": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" - } - }, - "test.Aligned.out.bam" - ] - ], - [ - [ - { - "id": "test", - "samplename": "test", - "single_end": false, - "sample_type": "RNA", - "genome": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" - } - }, - "test.Log.final.out" + { + "bam": [ + [ + { + "genome": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "RNA", + "samplename": "test", + "single_end": false + }, + "test.Aligned.out.bam" + ] ], - [ - { - "id": "test", - "samplename": "test", - "single_end": false, - "sample_type": "RNA", - "genome": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" - } - }, - "test.Log.out" + "reports": [ + [ + { + "genome": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "RNA", + "samplename": "test", + "single_end": false + }, + "test.Log.final.out" + ], + [ + { + "genome": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "RNA", + "samplename": "test", + "single_end": false + }, + "test.Log.out" + ], + [ + { + "genome": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "RNA", + "samplename": "test", + "single_end": false + }, + "test.Log.progress.out" + ] ], - [ - { - "id": "test", - "samplename": "test", - "single_end": false, - "sample_type": "RNA", - "genome": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" - } - }, - "test.Log.progress.out" + "versions": [ + "versions.yml:md5,a08c174f2d393f0b39c2cfe003ffafb9" ] - ], - [ - "versions.yml:md5,a08c174f2d393f0b39c2cfe003ffafb9" - ] + } ], "meta": { - "nf-test": "0.9.1", - "nextflow": "24.10.3" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2025-01-14T10:45:55.903470736" + "timestamp": "2025-11-04T14:22:48.650056385" }, "fastq align rna - unknown aligner": { "content": [ diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test index bd73587b..6ee92e5e 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test @@ -44,9 +44,7 @@ nextflow_workflow { { assert workflow.success assert snapshot( - workflow.out.cram_crai.collect { it.findAll { !(it instanceof Map) }.collect { file(it).name } }, - workflow.out.multiqc_files, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:["cram_crai"]) ).match() } ) @@ -89,9 +87,7 @@ nextflow_workflow { { assert workflow.success assert snapshot( - workflow.out.cram_crai.collect { it.findAll { !(it instanceof Map) }.collect { file(it).name } }, - workflow.out.multiqc_files, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:["cram_crai"]) ).match() } ) @@ -134,9 +130,7 @@ nextflow_workflow { { assert workflow.success assert snapshot( - workflow.out.cram_crai.collect { it.findAll { !(it instanceof Map) }.collect { file(it).name } }, - workflow.out.multiqc_files, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:["cram_crai"]) ).match() } ) @@ -179,9 +173,7 @@ nextflow_workflow { { assert workflow.success assert snapshot( - workflow.out.cram_crai.collect { it.findAll { !(it instanceof Map) }.collect { file(it).name } }, - workflow.out.multiqc_files, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:["cram_crai"]) ).match() } ) @@ -225,9 +217,7 @@ nextflow_workflow { { assert workflow.success assert snapshot( - workflow.out.cram_crai.collect { it.findAll { !(it instanceof Map) }.collect { file(it).name } }, - workflow.out.multiqc_files, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:["cram_crai"]) ).match() } ) diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index ad5924a6..bcaa1414 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -1,115 +1,252 @@ { "fastq to cram - stub": { "content": [ - [ - [ - "test.merged.cram", - "test.merged.cram.crai" + { + "align_reports": [ + + ], + "cram_crai": [ + [ + { + "groupSize": 1, + "groupTarget": { + "genome_data": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "DNA", + "samplename": "test", + "single_end": false + } + }, + "test.merged.cram", + "test.merged.cram.crai" + ] + ], + "sormadup_metrics": [ + + ], + "versions": [ + "versions.yml:md5,a7ccfeb53d42f57673ea59012c30e897", + "versions.yml:md5,d92f130d879deee51a23917c6e272233", + "versions.yml:md5,d92f130d879deee51a23917c6e272233" ] - ], - [ - - ], - [ - "versions.yml:md5,a7ccfeb53d42f57673ea59012c30e897", - "versions.yml:md5,d92f130d879deee51a23917c6e272233", - "versions.yml:md5,d92f130d879deee51a23917c6e272233" - ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-03T10:39:18.407178" + "timestamp": "2025-11-04T14:30:29.475396941" }, "fastq to cram - bwa - bamsormadup": { "content": [ - [ - [ - "test.cram", - "test.cram.crai" + { + "align_reports": [ + + ], + "cram_crai": [ + [ + { + "groupSize": 1, + "groupTarget": { + "genome_data": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "DNA", + "samplename": "test", + "single_end": false + } + }, + "test.cram", + "test.cram.crai" + ] + ], + "sormadup_metrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "id": "test", + "samplename": "test", + "single_end": false, + "sample_type": "DNA", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + } + } + }, + "test.merged.metrics.txt:md5,4ee20f12cb4d6077479a08310c8f6c70" + ] + ], + "versions": [ + "versions.yml:md5,7e9be834e78aaf958ee23618377d8da5", + "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d", + "versions.yml:md5,d92f130d879deee51a23917c6e272233", + "versions.yml:md5,d92f130d879deee51a23917c6e272233" ] - ], - [ - "test.merged.metrics.txt:md5,4ee20f12cb4d6077479a08310c8f6c70" - ], - [ - "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d", - "versions.yml:md5,d92f130d879deee51a23917c6e272233", - "versions.yml:md5,d92f130d879deee51a23917c6e272233" - ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-03T10:36:05.605497" + "timestamp": "2025-11-04T14:24:09.28415088" }, "fastq to cram - bwa - samtools sormadup": { "content": [ - [ - [ - "test.merged.cram", - "test.merged.cram.crai" + { + "align_reports": [ + + ], + "cram_crai": [ + [ + { + "groupSize": 1, + "groupTarget": { + "genome_data": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "DNA", + "samplename": "test", + "single_end": false + } + }, + "test.merged.cram", + "test.merged.cram.crai" + ] + ], + "sormadup_metrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "id": "test", + "samplename": "test", + "single_end": false, + "sample_type": "DNA", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + } + } + }, + "test.merged.metrics:md5,6e4d03a56877997e0e035d267550e381" + ] + ], + "versions": [ + "versions.yml:md5,7d966b1716b0f134534741313257f0ec", + "versions.yml:md5,d92f130d879deee51a23917c6e272233", + "versions.yml:md5,d92f130d879deee51a23917c6e272233" ] - ], - [ - "test.merged.metrics:md5,6e4d03a56877997e0e035d267550e381" - ], - [ - "versions.yml:md5,7d966b1716b0f134534741313257f0ec", - "versions.yml:md5,d92f130d879deee51a23917c6e272233", - "versions.yml:md5,d92f130d879deee51a23917c6e272233" - ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-03T10:38:15.994769" + "timestamp": "2025-11-04T14:28:32.155644934" }, "fastq to cram - star - bamsormadup": { "content": [ - [ - [ - "test.cram", - "test.cram.crai" + { + "align_reports": [ + + ], + "cram_crai": [ + [ + { + "groupSize": 1, + "groupTarget": { + "genome_data": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "RNA", + "samplename": "test", + "single_end": false + } + }, + "test.cram", + "test.cram.crai" + ] + ], + "sormadup_metrics": [ + [ + { + "groupSize": 1, + "groupTarget": { + "id": "test", + "samplename": "test", + "single_end": false, + "sample_type": "RNA", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + } + } + }, + "test.merged.metrics.txt:md5,641527401576375d7c0b0b54fbaf63ab" + ] + ], + "versions": [ + "versions.yml:md5,7e9be834e78aaf958ee23618377d8da5", + "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d" ] - ], - [ - "test.merged.metrics.txt:md5,641527401576375d7c0b0b54fbaf63ab" - ], - [ - "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d" - ] + } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-07-16T08:41:12.044485" + "timestamp": "2025-11-04T14:27:31.44516813" }, "fastq to cram - bwa - samtools sort": { "content": [ - [ - [ - "test.merged.cram", - "test.merged.cram.crai" + { + "align_reports": [ + + ], + "cram_crai": [ + [ + { + "groupSize": 1, + "groupTarget": { + "genome_data": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, + "id": "test", + "sample_type": "DNA", + "samplename": "test", + "single_end": false + } + }, + "test.merged.cram", + "test.merged.cram.crai" + ] + ], + "sormadup_metrics": [ + + ], + "versions": [ + "versions.yml:md5,a7ccfeb53d42f57673ea59012c30e897", + "versions.yml:md5,d92f130d879deee51a23917c6e272233", + "versions.yml:md5,d92f130d879deee51a23917c6e272233" ] - ], - [ - - ], - [ - "versions.yml:md5,a7ccfeb53d42f57673ea59012c30e897", - "versions.yml:md5,d92f130d879deee51a23917c6e272233", - "versions.yml:md5,d92f130d879deee51a23917c6e272233" - ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-03T10:38:46.909512" + "timestamp": "2025-11-04T14:29:30.443653387" } } \ No newline at end of file diff --git a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test b/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test index c3f9d375..b3a3b185 100644 --- a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test +++ b/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test @@ -27,8 +27,7 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - file(workflow.out.cram[0][1]).name, - workflow.out.versions + sanitizeOutput(workflow.out, unstableKeys:["cram"]) ).match() } diff --git a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap index be64fb72..3dfdcb8b 100644 --- a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap @@ -1,16 +1,30 @@ { "fastq to unaligned cram": { "content": [ - "test.unaligned.cram", - [ - "versions.yml:md5,422c9b3605121c3528ee755bbdb12a85", - "versions.yml:md5,f494e9f15ef064e11d31abca2f2ba51c" - ] + { + "cram": [ + [ + { + "groupSize": 1, + "groupTarget": { + "id": "test.unaligned", + "samplename": "test", + "single_end": false + } + }, + "test.unaligned.cram" + ] + ], + "versions": [ + "versions.yml:md5,422c9b3605121c3528ee755bbdb12a85", + "versions.yml:md5,f494e9f15ef064e11d31abca2f2ba51c" + ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.1" + "nextflow": "25.10.0" }, - "timestamp": "2024-11-19T15:29:54.134408" + "timestamp": "2025-11-04T14:30:55.301756415" } } \ No newline at end of file From 5131640f00d5b0e8538e0f8af8603b92e5646a84 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 4 Nov 2025 15:09:25 +0100 Subject: [PATCH 019/202] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11783049..e4178019 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## dev +- Update the output handling to use the new workflow output definitions. + ## v2.0.6 - Update bash options for nextflow version 25.04.2 From 4334b77660d9cf4a2cab8726e088298a086fdb73 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 4 Nov 2025 15:53:39 +0100 Subject: [PATCH 020/202] bump ci nextflow version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f45f92e..4902664d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: strategy: matrix: NXF_VER: - - "25.04.0" + - "25.10.0" tags: - "modules/local/panelcoverage" - "subworkflows/local/bam_qc" From 5b2ee8acaed8241b634591f162f81e547f78d37c Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 4 Nov 2025 16:30:20 +0100 Subject: [PATCH 021/202] bump bcl_demultiplex --- modules.json | 2 +- subworkflows/nf-core/bcl_demultiplex/main.nf | 16 +- subworkflows/nf-core/bcl_demultiplex/meta.yml | 4 + .../bcl_demultiplex/tests/main.nf.test | 47 +- .../bcl_demultiplex/tests/main.nf.test.snap | 438 ++++++++++-------- 5 files changed, 294 insertions(+), 213 deletions(-) diff --git a/modules.json b/modules.json index d860bfc6..9b8eb350 100644 --- a/modules.json +++ b/modules.json @@ -154,7 +154,7 @@ "nf-core": { "bcl_demultiplex": { "branch": "master", - "git_sha": "27cceb2eb8aa959d4a8819caab886386a59a3789", + "git_sha": "1a0770da1cf5c5cd388bf888ba8798bc4d1fba56", "installed_by": ["subworkflows"] }, "fastq_align_dna": { diff --git a/subworkflows/nf-core/bcl_demultiplex/main.nf b/subworkflows/nf-core/bcl_demultiplex/main.nf index 48e08613..bfe1ae83 100644 --- a/subworkflows/nf-core/bcl_demultiplex/main.nf +++ b/subworkflows/nf-core/bcl_demultiplex/main.nf @@ -13,11 +13,11 @@ workflow BCL_DEMULTIPLEX { demultiplexer // bclconvert or bcl2fastq main: - ch_versions = Channel.empty() - ch_fastq = Channel.empty() - ch_reports = Channel.empty() - ch_stats = Channel.empty() - ch_interop = Channel.empty() + ch_versions = channel.empty() + ch_fastq = channel.empty() + ch_reports = channel.empty() + ch_stats = channel.empty() + ch_interop = channel.empty() ch_logs = channel.empty() // Split flowcells into separate channels containing run as tar and run as path @@ -122,9 +122,9 @@ workflow BCL_DEMULTIPLEX { meta.single_end = fastq.size() == 1 return [meta, fastq.flatten()] } - .branch { - fastq : it[0].empty == false - empty_fastq : it[0].empty == true + .branch { meta, _fastq -> + fastq : meta.empty == false + empty_fastq : meta.empty == true } .set{ch_fastq_with_meta} diff --git a/subworkflows/nf-core/bcl_demultiplex/meta.yml b/subworkflows/nf-core/bcl_demultiplex/meta.yml index 2fc8f7aa..856f5204 100644 --- a/subworkflows/nf-core/bcl_demultiplex/meta.yml +++ b/subworkflows/nf-core/bcl_demultiplex/meta.yml @@ -48,6 +48,10 @@ output: type: file description: Demultiplexing statistics (bcl2fastq only) pattern: "Stats/*" + - logs: + type: file + description: Demultiplexing logs (bclconvert only) + pattern: "Logs/*" - versions: type: file description: File containing software versions diff --git a/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test b/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test index 838a56cf..e1fb00ab 100644 --- a/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test +++ b/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test @@ -32,15 +32,25 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.reports, - workflow.out.versions, - workflow.out.fastq, - workflow.out.stats, - workflow.out.interop.get(0).get(1).findAll { file(it).name != "IndexMetricsOut.bin" }, + sanitizeOutput(workflow.out, unstableKeys: ["empty_fastq", "logs"]).collectEntries { key, val -> + if (key == "interop") { + return [ key, val.collect { meta, files -> + [ + meta, + files.collect { interop_file -> + if (interop_file.endsWith("IndexMetricsOut.bin")) { + file(interop_file).name + } else { + interop_file + } + } + ] + } ] + } + return [ key, val ] + }, ).match() }, - { assert file(workflow.out.interop.get(0).get(1).find { file(it).name == "IndexMetricsOut.bin" }).exists() }, - { assert file(workflow.out.empty_fastq.get(0).get(1).find { file(it).name == "SampleZ_S5_L001_R1_001.fastq.gz" }).exists() } ) } } @@ -65,14 +75,25 @@ nextflow_workflow { assertAll( { assert workflow.success }, { assert snapshot( - workflow.out.reports, - workflow.out.versions, - workflow.out.fastq, - workflow.out.stats, - workflow.out.interop.get(0).get(1).findAll { file(it).name != "IndexMetricsOut.bin" }, + sanitizeOutput(workflow.out).collectEntries { key, val -> + if (key == "interop") { + return [ key, val.collect { meta, files -> + [ + meta, + files.collect { interop_file -> + if (interop_file.endsWith("IndexMetricsOut.bin")) { + file(interop_file).name + } else { + interop_file + } + } + ] + } ] + } + return [ key, val ] + }, ).match() }, - { assert file(workflow.out.interop.get(0).get(1).find { file(it).name == "IndexMetricsOut.bin" }).exists() } ) } } diff --git a/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test.snap b/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test.snap index 88cc0e93..537c7efe 100644 --- a/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test.snap +++ b/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test.snap @@ -1,240 +1,296 @@ { "bclconvert": { "content": [ - [ - [ - { - "id": "HMTFYDRXX", - "lane": 1 - }, + { + "empty_fastq": [ [ - "Adapter_Cycle_Metrics.csv:md5,05fbe7b2b0acdd557d355b448aa88ace", - "Adapter_Metrics.csv:md5,0fa4ac708955417af9d18cec4955552f", - "Demultiplex_Stats.csv:md5,4a3f451faa098156623b55b0f2ff27ee", - "Demultiplex_Tile_Stats.csv:md5,8f6fb58990572c4aa19c0100d8351484", - "IndexMetricsOut.bin:md5,fb16c8a9873e5b5950ae5949126af76c", - "Index_Hopping_Counts.csv:md5,f59474d96afe8218c7590bb240b19690", - "Quality_Metrics.csv:md5,c4622066f85d93b1661c928a46cfc508", - "Quality_Tile_Metrics.csv:md5,e22bc5e2f147695150b02afcccb38c4f", - "RunInfo.xml:md5,f283cb4600235db9261ee1e319b1407e", - "SampleSheet.csv:md5,4113eabae23136cc819c7f15ac5b6aad", - "Top_Unknown_Barcodes.csv:md5,37dbc2860c640fc721820b0217ea0504", - "fastq_list.csv:md5,482cf7fe9b304a900e4ede3bb25b4912" - ] - ] - ], - [ - "versions.yml:md5,d5d640ea998880b16202e0989b6e3926" - ], - [ - [ - { - "id": "Sample1_S1_L001", - "samplename": "Sample1", - "fcid": "HMTFYDRXX", - "lane": 1, - "readgroup": { - "ID": "HMTFYDRXX.1", - "SM": "Sample1", - "PL": "ILLUMINA", - "PU": "HMTFYDRXX.1.GAACTGAGCG+TCGTGGAGCG" + { + "empty": true, + "fcid": "HMTFYDRXX", + "id": "SampleZ_S5_L001", + "lane": 1, + "readgroup": { + + }, + "samplename": "SampleZ", + "single_end": true }, - "empty": false, - "single_end": true - }, - [ - "Sample1_S1_L001_R1_001.fastq.gz:md5,b5489d1964db8db5502eb742cc3ef3ec" + [ + "SampleZ_S5_L001_R1_001.fastq.gz" + ] ] ], - [ - { - "id": "Sample23_S3_L001", - "samplename": "Sample23", - "fcid": "HMTFYDRXX", - "lane": 1, - "readgroup": { - "ID": "HMTFYDRXX.1", - "SM": "Sample23", - "PL": "ILLUMINA", - "PU": "HMTFYDRXX.1.CGTCTCATAT+TATAGTAGCT" + "fastq": [ + [ + { + "id": "Sample1_S1_L001", + "samplename": "Sample1", + "fcid": "HMTFYDRXX", + "lane": 1, + "readgroup": { + "ID": "HMTFYDRXX.1", + "SM": "Sample1", + "PL": "ILLUMINA", + "PU": "HMTFYDRXX.1.GAACTGAGCG+TCGTGGAGCG" + }, + "empty": false, + "single_end": true }, - "empty": false, - "single_end": true - }, + [ + "Sample1_S1_L001_R1_001.fastq.gz:md5,b5489d1964db8db5502eb742cc3ef3ec" + ] + ], [ - "Sample23_S3_L001_R1_001.fastq.gz:md5,767a1091320320b140288066e29bccc5" + { + "id": "Sample23_S3_L001", + "samplename": "Sample23", + "fcid": "HMTFYDRXX", + "lane": 1, + "readgroup": { + "ID": "HMTFYDRXX.1", + "SM": "Sample23", + "PL": "ILLUMINA", + "PU": "HMTFYDRXX.1.CGTCTCATAT+TATAGTAGCT" + }, + "empty": false, + "single_end": true + }, + [ + "Sample23_S3_L001_R1_001.fastq.gz:md5,767a1091320320b140288066e29bccc5" + ] + ], + [ + { + "id": "SampleA_S2_L001", + "samplename": "SampleA", + "fcid": "HMTFYDRXX", + "lane": 1, + "readgroup": { + "ID": "HMTFYDRXX.1", + "SM": "SampleA", + "PL": "ILLUMINA", + "PU": "HMTFYDRXX.1.AGGTCAGATA+CTACAAGATA" + }, + "empty": false, + "single_end": true + }, + [ + "SampleA_S2_L001_R1_001.fastq.gz:md5,7de2ea88133409f34563f40a0d8c9e55" + ] + ], + [ + { + "id": "sampletest_S4_L001", + "samplename": "sampletest", + "fcid": "HMTFYDRXX", + "lane": 1, + "readgroup": { + "ID": "HMTFYDRXX.1", + "SM": "sampletest", + "PL": "ILLUMINA", + "PU": "HMTFYDRXX.1.ATTCCATAAG+TGCCTGGTGG" + }, + "empty": false, + "single_end": true + }, + [ + "sampletest_S4_L001_R1_001.fastq.gz:md5,c16c7de1b7bffb5e4503f4d94c40f881" + ] ] ], - [ - { - "id": "SampleA_S2_L001", - "samplename": "SampleA", - "fcid": "HMTFYDRXX", - "lane": 1, - "readgroup": { - "ID": "HMTFYDRXX.1", - "SM": "SampleA", - "PL": "ILLUMINA", - "PU": "HMTFYDRXX.1.AGGTCAGATA+CTACAAGATA" - }, - "empty": false, - "single_end": true - }, + "interop": [ [ - "SampleA_S2_L001_R1_001.fastq.gz:md5,7de2ea88133409f34563f40a0d8c9e55" + { + "id": "HMTFYDRXX", + "lane": 1 + }, + [ + "BasecallingMetricsOut.bin:md5,7fb651325cba614d497d376eaf43fef4", + "CorrectedIntMetricsOut.bin:md5,dc8d57282ba9ece9e5fc58a92aa2ac52", + "EmpiricalPhasingMetricsOut.bin:md5,1ef4631faf0a3a3beb31b10fc38a734d", + "EventMetricsOut.bin:md5,dee320ce29bdadde44589aa9439f53ab", + "ExtendedTileMetricsOut.bin:md5,f01d1a9cf8445adf719e652ad7304cf2", + "ExtractionMetricsOut.bin:md5,972f4082ad950baaf42a6d28517d28a8", + "FWHMGridMetricsOut.bin:md5,6e297bafcd845bfd0440d08e1bb27685", + "ImageMetricsOut.bin:md5,ac5d1f0a1f611c0c7c9dd8e6b9e701b1", + "IndexMetricsOut.bin", + "OpticalModelMetricsOut.bin:md5,3eaea5fcf2d353950b1e720c73695ccb", + "PFGridMetricsOut.bin:md5,ae469858ee96ffafbcaf3afb814bdab2", + "QMetrics2030Out.bin:md5,438248760db58917b32f4eccc6c64c39", + "QMetricsByLaneOut.bin:md5,e8254cb4a27846710a2a143296be2d8f", + "QMetricsOut.bin:md5,8f6b83028a42be721200a598161ac5c6", + "RegistrationMetricsOut.bin:md5,b5ebd957aed067b6403d851ba2ce0139", + "TileMetricsOut.bin:md5,21388348d81fa9be326d30ef6d348464" + ] ] ], - [ - { - "id": "sampletest_S4_L001", - "samplename": "sampletest", - "fcid": "HMTFYDRXX", - "lane": 1, - "readgroup": { - "ID": "HMTFYDRXX.1", - "SM": "sampletest", - "PL": "ILLUMINA", - "PU": "HMTFYDRXX.1.ATTCCATAAG+TGCCTGGTGG" + "logs": [ + [ + { + "id": "HMTFYDRXX", + "lane": 1 }, - "empty": false, - "single_end": true - }, + "Logs" + ] + ], + "reports": [ [ - "sampletest_S4_L001_R1_001.fastq.gz:md5,c16c7de1b7bffb5e4503f4d94c40f881" + { + "id": "HMTFYDRXX", + "lane": 1 + }, + [ + "Adapter_Cycle_Metrics.csv:md5,05fbe7b2b0acdd557d355b448aa88ace", + "Adapter_Metrics.csv:md5,0fa4ac708955417af9d18cec4955552f", + "Demultiplex_Detailed_Stats.csv:md5,5a6a4d66a96256ff71e4f649927fb112", + "Demultiplex_Stats.csv:md5,4a3f451faa098156623b55b0f2ff27ee", + "Demultiplex_Tile_Stats.csv:md5,f91fb0c7a2c5588ed43c7f9145d004ee", + "IndexMetricsOut.bin:md5,fb16c8a9873e5b5950ae5949126af76c", + "Index_Hopping_Counts.csv:md5,f59474d96afe8218c7590bb240b19690", + "Quality_Metrics.csv:md5,c4622066f85d93b1661c928a46cfc508", + "Quality_Tile_Metrics.csv:md5,e22bc5e2f147695150b02afcccb38c4f", + "RunInfo.xml:md5,f283cb4600235db9261ee1e319b1407e", + "SampleSheet.csv:md5,4113eabae23136cc819c7f15ac5b6aad", + "Top_Unknown_Barcodes.csv:md5,37dbc2860c640fc721820b0217ea0504", + "fastq_list.csv:md5,482cf7fe9b304a900e4ede3bb25b4912" + ] ] + ], + "stats": [ + + ], + "versions": [ + "versions.yml:md5,b1427a2b3abad63b04f1dd62c8f40e2e" ] - ], - [ - - ], - [ - "BasecallingMetricsOut.bin:md5,7fb651325cba614d497d376eaf43fef4", - "CorrectedIntMetricsOut.bin:md5,dc8d57282ba9ece9e5fc58a92aa2ac52", - "EmpiricalPhasingMetricsOut.bin:md5,1ef4631faf0a3a3beb31b10fc38a734d", - "EventMetricsOut.bin:md5,dee320ce29bdadde44589aa9439f53ab", - "ExtendedTileMetricsOut.bin:md5,f01d1a9cf8445adf719e652ad7304cf2", - "ExtractionMetricsOut.bin:md5,972f4082ad950baaf42a6d28517d28a8", - "FWHMGridMetricsOut.bin:md5,6e297bafcd845bfd0440d08e1bb27685", - "ImageMetricsOut.bin:md5,ac5d1f0a1f611c0c7c9dd8e6b9e701b1", - "OpticalModelMetricsOut.bin:md5,3eaea5fcf2d353950b1e720c73695ccb", - "PFGridMetricsOut.bin:md5,ae469858ee96ffafbcaf3afb814bdab2", - "QMetrics2030Out.bin:md5,438248760db58917b32f4eccc6c64c39", - "QMetricsByLaneOut.bin:md5,e8254cb4a27846710a2a143296be2d8f", - "QMetricsOut.bin:md5,8f6b83028a42be721200a598161ac5c6", - "RegistrationMetricsOut.bin:md5,b5ebd957aed067b6403d851ba2ce0139", - "TileMetricsOut.bin:md5,21388348d81fa9be326d30ef6d348464" - ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.10.0" }, - "timestamp": "2025-06-02T12:35:59.918717" + "timestamp": "2025-11-04T16:13:41.469897018" }, "bcl2fastq": { "content": [ - [ - [ - { - "id": "test", - "lane": 1 - }, + { + "empty_fastq": [ + + ], + "fastq": [ + [ + { + "id": "Sample1_S1_L001", + "samplename": "Sample1", + "fcid": "test", + "lane": 1, + "readgroup": { + "ID": "000000000-K9H97.1", + "SM": "Sample1", + "PL": "ILLUMINA", + "PU": "000000000-K9H97.1" + }, + "empty": false, + "single_end": true + }, + [ + "Sample1_S1_L001_R1_001.fastq.gz:md5,0675fb6365322eaafb33c0f8e862b54b" + ] + ] + ], + "interop": [ [ + { + "id": "test", + "lane": 1 + }, + [ + "ControlMetricsOut.bin:md5,6d77b38d0793a6e1ce1e85706e488953", + "CorrectedIntMetricsOut.bin:md5,2bbf84d3be72734addaa2fe794711434", + "ErrorMetricsOut.bin:md5,38c88def138e9bb832539911affdb286", + "ExtractionMetricsOut.bin:md5,7497c3178837eea8f09350b5cd252e99", + "IndexMetricsOut.bin", + "QMetricsOut.bin:md5,7e9f198d53ebdfbb699a5f94cf1ed51c", + "TileMetricsOut.bin:md5,83891751ec1c91a425a524b476b6ca3c" + ] + ] + ], + "logs": [ + + ], + "reports": [ + [ + { + "id": "test", + "lane": 1 + }, [ [ [ [ [ - "lane.html:md5,794e48287f47a9f22dcb6b6d0c22c3eb", - "laneBarcode.html:md5,2bbdae3ee57151eab520c966597d7438" - ], - [ - - ] - ] - ], - [ - [ - [ - "lane.html:md5,f741870307050dcea79a838f5971770f", - "laneBarcode.html:md5,ffe2e863811c76cb9da27d5d124e0611" - ], - [ - "lane.html:md5,cca97e771d3491dbc8cd3fe389595b09", - "laneBarcode.html:md5,cca97e771d3491dbc8cd3fe389595b09" + [ + "lane.html:md5,794e48287f47a9f22dcb6b6d0c22c3eb", + "laneBarcode.html:md5,2bbdae3ee57151eab520c966597d7438" + ], + [ + + ] ] ], [ [ - "lane.html:md5,c383b0768d9978733d3f5d3b91c15af0", - "laneBarcode.html:md5,48842c23b9a2816aec540177df870968" + [ + "lane.html:md5,f741870307050dcea79a838f5971770f", + "laneBarcode.html:md5,ffe2e863811c76cb9da27d5d124e0611" + ], + [ + "lane.html:md5,cca97e771d3491dbc8cd3fe389595b09", + "laneBarcode.html:md5,cca97e771d3491dbc8cd3fe389595b09" + ] ], [ - + [ + "lane.html:md5,c383b0768d9978733d3f5d3b91c15af0", + "laneBarcode.html:md5,48842c23b9a2816aec540177df870968" + ], + [ + + ] ] ] - ] - ], - "Report.css:md5,eb7d3eb68fc1539f411404987246b59b", - "index.html:md5,5747c407854ae2c358d0ec201ce622d8", - "tree.html:md5,a1b9bf592973ca829ec69ddf888b7e34" + ], + "Report.css:md5,eb7d3eb68fc1539f411404987246b59b", + "index.html:md5,5747c407854ae2c358d0ec201ce622d8", + "tree.html:md5,a1b9bf592973ca829ec69ddf888b7e34" + ] ] ] - ] - ], - [ - "versions.yml:md5,513271615cb02dbe541a6202d713ef81" - ], - [ - [ - { - "id": "Sample1_S1_L001", - "samplename": "Sample1", - "fcid": "test", - "lane": 1, - "readgroup": { - "ID": "000000000-K9H97.1", - "SM": "Sample1", - "PL": "ILLUMINA", - "PU": "000000000-K9H97.1" - }, - "empty": false, - "single_end": true - }, - [ - "Sample1_S1_L001_R1_001.fastq.gz:md5,0675fb6365322eaafb33c0f8e862b54b" - ] - ] - ], - [ - [ - { - "id": "test", - "lane": 1 - }, + ], + "stats": [ [ - "AdapterTrimming.txt:md5,48ed2b914b1246c0b5d8667525550946", - "ConversionStats.xml:md5,8fe0f57f3f5d256a0762dba75ac62d05", - "DemultiplexingStats.xml:md5,2047ff18f5b9107c084de06e9ff943ad", - "DemuxSummaryF1L1.txt:md5,03e5fd0c1e3079c5f8c7b4d0501b37ff", - "FastqSummaryF1L1.txt:md5,0c6f2d87ee183b84d1051cde9a5643d1", - "Stats.json:md5,8e5f038b8aa9e465599d3575f930e604" + { + "id": "test", + "lane": 1 + }, + [ + "AdapterTrimming.txt:md5,48ed2b914b1246c0b5d8667525550946", + "ConversionStats.xml:md5,8fe0f57f3f5d256a0762dba75ac62d05", + "DemultiplexingStats.xml:md5,2047ff18f5b9107c084de06e9ff943ad", + "DemuxSummaryF1L1.txt:md5,03e5fd0c1e3079c5f8c7b4d0501b37ff", + "FastqSummaryF1L1.txt:md5,0c6f2d87ee183b84d1051cde9a5643d1", + "Stats.json:md5,8e5f038b8aa9e465599d3575f930e604" + ] ] + ], + "versions": [ + "versions.yml:md5,513271615cb02dbe541a6202d713ef81" ] - ], - [ - "ControlMetricsOut.bin:md5,6d77b38d0793a6e1ce1e85706e488953", - "CorrectedIntMetricsOut.bin:md5,2bbf84d3be72734addaa2fe794711434", - "ErrorMetricsOut.bin:md5,38c88def138e9bb832539911affdb286", - "ExtractionMetricsOut.bin:md5,7497c3178837eea8f09350b5cd252e99", - "QMetricsOut.bin:md5,7e9f198d53ebdfbb699a5f94cf1ed51c", - "TileMetricsOut.bin:md5,83891751ec1c91a425a524b476b6ca3c" - ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.10.0" }, - "timestamp": "2024-08-05T13:35:57.172636143" + "timestamp": "2025-11-04T15:08:58.666466636" } } \ No newline at end of file From 1af5c002c539bd2c830f6057b7dae00f84ce8996 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 12 Nov 2025 14:37:29 +0100 Subject: [PATCH 022/202] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0964e70c..f23ca715 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/ci.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/ci.yml) [![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml) -[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A525.04.0-23aa62.svg)](https://www.nextflow.io/) +[![Nextflow](https://img.shields.io/badge/nextflow%20DSL2-%E2%89%A525.10.0-23aa62.svg)](https://www.nextflow.io/) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) [![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) [![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) From caf4700c285a38e0778b64709e6ee7e9976f26c7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 13 Nov 2025 15:45:21 +0100 Subject: [PATCH 023/202] fix version in config --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index 6022b555..61af1dd1 100644 --- a/nextflow.config +++ b/nextflow.config @@ -254,7 +254,7 @@ manifest { description = """Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data.""" mainScript = 'main.nf' nextflowVersion = '!>=25.10.0' - version = 'dev' + version = '2.1.0dev' doi = '' contributors = [ [ From c8888bec9ddb7ae96b3ba877a85989fb79f785f9 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 13 Nov 2025 15:52:33 +0100 Subject: [PATCH 024/202] bump changelog version --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4178019..5bf9c031 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## dev +## 2.1.0dev - Update the output handling to use the new workflow output definitions. From 907ef2e3b52a21b1325c8b38724cad68c70622c4 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 13 Nov 2025 16:11:23 +0100 Subject: [PATCH 025/202] Template update for nf-core/tools version 3.4.1 --- .devcontainer/devcontainer.json | 20 + .devcontainer/setup.sh | 13 + .gitattributes | 4 + .github/.dockstore.yml | 6 + .github/CONTRIBUTING.md | 118 +++++ .github/ISSUE_TEMPLATE/bug_report.yml | 42 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 11 + .github/PULL_REQUEST_TEMPLATE.md | 25 + .github/actions/get-shards/action.yml | 69 +++ .github/actions/nf-test/action.yml | 111 +++++ .github/workflows/branch.yml | 46 ++ .github/workflows/clean-up.yml | 24 + .github/workflows/download_pipeline.yml | 134 ++++++ .github/workflows/fix_linting.yml | 89 ++++ .github/workflows/linting.yml | 80 ++++ .github/workflows/linting_comment.yml | 28 ++ .github/workflows/nf-test.yml | 141 ++++++ .../workflows/template-version-comment.yml | 46 ++ .gitignore | 9 + .nf-core.yml | 40 ++ .pre-commit-config.yaml | 27 ++ .prettierignore | 14 + .prettierrc.yml | 6 + .vscode/settings.json | 3 + CHANGELOG.md | 16 + CITATIONS.md | 41 ++ LICENSE | 2 +- README.md | 91 ++++ assets/adaptivecard.json | 67 +++ assets/email_template.html | 53 +++ assets/email_template.txt | 31 ++ assets/methods_description_template.yml | 29 ++ assets/multiqc_config.yml | 14 + assets/samplesheet.csv | 3 + assets/schema_input.json | 33 ++ assets/sendmail_template.txt | 53 +++ assets/slackreport.json | 34 ++ conf/base.config | 66 +++ conf/igenomes.config | 440 ++++++++++++++++++ conf/igenomes_ignored.config | 9 + conf/modules.config | 34 ++ conf/test.config | 30 ++ conf/test_full.config | 24 + docs/README.md | 8 + docs/output.md | 61 +++ docs/usage.md | 212 +++++++++ main.nf | 105 +++++ modules.json | 41 ++ modules/nf-core/fastqc/environment.yml | 7 + modules/nf-core/fastqc/main.nf | 64 +++ modules/nf-core/fastqc/meta.yml | 72 +++ modules/nf-core/fastqc/tests/main.nf.test | 309 ++++++++++++ .../nf-core/fastqc/tests/main.nf.test.snap | 392 ++++++++++++++++ modules/nf-core/multiqc/environment.yml | 7 + modules/nf-core/multiqc/main.nf | 63 +++ modules/nf-core/multiqc/meta.yml | 92 ++++ modules/nf-core/multiqc/tests/main.nf.test | 92 ++++ .../nf-core/multiqc/tests/main.nf.test.snap | 41 ++ modules/nf-core/multiqc/tests/nextflow.config | 5 + nextflow.config | 280 +++++++++++ nextflow_schema.json | 257 ++++++++++ nf-test.config | 24 + ro-crate-metadata.json | 295 ++++++++++++ .../main.nf | 275 +++++++++++ .../nf-core/utils_nextflow_pipeline/main.nf | 126 +++++ .../nf-core/utils_nextflow_pipeline/meta.yml | 38 ++ .../tests/main.function.nf.test | 54 +++ .../tests/main.function.nf.test.snap | 20 + .../tests/main.workflow.nf.test | 113 +++++ .../tests/nextflow.config | 9 + .../nf-core/utils_nfcore_pipeline/main.nf | 419 +++++++++++++++++ .../nf-core/utils_nfcore_pipeline/meta.yml | 24 + .../tests/main.function.nf.test | 126 +++++ .../tests/main.function.nf.test.snap | 136 ++++++ .../tests/main.workflow.nf.test | 29 ++ .../tests/main.workflow.nf.test.snap | 19 + .../tests/nextflow.config | 9 + .../nf-core/utils_nfschema_plugin/main.nf | 74 +++ .../nf-core/utils_nfschema_plugin/meta.yml | 35 ++ .../utils_nfschema_plugin/tests/main.nf.test | 173 +++++++ .../tests/nextflow.config | 8 + .../tests/nextflow_schema.json | 96 ++++ tests/.nftignore | 12 + tests/default.nf.test | 33 ++ tests/nextflow.config | 14 + tower.yml | 5 + workflows/preprocessing.nf | 97 ++++ 87 files changed, 6546 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/setup.sh create mode 100644 .gitattributes create mode 100644 .github/.dockstore.yml create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/actions/get-shards/action.yml create mode 100644 .github/actions/nf-test/action.yml create mode 100644 .github/workflows/branch.yml create mode 100644 .github/workflows/clean-up.yml create mode 100644 .github/workflows/download_pipeline.yml create mode 100644 .github/workflows/fix_linting.yml create mode 100644 .github/workflows/linting.yml create mode 100644 .github/workflows/linting_comment.yml create mode 100644 .github/workflows/nf-test.yml create mode 100644 .github/workflows/template-version-comment.yml create mode 100644 .gitignore create mode 100644 .nf-core.yml create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierignore create mode 100644 .prettierrc.yml create mode 100644 .vscode/settings.json create mode 100644 CHANGELOG.md create mode 100644 CITATIONS.md create mode 100644 README.md create mode 100644 assets/adaptivecard.json create mode 100644 assets/email_template.html create mode 100644 assets/email_template.txt create mode 100644 assets/methods_description_template.yml create mode 100644 assets/multiqc_config.yml create mode 100644 assets/samplesheet.csv create mode 100644 assets/schema_input.json create mode 100644 assets/sendmail_template.txt create mode 100644 assets/slackreport.json create mode 100644 conf/base.config create mode 100644 conf/igenomes.config create mode 100644 conf/igenomes_ignored.config create mode 100644 conf/modules.config create mode 100644 conf/test.config create mode 100644 conf/test_full.config create mode 100644 docs/README.md create mode 100644 docs/output.md create mode 100644 docs/usage.md create mode 100644 main.nf create mode 100644 modules.json create mode 100644 modules/nf-core/fastqc/environment.yml create mode 100644 modules/nf-core/fastqc/main.nf create mode 100644 modules/nf-core/fastqc/meta.yml create mode 100644 modules/nf-core/fastqc/tests/main.nf.test create mode 100644 modules/nf-core/fastqc/tests/main.nf.test.snap create mode 100644 modules/nf-core/multiqc/environment.yml create mode 100644 modules/nf-core/multiqc/main.nf create mode 100644 modules/nf-core/multiqc/meta.yml create mode 100644 modules/nf-core/multiqc/tests/main.nf.test create mode 100644 modules/nf-core/multiqc/tests/main.nf.test.snap create mode 100644 modules/nf-core/multiqc/tests/nextflow.config create mode 100644 nextflow.config create mode 100644 nextflow_schema.json create mode 100644 nf-test.config create mode 100644 ro-crate-metadata.json create mode 100644 subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf create mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/main.nf create mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/meta.yml create mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test create mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap create mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test create mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/main.nf create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/meta.yml create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config create mode 100644 subworkflows/nf-core/utils_nfschema_plugin/main.nf create mode 100644 subworkflows/nf-core/utils_nfschema_plugin/meta.yml create mode 100644 subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test create mode 100644 subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config create mode 100644 subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json create mode 100644 tests/.nftignore create mode 100644 tests/default.nf.test create mode 100644 tests/nextflow.config create mode 100644 tower.yml create mode 100644 workflows/preprocessing.nf diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..97c8c97f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,20 @@ +{ + "name": "nfcore", + "image": "nfcore/devcontainer:latest", + + "remoteUser": "root", + "privileged": true, + + "remoteEnv": { + // Workspace path on the host for mounting with docker-outside-of-docker + "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" + }, + + "onCreateCommand": "./.devcontainer/setup.sh", + + "hostRequirements": { + "cpus": 4, + "memory": "16gb", + "storage": "32gb" + } +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 00000000..3ad5e2ac --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Customise the terminal command prompt +echo "export PROMPT_DIRTRIM=2" >> $HOME/.bashrc +echo "export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] '" >> $HOME/.bashrc +export PROMPT_DIRTRIM=2 +export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] ' + +# Update Nextflow +nextflow self-update + +# Update welcome message +echo "Welcome to the nf-cmgg/preprocessing devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..7a2dabc2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +*.config linguist-language=nextflow +*.nf.test linguist-language=nextflow +modules/nf-core/** linguist-generated +subworkflows/nf-core/** linguist-generated diff --git a/.github/.dockstore.yml b/.github/.dockstore.yml new file mode 100644 index 00000000..191fabd2 --- /dev/null +++ b/.github/.dockstore.yml @@ -0,0 +1,6 @@ +# Dockstore config version, not pipeline version +version: 1.2 +workflows: + - subclass: nfl + primaryDescriptorPath: /nextflow.config + publish: True diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..47f18382 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,118 @@ +# `nf-cmgg/preprocessing`: Contributing Guidelines + +Hi there! +Many thanks for taking an interest in improving nf-cmgg/preprocessing. + +We try to manage the required tasks for nf-cmgg/preprocessing using GitHub issues, you probably came to this page when creating one. +Please use the pre-filled template to save time. + +However, don't be put off by this template - other more general issues and suggestions are welcome! +Contributions to the code are even more welcome ;) + +## Contribution workflow + +If you'd like to write some code for nf-cmgg/preprocessing, the standard workflow is as follows: + +1. Check that there isn't already an issue about your idea in the [nf-cmgg/preprocessing issues](https://github.com/nf-cmgg/preprocessing/issues) to avoid duplicating work. If there isn't one already, please create one so that others know you're working on this +2. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-cmgg/preprocessing repository](https://github.com/nf-cmgg/preprocessing) to your GitHub account +3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions) +4. Use `nf-core pipelines schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10). +5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged + +If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/). + +## Tests + +You have the option to test your changes locally by running the pipeline. For receiving warnings about process selectors and other `debug` information, it is recommended to use the debug profile. Execute all the tests with the following command: + +```bash +nf-test test --profile debug,test,docker --verbose +``` + +When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests. +Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then. + +There are typically two types of tests that run: + +### Lint tests + +`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to. +To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core pipelines lint ` command. + +If any failures or warnings are encountered, please follow the listed URL for more documentation. + +### Pipeline tests + +Each `nf-core` pipeline should be set up with a minimal set of test-data. +`GitHub Actions` then runs the pipeline on this data to ensure that it exits successfully. +If there are any failures then the automated tests fail. +These tests are run both with the latest available version of `Nextflow` and also the minimum required version that is stated in the pipeline code. + +## Patch + +:warning: Only in the unlikely and regretful event of a release happening with a bug. + +- On your own fork, make a new branch `patch` based on `upstream/main` or `upstream/master`. +- Fix the bug, and bump version (X.Y.Z+1). +- Open a pull-request from `patch` to `main`/`master` with the changes. + +## Pipeline contribution conventions + +To make the `nf-cmgg/preprocessing` code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written. + +### Adding a new step + +If you wish to contribute a new step, please use the following coding standards: + +1. Define the corresponding input channel into your new process from the expected previous process channel. +2. Write the process block (see below). +3. Define the output channel if needed (see below). +4. Add any new parameters to `nextflow.config` with a default (see below). +5. Add any new parameters to `nextflow_schema.json` with help text (via the `nf-core pipelines schema build` tool). +6. Add sanity checks and validation for all relevant parameters. +7. Perform local tests to validate that the new code works as expected. +8. If applicable, add a new test in the `tests` directory. +9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module. +10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`. + +### Default values + +Parameters should be initialised / defined with default values within the `params` scope in `nextflow.config`. + +Once there, use `nf-core pipelines schema build` to add to `nextflow_schema.json`. + +### Default processes resource requirements + +Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/main/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels. + +The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block. + +### Naming schemes + +Please use the following naming schemes, to make it easy to understand what is going where. + +- initial process channel: `ch_output_from_` +- intermediate and terminal channels: `ch__for_` + +### Nextflow version bumping + +If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core pipelines bump-version --nextflow . [min-nf-version]` + +### Images and figures + +For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines). + +## GitHub Codespaces + +This repo includes a devcontainer configuration which will create a GitHub Codespaces for Nextflow development! This is an online developer environment that runs in your browser, complete with VSCode and a terminal. + +To get started: + +- Open the repo in [Codespaces](https://github.com/nf-cmgg/preprocessing/codespaces) +- Tools installed + - nf-core + - Nextflow + +Devcontainer specs: + +- [DevContainer config](.devcontainer/devcontainer.json) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..da749353 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,42 @@ +name: Bug report +description: Report something that is broken or incorrect +labels: bug +body: + - type: textarea + id: description + attributes: + label: Description of the bug + description: A clear and concise description of what the bug is. + validations: + required: true + + - type: textarea + id: command_used + attributes: + label: Command used and terminal output + description: Steps to reproduce the behaviour. Please paste the command you used to launch the pipeline and the output from your terminal. + render: console + placeholder: | + $ nextflow run ... + + Some output where something broke + + - type: textarea + id: files + attributes: + label: Relevant files + description: | + Please drag and drop the relevant files here. Create a `.zip` archive if the extension is not allowed. + Your verbose log file `.nextflow.log` is often useful _(this is a hidden file in the directory where you launched the pipeline)_ as well as custom Nextflow configuration files. + + - type: textarea + id: system + attributes: + label: System information + description: | + * Nextflow version _(eg. 23.04.0)_ + * Hardware _(eg. HPC, Desktop, Cloud)_ + * Executor _(eg. slurm, local, awsbatch)_ + * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter, Charliecloud, or Apptainer)_ + * OS _(eg. CentOS Linux, macOS, Linux Mint)_ + * Version of nf-cmgg/preprocessing _(eg. 1.1, 1.5, 1.8.2)_ diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..268e4c2f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,11 @@ +name: Feature request +description: Suggest an idea for the nf-cmgg/preprocessing pipeline +labels: enhancement +body: + - type: textarea + id: description + attributes: + label: Description of feature + description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered. + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..8e00290d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,25 @@ + + +## PR checklist + +- [ ] This comment contains a description of changes (with reason). +- [ ] If you've fixed a bug or added code that should be tested, add tests! +- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-cmgg/preprocessing/tree/main/.github/CONTRIBUTING.md) +- [ ] Make sure your code lints (`nf-core pipelines lint`). +- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir `). +- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir `). +- [ ] Usage Documentation in `docs/usage.md` is updated. +- [ ] Output Documentation in `docs/output.md` is updated. +- [ ] `CHANGELOG.md` is updated. +- [ ] `README.md` is updated (including new tool citations and authors/contributors). diff --git a/.github/actions/get-shards/action.yml b/.github/actions/get-shards/action.yml new file mode 100644 index 00000000..34085279 --- /dev/null +++ b/.github/actions/get-shards/action.yml @@ -0,0 +1,69 @@ +name: "Get number of shards" +description: "Get the number of nf-test shards for the current CI job" +inputs: + max_shards: + description: "Maximum number of shards allowed" + required: true + paths: + description: "Component paths to test" + required: false + tags: + description: "Tags to pass as argument for nf-test --tag parameter" + required: false +outputs: + shard: + description: "Array of shard numbers" + value: ${{ steps.shards.outputs.shard }} + total_shards: + description: "Total number of shards" + value: ${{ steps.shards.outputs.total_shards }} +runs: + using: "composite" + steps: + - name: Install nf-test + uses: nf-core/setup-nf-test@v1 + with: + version: ${{ env.NFT_VER }} + - name: Get number of shards + id: shards + shell: bash + run: | + # Run nf-test with dynamic parameter + nftest_output=$(nf-test test \ + --profile +docker \ + $(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \ + --dry-run \ + --ci \ + --changed-since HEAD^) || { + echo "nf-test command failed with exit code $?" + echo "Full output: $nftest_output" + exit 1 + } + echo "nf-test dry-run output: $nftest_output" + + # Default values for shard and total_shards + shard="[]" + total_shards=0 + + # Check if there are related tests + if echo "$nftest_output" | grep -q 'No tests to execute'; then + echo "No related tests found." + else + # Extract the number of related tests + number_of_shards=$(echo "$nftest_output" | sed -n 's|.*Executed \([0-9]*\) tests.*|\1|p') + if [[ -n "$number_of_shards" && "$number_of_shards" -gt 0 ]]; then + shards_to_run=$(( $number_of_shards < ${{ inputs.max_shards }} ? $number_of_shards : ${{ inputs.max_shards }} )) + shard=$(seq 1 "$shards_to_run" | jq -R . | jq -c -s .) + total_shards="$shards_to_run" + else + echo "Unexpected output format. Falling back to default values." + fi + fi + + # Write to GitHub Actions outputs + echo "shard=$shard" >> $GITHUB_OUTPUT + echo "total_shards=$total_shards" >> $GITHUB_OUTPUT + + # Debugging output + echo "Final shard array: $shard" + echo "Total number of shards: $total_shards" diff --git a/.github/actions/nf-test/action.yml b/.github/actions/nf-test/action.yml new file mode 100644 index 00000000..3b9724c7 --- /dev/null +++ b/.github/actions/nf-test/action.yml @@ -0,0 +1,111 @@ +name: "nf-test Action" +description: "Runs nf-test with common setup steps" +inputs: + profile: + description: "Profile to use" + required: true + shard: + description: "Shard number for this CI job" + required: true + total_shards: + description: "Total number of test shards(NOT the total number of matrix jobs)" + required: true + paths: + description: "Test paths" + required: true + tags: + description: "Tags to pass as argument for nf-test --tag parameter" + required: false +runs: + using: "composite" + steps: + - name: Setup Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: "${{ env.NXF_VERSION }}" + + - name: Set up Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + + - name: Install nf-test + uses: nf-core/setup-nf-test@v1 + with: + version: "${{ env.NFT_VER }}" + install-pdiff: true + + - name: Setup apptainer + if: contains(inputs.profile, 'singularity') + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: contains(inputs.profile, 'singularity') + shell: bash + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Conda setup + if: contains(inputs.profile, 'conda') + uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3 + with: + auto-update-conda: true + conda-solver: libmamba + channels: conda-forge + channel-priority: strict + conda-remove-defaults: true + + - name: Run nf-test + shell: bash + env: + NFT_WORKDIR: ${{ env.NFT_WORKDIR }} + run: | + nf-test test \ + --profile=+${{ inputs.profile }} \ + $(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \ + --ci \ + --changed-since HEAD^ \ + --verbose \ + --tap=test.tap \ + --shard ${{ inputs.shard }}/${{ inputs.total_shards }} + + # Save the absolute path of the test.tap file to the output + echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT + + - name: Generate test summary + if: always() + shell: bash + run: | + # Add header if it doesn't exist (using a token file to track this) + if [ ! -f ".summary_header" ]; then + echo "# 🚀 nf-test results" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "| Status | Test Name | Profile | Shard |" >> $GITHUB_STEP_SUMMARY + echo "|:------:|-----------|---------|-------|" >> $GITHUB_STEP_SUMMARY + touch .summary_header + fi + + if [ -f test.tap ]; then + while IFS= read -r line; do + if [[ $line =~ ^ok ]]; then + test_name="${line#ok }" + # Remove the test number from the beginning + test_name="${test_name#* }" + echo "| ✅ | ${test_name} | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY + elif [[ $line =~ ^not\ ok ]]; then + test_name="${line#not ok }" + # Remove the test number from the beginning + test_name="${test_name#* }" + echo "| ❌ | ${test_name} | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY + fi + done < test.tap + else + echo "| ⚠️ | No test results found | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY + fi + + - name: Clean up + if: always() + shell: bash + run: | + sudo rm -rf /home/ubuntu/tests/ diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml new file mode 100644 index 00000000..f7aa27a5 --- /dev/null +++ b/.github/workflows/branch.yml @@ -0,0 +1,46 @@ +name: nf-core branch protection +# This workflow is triggered on PRs to `main`/`master` branch on the repository +# It fails when someone tries to make a PR against the nf-core `main`/`master` branch instead of `dev` +on: + pull_request_target: + branches: + - main + - master + +jobs: + test: + runs-on: ubuntu-latest + steps: + # PRs to the nf-core repo main/master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches + - name: Check PRs + if: github.repository == 'nf-cmgg/preprocessing' + run: | + { [[ ${{github.event.pull_request.head.repo.full_name }} == nf-cmgg/preprocessing ]] && [[ $GITHUB_HEAD_REF == "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]] + + # If the above check failed, post a comment on the PR explaining the failure + # NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets + - name: Post PR comment + if: failure() + uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 + with: + message: | + ## This PR is against the `${{github.event.pull_request.base.ref}}` branch :x: + + * Do not close this PR + * Click _Edit_ and change the `base` to `dev` + * This CI test will remain failed until you push a new commit + + --- + + Hi @${{ github.event.pull_request.user.login }}, + + It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) ${{github.event.pull_request.base.ref}} branch. + The ${{github.event.pull_request.base.ref}} branch on nf-core repositories should always contain code from the latest release. + Because of this, PRs to ${{github.event.pull_request.base.ref}} are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch. + + You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page. + Note that even after this, the test will continue to show as failing until you push a new commit. + + Thanks again for your contribution! + repo-token: ${{ secrets.GITHUB_TOKEN }} + allow-repeats: false diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml new file mode 100644 index 00000000..6adb0fff --- /dev/null +++ b/.github/workflows/clean-up.yml @@ -0,0 +1,24 @@ +name: "Close user-tagged issues and PRs" +on: + schedule: + - cron: "0 0 * * 0" # Once a week + +jobs: + clean-up: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10 + with: + stale-issue-message: "This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days." + stale-pr-message: "This PR has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment if it is still useful." + close-issue-message: "This issue was closed because it has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor and then staled for 20 days with no activity." + days-before-stale: 30 + days-before-close: 20 + days-before-pr-close: -1 + any-of-labels: "awaiting-changes,awaiting-feedback" + exempt-issue-labels: "WIP" + exempt-pr-labels: "WIP" + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml new file mode 100644 index 00000000..6d94bcbf --- /dev/null +++ b/.github/workflows/download_pipeline.yml @@ -0,0 +1,134 @@ +name: Test successful pipeline download with 'nf-core pipelines download' + +# Run the workflow when: +# - dispatched manually +# - when a PR is opened or reopened to main/master branch +# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev. +on: + workflow_dispatch: + inputs: + testbranch: + description: "The specific branch you wish to utilize for the test execution of nf-core pipelines download." + required: true + default: "dev" + pull_request: + branches: + - main + - master + +env: + NXF_ANSI_LOG: false + +jobs: + configure: + runs-on: ubuntu-latest + outputs: + REPO_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPO_LOWERCASE }} + REPOTITLE_LOWERCASE: ${{ steps.get_repo_properties.outputs.REPOTITLE_LOWERCASE }} + REPO_BRANCH: ${{ steps.get_repo_properties.outputs.REPO_BRANCH }} + steps: + - name: Get the repository name and current branch + id: get_repo_properties + run: | + echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" + echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" + + download: + runs-on: ubuntu-latest + needs: configure + steps: + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + + - name: Disk space cleanup + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + architecture: "x64" + + - name: Setup Apptainer + uses: eWaterCycle/setup-apptainer@4bb22c52d4f63406c49e94c804632975787312b3 # v2.0.0 + with: + apptainer-version: 1.3.4 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install git+https://github.com/nf-core/tools.git + + - name: Make a cache directory for the container images + run: | + mkdir -p ./singularity_container_images + + - name: Download the pipeline + env: + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images + run: | + nf-core pipelines download ${{ needs.configure.outputs.REPO_LOWERCASE }} \ + --revision ${{ needs.configure.outputs.REPO_BRANCH }} \ + --outdir ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} \ + --compress "none" \ + --container-system 'singularity' \ + --container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io/library/" \ + --container-cache-utilisation 'amend' \ + --download-configuration 'yes' + + - name: Inspect download + run: tree ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }} + + - name: Inspect container images + run: tree ./singularity_container_images | tee ./container_initial + + - name: Count the downloaded number of container images + id: count_initial + run: | + image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) + echo "Initial container image count: $image_count" + echo "IMAGE_COUNT_INITIAL=$image_count" >> "$GITHUB_OUTPUT" + + - name: Run the downloaded pipeline (stub) + id: stub_run_pipeline + continue-on-error: true + env: + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images + NXF_SINGULARITY_HOME_MOUNT: true + run: nextflow run ./${{needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results + - name: Run the downloaded pipeline (stub run not supported) + id: run_pipeline + if: ${{ steps.stub_run_pipeline.outcome == 'failure' }} + env: + NXF_SINGULARITY_CACHEDIR: ./singularity_container_images + NXF_SINGULARITY_HOME_MOUNT: true + run: nextflow run ./${{ needs.configure.outputs.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ needs.configure.outputs.REPO_BRANCH }}) -profile test,singularity --outdir ./results + + - name: Count the downloaded number of container images + id: count_afterwards + run: | + image_count=$(ls -1 ./singularity_container_images | wc -l | xargs) + echo "Post-pipeline run container image count: $image_count" + echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT" + + - name: Compare container image counts + id: count_comparison + run: | + if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then + initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }} + final_count=${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }} + difference=$((final_count - initial_count)) + echo "$difference additional container images were \n downloaded at runtime . The pipeline has no support for offline runs!" + tree ./singularity_container_images > ./container_afterwards + diff ./container_initial ./container_afterwards + exit 1 + else + echo "The pipeline can be downloaded successfully!" + fi + + - name: Upload Nextflow logfile for debugging purposes + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: nextflow_logfile.txt + path: .nextflow.log* + include-hidden-files: true diff --git a/.github/workflows/fix_linting.yml b/.github/workflows/fix_linting.yml new file mode 100644 index 00000000..63b82243 --- /dev/null +++ b/.github/workflows/fix_linting.yml @@ -0,0 +1,89 @@ +name: Fix linting from a comment +on: + issue_comment: + types: [created] + +jobs: + fix-linting: + # Only run if comment is on a PR with the main repo, and if it contains the magic keywords + if: > + contains(github.event.comment.html_url, '/pull/') && + contains(github.event.comment.body, '@nf-core-bot fix linting') && + github.repository == 'nf-cmgg/preprocessing' + runs-on: ubuntu-latest + steps: + # Use the @nf-core-bot token to check out so we can push later + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + with: + token: ${{ secrets.nf_core_bot_auth_token }} + + # indication that the linting is being fixed + - name: React on comment + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 + with: + comment-id: ${{ github.event.comment.id }} + reactions: eyes + + # Action runs on the issue comment, so we don't get the PR by default + # Use the gh cli to check out the PR + - name: Checkout Pull Request + run: gh pr checkout ${{ github.event.issue.number }} + env: + GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} + + # Install and run pre-commit + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit + id: pre-commit + run: pre-commit run --all-files + continue-on-error: true + + # indication that the linting has finished + - name: react if linting finished succesfully + if: steps.pre-commit.outcome == 'success' + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 + with: + comment-id: ${{ github.event.comment.id }} + reactions: "+1" + + - name: Commit & push changes + id: commit-and-push + if: steps.pre-commit.outcome == 'failure' + run: | + git config user.email "core@nf-co.re" + git config user.name "nf-core-bot" + git config push.default upstream + git add . + git status + git commit -m "[automated] Fix code linting" + git push + + - name: react if linting errors were fixed + id: react-if-fixed + if: steps.commit-and-push.outcome == 'success' + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 + with: + comment-id: ${{ github.event.comment.id }} + reactions: hooray + + - name: react if linting errors were not fixed + if: steps.commit-and-push.outcome == 'failure' + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 + with: + comment-id: ${{ github.event.comment.id }} + reactions: confused + + - name: react if linting errors were not fixed + if: steps.commit-and-push.outcome == 'failure' + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 + with: + issue-number: ${{ github.event.issue.number }} + body: | + @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually. + See [CI log](https://github.com/nf-cmgg/preprocessing/actions/runs/${{ github.run_id }}) for more details. diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 00000000..30e66026 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,80 @@ +name: nf-core linting +# This workflow is triggered on pushes and PRs to the repository. +# It runs the `nf-core pipelines lint` and markdown lint tests to ensure +# that the code meets the nf-core guidelines. +on: + pull_request: + release: + types: [published] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + + - name: Set up Python 3.14 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit + run: pre-commit run --all-files + + nf-core: + runs-on: ubuntu-latest + steps: + - name: Check out pipeline code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + + - name: Install Nextflow + uses: nf-core/setup-nextflow@v2 + + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + architecture: "x64" + + - name: read .nf-core.yml + uses: pietrobolcato/action-read-yaml@9f13718d61111b69f30ab4ac683e67a56d254e1d # 1.1.0 + id: read_yml + with: + config: ${{ github.workspace }}/.nf-core.yml + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} + + - name: Run nf-core pipelines lint + if: ${{ github.base_ref != 'master' }} + env: + GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} + run: nf-core -l lint_log.txt pipelines lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md + + - name: Run nf-core pipelines lint --release + if: ${{ github.base_ref == 'master' }} + env: + GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} + run: nf-core -l lint_log.txt pipelines lint --release --dir ${GITHUB_WORKSPACE} --markdown lint_results.md + + - name: Save PR number + if: ${{ always() }} + run: echo ${{ github.event.pull_request.number }} > PR_number.txt + + - name: Upload linting log file artifact + if: ${{ always() }} + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: linting-logs + path: | + lint_log.txt + lint_results.md + PR_number.txt diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml new file mode 100644 index 00000000..e6e9bc26 --- /dev/null +++ b/.github/workflows/linting_comment.yml @@ -0,0 +1,28 @@ +name: nf-core linting comment +# This workflow is triggered after the linting action is complete +# It posts an automated comment to the PR, even if the PR is coming from a fork + +on: + workflow_run: + workflows: ["nf-core linting"] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Download lint results + uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11 + with: + workflow: linting.yml + workflow_conclusion: completed + + - name: Get PR number + id: pr_number + run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT + + - name: Post PR comment + uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + number: ${{ steps.pr_number.outputs.pr_number }} + path: linting-logs/lint_results.md diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml new file mode 100644 index 00000000..c7448f3e --- /dev/null +++ b/.github/workflows/nf-test.yml @@ -0,0 +1,141 @@ +name: Run nf-test +on: + pull_request: + paths-ignore: + - "docs/**" + - "**/meta.yml" + - "**/*.md" + - "**/*.png" + - "**/*.svg" + release: + types: [published] + workflow_dispatch: + +# Cancel if a newer run is started +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NFT_VER: "0.9.3" + NFT_WORKDIR: "~" + NXF_ANSI_LOG: false + NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity + NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity + +jobs: + nf-test-changes: + name: nf-test-changes + runs-on: # use GitHub runners + - "ubuntu-latest" + outputs: + shard: ${{ steps.set-shards.outputs.shard }} + total_shards: ${{ steps.set-shards.outputs.total_shards }} + steps: + - name: Clean Workspace # Purge the workspace in case it's running on a self-hosted runner + run: | + ls -la ./ + rm -rf ./* || true + rm -rf ./.??* || true + ls -la ./ + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + with: + fetch-depth: 0 + + - name: get number of shards + id: set-shards + uses: ./.github/actions/get-shards + env: + NFT_VER: ${{ env.NFT_VER }} + with: + max_shards: 7 + + - name: debug + run: | + echo ${{ steps.set-shards.outputs.shard }} + echo ${{ steps.set-shards.outputs.total_shards }} + + nf-test: + name: "${{ matrix.profile }} | ${{ matrix.NXF_VER }} | ${{ matrix.shard }}/${{ needs.nf-test-changes.outputs.total_shards }}" + needs: [nf-test-changes] + if: ${{ needs.nf-test-changes.outputs.total_shards != '0' }} + runs-on: # use GitHub runners + - "ubuntu-latest" + strategy: + fail-fast: false + matrix: + shard: ${{ fromJson(needs.nf-test-changes.outputs.shard) }} + profile: [conda, docker, singularity] + isMain: + - ${{ github.base_ref == 'master' || github.base_ref == 'main' }} + # Exclude conda and singularity on dev + exclude: + - isMain: false + profile: "conda" + - isMain: false + profile: "singularity" + NXF_VER: + - "25.04.0" + - "latest-everything" + env: + NXF_ANSI_LOG: false + TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.total_shards }} + + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + with: + fetch-depth: 0 + + - name: Run nf-test + id: run_nf_test + uses: ./.github/actions/nf-test + continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }} + env: + NFT_WORKDIR: ${{ env.NFT_WORKDIR }} + NXF_VERSION: ${{ matrix.NXF_VER }} + with: + profile: ${{ matrix.profile }} + shard: ${{ matrix.shard }} + total_shards: ${{ env.TOTAL_SHARDS }} + + - name: Report test status + if: ${{ always() }} + run: | + if [[ "${{ steps.run_nf_test.outcome }}" == "failure" ]]; then + echo "::error::Test with ${{ matrix.NXF_VER }} failed" + # Add to workflow summary + echo "## ❌ Test failed: ${{ matrix.profile }} | ${{ matrix.NXF_VER }} | Shard ${{ matrix.shard }}/${{ env.TOTAL_SHARDS }}" >> $GITHUB_STEP_SUMMARY + if [[ "${{ matrix.NXF_VER }}" == "latest-everything" ]]; then + echo "::warning::Test with latest-everything failed but will not cause workflow failure. Please check if the error is expected or if it needs fixing." + fi + if [[ "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then + exit 1 + fi + fi + + confirm-pass: + needs: [nf-test] + if: always() + runs-on: # use GitHub runners + - "ubuntu-latest" + steps: + - name: One or more tests failed (excluding latest-everything) + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + + - name: One or more tests cancelled + if: ${{ contains(needs.*.result, 'cancelled') }} + run: exit 1 + + - name: All tests ok + if: ${{ contains(needs.*.result, 'success') }} + run: exit 0 + + - name: debug-print + if: always() + run: | + echo "::group::DEBUG: `needs` Contents" + echo "DEBUG: toJSON(needs) = ${{ toJSON(needs) }}" + echo "DEBUG: toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" + echo "::endgroup::" diff --git a/.github/workflows/template-version-comment.yml b/.github/workflows/template-version-comment.yml new file mode 100644 index 00000000..c5988af9 --- /dev/null +++ b/.github/workflows/template-version-comment.yml @@ -0,0 +1,46 @@ +name: nf-core template version comment +# This workflow is triggered on PRs to check if the pipeline template version matches the latest nf-core version. +# It posts a comment to the PR, even if it comes from a fork. + +on: pull_request_target + +jobs: + template_version: + runs-on: ubuntu-latest + steps: + - name: Check out pipeline code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Read template version from .nf-core.yml + uses: nichmor/minimal-read-yaml@1f7205277e25e156e1f63815781db80a6d490b8f # v0.0.2 + id: read_yml + with: + config: ${{ github.workspace }}/.nf-core.yml + + - name: Install nf-core + run: | + python -m pip install --upgrade pip + pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} + + - name: Check nf-core outdated + id: nf_core_outdated + run: echo "OUTPUT=$(pip list --outdated | grep nf-core)" >> ${GITHUB_ENV} + + - name: Post nf-core template version comment + uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 + if: | + contains(env.OUTPUT, 'nf-core') + with: + repo-token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} + allow-repeats: false + message: | + > [!WARNING] + > Newer version of the nf-core template is available. + > + > Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}. + > Please update your pipeline to the latest version. + > + > For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync). + # diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a42ce016 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.nextflow* +work/ +data/ +results/ +.DS_Store +testing/ +testing* +*.pyc +null/ diff --git a/.nf-core.yml b/.nf-core.yml new file mode 100644 index 00000000..d565b189 --- /dev/null +++ b/.nf-core.yml @@ -0,0 +1,40 @@ +lint: + files_exist: + - CODE_OF_CONDUCT.md + - CITATIONS.md + - assets/nf-core-preprocessing_logo_light.png + - docs/images/nf-core-preprocessing_logo_light.png + - docs/images/nf-core-preprocessing_logo_dark.png + - .github/ISSUE_TEMPLATE/config.yml + - .github/workflows/awstest.yml + - .github/workflows/awsfulltest.yml + files_unchanged: + - CODE_OF_CONDUCT.md + - assets/nf-core-preprocessing_logo_light.png + - docs/images/nf-core-preprocessing_logo_light.png + - docs/images/nf-core-preprocessing_logo_dark.png + - .github/ISSUE_TEMPLATE/bug_report.yml + - docs/README.md + - LICENSE + merge_markers: + - bin/cmgg_genelists + multiqc_config: + - report_comment + nextflow_config: + - manifest.name + - manifest.homePage + template_strings: + - bin/cmgg_genelists +nf_core_version: 3.4.1 +repository_type: pipeline +template: + author: Matthias De Smet, Nicolas Vannieuwkerke + description: Demultiplexing, adapter trimming, alignment, and coverage calculation + for NGS data. + force: false + is_nfcore: false + name: preprocessing + org: nf-cmgg + outdir: . + skip_features: [] + version: 2.1.0dev diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..d06777a8 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,27 @@ +repos: + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v3.1.0" + hooks: + - id: prettier + additional_dependencies: + - prettier@3.6.2 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + exclude: | + (?x)^( + .*ro-crate-metadata.json$| + modules/nf-core/.*| + subworkflows/nf-core/.*| + .*\.snap$ + )$ + - id: end-of-file-fixer + exclude: | + (?x)^( + .*ro-crate-metadata.json$| + modules/nf-core/.*| + subworkflows/nf-core/.*| + .*\.snap$ + )$ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..2255e3e3 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,14 @@ +email_template.html +adaptivecard.json +slackreport.json +.nextflow* +work/ +data/ +results/ +.DS_Store +testing/ +testing* +*.pyc +bin/ +.nf-test/ +ro-crate-metadata.json diff --git a/.prettierrc.yml b/.prettierrc.yml new file mode 100644 index 00000000..07dbd8bb --- /dev/null +++ b/.prettierrc.yml @@ -0,0 +1,6 @@ +printWidth: 120 +tabWidth: 4 +overrides: + - files: "*.{md,yml,yaml,html,css,scss,js,cff}" + options: + tabWidth: 2 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..a33b527c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "markdown.styles": ["public/vscode_markdown.css"] +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..d19f9d42 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# nf-cmgg/preprocessing: Changelog + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## v2.1.0dev - [date] + +Initial release of nf-cmgg/preprocessing, created with the [nf-core](https://nf-co.re/) template. + +### `Added` + +### `Fixed` + +### `Dependencies` + +### `Deprecated` diff --git a/CITATIONS.md b/CITATIONS.md new file mode 100644 index 00000000..2a5a3059 --- /dev/null +++ b/CITATIONS.md @@ -0,0 +1,41 @@ +# nf-cmgg/preprocessing: Citations + +## [nf-core](https://pubmed.ncbi.nlm.nih.gov/32055031/) + +> Ewels PA, Peltzer A, Fillinger S, Patel H, Alneberg J, Wilm A, Garcia MU, Di Tommaso P, Nahnsen S. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Mar;38(3):276-278. doi: 10.1038/s41587-020-0439-x. PubMed PMID: 32055031. + +## [Nextflow](https://pubmed.ncbi.nlm.nih.gov/28398311/) + +> Di Tommaso P, Chatzou M, Floden EW, Barja PP, Palumbo E, Notredame C. Nextflow enables reproducible computational workflows. Nat Biotechnol. 2017 Apr 11;35(4):316-319. doi: 10.1038/nbt.3820. PubMed PMID: 28398311. + +## Pipeline tools + +- [FastQC](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/) + +> Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. + +- [MultiQC](https://pubmed.ncbi.nlm.nih.gov/27312411/) + +> Ewels P, Magnusson M, Lundin S, Käller M. MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics. 2016 Oct 1;32(19):3047-8. doi: 10.1093/bioinformatics/btw354. Epub 2016 Jun 16. PubMed PMID: 27312411; PubMed Central PMCID: PMC5039924. + +## Software packaging/containerisation tools + +- [Anaconda](https://anaconda.com) + + > Anaconda Software Distribution. Computer software. Vers. 2-2.4.0. Anaconda, Nov. 2016. Web. + +- [Bioconda](https://pubmed.ncbi.nlm.nih.gov/29967506/) + + > Grüning B, Dale R, Sjödin A, Chapman BA, Rowe J, Tomkins-Tinch CH, Valieris R, Köster J; Bioconda Team. Bioconda: sustainable and comprehensive software distribution for the life sciences. Nat Methods. 2018 Jul;15(7):475-476. doi: 10.1038/s41592-018-0046-7. PubMed PMID: 29967506. + +- [BioContainers](https://pubmed.ncbi.nlm.nih.gov/28379341/) + + > da Veiga Leprevost F, Grüning B, Aflitos SA, Röst HL, Uszkoreit J, Barsnes H, Vaudel M, Moreno P, Gatto L, Weber J, Bai M, Jimenez RC, Sachsenberg T, Pfeuffer J, Alvarez RV, Griss J, Nesvizhskii AI, Perez-Riverol Y. BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics. 2017 Aug 15;33(16):2580-2582. doi: 10.1093/bioinformatics/btx192. PubMed PMID: 28379341; PubMed Central PMCID: PMC5870671. + +- [Docker](https://dl.acm.org/doi/10.5555/2600239.2600241) + + > Merkel, D. (2014). Docker: lightweight linux containers for consistent development and deployment. Linux Journal, 2014(239), 2. doi: 10.5555/2600239.2600241. + +- [Singularity](https://pubmed.ncbi.nlm.nih.gov/28494014/) + + > Kurtzer GM, Sochat V, Bauer MW. Singularity: Scientific containers for mobility of compute. PLoS One. 2017 May 11;12(5):e0177459. doi: 10.1371/journal.pone.0177459. eCollection 2017. PubMed PMID: 28494014; PubMed Central PMCID: PMC5426675. diff --git a/LICENSE b/LICENSE index 28e1f563..d52aa1a9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Center For Medical Genetics Ghent +Copyright (c) The nf-cmgg/preprocessing team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md new file mode 100644 index 00000000..a96a6e68 --- /dev/null +++ b/README.md @@ -0,0 +1,91 @@ +# nf-cmgg/preprocessing + +[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing) +[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml) +[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX) +[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) + +[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/) +[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1) +[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) +[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) +[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) +[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing) + +## Introduction + +**nf-cmgg/preprocessing** is a bioinformatics pipeline that ... + + + + +1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/)) + +## Usage + +> [!NOTE] +> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data. + + + +Now, you can run the pipeline using: + + + +```bash +nextflow run nf-cmgg/preprocessing \ + -profile \ + --input samplesheet.csv \ + --outdir +``` + +> [!WARNING] +> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files). + +## Credits + +nf-cmgg/preprocessing was originally written by Matthias De Smet, Nicolas Vannieuwkerke. + +We thank the following people for their extensive assistance in the development of this pipeline: + + + +## Contributions and Support + +If you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md). + +## Citations + + + + + + +An extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file. + +This pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/main/LICENSE). + +> **The nf-core framework for community-curated bioinformatics pipelines.** +> +> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen. +> +> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x). diff --git a/assets/adaptivecard.json b/assets/adaptivecard.json new file mode 100644 index 00000000..92ed5f06 --- /dev/null +++ b/assets/adaptivecard.json @@ -0,0 +1,67 @@ +{ + "type": "message", + "attachments": [ + { + "contentType": "application/vnd.microsoft.card.adaptive", + "contentUrl": null, + "content": { + "\$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "msteams": { + "width": "Full" + }, + "type": "AdaptiveCard", + "version": "1.2", + "body": [ + { + "type": "TextBlock", + "size": "Large", + "weight": "Bolder", + "color": "<% if (success) { %>Good<% } else { %>Attention<%} %>", + "text": "nf-cmgg/preprocessing v${version} - ${runName}", + "wrap": true + }, + { + "type": "TextBlock", + "spacing": "None", + "text": "Completed at ${dateComplete} (duration: ${duration})", + "isSubtle": true, + "wrap": true + }, + { + "type": "TextBlock", + "text": "<% if (success) { %>Pipeline completed successfully!<% } else { %>Pipeline completed with errors. The full error message was: ${errorReport}.<% } %>", + "wrap": true + }, + { + "type": "TextBlock", + "text": "The command used to launch the workflow was as follows:", + "wrap": true + }, + { + "type": "TextBlock", + "text": "${commandLine}", + "isSubtle": true, + "wrap": true + } + ], + "actions": [ + { + "type": "Action.ShowCard", + "title": "Pipeline Configuration", + "card": { + "type": "AdaptiveCard", + "\$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "body": [ + { + "type": "FactSet", + "facts": [<% out << summary.collect{ k,v -> "{\"title\": \"$k\", \"value\" : \"$v\"}"}.join(",\n") %> + ] + } + ] + } + } + ] + } + } + ] +} diff --git a/assets/email_template.html b/assets/email_template.html new file mode 100644 index 00000000..8ebf727d --- /dev/null +++ b/assets/email_template.html @@ -0,0 +1,53 @@ + + + + + + + + nf-cmgg/preprocessing Pipeline Report + + +
    + + + +

    nf-cmgg/preprocessing ${version}

    +

    Run Name: $runName

    + +<% if (!success){ + out << """ +
    +

    nf-cmgg/preprocessing execution completed unsuccessfully!

    +

    The exit status of the task that caused the workflow execution to fail was: $exitStatus.

    +

    The full error message was:

    +
    ${errorReport}
    +
    + """ +} else { + out << """ +
    + nf-cmgg/preprocessing execution completed successfully! +
    + """ +} +%> + +

    The workflow was completed at $dateComplete (duration: $duration)

    +

    The command used to launch the workflow was as follows:

    +
    $commandLine
    + +

    Pipeline Configuration:

    + + + <% out << summary.collect{ k,v -> "" }.join("\n") %> + +
    $k
    $v
    + +

    nf-cmgg/preprocessing

    +

    https://github.com/nf-cmgg/preprocessing

    + +
    + + + diff --git a/assets/email_template.txt b/assets/email_template.txt new file mode 100644 index 00000000..578f35b6 --- /dev/null +++ b/assets/email_template.txt @@ -0,0 +1,31 @@ +Run Name: $runName + +<% if (success){ + out << "## nf-cmgg/preprocessing execution completed successfully! ##" +} else { + out << """#################################################### +## nf-cmgg/preprocessing execution completed unsuccessfully! ## +#################################################### +The exit status of the task that caused the workflow execution to fail was: $exitStatus. +The full error message was: + +${errorReport} +""" +} %> + + +The workflow was completed at $dateComplete (duration: $duration) + +The command used to launch the workflow was as follows: + + $commandLine + + + +Pipeline Configuration: +----------------------- +<% out << summary.collect{ k,v -> " - $k: $v" }.join("\n") %> + +-- +nf-cmgg/preprocessing +https://github.com/nf-cmgg/preprocessing diff --git a/assets/methods_description_template.yml b/assets/methods_description_template.yml new file mode 100644 index 00000000..8902b62a --- /dev/null +++ b/assets/methods_description_template.yml @@ -0,0 +1,29 @@ +id: "nf-cmgg-preprocessing-methods-description" +description: "Suggested text and references to use when describing pipeline usage within the methods section of a publication." +section_name: "nf-cmgg/preprocessing Methods Description" +section_href: "https://github.com/nf-cmgg/preprocessing" +plot_type: "html" +## TODO nf-core: Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline +## You inject any metadata in the Nextflow '${workflow}' object +data: | +

    Methods

    +

    Data was processed using nf-cmgg/preprocessing v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (Ewels et al., 2020), utilising reproducible software environments from the Bioconda (Grüning et al., 2018) and Biocontainers (da Veiga Leprevost et al., 2017) projects.

    +

    The pipeline was executed with Nextflow v${workflow.nextflow.version} (Di Tommaso et al., 2017) with the following command:

    +
    ${workflow.commandLine}
    +

    ${tool_citations}

    +

    References

    +
      +
    • Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature Biotechnology, 35(4), 316-319. doi: 10.1038/nbt.3820
    • +
    • Ewels, P. A., Peltzer, A., Fillinger, S., Patel, H., Alneberg, J., Wilm, A., Garcia, M. U., Di Tommaso, P., & Nahnsen, S. (2020). The nf-core framework for community-curated bioinformatics pipelines. Nature Biotechnology, 38(3), 276-278. doi: 10.1038/s41587-020-0439-x
    • +
    • Grüning, B., Dale, R., Sjödin, A., Chapman, B. A., Rowe, J., Tomkins-Tinch, C. H., Valieris, R., Köster, J., & Bioconda Team. (2018). Bioconda: sustainable and comprehensive software distribution for the life sciences. Nature Methods, 15(7), 475–476. doi: 10.1038/s41592-018-0046-7
    • +
    • da Veiga Leprevost, F., Grüning, B. A., Alves Aflitos, S., Röst, H. L., Uszkoreit, J., Barsnes, H., Vaudel, M., Moreno, P., Gatto, L., Weber, J., Bai, M., Jimenez, R. C., Sachsenberg, T., Pfeuffer, J., Vera Alvarez, R., Griss, J., Nesvizhskii, A. I., & Perez-Riverol, Y. (2017). BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics (Oxford, England), 33(16), 2580–2582. doi: 10.1093/bioinformatics/btx192
    • + ${tool_bibliography} +
    +
    +
    Notes:
    +
      + ${nodoi_text} +
    • The command above does not include parameters contained in any configs or profiles that may have been used. Ensure the config file is also uploaded with your publication!
    • +
    • You should also cite all software used within this run. Check the "Software Versions" of this report to get version information.
    • +
    +
    diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml new file mode 100644 index 00000000..fe5c11d1 --- /dev/null +++ b/assets/multiqc_config.yml @@ -0,0 +1,14 @@ +report_comment: > + This report has been generated by the nf-cmgg/preprocessing + analysis pipeline. +report_section_order: + "nf-cmgg-preprocessing-methods-description": + order: -1000 + software_versions: + order: -1001 + "nf-cmgg-preprocessing-summary": + order: -1002 + +export_plots: true + +disable_version_detection: true diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv new file mode 100644 index 00000000..5f653ab7 --- /dev/null +++ b/assets/samplesheet.csv @@ -0,0 +1,3 @@ +sample,fastq_1,fastq_2 +SAMPLE_PAIRED_END,/path/to/fastq/files/AEG588A1_S1_L002_R1_001.fastq.gz,/path/to/fastq/files/AEG588A1_S1_L002_R2_001.fastq.gz +SAMPLE_SINGLE_END,/path/to/fastq/files/AEG588A4_S4_L003_R1_001.fastq.gz, diff --git a/assets/schema_input.json b/assets/schema_input.json new file mode 100644 index 00000000..2605e47c --- /dev/null +++ b/assets/schema_input.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/nf-cmgg/preprocessing/main/assets/schema_input.json", + "title": "nf-cmgg/preprocessing pipeline - params.input schema", + "description": "Schema for the file provided with params.input", + "type": "array", + "items": { + "type": "object", + "properties": { + "sample": { + "type": "string", + "pattern": "^\\S+$", + "errorMessage": "Sample name must be provided and cannot contain spaces", + "meta": ["id"] + }, + "fastq_1": { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^([\\S\\s]*\\/)?[^\\s\\/]+\\.f(ast)?q\\.gz$", + "errorMessage": "FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'" + }, + "fastq_2": { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^([\\S\\s]*\\/)?[^\\s\\/]+\\.f(ast)?q\\.gz$", + "errorMessage": "FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz'" + } + }, + "required": ["sample", "fastq_1"] + } +} diff --git a/assets/sendmail_template.txt b/assets/sendmail_template.txt new file mode 100644 index 00000000..d904231a --- /dev/null +++ b/assets/sendmail_template.txt @@ -0,0 +1,53 @@ +To: $email +Subject: $subject +Mime-Version: 1.0 +Content-Type: multipart/related;boundary="nfcoremimeboundary" + +--nfcoremimeboundary +Content-Type: text/html; charset=utf-8 + +$email_html + +--nfcoremimeboundary +Content-Type: image/png;name="nf-cmgg-preprocessing_logo.png" +Content-Transfer-Encoding: base64 +Content-ID: +Content-Disposition: inline; filename="nf-cmgg-preprocessing_logo_light.png" + +<% out << new File("$projectDir/assets/nf-cmgg-preprocessing_logo_light.png"). + bytes. + encodeBase64(). + toString(). + tokenize( '\n' )*. + toList()*. + collate( 76 )*. + collect { it.join() }. + flatten(). + join( '\n' ) %> + +<% +if (mqcFile){ +def mqcFileObj = new File("$mqcFile") +if (mqcFileObj.length() < mqcMaxSize){ +out << """ +--nfcoremimeboundary +Content-Type: text/html; name=\"multiqc_report\" +Content-Transfer-Encoding: base64 +Content-ID: +Content-Disposition: attachment; filename=\"${mqcFileObj.getName()}\" + +${mqcFileObj. + bytes. + encodeBase64(). + toString(). + tokenize( '\n' )*. + toList()*. + collate( 76 )*. + collect { it.join() }. + flatten(). + join( '\n' )} +""" +}} +%> + +--nfcoremimeboundary-- diff --git a/assets/slackreport.json b/assets/slackreport.json new file mode 100644 index 00000000..84fc115a --- /dev/null +++ b/assets/slackreport.json @@ -0,0 +1,34 @@ +{ + "attachments": [ + { + "fallback": "Plain-text summary of the attachment.", + "color": "<% if (success) { %>good<% } else { %>danger<%} %>", + "author_name": "nf-cmgg/preprocessing ${version} - ${runName}", + "author_icon": "https://www.nextflow.io/docs/latest/_static/favicon.ico", + "text": "<% if (success) { %>Pipeline completed successfully!<% } else { %>Pipeline completed with errors<% } %>", + "fields": [ + { + "title": "Command used to launch the workflow", + "value": "```${commandLine}```", + "short": false + } + <% + if (!success) { %> + , + { + "title": "Full error message", + "value": "```${errorReport}```", + "short": false + }, + { + "title": "Pipeline configuration", + "value": "<% out << summary.collect{ k,v -> k == "hook_url" ? "_${k}_: (_hidden_)" : ( ( v.class.toString().contains('Path') || ( v.class.toString().contains('String') && v.contains('/') ) ) ? "_${k}_: `${v}`" : (v.class.toString().contains('DateTime') ? ("_${k}_: " + v.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM))) : "_${k}_: ${v}") ) }.join(",\n") %>", + "short": false + } + <% } + %> + ], + "footer": "Completed at <% out << dateComplete.format(java.time.format.DateTimeFormatter.ofLocalizedDateTime(java.time.format.FormatStyle.MEDIUM)) %> (duration: ${duration})" + } + ] +} diff --git a/conf/base.config b/conf/base.config new file mode 100644 index 00000000..4f3a0d41 --- /dev/null +++ b/conf/base.config @@ -0,0 +1,66 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + nf-cmgg/preprocessing Nextflow base config file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + A 'blank slate' config file, appropriate for general use on most high performance + compute environments. Assumes that all software is installed and available on + the PATH. Runs in `local` mode - all jobs will be run on the logged in environment. +---------------------------------------------------------------------------------------- +*/ + +process { + + // TODO nf-core: Check the defaults for all processes + cpus = { 1 * task.attempt } + memory = { 6.GB * task.attempt } + time = { 4.h * task.attempt } + + errorStrategy = { task.exitStatus in ((130..145) + 104 + 175) ? 'retry' : 'finish' } + maxRetries = 1 + maxErrors = '-1' + + // Process-specific resource requirements + // NOTE - Please try and reuse the labels below as much as possible. + // These labels are used and recognised by default in DSL2 files hosted on nf-core/modules. + // If possible, it would be nice to keep the same label naming convention when + // adding in your local modules too. + // TODO nf-core: Customise requirements for specific processes. + // See https://www.nextflow.io/docs/latest/config.html#config-process-selectors + withLabel:process_single { + cpus = { 1 } + memory = { 6.GB * task.attempt } + time = { 4.h * task.attempt } + } + withLabel:process_low { + cpus = { 2 * task.attempt } + memory = { 12.GB * task.attempt } + time = { 4.h * task.attempt } + } + withLabel:process_medium { + cpus = { 6 * task.attempt } + memory = { 36.GB * task.attempt } + time = { 8.h * task.attempt } + } + withLabel:process_high { + cpus = { 12 * task.attempt } + memory = { 72.GB * task.attempt } + time = { 16.h * task.attempt } + } + withLabel:process_long { + time = { 20.h * task.attempt } + } + withLabel:process_high_memory { + memory = { 200.GB * task.attempt } + } + withLabel:error_ignore { + errorStrategy = 'ignore' + } + withLabel:error_retry { + errorStrategy = 'retry' + maxRetries = 2 + } + withLabel: process_gpu { + ext.use_gpu = { workflow.profile.contains('gpu') } + accelerator = { workflow.profile.contains('gpu') ? 1 : null } + } +} diff --git a/conf/igenomes.config b/conf/igenomes.config new file mode 100644 index 00000000..3f114377 --- /dev/null +++ b/conf/igenomes.config @@ -0,0 +1,440 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for iGenomes paths +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines reference genomes using iGenome paths. + Can be used by any config that customises the base path using: + $params.igenomes_base / --igenomes_base +---------------------------------------------------------------------------------------- +*/ + +params { + // illumina iGenomes reference file paths + genomes { + 'GRCh37' { + fasta = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Homo_sapiens/Ensembl/GRCh37/Annotation/README.txt" + mito_name = "MT" + macs_gsize = "2.7e9" + blacklist = "${projectDir}/assets/blacklists/GRCh37-blacklist.bed" + } + 'GRCh38' { + fasta = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Homo_sapiens/NCBI/GRCh38/Annotation/Genes/genes.bed" + mito_name = "chrM" + macs_gsize = "2.7e9" + blacklist = "${projectDir}/assets/blacklists/hg38-blacklist.bed" + } + 'CHM13' { + fasta = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/BWAIndex/" + bwamem2 = "${params.igenomes_base}/Homo_sapiens/UCSC/CHM13/Sequence/BWAmem2Index/" + gtf = "${params.igenomes_base}/Homo_sapiens/NCBI/CHM13/Annotation/Genes/genes.gtf" + gff = "ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/914/755/GCF_009914755.1_T2T-CHM13v2.0/GCF_009914755.1_T2T-CHM13v2.0_genomic.gff.gz" + mito_name = "chrM" + } + 'GRCm38' { + fasta = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Mus_musculus/Ensembl/GRCm38/Annotation/README.txt" + mito_name = "MT" + macs_gsize = "1.87e9" + blacklist = "${projectDir}/assets/blacklists/GRCm38-blacklist.bed" + } + 'TAIR10' { + fasta = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Arabidopsis_thaliana/Ensembl/TAIR10/Annotation/README.txt" + mito_name = "Mt" + } + 'EB2' { + fasta = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Bacillus_subtilis_168/Ensembl/EB2/Annotation/README.txt" + } + 'UMD3.1' { + fasta = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Bos_taurus/Ensembl/UMD3.1/Annotation/README.txt" + mito_name = "MT" + } + 'WBcel235' { + fasta = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Caenorhabditis_elegans/Ensembl/WBcel235/Annotation/Genes/genes.bed" + mito_name = "MtDNA" + macs_gsize = "9e7" + } + 'CanFam3.1' { + fasta = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Canis_familiaris/Ensembl/CanFam3.1/Annotation/README.txt" + mito_name = "MT" + } + 'GRCz10' { + fasta = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Danio_rerio/Ensembl/GRCz10/Annotation/Genes/genes.bed" + mito_name = "MT" + } + 'BDGP6' { + fasta = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Drosophila_melanogaster/Ensembl/BDGP6/Annotation/Genes/genes.bed" + mito_name = "M" + macs_gsize = "1.2e8" + } + 'EquCab2' { + fasta = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Equus_caballus/Ensembl/EquCab2/Annotation/README.txt" + mito_name = "MT" + } + 'EB1' { + fasta = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Escherichia_coli_K_12_DH10B/Ensembl/EB1/Annotation/README.txt" + } + 'Galgal4' { + fasta = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Gallus_gallus/Ensembl/Galgal4/Annotation/Genes/genes.bed" + mito_name = "MT" + } + 'Gm01' { + fasta = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Glycine_max/Ensembl/Gm01/Annotation/README.txt" + } + 'Mmul_1' { + fasta = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Macaca_mulatta/Ensembl/Mmul_1/Annotation/README.txt" + mito_name = "MT" + } + 'IRGSP-1.0' { + fasta = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Oryza_sativa_japonica/Ensembl/IRGSP-1.0/Annotation/Genes/genes.bed" + mito_name = "Mt" + } + 'CHIMP2.1.4' { + fasta = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Pan_troglodytes/Ensembl/CHIMP2.1.4/Annotation/README.txt" + mito_name = "MT" + } + 'Rnor_5.0' { + fasta = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_5.0/Annotation/Genes/genes.bed" + mito_name = "MT" + } + 'Rnor_6.0' { + fasta = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Rattus_norvegicus/Ensembl/Rnor_6.0/Annotation/Genes/genes.bed" + mito_name = "MT" + } + 'R64-1-1' { + fasta = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Saccharomyces_cerevisiae/Ensembl/R64-1-1/Annotation/Genes/genes.bed" + mito_name = "MT" + macs_gsize = "1.2e7" + } + 'EF2' { + fasta = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Schizosaccharomyces_pombe/Ensembl/EF2/Annotation/README.txt" + mito_name = "MT" + macs_gsize = "1.21e7" + } + 'Sbi1' { + fasta = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Sorghum_bicolor/Ensembl/Sbi1/Annotation/README.txt" + } + 'Sscrofa10.2' { + fasta = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Sus_scrofa/Ensembl/Sscrofa10.2/Annotation/README.txt" + mito_name = "MT" + } + 'AGPv3' { + fasta = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Zea_mays/Ensembl/AGPv3/Annotation/Genes/genes.bed" + mito_name = "Mt" + } + 'hg38' { + fasta = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg38/Annotation/Genes/genes.bed" + mito_name = "chrM" + macs_gsize = "2.7e9" + blacklist = "${projectDir}/assets/blacklists/hg38-blacklist.bed" + } + 'hg19' { + fasta = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Homo_sapiens/UCSC/hg19/Annotation/README.txt" + mito_name = "chrM" + macs_gsize = "2.7e9" + blacklist = "${projectDir}/assets/blacklists/hg19-blacklist.bed" + } + 'mm10' { + fasta = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Mus_musculus/UCSC/mm10/Annotation/README.txt" + mito_name = "chrM" + macs_gsize = "1.87e9" + blacklist = "${projectDir}/assets/blacklists/mm10-blacklist.bed" + } + 'bosTau8' { + fasta = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Bos_taurus/UCSC/bosTau8/Annotation/Genes/genes.bed" + mito_name = "chrM" + } + 'ce10' { + fasta = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Caenorhabditis_elegans/UCSC/ce10/Annotation/README.txt" + mito_name = "chrM" + macs_gsize = "9e7" + } + 'canFam3' { + fasta = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Canis_familiaris/UCSC/canFam3/Annotation/README.txt" + mito_name = "chrM" + } + 'danRer10' { + fasta = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Danio_rerio/UCSC/danRer10/Annotation/Genes/genes.bed" + mito_name = "chrM" + macs_gsize = "1.37e9" + } + 'dm6' { + fasta = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Drosophila_melanogaster/UCSC/dm6/Annotation/Genes/genes.bed" + mito_name = "chrM" + macs_gsize = "1.2e8" + } + 'equCab2' { + fasta = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Equus_caballus/UCSC/equCab2/Annotation/README.txt" + mito_name = "chrM" + } + 'galGal4' { + fasta = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Gallus_gallus/UCSC/galGal4/Annotation/README.txt" + mito_name = "chrM" + } + 'panTro4' { + fasta = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Pan_troglodytes/UCSC/panTro4/Annotation/README.txt" + mito_name = "chrM" + } + 'rn6' { + fasta = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Rattus_norvegicus/UCSC/rn6/Annotation/Genes/genes.bed" + mito_name = "chrM" + } + 'sacCer3' { + fasta = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Sequence/BismarkIndex/" + readme = "${params.igenomes_base}/Saccharomyces_cerevisiae/UCSC/sacCer3/Annotation/README.txt" + mito_name = "chrM" + macs_gsize = "1.2e7" + } + 'susScr3' { + fasta = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/WholeGenomeFasta/genome.fa" + bwa = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/BWAIndex/version0.6.0/" + bowtie2 = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/Bowtie2Index/" + star = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/STARIndex/" + bismark = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Sequence/BismarkIndex/" + gtf = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Annotation/Genes/genes.gtf" + bed12 = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Annotation/Genes/genes.bed" + readme = "${params.igenomes_base}/Sus_scrofa/UCSC/susScr3/Annotation/README.txt" + mito_name = "chrM" + } + } +} diff --git a/conf/igenomes_ignored.config b/conf/igenomes_ignored.config new file mode 100644 index 00000000..b4034d82 --- /dev/null +++ b/conf/igenomes_ignored.config @@ -0,0 +1,9 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for iGenomes paths +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Empty genomes dictionary to use when igenomes is ignored. +---------------------------------------------------------------------------------------- +*/ + +params.genomes = [:] diff --git a/conf/modules.config b/conf/modules.config new file mode 100644 index 00000000..d203d2b6 --- /dev/null +++ b/conf/modules.config @@ -0,0 +1,34 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Config file for defining DSL2 per module options and publishing paths +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Available keys to override module options: + ext.args = Additional arguments appended to command in module. + ext.args2 = Second set of arguments appended to command in module (multi-tool modules). + ext.args3 = Third set of arguments appended to command in module (multi-tool modules). + ext.prefix = File name prefix for output files. +---------------------------------------------------------------------------------------- +*/ + +process { + + publishDir = [ + path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + + withName: FASTQC { + ext.args = '--quiet' + } + + withName: 'MULTIQC' { + ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + publishDir = [ + path: { "${params.outdir}/multiqc" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + +} diff --git a/conf/test.config b/conf/test.config new file mode 100644 index 00000000..99e207ff --- /dev/null +++ b/conf/test.config @@ -0,0 +1,30 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-cmgg/preprocessing -profile test, --outdir + +---------------------------------------------------------------------------------------- +*/ + +process { + resourceLimits = [ + cpus: 4, + memory: '15.GB', + time: '1.h' + ] +} + +params { + config_profile_name = 'Test profile' + config_profile_description = 'Minimal test dataset to check pipeline function' + + // Input data + // TODO nf-core: Specify the paths to your test data on nf-core/test-datasets + // TODO nf-core: Give any required params for the test so that command line flags are not needed + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv'// Genome references + genome = 'R64-1-1' +} diff --git a/conf/test_full.config b/conf/test_full.config new file mode 100644 index 00000000..6225119a --- /dev/null +++ b/conf/test_full.config @@ -0,0 +1,24 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running full-size tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a full size pipeline test. + + Use as follows: + nextflow run nf-cmgg/preprocessing -profile test_full, --outdir + +---------------------------------------------------------------------------------------- +*/ + +params { + config_profile_name = 'Full test profile' + config_profile_description = 'Full test dataset to check pipeline function' + + // Input data for full size test + // TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA) + // TODO nf-core: Give any required params for the test so that command line flags are not needed + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' + + // Genome references + genome = 'R64-1-1' +} diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..18efa6bf --- /dev/null +++ b/docs/README.md @@ -0,0 +1,8 @@ +# nf-cmgg/preprocessing: Documentation + +The nf-cmgg/preprocessing documentation is split into the following pages: + +- [Usage](usage.md) + - An overview of how the pipeline works, how to run it and a description of all of the different command-line flags. +- [Output](output.md) + - An overview of the different results produced by the pipeline and how to interpret them. diff --git a/docs/output.md b/docs/output.md new file mode 100644 index 00000000..43f03a89 --- /dev/null +++ b/docs/output.md @@ -0,0 +1,61 @@ +# nf-cmgg/preprocessing: Output + +## Introduction + +This document describes the output produced by the pipeline. Most of the plots are taken from the MultiQC report, which summarises results at the end of the pipeline. + +The directories listed below will be created in the results directory after the pipeline has finished. All paths are relative to the top-level results directory. + + + +## Pipeline overview + +The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes data using the following steps: + +- [FastQC](#fastqc) - Raw read QC +- [MultiQC](#multiqc) - Aggregate report describing results and QC from the whole pipeline +- [Pipeline information](#pipeline-information) - Report metrics generated during the workflow execution + +### FastQC + +
    +Output files + +- `fastqc/` + - `*_fastqc.html`: FastQC report containing quality metrics. + - `*_fastqc.zip`: Zip archive containing the FastQC report, tab-delimited data file and plot images. + +
    + +[FastQC](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/) gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. For further reading and documentation see the [FastQC help pages](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/). + +### MultiQC + +
    +Output files + +- `multiqc/` + - `multiqc_report.html`: a standalone HTML file that can be viewed in your web browser. + - `multiqc_data/`: directory containing parsed statistics from the different tools used in the pipeline. + - `multiqc_plots/`: directory containing static images from the report in various formats. + +
    + +[MultiQC](http://multiqc.info) is a visualization tool that generates a single HTML report summarising all samples in your project. Most of the pipeline QC results are visualised in the report and further statistics are available in the report data directory. + +Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQC. The pipeline has special steps which also allow the software versions to be reported in the MultiQC output for future traceability. For more information about how to use MultiQC reports, see . + +### Pipeline information + +
    +Output files + +- `pipeline_info/` + - Reports generated by Nextflow: `execution_report.html`, `execution_timeline.html`, `execution_trace.txt` and `pipeline_dag.dot`/`pipeline_dag.svg`. + - Reports generated by the pipeline: `pipeline_report.html`, `pipeline_report.txt` and `software_versions.yml`. The `pipeline_report*` files will only be present if the `--email` / `--email_on_fail` parameter's are used when running the pipeline. + - Reformatted samplesheet files used as input to the pipeline: `samplesheet.valid.csv`. + - Parameters used by the pipeline run: `params.json`. + +
    + +[Nextflow](https://www.nextflow.io/docs/latest/tracing.html) provides excellent functionality for generating various reports relevant to the running and execution of the pipeline. This will allow you to troubleshoot errors with the running of the pipeline, and also provide you with other information such as launch commands, run times and resource usage. diff --git a/docs/usage.md b/docs/usage.md new file mode 100644 index 00000000..3f528f39 --- /dev/null +++ b/docs/usage.md @@ -0,0 +1,212 @@ +# nf-cmgg/preprocessing: Usage + +> _Documentation of pipeline parameters is generated automatically from the pipeline schema and can no longer be found in markdown files._ + +## Introduction + + + +## Samplesheet input + +You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row as shown in the examples below. + +```bash +--input '[path to samplesheet file]' +``` + +### Multiple runs of the same sample + +The `sample` identifiers have to be the same when you have re-sequenced the same sample more than once e.g. to increase sequencing depth. The pipeline will concatenate the raw reads before performing any downstream analysis. Below is an example for the same sample sequenced across 3 lanes: + +```csv title="samplesheet.csv" +sample,fastq_1,fastq_2 +CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz +CONTROL_REP1,AEG588A1_S1_L003_R1_001.fastq.gz,AEG588A1_S1_L003_R2_001.fastq.gz +CONTROL_REP1,AEG588A1_S1_L004_R1_001.fastq.gz,AEG588A1_S1_L004_R2_001.fastq.gz +``` + +### Full samplesheet + +The pipeline will auto-detect whether a sample is single- or paired-end using the information provided in the samplesheet. The samplesheet can have as many columns as you desire, however, there is a strict requirement for the first 3 columns to match those defined in the table below. + +A final samplesheet file consisting of both single- and paired-end data may look something like the one below. This is for 6 samples, where `TREATMENT_REP3` has been sequenced twice. + +```csv title="samplesheet.csv" +sample,fastq_1,fastq_2 +CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz +CONTROL_REP2,AEG588A2_S2_L002_R1_001.fastq.gz,AEG588A2_S2_L002_R2_001.fastq.gz +CONTROL_REP3,AEG588A3_S3_L002_R1_001.fastq.gz,AEG588A3_S3_L002_R2_001.fastq.gz +TREATMENT_REP1,AEG588A4_S4_L003_R1_001.fastq.gz, +TREATMENT_REP2,AEG588A5_S5_L003_R1_001.fastq.gz, +TREATMENT_REP3,AEG588A6_S6_L003_R1_001.fastq.gz, +TREATMENT_REP3,AEG588A6_S6_L004_R1_001.fastq.gz, +``` + +| Column | Description | +| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sample` | Custom sample name. This entry will be identical for multiple sequencing libraries/runs from the same sample. Spaces in sample names are automatically converted to underscores (`_`). | +| `fastq_1` | Full path to FastQ file for Illumina short reads 1. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | +| `fastq_2` | Full path to FastQ file for Illumina short reads 2. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | + +An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline. + +## Running the pipeline + +The typical command for running the pipeline is as follows: + +```bash +nextflow run nf-cmgg/preprocessing --input ./samplesheet.csv --outdir ./results --genome GRCh37 -profile docker +``` + +This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles. + +Note that the pipeline will create the following files in your working directory: + +```bash +work # Directory containing the nextflow working files + # Finished results in specified location (defined with --outdir) +.nextflow_log # Log file from Nextflow +# Other nextflow hidden files, eg. history of pipeline runs and old logs. +``` + +If you wish to repeatedly use the same parameters for multiple runs, rather than specifying each flag in the command, you can specify these in a params file. + +Pipeline settings can be provided in a `yaml` or `json` file via `-params-file `. + +> [!WARNING] +> Do not use `-c ` to specify parameters as this will result in errors. Custom config files specified with `-c` must only be used for [tuning process resource specifications](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources), other infrastructural tweaks (such as output directories), or module arguments (args). + +The above pipeline run specified with a params file in yaml format: + +```bash +nextflow run nf-cmgg/preprocessing -profile docker -params-file params.yaml +``` + +with: + +```yaml title="params.yaml" +input: './samplesheet.csv' +outdir: './results/' +genome: 'GRCh37' +<...> +``` + +You can also generate such `YAML`/`JSON` files via [nf-core/launch](https://nf-co.re/launch). + +### Updating the pipeline + +When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline: + +```bash +nextflow pull nf-cmgg/preprocessing +``` + +### Reproducibility + +It is a good idea to specify the pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since. + +First, go to the [nf-cmgg/preprocessing releases page](https://github.com/nf-cmgg/preprocessing/releases) and find the latest pipeline version - numeric only (eg. `1.3.1`). Then specify this when running the pipeline with `-r` (one hyphen) - eg. `-r 1.3.1`. Of course, you can switch to another version by changing the number after the `-r` flag. + +This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future. For example, at the bottom of the MultiQC reports. + +To further assist in reproducibility, you can use share and reuse [parameter files](#running-the-pipeline) to repeat pipeline runs with the same settings without having to write out a command with every single parameter. + +> [!TIP] +> If you wish to share such profile (such as upload as supplementary material for academic publications), make sure to NOT include cluster specific paths to files, nor institutional specific profiles. + +## Core Nextflow arguments + +> [!NOTE] +> These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen) + +### `-profile` + +Use this parameter to choose a configuration profile. Profiles can give configuration presets for different compute environments. + +Several generic profiles are bundled with the pipeline which instruct the pipeline to use software packaged using different methods (Docker, Singularity, Podman, Shifter, Charliecloud, Apptainer, Conda) - see below. + +> [!IMPORTANT] +> We highly recommend the use of Docker or Singularity containers for full pipeline reproducibility, however when this is not possible, Conda is also supported. + +The pipeline also dynamically loads configurations from [https://github.com/nf-core/configs](https://github.com/nf-core/configs) when it runs, making multiple config profiles for various institutional clusters available at run time. For more information and to check if your system is supported, please see the [nf-core/configs documentation](https://github.com/nf-core/configs#documentation). + +Note that multiple profiles can be loaded, for example: `-profile test,docker` - the order of arguments is important! +They are loaded in sequence, so later profiles can overwrite earlier profiles. + +If `-profile` is not specified, the pipeline will run locally and expect all software to be installed and available on the `PATH`. This is _not_ recommended, since it can lead to different results on different machines dependent on the computer environment. + +- `test` + - A profile with a complete configuration for automated testing + - Includes links to test data so needs no other parameters +- `docker` + - A generic configuration profile to be used with [Docker](https://docker.com/) +- `singularity` + - A generic configuration profile to be used with [Singularity](https://sylabs.io/docs/) +- `podman` + - A generic configuration profile to be used with [Podman](https://podman.io/) +- `shifter` + - A generic configuration profile to be used with [Shifter](https://nersc.gitlab.io/development/shifter/how-to-use/) +- `charliecloud` + - A generic configuration profile to be used with [Charliecloud](https://charliecloud.io/) +- `apptainer` + - A generic configuration profile to be used with [Apptainer](https://apptainer.org/) +- `wave` + - A generic configuration profile to enable [Wave](https://seqera.io/wave/) containers. Use together with one of the above (requires Nextflow ` 24.03.0-edge` or later). +- `conda` + - A generic configuration profile to be used with [Conda](https://conda.io/docs/). Please only use Conda as a last resort i.e. when it's not possible to run the pipeline with Docker, Singularity, Podman, Shifter, Charliecloud, or Apptainer. + +### `-resume` + +Specify this when restarting a pipeline. Nextflow will use cached results from any pipeline steps where the inputs are the same, continuing from where it got to previously. For input to be considered the same, not only the names must be identical but the files' contents as well. For more info about this parameter, see [this blog post](https://www.nextflow.io/blog/2019/demystifying-nextflow-resume.html). + +You can also supply a run name to resume a specific run: `-resume [run-name]`. Use the `nextflow log` command to show previous run names. + +### `-c` + +Specify the path to a specific config file (this is a core Nextflow command). See the [nf-core website documentation](https://nf-co.re/usage/configuration) for more information. + +## Custom configuration + +### Resource requests + +Whilst the default requirements set within the pipeline will hopefully work for most people and with most input data, you may find that you want to customise the compute resources that the pipeline requests. Each step in the pipeline has a default set of requirements for number of CPUs, memory and time. For most of the pipeline steps, if the job exits with any of the error codes specified [here](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L18) it will automatically be resubmitted with higher resources request (2 x original, then 3 x original). If it still fails after the third attempt then the pipeline execution is stopped. + +To change the resource requests, please see the [max resources](https://nf-co.re/docs/usage/configuration#max-resources) and [tuning workflow resources](https://nf-co.re/docs/usage/configuration#tuning-workflow-resources) section of the nf-core website. + +### Custom Containers + +In some cases, you may wish to change the container or conda environment used by a pipeline steps for a particular tool. By default, nf-core pipelines use containers and software from the [biocontainers](https://biocontainers.pro/) or [bioconda](https://bioconda.github.io/) projects. However, in some cases the pipeline specified version maybe out of date. + +To use a different container from the default container or conda environment specified in a pipeline, please see the [updating tool versions](https://nf-co.re/docs/usage/configuration#updating-tool-versions) section of the nf-core website. + +### Custom Tool Arguments + +A pipeline might not always support every possible argument or option of a particular tool used in pipeline. Fortunately, nf-core pipelines provide some freedom to users to insert additional parameters that the pipeline does not include by default. + +To learn how to provide additional arguments to a particular tool of the pipeline, please see the [customising tool arguments](https://nf-co.re/docs/usage/configuration#customising-tool-arguments) section of the nf-core website. + +### nf-core/configs + +In most cases, you will only need to create a custom config as a one-off but if you and others within your organisation are likely to be running nf-core pipelines regularly and need to use the same settings regularly it may be a good idea to request that your custom config file is uploaded to the `nf-core/configs` git repository. Before you do this please can you test that the config file works with your pipeline of choice using the `-c` parameter. You can then create a pull request to the `nf-core/configs` repository with the addition of your config file, associated documentation file (see examples in [`nf-core/configs/docs`](https://github.com/nf-core/configs/tree/master/docs)), and amending [`nfcore_custom.config`](https://github.com/nf-core/configs/blob/master/nfcore_custom.config) to include your custom profile. + +See the main [Nextflow documentation](https://www.nextflow.io/docs/latest/config.html) for more information about creating your own configuration files. + +If you have any questions or issues please send us a message on [Slack](https://nf-co.re/join/slack) on the [`#configs` channel](https://nfcore.slack.com/channels/configs). + +## Running in the background + +Nextflow handles job submissions and supervises the running jobs. The Nextflow process must run until the pipeline is finished. + +The Nextflow `-bg` flag launches Nextflow in the background, detached from your terminal so that the workflow does not stop if you log out of your session. The logs are saved to a file. + +Alternatively, you can use `screen` / `tmux` or similar tool to create a detached session which you can log back into at a later time. +Some HPC setups also allow you to run nextflow within a cluster job submitted your job scheduler (from where it submits more jobs). + +## Nextflow memory requirements + +In some cases, the Nextflow Java virtual machines can start to request a large amount of memory. +We recommend adding the following line to your environment to limit this (typically in `~/.bashrc` or `~./bash_profile`): + +```bash +NXF_OPTS='-Xms1g -Xmx4g' +``` diff --git a/main.nf b/main.nf new file mode 100644 index 00000000..8d9c8186 --- /dev/null +++ b/main.nf @@ -0,0 +1,105 @@ +#!/usr/bin/env nextflow +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + nf-cmgg/preprocessing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Github : https://github.com/nf-cmgg/preprocessing +---------------------------------------------------------------------------------------- +*/ + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +include { PREPROCESSING } from './workflows/preprocessing' +include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_preprocessing_pipeline' +include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_preprocessing_pipeline' +include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_preprocessing_pipeline' + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + GENOME PARAMETER VALUES +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +// TODO nf-core: Remove this line if you don't need a FASTA file +// This is an example of how to use getGenomeAttribute() to fetch parameters +// from igenomes.config using `--genome` +params.fasta = getGenomeAttribute('fasta') + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + NAMED WORKFLOWS FOR PIPELINE +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +// +// WORKFLOW: Run main analysis pipeline depending on type of input +// +workflow NFCMGG_PREPROCESSING { + + take: + samplesheet // channel: samplesheet read in from --input + + main: + + // + // WORKFLOW: Run pipeline + // + PREPROCESSING ( + samplesheet + ) + emit: + multiqc_report = PREPROCESSING.out.multiqc_report // channel: /path/to/multiqc_report.html +} +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RUN MAIN WORKFLOW +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow { + + main: + // + // SUBWORKFLOW: Run initialisation tasks + // + PIPELINE_INITIALISATION ( + params.version, + params.validate_params, + params.monochrome_logs, + args, + params.outdir, + params.input, + params.help, + params.help_full, + params.show_hidden + ) + + // + // WORKFLOW: Run main workflow + // + NFCMGG_PREPROCESSING ( + PIPELINE_INITIALISATION.out.samplesheet + ) + // + // SUBWORKFLOW: Run completion tasks + // + PIPELINE_COMPLETION ( + params.email, + params.email_on_fail, + params.plaintext_email, + params.outdir, + params.monochrome_logs, + params.hook_url, + NFCMGG_PREPROCESSING.out.multiqc_report + ) +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + THE END +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ diff --git a/modules.json b/modules.json new file mode 100644 index 00000000..91d4b13b --- /dev/null +++ b/modules.json @@ -0,0 +1,41 @@ +{ + "name": "nf-cmgg/preprocessing", + "homePage": "https://github.com/nf-cmgg/preprocessing", + "repos": { + "https://github.com/nf-core/modules.git": { + "modules": { + "nf-core": { + "fastqc": { + "branch": "master", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "installed_by": ["modules"] + }, + "multiqc": { + "branch": "master", + "git_sha": "e10b76ca0c66213581bec2833e30d31f239dec0b", + "installed_by": ["modules"] + } + } + }, + "subworkflows": { + "nf-core": { + "utils_nextflow_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": ["subworkflows"] + }, + "utils_nfcore_pipeline": { + "branch": "master", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "installed_by": ["subworkflows"] + }, + "utils_nfschema_plugin": { + "branch": "master", + "git_sha": "4b406a74dc0449c0401ed87d5bfff4252fd277fd", + "installed_by": ["subworkflows"] + } + } + } + } + } +} diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml new file mode 100644 index 00000000..f9f54ee9 --- /dev/null +++ b/modules/nf-core/fastqc/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::fastqc=0.12.1 diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf new file mode 100644 index 00000000..23e16634 --- /dev/null +++ b/modules/nf-core/fastqc/main.nf @@ -0,0 +1,64 @@ +process FASTQC { + tag "${meta.id}" + label 'process_medium' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0' : + 'biocontainers/fastqc:0.12.1--hdfd78af_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.zip") , emit: zip + 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}" + // Make list of old name and new name pairs to use for renaming in the bash while loop + def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] } + def rename_to = old_new_pairs*.join(' ').join(' ') + def renamed_files = old_new_pairs.collect{ _old_name, new_name -> new_name }.join(' ') + + // The total amount of allocated RAM by FastQC is equal to the number of threads defined (--threads) time the amount of RAM defined (--memory) + // https://github.com/s-andrews/FastQC/blob/1faeea0412093224d7f6a07f777fad60a5650795/fastqc#L211-L222 + // Dividing the task.memory by task.cpu allows to stick to requested amount of RAM in the label + def memory_in_mb = task.memory ? task.memory.toUnit('MB') / task.cpus : null + // FastQC memory value allowed range (100 - 10000) + def fastqc_memory = memory_in_mb > 10000 ? 10000 : (memory_in_mb < 100 ? 100 : memory_in_mb) + + """ + printf "%s %s\\n" ${rename_to} | while read old_name new_name; do + [ -f "\${new_name}" ] || ln -s \$old_name \$new_name + done + + fastqc \\ + ${args} \\ + --threads ${task.cpus} \\ + --memory ${fastqc_memory} \\ + ${renamed_files} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.html + touch ${prefix}.zip + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml new file mode 100644 index 00000000..c8d9d025 --- /dev/null +++ b/modules/nf-core/fastqc/meta.yml @@ -0,0 +1,72 @@ +name: fastqc +description: Run FastQC on sequenced reads +keywords: + - quality control + - qc + - adapters + - fastq +tools: + - fastqc: + description: | + FastQC gives general quality metrics about your reads. + It provides information about the quality score distribution + across your reads, the per base sequence content (%A/C/G/T). + + You get information about adapter contamination and other + overrepresented sequences. + homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ + documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ + licence: ["GPL-2.0-only"] + identifier: biotools:fastqc +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. + ontologies: [] +output: + html: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.html": + type: file + description: FastQC report + pattern: "*_{fastqc.html}" + ontologies: [] + zip: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.zip": + type: file + description: FastQC report archive + pattern: "*_{fastqc.zip}" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@drpatelh" + - "@grst" + - "@ewels" + - "@FelixKrueger" +maintainers: + - "@drpatelh" + - "@grst" + - "@ewels" + - "@FelixKrueger" diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test new file mode 100644 index 00000000..e9d79a07 --- /dev/null +++ b/modules/nf-core/fastqc/tests/main.nf.test @@ -0,0 +1,309 @@ +nextflow_process { + + name "Test Process FASTQC" + script "../main.nf" + process "FASTQC" + + tag "modules" + tag "modules_nfcore" + tag "fastqc" + + 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 { + assertAll ( + { assert process.success }, + // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. + // looks like this:
    Mon 2 Oct 2023
    test.gz
    + // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).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 { + assertAll ( + { assert process.success }, + { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 interleaved [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_interleaved.fastq.gz', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 paired-end [bam]") { + + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 multiple [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), + 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 process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, + { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, + { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, + { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, + { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, + { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, + { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, + { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, + { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, + { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).match() } + ) + } + } + + test("sarscov2 custom_prefix") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'mysample', 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 process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, + { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, + { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, + { assert snapshot(process.out.versions).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 { + assertAll ( + { assert process.success }, + { assert snapshot(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 { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 interleaved [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_interleaved.fastq.gz', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 paired-end [bam] - 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/bam/test.paired_end.sorted.bam', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 multiple [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), + 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("sarscov2 custom_prefix - stub") { + + options "-stub" + when { + process { + """ + input[0] = Channel.of([ + [ id:'mysample', 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() } + ) + } + } +} diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap new file mode 100644 index 00000000..d5db3092 --- /dev/null +++ b/modules/nf-core/fastqc/tests/main.nf.test.snap @@ -0,0 +1,392 @@ +{ + "sarscov2 custom_prefix": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:16.374038" + }, + "sarscov2 single-end [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": true + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": true + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": true + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:24.993809" + }, + "sarscov2 custom_prefix - stub": { + "content": [ + { + "0": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "mysample", + "single_end": true + }, + "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:03:10.93942" + }, + "sarscov2 interleaved [fastq]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:42.355718" + }, + "sarscov2 paired-end [bam]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:53.276274" + }, + "sarscov2 multiple [fastq]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:05.527626" + }, + "sarscov2 paired-end [fastq]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:31.188871" + }, + "sarscov2 paired-end [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:34.273566" + }, + "sarscov2 multiple [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:03:02.304411" + }, + "sarscov2 single-end [fastq]": { + "content": [ + [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ] + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:01:19.095607" + }, + "sarscov2 interleaved [fastq] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:44.640184" + }, + "sarscov2 paired-end [bam] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "html": [ + [ + { + "id": "test", + "single_end": false + }, + "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,e1cc25ca8af856014824abd842e93978" + ], + "zip": [ + [ + { + "id": "test", + "single_end": false + }, + "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.3" + }, + "timestamp": "2024-07-22T11:02:53.550742" + } +} \ No newline at end of file diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml new file mode 100644 index 00000000..dd513cbd --- /dev/null +++ b/modules/nf-core/multiqc/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::multiqc=1.31 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf new file mode 100644 index 00000000..5288f5cc --- /dev/null +++ b/modules/nf-core/multiqc/main.nf @@ -0,0 +1,63 @@ +process MULTIQC { + label 'process_single' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/ef/eff0eafe78d5f3b65a6639265a16b89fdca88d06d18894f90fcdb50142004329/data' : + 'community.wave.seqera.io/library/multiqc:1.31--1efbafd542a23882' }" + + input: + path multiqc_files, stageAs: "?/*" + path(multiqc_config) + path(extra_multiqc_config) + path(multiqc_logo) + path(replace_names) + path(sample_names) + + output: + path "*multiqc_report.html", emit: report + path "*_data" , emit: data + path "*_plots" , optional:true, emit: plots + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ? "--filename ${task.ext.prefix}.html" : '' + def config = multiqc_config ? "--config $multiqc_config" : '' + def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' + def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : '' + def replace = replace_names ? "--replace-names ${replace_names}" : '' + def samples = sample_names ? "--sample-names ${sample_names}" : '' + """ + multiqc \\ + --force \\ + $args \\ + $config \\ + $prefix \\ + $extra_config \\ + $logo \\ + $replace \\ + $samples \\ + . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ + + stub: + """ + mkdir multiqc_data + mkdir multiqc_plots + touch multiqc_report.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml new file mode 100644 index 00000000..ce30eb73 --- /dev/null +++ b/modules/nf-core/multiqc/meta.yml @@ -0,0 +1,92 @@ +name: multiqc +description: Aggregate results from bioinformatics analyses across many samples into + a single report +keywords: + - QC + - bioinformatics tools + - Beautiful stand-alone HTML report +tools: + - multiqc: + description: | + MultiQC searches a given directory for analysis logs and compiles a HTML report. + It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. + homepage: https://multiqc.info/ + documentation: https://multiqc.info/docs/ + licence: ["GPL-3.0-or-later"] + identifier: biotools:multiqc +input: + - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + ontologies: [] + - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + - extra_multiqc_config: + type: file + description: Second optional config yml for MultiQC. Will override common sections + in multiqc_config. + pattern: "*.{yml,yaml}" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + - multiqc_logo: + type: file + description: Optional logo file for MultiQC + pattern: "*.{png}" + ontologies: [] + - replace_names: + type: file + description: | + Optional two-column sample renaming file. First column a set of + patterns, second column a set of corresponding replacements. Passed via + MultiQC's `--replace-names` option. + pattern: "*.{tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + - sample_names: + type: file + description: | + Optional TSV file with headers, passed to the MultiQC --sample_names + argument. + pattern: "*.{tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV +output: + report: + - "*multiqc_report.html": + type: file + description: MultiQC report file + pattern: "multiqc_report.html" + ontologies: [] + data: + - "*_data": + type: directory + description: MultiQC data dir + pattern: "multiqc_data" + plots: + - "*_plots": + type: file + description: Plots created by MultiQC + pattern: "*_data" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@abhi18av" + - "@bunop" + - "@drpatelh" + - "@jfy133" +maintainers: + - "@abhi18av" + - "@bunop" + - "@drpatelh" + - "@jfy133" diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test new file mode 100644 index 00000000..33316a7d --- /dev/null +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -0,0 +1,92 @@ +nextflow_process { + + name "Test Process MULTIQC" + script "../main.nf" + process "MULTIQC" + + tag "modules" + tag "modules_nfcore" + tag "multiqc" + + config "./nextflow.config" + + test("sarscov2 single-end [fastqc]") { + + when { + process { + """ + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) + input[1] = [] + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, + { assert process.out.data[0] ==~ ".*/multiqc_data" }, + { assert snapshot(process.out.versions).match("multiqc_versions_single") } + ) + } + + } + + test("sarscov2 single-end [fastqc] [config]") { + + when { + process { + """ + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) + input[1] = Channel.of(file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true)) + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, + { assert process.out.data[0] ==~ ".*/multiqc_data" }, + { assert snapshot(process.out.versions).match("multiqc_versions_config") } + ) + } + } + + test("sarscov2 single-end [fastqc] - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) + input[1] = [] + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out.report.collect { file(it).getName() } + + process.out.data.collect { file(it).getName() } + + process.out.plots.collect { file(it).getName() } + + process.out.versions ).match("multiqc_stub") } + ) + } + + } +} diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap new file mode 100644 index 00000000..17881d15 --- /dev/null +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -0,0 +1,41 @@ +{ + "multiqc_versions_single": { + "content": [ + [ + "versions.yml:md5,8968b114a3e20756d8af2b80713bcc4f" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-08T20:57:36.139055243" + }, + "multiqc_stub": { + "content": [ + [ + "multiqc_report.html", + "multiqc_data", + "multiqc_plots", + "versions.yml:md5,8968b114a3e20756d8af2b80713bcc4f" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-08T20:59:15.142230631" + }, + "multiqc_versions_config": { + "content": [ + [ + "versions.yml:md5,8968b114a3e20756d8af2b80713bcc4f" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.6" + }, + "timestamp": "2025-09-08T20:58:29.629087066" + } +} \ No newline at end of file diff --git a/modules/nf-core/multiqc/tests/nextflow.config b/modules/nf-core/multiqc/tests/nextflow.config new file mode 100644 index 00000000..c537a6a3 --- /dev/null +++ b/modules/nf-core/multiqc/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: 'MULTIQC' { + ext.prefix = null + } +} diff --git a/nextflow.config b/nextflow.config new file mode 100644 index 00000000..dd7bef4d --- /dev/null +++ b/nextflow.config @@ -0,0 +1,280 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + nf-cmgg/preprocessing Nextflow config file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Default config options for all compute environments +---------------------------------------------------------------------------------------- +*/ + +// Global default params, used in configs +params { + + // TODO nf-core: Specify your pipeline's command line flags + // Input options + input = null + + // References + genome = null + igenomes_base = 's3://ngi-igenomes/igenomes/' + igenomes_ignore = false + + // MultiQC options + multiqc_config = null + multiqc_title = null + multiqc_logo = null + max_multiqc_email_size = '25.MB' + multiqc_methods_description = null + + // Boilerplate options + outdir = null + publish_dir_mode = 'copy' + email = null + email_on_fail = null + plaintext_email = false + monochrome_logs = false + hook_url = System.getenv('HOOK_URL') + help = false + help_full = false + show_hidden = false + version = false + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' + trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') + + // Config options + config_profile_name = null + config_profile_description = null + + custom_config_version = 'master' + custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" + config_profile_contact = null + config_profile_url = null + + // Schema validation default options + validate_params = true +} + +// Load base.config by default for all pipelines +includeConfig 'conf/base.config' + +profiles { + debug { + dumpHashes = true + process.beforeScript = 'echo $HOSTNAME' + cleanup = false + nextflow.enable.configProcessNamesValidation = true + } + conda { + conda.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + conda.channels = ['conda-forge', 'bioconda'] + apptainer.enabled = false + } + mamba { + conda.enabled = true + conda.useMamba = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + } + docker { + docker.enabled = true + conda.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + docker.runOptions = '-u $(id -u):$(id -g)' + } + arm64 { + process.arch = 'arm64' + // TODO https://github.com/nf-core/modules/issues/6694 + // For now if you're using arm64 you have to use wave for the sake of the maintainers + // wave profile + apptainer.ociAutoPull = true + singularity.ociAutoPull = true + wave.enabled = true + wave.freeze = true + wave.strategy = 'conda,container' + } + emulate_amd64 { + docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' + } + singularity { + singularity.enabled = true + singularity.autoMounts = true + conda.enabled = false + docker.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + } + podman { + podman.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + } + shifter { + shifter.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + } + charliecloud { + charliecloud.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + apptainer.enabled = false + } + apptainer { + apptainer.enabled = true + apptainer.autoMounts = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + } + wave { + apptainer.ociAutoPull = true + singularity.ociAutoPull = true + wave.enabled = true + wave.freeze = true + wave.strategy = 'conda,container' + } + gpu { + docker.runOptions = '-u $(id -u):$(id -g) --gpus all' + apptainer.runOptions = '--nv' + singularity.runOptions = '--nv' + } + test { includeConfig 'conf/test.config' } + test_full { includeConfig 'conf/test_full.config' } +} + +// Set AWS client to anonymous when using the default igenomes_base +aws.client.anonymous = !params.igenomes_ignore && params.igenomes_base?.startsWith('s3://ngi-igenomes/igenomes/') ?: false +// Load nf-core custom profiles from different institutions + +// If params.custom_config_base is set AND either the NXF_OFFLINE environment variable is not set or params.custom_config_base is a local path, the nfcore_custom.config file from the specified base path is included. +// Load nf-cmgg/preprocessing custom profiles from different institutions. +includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" + + +// Load nf-cmgg/preprocessing custom profiles from different institutions. +// TODO nf-core: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs +// includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" + +// Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile +// Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled +// Set to your registry if you have a mirror of containers +apptainer.registry = 'quay.io' +docker.registry = 'quay.io' +podman.registry = 'quay.io' +singularity.registry = 'quay.io' +charliecloud.registry = 'quay.io' + +// Load igenomes.config if required +includeConfig !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ignored.config' + +// Export these variables to prevent local Python/R libraries from conflicting with those in the container +// The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container. +// See https://apeltzer.github.io/post/03-julia-lang-nextflow/ for details on that. Once we have a common agreement on where to keep Julia packages, this is adjustable. + +env { + PYTHONNOUSERSITE = 1 + R_PROFILE_USER = "/.Rprofile" + R_ENVIRON_USER = "/.Renviron" + JULIA_DEPOT_PATH = "/usr/local/share/julia" +} + +// Set bash options +process.shell = [ + "bash", + "-C", // No clobber - prevent output redirection from overwriting files. + "-e", // Exit if a tool returns a non-zero status/exit code + "-u", // Treat unset variables and parameters as an error + "-o", // Returns the status of the last command to exit.. + "pipefail" // ..with a non-zero status or zero if all successfully execute +] + +// Disable process selector warnings by default. Use debug profile to enable warnings. +nextflow.enable.configProcessNamesValidation = false + +timeline { + enabled = true + file = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html" +} +report { + enabled = true + file = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html" +} +trace { + enabled = true + file = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt" +} +dag { + enabled = true + file = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html" +} + +manifest { + name = 'nf-cmgg/preprocessing' + contributors = [ + // TODO nf-core: Update the field with the details of the contributors to your pipeline. New with Nextflow version 24.10.0 + [ + name: 'Matthias De Smet', + affiliation: '', + email: '', + github: '', + contribution: [], // List of contribution types ('author', 'maintainer' or 'contributor') + orcid: '' + ], + [ + name: ' Nicolas Vannieuwkerke', + affiliation: '', + email: '', + github: '', + contribution: [], // List of contribution types ('author', 'maintainer' or 'contributor') + orcid: '' + ], + ] + homePage = 'https://github.com/nf-cmgg/preprocessing' + description = """Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data.""" + mainScript = 'main.nf' + defaultBranch = 'main' + nextflowVersion = '!>=25.04.0' + version = '2.1.0dev' + doi = '' +} + +// Nextflow plugins +plugins { + id 'nf-schema@2.5.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet +} + +validation { + defaultIgnoreParams = ["genomes"] + monochromeLogs = params.monochrome_logs +} + +// Load modules.config for DSL2 module specific options +includeConfig 'conf/modules.config' diff --git a/nextflow_schema.json b/nextflow_schema.json new file mode 100644 index 00000000..858f55b9 --- /dev/null +++ b/nextflow_schema.json @@ -0,0 +1,257 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/nf-cmgg/preprocessing/main/nextflow_schema.json", + "title": "nf-cmgg/preprocessing pipeline parameters", + "description": "Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data.", + "type": "object", + "$defs": { + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["input", "outdir"], + "properties": { + "input": { + "type": "string", + "format": "file-path", + "exists": true, + "schema": "assets/schema_input.json", + "mimetype": "text/csv", + "pattern": "^\\S+\\.csv$", + "description": "Path to comma-separated file containing information about the samples in the experiment.", + "help_text": "You will need to create a design file with information about the samples in your experiment before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row.", + "fa_icon": "fas fa-file-csv" + }, + "outdir": { + "type": "string", + "format": "directory-path", + "description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.", + "fa_icon": "fas fa-folder-open" + }, + "email": { + "type": "string", + "description": "Email address for completion summary.", + "fa_icon": "fas fa-envelope", + "help_text": "Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits. If set in your user config file (`~/.nextflow/config`) then you don't need to specify this on the command line for every run.", + "pattern": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$" + }, + "multiqc_title": { + "type": "string", + "description": "MultiQC report title. Printed as page header, used for filename if not otherwise specified.", + "fa_icon": "fas fa-file-signature" + } + } + }, + "reference_genome_options": { + "title": "Reference genome options", + "type": "object", + "fa_icon": "fas fa-dna", + "description": "Reference genome related files and options required for the workflow.", + "properties": { + "genome": { + "type": "string", + "description": "Name of iGenomes reference.", + "fa_icon": "fas fa-book", + "help_text": "If using a reference genome configured in the pipeline using iGenomes, use this parameter to give the ID for the reference. This is then used to build the full paths for all required reference genome files e.g. `--genome GRCh38`. \n\nSee the [nf-core website docs](https://nf-co.re/usage/reference_genomes) for more details." + }, + "fasta": { + "type": "string", + "format": "file-path", + "exists": true, + "mimetype": "text/plain", + "pattern": "^\\S+\\.fn?a(sta)?(\\.gz)?$", + "description": "Path to FASTA genome file.", + "help_text": "This parameter is *mandatory* if `--genome` is not specified. If you don't have a BWA index available this will be generated for you automatically. Combine with `--save_reference` to save BWA index for future runs.", + "fa_icon": "far fa-file-code" + }, + "igenomes_ignore": { + "type": "boolean", + "description": "Do not load the iGenomes reference config.", + "fa_icon": "fas fa-ban", + "hidden": true, + "help_text": "Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`." + }, + "igenomes_base": { + "type": "string", + "format": "directory-path", + "description": "The base path to the igenomes reference files", + "fa_icon": "fas fa-ban", + "hidden": true, + "default": "s3://ngi-igenomes/igenomes/" + } + } + }, + "institutional_config_options": { + "title": "Institutional config options", + "type": "object", + "fa_icon": "fas fa-university", + "description": "Parameters used to describe centralised config profiles. These should not be edited.", + "help_text": "The centralised nf-core configuration profiles use a handful of pipeline parameters to describe themselves. This information is then printed to the Nextflow log when you run a pipeline. You should not need to change these values when you run a pipeline.", + "properties": { + "custom_config_version": { + "type": "string", + "description": "Git commit id for Institutional configs.", + "default": "master", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "custom_config_base": { + "type": "string", + "description": "Base directory for Institutional configs.", + "default": "https://raw.githubusercontent.com/nf-core/configs/master", + "hidden": true, + "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", + "fa_icon": "fas fa-users-cog" + }, + "config_profile_name": { + "type": "string", + "description": "Institutional config name.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_description": { + "type": "string", + "description": "Institutional config description.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_contact": { + "type": "string", + "description": "Institutional config contact information.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "config_profile_url": { + "type": "string", + "description": "Institutional config URL link.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + } + } + }, + "generic_options": { + "title": "Generic options", + "type": "object", + "fa_icon": "fas fa-file-import", + "description": "Less common options for the pipeline, typically set in a config file.", + "help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.", + "properties": { + "version": { + "type": "boolean", + "description": "Display version and exit.", + "fa_icon": "fas fa-question-circle", + "hidden": true + }, + "publish_dir_mode": { + "type": "string", + "default": "copy", + "description": "Method used to save pipeline results to output directory.", + "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", + "fa_icon": "fas fa-copy", + "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], + "hidden": true + }, + "email_on_fail": { + "type": "string", + "description": "Email address for completion summary, only when pipeline fails.", + "fa_icon": "fas fa-exclamation-triangle", + "pattern": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$", + "help_text": "An email address to send a summary email to when the pipeline is completed - ONLY sent if the pipeline does not exit successfully.", + "hidden": true + }, + "plaintext_email": { + "type": "boolean", + "description": "Send plain-text email instead of HTML.", + "fa_icon": "fas fa-remove-format", + "hidden": true + }, + "max_multiqc_email_size": { + "type": "string", + "description": "File size limit when attaching MultiQC reports to summary emails.", + "pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$", + "default": "25.MB", + "fa_icon": "fas fa-file-upload", + "hidden": true + }, + "monochrome_logs": { + "type": "boolean", + "description": "Do not use coloured log outputs.", + "fa_icon": "fas fa-palette", + "hidden": true + }, + "hook_url": { + "type": "string", + "description": "Incoming hook URL for messaging service", + "fa_icon": "fas fa-people-group", + "help_text": "Incoming hook URL for messaging service. Currently, MS Teams and Slack are supported.", + "hidden": true + }, + "multiqc_config": { + "type": "string", + "format": "file-path", + "description": "Custom config file to supply to MultiQC.", + "fa_icon": "fas fa-cog", + "hidden": true + }, + "multiqc_logo": { + "type": "string", + "description": "Custom logo file to supply to MultiQC. File name must also be set in the MultiQC config file", + "fa_icon": "fas fa-image", + "hidden": true + }, + "multiqc_methods_description": { + "type": "string", + "description": "Custom MultiQC yaml file containing HTML including a methods description.", + "fa_icon": "fas fa-cog" + }, + "validate_params": { + "type": "boolean", + "description": "Boolean whether to validate parameters against the schema at runtime", + "default": true, + "fa_icon": "fas fa-check-square", + "hidden": true + }, + "pipelines_testdata_base_path": { + "type": "string", + "fa_icon": "far fa-check-circle", + "description": "Base URL or local path to location of pipeline test dataset files", + "default": "https://raw.githubusercontent.com/nf-core/test-datasets/", + "hidden": true + }, + "trace_report_suffix": { + "type": "string", + "fa_icon": "far calendar", + "description": "Suffix to add to the trace report filename. Default is the date and time in the format yyyy-MM-dd_HH-mm-ss.", + "hidden": true + }, + "help": { + "type": ["boolean", "string"], + "description": "Display the help message." + }, + "help_full": { + "type": "boolean", + "description": "Display the full detailed help message." + }, + "show_hidden": { + "type": "boolean", + "description": "Display hidden parameters in the help message (only works when --help or --help_full are provided)." + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/input_output_options" + }, + { + "$ref": "#/$defs/reference_genome_options" + }, + { + "$ref": "#/$defs/institutional_config_options" + }, + { + "$ref": "#/$defs/generic_options" + } + ] +} diff --git a/nf-test.config b/nf-test.config new file mode 100644 index 00000000..3a1fff59 --- /dev/null +++ b/nf-test.config @@ -0,0 +1,24 @@ +config { + // location for all nf-test tests + testsDir "." + + // nf-test directory including temporary files for each test + workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + + // location of an optional nextflow.config file specific for executing tests + configFile "tests/nextflow.config" + + // ignore tests coming from the nf-core/modules repo + ignore 'modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*' + + // run all test with defined profile(s) from the main nextflow.config + profile "test" + + // list of filenames or patterns that should be trigger a full test run + triggers 'nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore' + + // load the necessary plugins + plugins { + load "nft-utils@0.0.3" + } +} diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json new file mode 100644 index 00000000..35a2f1d3 --- /dev/null +++ b/ro-crate-metadata.json @@ -0,0 +1,295 @@ +{ + "@context": [ + "https://w3id.org/ro/crate/1.1/context", + { + "GithubService": "https://w3id.org/ro/terms/test#GithubService", + "JenkinsService": "https://w3id.org/ro/terms/test#JenkinsService", + "PlanemoEngine": "https://w3id.org/ro/terms/test#PlanemoEngine", + "TestDefinition": "https://w3id.org/ro/terms/test#TestDefinition", + "TestInstance": "https://w3id.org/ro/terms/test#TestInstance", + "TestService": "https://w3id.org/ro/terms/test#TestService", + "TestSuite": "https://w3id.org/ro/terms/test#TestSuite", + "TravisService": "https://w3id.org/ro/terms/test#TravisService", + "definition": "https://w3id.org/ro/terms/test#definition", + "engineVersion": "https://w3id.org/ro/terms/test#engineVersion", + "instance": "https://w3id.org/ro/terms/test#instance", + "resource": "https://w3id.org/ro/terms/test#resource", + "runsOn": "https://w3id.org/ro/terms/test#runsOn" + } + ], + "@graph": [ + { + "@id": "./", + "@type": "Dataset", + "creativeWorkStatus": "InProgress", + "datePublished": "2025-11-13T15:11:21+00:00", + "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that ...\n\n\n\n\n1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/))\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\n\n\nNow, you can run the pipeline using:\n\n\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by Matthias De Smet, Nicolas Vannieuwkerke.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Citations\n\n\n\n\n\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/main/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "hasPart": [ + { + "@id": "main.nf" + }, + { + "@id": "assets/" + }, + { + "@id": "conf/" + }, + { + "@id": "docs/" + }, + { + "@id": "modules/" + }, + { + "@id": "modules/nf-core/" + }, + { + "@id": "workflows/" + }, + { + "@id": "subworkflows/" + }, + { + "@id": "nextflow.config" + }, + { + "@id": "README.md" + }, + { + "@id": "nextflow_schema.json" + }, + { + "@id": "CHANGELOG.md" + }, + { + "@id": "LICENSE" + }, + { + "@id": "CITATIONS.md" + }, + { + "@id": "modules.json" + }, + { + "@id": "docs/usage.md" + }, + { + "@id": "docs/output.md" + }, + { + "@id": ".nf-core.yml" + }, + { + "@id": ".pre-commit-config.yaml" + }, + { + "@id": ".prettierignore" + } + ], + "isBasedOn": "https://github.com/nf-cmgg/preprocessing", + "license": "MIT", + "mainEntity": { + "@id": "main.nf" + }, + "mentions": [ + { + "@id": "#3be06551-eaa0-4c8e-8ad8-cf70f05fb90c" + } + ], + "name": "nf-cmgg/preprocessing" + }, + { + "@id": "ro-crate-metadata.json", + "@type": "CreativeWork", + "about": { + "@id": "./" + }, + "conformsTo": [ + { + "@id": "https://w3id.org/ro/crate/1.1" + }, + { + "@id": "https://w3id.org/workflowhub/workflow-ro-crate/1.0" + } + ] + }, + { + "@id": "main.nf", + "@type": [ + "File", + "SoftwareSourceCode", + "ComputationalWorkflow" + ], + "dateCreated": "", + "dateModified": "2025-11-13T16:11:21Z", + "dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/", + "keywords": [ + "nf-core", + "nextflow" + ], + "license": [ + "MIT" + ], + "name": [ + "nf-cmgg/preprocessing" + ], + "programmingLanguage": { + "@id": "https://w3id.org/workflowhub/workflow-ro-crate#nextflow" + }, + "sdPublisher": { + "@id": "https://nf-co.re/" + }, + "url": [ + "https://github.com/nf-cmgg/preprocessing", + "https://nf-co.re/nf-cmgg/preprocessing/dev/" + ], + "version": [ + "2.1.0dev" + ] + }, + { + "@id": "https://w3id.org/workflowhub/workflow-ro-crate#nextflow", + "@type": "ComputerLanguage", + "identifier": { + "@id": "https://www.nextflow.io/" + }, + "name": "Nextflow", + "url": { + "@id": "https://www.nextflow.io/" + }, + "version": "!>=25.04.0" + }, + { + "@id": "#3be06551-eaa0-4c8e-8ad8-cf70f05fb90c", + "@type": "TestSuite", + "instance": [ + { + "@id": "#4d67a865-3114-4fc8-94e4-c36091fb7276" + } + ], + "mainEntity": { + "@id": "main.nf" + }, + "name": "Test suite for nf-cmgg/preprocessing" + }, + { + "@id": "#4d67a865-3114-4fc8-94e4-c36091fb7276", + "@type": "TestInstance", + "name": "GitHub Actions workflow for testing nf-cmgg/preprocessing", + "resource": "repos/nf-cmgg/preprocessing/actions/workflows/nf-test.yml", + "runsOn": { + "@id": "https://w3id.org/ro/terms/test#GithubService" + }, + "url": "https://api.github.com" + }, + { + "@id": "https://w3id.org/ro/terms/test#GithubService", + "@type": "TestService", + "name": "Github Actions", + "url": { + "@id": "https://github.com" + } + }, + { + "@id": "assets/", + "@type": "Dataset", + "description": "Additional files" + }, + { + "@id": "conf/", + "@type": "Dataset", + "description": "Configuration files" + }, + { + "@id": "docs/", + "@type": "Dataset", + "description": "Markdown files for documenting the pipeline" + }, + { + "@id": "modules/", + "@type": "Dataset", + "description": "Modules used by the pipeline" + }, + { + "@id": "modules/nf-core/", + "@type": "Dataset", + "description": "nf-core modules" + }, + { + "@id": "workflows/", + "@type": "Dataset", + "description": "Main pipeline workflows to be executed in main.nf" + }, + { + "@id": "subworkflows/", + "@type": "Dataset", + "description": "Smaller subworkflows" + }, + { + "@id": "nextflow.config", + "@type": "File", + "description": "Main Nextflow configuration file" + }, + { + "@id": "README.md", + "@type": "File", + "description": "Basic pipeline usage information" + }, + { + "@id": "nextflow_schema.json", + "@type": "File", + "description": "JSON schema for pipeline parameter specification" + }, + { + "@id": "CHANGELOG.md", + "@type": "File", + "description": "Information on changes made to the pipeline" + }, + { + "@id": "LICENSE", + "@type": "File", + "description": "The license - should be MIT" + }, + { + "@id": "CITATIONS.md", + "@type": "File", + "description": "Citations needed when using the pipeline" + }, + { + "@id": "modules.json", + "@type": "File", + "description": "Version information for modules from nf-core/modules" + }, + { + "@id": "docs/usage.md", + "@type": "File", + "description": "Usage documentation" + }, + { + "@id": "docs/output.md", + "@type": "File", + "description": "Output documentation" + }, + { + "@id": ".nf-core.yml", + "@type": "File", + "description": "nf-core configuration file, configuring template features and linting rules" + }, + { + "@id": ".pre-commit-config.yaml", + "@type": "File", + "description": "Configuration file for pre-commit hooks" + }, + { + "@id": ".prettierignore", + "@type": "File", + "description": "Ignore file for prettier" + }, + { + "@id": "https://nf-co.re/", + "@type": "Organization", + "name": "nf-core", + "url": "https://nf-co.re/" + } + ] +} \ No newline at end of file diff --git a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf new file mode 100644 index 00000000..8e821b6f --- /dev/null +++ b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf @@ -0,0 +1,275 @@ +// +// Subworkflow with functionality specific to the nf-cmgg/preprocessing pipeline +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' +include { paramsHelp } from 'plugin/nf-schema' +include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' +include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' +include { imNotification } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW TO INITIALISE PIPELINE +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow PIPELINE_INITIALISATION { + + take: + version // boolean: Display version and exit + validate_params // boolean: Boolean whether to validate parameters against the schema at runtime + monochrome_logs // boolean: Do not use coloured log outputs + nextflow_cli_args // array: List of positional nextflow CLI args + outdir // string: The output directory where the results will be saved + input // string: Path to input samplesheet + help // boolean: Display help message and exit + help_full // boolean: Show the full help message + show_hidden // boolean: Show hidden parameters in the help message + + main: + + ch_versions = Channel.empty() + + // + // Print version and exit if required and dump pipeline parameters to JSON file + // + UTILS_NEXTFLOW_PIPELINE ( + version, + true, + outdir, + workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1 + ) + + // + // Validate parameters and generate parameter summary to stdout + // + command = "nextflow run ${workflow.manifest.name} -profile --input samplesheet.csv --outdir " + + UTILS_NFSCHEMA_PLUGIN ( + workflow, + validate_params, + null, + help, + help_full, + show_hidden, + "", + "", + command + ) + + // + // Check config provided to the pipeline + // + UTILS_NFCORE_PIPELINE ( + nextflow_cli_args + ) + + // + // Custom validation for pipeline parameters + // + validateInputParameters() + + // + // Create channel from input file provided through params.input + // + + Channel + .fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json")) + .map { + meta, fastq_1, fastq_2 -> + if (!fastq_2) { + return [ meta.id, meta + [ single_end:true ], [ fastq_1 ] ] + } else { + return [ meta.id, meta + [ single_end:false ], [ fastq_1, fastq_2 ] ] + } + } + .groupTuple() + .map { samplesheet -> + validateInputSamplesheet(samplesheet) + } + .map { + meta, fastqs -> + return [ meta, fastqs.flatten() ] + } + .set { ch_samplesheet } + + emit: + samplesheet = ch_samplesheet + versions = ch_versions +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW FOR PIPELINE COMPLETION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow PIPELINE_COMPLETION { + + take: + email // string: email address + email_on_fail // string: email address sent on pipeline failure + plaintext_email // boolean: Send plain-text email instead of HTML + outdir // path: Path to output directory where results will be published + monochrome_logs // boolean: Disable ANSI colour codes in log output + hook_url // string: hook URL for notifications + multiqc_report // string: Path to MultiQC report + + main: + summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + def multiqc_reports = multiqc_report.toList() + + // + // Completion email and summary + // + workflow.onComplete { + if (email || email_on_fail) { + completionEmail( + summary_params, + email, + email_on_fail, + plaintext_email, + outdir, + monochrome_logs, + multiqc_reports.getVal(), + ) + } + + completionSummary(monochrome_logs) + if (hook_url) { + imNotification(summary_params, hook_url) + } + } + + workflow.onError { + log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" + } +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + FUNCTIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ +// +// Check and validate pipeline parameters +// +def validateInputParameters() { + genomeExistsError() +} + +// +// Validate channels from input samplesheet +// +def validateInputSamplesheet(input) { + def (metas, fastqs) = input[1..2] + + // Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end + def endedness_ok = metas.collect{ meta -> meta.single_end }.unique().size == 1 + if (!endedness_ok) { + error("Please check input samplesheet -> Multiple runs of a sample must be of the same datatype i.e. single-end or paired-end: ${metas[0].id}") + } + + return [ metas[0], fastqs ] +} +// +// Get attribute from genome config file e.g. fasta +// +def getGenomeAttribute(attribute) { + if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) { + if (params.genomes[ params.genome ].containsKey(attribute)) { + return params.genomes[ params.genome ][ attribute ] + } + } + return null +} + +// +// Exit pipeline if incorrect --genome key provided +// +def genomeExistsError() { + if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { + def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + + " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + + " Currently, the available genome keys are:\n" + + " ${params.genomes.keySet().join(", ")}\n" + + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + error(error_string) + } +} +// +// Generate methods description for MultiQC +// +def toolCitationText() { + // TODO nf-core: Optionally add in-text citation tools to this list. + // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "Tool (Foo et al. 2023)" : "", + // Uncomment function in methodsDescriptionText to render in MultiQC report + def citation_text = [ + "Tools used in the workflow included:", + "FastQC (Andrews 2010),", + "MultiQC (Ewels et al. 2016)", + "." + ].join(' ').trim() + + return citation_text +} + +def toolBibliographyText() { + // TODO nf-core: Optionally add bibliographic entries to this list. + // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "
  • Author (2023) Pub name, Journal, DOI
  • " : "", + // Uncomment function in methodsDescriptionText to render in MultiQC report + def reference_text = [ + "
  • Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).
  • ", + "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • " + ].join(' ').trim() + + return reference_text +} + +def methodsDescriptionText(mqc_methods_yaml) { + // Convert to a named map so can be used as with familiar NXF ${workflow} variable syntax in the MultiQC YML file + def meta = [:] + meta.workflow = workflow.toMap() + meta["manifest_map"] = workflow.manifest.toMap() + + // Pipeline DOI + if (meta.manifest_map.doi) { + // Using a loop to handle multiple DOIs + // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers + // Removing ` ` since the manifest.doi is a string and not a proper list + def temp_doi_ref = "" + def manifest_doi = meta.manifest_map.doi.tokenize(",") + manifest_doi.each { doi_ref -> + temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), " + } + meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2) + } else meta["doi_text"] = "" + meta["nodoi_text"] = meta.manifest_map.doi ? "" : "
  • If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used.
  • " + + // Tool references + meta["tool_citations"] = "" + meta["tool_bibliography"] = "" + + // TODO nf-core: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled! + // meta["tool_citations"] = toolCitationText().replaceAll(", \\.", ".").replaceAll("\\. \\.", ".").replaceAll(", \\.", ".") + // meta["tool_bibliography"] = toolBibliographyText() + + + def methods_text = mqc_methods_yaml.text + + def engine = new groovy.text.SimpleTemplateEngine() + def description_html = engine.createTemplate(methods_text).make(meta) + + return description_html.toString() +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf new file mode 100644 index 00000000..d6e593e8 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -0,0 +1,126 @@ +// +// Subworkflow with functionality that may be useful for any Nextflow pipeline +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW DEFINITION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow UTILS_NEXTFLOW_PIPELINE { + take: + print_version // boolean: print version + dump_parameters // boolean: dump parameters + outdir // path: base directory used to publish pipeline results + check_conda_channels // boolean: check conda channels + + main: + + // + // Print workflow version and exit on --version + // + if (print_version) { + log.info("${workflow.manifest.name} ${getWorkflowVersion()}") + System.exit(0) + } + + // + // Dump pipeline parameters to a JSON file + // + if (dump_parameters && outdir) { + dumpParametersToJSON(outdir) + } + + // + // When running with Conda, warn if channels have not been set-up appropriately + // + if (check_conda_channels) { + checkCondaChannels() + } + + emit: + dummy_emit = true +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + FUNCTIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +// +// Generate version string +// +def getWorkflowVersion() { + def version_string = "" as String + if (workflow.manifest.version) { + def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' + version_string += "${prefix_v}${workflow.manifest.version}" + } + + if (workflow.commitId) { + def git_shortsha = workflow.commitId.substring(0, 7) + version_string += "-g${git_shortsha}" + } + + return version_string +} + +// +// Dump pipeline parameters to a JSON file +// +def dumpParametersToJSON(outdir) { + def timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') + def filename = "params_${timestamp}.json" + def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") + def jsonStr = groovy.json.JsonOutput.toJson(params) + temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) + + nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") + temp_pf.delete() +} + +// +// When running with -profile conda, warn if channels have not been set-up appropriately +// +def checkCondaChannels() { + def parser = new org.yaml.snakeyaml.Yaml() + def channels = [] + try { + def config = parser.load("conda config --show channels".execute().text) + channels = config.channels + } + catch (NullPointerException e) { + log.debug(e) + log.warn("Could not verify conda channel configuration.") + return null + } + catch (IOException e) { + log.debug(e) + log.warn("Could not verify conda channel configuration.") + return null + } + + // Check that all channels are present + // This channel list is ordered by required channel priority. + def required_channels_in_order = ['conda-forge', 'bioconda'] + def channels_missing = ((required_channels_in_order as Set) - (channels as Set)) as Boolean + + // Check that they are in the right order + def channel_priority_violation = required_channels_in_order != channels.findAll { ch -> ch in required_channels_in_order } + + if (channels_missing | channel_priority_violation) { + log.warn """\ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + There is a problem with your Conda configuration! + You will need to set-up the conda-forge and bioconda channels correctly. + Please refer to https://bioconda.github.io/ + The observed channel order is + ${channels} + but the following channel order is required: + ${required_channels_in_order} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + """.stripIndent(true) + } +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml b/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml new file mode 100644 index 00000000..e5c3a0a8 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml @@ -0,0 +1,38 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "UTILS_NEXTFLOW_PIPELINE" +description: Subworkflow with functionality that may be useful for any Nextflow pipeline +keywords: + - utility + - pipeline + - initialise + - version +components: [] +input: + - print_version: + type: boolean + description: | + Print the version of the pipeline and exit + - dump_parameters: + type: boolean + description: | + Dump the parameters of the pipeline to a JSON file + - output_directory: + type: directory + description: Path to output dir to write JSON file to. + pattern: "results/" + - check_conda_channel: + type: boolean + description: | + Check if the conda channel priority is correct. +output: + - dummy_emit: + type: boolean + description: | + Dummy emit to make nf-core subworkflows lint happy +authors: + - "@adamrtalbot" + - "@drpatelh" +maintainers: + - "@adamrtalbot" + - "@drpatelh" + - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test new file mode 100644 index 00000000..68718e4f --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test @@ -0,0 +1,54 @@ + +nextflow_function { + + name "Test Functions" + script "subworkflows/nf-core/utils_nextflow_pipeline/main.nf" + config "subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config" + tag 'subworkflows' + tag 'utils_nextflow_pipeline' + tag 'subworkflows/utils_nextflow_pipeline' + + test("Test Function getWorkflowVersion") { + + function "getWorkflowVersion" + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function dumpParametersToJSON") { + + function "dumpParametersToJSON" + + when { + function { + """ + // define inputs of the function here. Example: + input[0] = "$outputDir" + """.stripIndent() + } + } + + then { + assertAll( + { assert function.success } + ) + } + } + + test("Test Function checkCondaChannels") { + + function "checkCondaChannels" + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap new file mode 100644 index 00000000..e3f0baf4 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap @@ -0,0 +1,20 @@ +{ + "Test Function getWorkflowVersion": { + "content": [ + "v9.9.9" + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:05.308243" + }, + "Test Function checkCondaChannels": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:12.425833" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test new file mode 100644 index 00000000..02dbf094 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test @@ -0,0 +1,113 @@ +nextflow_workflow { + + name "Test Workflow UTILS_NEXTFLOW_PIPELINE" + script "../main.nf" + config "subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config" + workflow "UTILS_NEXTFLOW_PIPELINE" + tag 'subworkflows' + tag 'utils_nextflow_pipeline' + tag 'subworkflows/utils_nextflow_pipeline' + + test("Should run no inputs") { + + when { + workflow { + """ + print_version = false + dump_parameters = false + outdir = null + check_conda_channels = false + + input[0] = print_version + input[1] = dump_parameters + input[2] = outdir + input[3] = check_conda_channels + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should print version") { + + when { + workflow { + """ + print_version = true + dump_parameters = false + outdir = null + check_conda_channels = false + + input[0] = print_version + input[1] = dump_parameters + input[2] = outdir + input[3] = check_conda_channels + """ + } + } + + then { + expect { + with(workflow) { + assert success + assert "nextflow_workflow v9.9.9" in stdout + } + } + } + } + + test("Should dump params") { + + when { + workflow { + """ + print_version = false + dump_parameters = true + outdir = 'results' + check_conda_channels = false + + input[0] = false + input[1] = true + input[2] = outdir + input[3] = false + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should not create params JSON if no output directory") { + + when { + workflow { + """ + print_version = false + dump_parameters = true + outdir = null + check_conda_channels = false + + input[0] = false + input[1] = true + input[2] = outdir + input[3] = false + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config new file mode 100644 index 00000000..a09572e5 --- /dev/null +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config @@ -0,0 +1,9 @@ +manifest { + name = 'nextflow_workflow' + author = """nf-core""" + homePage = 'https://127.0.0.1' + description = """Dummy pipeline""" + nextflowVersion = '!>=23.04.0' + version = '9.9.9' + doi = 'https://doi.org/10.5281/zenodo.5070524' +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf new file mode 100644 index 00000000..bfd25876 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -0,0 +1,419 @@ +// +// Subworkflow with utility functions specific to the nf-core pipeline template +// + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + SUBWORKFLOW DEFINITION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow UTILS_NFCORE_PIPELINE { + take: + nextflow_cli_args + + main: + valid_config = checkConfigProvided() + checkProfileProvided(nextflow_cli_args) + + emit: + valid_config +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + FUNCTIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +// +// Warn if a -profile or Nextflow config has not been provided to run the pipeline +// +def checkConfigProvided() { + def valid_config = true as Boolean + if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { + log.warn( + "[${workflow.manifest.name}] You are attempting to run the pipeline without any custom configuration!\n\n" + "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + " (1) Using an existing pipeline profile e.g. `-profile docker` or `-profile singularity`\n" + " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + "Please refer to the quick start section and usage docs for the pipeline.\n " + ) + valid_config = false + } + return valid_config +} + +// +// Exit pipeline if --profile contains spaces +// +def checkProfileProvided(nextflow_cli_args) { + if (workflow.profile.endsWith(',')) { + error( + "The `-profile` option cannot end with a trailing comma, please remove it and re-run the pipeline!\n" + "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + ) + } + if (nextflow_cli_args[0]) { + log.warn( + "nf-core pipelines do not accept positional arguments. The positional argument `${nextflow_cli_args[0]}` has been detected.\n" + "HINT: A common mistake is to provide multiple values separated by spaces e.g. `-profile test, docker`.\n" + ) + } +} + +// +// Generate workflow version string +// +def getWorkflowVersion() { + def version_string = "" as String + if (workflow.manifest.version) { + def prefix_v = workflow.manifest.version[0] != 'v' ? 'v' : '' + version_string += "${prefix_v}${workflow.manifest.version}" + } + + if (workflow.commitId) { + def git_shortsha = workflow.commitId.substring(0, 7) + version_string += "-g${git_shortsha}" + } + + return version_string +} + +// +// Get software versions for pipeline +// +def processVersionsFromYAML(yaml_file) { + def yaml = new org.yaml.snakeyaml.Yaml() + def versions = yaml.load(yaml_file).collectEntries { k, v -> [k.tokenize(':')[-1], v] } + return yaml.dumpAsMap(versions).trim() +} + +// +// Get workflow version for pipeline +// +def workflowVersionToYAML() { + return """ + Workflow: + ${workflow.manifest.name}: ${getWorkflowVersion()} + Nextflow: ${workflow.nextflow.version} + """.stripIndent().trim() +} + +// +// Get channel of software versions used in pipeline in YAML format +// +def softwareVersionsToYAML(ch_versions) { + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) +} + +// +// Get workflow summary for MultiQC +// +def paramsSummaryMultiqc(summary_params) { + def summary_section = '' + summary_params + .keySet() + .each { group -> + def group_params = summary_params.get(group) + // This gets the parameters of that particular group + if (group_params) { + summary_section += "

    ${group}

    \n" + summary_section += "
    \n" + group_params + .keySet() + .sort() + .each { param -> + summary_section += "
    ${param}
    ${group_params.get(param) ?: 'N/A'}
    \n" + } + summary_section += "
    \n" + } + } + + def yaml_file_text = "id: '${workflow.manifest.name.replace('/', '-')}-summary'\n" as String + yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" + yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" + yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" + yaml_file_text += "plot_type: 'html'\n" + yaml_file_text += "data: |\n" + yaml_file_text += "${summary_section}" + + return yaml_file_text +} + +// +// ANSII colours used for terminal logging +// +def logColours(monochrome_logs=true) { + def colorcodes = [:] as Map + + // Reset / Meta + colorcodes['reset'] = monochrome_logs ? '' : "\033[0m" + colorcodes['bold'] = monochrome_logs ? '' : "\033[1m" + colorcodes['dim'] = monochrome_logs ? '' : "\033[2m" + colorcodes['underlined'] = monochrome_logs ? '' : "\033[4m" + colorcodes['blink'] = monochrome_logs ? '' : "\033[5m" + colorcodes['reverse'] = monochrome_logs ? '' : "\033[7m" + colorcodes['hidden'] = monochrome_logs ? '' : "\033[8m" + + // Regular Colors + colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" + colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" + colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" + colorcodes['yellow'] = monochrome_logs ? '' : "\033[0;33m" + colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" + colorcodes['purple'] = monochrome_logs ? '' : "\033[0;35m" + colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" + colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" + + // Bold + colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" + colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" + colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" + colorcodes['byellow'] = monochrome_logs ? '' : "\033[1;33m" + colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" + colorcodes['bpurple'] = monochrome_logs ? '' : "\033[1;35m" + colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" + colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" + + // Underline + colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" + colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" + colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" + colorcodes['uyellow'] = monochrome_logs ? '' : "\033[4;33m" + colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" + colorcodes['upurple'] = monochrome_logs ? '' : "\033[4;35m" + colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" + colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" + + // High Intensity + colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" + colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" + colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" + colorcodes['iyellow'] = monochrome_logs ? '' : "\033[0;93m" + colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" + colorcodes['ipurple'] = monochrome_logs ? '' : "\033[0;95m" + colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" + colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" + + // Bold High Intensity + colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" + colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" + colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" + colorcodes['biyellow'] = monochrome_logs ? '' : "\033[1;93m" + colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" + colorcodes['bipurple'] = monochrome_logs ? '' : "\033[1;95m" + colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" + colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" + + return colorcodes +} + +// Return a single report from an object that may be a Path or List +// +def getSingleReport(multiqc_reports) { + if (multiqc_reports instanceof Path) { + return multiqc_reports + } else if (multiqc_reports instanceof List) { + if (multiqc_reports.size() == 0) { + log.warn("[${workflow.manifest.name}] No reports found from process 'MULTIQC'") + return null + } else if (multiqc_reports.size() == 1) { + return multiqc_reports.first() + } else { + log.warn("[${workflow.manifest.name}] Found multiple reports from process 'MULTIQC', will use only one") + return multiqc_reports.first() + } + } else { + return null + } +} + +// +// Construct and send completion email +// +def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdir, monochrome_logs=true, multiqc_report=null) { + + // Set up the e-mail variables + def subject = "[${workflow.manifest.name}] Successful: ${workflow.runName}" + if (!workflow.success) { + subject = "[${workflow.manifest.name}] FAILED: ${workflow.runName}" + } + + def summary = [:] + summary_params + .keySet() + .sort() + .each { group -> + summary << summary_params[group] + } + + def misc_fields = [:] + misc_fields['Date Started'] = workflow.start + misc_fields['Date Completed'] = workflow.complete + misc_fields['Pipeline script file path'] = workflow.scriptFile + misc_fields['Pipeline script hash ID'] = workflow.scriptId + if (workflow.repository) { + misc_fields['Pipeline repository Git URL'] = workflow.repository + } + if (workflow.commitId) { + misc_fields['Pipeline repository Git Commit'] = workflow.commitId + } + if (workflow.revision) { + misc_fields['Pipeline Git branch/tag'] = workflow.revision + } + misc_fields['Nextflow Version'] = workflow.nextflow.version + misc_fields['Nextflow Build'] = workflow.nextflow.build + misc_fields['Nextflow Compile Timestamp'] = workflow.nextflow.timestamp + + def email_fields = [:] + email_fields['version'] = getWorkflowVersion() + email_fields['runName'] = workflow.runName + email_fields['success'] = workflow.success + email_fields['dateComplete'] = workflow.complete + email_fields['duration'] = workflow.duration + email_fields['exitStatus'] = workflow.exitStatus + email_fields['errorMessage'] = (workflow.errorMessage ?: 'None') + email_fields['errorReport'] = (workflow.errorReport ?: 'None') + email_fields['commandLine'] = workflow.commandLine + email_fields['projectDir'] = workflow.projectDir + email_fields['summary'] = summary << misc_fields + + // On success try attach the multiqc report + def mqc_report = getSingleReport(multiqc_report) + + // Check if we are only sending emails on failure + def email_address = email + if (!email && email_on_fail && !workflow.success) { + email_address = email_on_fail + } + + // Render the TXT template + def engine = new groovy.text.GStringTemplateEngine() + def tf = new File("${workflow.projectDir}/assets/email_template.txt") + def txt_template = engine.createTemplate(tf).make(email_fields) + def email_txt = txt_template.toString() + + // Render the HTML template + def hf = new File("${workflow.projectDir}/assets/email_template.html") + def html_template = engine.createTemplate(hf).make(email_fields) + def email_html = html_template.toString() + + // Render the sendmail template + def max_multiqc_email_size = (params.containsKey('max_multiqc_email_size') ? params.max_multiqc_email_size : 0) as MemoryUnit + def smail_fields = [email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes()] + def sf = new File("${workflow.projectDir}/assets/sendmail_template.txt") + def sendmail_template = engine.createTemplate(sf).make(smail_fields) + def sendmail_html = sendmail_template.toString() + + // Send the HTML e-mail + def colors = logColours(monochrome_logs) as Map + if (email_address) { + try { + if (plaintext_email) { + new org.codehaus.groovy.GroovyException('Send plaintext e-mail, not HTML') + } + // Try to send HTML e-mail using sendmail + def sendmail_tf = new File(workflow.launchDir.toString(), ".sendmail_tmp.html") + sendmail_tf.withWriter { w -> w << sendmail_html } + ['sendmail', '-t'].execute() << sendmail_html + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Sent summary e-mail to ${email_address} (sendmail)-") + } + catch (Exception msg) { + log.debug(msg.toString()) + log.debug("Trying with mail instead of sendmail") + // Catch failures and try with plaintext + def mail_cmd = ['mail', '-s', subject, '--content-type=text/html', email_address] + mail_cmd.execute() << email_html + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Sent summary e-mail to ${email_address} (mail)-") + } + } + + // Write summary e-mail HTML to a file + def output_hf = new File(workflow.launchDir.toString(), ".pipeline_report.html") + output_hf.withWriter { w -> w << email_html } + nextflow.extension.FilesEx.copyTo(output_hf.toPath(), "${outdir}/pipeline_info/pipeline_report.html") + output_hf.delete() + + // Write summary e-mail TXT to a file + def output_tf = new File(workflow.launchDir.toString(), ".pipeline_report.txt") + output_tf.withWriter { w -> w << email_txt } + nextflow.extension.FilesEx.copyTo(output_tf.toPath(), "${outdir}/pipeline_info/pipeline_report.txt") + output_tf.delete() +} + +// +// Print pipeline summary on completion +// +def completionSummary(monochrome_logs=true) { + def colors = logColours(monochrome_logs) as Map + if (workflow.success) { + if (workflow.stats.ignoredCount == 0) { + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Pipeline completed successfully${colors.reset}-") + } + else { + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.yellow} Pipeline completed successfully, but with errored process(es) ${colors.reset}-") + } + } + else { + log.info("-${colors.purple}[${workflow.manifest.name}]${colors.red} Pipeline completed with errors${colors.reset}-") + } +} + +// +// Construct and send a notification to a web server as JSON e.g. Microsoft Teams and Slack +// +def imNotification(summary_params, hook_url) { + def summary = [:] + summary_params + .keySet() + .sort() + .each { group -> + summary << summary_params[group] + } + + def misc_fields = [:] + misc_fields['start'] = workflow.start + misc_fields['complete'] = workflow.complete + misc_fields['scriptfile'] = workflow.scriptFile + misc_fields['scriptid'] = workflow.scriptId + if (workflow.repository) { + misc_fields['repository'] = workflow.repository + } + if (workflow.commitId) { + misc_fields['commitid'] = workflow.commitId + } + if (workflow.revision) { + misc_fields['revision'] = workflow.revision + } + misc_fields['nxf_version'] = workflow.nextflow.version + misc_fields['nxf_build'] = workflow.nextflow.build + misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp + + def msg_fields = [:] + msg_fields['version'] = getWorkflowVersion() + msg_fields['runName'] = workflow.runName + msg_fields['success'] = workflow.success + msg_fields['dateComplete'] = workflow.complete + msg_fields['duration'] = workflow.duration + msg_fields['exitStatus'] = workflow.exitStatus + msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None') + msg_fields['errorReport'] = (workflow.errorReport ?: 'None') + msg_fields['commandLine'] = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "") + msg_fields['projectDir'] = workflow.projectDir + msg_fields['summary'] = summary << misc_fields + + // Render the JSON template + def engine = new groovy.text.GStringTemplateEngine() + // Different JSON depending on the service provider + // Defaults to "Adaptive Cards" (https://adaptivecards.io), except Slack which has its own format + def json_path = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json" + def hf = new File("${workflow.projectDir}/assets/${json_path}") + def json_template = engine.createTemplate(hf).make(msg_fields) + def json_message = json_template.toString() + + // POST + def post = new URL(hook_url).openConnection() + post.setRequestMethod("POST") + post.setDoOutput(true) + post.setRequestProperty("Content-Type", "application/json") + post.getOutputStream().write(json_message.getBytes("UTF-8")) + def postRC = post.getResponseCode() + if (!postRC.equals(200)) { + log.warn(post.getErrorStream().getText()) + } +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml b/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml new file mode 100644 index 00000000..d08d2434 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml @@ -0,0 +1,24 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "UTILS_NFCORE_PIPELINE" +description: Subworkflow with utility functions specific to the nf-core pipeline template +keywords: + - utility + - pipeline + - initialise + - version +components: [] +input: + - nextflow_cli_args: + type: list + description: | + Nextflow CLI positional arguments +output: + - success: + type: boolean + description: | + Dummy output to indicate success +authors: + - "@adamrtalbot" +maintainers: + - "@adamrtalbot" + - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test new file mode 100644 index 00000000..f117040c --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test @@ -0,0 +1,126 @@ + +nextflow_function { + + name "Test Functions" + script "../main.nf" + config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "utils_nfcore_pipeline" + tag "subworkflows/utils_nfcore_pipeline" + + test("Test Function checkConfigProvided") { + + function "checkConfigProvided" + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function checkProfileProvided") { + + function "checkProfileProvided" + + when { + function { + """ + input[0] = [] + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function without logColours") { + + function "logColours" + + when { + function { + """ + input[0] = true + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function with logColours") { + function "logColours" + + when { + function { + """ + input[0] = false + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) + } + } + + test("Test Function getSingleReport with a single file") { + function "getSingleReport" + + when { + function { + """ + input[0] = file(params.modules_testdata_base_path + '/generic/tsv/test.tsv', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert function.result.contains("test.tsv") } + ) + } + } + + test("Test Function getSingleReport with multiple files") { + function "getSingleReport" + + when { + function { + """ + input[0] = [ + file(params.modules_testdata_base_path + '/generic/tsv/test.tsv', checkIfExists: true), + file(params.modules_testdata_base_path + '/generic/tsv/network.tsv', checkIfExists: true), + file(params.modules_testdata_base_path + '/generic/tsv/expression.tsv', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert function.success }, + { assert function.result.contains("test.tsv") }, + { assert !function.result.contains("network.tsv") }, + { assert !function.result.contains("expression.tsv") } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap new file mode 100644 index 00000000..02c67014 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap @@ -0,0 +1,136 @@ +{ + "Test Function checkProfileProvided": { + "content": null, + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:03.360873" + }, + "Test Function checkConfigProvided": { + "content": [ + true + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:02:59.729647" + }, + "Test Function without logColours": { + "content": [ + { + "reset": "", + "bold": "", + "dim": "", + "underlined": "", + "blink": "", + "reverse": "", + "hidden": "", + "black": "", + "red": "", + "green": "", + "yellow": "", + "blue": "", + "purple": "", + "cyan": "", + "white": "", + "bblack": "", + "bred": "", + "bgreen": "", + "byellow": "", + "bblue": "", + "bpurple": "", + "bcyan": "", + "bwhite": "", + "ublack": "", + "ured": "", + "ugreen": "", + "uyellow": "", + "ublue": "", + "upurple": "", + "ucyan": "", + "uwhite": "", + "iblack": "", + "ired": "", + "igreen": "", + "iyellow": "", + "iblue": "", + "ipurple": "", + "icyan": "", + "iwhite": "", + "biblack": "", + "bired": "", + "bigreen": "", + "biyellow": "", + "biblue": "", + "bipurple": "", + "bicyan": "", + "biwhite": "" + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:17.969323" + }, + "Test Function with logColours": { + "content": [ + { + "reset": "\u001b[0m", + "bold": "\u001b[1m", + "dim": "\u001b[2m", + "underlined": "\u001b[4m", + "blink": "\u001b[5m", + "reverse": "\u001b[7m", + "hidden": "\u001b[8m", + "black": "\u001b[0;30m", + "red": "\u001b[0;31m", + "green": "\u001b[0;32m", + "yellow": "\u001b[0;33m", + "blue": "\u001b[0;34m", + "purple": "\u001b[0;35m", + "cyan": "\u001b[0;36m", + "white": "\u001b[0;37m", + "bblack": "\u001b[1;30m", + "bred": "\u001b[1;31m", + "bgreen": "\u001b[1;32m", + "byellow": "\u001b[1;33m", + "bblue": "\u001b[1;34m", + "bpurple": "\u001b[1;35m", + "bcyan": "\u001b[1;36m", + "bwhite": "\u001b[1;37m", + "ublack": "\u001b[4;30m", + "ured": "\u001b[4;31m", + "ugreen": "\u001b[4;32m", + "uyellow": "\u001b[4;33m", + "ublue": "\u001b[4;34m", + "upurple": "\u001b[4;35m", + "ucyan": "\u001b[4;36m", + "uwhite": "\u001b[4;37m", + "iblack": "\u001b[0;90m", + "ired": "\u001b[0;91m", + "igreen": "\u001b[0;92m", + "iyellow": "\u001b[0;93m", + "iblue": "\u001b[0;94m", + "ipurple": "\u001b[0;95m", + "icyan": "\u001b[0;96m", + "iwhite": "\u001b[0;97m", + "biblack": "\u001b[1;90m", + "bired": "\u001b[1;91m", + "bigreen": "\u001b[1;92m", + "biyellow": "\u001b[1;93m", + "biblue": "\u001b[1;94m", + "bipurple": "\u001b[1;95m", + "bicyan": "\u001b[1;96m", + "biwhite": "\u001b[1;97m" + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:21.714424" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test new file mode 100644 index 00000000..8940d32d --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test @@ -0,0 +1,29 @@ +nextflow_workflow { + + name "Test Workflow UTILS_NFCORE_PIPELINE" + script "../main.nf" + config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config" + workflow "UTILS_NFCORE_PIPELINE" + tag "subworkflows" + tag "subworkflows_nfcore" + tag "utils_nfcore_pipeline" + tag "subworkflows/utils_nfcore_pipeline" + + test("Should run without failures") { + + when { + workflow { + """ + input[0] = [] + """ + } + } + + then { + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match() } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap new file mode 100644 index 00000000..859d1030 --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap @@ -0,0 +1,19 @@ +{ + "Should run without failures": { + "content": [ + { + "0": [ + true + ], + "valid_config": [ + true + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-28T12:03:25.726491" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config new file mode 100644 index 00000000..d0a926bf --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config @@ -0,0 +1,9 @@ +manifest { + name = 'nextflow_workflow' + author = """nf-core""" + homePage = 'https://127.0.0.1' + description = """Dummy pipeline""" + nextflowVersion = '!>=23.04.0' + version = '9.9.9' + doi = 'https://doi.org/10.5281/zenodo.5070524' +} diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf new file mode 100644 index 00000000..ee4738c8 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -0,0 +1,74 @@ +// +// Subworkflow that uses the nf-schema plugin to validate parameters and render the parameter summary +// + +include { paramsSummaryLog } from 'plugin/nf-schema' +include { validateParameters } from 'plugin/nf-schema' +include { paramsHelp } from 'plugin/nf-schema' + +workflow UTILS_NFSCHEMA_PLUGIN { + + take: + input_workflow // workflow: the workflow object used by nf-schema to get metadata from the workflow + validate_params // boolean: validate the parameters + parameters_schema // string: path to the parameters JSON schema. + // this has to be the same as the schema given to `validation.parametersSchema` + // when this input is empty it will automatically use the configured schema or + // "${projectDir}/nextflow_schema.json" as default. This input should not be empty + // for meta pipelines + help // boolean: show help message + help_full // boolean: show full help message + show_hidden // boolean: show hidden parameters in help message + before_text // string: text to show before the help message and parameters summary + after_text // string: text to show after the help message and parameters summary + command // string: an example command of the pipeline + + main: + + if(help || help_full) { + help_options = [ + beforeText: before_text, + afterText: after_text, + command: command, + showHidden: show_hidden, + fullHelp: help_full, + ] + if(parameters_schema) { + help_options << [parametersSchema: parameters_schema] + } + log.info paramsHelp( + help_options, + params.help instanceof String ? params.help : "", + ) + exit 0 + } + + // + // Print parameter summary to stdout. This will display the parameters + // that differ from the default given in the JSON schema + // + + summary_options = [:] + if(parameters_schema) { + summary_options << [parametersSchema: parameters_schema] + } + log.info before_text + log.info paramsSummaryLog(summary_options, input_workflow) + log.info after_text + + // + // Validate the parameters using nextflow_schema.json or the schema + // given via the validation.parametersSchema configuration option + // + if(validate_params) { + validateOptions = [:] + if(parameters_schema) { + validateOptions << [parametersSchema: parameters_schema] + } + validateParameters(validateOptions) + } + + emit: + dummy_emit = true +} + diff --git a/subworkflows/nf-core/utils_nfschema_plugin/meta.yml b/subworkflows/nf-core/utils_nfschema_plugin/meta.yml new file mode 100644 index 00000000..f7d9f028 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/meta.yml @@ -0,0 +1,35 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "utils_nfschema_plugin" +description: Run nf-schema to validate parameters and create a summary of changed parameters +keywords: + - validation + - JSON schema + - plugin + - parameters + - summary +components: [] +input: + - input_workflow: + type: object + description: | + The workflow object of the used pipeline. + This object contains meta data used to create the params summary log + - validate_params: + type: boolean + description: Validate the parameters and error if invalid. + - parameters_schema: + type: string + description: | + Path to the parameters JSON schema. + This has to be the same as the schema given to the `validation.parametersSchema` config + option. When this input is empty it will automatically use the configured schema or + "${projectDir}/nextflow_schema.json" as default. The schema should not be given in this way + for meta pipelines. +output: + - dummy_emit: + type: boolean + description: Dummy emit to make nf-core subworkflows lint happy +authors: + - "@nvnieuwk" +maintainers: + - "@nvnieuwk" diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test new file mode 100644 index 00000000..c977917a --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test @@ -0,0 +1,173 @@ +nextflow_workflow { + + name "Test Subworkflow UTILS_NFSCHEMA_PLUGIN" + script "../main.nf" + workflow "UTILS_NFSCHEMA_PLUGIN" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/utils_nfschema_plugin" + tag "plugin/nf-schema" + + config "./nextflow.config" + + test("Should run nothing") { + + when { + + params { + test_data = '' + } + + workflow { + """ + validate_params = false + input[0] = workflow + input[1] = validate_params + input[2] = "" + input[3] = false + input[4] = false + input[5] = false + input[6] = "" + input[7] = "" + input[8] = "" + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should validate params") { + + when { + + params { + test_data = '' + outdir = null + } + + workflow { + """ + validate_params = true + input[0] = workflow + input[1] = validate_params + input[2] = "" + input[3] = false + input[4] = false + input[5] = false + input[6] = "" + input[7] = "" + input[8] = "" + """ + } + } + + then { + assertAll( + { assert workflow.failed }, + { assert workflow.stdout.any { it.contains('ERROR ~ Validation of pipeline parameters failed!') } } + ) + } + } + + test("Should run nothing - custom schema") { + + when { + + params { + test_data = '' + } + + workflow { + """ + validate_params = false + input[0] = workflow + input[1] = validate_params + input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + input[3] = false + input[4] = false + input[5] = false + input[6] = "" + input[7] = "" + input[8] = "" + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } + + test("Should validate params - custom schema") { + + when { + + params { + test_data = '' + outdir = null + } + + workflow { + """ + validate_params = true + input[0] = workflow + input[1] = validate_params + input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + input[3] = false + input[4] = false + input[5] = false + input[6] = "" + input[7] = "" + input[8] = "" + """ + } + } + + then { + assertAll( + { assert workflow.failed }, + { assert workflow.stdout.any { it.contains('ERROR ~ Validation of pipeline parameters failed!') } } + ) + } + } + + test("Should create a help message") { + + when { + + params { + test_data = '' + outdir = null + } + + workflow { + """ + validate_params = true + input[0] = workflow + input[1] = validate_params + input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + input[3] = true + input[4] = false + input[5] = false + input[6] = "Before" + input[7] = "After" + input[8] = "nextflow run test/test" + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } +} diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config new file mode 100644 index 00000000..8d8c7371 --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -0,0 +1,8 @@ +plugins { + id "nf-schema@2.5.1" +} + +validation { + parametersSchema = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + monochromeLogs = true +} diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json new file mode 100644 index 00000000..331e0d2f --- /dev/null +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/./master/nextflow_schema.json", + "title": ". pipeline parameters", + "description": "", + "type": "object", + "$defs": { + "input_output_options": { + "title": "Input/output options", + "type": "object", + "fa_icon": "fas fa-terminal", + "description": "Define where the pipeline should find input data and save output data.", + "required": ["outdir"], + "properties": { + "validate_params": { + "type": "boolean", + "description": "Validate parameters?", + "default": true, + "hidden": true + }, + "outdir": { + "type": "string", + "format": "directory-path", + "description": "The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.", + "fa_icon": "fas fa-folder-open" + }, + "test_data_base": { + "type": "string", + "default": "https://raw.githubusercontent.com/nf-core/test-datasets/modules", + "description": "Base for test data directory", + "hidden": true + }, + "test_data": { + "type": "string", + "description": "Fake test data param", + "hidden": true + } + } + }, + "generic_options": { + "title": "Generic options", + "type": "object", + "fa_icon": "fas fa-file-import", + "description": "Less common options for the pipeline, typically set in a config file.", + "help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.", + "properties": { + "help": { + "type": "boolean", + "description": "Display help text.", + "fa_icon": "fas fa-question-circle", + "hidden": true + }, + "version": { + "type": "boolean", + "description": "Display version and exit.", + "fa_icon": "fas fa-question-circle", + "hidden": true + }, + "logo": { + "type": "boolean", + "default": true, + "description": "Display nf-core logo in console output.", + "fa_icon": "fas fa-image", + "hidden": true + }, + "singularity_pull_docker_container": { + "type": "boolean", + "description": "Pull Singularity container from Docker?", + "hidden": true + }, + "publish_dir_mode": { + "type": "string", + "default": "copy", + "description": "Method used to save pipeline results to output directory.", + "help_text": "The Nextflow `publishDir` option specifies which intermediate files should be saved to the output directory. This option tells the pipeline what method should be used to move these files. See [Nextflow docs](https://www.nextflow.io/docs/latest/process.html#publishdir) for details.", + "fa_icon": "fas fa-copy", + "enum": ["symlink", "rellink", "link", "copy", "copyNoFollow", "move"], + "hidden": true + }, + "monochrome_logs": { + "type": "boolean", + "description": "Use monochrome_logs", + "hidden": true + } + } + } + }, + "allOf": [ + { + "$ref": "#/$defs/input_output_options" + }, + { + "$ref": "#/$defs/generic_options" + } + ] +} diff --git a/tests/.nftignore b/tests/.nftignore new file mode 100644 index 00000000..e128a128 --- /dev/null +++ b/tests/.nftignore @@ -0,0 +1,12 @@ +.DS_Store +multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt +multiqc/multiqc_data/multiqc.parquet +multiqc/multiqc_data/multiqc.log +multiqc/multiqc_data/multiqc_data.json +multiqc/multiqc_data/multiqc_sources.txt +multiqc/multiqc_data/multiqc_software_versions.txt +multiqc/multiqc_data/llms-full.txt +multiqc/multiqc_plots/{svg,pdf,png}/*.{svg,pdf,png} +multiqc/multiqc_report.html +fastqc/*_fastqc.{html,zip} +pipeline_info/*.{html,json,txt,yml} diff --git a/tests/default.nf.test b/tests/default.nf.test new file mode 100644 index 00000000..ea895f17 --- /dev/null +++ b/tests/default.nf.test @@ -0,0 +1,33 @@ +nextflow_pipeline { + + name "Test pipeline" + script "../main.nf" + tag "pipeline" + + test("-profile test") { + + when { + params { + outdir = "$outputDir" + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') + assertAll( + { assert workflow.success}, + { assert snapshot( + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we test pipelines on multiple Nextflow versions + removeNextflowVersion("$outputDir/pipeline_info/preprocessing_software_mqc_versions.yml"), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } +} diff --git a/tests/nextflow.config b/tests/nextflow.config new file mode 100644 index 00000000..5fa4a9fa --- /dev/null +++ b/tests/nextflow.config @@ -0,0 +1,14 @@ +/* +======================================================================================== + Nextflow config file for running nf-test tests +======================================================================================== +*/ + +// TODO nf-core: Specify any additional parameters here +// Or any resources requirements +params { + modules_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/' + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/preprocessing' +} + +aws.client.anonymous = true // fixes S3 access issues on self-hosted runners diff --git a/tower.yml b/tower.yml new file mode 100644 index 00000000..787aedfe --- /dev/null +++ b/tower.yml @@ -0,0 +1,5 @@ +reports: + multiqc_report.html: + display: "MultiQC HTML report" + samplesheet.csv: + display: "Auto-created samplesheet with collated metadata and FASTQ paths" diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf new file mode 100644 index 00000000..6a060472 --- /dev/null +++ b/workflows/preprocessing.nf @@ -0,0 +1,97 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ +include { FASTQC } from '../modules/nf-core/fastqc/main' +include { MULTIQC } from '../modules/nf-core/multiqc/main' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RUN MAIN WORKFLOW +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +workflow PREPROCESSING { + + take: + ch_samplesheet // channel: samplesheet read in from --input + main: + + ch_versions = Channel.empty() + ch_multiqc_files = Channel.empty() + // + // MODULE: Run FastQC + // + FASTQC ( + ch_samplesheet + ) + ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}) + ch_versions = ch_versions.mix(FASTQC.out.versions.first()) + + // + // Collate and save software versions + // + softwareVersionsToYAML(ch_versions) + .collectFile( + storeDir: "${params.outdir}/pipeline_info", + name: 'preprocessing_software_' + 'mqc_' + 'versions.yml', + sort: true, + newLine: true + ).set { ch_collated_versions } + + + // + // MODULE: MultiQC + // + ch_multiqc_config = Channel.fromPath( + "$projectDir/assets/multiqc_config.yml", checkIfExists: true) + ch_multiqc_custom_config = params.multiqc_config ? + Channel.fromPath(params.multiqc_config, checkIfExists: true) : + Channel.empty() + ch_multiqc_logo = params.multiqc_logo ? + Channel.fromPath(params.multiqc_logo, checkIfExists: true) : + Channel.empty() + + summary_params = paramsSummaryMap( + workflow, parameters_schema: "nextflow_schema.json") + ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) + ch_multiqc_files = ch_multiqc_files.mix( + ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + ch_multiqc_custom_methods_description = params.multiqc_methods_description ? + file(params.multiqc_methods_description, checkIfExists: true) : + file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) + ch_methods_description = Channel.value( + methodsDescriptionText(ch_multiqc_custom_methods_description)) + + ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) + ch_multiqc_files = ch_multiqc_files.mix( + ch_methods_description.collectFile( + name: 'methods_description_mqc.yaml', + sort: true + ) + ) + + MULTIQC ( + ch_multiqc_files.collect(), + ch_multiqc_config.toList(), + ch_multiqc_custom_config.toList(), + ch_multiqc_logo.toList(), + [], + [] + ) + + emit:multiqc_report = MULTIQC.out.report.toList() // channel: /path/to/multiqc_report.html + versions = ch_versions // channel: [ path(versions.yml) ] + +} + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + THE END +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ From 86c028ff63fa62df231facc838607f7738fa59f6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 13 Nov 2025 16:58:02 +0100 Subject: [PATCH 026/202] fix issues introduced with the template sync --- main.nf | 3 ++ nextflow.config | 10 ++--- nextflow_schema.json | 39 ++++++++++++++++--- .../main.nf | 9 ++--- 4 files changed, 43 insertions(+), 18 deletions(-) diff --git a/main.nf b/main.nf index 72c1d99a..ee3fa058 100644 --- a/main.nf +++ b/main.nf @@ -34,6 +34,9 @@ workflow { args, params.outdir, params.input, + params.help, + params.help_full, + params.show_hidden, ) // diff --git a/nextflow.config b/nextflow.config index 998a8d09..d8a643ce 100644 --- a/nextflow.config +++ b/nextflow.config @@ -15,7 +15,7 @@ params { // References genome = null - igenomes_base = 's3://ngi-igenomes/igenomes/' + igenomes_base = '/references/' igenomes_ignore = false // Analysis options @@ -70,6 +70,9 @@ params { // Load base.config by default for all pipelines includeConfig 'conf/base.config' +// Load igenomes.config if required +includeConfig !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ignored.config' + profiles { debug { dumpHashes = true @@ -184,8 +187,6 @@ profiles { test_full { includeConfig 'conf/test_full.config' } } -// Set AWS client to anonymous when using the default igenomes_base -aws.client.anonymous = !params.igenomes_ignore && params.igenomes_base?.startsWith('s3://ngi-igenomes/igenomes/') ?: false // Load nf-core custom profiles from different institutions // If params.custom_config_base is set AND either the NXF_OFFLINE environment variable is not set or params.custom_config_base is a local path, the nfcore_custom.config file from the specified base path is included. @@ -206,9 +207,6 @@ podman.registry = 'quay.io' singularity.registry = 'quay.io' charliecloud.registry = 'quay.io' -// Load igenomes.config if required -includeConfig !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ignored.config' - // Export these variables to prevent local Python/R libraries from conflicting with those in the container // The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container. // See https://apeltzer.github.io/post/03-julia-lang-nextflow/ for details on that. Once we have a common agreement on where to keep Julia packages, this is adjustable. diff --git a/nextflow_schema.json b/nextflow_schema.json index 266484fe..f1f0fe72 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -173,12 +173,6 @@ "description": "Less common options for the pipeline, typically set in a config file.", "help_text": "These options are common to all nf-core pipelines and allow you to customise some of the core preferences for how the pipeline runs.\n\nTypically these options would be set in a Nextflow config file loaded for all pipeline runs, such as `~/.nextflow/config`.", "properties": { - "help": { - "type": "boolean", - "description": "Display help text.", - "fa_icon": "fas fa-question-circle", - "hidden": true - }, "version": { "type": "boolean", "description": "Display version and exit.", @@ -253,6 +247,39 @@ "default": true, "fa_icon": "fas fa-check-square", "hidden": true + }, + "pipelines_testdata_base_path": { + "type": "string", + "fa_icon": "far fa-check-circle", + "description": "Base URL or local path to location of pipeline test dataset files", + "default": "https://raw.githubusercontent.com/nf-core/test-datasets/", + "hidden": true + }, + "trace_report_suffix": { + "type": "string", + "fa_icon": "far calendar", + "description": "Suffix to add to the trace report filename. Default is the date and time in the format yyyy-MM-dd_HH-mm-ss.", + "hidden": true + }, + "help": { + "type": ["boolean", "string"], + "description": "Display the help message." + }, + "help_full": { + "type": "boolean", + "description": "Display the full detailed help message." + }, + "show_hidden": { + "type": "boolean", + "description": "Display hidden parameters in the help message (only works when --help or --help_full are provided)." + }, + "igenomes_base": { + "type": "string", + "format": "directory-path", + "description": "Directory / URL base for iGenomes references.", + "fa_icon": "fas fa-cloud-download-alt", + "default": "/references/", + "hidden": true } } } diff --git a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf index fb156013..5d8dfa37 100644 --- a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf @@ -29,7 +29,6 @@ workflow PIPELINE_INITIALISATION { take: version // boolean: Display version and exit validate_params // boolean: Boolean whether to validate parameters against the schema at runtime - monochrome_logs // boolean: Do not use coloured log outputs nextflow_cli_args // array: List of positional nextflow CLI args outdir // string: The output directory where the results will be saved input // string: Path to input samplesheet @@ -168,11 +167,9 @@ def validateInputSamplesheet(input) { // // Get attribute from genome config file e.g. fasta // -def getGenomeAttribute(attribute) { - if (params.genomes && params.genome && params.genomes.containsKey(params.genome)) { - if (params.genomes[ params.genome ].containsKey(attribute)) { - return params.genomes[ params.genome ][ attribute ] - } +def getGenomeAttribute(genomes, attribute) { + if (genomes && genomes.containsKey(attribute)) { + return genomes[ attribute ] } return null } From 9e66e71ce2060774bcf668218eea41d947735b4c Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 13 Nov 2025 17:00:27 +0100 Subject: [PATCH 027/202] Channel -> channel --- subworkflows/local/bam_qc/main.nf | 2 +- subworkflows/local/coverage/main.nf | 4 ++-- subworkflows/local/fastq_align_rna/main.nf | 6 +++--- subworkflows/local/fastq_to_aligned_cram/main.nf | 6 +++--- .../local/fastq_to_unaligned_cram/main.nf | 2 +- .../utils_nfcore_preprocessing_pipeline/main.nf | 4 ++-- subworkflows/nf-core/fastq_align_dna/main.nf | 8 ++++---- .../nf-core/utils_nextflow_pipeline/main.nf | 4 ++-- .../nf-core/utils_nfcore_pipeline/main.nf | 2 +- workflows/preprocessing.nf | 16 ++++++++-------- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index f779364e..bd2cc469 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -14,7 +14,7 @@ workflow BAM_QC { disable_picard // boolean main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_bam_bai_roi_fasta_fai_dict .map { meta, bam, bai, _roi, fasta, _fai, _dict -> diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index d59ace12..7ff19c7f 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -12,8 +12,8 @@ workflow COVERAGE { main: - ch_versions = Channel.empty() - ch_coverageqc_files = Channel.empty() + ch_versions = channel.empty() + ch_coverageqc_files = channel.empty() MOSDEPTH( ch_meta_cram_crai_fasta_fai_roi.map { meta, cram, crai, fasta, _fai, roi -> diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index 859ca5a3..03b9c585 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -12,9 +12,9 @@ workflow FASTQ_ALIGN_RNA { ch_reads_aligner_index_gtf // channel: [mandatory] reads, aligner, index, gtf main: - ch_bam = Channel.empty() - ch_reports = Channel.empty() - ch_versions = Channel.empty() + ch_bam = channel.empty() + ch_reports = channel.empty() + ch_versions = channel.empty() ch_reads_aligner_index_gtf .branch { meta, reads, aligner, index, gtf -> diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index 49199684..76ea8b63 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -24,8 +24,8 @@ workflow FASTQ_TO_CRAM { main: - ch_versions = Channel.empty() - ch_sormadup_metrics = Channel.empty() + ch_versions = channel.empty() + ch_sormadup_metrics = channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -93,7 +93,7 @@ workflow FASTQ_TO_CRAM { .set { ch_bam_fasta } ch_bam_fasta.dump(tag: "FASTQ_TO_CRAM: aligned bam per sample", pretty: true) - ch_markdup_index = Channel.empty() + ch_markdup_index = channel.empty() if (markdup == "bamsormadup") { // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta) diff --git a/subworkflows/local/fastq_to_unaligned_cram/main.nf b/subworkflows/local/fastq_to_unaligned_cram/main.nf index 1c458a2b..f1137f26 100644 --- a/subworkflows/local/fastq_to_unaligned_cram/main.nf +++ b/subworkflows/local/fastq_to_unaligned_cram/main.nf @@ -13,7 +13,7 @@ workflow FASTQ_TO_UCRAM { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf index 5d8dfa37..c66aaf01 100644 --- a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf @@ -38,7 +38,7 @@ workflow PIPELINE_INITIALISATION { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // Print version and exit if required and dump pipeline parameters to JSON file @@ -82,7 +82,7 @@ workflow PIPELINE_INITIALISATION { // // Create channel from input file provided through params.input // - Channel.fromList(samplesheetToList(input, "assets/schema_input.json")) + channel.fromList(samplesheetToList(input, "assets/schema_input.json")) .set { ch_samplesheet } emit: diff --git a/subworkflows/nf-core/fastq_align_dna/main.nf b/subworkflows/nf-core/fastq_align_dna/main.nf index e6636ae8..6239522f 100644 --- a/subworkflows/nf-core/fastq_align_dna/main.nf +++ b/subworkflows/nf-core/fastq_align_dna/main.nf @@ -20,10 +20,10 @@ workflow FASTQ_ALIGN_DNA { main: - ch_bam_index = Channel.empty() - ch_bam = Channel.empty() - ch_reports = Channel.empty() - ch_versions = Channel.empty() + ch_bam_index = channel.empty() + ch_bam = channel.empty() + ch_reports = channel.empty() + ch_versions = channel.empty() ch_reads_aligner_index_fasta.branch { meta, reads, aligner, index, fasta -> bowtie2 : aligner == 'bowtie2' diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index d6e593e8..0b4a6b60 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -36,7 +36,7 @@ workflow UTILS_NEXTFLOW_PIPELINE { // When running with Conda, warn if channels have not been set-up appropriately // if (check_conda_channels) { - checkCondaChannels() + checkCondachannels() } emit: @@ -84,7 +84,7 @@ def dumpParametersToJSON(outdir) { // // When running with -profile conda, warn if channels have not been set-up appropriately // -def checkCondaChannels() { +def checkCondachannels() { def parser = new org.yaml.snakeyaml.Yaml() def channels = [] try { diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index bfd25876..2f30e9a4 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -98,7 +98,7 @@ def workflowVersionToYAML() { // Get channel of software versions used in pipeline in YAML format // def softwareVersionsToYAML(ch_versions) { - return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML())) } // diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index c3e13fd3..0753d6b5 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -43,8 +43,8 @@ workflow PREPROCESSING { genelists // file: directory containing genelist bed files for coverage analysis main: - ch_versions = Channel.empty() - ch_multiqc_files = Channel.empty() + ch_versions = channel.empty() + ch_multiqc_files = channel.empty() ch_samplesheet .branch { meta, fastq_1, fastq_2, samplesheet, sampleinfo, flowcell -> @@ -59,7 +59,7 @@ workflow PREPROCESSING { roi = roi ? file(roi, checkIfExists: true) : null - genelists = genelists ? Channel.value(file(genelists + "/*.bed", checkIfExists: true)) : Channel.empty() + genelists = genelists ? channel.value(file(genelists + "/*.bed", checkIfExists: true)) : channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -453,13 +453,13 @@ workflow PREPROCESSING { // // MODULE: MultiQC // - ch_multiqc_config = Channel.fromPath("${projectDir}/assets/multiqc_config.yml", checkIfExists: true) - ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config, checkIfExists: true) : Channel.empty() - ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath(params.multiqc_logo, checkIfExists: true) : Channel.empty() + ch_multiqc_config = channel.fromPath("${projectDir}/assets/multiqc_config.yml", checkIfExists: true) + ch_multiqc_custom_config = params.multiqc_config ? channel.fromPath(params.multiqc_config, checkIfExists: true) : channel.empty() + ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") - ch_workflow_summary = Channel.value(paramsSummaryMultiqc(summary_params)) + ch_workflow_summary = channel.value(paramsSummaryMultiqc(summary_params)) ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) - ch_methods_description = Channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) + ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) From 24166c03d3234c86ba8b8f636c81cf64cb626fbe Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 13 Nov 2025 17:17:35 +0100 Subject: [PATCH 028/202] lint issues + module updates --- conf/modules.config | 12 +- modules.json | 9 +- modules/nf-core/md5sum/environment.yml | 9 +- modules/nf-core/md5sum/main.nf | 29 ++--- modules/nf-core/md5sum/meta.yml | 28 +++-- .../nf-core/md5sum/tests/main.nf.test.snap | 70 +++++------ modules/nf-core/md5sum/tests/tags.yml | 2 - modules/nf-core/star/align/environment.yml | 2 + modules/nf-core/star/align/meta.yml | 117 +++++++++++------- modules/nf-core/star/align/star-align.diff | 1 - modules/nf-core/star/align/tests/tags.yml | 2 - subworkflows/local/coverage/main.nf | 4 +- 12 files changed, 161 insertions(+), 124 deletions(-) delete mode 100644 modules/nf-core/md5sum/tests/tags.yml delete mode 100644 modules/nf-core/star/align/tests/tags.yml diff --git a/conf/modules.config b/conf/modules.config index 00f0f28e..512adf84 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -47,7 +47,7 @@ process { label = "process_medium" ext.args = { [ - meta.readgroup ? "--rg-line \"@RG\t" + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join("\t") + "\"" : "", + meta.readgroup ? "--rg-line \"@RG\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\t") + "\"" : "", "--output-fmt cram", "--output-fmt-option archive", ].join(" ").trim() @@ -72,7 +72,7 @@ process { "--local", "--fast-local", meta.readgroup ? "--rg-id ${meta.readgroup.ID}" : "", - meta.readgroup ? "--rg " + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join(" --rg ") : "", + meta.readgroup ? "--rg " + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join(" --rg ") : "", ].join(" ").trim() } ext.args2 = "--fast" @@ -87,7 +87,7 @@ process { "-v 3", "-Y", "-c 250", - meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join("\\t") + "\"" : "", + meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : "", ].join(" ").trim() } ext.args2 = "--fast" @@ -97,7 +97,7 @@ process { withName: DRAGMAP_ALIGN { ext.args = { [ - meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join("\\t") + "\"" : "" + meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : "" ].join(" ").trim() } ext.args2 = "--fast" @@ -122,7 +122,7 @@ process { "-S id", "-sa", "-xf 2", - meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults { it.value?.trim() ? "${it.key}:${it.value}" : null }.join("\\t") + "\"" : "", + meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : "", ].join(" ").trim() } } @@ -137,7 +137,7 @@ process { "--outSAMattributes All", "--chimSegmentMin 20", "--outFilterMismatchNmax 4", - meta.readgroup ? "--outSAMattrRGline \"ID:${meta.readgroup.ID}" + meta.readgroup.findResults { it.value?.trim() && it.key != "ID" ? "${it.key}:${it.value}" : null }.join(" ") + "\"" : "", + meta.readgroup ? "--outSAMattrRGline \"ID:${meta.readgroup.ID}" + meta.readgroup.findResults { rg -> rg.value?.trim() && rg.key != "ID" ? "${rg.key}:${rg.value}" : null }.join(" ") + "\"" : "", ].join(" ").trim() } } diff --git a/modules.json b/modules.json index 9b8eb350..3deb83d8 100644 --- a/modules.json +++ b/modules.json @@ -51,9 +51,14 @@ "installed_by": ["modules"], "patch": "modules/nf-core/fastp/fastp.diff" }, + "fastqc": { + "branch": "master", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "installed_by": ["modules"] + }, "md5sum": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] }, "mosdepth": { @@ -144,7 +149,7 @@ }, "star/align": { "branch": "master", - "git_sha": "3c259f0ac1ed9ae3f6b835461d054edffc60120e", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" } diff --git a/modules/nf-core/md5sum/environment.yml b/modules/nf-core/md5sum/environment.yml index c7eb9bd1..9b926b1f 100644 --- a/modules/nf-core/md5sum/environment.yml +++ b/modules/nf-core/md5sum/environment.yml @@ -1,5 +1,12 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda 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/md5sum/main.nf b/modules/nf-core/md5sum/main.nf index d77bb8ce..ea8cffed 100644 --- a/modules/nf-core/md5sum/main.nf +++ b/modules/nf-core/md5sum/main.nf @@ -1,11 +1,11 @@ process MD5SUM { - 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(files) @@ -13,30 +13,32 @@ process MD5SUM { output: tuple val(meta), path("*.md5"), emit: checksum - path "versions.yml" , emit: versions + 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}" // will only use when as_separate_files = false - if ( as_separate_files ) { + def prefix = task.ext.prefix ?: "${meta.id}" + // will only use when as_separate_files = false + if (as_separate_files) { """ find -L * -maxdepth 0 -type f \\ ! -name '*.md5' \\ - -exec sh -c 'md5sum $args "\$1" > "\$1.md5"' _ "{}" \\; + -exec sh -c 'md5sum ${args} "\$1" > "\$1.md5"' _ "{}" \\; cat <<-END_VERSIONS > versions.yml "${task.process}": md5sum: \$( md5sum --version | sed '1!d; s/.* //' ) END_VERSIONS """ - } else { + } + else { """ find -L * -type f \\ ! -name '*.md5' \\ - -exec md5sum $args "{}" + \\ + -exec md5sum ${args} "{}" + \\ > ${prefix}.md5 cat <<-END_VERSIONS > versions.yml @@ -47,9 +49,8 @@ process MD5SUM { } stub: - def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - if ( as_separate_files ) { + if (as_separate_files) { """ find -L * -type f \\ ! -name '*.md5' \\ @@ -60,7 +61,8 @@ process MD5SUM { md5sum: \$( md5sum --version | sed '1!d; s/.* //' ) END_VERSIONS """ - } else { + } + else { """ touch ${prefix}.md5 @@ -70,5 +72,4 @@ process MD5SUM { END_VERSIONS """ } - } diff --git a/modules/nf-core/md5sum/meta.yml b/modules/nf-core/md5sum/meta.yml index 363d763f..c1f7e36d 100644 --- a/modules/nf-core/md5sum/meta.yml +++ b/modules/nf-core/md5sum/meta.yml @@ -21,14 +21,15 @@ input: type: file description: Any number of files. One md5sum file will be generated for each. pattern: "*.*" - - - as_separate_files: - type: boolean - description: | - If true, each file will have its own md5sum file. If false, all files will be - checksummed into a single md5sum file. + ontologies: [] + - as_separate_files: + type: boolean + description: | + If true, each file will have its own md5sum file. If false, all files will be + checksummed into a single md5sum file. output: - - checksum: - - meta: + checksum: + - - meta: type: map description: | Groovy Map containing sample information @@ -37,11 +38,14 @@ output: type: file description: File containing checksum pattern: "*.md5" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@matthdsm" maintainers: diff --git a/modules/nf-core/md5sum/tests/main.nf.test.snap b/modules/nf-core/md5sum/tests/main.nf.test.snap index cd7593b4..20b59b0b 100644 --- a/modules/nf-core/md5sum/tests/main.nf.test.snap +++ b/modules/nf-core/md5sum/tests/main.nf.test.snap @@ -14,7 +14,7 @@ ] ], "1": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ], "checksum": [ [ @@ -28,15 +28,15 @@ ] ], "versions": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-01T11:05:22.111018419" + "timestamp": "2024-12-13T11:49:35.159607272" }, "md5sum on paired fastq, separate": { "content": [ @@ -53,7 +53,7 @@ ] ], "1": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ], "checksum": [ [ @@ -67,15 +67,15 @@ ] ], "versions": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-01T11:05:12.083864677" + "timestamp": "2024-12-13T11:49:27.200164144" }, "md5sum on hello.txt - stub": { "content": [ @@ -89,7 +89,7 @@ ] ], "1": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ], "checksum": [ [ @@ -100,15 +100,15 @@ ] ], "versions": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-01T11:04:42.230073228" + "timestamp": "2024-12-13T11:49:01.643624698" }, "md5sum on hello.txt": { "content": [ @@ -122,7 +122,7 @@ ] ], "1": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ], "checksum": [ [ @@ -133,15 +133,15 @@ ] ], "versions": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-01T11:04:22.089948509" + "timestamp": "2024-12-13T11:48:47.201714961" }, "md5sum on paired fastq, combined": { "content": [ @@ -155,7 +155,7 @@ ] ], "1": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ], "checksum": [ [ @@ -166,15 +166,15 @@ ] ], "versions": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-01T11:04:52.085480359" + "timestamp": "2024-12-13T11:49:10.207550973" }, "md5sum on paired fastq, combined - stub": { "content": [ @@ -188,7 +188,7 @@ ] ], "1": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ], "checksum": [ [ @@ -199,15 +199,15 @@ ] ], "versions": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-01T11:05:01.935454952" + "timestamp": "2024-12-13T11:49:18.36682418" }, "md5sum on hello.txt (BSD-style)": { "content": [ @@ -221,7 +221,7 @@ ] ], "1": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ], "checksum": [ [ @@ -232,14 +232,14 @@ ] ], "versions": [ - "versions.yml:md5,5745fe6b917070b6158ade64fcb4aa91" + "versions.yml:md5,792d39a2c683575fc644e1bb9087fa5f" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "24.10.2" }, - "timestamp": "2024-07-01T11:04:32.078323542" + "timestamp": "2024-12-13T11:48:54.672060206" } } \ No newline at end of file diff --git a/modules/nf-core/md5sum/tests/tags.yml b/modules/nf-core/md5sum/tests/tags.yml deleted file mode 100644 index bb45d190..00000000 --- a/modules/nf-core/md5sum/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -md5sum: - - "modules/nf-core/md5sum/**" diff --git a/modules/nf-core/star/align/environment.yml b/modules/nf-core/star/align/environment.yml index 9ed1940f..91e37ae1 100644 --- a/modules/nf-core/star/align/environment.yml +++ b/modules/nf-core/star/align/environment.yml @@ -1,3 +1,5 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda diff --git a/modules/nf-core/star/align/meta.yml b/modules/nf-core/star/align/meta.yml index 5cfe763e..1ee46905 100644 --- a/modules/nf-core/star/align/meta.yml +++ b/modules/nf-core/star/align/meta.yml @@ -26,6 +26,7 @@ input: description: | List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. + ontologies: [] - - meta2: type: map description: | @@ -44,18 +45,19 @@ input: type: file description: Annotation GTF file pattern: "*.{gtf}" - - - star_ignore_sjdbgtf: - type: boolean - description: Ignore annotation GTF file - - - seq_platform: - type: string - description: Sequencing platform - - - seq_center: - type: string - description: Sequencing center + ontologies: [] + - star_ignore_sjdbgtf: + type: boolean + description: Ignore annotation GTF file + - seq_platform: + type: string + description: Sequencing platform + - seq_center: + type: string + description: Sequencing center output: - - log_final: - - meta: + log_final: + - - meta: type: map description: | Groovy Map containing sample information @@ -64,8 +66,9 @@ output: type: file description: STAR final log file pattern: "*Log.final.out" - - log_out: - - meta: + ontologies: [] + log_out: + - - meta: type: map description: | Groovy Map containing sample information @@ -74,8 +77,9 @@ output: type: file description: STAR lot out file pattern: "*Log.out" - - log_progress: - - meta: + ontologies: [] + log_progress: + - - meta: type: map description: | Groovy Map containing sample information @@ -84,13 +88,16 @@ output: type: file description: STAR log progress file pattern: "*Log.progress.out" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - - bam: - - meta: + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + bam: + - - meta: type: map description: | Groovy Map containing sample information @@ -99,8 +106,9 @@ output: type: file description: Output BAM file containing read alignments pattern: "*.{bam}" - - bam_sorted: - - meta: + ontologies: [] + bam_sorted: + - - meta: type: map description: | Groovy Map containing sample information @@ -109,8 +117,9 @@ output: type: file description: Sorted BAM file of read alignments (optional) pattern: "*sortedByCoord.out.bam" - - bam_sorted_aligned: - - meta: + ontologies: [] + bam_sorted_aligned: + - - meta: type: map description: | Groovy Map containing sample information @@ -119,8 +128,9 @@ output: type: file description: Sorted BAM file of read alignments (optional) pattern: "*.Aligned.sortedByCoord.out.bam" - - bam_transcript: - - meta: + ontologies: [] + bam_transcript: + - - meta: type: map description: | Groovy Map containing sample information @@ -129,8 +139,9 @@ output: type: file description: Output BAM file of transcriptome alignment (optional) pattern: "*toTranscriptome.out.bam" - - bam_unsorted: - - meta: + ontologies: [] + bam_unsorted: + - - meta: type: map description: | Groovy Map containing sample information @@ -139,8 +150,9 @@ output: type: file description: Unsorted BAM file of read alignments (optional) pattern: "*Aligned.unsort.out.bam" - - fastq: - - meta: + ontologies: [] + fastq: + - - meta: type: map description: | Groovy Map containing sample information @@ -149,8 +161,10 @@ output: type: file description: Unmapped FastQ files (optional) pattern: "*fastq.gz" - - tab: - - meta: + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + tab: + - - meta: type: map description: | Groovy Map containing sample information @@ -159,8 +173,10 @@ output: type: file description: STAR output tab file(s) (optional) pattern: "*.tab" - - spl_junc_tab: - - meta: + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + spl_junc_tab: + - - meta: type: map description: | Groovy Map containing sample information @@ -169,8 +185,10 @@ output: type: file description: STAR output splice junction tab file pattern: "*.SJ.out.tab" - - read_per_gene_tab: - - meta: + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + read_per_gene_tab: + - - meta: type: map description: | Groovy Map containing sample information @@ -179,8 +197,10 @@ output: type: file description: STAR output read per gene tab file pattern: "*.ReadsPerGene.out.tab" - - junction: - - meta: + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + junction: + - - meta: type: map description: | Groovy Map containing sample information @@ -189,19 +209,20 @@ output: type: file description: STAR chimeric junction output file (optional) pattern: "*.out.junction" - - sam: - - meta: + ontologies: [] + sam: + - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - pattern: "*.out.sam" - "*.out.sam": type: file description: STAR output SAM file(s) (optional) pattern: "*.out.sam" - - wig: - - meta: + ontologies: [] + wig: + - - meta: type: map description: | Groovy Map containing sample information @@ -210,8 +231,9 @@ output: type: file description: STAR output wiggle format file(s) (optional) pattern: "*.wig" - - bedgraph: - - meta: + ontologies: [] + bedgraph: + - - meta: type: map description: | Groovy Map containing sample information @@ -220,6 +242,7 @@ output: type: file description: STAR output bedGraph format file(s) (optional) pattern: "*.bg" + ontologies: [] authors: - "@kevinmenden" - "@drpatelh" diff --git a/modules/nf-core/star/align/star-align.diff b/modules/nf-core/star/align/star-align.diff index 93befc80..3502ee3b 100644 --- a/modules/nf-core/star/align/star-align.diff +++ b/modules/nf-core/star/align/star-align.diff @@ -26,7 +26,6 @@ Changes in 'star/align/main.nf': 'modules/nf-core/star/align/environment.yml' is unchanged 'modules/nf-core/star/align/meta.yml' is unchanged -'modules/nf-core/star/align/tests/tags.yml' is unchanged 'modules/nf-core/star/align/tests/nextflow.starfusion.config' is unchanged 'modules/nf-core/star/align/tests/main.nf.test' is unchanged 'modules/nf-core/star/align/tests/nextflow.arriba.config' is unchanged diff --git a/modules/nf-core/star/align/tests/tags.yml b/modules/nf-core/star/align/tests/tags.yml deleted file mode 100644 index 8beace16..00000000 --- a/modules/nf-core/star/align/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -star/align: - - modules/nf-core/star/align/** diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 7ff19c7f..27a19c43 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -39,8 +39,8 @@ workflow COVERAGE { genelists = [genelists] } def filtered_genelists = meta.tag.toLowerCase() == "seqcap" - ? genelists.findAll { it.name.toLowerCase().contains("seqcap") } - : genelists.findAll { !it.name.toLowerCase().contains("seqcap") } + ? genelists.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } + : genelists.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } if (filtered_genelists.size() > 0) { return [ From c0444d0be0196a4dfe182e833807482bc44b9d4f Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 19 Nov 2025 17:16:47 +0100 Subject: [PATCH 029/202] update star/align --- modules.json | 2 +- modules/nf-core/star/align/main.nf | 4 ++-- modules/nf-core/star/align/star-align.diff | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules.json b/modules.json index 3deb83d8..3ef41a0c 100644 --- a/modules.json +++ b/modules.json @@ -149,7 +149,7 @@ }, "star/align": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" } diff --git a/modules/nf-core/star/align/main.nf b/modules/nf-core/star/align/main.nf index d61ffdfa..034f91df 100644 --- a/modules/nf-core/star/align/main.nf +++ b/modules/nf-core/star/align/main.nf @@ -40,8 +40,8 @@ process STAR_ALIGN { prefix = task.ext.prefix ?: "${meta.id}" def reads1 = [] def reads2 = [] - meta.single_end ? [reads].flatten().each{reads1 << it} : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } - def ignore_gtf = gtf ? "--sjdbGTFfile $gtf" : "" + meta.single_end ? [reads].flatten().each{ read -> reads1 << read} : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } + def ignore_gtf = gtf ? "--sjdbGTFfile $gtf" : '' def seq_platform_arg = seq_platform ? "'PL:$seq_platform'" : "" def seq_center_arg = seq_center ? "'CN:$seq_center'" : "" attrRG = args.contains("--outSAMattrRGline") ? "" : "--outSAMattrRGline 'ID:$prefix' $seq_center_arg 'SM:$prefix' $seq_platform_arg" diff --git a/modules/nf-core/star/align/star-align.diff b/modules/nf-core/star/align/star-align.diff index 3502ee3b..019f65d6 100644 --- a/modules/nf-core/star/align/star-align.diff +++ b/modules/nf-core/star/align/star-align.diff @@ -17,9 +17,9 @@ Changes in 'star/align/main.nf': @@ -44,7 +41,7 @@ def reads1 = [] def reads2 = [] - meta.single_end ? [reads].flatten().each{reads1 << it} : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } + meta.single_end ? [reads].flatten().each{ read -> reads1 << read} : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } - def ignore_gtf = star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf" -+ def ignore_gtf = gtf ? "--sjdbGTFfile $gtf" : "" ++ def ignore_gtf = gtf ? "--sjdbGTFfile $gtf" : '' def seq_platform_arg = seq_platform ? "'PL:$seq_platform'" : "" def seq_center_arg = seq_center ? "'CN:$seq_center'" : "" attrRG = args.contains("--outSAMattrRGline") ? "" : "--outSAMattrRGline 'ID:$prefix' $seq_center_arg 'SM:$prefix' $seq_platform_arg" From 28c2be3fc2d581af2f19c4597c7a1a9adce3be7f Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 20 Nov 2025 16:47:00 +0100 Subject: [PATCH 030/202] fix as much linting as possible --- .nf-core.yml | 3 +++ .prettierignore | 1 + modules.json | 6 +++--- nextflow_schema.json | 13 +++++++++++++ ro-crate-metadata.json | 2 +- .../nf-core/utils_nextflow_pipeline/main.nf | 4 ++-- .../nf-core/utils_nextflow_pipeline/tests/tags.yml | 2 -- .../nf-core/utils_nfcore_pipeline/tests/tags.yml | 2 -- subworkflows/nf-core/utils_nfschema_plugin/main.nf | 1 - 9 files changed, 23 insertions(+), 11 deletions(-) delete mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml delete mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml diff --git a/.nf-core.yml b/.nf-core.yml index d565b189..d4ae7ba5 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -25,6 +25,9 @@ lint: - manifest.homePage template_strings: - bin/cmgg_genelists + nf_test_content: false + subworkflow_changes: + - fastq_align_dna nf_core_version: 3.4.1 repository_type: pipeline template: diff --git a/.prettierignore b/.prettierignore index edd29f01..2255e3e3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,4 +10,5 @@ testing/ testing* *.pyc bin/ +.nf-test/ ro-crate-metadata.json diff --git a/modules.json b/modules.json index 3ef41a0c..8474373b 100644 --- a/modules.json +++ b/modules.json @@ -169,17 +169,17 @@ }, "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "56372688d8979092cafbe0c5c3895b491166ca1c", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "1b6b9a3338d011367137808b49b923515080e3ba", + "git_sha": "271e7fc14eb1320364416d996fb077421f3faed2", "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["subworkflows"] } } diff --git a/nextflow_schema.json b/nextflow_schema.json index f1f0fe72..d6a4828f 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -280,6 +280,19 @@ "fa_icon": "fas fa-cloud-download-alt", "default": "/references/", "hidden": true + }, + "igenomes_ignore": { + "type": "boolean", + "description": "Do not load the iGenomes reference config.", + "fa_icon": "fas fa-ban", + "hidden": true, + "help_text": "Do not load `igenomes.config` when running the pipeline. You may choose this option if you observe clashes between custom parameters and those supplied in `igenomes.config`." + }, + "genome": { + "type": "string", + "description": "Name of iGenomes reference.", + "fa_icon": "fas fa-book", + "help_text": "If using a reference genome configured in the pipeline using iGenomes, use this parameter to give the ID for the reference. This is then used to build the full paths for all required reference genome files e.g. `--genome GRCh38`. \n\nSee the [nf-core website docs](https://nf-co.re/usage/reference_genomes) for more details." } } } diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index 35a2f1d3..d3e36bec 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -23,7 +23,7 @@ "@type": "Dataset", "creativeWorkStatus": "InProgress", "datePublished": "2025-11-13T15:11:21+00:00", - "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that ...\n\n\n\n\n1. Read QC ([`FastQC`](https://www.bioinformatics.babraham.ac.uk/projects/fastqc/))2. Present QC for raw reads ([`MultiQC`](http://multiqc.info/))\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\n\n\nNow, you can run the pipeline using:\n\n\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by Matthias De Smet, Nicolas Vannieuwkerke.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Citations\n\n\n\n\n\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/main/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that demultiplexes and aligns raw sequencing data.\nIt also performs basic QC and coverage analysis.\n\nThe pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.\n\nSteps inlcude:\n\n1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html)\n2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp)\n3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP) or [`snap`](https://github.com/amplab/snap) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq\n4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html)\n5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html)\n6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics)\n7. QC aggregation using [`multiqc`](https://multiqc.info/)\n\n![metro map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe full documentation can be found [here](docs/README.md)\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv` for fastq inputs:\n\n```csv\nid,samplename,organism,library,fastq_1,fastq_2\nsample1,sample1,Homo sapiens,Library_Name,reads1.fq.gz,reads2.fq.gz\n```\n\n`samplesheet.csv` for flowcell inputs:\n\n```csv\nid,samplesheet,lane,flowcell,sample_info\nflowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/path/to/sampleinfo.csv\n```\n\n`sampleinfo.csv` for use with flowcell inputs:\n\n```csv\nsamplename,library,organism,tag\nfc_sample1,test,Homo sapiens,WES\n```\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --igenomes_base /path/to/genomes \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by the CMGG ICT team.\n\n## Support\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf" diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index 0b4a6b60..d6e593e8 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -36,7 +36,7 @@ workflow UTILS_NEXTFLOW_PIPELINE { // When running with Conda, warn if channels have not been set-up appropriately // if (check_conda_channels) { - checkCondachannels() + checkCondaChannels() } emit: @@ -84,7 +84,7 @@ def dumpParametersToJSON(outdir) { // // When running with -profile conda, warn if channels have not been set-up appropriately // -def checkCondachannels() { +def checkCondaChannels() { def parser = new org.yaml.snakeyaml.Yaml() def channels = [] try { diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml b/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml deleted file mode 100644 index f8476112..00000000 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -subworkflows/utils_nextflow_pipeline: - - subworkflows/nf-core/utils_nextflow_pipeline/** diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml b/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml deleted file mode 100644 index ac8523c9..00000000 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -subworkflows/utils_nfcore_pipeline: - - subworkflows/nf-core/utils_nfcore_pipeline/** diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf index ee4738c8..acb39724 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/main.nf +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -71,4 +71,3 @@ workflow UTILS_NFSCHEMA_PLUGIN { emit: dummy_emit = true } - From 0efef0872d2ae75371ec5839c88be02f307a7c32 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 20 Nov 2025 17:11:44 +0100 Subject: [PATCH 031/202] bump nextflow to 25.10.0 --- .github/workflows/nf-test.yml | 6 +++--- README.md | 2 +- nextflow.config | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index c7448f3e..96b4ae4b 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -9,7 +9,7 @@ on: - "**/*.svg" release: types: [published] - workflow_dispatch: + workflow_dispatch: null # Cancel if a newer run is started concurrency: @@ -76,8 +76,8 @@ jobs: - isMain: false profile: "singularity" NXF_VER: - - "25.04.0" - - "latest-everything" + - 25.10.0 + - latest-everything env: NXF_ANSI_LOG: false TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.total_shards }} diff --git a/README.md b/README.md index c0293e61..7a23f1d2 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX) [![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) -[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/) +[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/) [![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) [![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) diff --git a/nextflow.config b/nextflow.config index d8a643ce..d9645896 100644 --- a/nextflow.config +++ b/nextflow.config @@ -273,7 +273,7 @@ manifest { description = """Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data.""" mainScript = 'main.nf' defaultBranch = 'main' - nextflowVersion = '!>=25.04.0' + nextflowVersion = '!>=25.10.0' version = '2.1.0dev' doi = '' } From c5b84484e7ed7693966b419b0a4dc1beceea088c Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 20 Nov 2025 17:17:45 +0100 Subject: [PATCH 032/202] patch subwf --- modules.json | 130 +++++++++++++----- .../fastq_align_dna/fastq_align_dna.diff | 110 +++++++++++++++ 2 files changed, 208 insertions(+), 32 deletions(-) create mode 100644 subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff diff --git a/modules.json b/modules.json index 8474373b..2d50f2d3 100644 --- a/modules.json +++ b/modules.json @@ -8,149 +8,204 @@ "bcl2fastq": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": ["bcl_demultiplex"] + "installed_by": [ + "bcl_demultiplex" + ] }, "bclconvert": { "branch": "master", "git_sha": "27cceb2eb8aa959d4a8819caab886386a59a3789", - "installed_by": ["bcl_demultiplex", "modules"] + "installed_by": [ + "bcl_demultiplex", + "modules" + ] }, "biobambam/bamsormadup": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff" }, "bowtie2/align": { "branch": "master", "git_sha": "8864afe586537bf562eac7b83349c26207f3cb4d", - "installed_by": ["fastq_align_dna", "modules"], + "installed_by": [ + "fastq_align_dna", + "modules" + ], "patch": "modules/nf-core/bowtie2/align/bowtie2-align.diff" }, "bwa/mem": { "branch": "master", "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/bwa/mem/bwa-mem.diff" }, "bwamem2/mem": { "branch": "master", "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, "dragmap/align": { "branch": "master", "git_sha": "8864afe586537bf562eac7b83349c26207f3cb4d", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, "fastp": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/fastp/fastp.diff" }, "fastqc": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "md5sum": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "mosdepth": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/mosdepth/mosdepth.diff" }, "multiqc": { "branch": "master", "git_sha": "471cf3ca1617271b9b6fea09ea2ebdee78b874de", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "picard/collecthsmetrics": { "branch": "master", "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff" }, "picard/collectmultiplemetrics": { "branch": "master", "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff" }, "picard/collectwgsmetrics": { "branch": "master", "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, "samtools/cat": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/cat/samtools-cat.diff" }, "samtools/convert": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/convert/samtools-convert.diff" }, "samtools/coverage": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, "samtools/flagstat": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/idxstats": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/import": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/sormadup": { "branch": "master", "git_sha": "38f3b0200093498b70ac2d63a83eac5642e3c873", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/sormadup/samtools-sormadup.diff" }, "samtools/sort": { "branch": "master", "git_sha": "b7800db9b069ed505db3f9d91b8c72faea9be17b", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "samtools/stats": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/stats/samtools-stats.diff" }, "snapaligner/align": { "branch": "master", "git_sha": "77bdd7e1047d2abe21ae8d89acc295ea553ecbae", - "installed_by": ["fastq_align_dna", "modules"], + "installed_by": [ + "fastq_align_dna", + "modules" + ], "patch": "modules/nf-core/snapaligner/align/snapaligner-align.diff" }, "star/align": { "branch": "master", "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/align/star-align.diff" } } @@ -160,30 +215,41 @@ "bcl_demultiplex": { "branch": "master", "git_sha": "1a0770da1cf5c5cd388bf888ba8798bc4d1fba56", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "fastq_align_dna": { "branch": "master", "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ], + "patch": "subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff" }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "271e7fc14eb1320364416d996fb077421f3faed2", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff b/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff new file mode 100644 index 00000000..44d24df2 --- /dev/null +++ b/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff @@ -0,0 +1,110 @@ +Changes in component 'nf-core/fastq_align_dna' +Changes in 'fastq_align_dna/main.nf': +--- subworkflows/nf-core/fastq_align_dna/main.nf ++++ subworkflows/nf-core/fastq_align_dna/main.nf +@@ -15,51 +15,59 @@ + + workflow FASTQ_ALIGN_DNA { + take: +- ch_reads // channel: [mandatory] meta, reads +- ch_aligner_index // channel: [mandatory] aligner index +- ch_fasta // channel: [mandatory] fasta file +- aligner // string: [mandatory] aligner [bowtie2, bwamem, bwamem2, dragmap, snap] +- sort // boolean: [mandatory] true -> sort, false -> don't sort ++ ch_reads_aligner_index_fasta // channel: [mandatory] reads, aligner, index, fasta ++ sort // boolean: [mandatory] true -> sort, false -> don't sort + + main: + +- ch_bam_index = Channel.empty() +- ch_bam = Channel.empty() +- ch_reports = Channel.empty() +- ch_versions = Channel.empty() ++ ch_bam_index = channel.empty() ++ ch_bam = channel.empty() ++ ch_reports = channel.empty() ++ ch_versions = channel.empty() ++ ++ ch_reads_aligner_index_fasta.branch { meta, reads, aligner, index, fasta -> ++ bowtie2 : aligner == 'bowtie2' ++ return [meta, reads, index, fasta] ++ bwamem : aligner == 'bwamem' ++ return [meta, reads, index, fasta] ++ bwamem2 : aligner == 'bwamem2' ++ return [meta, reads, index, fasta] ++ dragmap : aligner == 'dragmap' ++ return [meta, reads, index, fasta] ++ snap : aligner == 'snap' ++ return [meta, reads, index] ++ other : true ++ } ++ .set{ch_to_align} ++ ++ // Throw error for all samples with unsupported aligners ++ ch_to_align.other.map{ meta, _reads, aligner, _index, _fasta -> ++ error "Unsupported aligner ${aligner} for sample ${meta.id}" ++ } + + // Align fastq files to reference genome and (optionally) sort +- if (aligner == 'bowtie2') { +- BOWTIE2_ALIGN(ch_reads, ch_aligner_index, ch_fasta, false, sort) // if aligner is bowtie2 +- ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) +- ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions) +- } +- else if (aligner == 'bwamem'){ +- BWAMEM1_MEM (ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is bwa-mem +- ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) +- ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) +- ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions) +- } +- else if (aligner == 'bwamem2'){ +- BWAMEM2_MEM (ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is bwa-mem2 +- ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) +- ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions) +- } +- else if (aligner == 'dragmap'){ +- DRAGMAP_ALIGN(ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is dragmap +- ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) +- ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) +- ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions) +- } +- else if (aligner == 'snap'){ +- SNAP_ALIGN (ch_reads, ch_aligner_index) // If aligner is snap +- ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) +- ch_bam_index.mix(SNAP_ALIGN.out.bai) +- ch_versions = ch_versions.mix(SNAP_ALIGN.out.versions) +- } +- else { +- error "Unknown aligner: ${aligner}" +- } ++ BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) // if aligner is bowtie2 ++ ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) ++ ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions.first()) ++ ++ BWAMEM1_MEM (ch_to_align.bwamem, sort) // If aligner is bwa-mem ++ ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) ++ ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) ++ ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions.first()) ++ ++ BWAMEM2_MEM (ch_to_align.bwamem2, sort) // If aligner is bwa-mem2 ++ ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) ++ ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions.first()) ++ ++ DRAGMAP_ALIGN(ch_to_align.dragmap, sort) // If aligner is dragmap ++ ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) ++ ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) ++ ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions.first()) ++ ++ SNAP_ALIGN(ch_to_align.snap) // If aligner is snap ++ ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) ++ ch_bam_index.mix(SNAP_ALIGN.out.bai) ++ ch_versions = ch_versions.mix(SNAP_ALIGN.out.versions.first()) + + emit: + bam = ch_bam // channel: [ [meta], bam ] + +'subworkflows/nf-core/fastq_align_dna/meta.yml' is unchanged +'subworkflows/nf-core/fastq_align_dna/tests/main.nf.test' is unchanged +'subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap' is unchanged +'subworkflows/nf-core/fastq_align_dna/tests/nextflow.config' is unchanged +************************************************************ From a721f8b32159b854414742390609791668f95ade Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 13:26:43 +0100 Subject: [PATCH 033/202] remove old ci flow and add credentials to new one --- .github/workflows/ci.yml | 101 ---------------------------------- .github/workflows/nf-test.yml | 2 + 2 files changed, 2 insertions(+), 101 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 4902664d..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: nf-core CI -# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors -on: - push: - branches: - - dev - pull_request: - release: - types: [published] - -env: - NXF_ANSI_LOG: false - NFT_VER: "0.9.2" - NFT_WORKDIR: "~" - NFT_DIFF: "pdiff" - NFT_DIFF_ARGS: "--line-numbers --expand-tabs=2" - AWS_ACCESS_KEY_ID: ${{ secrets.UGENT_S3_ACCESS_KEY }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.UGENT_S3_SECRET_KEY }} - -concurrency: - group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" - cancel-in-progress: true - -jobs: - test: - name: ${{ matrix.tags }} ${{ matrix.profile }} NF-${{ matrix.NXF_VER }} - # Only run on push if this is the nf-core dev branch (merged PRs) - if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-cmgg/preprocessing') }}" - runs-on: ubuntu-latest - strategy: - matrix: - NXF_VER: - - "25.10.0" - tags: - - "modules/local/panelcoverage" - - "subworkflows/local/bam_qc" - - "subworkflows/local/coverage" - - "subworkflows/local/fastq_to_aligned_cram" - - "subworkflows/local/fastq_align_rna" - - "subworkflows/local/fastq_to_unaligned_cram" - - "workflows/preprocessing" - - "pipeline" - profile: - - "test,docker" - steps: - - name: Check out pipeline code - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - - name: Install Nextflow - uses: nf-core/setup-nextflow@v1 - with: - version: "${{ matrix.NXF_VER }}" - - - name: Disk space cleanup - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - - - uses: actions/setup-python@v4 - with: - python-version: "3.11" - architecture: "x64" - - - name: Install pdiff to see diff between nf-test snapshots - run: | - python -m pip install --upgrade pip - pip install pdiff - - - name: Cache nf-test installation - id: cache-software - uses: actions/cache@v3 - with: - path: | - /usr/local/bin/nf-test - /home/runner/.nf-test/nf-test.jar - key: ${{ runner.os }}-${{ env.NFT_VER }}-nftest - - - name: Install nf-test - if: steps.cache-software.outputs.cache-hit != 'true' - run: | - wget -qO- https://code.askimed.com/install/nf-test | bash - sudo mv nf-test /usr/local/bin/ - - - name: Run nf-test - run: | - nf-test test --verbose --tag "${{ matrix.tags }}" --profile "+${{ matrix.profile }}" --junitxml=test.xml --tap=test.tap - - - uses: pcolby/tap-summary@v1 - with: - path: >- - test.tap - - - name: Output log on failure - if: failure() - run: | - sudo apt install bat > /dev/null - batcat --decorations=always --color=always ${{ github.workspace }}/.nf-test/tests/*/meta/nextflow.log - - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3 - if: always() # always run even if the previous step fails - with: - report_paths: test.xml diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 96b4ae4b..2288a9b9 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -23,6 +23,8 @@ env: NXF_ANSI_LOG: false NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity + AWS_ACCESS_KEY_ID: ${{ secrets.UGENT_S3_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.UGENT_S3_SECRET_KEY }} jobs: nf-test-changes: From 2accfb1abadfd20c77a611cf44ea78e3d2d9fa49 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 13:29:10 +0100 Subject: [PATCH 034/202] pre commit --- modules.json | 129 +++++++++++++-------------------------------------- 1 file changed, 32 insertions(+), 97 deletions(-) diff --git a/modules.json b/modules.json index 2d50f2d3..99e26ff2 100644 --- a/modules.json +++ b/modules.json @@ -8,204 +8,149 @@ "bcl2fastq": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": [ - "bcl_demultiplex" - ] + "installed_by": ["bcl_demultiplex"] }, "bclconvert": { "branch": "master", "git_sha": "27cceb2eb8aa959d4a8819caab886386a59a3789", - "installed_by": [ - "bcl_demultiplex", - "modules" - ] + "installed_by": ["bcl_demultiplex", "modules"] }, "biobambam/bamsormadup": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff" }, "bowtie2/align": { "branch": "master", "git_sha": "8864afe586537bf562eac7b83349c26207f3cb4d", - "installed_by": [ - "fastq_align_dna", - "modules" - ], + "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/bowtie2/align/bowtie2-align.diff" }, "bwa/mem": { "branch": "master", "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwa/mem/bwa-mem.diff" }, "bwamem2/mem": { "branch": "master", "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, "dragmap/align": { "branch": "master", "git_sha": "8864afe586537bf562eac7b83349c26207f3cb4d", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, "fastp": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/fastp/fastp.diff" }, "fastqc": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "md5sum": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "mosdepth": { "branch": "master", "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/mosdepth/mosdepth.diff" }, "multiqc": { "branch": "master", "git_sha": "471cf3ca1617271b9b6fea09ea2ebdee78b874de", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "picard/collecthsmetrics": { "branch": "master", "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff" }, "picard/collectmultiplemetrics": { "branch": "master", "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff" }, "picard/collectwgsmetrics": { "branch": "master", "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, "samtools/cat": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/cat/samtools-cat.diff" }, "samtools/convert": { "branch": "master", "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/convert/samtools-convert.diff" }, "samtools/coverage": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, "samtools/flagstat": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/idxstats": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/import": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sormadup": { "branch": "master", "git_sha": "38f3b0200093498b70ac2d63a83eac5642e3c873", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sormadup/samtools-sormadup.diff" }, "samtools/sort": { "branch": "master", "git_sha": "b7800db9b069ed505db3f9d91b8c72faea9be17b", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "samtools/stats": { "branch": "master", "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/stats/samtools-stats.diff" }, "snapaligner/align": { "branch": "master", "git_sha": "77bdd7e1047d2abe21ae8d89acc295ea553ecbae", - "installed_by": [ - "fastq_align_dna", - "modules" - ], + "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/snapaligner/align/snapaligner-align.diff" }, "star/align": { "branch": "master", "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" } } @@ -215,41 +160,31 @@ "bcl_demultiplex": { "branch": "master", "git_sha": "1a0770da1cf5c5cd388bf888ba8798bc4d1fba56", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "fastq_align_dna": { "branch": "master", "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", - "installed_by": [ - "subworkflows" - ], + "installed_by": ["subworkflows"], "patch": "subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff" }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "271e7fc14eb1320364416d996fb077421f3faed2", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} From c23343b6e07966d61cf1e8fee5877b8780133307 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 14:00:24 +0100 Subject: [PATCH 035/202] fix rocrate --- ro-crate-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index d3e36bec..1bcdab89 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -23,7 +23,7 @@ "@type": "Dataset", "creativeWorkStatus": "InProgress", "datePublished": "2025-11-13T15:11:21+00:00", - "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that demultiplexes and aligns raw sequencing data.\nIt also performs basic QC and coverage analysis.\n\nThe pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.\n\nSteps inlcude:\n\n1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html)\n2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp)\n3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP) or [`snap`](https://github.com/amplab/snap) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq\n4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html)\n5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html)\n6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics)\n7. QC aggregation using [`multiqc`](https://multiqc.info/)\n\n![metro map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe full documentation can be found [here](docs/README.md)\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv` for fastq inputs:\n\n```csv\nid,samplename,organism,library,fastq_1,fastq_2\nsample1,sample1,Homo sapiens,Library_Name,reads1.fq.gz,reads2.fq.gz\n```\n\n`samplesheet.csv` for flowcell inputs:\n\n```csv\nid,samplesheet,lane,flowcell,sample_info\nflowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/path/to/sampleinfo.csv\n```\n\n`sampleinfo.csv` for use with flowcell inputs:\n\n```csv\nsamplename,library,organism,tag\nfc_sample1,test,Homo sapiens,WES\n```\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --igenomes_base /path/to/genomes \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by the CMGG ICT team.\n\n## Support\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that demultiplexes and aligns raw sequencing data.\nIt also performs basic QC and coverage analysis.\n\nThe pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.\n\nSteps inlcude:\n\n1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html)\n2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp)\n3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP) or [`snap`](https://github.com/amplab/snap) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq\n4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html)\n5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html)\n6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics)\n7. QC aggregation using [`multiqc`](https://multiqc.info/)\n\n![metro map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe full documentation can be found [here](docs/README.md)\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv` for fastq inputs:\n\n```csv\nid,samplename,organism,library,fastq_1,fastq_2\nsample1,sample1,Homo sapiens,Library_Name,reads1.fq.gz,reads2.fq.gz\n```\n\n`samplesheet.csv` for flowcell inputs:\n\n```csv\nid,samplesheet,lane,flowcell,sample_info\nflowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/path/to/sampleinfo.csv\n```\n\n`sampleinfo.csv` for use with flowcell inputs:\n\n```csv\nsamplename,library,organism,tag\nfc_sample1,test,Homo sapiens,WES\n```\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --igenomes_base /path/to/genomes \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by the CMGG ICT team.\n\n## Support\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf" From 9ed2cfa68605ae6e79840390a6cae36ab11acdb5 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 14:03:33 +0100 Subject: [PATCH 036/202] fix versions yaml name --- workflows/preprocessing.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 0753d6b5..68e017b1 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -447,7 +447,7 @@ workflow PREPROCESSING { // Collate and save software versions // softwareVersionsToYAML(ch_versions) - .collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'nf_core_pipeline_software_mqc_versions.yml', sort: true, newLine: true) + .collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'preprocessing_software_mqc_versions.yml', sort: true, newLine: true) .set { ch_collated_versions } // From 52beab73c7a20dd3b1cfc01fc4c47c6737c330db Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 14:09:42 +0100 Subject: [PATCH 037/202] remove template tests and add outdir to existing pipeline tests --- tests/default.nf.test | 33 --------------------------------- tests/main.nf.test | 2 ++ 2 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 tests/default.nf.test diff --git a/tests/default.nf.test b/tests/default.nf.test deleted file mode 100644 index ea895f17..00000000 --- a/tests/default.nf.test +++ /dev/null @@ -1,33 +0,0 @@ -nextflow_pipeline { - - name "Test pipeline" - script "../main.nf" - tag "pipeline" - - test("-profile test") { - - when { - params { - outdir = "$outputDir" - } - } - - then { - // stable_name: All files + folders in ${params.outdir}/ with a stable name - def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) - // stable_path: All files in ${params.outdir}/ with stable content - def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') - assertAll( - { assert workflow.success}, - { assert snapshot( - // pipeline versions.yml file for multiqc from which Nextflow version is removed because we test pipelines on multiple Nextflow versions - removeNextflowVersion("$outputDir/pipeline_info/preprocessing_software_mqc_versions.yml"), - // All stable path name, with a relative path - stable_name, - // All files with stable contents - stable_path - ).match() } - ) - } - } -} diff --git a/tests/main.nf.test b/tests/main.nf.test index 14b7f084..6eb6875a 100644 --- a/tests/main.nf.test +++ b/tests/main.nf.test @@ -14,6 +14,7 @@ nextflow_pipeline { input = "${projectDir}/tests/inputs/fastq.yml" aligner = "bwamem" igenomes_base = "s3://reference-data/genomes" + outdir = "$outputDir" } } @@ -30,6 +31,7 @@ nextflow_pipeline { input = "${projectDir}/tests/inputs/flowcell.yml" aligner = "bwamem" igenomes_base = "s3://reference-data/genomes" + outdir = "$outputDir" } } From 605fb67032f5a9cbbe69a1ad9cc2c70c2e57e383 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 14:14:03 +0100 Subject: [PATCH 038/202] nft-utils -> 0.0.7 --- nf-test.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nf-test.config b/nf-test.config index 3a1fff59..fa368ccb 100644 --- a/nf-test.config +++ b/nf-test.config @@ -19,6 +19,6 @@ config { // load the necessary plugins plugins { - load "nft-utils@0.0.3" + load "nft-utils@0.0.7" } } From 7a9272b5300bddd70f615241d8019fcff64f9736 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 14:42:17 +0100 Subject: [PATCH 039/202] fix snapshot --- tests/workflows/preprocessing.nf.test.snap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 8bd43a7e..36fadad2 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -618,11 +618,11 @@ "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,7b30e3b870fe318aeef6b4bffc51eb87", "versions.yml:md5,84a41fdb642c270c5f36846cd7d8f033", "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", "versions.yml:md5,ebdd9fe0c553612c66238375b920f178", "versions.yml:md5,fecf2763ae04725fa0ca7c995018dcea" @@ -633,7 +633,7 @@ "nf-test": "0.9.2", "nextflow": "25.10.0" }, - "timestamp": "2025-11-04T13:30:49.340803877" + "timestamp": "2025-11-21T14:24:42.558578431" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -944,10 +944,10 @@ "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,7b30e3b870fe318aeef6b4bffc51eb87", "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868" ] } @@ -956,7 +956,7 @@ "nf-test": "0.9.2", "nextflow": "25.10.0" }, - "timestamp": "2025-11-04T13:36:14.450163857" + "timestamp": "2025-11-21T14:29:48.196853611" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1491,11 +1491,11 @@ "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,7b30e3b870fe318aeef6b4bffc51eb87", "versions.yml:md5,84a41fdb642c270c5f36846cd7d8f033", "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", "versions.yml:md5,fecf2763ae04725fa0ca7c995018dcea" ] @@ -1505,6 +1505,6 @@ "nf-test": "0.9.2", "nextflow": "25.10.0" }, - "timestamp": "2025-11-04T13:34:27.74379172" + "timestamp": "2025-11-21T14:28:06.35129428" } } \ No newline at end of file From ecc43058201400ce957b605763a08ab2e60eda2c Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 14:49:56 +0100 Subject: [PATCH 040/202] rename main test file --- tests/{main.nf.test => default.nf.test} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{main.nf.test => default.nf.test} (100%) diff --git a/tests/main.nf.test b/tests/default.nf.test similarity index 100% rename from tests/main.nf.test rename to tests/default.nf.test From cf529ea671d8ba3887babc9cf67628833d9d41ee Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 21 Nov 2025 15:02:16 +0100 Subject: [PATCH 041/202] final linting fix --- .nf-core.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index d4ae7ba5..dc7ee414 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -14,6 +14,7 @@ lint: - docs/images/nf-core-preprocessing_logo_light.png - docs/images/nf-core-preprocessing_logo_dark.png - .github/ISSUE_TEMPLATE/bug_report.yml + - .github/PULL_REQUEST_TEMPLATE.md - docs/README.md - LICENSE merge_markers: @@ -26,8 +27,6 @@ lint: template_strings: - bin/cmgg_genelists nf_test_content: false - subworkflow_changes: - - fastq_align_dna nf_core_version: 3.4.1 repository_type: pipeline template: From 37d3c30d46ff1cafc3c85456c3d3a702680f1908 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:34:38 +0100 Subject: [PATCH 042/202] update bcl-convert config for gcp --- conf/modules.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 512adf84..750415bc 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -14,13 +14,13 @@ process { // BCL convert withName: BCLCONVERT { + cpus = 32 + memory = 64.GB ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", "--force", - "--bcl-num-parallel-tiles ${task.cpus}", - "--bcl-num-conversion-threads ${task.cpus}", - "--bcl-num-compression-threads ${task.cpus}", + "--strict", ].join(" ").trim() } } From 9c49fb1e8fafc5cf2623a1287076486699bffbac Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:48:05 +0100 Subject: [PATCH 043/202] add dynamic disk allocation --- conf/modules.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/modules.config b/conf/modules.config index 750415bc..97089065 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -16,6 +16,7 @@ process { withName: BCLCONVERT { cpus = 32 memory = 64.GB + disk = { 500.GB * task.attempt } ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", From 2d51974a2fbec03cd3ff97a89ebe09d85f3844b8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:17:19 +0100 Subject: [PATCH 044/202] increase mem --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 97089065..8a8a5c50 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -15,7 +15,7 @@ process { // BCL convert withName: BCLCONVERT { cpus = 32 - memory = 64.GB + memory = 128.GB disk = { 500.GB * task.attempt } ext.args = { [ From 8d95252a81f599f223a163a38e1b296936307af8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:20:12 +0100 Subject: [PATCH 045/202] fix linting --- .github/workflows/linting.yml | 6 +++--- .nf-core.yml | 2 +- .prettierignore | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 30e66026..7a527a34 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -11,7 +11,7 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - name: Set up Python 3.14 uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out pipeline code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - name: Install Nextflow uses: nf-core/setup-nextflow@v2 @@ -71,7 +71,7 @@ jobs: - name: Upload linting log file artifact if: ${{ always() }} - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: linting-logs path: | diff --git a/.nf-core.yml b/.nf-core.yml index dc7ee414..ea3d4a79 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -27,7 +27,7 @@ lint: template_strings: - bin/cmgg_genelists nf_test_content: false -nf_core_version: 3.4.1 +nf_core_version: 3.5.1 repository_type: pipeline template: author: Matthias De Smet, Nicolas Vannieuwkerke diff --git a/.prettierignore b/.prettierignore index 2255e3e3..dd749d43 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,3 +12,5 @@ testing* bin/ .nf-test/ ro-crate-metadata.json +modules/nf-core/ +subworkflows/nf-core/ From c21d91a6be0247d7accb125ada1bef20a1b79c8c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:39:00 +0100 Subject: [PATCH 046/202] bump bcl2fastq/bclconvert and subworkflow --- modules.json | 6 +- modules/nf-core/bcl2fastq/meta.yml | 89 +++-- modules/nf-core/bclconvert/Dockerfile | 4 +- modules/nf-core/bclconvert/main.nf | 59 ++- modules/nf-core/bclconvert/meta.yml | 92 ++--- modules/nf-core/bclconvert/tests/main.nf.test | 95 ++++- .../bclconvert/tests/main.nf.test.snap | 344 ++++++++++++++++-- .../nf-core/bclconvert/tests/nextflow.config | 11 +- .../bcl_demultiplex/tests/main.nf.test | 16 +- 9 files changed, 557 insertions(+), 159 deletions(-) diff --git a/modules.json b/modules.json index 99e26ff2..49345c50 100644 --- a/modules.json +++ b/modules.json @@ -7,12 +7,12 @@ "nf-core": { "bcl2fastq": { "branch": "master", - "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["bcl_demultiplex"] }, "bclconvert": { "branch": "master", - "git_sha": "27cceb2eb8aa959d4a8819caab886386a59a3789", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["bcl_demultiplex", "modules"] }, "biobambam/bamsormadup": { @@ -159,7 +159,7 @@ "nf-core": { "bcl_demultiplex": { "branch": "master", - "git_sha": "1a0770da1cf5c5cd388bf888ba8798bc4d1fba56", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["subworkflows"] }, "fastq_align_dna": { diff --git a/modules/nf-core/bcl2fastq/meta.yml b/modules/nf-core/bcl2fastq/meta.yml index a30a33ef..af17d591 100644 --- a/modules/nf-core/bcl2fastq/meta.yml +++ b/modules/nf-core/bcl2fastq/meta.yml @@ -21,80 +21,89 @@ input: type: file description: "Input samplesheet" pattern: "*.{csv}" + ontologies: + - edam: http://edamontology.org/format_3752 # CSV - run_dir: type: file description: | Input run directory containing RunInfo.xml and BCL data Could be a directory or a tar of the directory + ontologies: [] output: - - fastq: - - meta: - type: file - description: Demultiplexed sample FASTQ files - pattern: "**_S*_L00?_R?_00?.fastq.gz" + fastq: + - - meta: + type: map + description: Groovy Map containing sample information - output/**_S[1-9]*_R?_00?.fastq.gz: type: file description: Demultiplexed sample FASTQ files pattern: "**_S*_L00?_R?_00?.fastq.gz" - - fastq_idx: - - meta: - type: file - description: Optional demultiplexed index FASTQ files - pattern: "**_S*_L00?_I?_00?.fastq.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + fastq_idx: + - - meta: + type: map + description: Groovy Map containing sample information - output/**_S[1-9]*_I?_00?.fastq.gz: type: file description: Optional demultiplexed index FASTQ files pattern: "**_S*_L00?_I?_00?.fastq.gz" - - undetermined: - - meta: - type: file - description: Optional undetermined sample FASTQ files - pattern: "Undetermined_S0_L00?_R?_00?.fastq.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + undetermined: + - - meta: + type: map + description: Groovy Map containing sample information - output/**Undetermined_S0*_R?_00?.fastq.gz: type: file description: Optional undetermined sample FASTQ files pattern: "Undetermined_S0_L00?_R?_00?.fastq.gz" - - undetermined_idx: - - meta: - type: file - description: Optional undetermined index FASTQ files - pattern: "Undetermined_S0_L00?_I?_00?.fastq.gz" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + undetermined_idx: + - - meta: + type: map + description: Groovy Map containing sample information - output/**Undetermined_S0*_I?_00?.fastq.gz: type: file description: Optional undetermined index FASTQ files pattern: "Undetermined_S0_L00?_I?_00?.fastq.gz" - - reports: - - meta: - type: file - description: Demultiplexing Reports - pattern: "Reports/*" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + reports: + - - meta: + type: map + description: Groovy Map containing sample information - output/Reports: type: file description: Demultiplexing Reports pattern: "Reports/*" - - stats: - - meta: - type: file - description: Statistics files - pattern: "Stats/*" + ontologies: [] + stats: + - - meta: + type: map + description: Groovy Map containing sample information - output/Stats: type: file description: Statistics files pattern: "Stats/*" - - interop: - - meta: - type: file - description: Interop files - pattern: "*.{bin}" + ontologies: [] + interop: + - - meta: + type: map + description: Groovy Map containing sample information - InterOp/*.bin: type: file description: Interop files pattern: "*.{bin}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@matthdsm" maintainers: diff --git a/modules/nf-core/bclconvert/Dockerfile b/modules/nf-core/bclconvert/Dockerfile index 441ebc2f..eda84168 100644 --- a/modules/nf-core/bclconvert/Dockerfile +++ b/modules/nf-core/bclconvert/Dockerfile @@ -3,7 +3,7 @@ # Push to nfcore/bclconvert: FROM debian:bullseye-slim -ARG BCLCONVERT_VERSION="4.3.13" +ARG BCLCONVERT_VERSION="4.4.6" LABEL org.opencontainers.image.description="Docker image containing bcl-convert" LABEL org.opencontainers.image.version="$BCLCONVERT_VERSION" LABEL org.opencontainers.image.documentation="https://github.com/nf-core/modules/blob/master/modules/nf-core/bclconvert/README.md" @@ -24,7 +24,7 @@ RUN apt-get update \ # Link hostname cmd to fix hardcoded path RUN ln -s /bin/hostname /usr/bin/hostname # Install bcl-convert -ADD bcl-convert-4.3.13-2.el7.x86_64.rpm bcl-convert.rpm +COPY bcl-convert-4.4.6-2.el8.x86_64.rpm bcl-convert.rpm SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN rpm2cpio bcl-convert.rpm | cpio -idmv \ && rm bcl-convert.rpm diff --git a/modules/nf-core/bclconvert/main.nf b/modules/nf-core/bclconvert/main.nf index a9bc0197..82ad6b19 100644 --- a/modules/nf-core/bclconvert/main.nf +++ b/modules/nf-core/bclconvert/main.nf @@ -2,20 +2,20 @@ process BCLCONVERT { tag {"$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } label 'process_high' - container "nf-core/bclconvert:4.3.13" + container "nf-core/bclconvert:4.4.6" input: tuple val(meta), path(samplesheet), path(run_dir) output: - tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz") , emit: fastq - tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , optional:true, emit: fastq_idx - tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz") , optional:true, emit: undetermined - tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz") , optional:true, emit: undetermined_idx - tuple val(meta), path("output/Reports") , emit: reports - tuple val(meta), path("output/Logs") , emit: logs - tuple val(meta), path("**/InterOp/*.bin", includeInputs: true), emit: interop - path("versions.yml") , emit: versions + tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz") , emit: fastq + tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , emit: fastq_idx , optional:true + tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined , optional:true + tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional:true + tuple val(meta), path("output/Reports") , emit: reports + tuple val(meta), path("output/Logs") , emit: logs + tuple val(meta), path("output/InterOp/*.bin") , emit: interop , optional:true + path("versions.yml") , emit: versions when: task.ext.when == null || task.ext.when @@ -62,9 +62,50 @@ process BCLCONVERT { --bcl-input-directory ${input_dir} \\ --sample-sheet ${samplesheet} + # copy the InterOp folder contents to ensure it gets picked up when using fusion + mkdir -p output/InterOp/ + cp -n **/InterOp/*.bin output/InterOp/ + cat <<-END_VERSIONS > versions.yml "${task.process}": bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') END_VERSIONS """ + + stub: + """ + mkdir -p output/Reports + mkdir -p output/Logs + echo "" | gzip > output/Sample1_S1_L001_R1_001.fastq.gz + echo "" | gzip > output/Undetermined_S0_L001_R1_001.fastq.gz + touch output/Reports/Adapter_Cycle_Metrics.csv + touch output/Reports/Adapter_Metrics.csv + touch output/Reports/Demultiplex_Stats.csv + touch output/Reports/Demultiplex_Tile_Stats.csv + touch output/Reports/fastq_list.csv + touch output/Reports/Index_Hopping_Counts.csv + touch output/Reports/IndexMetricsOut.bin + touch output/Reports/Quality_Metrics.csv + touch output/Reports/Quality_Tile_Metrics.csv + touch output/Reports/RunInfo.xml + touch output/Reports/SampleSheet.csv + touch output/Reports/Top_Unknown_Barcodes.csv + touch output/Logs/Errors.log + touch output/Logs/FastqComplete.log + touch output/Logs/Info.log + touch output/Logs/Warnings.log + mkdir -p output/InterOp + touch output/InterOp/ControlMetricsOut.bin + touch output/InterOp/CorrectedIntMetricsOut.bin + touch output/InterOp/ErrorMetricsOut.bin + touch output/InterOp/ExtractionMetricsOut.bin + touch output/InterOp/IndexMetricsOut.bin + touch output/InterOp/QMetricsOut.bin + touch output/InterOp/TileMetricsOut.bin + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') + END_VERSIONS + """ + } diff --git a/modules/nf-core/bclconvert/meta.yml b/modules/nf-core/bclconvert/meta.yml index f40c8768..e1cd3e01 100644 --- a/modules/nf-core/bclconvert/meta.yml +++ b/modules/nf-core/bclconvert/meta.yml @@ -30,66 +30,50 @@ input: Could be a directory or a tar of the directory ontologies: [] output: - - fastq: - - meta: - type: file - description: Demultiplexed sample FASTQ files - pattern: "**_S*_L00?_R?_00?.fastq.gz" - ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + fastq: + - - meta: + type: map + description: Groovy Map containing sample information - output/**_S[1-9]*_R?_00?.fastq.gz: type: file description: Demultiplexed sample FASTQ files pattern: "**_S*_L00?_R?_00?.fastq.gz" ontologies: - edam: http://edamontology.org/format_3989 # GZIP format - - fastq_idx: - - meta: - type: file - description: Optional demultiplexed index FASTQ files - pattern: "**_S*_L00?_I?_00?.fastq.gz" - ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + fastq_idx: + - - meta: + type: map + description: Groovy Map containing sample information - output/**_S[1-9]*_I?_00?.fastq.gz: type: file description: Optional demultiplexed index FASTQ files pattern: "**_S*_L00?_I?_00?.fastq.gz" ontologies: - edam: http://edamontology.org/format_3989 # GZIP format - - undetermined: - - meta: - type: file - description: Optional undetermined sample FASTQ files - pattern: "Undetermined_S0_L00?_R?_00?.fastq.gz" - ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + undetermined: + - - meta: + type: map + description: Groovy Map containing sample information - output/**Undetermined_S0*_R?_00?.fastq.gz: type: file description: Optional undetermined sample FASTQ files pattern: "Undetermined_S0_L00?_R?_00?.fastq.gz" ontologies: - edam: http://edamontology.org/format_3989 # GZIP format - - undetermined_idx: - - meta: - type: file - description: Optional undetermined index FASTQ files - pattern: "Undetermined_S0_L00?_I?_00?.fastq.gz" - ontologies: - - edam: http://edamontology.org/format_3989 # GZIP format + undetermined_idx: + - - meta: + type: map + description: Groovy Map containing sample information - output/**Undetermined_S0*_I?_00?.fastq.gz: type: file description: Optional undetermined index FASTQ files pattern: "Undetermined_S0_L00?_I?_00?.fastq.gz" ontologies: - edam: http://edamontology.org/format_3989 # GZIP format - - reports: - - meta: - type: file - description: Demultiplexing Reports - pattern: "Reports/*.{csv,xml}" - ontologies: - - edam: http://edamontology.org/format_3752 # CSV - - edam: http://edamontology.org/format_2332 # XML + reports: + - - meta: + type: map + description: Groovy Map containing sample information - output/Reports: type: file description: Demultiplexing Reports @@ -97,35 +81,31 @@ output: ontologies: - edam: http://edamontology.org/format_3752 # CSV - edam: http://edamontology.org/format_2332 # XML - - logs: - - meta: - type: file - description: Log files - pattern: "Logs/*.{log,txt}" - ontologies: [] + logs: + - - meta: + type: map + description: Groovy Map containing sample information - output/Logs: type: file description: Log files pattern: "Logs/*.{log,txt}" ontologies: [] - - interop: - - meta: - type: file - description: Interop files - pattern: "*.{bin}" - ontologies: [] - - "**/InterOp/*.bin": + interop: + - - meta: + type: map + description: Groovy Map containing sample information + - "output/InterOp/*.bin": type: file description: Interop files pattern: "*.{bin}" ontologies: [] - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.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: - "@matthdsm" maintainers: diff --git a/modules/nf-core/bclconvert/tests/main.nf.test b/modules/nf-core/bclconvert/tests/main.nf.test index b246be20..b2971c02 100644 --- a/modules/nf-core/bclconvert/tests/main.nf.test +++ b/modules/nf-core/bclconvert/tests/main.nf.test @@ -4,14 +4,17 @@ nextflow_process { script "../main.nf" process "BCLCONVERT" config "./nextflow.config" + tag "bclconvert" tag "modules" tag "modules_nfcore" - test("homo sapiens illumina [bcl]") { + test("homo_sapiens illumina [bcl]") { when { + params { + module_args = "--force --first-tile-only true" + } process { - //TODO use new test dataset when available, see https://github.com/nf-core/test-datasets/issues/996 """ input[0] = [ [ id: 'test', lane:1 ], @@ -26,16 +29,88 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( + process.out.fastq, + process.out.fastq_idx, + process.out.undetermined.collect { meta, fastq -> file(fastq).name }, + process.out.undetermined_idx, process.out.reports, + process.out.logs.collect { meta, logs -> file(logs).list().sort() }, + process.out.interop.collect { meta, interop -> + interop.findAll { interopfile -> + file(interopfile).name != "IndexMetricsOut.bin" } }, process.out.versions, - process.out.fastq, - file(process.out.logs.get(0).get(1)).list().sort(), - process.out.interop.get(0).get(1).findAll { file(it).name != "IndexMetricsOut.bin" }, - ).match() - }, - { assert process.out.undetermined.get(0).get(1) ==~ ".*/Undetermined_S0_L001_R1_001.fastq.gz"}, - { assert file(process.out.interop.get(0).get(1).find { file(it).name == "IndexMetricsOut.bin" }).exists() } + path(process.out.versions[0]).yaml + ).match() } + ) + } + } + + test("sars_cov2 illumina [bcl]") { + when { + params { + module_args = "--force --tiles s_1_2101" + } + process { + """ + input[0] = [ + [ id: 'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bcl/SampleSheet.csv', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bcl/200624_A00834_0183_BHMTFYDRXX.tar.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.fastq.collect { + meta, fastqs -> + fastqs.findAll { + fastqfile -> + file(fastqfile).name != "SampleZ_S5_L001_R1_001.fastq.gz" + } + }, + process.out.fastq_idx, + process.out.undetermined.collect { meta, fastq -> file(fastq).name }, + process.out.undetermined_idx, + process.out.reports, + process.out.logs.collect { meta, logs -> file(logs).list().sort() }, + process.out.interop, + process.out.interop.collect { meta, interop -> + interop.findAll { interopfile -> + file(interopfile).name != "IndexMetricsOut.bin" } }, + process.out.versions, + path(process.out.versions[0]).yaml + ).match() } + ) + } + } + + test("homo_sapiens illumina [bcl] - stub") { + options "-stub" + + when { + params { + module_args = "--force --first-tile-only true" + } + process { + """ + input[0] = [ + [ id: 'test', lane:1 ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bcl/flowcell_samplesheet.csv', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bcl/flowcell.tar.gz', checkIfExists: true) + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } ) } } -} \ No newline at end of file +} diff --git a/modules/nf-core/bclconvert/tests/main.nf.test.snap b/modules/nf-core/bclconvert/tests/main.nf.test.snap index 0c366a2d..b7838a5e 100644 --- a/modules/nf-core/bclconvert/tests/main.nf.test.snap +++ b/modules/nf-core/bclconvert/tests/main.nf.test.snap @@ -1,6 +1,303 @@ { - "homo sapiens illumina [bcl]": { + "sars_cov2 illumina [bcl]": { + "content": [ + [ + [ + "Sample1_S1_L001_R1_001.fastq.gz:md5,b5489d1964db8db5502eb742cc3ef3ec", + "Sample23_S3_L001_R1_001.fastq.gz:md5,767a1091320320b140288066e29bccc5", + "SampleA_S2_L001_R1_001.fastq.gz:md5,7de2ea88133409f34563f40a0d8c9e55", + "sampletest_S4_L001_R1_001.fastq.gz:md5,c16c7de1b7bffb5e4503f4d94c40f881" + ] + ], + [ + + ], + [ + "Undetermined_S0_L001_R1_001.fastq.gz" + ], + [ + + ], + [ + [ + { + "id": "test" + }, + [ + "Adapter_Cycle_Metrics.csv:md5,05fbe7b2b0acdd557d355b448aa88ace", + "Adapter_Metrics.csv:md5,0fa4ac708955417af9d18cec4955552f", + "Demultiplex_Detailed_Stats.csv:md5,5a6a4d66a96256ff71e4f649927fb112", + "Demultiplex_Stats.csv:md5,4a3f451faa098156623b55b0f2ff27ee", + "Demultiplex_Tile_Stats.csv:md5,f91fb0c7a2c5588ed43c7f9145d004ee", + "IndexMetricsOut.bin:md5,fb16c8a9873e5b5950ae5949126af76c", + "Index_Hopping_Counts.csv:md5,f59474d96afe8218c7590bb240b19690", + "Quality_Metrics.csv:md5,c4622066f85d93b1661c928a46cfc508", + "Quality_Tile_Metrics.csv:md5,e22bc5e2f147695150b02afcccb38c4f", + "RunInfo.xml:md5,f283cb4600235db9261ee1e319b1407e", + "SampleSheet.csv:md5,4113eabae23136cc819c7f15ac5b6aad", + "Top_Unknown_Barcodes.csv:md5,37dbc2860c640fc721820b0217ea0504", + "fastq_list.csv:md5,482cf7fe9b304a900e4ede3bb25b4912" + ] + ] + ], + [ + [ + "Errors.log", + "FastqComplete.txt", + "Info.log", + "Warnings.log" + ] + ], + [ + [ + { + "id": "test" + }, + [ + "BasecallingMetricsOut.bin:md5,7fb651325cba614d497d376eaf43fef4", + "CorrectedIntMetricsOut.bin:md5,dc8d57282ba9ece9e5fc58a92aa2ac52", + "EmpiricalPhasingMetricsOut.bin:md5,1ef4631faf0a3a3beb31b10fc38a734d", + "EventMetricsOut.bin:md5,dee320ce29bdadde44589aa9439f53ab", + "ExtendedTileMetricsOut.bin:md5,f01d1a9cf8445adf719e652ad7304cf2", + "ExtractionMetricsOut.bin:md5,972f4082ad950baaf42a6d28517d28a8", + "FWHMGridMetricsOut.bin:md5,6e297bafcd845bfd0440d08e1bb27685", + "ImageMetricsOut.bin:md5,ac5d1f0a1f611c0c7c9dd8e6b9e701b1", + "IndexMetricsOut.bin:md5,6d95975d5909eb88f824e6dc8066457d", + "OpticalModelMetricsOut.bin:md5,3eaea5fcf2d353950b1e720c73695ccb", + "PFGridMetricsOut.bin:md5,ae469858ee96ffafbcaf3afb814bdab2", + "QMetrics2030Out.bin:md5,438248760db58917b32f4eccc6c64c39", + "QMetricsByLaneOut.bin:md5,e8254cb4a27846710a2a143296be2d8f", + "QMetricsOut.bin:md5,8f6b83028a42be721200a598161ac5c6", + "RegistrationMetricsOut.bin:md5,b5ebd957aed067b6403d851ba2ce0139", + "TileMetricsOut.bin:md5,21388348d81fa9be326d30ef6d348464" + ] + ] + ], + [ + [ + "BasecallingMetricsOut.bin:md5,7fb651325cba614d497d376eaf43fef4", + "CorrectedIntMetricsOut.bin:md5,dc8d57282ba9ece9e5fc58a92aa2ac52", + "EmpiricalPhasingMetricsOut.bin:md5,1ef4631faf0a3a3beb31b10fc38a734d", + "EventMetricsOut.bin:md5,dee320ce29bdadde44589aa9439f53ab", + "ExtendedTileMetricsOut.bin:md5,f01d1a9cf8445adf719e652ad7304cf2", + "ExtractionMetricsOut.bin:md5,972f4082ad950baaf42a6d28517d28a8", + "FWHMGridMetricsOut.bin:md5,6e297bafcd845bfd0440d08e1bb27685", + "ImageMetricsOut.bin:md5,ac5d1f0a1f611c0c7c9dd8e6b9e701b1", + "OpticalModelMetricsOut.bin:md5,3eaea5fcf2d353950b1e720c73695ccb", + "PFGridMetricsOut.bin:md5,ae469858ee96ffafbcaf3afb814bdab2", + "QMetrics2030Out.bin:md5,438248760db58917b32f4eccc6c64c39", + "QMetricsByLaneOut.bin:md5,e8254cb4a27846710a2a143296be2d8f", + "QMetricsOut.bin:md5,8f6b83028a42be721200a598161ac5c6", + "RegistrationMetricsOut.bin:md5,b5ebd957aed067b6403d851ba2ce0139", + "TileMetricsOut.bin:md5,21388348d81fa9be326d30ef6d348464" + ] + ], + [ + "versions.yml:md5,a7ddd79ad04a69cb254185a11296f1b6" + ], + { + "BCLCONVERT": { + "bclconvert": "4.4.6" + } + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-23T10:12:42.943671245" + }, + "homo_sapiens illumina [bcl] - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "lane": 1 + }, + "Sample1_S1_L001_R1_001.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "lane": 1 + }, + "Undetermined_S0_L001_R1_001.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "3": [ + + ], + "4": [ + [ + { + "id": "test", + "lane": 1 + }, + [ + "Adapter_Cycle_Metrics.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Adapter_Metrics.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Demultiplex_Stats.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Demultiplex_Tile_Stats.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "IndexMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "Index_Hopping_Counts.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Quality_Metrics.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Quality_Tile_Metrics.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "RunInfo.xml:md5,d41d8cd98f00b204e9800998ecf8427e", + "SampleSheet.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Top_Unknown_Barcodes.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "fastq_list.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "5": [ + [ + { + "id": "test", + "lane": 1 + }, + [ + "Errors.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "FastqComplete.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "Info.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "Warnings.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "6": [ + [ + { + "id": "test", + "lane": 1 + }, + [ + "ControlMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "CorrectedIntMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "ErrorMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "ExtractionMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "IndexMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "QMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "TileMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "7": [ + "versions.yml:md5,a7ddd79ad04a69cb254185a11296f1b6" + ], + "fastq": [ + [ + { + "id": "test", + "lane": 1 + }, + "Sample1_S1_L001_R1_001.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "fastq_idx": [ + + ], + "interop": [ + [ + { + "id": "test", + "lane": 1 + }, + [ + "ControlMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "CorrectedIntMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "ErrorMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "ExtractionMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "IndexMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "QMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "TileMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "logs": [ + [ + { + "id": "test", + "lane": 1 + }, + [ + "Errors.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "FastqComplete.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "Info.log:md5,d41d8cd98f00b204e9800998ecf8427e", + "Warnings.log:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "reports": [ + [ + { + "id": "test", + "lane": 1 + }, + [ + "Adapter_Cycle_Metrics.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Adapter_Metrics.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Demultiplex_Stats.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Demultiplex_Tile_Stats.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "IndexMetricsOut.bin:md5,d41d8cd98f00b204e9800998ecf8427e", + "Index_Hopping_Counts.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Quality_Metrics.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Quality_Tile_Metrics.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "RunInfo.xml:md5,d41d8cd98f00b204e9800998ecf8427e", + "SampleSheet.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "Top_Unknown_Barcodes.csv:md5,d41d8cd98f00b204e9800998ecf8427e", + "fastq_list.csv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "undetermined": [ + [ + { + "id": "test", + "lane": 1 + }, + "Undetermined_S0_L001_R1_001.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "undetermined_idx": [ + + ], + "versions": [ + "versions.yml:md5,a7ddd79ad04a69cb254185a11296f1b6" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-23T10:12:55.362214653" + }, + "homo_sapiens illumina [bcl]": { "content": [ + [ + [ + { + "id": "test", + "lane": 1 + }, + "Sample1_S1_L001_R1_001.fastq.gz:md5,0675fb6365322eaafb33c0f8e862b54b" + ] + ], + [ + + ], + [ + "Undetermined_S0_L001_R1_001.fastq.gz" + ], + [ + + ], [ [ { @@ -10,8 +307,9 @@ [ "Adapter_Cycle_Metrics.csv:md5,5a0c88793b4a0885fe3dda16609b576e", "Adapter_Metrics.csv:md5,989240b8840b2169ac1061f952c90f6c", + "Demultiplex_Detailed_Stats.csv:md5,fda7961f2958545daa94b55b84c99eb1", "Demultiplex_Stats.csv:md5,93949a8cd96f907d83e0808c1ec2a04b", - "Demultiplex_Tile_Stats.csv:md5,83120160b0f22a1303fa1db31c19f6e9", + "Demultiplex_Tile_Stats.csv:md5,d966f774c438485907ae22ac34b85722", "IndexMetricsOut.bin:md5,9e688c58a5487b8eaf69c9e1005ad0bf", "Index_Hopping_Counts.csv:md5,1059369e375fd8f8423c0f6c934be978", "Quality_Metrics.csv:md5,6614accb1bb414fe312b17b81f5521f7", @@ -24,36 +322,36 @@ ] ], [ - "versions.yml:md5,3a54ec728e3eb67bfd5af57ebd36ccab" + [ + "Errors.log", + "FastqComplete.txt", + "Info.log", + "Warnings.log" + ] ], [ [ - { - "id": "test", - "lane": 1 - }, - "Sample1_S1_L001_R1_001.fastq.gz:md5,0675fb6365322eaafb33c0f8e862b54b" + "ControlMetricsOut.bin:md5,6d77b38d0793a6e1ce1e85706e488953", + "CorrectedIntMetricsOut.bin:md5,2bbf84d3be72734addaa2fe794711434", + "ErrorMetricsOut.bin:md5,38c88def138e9bb832539911affdb286", + "ExtractionMetricsOut.bin:md5,7497c3178837eea8f09350b5cd252e99", + "QMetricsOut.bin:md5,7e9f198d53ebdfbb699a5f94cf1ed51c", + "TileMetricsOut.bin:md5,83891751ec1c91a425a524b476b6ca3c" ] ], [ - "Errors.log", - "FastqComplete.txt", - "Info.log", - "Warnings.log" + "versions.yml:md5,a7ddd79ad04a69cb254185a11296f1b6" ], - [ - "ControlMetricsOut.bin:md5,6d77b38d0793a6e1ce1e85706e488953", - "CorrectedIntMetricsOut.bin:md5,2bbf84d3be72734addaa2fe794711434", - "ErrorMetricsOut.bin:md5,38c88def138e9bb832539911affdb286", - "ExtractionMetricsOut.bin:md5,7497c3178837eea8f09350b5cd252e99", - "QMetricsOut.bin:md5,7e9f198d53ebdfbb699a5f94cf1ed51c", - "TileMetricsOut.bin:md5,83891751ec1c91a425a524b476b6ca3c" - ] + { + "BCLCONVERT": { + "bclconvert": "4.4.6" + } + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-06-02T12:35:36.967547" + "timestamp": "2025-09-23T10:12:18.369689549" } -} +} \ No newline at end of file diff --git a/modules/nf-core/bclconvert/tests/nextflow.config b/modules/nf-core/bclconvert/tests/nextflow.config index 344f4720..848581b5 100644 --- a/modules/nf-core/bclconvert/tests/nextflow.config +++ b/modules/nf-core/bclconvert/tests/nextflow.config @@ -1,10 +1,5 @@ process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - ext.args = {[ - meta.lane ? "--bcl-only-lane ${meta.lane}" : "", - "--force", - "--first-tile-only true" - ].join(" ").trim()} + withName: "BCLCONVERT" { + ext.args = params.module_args + } } diff --git a/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test b/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test index e1fb00ab..65a158e9 100644 --- a/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test +++ b/subworkflows/nf-core/bcl_demultiplex/tests/main.nf.test @@ -34,13 +34,13 @@ nextflow_workflow { { assert snapshot( sanitizeOutput(workflow.out, unstableKeys: ["empty_fastq", "logs"]).collectEntries { key, val -> if (key == "interop") { - return [ key, val.collect { meta, files -> - [ + return [ key, val.collect { meta, files -> + [ meta, - files.collect { interop_file -> + files.collect { interop_file -> if (interop_file.endsWith("IndexMetricsOut.bin")) { file(interop_file).name - } else { + } else { interop_file } } @@ -77,13 +77,13 @@ nextflow_workflow { { assert snapshot( sanitizeOutput(workflow.out).collectEntries { key, val -> if (key == "interop") { - return [ key, val.collect { meta, files -> - [ + return [ key, val.collect { meta, files -> + [ meta, - files.collect { interop_file -> + files.collect { interop_file -> if (interop_file.endsWith("IndexMetricsOut.bin")) { file(interop_file).name - } else { + } else { interop_file } } From 2676acf537a09a925a30871596bf998f2f5f6e0e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:39:53 +0100 Subject: [PATCH 047/202] bump bamsormadup --- modules.json | 2 +- .../bamsormadup/biobambam-bamsormadup.diff | 2 +- .../biobambam/bamsormadup/environment.yml | 2 ++ .../nf-core/biobambam/bamsormadup/meta.yml | 34 ++++++++++++------- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/modules.json b/modules.json index 49345c50..5ba03302 100644 --- a/modules.json +++ b/modules.json @@ -17,7 +17,7 @@ }, "biobambam/bamsormadup": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"], "patch": "modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff" }, diff --git a/modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff b/modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff index 749067c4..9c5a8c3e 100644 --- a/modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff +++ b/modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff @@ -1,4 +1,4 @@ -Changes in module 'nf-core/biobambam/bamsormadup' +Changes in component 'nf-core/biobambam/bamsormadup' 'modules/nf-core/biobambam/bamsormadup/environment.yml' is unchanged 'modules/nf-core/biobambam/bamsormadup/meta.yml' is unchanged Changes in 'biobambam/bamsormadup/main.nf': diff --git a/modules/nf-core/biobambam/bamsormadup/environment.yml b/modules/nf-core/biobambam/bamsormadup/environment.yml index eb19895a..8c8c3166 100644 --- a/modules/nf-core/biobambam/bamsormadup/environment.yml +++ b/modules/nf-core/biobambam/bamsormadup/environment.yml @@ -1,3 +1,5 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda diff --git a/modules/nf-core/biobambam/bamsormadup/meta.yml b/modules/nf-core/biobambam/bamsormadup/meta.yml index cfd09d87..a863c54a 100644 --- a/modules/nf-core/biobambam/bamsormadup/meta.yml +++ b/modules/nf-core/biobambam/bamsormadup/meta.yml @@ -23,6 +23,7 @@ input: - bams: type: file description: List containing 1 or more bam files + ontologies: [] - - meta2: type: map description: | @@ -32,9 +33,10 @@ input: type: file description: Reference genome in FASTA format (optional) pattern: "*.{fa,fasta,fna}" + ontologies: [] output: - - bam: - - meta: + bam: + - - meta: type: map description: | Groovy Map containing sample information @@ -43,8 +45,9 @@ output: type: file description: BAM file with duplicate reads marked/removed pattern: "*.bam" - - bam_index: - - meta: + ontologies: [] + bam_index: + - - meta: type: map description: | Groovy Map containing sample information @@ -53,8 +56,9 @@ output: type: file description: BAM index file pattern: "*.bai" - - cram: - - meta: + ontologies: [] + cram: + - - meta: type: map description: | Groovy Map containing sample information @@ -63,8 +67,9 @@ output: type: file description: CRAM file with duplicate reads marked/removed pattern: "*.cram" - - metrics: - - meta: + ontologies: [] + metrics: + - - meta: type: map description: | Groovy Map containing sample information @@ -73,11 +78,14 @@ output: type: file description: Duplicate metrics file generated by biobambam pattern: "*.{metrics.txt}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@matthdsm" maintainers: From a9d31ad3016aabddace60f3d600d34f8924cc3e2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:07:04 +0100 Subject: [PATCH 048/202] bump aligners, add strobealign --- README.md | 2 +- assets/schema_input.json | 2 +- assets/schema_sampleinfo.json | 2 +- modules.json | 17 +- modules/nf-core/bowtie2/align/meta.yml | 106 +++--- .../bowtie2/align/tests/large_index.config | 2 +- .../nf-core/bowtie2/align/tests/sam.config | 2 +- .../nf-core/bowtie2/align/tests/sam2.config | 2 +- modules/nf-core/bwa/mem/environment.yml | 6 +- modules/nf-core/bwa/mem/main.nf | 4 +- modules/nf-core/bwa/mem/meta.yml | 53 +-- .../nf-core/bwa/mem/tests/main.nf.test.snap | 56 ++-- modules/nf-core/bwamem2/mem/environment.yml | 6 +- modules/nf-core/bwamem2/mem/main.nf | 4 +- modules/nf-core/bwamem2/mem/meta.yml | 42 +-- .../bwamem2/mem/tests/main.nf.test.snap | 40 +-- modules/nf-core/dragmap/align/meta.yml | 58 ++-- .../nf-core/snapaligner/align/environment.yml | 3 +- modules/nf-core/snapaligner/align/main.nf | 4 +- modules/nf-core/snapaligner/align/meta.yml | 25 +- .../snapaligner/align/tests/main.nf.test | 4 +- .../snapaligner/align/tests/main.nf.test.snap | 32 +- modules/nf-core/strobealign/environment.yml | 9 + modules/nf-core/strobealign/main.nf | 108 +++++++ modules/nf-core/strobealign/meta.yml | 142 ++++++++ .../nf-core/strobealign/tests/main.nf.test | 303 ++++++++++++++++++ .../strobealign/tests/main.nf.test.snap | 274 ++++++++++++++++ .../nf-core/strobealign/tests/nextflow.config | 6 + nextflow_schema.json | 2 +- subworkflows/nf-core/fastq_align_dna/main.nf | 24 +- subworkflows/nf-core/fastq_align_dna/meta.yml | 3 + .../fastq_align_dna/tests/main.nf.test | 41 +++ .../fastq_align_dna/tests/main.nf.test.snap | 144 +++++++-- .../fastq_align_dna/tests/nextflow.config | 12 - 34 files changed, 1278 insertions(+), 262 deletions(-) create mode 100644 modules/nf-core/strobealign/environment.yml create mode 100644 modules/nf-core/strobealign/main.nf create mode 100644 modules/nf-core/strobealign/meta.yml create mode 100644 modules/nf-core/strobealign/tests/main.nf.test create mode 100644 modules/nf-core/strobealign/tests/main.nf.test.snap create mode 100644 modules/nf-core/strobealign/tests/nextflow.config delete mode 100644 subworkflows/nf-core/fastq_align_dna/tests/nextflow.config diff --git a/README.md b/README.md index 7a23f1d2..5bbc40e9 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Steps inlcude: 1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html) 2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp) -3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP) or [`snap`](https://github.com/amplab/snap) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq +3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP), [`snap`](https://github.com/amplab/snap) or [`strobe`](https://github.com/ksahlin/strobealign) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq 4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html) 5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html) 6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics) diff --git a/assets/schema_input.json b/assets/schema_input.json index e0ba1632..deb42ab7 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -37,7 +37,7 @@ "meta": ["aligner"], "type": "string", "description": "Aligner to use to align sample to the reference genome", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "star"] + "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star"] }, "tag": { "meta": ["tag"], diff --git a/assets/schema_sampleinfo.json b/assets/schema_sampleinfo.json index b9c8aaf3..c5443971 100644 --- a/assets/schema_sampleinfo.json +++ b/assets/schema_sampleinfo.json @@ -85,7 +85,7 @@ "meta": ["aligner"], "type": "string", "description": "Aligner to use to align sample to the reference genome", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "star"] + "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star"] } } }, diff --git a/modules.json b/modules.json index 5ba03302..cd0c8667 100644 --- a/modules.json +++ b/modules.json @@ -23,25 +23,25 @@ }, "bowtie2/align": { "branch": "master", - "git_sha": "8864afe586537bf562eac7b83349c26207f3cb4d", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/bowtie2/align/bowtie2-align.diff" }, "bwa/mem": { "branch": "master", - "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", + "git_sha": "1c46359c837ef768b004519f535c30378e8289fc", "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwa/mem/bwa-mem.diff" }, "bwamem2/mem": { "branch": "master", - "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", + "git_sha": "d86336f3e7ae0d5f76c67b0859409769cfeb2af2", "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, "dragmap/align": { "branch": "master", - "git_sha": "8864afe586537bf562eac7b83349c26207f3cb4d", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, @@ -143,7 +143,7 @@ }, "snapaligner/align": { "branch": "master", - "git_sha": "77bdd7e1047d2abe21ae8d89acc295ea553ecbae", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/snapaligner/align/snapaligner-align.diff" }, @@ -152,6 +152,11 @@ "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" + }, + "strobealign": { + "branch": "master", + "git_sha": "d5cc72b63c4e1565cb66e83f0577b04c0bb54d5c", + "installed_by": ["_", "a", "d", "f", "g", "i", "l", "n", "q", "s", "t"] } } }, @@ -164,7 +169,7 @@ }, "fastq_align_dna": { "branch": "master", - "git_sha": "a29f18660f5e3748d44d6f716241e70c942c065d", + "git_sha": "070ddae7fb59384d3d85bf69eb9a1d71ab33ada9", "installed_by": ["subworkflows"], "patch": "subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff" }, diff --git a/modules/nf-core/bowtie2/align/meta.yml b/modules/nf-core/bowtie2/align/meta.yml index 7436097b..0c12b28a 100644 --- a/modules/nf-core/bowtie2/align/meta.yml +++ b/modules/nf-core/bowtie2/align/meta.yml @@ -14,7 +14,7 @@ tools: sequencing reads to long reference sequences. homepage: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml documentation: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml - doi: 10.1038/nmeth.1923 + doi: 10.1186/gb-2009-10-3-r25 licence: ["GPL-3.0-or-later"] identifier: "" input: @@ -28,6 +28,7 @@ input: description: | List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. + ontologies: [] - - meta2: type: map description: | @@ -37,6 +38,7 @@ input: type: file description: Bowtie2 genome index files pattern: "*.ebwt" + ontologies: [] - - meta3: type: map description: | @@ -46,84 +48,88 @@ input: type: file description: Bowtie2 genome fasta file pattern: "*.fasta" - - - save_unaligned: - type: boolean - description: | - Save reads that do not map to the reference (true) or discard them (false) - (default: false) - - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" + ontologies: [] + - save_unaligned: + type: boolean + description: | + Save reads that do not map to the reference (true) or discard them (false) + (default: false) + - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" output: - - sam: - - meta: - type: file - description: Output SAM file containing read alignments - pattern: "*.sam" + sam: + - - meta: + type: map + description: Groovy Map containing sample information - "*.sam": type: file description: Output SAM file containing read alignments pattern: "*.sam" - - bam: - - meta: - type: file - description: Output BAM file containing read alignments - pattern: "*.bam" + ontologies: [] + bam: + - - meta: + type: map + description: Groovy Map containing sample information - "*.bam": type: file description: Output BAM file containing read alignments pattern: "*.bam" - - cram: - - meta: - type: file - description: Output CRAM file containing read alignments - pattern: "*.cram" + ontologies: [] + cram: + - - meta: + type: map + description: Groovy Map containing sample information - "*.cram": type: file description: Output CRAM file containing read alignments pattern: "*.cram" - - csi: - - meta: - type: file - description: Output SAM/BAM index for large inputs - pattern: "*.csi" + ontologies: [] + csi: + - - meta: + type: map + description: Groovy Map containing sample information - "*.csi": type: file description: Output SAM/BAM index for large inputs pattern: "*.csi" - - crai: - - meta: - type: file - description: Output CRAM index - pattern: "*.crai" + ontologies: [] + crai: + - - meta: + type: map + description: Groovy Map containing sample information - "*.crai": type: file description: Output CRAM index pattern: "*.crai" - - log: - - meta: - type: file - description: Alignment log - pattern: "*.log" + ontologies: [] + log: + - - meta: + type: map + description: Groovy Map containing sample information - "*.log": type: file description: Alignment log pattern: "*.log" - - fastq: - - meta: - type: file - description: Unaligned FastQ files - pattern: "*.fastq.gz" + ontologies: [] + fastq: + - - meta: + type: map + description: Groovy Map containing sample information - "*fastq.gz": type: file description: Unaligned FastQ files pattern: "*.fastq.gz" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/bowtie2/align/tests/large_index.config b/modules/nf-core/bowtie2/align/tests/large_index.config index fdc1c59d..b2f0c405 100644 --- a/modules/nf-core/bowtie2/align/tests/large_index.config +++ b/modules/nf-core/bowtie2/align/tests/large_index.config @@ -2,4 +2,4 @@ process { withName: BOWTIE2_BUILD { ext.args = '--large-index' } -} \ No newline at end of file +} diff --git a/modules/nf-core/bowtie2/align/tests/sam.config b/modules/nf-core/bowtie2/align/tests/sam.config index c1d8c358..14d94e9a 100644 --- a/modules/nf-core/bowtie2/align/tests/sam.config +++ b/modules/nf-core/bowtie2/align/tests/sam.config @@ -2,4 +2,4 @@ process { withName: BOWTIE2_ALIGN { ext.args2 = '--output-fmt SAM' } -} \ No newline at end of file +} diff --git a/modules/nf-core/bowtie2/align/tests/sam2.config b/modules/nf-core/bowtie2/align/tests/sam2.config index 4e85ff0e..c39156f9 100644 --- a/modules/nf-core/bowtie2/align/tests/sam2.config +++ b/modules/nf-core/bowtie2/align/tests/sam2.config @@ -2,4 +2,4 @@ process { withName: BOWTIE2_ALIGN { ext.args2 = '-O SAM' } -} \ No newline at end of file +} diff --git a/modules/nf-core/bwa/mem/environment.yml b/modules/nf-core/bwa/mem/environment.yml index ed5448a1..54e67949 100644 --- a/modules/nf-core/bwa/mem/environment.yml +++ b/modules/nf-core/bwa/mem/environment.yml @@ -6,8 +6,8 @@ channels: dependencies: # renovate: datasource=conda depName=bioconda/bwa - - bioconda::bwa=0.7.18 + - bioconda::bwa=0.7.19 # renovate: datasource=conda depName=bioconda/htslib - - bioconda::htslib=1.21 + - bioconda::htslib=1.22.1 # renovate: datasource=conda depName=bioconda/samtools - - bioconda::samtools=1.21 + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/bwa/mem/main.nf b/modules/nf-core/bwa/mem/main.nf index da6ea4a2..a646e9e7 100644 --- a/modules/nf-core/bwa/mem/main.nf +++ b/modules/nf-core/bwa/mem/main.nf @@ -4,8 +4,8 @@ process BWA_MEM { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/bf/bf7890f8d4e38a7586581cb7fa13401b7af1582f21d94eef969df4cea852b6da/data' : - 'community.wave.seqera.io/library/bwa_htslib_samtools:56c9f8d5201889a4' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/d7/d7e24dc1e4d93ca4d3a76a78d4c834a7be3985b0e1e56fddd61662e047863a8a/data' : + 'community.wave.seqera.io/library/bwa_htslib_samtools:83b50ff84ead50d0' }" input: tuple val(meta) , path(reads), path(index), path(fasta) diff --git a/modules/nf-core/bwa/mem/meta.yml b/modules/nf-core/bwa/mem/meta.yml index b6f696c0..e1265ab7 100644 --- a/modules/nf-core/bwa/mem/meta.yml +++ b/modules/nf-core/bwa/mem/meta.yml @@ -55,52 +55,57 @@ input: ontologies: - edam: "http://edamontology.org/data_2044" # Sequence - edam: "http://edamontology.org/format_1929" # FASTA - - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" + - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" output: - - bam: - - meta: - type: file - description: Output BAM file containing read alignments + bam: + - - meta: + type: map + description: Groovy Map containing sample information - "*.bam": type: file description: Output BAM file containing read alignments pattern: "*.{bam}" ontologies: - edam: "http://edamontology.org/format_2572" # BAM - - cram: - - meta: + cram: + - - meta: type: file - description: Output CRAM file containing read alignments + description: Output BAM file containing read alignments + ontologies: [] - "*.cram": type: file description: Output CRAM file containing read alignments pattern: "*.{cram}" ontologies: - edam: "http://edamontology.org/format_3462" # CRAM - - csi: - - meta: - type: file - description: Optional index file for BAM file + csi: + - - meta: + type: map + description: Groovy Map containing sample information - "*.csi": type: file description: Optional index file for BAM file pattern: "*.{csi}" - - crai: - - meta: - type: file - description: Optional index file for CRAM file + ontologies: [] + crai: + - - meta: + type: map + description: Groovy Map containing sample information - "*.crai": type: file description: Optional index file for CRAM file pattern: "*.{crai}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@drpatelh" - "@jeremy1805" diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test.snap b/modules/nf-core/bwa/mem/tests/main.nf.test.snap index 3aaefdda..51496a3c 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwa/mem/tests/main.nf.test.snap @@ -11,16 +11,16 @@ ], [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "53df0e7b72f1f85fb28af5fec435246", + "37b4ee1649480bd1ff98666447f64fa5", "798439cbd7fd81cbcc5078022dc5479d" ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:36:00.831642964" + "timestamp": "2025-09-23T11:05:11.396076472" }, "Single-End Sort": { "content": [ @@ -34,16 +34,16 @@ ], [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "5eca502b75fefc26e8000908bf0bb3a3", + "57106634fcaf3bf503d5487a7717c5d3", "94fcf617f5b994584c4e8d4044e16b4f" ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:36:16.025706238" + "timestamp": "2025-09-23T11:05:19.529514701" }, "Paired-End": { "content": [ @@ -57,16 +57,16 @@ ], [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "fec2aafbba4637767bc4e202c71aee58", + "57770ff7c7186ed40c42f3d71c16ce3c", "57aeef88ed701a8ebc8e2f0a381b2a6" ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:36:27.309924644" + "timestamp": "2025-09-23T11:05:27.433790935" }, "Paired-End Sort": { "content": [ @@ -80,16 +80,16 @@ ], [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "d5ad8844218280969c1f9349bd62d057", + "8f5d8f83b485dcfa1f47a73ae645e3a7", "af8628d9df18b2d3d4f6fd47ef2bb872" ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:36:45.448624985" + "timestamp": "2025-09-23T11:05:35.775774487" }, "Single-end - stub": { "content": [ @@ -125,7 +125,7 @@ ] ], "4": [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], "bam": [ [ @@ -158,15 +158,15 @@ ] ], "versions": [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:37:16.211123969" + "timestamp": "2025-09-23T11:05:51.638917351" }, "Paired-End - no fasta": { "content": [ @@ -180,16 +180,16 @@ ], [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "fec2aafbba4637767bc4e202c71aee58", + "57770ff7c7186ed40c42f3d71c16ce3c", "57aeef88ed701a8ebc8e2f0a381b2a6" ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:36:56.592159657" + "timestamp": "2025-09-23T11:05:43.764589371" }, "Paired-end - stub": { "content": [ @@ -225,7 +225,7 @@ ] ], "4": [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], "bam": [ [ @@ -258,14 +258,14 @@ ] ], "versions": [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" + "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:37:32.177177506" + "timestamp": "2025-09-23T11:05:59.642014144" } } \ No newline at end of file diff --git a/modules/nf-core/bwamem2/mem/environment.yml b/modules/nf-core/bwamem2/mem/environment.yml index c069e281..f3637444 100644 --- a/modules/nf-core/bwamem2/mem/environment.yml +++ b/modules/nf-core/bwamem2/mem/environment.yml @@ -6,8 +6,8 @@ channels: dependencies: # renovate: datasource=conda depName=bioconda/bwa-mem2 - - bwa-mem2=2.2.1 + - bwa-mem2=2.3 # renovate: datasource=conda depName=bioconda/htslib - - htslib=1.21 + - htslib=1.22.1 # renovate: datasource=conda depName=bioconda/samtools - - samtools=1.21 + - samtools=1.22.1 diff --git a/modules/nf-core/bwamem2/mem/main.nf b/modules/nf-core/bwamem2/mem/main.nf index 41e2252a..830c1710 100644 --- a/modules/nf-core/bwamem2/mem/main.nf +++ b/modules/nf-core/bwamem2/mem/main.nf @@ -4,8 +4,8 @@ process BWAMEM2_MEM { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9a/9ac054213e67b3c9308e409b459080bbe438f8fd6c646c351bc42887f35a42e7/data' : - 'community.wave.seqera.io/library/bwa-mem2_htslib_samtools:e1f420694f8e42bd' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/e0/e05ce34b46ad42810eb29f74e4e304c0cb592b2ca15572929ed8bbaee58faf01/data' : + 'community.wave.seqera.io/library/bwa-mem2_htslib_samtools:db98f81f55b64113' }" input: tuple val(meta), path(reads), path(index), path(fasta) diff --git a/modules/nf-core/bwamem2/mem/meta.yml b/modules/nf-core/bwamem2/mem/meta.yml index d17e0dbd..6c7d1728 100644 --- a/modules/nf-core/bwamem2/mem/meta.yml +++ b/modules/nf-core/bwamem2/mem/meta.yml @@ -55,13 +55,13 @@ input: ontologies: - edam: "http://edamontology.org/data_2044" # Sequence - edam: "http://edamontology.org/format_1929" # FASTA - - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" + - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" output: - - sam: - - meta: + sam: + - - meta: type: map description: | Groovy Map containing sample information @@ -72,8 +72,8 @@ output: pattern: "*.{sam}" ontologies: - edam: "http://edamontology.org/format_2573" # SAM - - bam: - - meta: + bam: + - - meta: type: map description: | Groovy Map containing sample information @@ -84,8 +84,8 @@ output: pattern: "*.{bam}" ontologies: - edam: "http://edamontology.org/format_2572" # BAM - - cram: - - meta: + cram: + - - meta: type: map description: | Groovy Map containing sample information @@ -96,8 +96,8 @@ output: pattern: "*.{cram}" ontologies: - edam: "http://edamontology.org/format_3462" # CRAM - - crai: - - meta: + crai: + - - meta: type: map description: | Groovy Map containing sample information @@ -106,8 +106,9 @@ output: type: file description: Index file for CRAM file pattern: "*.{crai}" - - csi: - - meta: + ontologies: [] + csi: + - - meta: type: map description: | Groovy Map containing sample information @@ -116,11 +117,14 @@ output: type: file description: Index file for BAM file pattern: "*.{csi}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@maxulysse" - "@matthdsm" diff --git a/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap index ec90701f..b7d40a68 100644 --- a/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap @@ -1,17 +1,17 @@ { "sarscov2 - [fastq1, fastq2], index, fasta, false": { "content": [ - "9505760d66e1d5a5d34ab79a98228c6", + "e414c2d48e2e44c2c52c20ecd88e8bd8", "57aeef88ed701a8ebc8e2f0a381b2a6", [ - "versions.yml:md5,ca1b1dcf82b92fb0751816fca16a477a" + "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T10:57:52.782442426" + "timestamp": "2025-09-23T11:44:52.73673293" }, "sarscov2 - [fastq1, fastq2], index, fasta, true - stub": { "content": [ @@ -44,7 +44,7 @@ ] ], "5": [ - "versions.yml:md5,ca1b1dcf82b92fb0751816fca16a477a" + "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" ], "bam": [ [ @@ -74,56 +74,56 @@ ], "versions": [ - "versions.yml:md5,ca1b1dcf82b92fb0751816fca16a477a" + "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T10:58:37.140104324" + "timestamp": "2025-09-23T11:45:14.834888709" }, "sarscov2 - [fastq1, fastq2], index, fasta, true": { "content": [ - "e0c38d5772ca5f4d5d9999f4477e933c", + "716ed1ef39deaad346ca7cf86e08f959", "af8628d9df18b2d3d4f6fd47ef2bb872", [ - "versions.yml:md5,ca1b1dcf82b92fb0751816fca16a477a" + "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T10:58:19.047052261" + "timestamp": "2025-09-23T11:45:04.750057645" }, "sarscov2 - fastq, index, fasta, false": { "content": [ - "58d05395bbb819e929885bde415947ae", + "283a83f604f3f5338acedfee349dccf4", "798439cbd7fd81cbcc5078022dc5479d", [ - "versions.yml:md5,ca1b1dcf82b92fb0751816fca16a477a" + "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T10:56:53.456559296" + "timestamp": "2025-09-23T11:44:28.57550711" }, "sarscov2 - fastq, index, fasta, true": { "content": [ - "276189f6f003f99a87664e74fad2893d", + "ed99048bb552cac58e39923b550b6d5b", "94fcf617f5b994584c4e8d4044e16b4f", [ - "versions.yml:md5,ca1b1dcf82b92fb0751816fca16a477a" + "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T10:57:21.949711746" + "timestamp": "2025-09-23T11:44:40.437183765" } } \ No newline at end of file diff --git a/modules/nf-core/dragmap/align/meta.yml b/modules/nf-core/dragmap/align/meta.yml index 80f020f5..ba3ab484 100644 --- a/modules/nf-core/dragmap/align/meta.yml +++ b/modules/nf-core/dragmap/align/meta.yml @@ -25,6 +25,7 @@ input: description: | List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. + ontologies: [] - - meta2: type: map description: | @@ -34,6 +35,7 @@ input: type: file description: DRAGMAP hash table pattern: "Directory containing DRAGMAP hash table *.{cmp,.bin,.txt}" + ontologies: [] - - meta3: type: map description: | @@ -43,12 +45,13 @@ input: type: file description: Genome fasta reference files pattern: "*.{fa,fasta,fna}" - - - sort_bam: - type: boolean - description: Sort the BAM file + ontologies: [] + - sort_bam: + type: boolean + description: Sort the BAM file output: - - sam: - - meta: + sam: + - - meta: type: map description: | Groovy Map containing sample information @@ -57,17 +60,20 @@ output: type: file description: Output SAM file containing read alignments pattern: "*.{sam}" - - bam: - - meta: - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" + ontologies: [] + bam: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] - "*.bam": type: file description: Output BAM file containing read alignments pattern: "*.{bam}" - - cram: - - meta: + ontologies: [] + cram: + - - meta: type: map description: | Groovy Map containing sample information @@ -76,8 +82,9 @@ output: type: file description: Output CRAM file containing read alignments pattern: "*.{cram}" - - crai: - - meta: + ontologies: [] + crai: + - - meta: type: map description: | Groovy Map containing sample information @@ -86,8 +93,9 @@ output: type: file description: Index file for CRAM file pattern: "*.{crai}" - - csi: - - meta: + ontologies: [] + csi: + - - meta: type: map description: | Groovy Map containing sample information @@ -96,8 +104,9 @@ output: type: file description: Index file for CRAM file pattern: "*.{csi}" - - log: - - meta: + ontologies: [] + log: + - - meta: type: map description: | Groovy Map containing sample information @@ -106,11 +115,14 @@ output: type: file description: Log file pattern: "*.{log}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@edmundmiller" maintainers: diff --git a/modules/nf-core/snapaligner/align/environment.yml b/modules/nf-core/snapaligner/align/environment.yml index c2bd7a6a..5dc75127 100644 --- a/modules/nf-core/snapaligner/align/environment.yml +++ b/modules/nf-core/snapaligner/align/environment.yml @@ -4,4 +4,5 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::snap-aligner=2.0.3 + # renovate: datasource=conda depName=bioconda/snap-aligner + - bioconda::snap-aligner=2.0.5 diff --git a/modules/nf-core/snapaligner/align/main.nf b/modules/nf-core/snapaligner/align/main.nf index 5cf6d6bc..eacf4644 100644 --- a/modules/nf-core/snapaligner/align/main.nf +++ b/modules/nf-core/snapaligner/align/main.nf @@ -4,8 +4,8 @@ process SNAPALIGNER_ALIGN { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.3--hd03093a_0': - 'biocontainers/snap-aligner:2.0.3--hd03093a_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/21/21f75cd3d97dfe58e62bea51751b04d33a03a16eae3e9947335d569e22962143/data': + 'community.wave.seqera.io/library/snap-aligner:2.0.5--23601d3a3a2ae452' }" input: tuple val(meta) , path(reads, stageAs: "?/*"), path(index) diff --git a/modules/nf-core/snapaligner/align/meta.yml b/modules/nf-core/snapaligner/align/meta.yml index e0a71c04..66f2fca4 100644 --- a/modules/nf-core/snapaligner/align/meta.yml +++ b/modules/nf-core/snapaligner/align/meta.yml @@ -27,6 +27,8 @@ input: description: List of input fastq files of size 2 for paired fastq or 1 for bam or single fastq pattern: "*.{fastq.gz,fq.gz,fastq,fq,bam}" + ontologies: + - edam: http://edamontology.org/format_1930 # FASTQ - - meta2: type: map description: | @@ -36,9 +38,10 @@ input: type: file description: List of SNAP genome index files pattern: "{Genome,GenomeIndex,GenomeIndexHash,OverflowTable}" + ontologies: [] output: - - bam: - - meta: + bam: + - - meta: type: map description: | Groovy Map containing sample information @@ -47,8 +50,9 @@ output: type: file description: Aligned BAM file pattern: "*.{bam}" - - bai: - - meta: + ontologies: [] + bai: + - - meta: type: map description: | Groovy Map containing sample information @@ -57,11 +61,14 @@ output: type: file description: Optional aligned BAM file index pattern: "*.{bai}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@matthdsm" maintainers: diff --git a/modules/nf-core/snapaligner/align/tests/main.nf.test b/modules/nf-core/snapaligner/align/tests/main.nf.test index 43a6d935..254ea40d 100644 --- a/modules/nf-core/snapaligner/align/tests/main.nf.test +++ b/modules/nf-core/snapaligner/align/tests/main.nf.test @@ -112,7 +112,7 @@ nextflow_process { } } } - + when { params { module_args = "-so" @@ -136,4 +136,4 @@ nextflow_process { ) } } -} \ No newline at end of file +} diff --git a/modules/nf-core/snapaligner/align/tests/main.nf.test.snap b/modules/nf-core/snapaligner/align/tests/main.nf.test.snap index 9b03ecd9..f660cd39 100644 --- a/modules/nf-core/snapaligner/align/tests/main.nf.test.snap +++ b/modules/nf-core/snapaligner/align/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": true }, - "test.bam:md5,ca1c2472d7fd405edd7d8edebc7a2373" + "test.bam:md5,fc98a93036a3c5f7c674d470f7c5515a" ] ], "1": [ @@ -21,7 +21,7 @@ ] ], "2": [ - "versions.yml:md5,991ee6a1ff9cb59542426a1ecf063188" + "versions.yml:md5,dd98393cd432d8472209fcb8f6be362f" ], "bai": [ [ @@ -38,19 +38,19 @@ "id": "test", "single_end": true }, - "test.bam:md5,ca1c2472d7fd405edd7d8edebc7a2373" + "test.bam:md5,fc98a93036a3c5f7c674d470f7c5515a" ] ], "versions": [ - "versions.yml:md5,991ee6a1ff9cb59542426a1ecf063188" + "versions.yml:md5,dd98393cd432d8472209fcb8f6be362f" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-26T14:27:48.935351249" + "timestamp": "2025-09-23T12:01:44.085165306" }, "test_snapaligner_stub": { "content": [ @@ -74,7 +74,7 @@ ] ], "2": [ - "versions.yml:md5,991ee6a1ff9cb59542426a1ecf063188" + "versions.yml:md5,dd98393cd432d8472209fcb8f6be362f" ], "bai": [ [ @@ -95,15 +95,15 @@ ] ], "versions": [ - "versions.yml:md5,991ee6a1ff9cb59542426a1ecf063188" + "versions.yml:md5,dd98393cd432d8472209fcb8f6be362f" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-26T14:41:41.497793191" + "timestamp": "2025-09-23T12:01:58.930050472" }, "test_snapaligner_paired": { "content": [ @@ -114,7 +114,7 @@ "id": "test", "single_end": false }, - "test.bam:md5,7fef4ace398a5e5060ae54d4466c1503" + "test.bam:md5,d4e6df5e063034da268fa4b97db369d3" ] ], "1": [ @@ -127,7 +127,7 @@ ] ], "2": [ - "versions.yml:md5,991ee6a1ff9cb59542426a1ecf063188" + "versions.yml:md5,dd98393cd432d8472209fcb8f6be362f" ], "bai": [ [ @@ -144,18 +144,18 @@ "id": "test", "single_end": false }, - "test.bam:md5,7fef4ace398a5e5060ae54d4466c1503" + "test.bam:md5,d4e6df5e063034da268fa4b97db369d3" ] ], "versions": [ - "versions.yml:md5,991ee6a1ff9cb59542426a1ecf063188" + "versions.yml:md5,dd98393cd432d8472209fcb8f6be362f" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-26T14:27:59.945692303" + "timestamp": "2025-09-23T12:01:51.606664577" } } \ No newline at end of file diff --git a/modules/nf-core/strobealign/environment.yml b/modules/nf-core/strobealign/environment.yml new file mode 100644 index 00000000..fc1f89b8 --- /dev/null +++ b/modules/nf-core/strobealign/environment.yml @@ -0,0 +1,9 @@ +channels: + - conda-forge + - bioconda + +dependencies: + - bioconda::htslib=1.22.1 + - bioconda::samtools=1.22.1 + - bioconda::strobealign=0.16.1 + - conda-forge::pigz=2.8 diff --git a/modules/nf-core/strobealign/main.nf b/modules/nf-core/strobealign/main.nf new file mode 100644 index 00000000..26ab2489 --- /dev/null +++ b/modules/nf-core/strobealign/main.nf @@ -0,0 +1,108 @@ +process STROBEALIGN { + tag "${meta.id}" + label 'process_high' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/59/59cce6872df48a1e5cc9ccee89f066210694c6ec9f62d9c931cc6925ca0f6a5f/data' : + 'community.wave.seqera.io/library/htslib_samtools_strobealign_pigz:4fa4f439c6bea386' }" + + input: + tuple val(meta) , path(reads), path(fasta), path(index) + val sort_bam + + output: + tuple val(meta), path("*.bam") , emit: bam , optional: true + tuple val(meta), path("*.cram") , emit: cram, optional: true + tuple val(meta), path("*.csi") , emit: csi , optional: true + tuple val(meta), path("*.crai") , emit: crai, optional: true + tuple val(meta), path("*.paf.gz") , emit: paf , optional: true + tuple val(meta), path("*.tsv.gz") , emit: tsv , optional: true + tuple val(meta), path("*.sti") , emit: sti , optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + // Determine output file extension and command + def samtools_command = sort_bam ? 'sort' : 'view' + def extension = args.contains("-x") + ? "paf" + : args.contains("--aemb") + ? "tsv" + : args.contains("--create-index") + ? "sti" + : args2.contains("--output-fmt cram") + ? "cram" + : sort_bam && args2.contains("-O cram") + ? "cram" + : !sort_bam && args2.contains("-C") + ? "cram" + : "bam" + def reference = fasta && extension == "cram" ? "--reference ${fasta}" : "" + if (!fasta && extension == "cram") { + error("Fasta reference is required for CRAM output") + } + def output_cmd = extension == "bam" || extension == "cram" + ? "samtools ${samtools_command} ${args2} ${reference} --threads ${task.cpus} -o ${prefix}.${extension} -" + : extension == "paf" + ? "pigz ${args2} > ${prefix}.paf.gz" + : extension == "tsv" + ? "pigz ${args2} > ${prefix}.tsv.gz" + : extension == "sti" + ? "tee ${prefix}.log > /dev/null" + : error("Unable to determine output command for extension: ${extension}") + + """ + strobealign \\ + ${args} \\ + -t ${task.cpus} \\ + ${fasta} \\ + ${reads} \\ + | ${output_cmd} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + strobealign: \$(echo \$(strobealign --version)) + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def extension = args.contains("-x") + ? "paf" + : args.contains("--aemb") + ? "tsv" + : args2.contains("--output-fmt cram") + ? "cram" + : sort_bam && args2.contains("-O cram") + ? "cram" + : !sort_bam && args2.contains("-C") + ? "cram" + : "bam" + + """ + touch ${prefix}.${extension} + touch ${prefix}.csi + touch ${prefix}.crai + echo "" | pigz > ${prefix}.paf.gz + echo "" | pigz > ${prefix}.tsv.gz + touch ${prefix}.sti + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + strobealign: \$(echo \$(strobealign --version)) + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/strobealign/meta.yml b/modules/nf-core/strobealign/meta.yml new file mode 100644 index 00000000..e4ede404 --- /dev/null +++ b/modules/nf-core/strobealign/meta.yml @@ -0,0 +1,142 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "strobealign" +description: "Align short reads using dynamic seed size with strobemers" +keywords: + - strobealign + - strobemers + - alignment + - map + - fastq + - bam + - sam +tools: + - "strobealign": + description: "Align short reads using dynamic seed size with strobemers" + homepage: "https://github.com/ksahlin/strobealign" + documentation: "https://github.com/ksahlin/strobealign?tab=readme-ov-file#usage" + tool_dev_url: "https://github.com/ksahlin/strobealign" + doi: "10.1186/s13059-022-02831-7" + licence: ["MIT"] + identifier: biotools:strobealign + +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. + ontologies: + - edam: "http://edamontology.org/data_2044" # Sequence + - edam: "http://edamontology.org/format_1930" # FASTQ + - - meta2: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fasta,fa}" + ontologies: + - edam: "http://edamontology.org/data_2044" # Sequence + - edam: "http://edamontology.org/format_1929" # FASTA + - - meta3: + type: map + description: | + Groovy Map containing reference information. + e.g. [ id:'test', single_end:false ] + - index: + type: file + description: Strobealign genome index file + pattern: "*.sti" + ontologies: + - edam: "http://edamontology.org/data_3210" # Genome index + - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" +output: + bam: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.bam": + type: file + description: Output BAM file containing read alignments + pattern: "*.{bam}" + ontologies: + - edam: "http://edamontology.org/format_2572" # BAM + cram: + - - meta: + type: file + description: Output BAM file containing read alignments + ontologies: [] + - "*.cram": + type: file + description: Output CRAM file containing read alignments + pattern: "*.{cram}" + ontologies: + - edam: "http://edamontology.org/format_3462" # CRAM + csi: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.csi": + type: file + description: Optional index file for BAM file + pattern: "*.{csi}" + ontologies: [] + crai: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.crai": + type: file + description: Optional index file for CRAM file + pattern: "*.{crai}" + ontologies: [] + paf: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.paf.gz": + type: file + description: Output PAF file containing read alignments + pattern: "*.{paf.gz}" + ontologies: [] + tsv: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.tsv.gz": + type: file + description: Output TSV file containing read alignments + pattern: "*.{tsv.gz}" + ontologies: + - edam: "http://edamontology.org/format_3475" # TSV + sti: + - - meta: + type: map + description: Groovy Map containing sample information + - "*.sti": + type: file + description: Optional strobealign index file for fasta reference + pattern: "*.{sti}" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@matthdsm" +maintainers: + - "@matthdsm" + - "@nvnieuwk" diff --git a/modules/nf-core/strobealign/tests/main.nf.test b/modules/nf-core/strobealign/tests/main.nf.test new file mode 100644 index 00000000..360637c0 --- /dev/null +++ b/modules/nf-core/strobealign/tests/main.nf.test @@ -0,0 +1,303 @@ +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: +// nf-core modules test strobealign +nextflow_process { + + name "Test Process STROBEALIGN" + script "../main.nf" + config './nextflow.config' + process "STROBEALIGN" + + tag "modules" + tag "modules_nfcore" + tag "strobealign" + + test("fastq - sorted bam") { + when { + params { + module_args = "" + module_args2 = "--output-fmt bam --write-index" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + 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) + ], + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ] + input[2] = [[:], []] + input[3] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.bam, + process.out.csi, + process.out.versions + ).match() } + ) + } + } + + test("fastq - unsorted bam") { + when { + params { + module_args = "" + module_args2 = "--output-fmt bam" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + 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) + ], + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ] + input[2] = [[:], []] + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.bam, + process.out.versions + ).match() } + ) + } + } + + test("fastq - sorted cram") { + when { + params { + module_args = "" + module_args2 = "--output-fmt cram,version=3.0 --write-index" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + 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) + ], + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ] + input[2] = [[:], []] + input[3] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + cram(process.out.cram[0][1], 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/sarscov2/genome/genome.fasta').getReadsMD5(), + file(process.out.crai[0][1]).exists(), + process.out.versions + ).match() } + ) + } + } + + test("fastq - unsorted cram") { + when { + params { + module_args = "" + module_args2 = "--output-fmt cram,version=3.0" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + 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) + ], + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ] + input[2] = [[:], []] + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + cram(process.out.cram[0][1], 'https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/sarscov2/genome/genome.fasta').getReadsMD5(), + process.out.versions + ).match() } + ) + } + } + + test("fastq - paf") { + when { + params { + module_args = "-x" + module_args2 = "" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + 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) + ], + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ] + input[2] = [[:], []] + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.paf, + process.out.versions + ).match() } + ) + } + } + + test("fastq - tsv") { + when { + params { + module_args = "--aemb" + module_args2 = "" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + 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) + ], + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ] + input[2] = [[:], []] + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.tsv, + process.out.versions + ).match() } + ) + } + } + + test("fastq - sti") { + when { + params { + module_args = "--create-index" + module_args2 = "" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + 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) + ], + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ] + input[2] = [[:], []] + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.sti, + process.out.versions + ).match() } + ) + } + } + + test("stub") { + options "-stub" + when { + params { + module_args = "" + module_args2 = "" + } + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + [ + 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) + ], + ] + input[1] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ] + input[2] = [[:], []] + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/strobealign/tests/main.nf.test.snap b/modules/nf-core/strobealign/tests/main.nf.test.snap new file mode 100644 index 00000000..2b8f54dd --- /dev/null +++ b/modules/nf-core/strobealign/tests/main.nf.test.snap @@ -0,0 +1,274 @@ +{ + "fastq - sorted cram": { + "content": [ + "f3a1593b170cf1e9b9008b3afb77cc53", + true, + [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-16T12:55:51.0954" + }, + "fastq - sti": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "genome.fasta.r150.sti:md5,1fa95f6ba0167a729ddc6a444eb5e8f7" + ] + ], + [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-16T12:31:45.186708" + }, + "fastq - unsorted cram": { + "content": [ + "57aeef88ed701a8ebc8e2f0a381b2a6", + [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-16T12:42:46.49042" + }, + "fastq - tsv": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv.gz:md5,1fcb7444ba029b7f41b3a836fec7ecac" + ] + ], + [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-16T12:31:39.58768" + }, + "stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "5": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "6": [ + [ + { + "id": "test", + "single_end": false + }, + "test.sti:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "crai": [ + [ + { + "id": "test", + "single_end": false + }, + "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "cram": [ + + ], + "csi": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "paf": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "sti": [ + [ + { + "id": "test", + "single_end": false + }, + "test.sti:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tsv": [ + [ + { + "id": "test", + "single_end": false + }, + "test.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-16T11:56:39.765352" + }, + "fastq - unsorted bam": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,740d88010349b3cd487a8b6244c64c0d" + ] + ], + [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-16T12:31:18.225205" + }, + "fastq - paf": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.paf.gz:md5,0992a1eb3dff9beca5849b9d1fc66390" + ] + ], + [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-16T12:31:34.790627" + }, + "fastq - sorted bam": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,c9bf092d8998eac47b6b85afe9aa9038" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.csi:md5,8d53854f92b3f263db0ed27f4bbad054" + ] + ], + [ + "versions.yml:md5,5de873596967072366007d67fe652250" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-16T12:31:12.870782" + } +} \ No newline at end of file diff --git a/modules/nf-core/strobealign/tests/nextflow.config b/modules/nf-core/strobealign/tests/nextflow.config new file mode 100644 index 00000000..7c6b31b6 --- /dev/null +++ b/modules/nf-core/strobealign/tests/nextflow.config @@ -0,0 +1,6 @@ +process { + withName: STROBEALIGN { + ext.args = params.module_args + ext.args2 = params.module_args2 + } +} diff --git a/nextflow_schema.json b/nextflow_schema.json index d6a4828f..1003fc1b 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -55,7 +55,7 @@ "type": "string", "default": "bowtie2", "description": "Which aligner to use", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "star"] + "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star"] }, "markdup": { "type": "string", diff --git a/subworkflows/nf-core/fastq_align_dna/main.nf b/subworkflows/nf-core/fastq_align_dna/main.nf index 6239522f..aa80527c 100644 --- a/subworkflows/nf-core/fastq_align_dna/main.nf +++ b/subworkflows/nf-core/fastq_align_dna/main.nf @@ -10,6 +10,7 @@ include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' +include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" @@ -36,6 +37,8 @@ workflow FASTQ_ALIGN_DNA { return [meta, reads, index, fasta] snap : aligner == 'snap' return [meta, reads, index] + strobe : aligner == 'strobe' + return [meta, reads, fasta, index] other : true } .set{ch_to_align} @@ -47,28 +50,33 @@ workflow FASTQ_ALIGN_DNA { // Align fastq files to reference genome and (optionally) sort BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) // if aligner is bowtie2 - ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) + ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions.first()) BWAMEM1_MEM (ch_to_align.bwamem, sort) // If aligner is bwa-mem - ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) - ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) + ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) + ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions.first()) BWAMEM2_MEM (ch_to_align.bwamem2, sort) // If aligner is bwa-mem2 - ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) + ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions.first()) DRAGMAP_ALIGN(ch_to_align.dragmap, sort) // If aligner is dragmap - ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) - ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) + ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) + ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions.first()) SNAP_ALIGN(ch_to_align.snap) // If aligner is snap - ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) - ch_bam_index.mix(SNAP_ALIGN.out.bai) + ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) + ch_bam_index.mix(SNAP_ALIGN.out.bai) ch_versions = ch_versions.mix(SNAP_ALIGN.out.versions.first()) + STROBEALIGN(ch_to_align.strobe, sort) // If aligner is strobealign + ch_bam = ch_bam.mix(STROBEALIGN.out.bam) + ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) + ch_versions = ch_versions.mix(STROBEALIGN.out.versions.first()) + emit: bam = ch_bam // channel: [ [meta], bam ] bam_index = ch_bam_index // channel: [ [meta], csi/bai ] diff --git a/subworkflows/nf-core/fastq_align_dna/meta.yml b/subworkflows/nf-core/fastq_align_dna/meta.yml index cd452612..26c3e237 100644 --- a/subworkflows/nf-core/fastq_align_dna/meta.yml +++ b/subworkflows/nf-core/fastq_align_dna/meta.yml @@ -9,12 +9,14 @@ keywords: - bwamem2 - dragmap - snapaligner + - strobealign components: - bowtie2/align - bwa/mem - bwamem2/mem - dragmap/align - snapaligner/align + - strobealign input: - meta: type: map @@ -53,6 +55,7 @@ input: - bwamem2 - dragmap - snap + - strobealign - sort_bam: type: boolean description: sort output diff --git a/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test b/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test index 48988102..b65eec69 100644 --- a/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test @@ -22,6 +22,7 @@ nextflow_workflow { tag "snapaligner" tag "snapaligner/index" tag "snapaligner/align" + tag "strobealign" test("test_fastq_align_bowtie2_SE") { setup { @@ -355,6 +356,46 @@ nextflow_workflow { } } + then { + assertAll( + { assert workflow.success}, + { assert snapshot(workflow.out).match()} + ) + } + } + test ("test_fastq_align_strobealign_SE"){ + when { + workflow { + """ + 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)]]) + input[1] = [[:],[]] + input[2] = Channel.of([ [ id:'genome' ],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + input[3] = "strobealign" + input[4] = true + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot(workflow.out).match()} + ) + } + } + test ("test_fastq_align_strobealign_PE"){ + when { + workflow { + """ + input[0] = Channel.of([[ id:'test', single_end:false ], [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] = [[:],[]] + input[2] = Channel.of([ [ id:'genome' ],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + input[3] = "strobealign" + input[4] = true + """ + } + } + then { assertAll( { assert workflow.success}, diff --git a/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap index a4fd38bc..9e34d924 100644 --- a/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap @@ -9,14 +9,14 @@ ], [ - "versions.yml:md5,0e1a9cd2ce7baf650bec3dd365fbced7" + "versions.yml:md5,792091aac50160e3fbc865eba482e0c4" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:57:56.74202649" + "timestamp": "2025-09-23T11:46:20.36265064" }, "test_fastq_align_dragmap_PE": { "content": [ @@ -37,6 +37,53 @@ }, "timestamp": "2024-03-14T08:28:25.283436546" }, + "test_fastq_align_strobealign_PE": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,1d8fb5dce75cbfb87955c7ee03c17a5f" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9d1991417e63455f5e7fe9d67e5985a4" + ], + "bam": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,1d8fb5dce75cbfb87955c7ee03c17a5f" + ] + ], + "bam_index": [ + + ], + "reports": [ + + ], + "versions": [ + "versions.yml:md5,9d1991417e63455f5e7fe9d67e5985a4" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-23T14:32:08.743821" + }, "test_fastq_align_bwa_mem_SE": { "content": [ "test.bam", @@ -47,14 +94,14 @@ ], [ - "versions.yml:md5,83f7314fe48e4c905a39e47723c78039" + "versions.yml:md5,315f4ae70b5322c025925d84c887da18" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:56:27.900928171" + "timestamp": "2025-09-23T11:20:12.631487104" }, "test_fastq_align_bwamem2_SE": { "content": [ @@ -66,14 +113,14 @@ ], [ - "versions.yml:md5,0e1a9cd2ce7baf650bec3dd365fbced7" + "versions.yml:md5,792091aac50160e3fbc865eba482e0c4" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:57:28.080810832" + "timestamp": "2025-09-23T11:46:07.813351063" }, "test_fastq_align_bwa_mem_PE": { "content": [ @@ -85,14 +132,14 @@ ], [ - "versions.yml:md5,83f7314fe48e4c905a39e47723c78039" + "versions.yml:md5,315f4ae70b5322c025925d84c887da18" ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-27T08:56:55.897418514" + "timestamp": "2025-09-23T11:20:21.322039351" }, "test_fastq_align_bowtie2_SE": { "content": [ @@ -144,7 +191,7 @@ "id": "test", "single_end": false }, - "test.bam:md5,1f4f6c38e40ddd5da7f644bb0f794aa8" + "test.bam:md5,504bcc1ac7f8d8e1e728276a4ce4f4d4" ] ], "1": [ @@ -154,7 +201,7 @@ ], "3": [ - "versions.yml:md5,ef9883fd373e293fbf6a98985d3c0308" + "versions.yml:md5,e98be7da5d37b69852090365352c3534" ], "bam": [ [ @@ -162,7 +209,7 @@ "id": "test", "single_end": false }, - "test.bam:md5,1f4f6c38e40ddd5da7f644bb0f794aa8" + "test.bam:md5,504bcc1ac7f8d8e1e728276a4ce4f4d4" ] ], "bam_index": [ @@ -172,15 +219,62 @@ ], "versions": [ - "versions.yml:md5,ef9883fd373e293fbf6a98985d3c0308" + "versions.yml:md5,e98be7da5d37b69852090365352c3534" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-23T12:03:34.617919741" + }, + "test_fastq_align_strobealign_SE": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,30a9339ac99b881844cf8514f719f204" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + "versions.yml:md5,9d1991417e63455f5e7fe9d67e5985a4" + ], + "bam": [ + [ + { + "id": "test", + "single_end": true + }, + "test.bam:md5,30a9339ac99b881844cf8514f719f204" + ] + ], + "bam_index": [ + + ], + "reports": [ + + ], + "versions": [ + "versions.yml:md5,9d1991417e63455f5e7fe9d67e5985a4" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-03-14T08:19:36.298315938" + "timestamp": "2025-09-23T14:32:01.424171" }, "test_fastq_align_snapaligner_SE": { "content": [ @@ -191,7 +285,7 @@ "id": "test", "single_end": true }, - "test.bam:md5,6b3188b8e48ec5c155cfe02b9a24d37a" + "test.bam:md5,9de00a20df23dc66ddf0d9bba2e486c3" ] ], "1": [ @@ -201,7 +295,7 @@ ], "3": [ - "versions.yml:md5,ef9883fd373e293fbf6a98985d3c0308" + "versions.yml:md5,e98be7da5d37b69852090365352c3534" ], "bam": [ [ @@ -209,7 +303,7 @@ "id": "test", "single_end": true }, - "test.bam:md5,6b3188b8e48ec5c155cfe02b9a24d37a" + "test.bam:md5,9de00a20df23dc66ddf0d9bba2e486c3" ] ], "bam_index": [ @@ -219,14 +313,14 @@ ], "versions": [ - "versions.yml:md5,ef9883fd373e293fbf6a98985d3c0308" + "versions.yml:md5,e98be7da5d37b69852090365352c3534" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nextflow": "25.04.7" }, - "timestamp": "2025-03-25T08:46:43.073714962" + "timestamp": "2025-09-23T12:03:25.88186957" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dna/tests/nextflow.config b/subworkflows/nf-core/fastq_align_dna/tests/nextflow.config deleted file mode 100644 index 87892757..00000000 --- a/subworkflows/nf-core/fastq_align_dna/tests/nextflow.config +++ /dev/null @@ -1,12 +0,0 @@ -process { - withName: BOWTIE2_BUILD { - } - withName: BWA_INDEX { - } - withName: BWAMEM2_INDEX { - } - withName: DRAGMAP_HASHTABLE { - } - withName: SNAPALIGNER_INDEX { - } -} From 35d1d62685acfb9995876bc3b33115703b2abf8b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:31:30 +0100 Subject: [PATCH 049/202] clean up subwf --- subworkflows/nf-core/fastq_align_dna/main.nf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/subworkflows/nf-core/fastq_align_dna/main.nf b/subworkflows/nf-core/fastq_align_dna/main.nf index aa80527c..95cdf670 100644 --- a/subworkflows/nf-core/fastq_align_dna/main.nf +++ b/subworkflows/nf-core/fastq_align_dna/main.nf @@ -5,12 +5,12 @@ // -include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" -include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' -include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' -include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" -include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' -include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" +include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" +include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' +include { BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' +include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" +include { SNAPALIGNER_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' +include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" @@ -67,10 +67,10 @@ workflow FASTQ_ALIGN_DNA { ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions.first()) - SNAP_ALIGN(ch_to_align.snap) // If aligner is snap - ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) - ch_bam_index.mix(SNAP_ALIGN.out.bai) - ch_versions = ch_versions.mix(SNAP_ALIGN.out.versions.first()) + SNAPALIGNER_ALIGN(ch_to_align.snap) // If aligner is snap + ch_bam = ch_bam.mix(SNAPALIGNER_ALIGN.out.bam) + ch_bam_index.mix(SNAPALIGNER_ALIGN.out.bai) + ch_versions = ch_versions.mix(SNAPALIGNER_ALIGN.out.versions.first()) STROBEALIGN(ch_to_align.strobe, sort) // If aligner is strobealign ch_bam = ch_bam.mix(STROBEALIGN.out.bam) From 97b80716a50e483a4435776d3152e8546df8a651 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:31:43 +0100 Subject: [PATCH 050/202] bump nf-schema --- nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextflow.config b/nextflow.config index d9645896..a7453b62 100644 --- a/nextflow.config +++ b/nextflow.config @@ -280,7 +280,7 @@ manifest { // Nextflow plugins plugins { - id 'nf-schema@2.5.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-schema@2.6.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet } validation { From a07c9751d32a16f466eac2b81ad694a85ca885b6 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:38:24 +0100 Subject: [PATCH 051/202] bump fastp --- modules.json | 4 +- modules/nf-core/fastp/environment.yml | 5 +- modules/nf-core/fastp/main.nf | 14 +- modules/nf-core/fastp/meta.yml | 72 ++-- modules/nf-core/fastp/tests/main.nf.test | 313 +++++++++++------- modules/nf-core/fastp/tests/main.nf.test.snap | 243 +++++--------- modules/nf-core/fastp/tests/tags.yml | 2 - workflows/preprocessing.nf | 2 +- 8 files changed, 337 insertions(+), 318 deletions(-) delete mode 100644 modules/nf-core/fastp/tests/tags.yml diff --git a/modules.json b/modules.json index cd0c8667..d46b407d 100644 --- a/modules.json +++ b/modules.json @@ -47,7 +47,7 @@ }, "fastp": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", "installed_by": ["modules"], "patch": "modules/nf-core/fastp/fastp.diff" }, @@ -156,7 +156,7 @@ "strobealign": { "branch": "master", "git_sha": "d5cc72b63c4e1565cb66e83f0577b04c0bb54d5c", - "installed_by": ["_", "a", "d", "f", "g", "i", "l", "n", "q", "s", "t"] + "installed_by": ["fastq_align_dna", "modules"] } } }, diff --git a/modules/nf-core/fastp/environment.yml b/modules/nf-core/fastp/environment.yml index 26d4aca5..0c36eed2 100644 --- a/modules/nf-core/fastp/environment.yml +++ b/modules/nf-core/fastp/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::fastp=0.23.4 + # renovate: datasource=conda depName=bioconda/fastp + - bioconda::fastp=1.0.1 diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf index 02b69407..85013f5d 100644 --- a/modules/nf-core/fastp/main.nf +++ b/modules/nf-core/fastp/main.nf @@ -4,12 +4,11 @@ process FASTP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/fastp:0.23.4--h5f740d0_0' : - 'biocontainers/fastp:0.23.4--h5f740d0_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/52/527b18847a97451091dba07a886b24f17f742a861f9f6c9a6bfb79d4f1f3bf9d/data' : + 'community.wave.seqera.io/library/fastp:1.0.1--c8b87fe62dcc103c' }" input: - tuple val(meta), path(reads) - path adapter_fasta + tuple val(meta), path(reads), path(adapter_fasta) val discard_trimmed_pass val save_trimmed_fail val save_merged @@ -48,7 +47,7 @@ process FASTP { $adapter_list \\ $fail_fastq \\ $args \\ - 2> >(tee ${prefix}.fastp.log >&2) \\ + 2>| >(tee ${prefix}.fastp.log >&2) \\ | gzip -c > ${prefix}.fastp.fastq.gz cat <<-END_VERSIONS > versions.yml @@ -69,7 +68,7 @@ process FASTP { $adapter_list \\ $fail_fastq \\ $args \\ - 2> >(tee ${prefix}.fastp.log >&2) + 2>| >(tee ${prefix}.fastp.log >&2) cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -92,8 +91,9 @@ process FASTP { $fail_fastq \\ $merge_fastq \\ --thread $task.cpus \\ + --detect_adapter_for_pe \\ $args \\ - 2> >(tee ${prefix}.fastp.log >&2) + 2>| >(tee ${prefix}.fastp.log >&2) cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/fastp/meta.yml b/modules/nf-core/fastp/meta.yml index 159404d0..324025fe 100644 --- a/modules/nf-core/fastp/meta.yml +++ b/modules/nf-core/fastp/meta.yml @@ -24,24 +24,27 @@ input: List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. If you wish to run interleaved paired-end data, supply as single-end data but with `--interleaved_in` in your `modules.conf`'s `ext.args` for the module. - - - adapter_fasta: + ontologies: [] + - adapter_fasta: type: file description: File in FASTA format containing possible adapters to remove. pattern: "*.{fasta,fna,fas,fa}" - - - discard_trimmed_pass: - type: boolean - description: Specify true to not write any reads that pass trimming thresholds. - | This can be used to use fastp for the output report only. - - - save_trimmed_fail: - type: boolean - description: Specify true to save files that failed to pass trimming thresholds - ending in `*.fail.fastq.gz` - - - save_merged: - type: boolean - description: Specify true to save all merged reads to a file ending in `*.merged.fastq.gz` + ontologies: [] + - discard_trimmed_pass: + type: boolean + description: | + Specify true to not write any reads that pass trimming thresholds. + This can be used to use fastp for the output report only. + - save_trimmed_fail: + type: boolean + description: Specify true to save files that failed to pass trimming thresholds + ending in `*.fail.fastq.gz` + - save_merged: + type: boolean + description: Specify true to save all merged reads to a file ending in `*.merged.fastq.gz` output: - - reads: - - meta: + reads: + - - meta: type: map description: | Groovy Map containing sample information @@ -50,8 +53,10 @@ output: type: file description: The trimmed/modified/unmerged fastq reads pattern: "*fastp.fastq.gz" - - json: - - meta: + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + json: + - - meta: type: map description: | Groovy Map containing sample information @@ -60,8 +65,10 @@ output: type: file description: Results in JSON format pattern: "*.json" - - html: - - meta: + ontologies: + - edam: http://edamontology.org/format_3464 # JSON + html: + - - meta: type: map description: | Groovy Map containing sample information @@ -70,8 +77,9 @@ output: type: file description: Results in HTML format pattern: "*.html" - - log: - - meta: + ontologies: [] + log: + - - meta: type: map description: | Groovy Map containing sample information @@ -80,8 +88,9 @@ output: type: file description: fastq log file pattern: "*.log" - - reads_fail: - - meta: + ontologies: [] + reads_fail: + - - meta: type: map description: | Groovy Map containing sample information @@ -90,8 +99,10 @@ output: type: file description: Reads the failed the preprocessing pattern: "*fail.fastq.gz" - - reads_merged: - - meta: + ontologies: + - edam: http://edamontology.org/format_3989 # GZIP format + reads_merged: + - - meta: type: map description: | Groovy Map containing sample information @@ -100,11 +111,14 @@ output: type: file description: Reads that were successfully merged pattern: "*.{merged.fastq.gz}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@drpatelh" - "@kevinmenden" diff --git a/modules/nf-core/fastp/tests/main.nf.test b/modules/nf-core/fastp/tests/main.nf.test index 30dbb8aa..5125705c 100644 --- a/modules/nf-core/fastp/tests/main.nf.test +++ b/modules/nf-core/fastp/tests/main.nf.test @@ -13,14 +13,19 @@ nextflow_process { 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) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -31,11 +36,11 @@ nextflow_process { { 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.json, process.out.reads, process.out.reads_fail, process.out.reads_merged, - process.out.versions).match() } + process.out.versions).match() + } ) } } @@ -46,20 +51,22 @@ nextflow_process { process { """ - adapter_fasta = [] - save_trimmed_pass = true - save_trimmed_fail = false - save_merged = false + 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) ] + [ + 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] = [] - input[2] = false - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -70,7 +77,6 @@ nextflow_process { { 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.json, process.out.reads, process.out.reads_fail, process.out.reads_merged, @@ -85,14 +91,19 @@ nextflow_process { 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) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -106,7 +117,6 @@ nextflow_process { { assert process.out.reads_merged == [] }, { assert snapshot( process.out.reads, - process.out.json, process.out.versions).match() } ) } @@ -118,14 +128,19 @@ nextflow_process { 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) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = true - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -136,7 +151,6 @@ nextflow_process { { 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.json, process.out.reads, process.out.reads_fail, process.out.reads_merged, @@ -151,15 +165,22 @@ nextflow_process { 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)] + [ + 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] = [] - input[2] = false - input[3] = true - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -173,7 +194,6 @@ nextflow_process { process.out.reads, process.out.reads_fail, process.out.reads_merged, - process.out.json, process.out.versions).match() } ) } @@ -184,15 +204,22 @@ nextflow_process { 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) ] + [ + 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] = [] - input[2] = false - input[3] = false - input[4] = true + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -203,7 +230,6 @@ nextflow_process { { 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.json, process.out.reads, process.out.reads_fail, process.out.reads_merged, @@ -217,15 +243,22 @@ nextflow_process { 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) ] + [ + 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] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) + input[1] = false input[2] = false - input[3] = false - input[4] = true + input[3] = true """ } } @@ -236,7 +269,6 @@ nextflow_process { { 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.json, process.out.reads, process.out.reads_fail, process.out.reads_merged, @@ -250,14 +282,20 @@ nextflow_process { 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) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = true - input[3] = false - input[4] = false + + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -268,7 +306,6 @@ nextflow_process { { 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.json, process.out.reads, process.out.reads, process.out.reads_fail, @@ -285,15 +322,22 @@ nextflow_process { 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) ] + [ + 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] = [] - input[2] = true - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -304,7 +348,6 @@ nextflow_process { { 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.json, process.out.reads, process.out.reads, process.out.reads_fail, @@ -324,14 +367,19 @@ nextflow_process { 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) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -352,20 +400,20 @@ nextflow_process { process { """ - adapter_fasta = [] - save_trimmed_pass = true - save_trimmed_fail = false - save_merged = false + 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) ] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -386,14 +434,19 @@ nextflow_process { 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) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -414,14 +467,19 @@ nextflow_process { 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) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = true - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -442,15 +500,20 @@ nextflow_process { 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)] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true)], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = true - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -470,15 +533,20 @@ nextflow_process { 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) ] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = false - input[3] = false - input[4] = true + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -498,15 +566,22 @@ nextflow_process { 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) ] + [ + 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] = Channel.of([ file(params.modules_testdata_base_path + 'delete_me/fastp/adapters.fasta', checkIfExists: true) ]) - input[2] = false - input[3] = false - input[4] = true + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -526,14 +601,19 @@ nextflow_process { 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) ] + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = true - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -553,15 +633,20 @@ nextflow_process { 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) ] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) ], + adapter_fasta ]) - input[1] = [] - input[2] = true - input[3] = false - input[4] = false + input[1] = discard_trimmed_pass + input[2] = save_trimmed_fail + input[3] = save_merged """ } } @@ -573,4 +658,4 @@ nextflow_process { ) } } -} \ No newline at end of file +} diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap index 54be7e45..a30c680d 100644 --- a/modules/nf-core/fastp/tests/main.nf.test.snap +++ b/modules/nf-core/fastp/tests/main.nf.test.snap @@ -39,7 +39,7 @@ ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -78,27 +78,18 @@ ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T14:31:10.841098" + "timestamp": "2025-09-11T09:55:42.073182" }, "test_fastp_paired_end": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,1e0f8e27e71728e2b63fc64086be95cd" - ] - ], [ [ { @@ -118,26 +109,17 @@ ], [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:43:28.665779" + "timestamp": "2025-09-19T16:23:12.436191" }, "test_fastp_paired_end_merged_adapterlist": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,5914ca3f21ce162123a824e33e8564f6" - ] - ], [ [ { @@ -163,26 +145,17 @@ ] ], [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:44:18.210375" + "timestamp": "2025-09-19T16:23:32.267735" }, "test_fastp_single_end_qc_only": { "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,5cc5f01e449309e0e689ed6f51a2294a" - ] - ], [ ], @@ -202,14 +175,14 @@ ], [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:44:27.380974" + "timestamp": "2025-09-19T16:23:36.149003" }, "test_fastp_paired_end_trim_fail": { "content": [ @@ -242,23 +215,14 @@ ], [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,4c3268ddb50ea5b33125984776aa3519" - ] - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:43:58.749589" + "timestamp": "2025-09-19T16:23:24.23891" }, "fastp - stub test_fastp_interleaved": { "content": [ @@ -306,7 +270,7 @@ ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -351,15 +315,15 @@ ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:50:00.270029" + "timestamp": "2025-09-11T09:55:19.47199" }, "test_fastp_single_end - stub": { "content": [ @@ -407,7 +371,7 @@ ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -452,15 +416,15 @@ ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:49:42.502789" + "timestamp": "2025-09-11T09:55:09.617001" }, "test_fastp_paired_end_merged_adapterlist - stub": { "content": [ @@ -517,7 +481,7 @@ ] ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -571,15 +535,15 @@ ] ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:54:53.458252" + "timestamp": "2025-09-11T09:55:37.413738" }, "test_fastp_paired_end_merged - stub": { "content": [ @@ -636,7 +600,7 @@ ] ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -690,27 +654,18 @@ ] ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:50:27.689379" + "timestamp": "2025-09-11T09:55:32.965652" }, "test_fastp_paired_end_merged": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,b712fd68ed0322f4bec49ff2a5237fcc" - ] - ], [ [ { @@ -736,14 +691,14 @@ ] ], [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:44:08.68476" + "timestamp": "2025-09-19T16:23:28.074624" }, "test_fastp_paired_end - stub": { "content": [ @@ -794,7 +749,7 @@ ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -842,27 +797,18 @@ ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:49:51.679221" + "timestamp": "2025-09-11T09:55:14.414258" }, "test_fastp_single_end": { "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,c852d7a6dba5819e4ac8d9673bedcacc" - ] - ], [ [ { @@ -879,14 +825,14 @@ ], [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:43:18.834322" + "timestamp": "2025-09-19T16:23:08.469846" }, "test_fastp_single_end_trim_fail - stub": { "content": [ @@ -940,7 +886,7 @@ ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -991,15 +937,15 @@ ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T14:05:36.898142" + "timestamp": "2025-09-11T09:55:23.871395" }, "test_fastp_paired_end_trim_fail - stub": { "content": [ @@ -1060,7 +1006,7 @@ ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -1118,15 +1064,15 @@ ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T14:05:49.212847" + "timestamp": "2025-09-11T09:55:28.399328" }, "fastp test_fastp_interleaved": { "content": [ @@ -1140,35 +1086,17 @@ ] ], [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,b24e0624df5cc0b11cd5ba21b726fb22" - ] - ], - [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:43:38.910832" + "timestamp": "2025-09-19T16:23:16.479494" }, "test_fastp_single_end_trim_fail": { "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.fastp.json:md5,9a7ee180f000e8d00c7fb67f06293eb5" - ] - ], [ [ { @@ -1191,26 +1119,17 @@ ], [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:43:48.22378" + "timestamp": "2025-09-19T16:23:20.299076" }, "test_fastp_paired_end_qc_only": { "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.fastp.json:md5,623064a45912dac6f2b64e3f2e9901df" - ] - ], [ ], @@ -1230,14 +1149,14 @@ ], [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T13:44:36.334938" + "timestamp": "2025-09-19T16:23:40.113724" }, "test_fastp_paired_end_qc_only - stub": { "content": [ @@ -1279,7 +1198,7 @@ ], "6": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ], "html": [ [ @@ -1318,14 +1237,14 @@ ], "versions": [ - "versions.yml:md5,48ffc994212fb1fc9f83a74fa69c9f02" + "versions.yml:md5,c4974822658d02533e660fae343f281b" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-07-05T14:31:27.096468" + "timestamp": "2025-09-11T09:55:46.696419" } } \ No newline at end of file diff --git a/modules/nf-core/fastp/tests/tags.yml b/modules/nf-core/fastp/tests/tags.yml deleted file mode 100644 index c1afcce7..00000000 --- a/modules/nf-core/fastp/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -fastp: - - modules/nf-core/fastp/** diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 68e017b1..48c7b0d1 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -205,7 +205,7 @@ workflow PREPROCESSING { // MODULE: fastp // Run QC, trimming and adapter removal // FASTP([meta, fastq], adapter_fasta, save_trimmed, save_merged) - FASTP(ch_fastq_per_sample, [], false, false, false) + FASTP(ch_fastq_per_sample.map{ meta, fastq -> return [meta, fastq, []] }, false, false, false) ch_multiqc_files = ch_multiqc_files.mix( FASTP.out.json.map { _meta, json -> return json From 76146afe67d3b4e87a47cb208bc1549cf63a0778 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:39:13 +0100 Subject: [PATCH 052/202] ditch fastqc --- .nf-core.yml | 2 +- modules.json | 5 - modules/nf-core/fastqc/environment.yml | 7 - modules/nf-core/fastqc/main.nf | 64 --- modules/nf-core/fastqc/meta.yml | 72 ---- modules/nf-core/fastqc/tests/main.nf.test | 309 -------------- .../nf-core/fastqc/tests/main.nf.test.snap | 392 ------------------ 7 files changed, 1 insertion(+), 850 deletions(-) delete mode 100644 modules/nf-core/fastqc/environment.yml delete mode 100644 modules/nf-core/fastqc/main.nf delete mode 100644 modules/nf-core/fastqc/meta.yml delete mode 100644 modules/nf-core/fastqc/tests/main.nf.test delete mode 100644 modules/nf-core/fastqc/tests/main.nf.test.snap diff --git a/.nf-core.yml b/.nf-core.yml index dc7ee414..09005197 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -38,5 +38,5 @@ template: name: preprocessing org: nf-cmgg outdir: . - skip_features: [] + skip_features: ["fastqc"] version: 2.1.0dev diff --git a/modules.json b/modules.json index d46b407d..f665a1c2 100644 --- a/modules.json +++ b/modules.json @@ -51,11 +51,6 @@ "installed_by": ["modules"], "patch": "modules/nf-core/fastp/fastp.diff" }, - "fastqc": { - "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["modules"] - }, "md5sum": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", diff --git a/modules/nf-core/fastqc/environment.yml b/modules/nf-core/fastqc/environment.yml deleted file mode 100644 index f9f54ee9..00000000 --- a/modules/nf-core/fastqc/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - conda-forge - - bioconda -dependencies: - - bioconda::fastqc=0.12.1 diff --git a/modules/nf-core/fastqc/main.nf b/modules/nf-core/fastqc/main.nf deleted file mode 100644 index 23e16634..00000000 --- a/modules/nf-core/fastqc/main.nf +++ /dev/null @@ -1,64 +0,0 @@ -process FASTQC { - tag "${meta.id}" - label 'process_medium' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/fastqc:0.12.1--hdfd78af_0' : - 'biocontainers/fastqc:0.12.1--hdfd78af_0' }" - - input: - tuple val(meta), path(reads) - - output: - tuple val(meta), path("*.html"), emit: html - tuple val(meta), path("*.zip") , emit: zip - 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}" - // Make list of old name and new name pairs to use for renaming in the bash while loop - def old_new_pairs = reads instanceof Path || reads.size() == 1 ? [[ reads, "${prefix}.${reads.extension}" ]] : reads.withIndex().collect { entry, index -> [ entry, "${prefix}_${index + 1}.${entry.extension}" ] } - def rename_to = old_new_pairs*.join(' ').join(' ') - def renamed_files = old_new_pairs.collect{ _old_name, new_name -> new_name }.join(' ') - - // The total amount of allocated RAM by FastQC is equal to the number of threads defined (--threads) time the amount of RAM defined (--memory) - // https://github.com/s-andrews/FastQC/blob/1faeea0412093224d7f6a07f777fad60a5650795/fastqc#L211-L222 - // Dividing the task.memory by task.cpu allows to stick to requested amount of RAM in the label - def memory_in_mb = task.memory ? task.memory.toUnit('MB') / task.cpus : null - // FastQC memory value allowed range (100 - 10000) - def fastqc_memory = memory_in_mb > 10000 ? 10000 : (memory_in_mb < 100 ? 100 : memory_in_mb) - - """ - printf "%s %s\\n" ${rename_to} | while read old_name new_name; do - [ -f "\${new_name}" ] || ln -s \$old_name \$new_name - done - - fastqc \\ - ${args} \\ - --threads ${task.cpus} \\ - --memory ${fastqc_memory} \\ - ${renamed_files} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.html - touch ${prefix}.zip - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml deleted file mode 100644 index c8d9d025..00000000 --- a/modules/nf-core/fastqc/meta.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: fastqc -description: Run FastQC on sequenced reads -keywords: - - quality control - - qc - - adapters - - fastq -tools: - - fastqc: - description: | - FastQC gives general quality metrics about your reads. - It provides information about the quality score distribution - across your reads, the per base sequence content (%A/C/G/T). - - You get information about adapter contamination and other - overrepresented sequences. - homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ - documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ - licence: ["GPL-2.0-only"] - identifier: biotools:fastqc -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. - ontologies: [] -output: - html: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - "*.html": - type: file - description: FastQC report - pattern: "*_{fastqc.html}" - ontologies: [] - zip: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - "*.zip": - type: file - description: FastQC report archive - pattern: "*_{fastqc.zip}" - ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML -authors: - - "@drpatelh" - - "@grst" - - "@ewels" - - "@FelixKrueger" -maintainers: - - "@drpatelh" - - "@grst" - - "@ewels" - - "@FelixKrueger" diff --git a/modules/nf-core/fastqc/tests/main.nf.test b/modules/nf-core/fastqc/tests/main.nf.test deleted file mode 100644 index e9d79a07..00000000 --- a/modules/nf-core/fastqc/tests/main.nf.test +++ /dev/null @@ -1,309 +0,0 @@ -nextflow_process { - - name "Test Process FASTQC" - script "../main.nf" - process "FASTQC" - - tag "modules" - tag "modules_nfcore" - tag "fastqc" - - 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 { - assertAll ( - { assert process.success }, - // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. - // looks like this:
    Mon 2 Oct 2023
    test.gz
    - // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).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 { - assertAll ( - { assert process.success }, - { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, - { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, - { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, - { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, - { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } - ) - } - } - - test("sarscov2 interleaved [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_interleaved.fastq.gz', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } - ) - } - } - - test("sarscov2 paired-end [bam]") { - - when { - process { - """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } - ) - } - } - - test("sarscov2 multiple [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), - 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 process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, - { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, - { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, - { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, - { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, - { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, - { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, - { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, - { assert path(process.out.html[0][1][0]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][1]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][2]).text.contains("File typeConventional base calls") }, - { assert path(process.out.html[0][1][3]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).match() } - ) - } - } - - test("sarscov2 custom_prefix") { - - when { - process { - """ - input[0] = Channel.of([ - [ id:'mysample', 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 process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, - { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, - { assert path(process.out.html[0][1]).text.contains("File typeConventional base calls") }, - { assert snapshot(process.out.versions).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 { - assertAll ( - { assert process.success }, - { assert snapshot(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 { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("sarscov2 interleaved [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_interleaved.fastq.gz', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("sarscov2 paired-end [bam] - 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/bam/test.paired_end.sorted.bam', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll ( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("sarscov2 multiple [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), - 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("sarscov2 custom_prefix - stub") { - - options "-stub" - when { - process { - """ - input[0] = Channel.of([ - [ id:'mysample', 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() } - ) - } - } -} diff --git a/modules/nf-core/fastqc/tests/main.nf.test.snap b/modules/nf-core/fastqc/tests/main.nf.test.snap deleted file mode 100644 index d5db3092..00000000 --- a/modules/nf-core/fastqc/tests/main.nf.test.snap +++ /dev/null @@ -1,392 +0,0 @@ -{ - "sarscov2 custom_prefix": { - "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:02:16.374038" - }, - "sarscov2 single-end [fastq] - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": true - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "html": [ - [ - { - "id": "test", - "single_end": true - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "zip": [ - [ - { - "id": "test", - "single_end": true - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:02:24.993809" - }, - "sarscov2 custom_prefix - stub": { - "content": [ - { - "0": [ - [ - { - "id": "mysample", - "single_end": true - }, - "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "mysample", - "single_end": true - }, - "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "html": [ - [ - { - "id": "mysample", - "single_end": true - }, - "mysample.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "zip": [ - [ - { - "id": "mysample", - "single_end": true - }, - "mysample.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:03:10.93942" - }, - "sarscov2 interleaved [fastq]": { - "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:01:42.355718" - }, - "sarscov2 paired-end [bam]": { - "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:01:53.276274" - }, - "sarscov2 multiple [fastq]": { - "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:02:05.527626" - }, - "sarscov2 paired-end [fastq]": { - "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:01:31.188871" - }, - "sarscov2 paired-end [fastq] - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:02:34.273566" - }, - "sarscov2 multiple [fastq] - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:03:02.304411" - }, - "sarscov2 single-end [fastq]": { - "content": [ - [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ] - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:01:19.095607" - }, - "sarscov2 interleaved [fastq] - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:02:44.640184" - }, - "sarscov2 paired-end [bam] - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "html": [ - [ - { - "id": "test", - "single_end": false - }, - "test.html:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,e1cc25ca8af856014824abd842e93978" - ], - "zip": [ - [ - { - "id": "test", - "single_end": false - }, - "test.zip:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.3" - }, - "timestamp": "2024-07-22T11:02:53.550742" - } -} \ No newline at end of file From 75914494829a656f9706039b134382be7996b2c7 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:40:20 +0100 Subject: [PATCH 053/202] bump md5sum --- modules.json | 2 +- modules/nf-core/md5sum/tests/nextflow.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.json b/modules.json index f665a1c2..02f245b1 100644 --- a/modules.json +++ b/modules.json @@ -53,7 +53,7 @@ }, "md5sum": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["modules"] }, "mosdepth": { diff --git a/modules/nf-core/md5sum/tests/nextflow.config b/modules/nf-core/md5sum/tests/nextflow.config index de999064..4acada55 100644 --- a/modules/nf-core/md5sum/tests/nextflow.config +++ b/modules/nf-core/md5sum/tests/nextflow.config @@ -1,2 +1,2 @@ -process.ext.args = '--tag' \ No newline at end of file +process.ext.args = '--tag' From 343b30b67c895cc9b7e229927b8f0165e86199e1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:41:00 +0100 Subject: [PATCH 054/202] bump mosdepth --- modules.json | 2 +- modules/nf-core/mosdepth/environment.yml | 6 +- modules/nf-core/mosdepth/main.nf | 4 +- modules/nf-core/mosdepth/meta.yml | 76 ++++++---- .../nf-core/mosdepth/tests/main.nf.test.snap | 132 +++++++++--------- .../nf-core/mosdepth/tests/quantized.config | 2 +- modules/nf-core/mosdepth/tests/tags.yml | 2 - .../nf-core/mosdepth/tests/threshold.config | 2 +- modules/nf-core/mosdepth/tests/window.config | 2 +- 9 files changed, 124 insertions(+), 104 deletions(-) delete mode 100644 modules/nf-core/mosdepth/tests/tags.yml diff --git a/modules.json b/modules.json index 02f245b1..5f6ae14d 100644 --- a/modules.json +++ b/modules.json @@ -58,7 +58,7 @@ }, "mosdepth": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["modules"], "patch": "modules/nf-core/mosdepth/mosdepth.diff" }, diff --git a/modules/nf-core/mosdepth/environment.yml b/modules/nf-core/mosdepth/environment.yml index e9379873..97c93721 100644 --- a/modules/nf-core/mosdepth/environment.yml +++ b/modules/nf-core/mosdepth/environment.yml @@ -1,6 +1,10 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda dependencies: # renovate: datasource=conda depName=bioconda/mosdepth - - mosdepth=0.3.8 + - mosdepth=0.3.11=h0ec343a_1 + # renovate: datasource=conda depName=bioconda/htslib + - htslib=1.22.1 diff --git a/modules/nf-core/mosdepth/main.nf b/modules/nf-core/mosdepth/main.nf index 3631cdb3..8166ac0b 100644 --- a/modules/nf-core/mosdepth/main.nf +++ b/modules/nf-core/mosdepth/main.nf @@ -4,8 +4,8 @@ process MOSDEPTH { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mosdepth:0.3.8--hd299d5a_0' : - 'biocontainers/mosdepth:0.3.8--hd299d5a_0'}" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/00/00d32b53160c26794959da7303ee6e2107afd4d292060c9f287b0af1fddbd847/data' : + 'community.wave.seqera.io/library/mosdepth_htslib:0f58993cb6d93294'}" input: tuple val(meta), path(bam), path(bai), path(bed), path(fasta) diff --git a/modules/nf-core/mosdepth/meta.yml b/modules/nf-core/mosdepth/meta.yml index dc783c90..af1ea44a 100644 --- a/modules/nf-core/mosdepth/meta.yml +++ b/modules/nf-core/mosdepth/meta.yml @@ -23,14 +23,17 @@ input: type: file description: Input BAM/CRAM file pattern: "*.{bam,cram}" + ontologies: [] - bai: type: file description: Index for BAM/CRAM file pattern: "*.{bai,crai}" + ontologies: [] - bed: type: file description: BED file with intersected intervals pattern: "*.{bed}" + ontologies: [] - - meta2: type: map description: | @@ -40,9 +43,10 @@ input: type: file description: Reference genome FASTA file pattern: "*.{fa,fasta}" + ontologies: [] output: - - global_txt: - - meta: + global_txt: + - - meta: type: map description: | Groovy Map containing sample information @@ -51,8 +55,9 @@ output: type: file description: Text file with global cumulative coverage distribution pattern: "*.{global.dist.txt}" - - summary_txt: - - meta: + ontologies: [] + summary_txt: + - - meta: type: map description: | Groovy Map containing sample information @@ -61,8 +66,9 @@ output: type: file description: Text file with summary mean depths per chromosome and regions pattern: "*.{summary.txt}" - - regions_txt: - - meta: + ontologies: [] + regions_txt: + - - meta: type: map description: | Groovy Map containing sample information @@ -71,8 +77,9 @@ output: type: file description: Text file with region cumulative coverage distribution pattern: "*.{region.dist.txt}" - - per_base_d4: - - meta: + ontologies: [] + per_base_d4: + - - meta: type: map description: | Groovy Map containing sample information @@ -81,8 +88,9 @@ output: type: file description: D4 file with per-base coverage pattern: "*.{per-base.d4}" - - per_base_bed: - - meta: + ontologies: [] + per_base_bed: + - - meta: type: map description: | Groovy Map containing sample information @@ -91,8 +99,9 @@ output: type: file description: BED file with per-base coverage pattern: "*.{per-base.bed.gz}" - - per_base_csi: - - meta: + ontologies: [] + per_base_csi: + - - meta: type: map description: | Groovy Map containing sample information @@ -101,8 +110,9 @@ output: type: file description: Index file for BED file with per-base coverage pattern: "*.{per-base.bed.gz.csi}" - - regions_bed: - - meta: + ontologies: [] + regions_bed: + - - meta: type: map description: | Groovy Map containing sample information @@ -111,8 +121,9 @@ output: type: file description: BED file with per-region coverage pattern: "*.{regions.bed.gz}" - - regions_csi: - - meta: + ontologies: [] + regions_csi: + - - meta: type: map description: | Groovy Map containing sample information @@ -121,8 +132,9 @@ output: type: file description: Index file for BED file with per-region coverage pattern: "*.{regions.bed.gz.csi}" - - quantized_bed: - - meta: + ontologies: [] + quantized_bed: + - - meta: type: map description: | Groovy Map containing sample information @@ -131,8 +143,9 @@ output: type: file description: BED file with binned coverage pattern: "*.{quantized.bed.gz}" - - quantized_csi: - - meta: + ontologies: [] + quantized_csi: + - - meta: type: map description: | Groovy Map containing sample information @@ -141,8 +154,9 @@ output: type: file description: Index file for BED file with binned coverage pattern: "*.{quantized.bed.gz.csi}" - - thresholds_bed: - - meta: + ontologies: [] + thresholds_bed: + - - meta: type: map description: | Groovy Map containing sample information @@ -152,8 +166,9 @@ output: description: BED file with the number of bases in each region that are covered at or above each threshold pattern: "*.{thresholds.bed.gz}" - - thresholds_csi: - - meta: + ontologies: [] + thresholds_csi: + - - meta: type: map description: | Groovy Map containing sample information @@ -162,11 +177,14 @@ output: type: file description: Index file for BED file with threshold coverage pattern: "*.{thresholds.bed.gz.csi}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/mosdepth/tests/main.nf.test.snap b/modules/nf-core/mosdepth/tests/main.nf.test.snap index c604540b..a063dd9f 100644 --- a/modules/nf-core/mosdepth/tests/main.nf.test.snap +++ b/modules/nf-core/mosdepth/tests/main.nf.test.snap @@ -39,7 +39,7 @@ ] ], "12": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ], "2": [ [ @@ -222,15 +222,15 @@ ] ], "versions": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-04-29T13:33:16.953408231" + "timestamp": "2025-09-23T13:06:13.219131" }, "homo_sapiens - cram, crai, bed": { "content": [ @@ -260,7 +260,7 @@ ], "12": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ], "2": [ [ @@ -289,7 +289,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "6": [ @@ -307,7 +307,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" + "test.regions.bed.gz.csi:md5,c33ac5c86370039463796f01434fc0e4" ] ], "8": [ @@ -340,7 +340,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "per_base_d4": [ @@ -367,7 +367,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" + "test.regions.bed.gz.csi:md5,c33ac5c86370039463796f01434fc0e4" ] ], "regions_txt": [ @@ -395,15 +395,15 @@ ], "versions": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-04-29T13:32:50.160217828" + "timestamp": "2025-09-23T13:22:14.011309" }, "homo_sapiens - bam, bai, [] - quantized": { "content": [ @@ -433,7 +433,7 @@ ], "12": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ], "2": [ @@ -456,7 +456,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "6": [ @@ -480,7 +480,7 @@ "id": "test", "single_end": true }, - "test.quantized.bed.gz.csi:md5,4f69e6ace50206a2768be66ded3a56f0" + "test.quantized.bed.gz.csi:md5,c0a3176a59010639455a4aefb3f247ef" ] ], "global_txt": [ @@ -507,7 +507,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "per_base_d4": [ @@ -528,7 +528,7 @@ "id": "test", "single_end": true }, - "test.quantized.bed.gz.csi:md5,4f69e6ace50206a2768be66ded3a56f0" + "test.quantized.bed.gz.csi:md5,c0a3176a59010639455a4aefb3f247ef" ] ], "regions_bed": [ @@ -556,15 +556,15 @@ ], "versions": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-04-29T13:33:01.164885111" + "timestamp": "2025-09-23T13:22:22.818082" }, "homo_sapiens - bam, bai, bed": { "content": [ @@ -594,7 +594,7 @@ ], "12": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ], "2": [ [ @@ -623,7 +623,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "6": [ @@ -641,7 +641,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" + "test.regions.bed.gz.csi:md5,c33ac5c86370039463796f01434fc0e4" ] ], "8": [ @@ -674,7 +674,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "per_base_d4": [ @@ -701,7 +701,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" + "test.regions.bed.gz.csi:md5,c33ac5c86370039463796f01434fc0e4" ] ], "regions_txt": [ @@ -729,15 +729,15 @@ ], "versions": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-04-29T13:32:39.071657456" + "timestamp": "2025-09-23T13:22:04.449943" }, "homo_sapiens - bam, bai, [] - window": { "content": [ @@ -767,7 +767,7 @@ ], "12": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ], "2": [ [ @@ -796,7 +796,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "6": [ @@ -814,7 +814,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,2a30bcb7f5c7632136b3efce24723970" + "test.regions.bed.gz.csi:md5,17a2cbe22a948d7c004b90a1f28347a1" ] ], "8": [ @@ -847,7 +847,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "per_base_d4": [ @@ -874,7 +874,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,2a30bcb7f5c7632136b3efce24723970" + "test.regions.bed.gz.csi:md5,17a2cbe22a948d7c004b90a1f28347a1" ] ], "regions_txt": [ @@ -902,15 +902,15 @@ ], "versions": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-04-29T13:32:55.631776118" + "timestamp": "2025-09-23T13:22:18.435089" }, "homo_sapiens - bam, bai, []": { "content": [ @@ -940,7 +940,7 @@ ], "12": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ], "2": [ @@ -963,7 +963,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "6": [ @@ -1002,7 +1002,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "per_base_d4": [ @@ -1039,15 +1039,15 @@ ], "versions": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-04-29T13:32:33.642125299" + "timestamp": "2025-09-23T13:21:59.785829" }, "homo_sapiens - cram, crai, []": { "content": [ @@ -1077,7 +1077,7 @@ ], "12": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ], "2": [ @@ -1100,7 +1100,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "6": [ @@ -1139,7 +1139,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "per_base_d4": [ @@ -1176,15 +1176,15 @@ ], "versions": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-04-29T13:32:44.704920941" + "timestamp": "2025-09-23T13:22:09.294766" }, "homo_sapiens - bam, bai, bed - thresholds": { "content": [ @@ -1222,11 +1222,11 @@ "id": "test", "single_end": true }, - "test.thresholds.bed.gz.csi:md5,219414a0751185adb98d2235d83ea055" + "test.thresholds.bed.gz.csi:md5,2c52ab89e7496af475de3cb2ca04c7b3" ] ], "12": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ], "2": [ [ @@ -1255,7 +1255,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "6": [ @@ -1273,7 +1273,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" + "test.regions.bed.gz.csi:md5,c33ac5c86370039463796f01434fc0e4" ] ], "8": [ @@ -1306,7 +1306,7 @@ "id": "test", "single_end": true }, - "test.per-base.bed.gz.csi:md5,6f322dc9250522a701bd68bd18fa8294" + "test.per-base.bed.gz.csi:md5,6adccf94ed775c9f53422e3e9c7af27f" ] ], "per_base_d4": [ @@ -1333,7 +1333,7 @@ "id": "test", "single_end": true }, - "test.regions.bed.gz.csi:md5,e7df086f0a36e88ca231e143d43bd3f9" + "test.regions.bed.gz.csi:md5,c33ac5c86370039463796f01434fc0e4" ] ], "regions_txt": [ @@ -1369,18 +1369,18 @@ "id": "test", "single_end": true }, - "test.thresholds.bed.gz.csi:md5,219414a0751185adb98d2235d83ea055" + "test.thresholds.bed.gz.csi:md5,2c52ab89e7496af475de3cb2ca04c7b3" ] ], "versions": [ - "versions.yml:md5,87634e525fb18990cd98fe1080ad72ce" + "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-04-29T13:33:06.737266831" + "timestamp": "2025-09-23T13:22:27.300204" } } \ No newline at end of file diff --git a/modules/nf-core/mosdepth/tests/quantized.config b/modules/nf-core/mosdepth/tests/quantized.config index 63c55350..c208a4ce 100644 --- a/modules/nf-core/mosdepth/tests/quantized.config +++ b/modules/nf-core/mosdepth/tests/quantized.config @@ -1,3 +1,3 @@ process { ext.args = "--quantize 0:1:4:100:200" -} \ No newline at end of file +} diff --git a/modules/nf-core/mosdepth/tests/tags.yml b/modules/nf-core/mosdepth/tests/tags.yml deleted file mode 100644 index 5cd2e08e..00000000 --- a/modules/nf-core/mosdepth/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -mosdepth: - - "modules/nf-core/mosdepth/**" diff --git a/modules/nf-core/mosdepth/tests/threshold.config b/modules/nf-core/mosdepth/tests/threshold.config index 9b014ddf..3302da60 100644 --- a/modules/nf-core/mosdepth/tests/threshold.config +++ b/modules/nf-core/mosdepth/tests/threshold.config @@ -1,3 +1,3 @@ process { ext.args = "--thresholds 1,10,20,30" -} \ No newline at end of file +} diff --git a/modules/nf-core/mosdepth/tests/window.config b/modules/nf-core/mosdepth/tests/window.config index 7a0f755c..7f0d08d6 100644 --- a/modules/nf-core/mosdepth/tests/window.config +++ b/modules/nf-core/mosdepth/tests/window.config @@ -1,3 +1,3 @@ process { ext.args = "--by 100" -} \ No newline at end of file +} From 876c89b590b3b2bc8c8a01178795c8fbfbd0dc47 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:41:27 +0100 Subject: [PATCH 055/202] bump multiqc --- modules.json | 2 +- modules/nf-core/multiqc/environment.yml | 2 +- modules/nf-core/multiqc/main.nf | 42 +++--- modules/nf-core/multiqc/meta.yml | 130 +++++++++++------- .../multiqc/tests/custom_prefix.config | 5 + modules/nf-core/multiqc/tests/main.nf.test | 32 ++++- .../nf-core/multiqc/tests/main.nf.test.snap | 52 ++++--- 7 files changed, 168 insertions(+), 97 deletions(-) create mode 100644 modules/nf-core/multiqc/tests/custom_prefix.config diff --git a/modules.json b/modules.json index 5f6ae14d..c14f6122 100644 --- a/modules.json +++ b/modules.json @@ -64,7 +64,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "471cf3ca1617271b9b6fea09ea2ebdee78b874de", + "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", "installed_by": ["modules"] }, "picard/collecthsmetrics": { diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index 812fc4c5..d02016a0 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::multiqc=1.29 + - bioconda::multiqc=1.32 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 0ac3c369..335afccc 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -3,11 +3,11 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.29--pyhdfd78af_0' : - 'biocontainers/multiqc:1.29--pyhdfd78af_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/8c/8c6c120d559d7ee04c7442b61ad7cf5a9e8970be5feefb37d68eeaa60c1034eb/data' : + 'community.wave.seqera.io/library/multiqc:1.32--d58f60e4deb769bf' }" input: - path multiqc_files, stageAs: "?/*" + path multiqc_files, stageAs: "?/*" path(multiqc_config) path(extra_multiqc_config) path(multiqc_logo) @@ -15,10 +15,10 @@ process MULTIQC { path(sample_names) output: - path "*multiqc_report.html", emit: report - path "*_data" , emit: data - path "*_plots" , optional:true, emit: plots - path "versions.yml" , emit: versions + path "*.html" , emit: report + path "*_data" , emit: data + path "*_plots" , optional:true, emit: plots + tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), topic: versions, emit: versions_multiqc when: task.ext.when == null || task.ext.when @@ -26,38 +26,30 @@ process MULTIQC { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ? "--filename ${task.ext.prefix}.html" : '' - def config = multiqc_config ? "--config $multiqc_config" : '' - def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : '' + def config = multiqc_config ? "--config ${multiqc_config}" : '' + def extra_config = extra_multiqc_config ? "--config ${extra_multiqc_config}" : '' def logo = multiqc_logo ? "--cl-config 'custom_logo: \"${multiqc_logo}\"'" : '' def replace = replace_names ? "--replace-names ${replace_names}" : '' def samples = sample_names ? "--sample-names ${sample_names}" : '' """ multiqc \\ --force \\ - $args \\ - $config \\ - $prefix \\ - $extra_config \\ - $logo \\ - $replace \\ - $samples \\ + ${args} \\ + ${config} \\ + ${prefix} \\ + ${extra_config} \\ + ${logo} \\ + ${replace} \\ + ${samples} \\ . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS """ stub: """ mkdir multiqc_data + touch multiqc_data/.stub mkdir multiqc_plots touch multiqc_report.html - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS """ } diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index b16c1879..4a908611 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,6 +1,6 @@ name: multiqc -description: Aggregate results from bioinformatics analyses across many samples into - a single report +description: Aggregate results from bioinformatics analyses across many samples + into a single report keywords: - QC - bioinformatics tools @@ -15,57 +15,85 @@ tools: licence: ["GPL-3.0-or-later"] identifier: biotools:multiqc input: - - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections - in multiqc_config. - pattern: "*.{yml,yaml}" - - - multiqc_logo: - type: file - description: Optional logo file for MultiQC - pattern: "*.{png}" - - - replace_names: + - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + ontologies: [] + - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + - extra_multiqc_config: + type: file + description: Second optional config yml for MultiQC. Will override common + sections in multiqc_config. + pattern: "*.{yml,yaml}" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML + - multiqc_logo: + type: file + description: Optional logo file for MultiQC + pattern: "*.{png}" + ontologies: [] + - replace_names: + type: file + description: | + Optional two-column sample renaming file. First column a set of + patterns, second column a set of corresponding replacements. Passed via + MultiQC's `--replace-names` option. + pattern: "*.{tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV + - sample_names: + type: file + description: | + Optional TSV file with headers, passed to the MultiQC --sample_names + argument. + pattern: "*.{tsv}" + ontologies: + - edam: http://edamontology.org/format_3475 # TSV +output: + report: + - "*.html": type: file - description: | - Optional two-column sample renaming file. First column a set of - patterns, second column a set of corresponding replacements. Passed via - MultiQC's `--replace-names` option. - pattern: "*.{tsv}" - - - sample_names: + description: MultiQC report file + pattern: ".html" + ontologies: [] + data: + - "*_data": + type: directory + description: MultiQC data dir + pattern: "multiqc_data" + plots: + - "*_plots": type: file - description: | - Optional TSV file with headers, passed to the MultiQC --sample_names - argument. - pattern: "*.{tsv}" -output: - - report: - - "*multiqc_report.html": - type: file - description: MultiQC report file - pattern: "multiqc_report.html" - - data: - - "*_data": - type: directory - description: MultiQC data dir - pattern: "multiqc_data" - - plots: - - "*_plots": - type: file - description: Plots created by MultiQC - pattern: "*_data" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + description: Plots created by MultiQC + pattern: "*_data" + ontologies: [] + versions_multiqc: + - - ${task.process}: + type: string + description: The process the versions were collected from + - multiqc: + type: string + description: The tool name + - multiqc --version | sed "s/.* //g: + type: string + description: The command used to generate the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - multiqc: + type: string + description: The tool name + - multiqc --version | sed "s/.* //g: + type: string + description: The command used to generate the version of the tool authors: - "@abhi18av" - "@bunop" diff --git a/modules/nf-core/multiqc/tests/custom_prefix.config b/modules/nf-core/multiqc/tests/custom_prefix.config new file mode 100644 index 00000000..b30b1358 --- /dev/null +++ b/modules/nf-core/multiqc/tests/custom_prefix.config @@ -0,0 +1,5 @@ +process { + withName: 'MULTIQC' { + ext.prefix = "custom_prefix" + } +} diff --git a/modules/nf-core/multiqc/tests/main.nf.test b/modules/nf-core/multiqc/tests/main.nf.test index 33316a7d..d1ae8b06 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test +++ b/modules/nf-core/multiqc/tests/main.nf.test @@ -30,7 +30,33 @@ nextflow_process { { assert process.success }, { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, { assert process.out.data[0] ==~ ".*/multiqc_data" }, - { assert snapshot(process.out.versions).match("multiqc_versions_single") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() } + ) + } + + } + + test("sarscov2 single-end [fastqc] - custom prefix") { + config "./custom_prefix.config" + + when { + process { + """ + input[0] = Channel.of(file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastqc/test_fastqc.zip', checkIfExists: true)) + input[1] = [] + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert process.out.report[0] ==~ ".*/custom_prefix.html" }, + { assert process.out.data[0] ==~ ".*/custom_prefix_data" } ) } @@ -56,7 +82,7 @@ nextflow_process { { assert process.success }, { assert process.out.report[0] ==~ ".*/multiqc_report.html" }, { assert process.out.data[0] ==~ ".*/multiqc_data" }, - { assert snapshot(process.out.versions).match("multiqc_versions_config") } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions")}).match() } ) } } @@ -84,7 +110,7 @@ nextflow_process { { assert snapshot(process.out.report.collect { file(it).getName() } + process.out.data.collect { file(it).getName() } + process.out.plots.collect { file(it).getName() } + - process.out.versions ).match("multiqc_stub") } + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index 25caea81..f76049d3 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -1,41 +1,61 @@ { - "multiqc_versions_single": { + "sarscov2 single-end [fastqc]": { "content": [ - [ - "versions.yml:md5,c1fe644a37468f6dae548d98bc72c2c1" - ] + { + "versions_multiqc": [ + [ + "MULTIQC", + "multiqc", + "1.32" + ] + ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.04.6" }, - "timestamp": "2025-06-03T09:17:40.895950399" + "timestamp": "2025-10-28T15:27:59.813370216" }, - "multiqc_stub": { + "sarscov2 single-end [fastqc] - stub": { "content": [ [ "multiqc_report.html", "multiqc_data", "multiqc_plots", - "versions.yml:md5,c1fe644a37468f6dae548d98bc72c2c1" + { + "versions_multiqc": [ + [ + "MULTIQC", + "multiqc", + "1.32" + ] + ] + } ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.04.6" }, - "timestamp": "2025-06-03T09:18:16.875131107" + "timestamp": "2025-10-28T15:30:48.963962021" }, - "multiqc_versions_config": { + "sarscov2 single-end [fastqc] [config]": { "content": [ - [ - "versions.yml:md5,c1fe644a37468f6dae548d98bc72c2c1" - ] + { + "versions_multiqc": [ + [ + "MULTIQC", + "multiqc", + "1.32" + ] + ] + } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.04.2" + "nextflow": "25.04.6" }, - "timestamp": "2025-06-03T09:18:03.624717769" + "timestamp": "2025-10-28T15:29:30.664969334" } } \ No newline at end of file From 3833af420b1d6e338b515ca0b2e5df0ead879cdd Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:43:09 +0100 Subject: [PATCH 056/202] bump picard modules --- modules.json | 6 +- .../picard/collecthsmetrics/environment.yml | 5 +- .../nf-core/picard/collecthsmetrics/main.nf | 10 +- .../nf-core/picard/collecthsmetrics/meta.yml | 44 +++-- .../collecthsmetrics/tests/main.nf.test | 45 ++++- .../collecthsmetrics/tests/main.nf.test.snap | 156 +++++++++++++++--- .../picard/collecthsmetrics/tests/tags.yml | 2 - .../collectmultiplemetrics/environment.yml | 5 +- .../picard/collectmultiplemetrics/main.nf | 4 +- .../picard/collectmultiplemetrics/meta.yml | 26 ++- .../tests/main.nf.test.snap | 24 +-- .../picard/collectwgsmetrics/environment.yml | 5 +- .../nf-core/picard/collectwgsmetrics/main.nf | 4 +- .../nf-core/picard/collectwgsmetrics/meta.yml | 30 ++-- .../collectwgsmetrics/tests/main.nf.test.snap | 16 +- 15 files changed, 292 insertions(+), 90 deletions(-) delete mode 100644 modules/nf-core/picard/collecthsmetrics/tests/tags.yml diff --git a/modules.json b/modules.json index c14f6122..54019971 100644 --- a/modules.json +++ b/modules.json @@ -69,19 +69,19 @@ }, "picard/collecthsmetrics": { "branch": "master", - "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["modules"], "patch": "modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff" }, "picard/collectmultiplemetrics": { "branch": "master", - "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", + "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff" }, "picard/collectwgsmetrics": { "branch": "master", - "git_sha": "49f4e50534fe4b64101e62ea41d5dc43b1324358", + "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, diff --git a/modules/nf-core/picard/collecthsmetrics/environment.yml b/modules/nf-core/picard/collecthsmetrics/environment.yml index 1d715d56..b4ac4fe0 100644 --- a/modules/nf-core/picard/collecthsmetrics/environment.yml +++ b/modules/nf-core/picard/collecthsmetrics/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::picard=3.3.0 + # renovate: datasource=conda depName=bioconda/picard + - bioconda::picard=3.4.0 diff --git a/modules/nf-core/picard/collecthsmetrics/main.nf b/modules/nf-core/picard/collecthsmetrics/main.nf index 6eb9aa0c..3a51548f 100644 --- a/modules/nf-core/picard/collecthsmetrics/main.nf +++ b/modules/nf-core/picard/collecthsmetrics/main.nf @@ -4,8 +4,8 @@ process PICARD_COLLECTHSMETRICS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.3.0--hdfd78af_0' : - 'biocontainers/picard:3.3.0--hdfd78af_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/08/0861295baa7c01fc593a9da94e82b44a729dcaf8da92be8e565da109aa549b25/data' : + 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" input: tuple val(meta), path(bam), path(bai), path(bait_intervals, stageAs: "bait/*"), path(target_intervals, stageAs: "target/*") ,path(fasta) ,path(fai) ,path(dict) @@ -20,7 +20,7 @@ process PICARD_COLLECTHSMETRICS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" + def reference = ref ? "--REFERENCE_SEQUENCE ${ref}" : "" def avail_mem = 3072 if (!task.memory) { @@ -33,14 +33,14 @@ process PICARD_COLLECTHSMETRICS { def bait_intervallist_cmd = "" if (bait_intervals =~ /.(bed|bed.gz)$/){ bait_interval_list = bait_intervals.toString().replaceAll(/.(bed|bed.gz)$/, ".interval_list") - bait_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${bait_intervals} --OUTPUT ${bait_interval_list} --SEQUENCE_DICTIONARY ${dict} --TMP_DIR ." + bait_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${bait_intervals} --OUTPUT ${bait_interval_list} --SEQUENCE_DICTIONARY ${ref_dict} --TMP_DIR ." } def target_interval_list = target_intervals def target_intervallist_cmd = "" if (target_intervals =~ /.(bed|bed.gz)$/){ target_interval_list = target_intervals.toString().replaceAll(/.(bed|bed.gz)$/, ".interval_list") - target_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${target_intervals} --OUTPUT ${target_interval_list} --SEQUENCE_DICTIONARY ${dict} --TMP_DIR ." + target_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${target_intervals} --OUTPUT ${target_interval_list} --SEQUENCE_DICTIONARY ${ref_dict} --TMP_DIR ." } diff --git a/modules/nf-core/picard/collecthsmetrics/meta.yml b/modules/nf-core/picard/collecthsmetrics/meta.yml index ea6deda3..511ae959 100644 --- a/modules/nf-core/picard/collecthsmetrics/meta.yml +++ b/modules/nf-core/picard/collecthsmetrics/meta.yml @@ -28,51 +28,68 @@ input: type: file description: An aligned BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" + ontologies: [] - bai: type: file description: Optional aligned BAM/CRAM/SAM file index pattern: "*.{bai,crai,sai}" + ontologies: [] - bait_intervals: type: file description: An interval file that contains the locations of the baits used. pattern: "*.{interval_list,bed,bed.gz}" + ontologies: [] - target_intervals: type: file description: An interval file that contains the locations of the targets. pattern: "*.{interval_list,bed,bed.gz}" + ontologies: [] - - meta2: type: map description: | Groovy Map containing reference information e.g. [ id:'genome' ] - - fasta: + - ref: type: file description: | A reference file to calculate dropout metrics measuring reduced representation of reads. Optional input. - pattern: "*.{fa,fasta,fna}" + pattern: "*.{fa,fa.gz,fasta,fasta.gz,fna,fna.gz}" + ontologies: [] - - meta3: type: map description: | Groovy Map containing reference information e.g. [ id:'genome' ] - - fai: + - ref_fai: type: file - description: Index of FASTA file. Only needed when fasta is supplied. + description: Index of reference file. Only needed when reference is supplied. pattern: "*.fai" + ontologies: [] - - meta4: type: map description: | Groovy Map containing reference information e.g. [ id:'genome' ] - - dict: + - ref_dict: type: file description: Sequence dictionary of FASTA file. Only needed when bed interval lists are supplied. pattern: "*.dict" + ontologies: [] + - - meta5: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - ref_gzi: + type: file + description: Index of reference file. Only needed when gzipped reference is supplied. + pattern: "*.gzi" + ontologies: [] output: - - metrics: - - meta: + metrics: + - - meta: type: map description: | Groovy Map containing sample information @@ -81,11 +98,14 @@ output: type: file description: Alignment metrics files generated by picard pattern: "*_{metrics}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@projectoriented" - "@matthdsm" diff --git a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test index 3bbbd8cf..fe40e7b0 100644 --- a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test +++ b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test @@ -24,6 +24,45 @@ nextflow_process { input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + input[4] = [[:],[]] + """ + } + } + + then { + def size = path(process.out.metrics[0][1]).size() + def lines = path(process.out.metrics[0][1]).readLines()[0..100] + lines.remove(3) // remove timestamp + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.metrics[0][1]).name, + size, + lines, + process.out.versions + ).match() + } + ) + } + + } + + test("sarscov2 - bam - gzippedfa") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/targets.interval_list', checkIfExists: true) + ] + input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true)] + input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz.fai', checkIfExists: true)] + input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + input[4] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz.gzi', checkIfExists: true)] """ } } @@ -63,6 +102,7 @@ nextflow_process { input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + input[4] = [[:],[]] """ } } @@ -91,6 +131,7 @@ nextflow_process { input[1] = [[:],[]] input[2] = [[:],[]] input[3] = [[:],[]] + input[4] = [[:],[]] """ } } @@ -129,6 +170,7 @@ nextflow_process { input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + input[4] = [[:],[]] """ } } @@ -167,6 +209,7 @@ nextflow_process { input[1] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] input[2] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)] input[3] = [[id:'genome'], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.dict', checkIfExists: true)] + input[4] = [[:],[]] """ } } @@ -188,4 +231,4 @@ nextflow_process { } } -} \ No newline at end of file +} diff --git a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap index 4d21710a..11b0f7c5 100644 --- a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap +++ b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap @@ -106,26 +106,142 @@ "89\t0\t0" ], [ - "versions.yml:md5,bdfc7b655683e7b66f68e894c999805e" + "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T10:51:55.291163084" + "timestamp": "2025-09-15T10:37:59.62099935" + }, + "sarscov2 - bam - gzippedfa": { + "content": [ + "test.CollectHsMetrics.coverage_metrics", + 3601, + [ + "## htsjdk.samtools.metrics.StringHeader", + "# CollectHsMetrics --BAIT_INTERVALS baits/baits.interval_list --TARGET_INTERVALS targets/targets.interval_list --INPUT test.paired_end.sorted.bam --OUTPUT test.CollectHsMetrics.coverage_metrics --REFERENCE_SEQUENCE genome.fasta.gz --METRIC_ACCUMULATION_LEVEL ALL_READS --NEAR_DISTANCE 250 --MINIMUM_MAPPING_QUALITY 20 --MINIMUM_BASE_QUALITY 20 --CLIP_OVERLAPPING_READS true --INCLUDE_INDELS false --COVERAGE_CAP 200 --SAMPLE_SIZE 10000 --ALLELE_FRACTION 0.001 --ALLELE_FRACTION 0.005 --ALLELE_FRACTION 0.01 --ALLELE_FRACTION 0.02 --ALLELE_FRACTION 0.05 --ALLELE_FRACTION 0.1 --ALLELE_FRACTION 0.2 --ALLELE_FRACTION 0.3 --ALLELE_FRACTION 0.5 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false", + "## htsjdk.samtools.metrics.StringHeader", + "", + "## METRICS CLASS\tpicard.analysis.directed.HsMetrics", + "BAIT_SET\tBAIT_TERRITORY\tBAIT_DESIGN_EFFICIENCY\tON_BAIT_BASES\tNEAR_BAIT_BASES\tOFF_BAIT_BASES\tPCT_SELECTED_BASES\tPCT_OFF_BAIT\tON_BAIT_VS_SELECTED\tMEAN_BAIT_COVERAGE\tPCT_USABLE_BASES_ON_BAIT\tPCT_USABLE_BASES_ON_TARGET\tFOLD_ENRICHMENT\tHS_LIBRARY_SIZE\tHS_PENALTY_10X\tHS_PENALTY_20X\tHS_PENALTY_30X\tHS_PENALTY_40X\tHS_PENALTY_50X\tHS_PENALTY_100X\tTARGET_TERRITORY\tGENOME_SIZE\tTOTAL_READS\tPF_READS\tPF_BASES\tPF_UNIQUE_READS\tPF_UQ_READS_ALIGNED\tPF_BASES_ALIGNED\tPF_UQ_BASES_ALIGNED\tON_TARGET_BASES\tPCT_PF_READS\tPCT_PF_UQ_READS\tPCT_PF_UQ_READS_ALIGNED\tMEAN_TARGET_COVERAGE\tMEDIAN_TARGET_COVERAGE\tMAX_TARGET_COVERAGE\tMIN_TARGET_COVERAGE\tZERO_CVG_TARGETS_PCT\tPCT_EXC_DUPE\tPCT_EXC_ADAPTER\tPCT_EXC_MAPQ\tPCT_EXC_BASEQ\tPCT_EXC_OVERLAP\tPCT_EXC_OFF_TARGET\tFOLD_80_BASE_PENALTY\tPCT_TARGET_BASES_1X\tPCT_TARGET_BASES_2X\tPCT_TARGET_BASES_10X\tPCT_TARGET_BASES_20X\tPCT_TARGET_BASES_30X\tPCT_TARGET_BASES_40X\tPCT_TARGET_BASES_50X\tPCT_TARGET_BASES_100X\tPCT_TARGET_BASES_250X\tPCT_TARGET_BASES_500X\tPCT_TARGET_BASES_1000X\tPCT_TARGET_BASES_2500X\tPCT_TARGET_BASES_5000X\tPCT_TARGET_BASES_10000X\tPCT_TARGET_BASES_25000X\tPCT_TARGET_BASES_50000X\tPCT_TARGET_BASES_100000X\tAT_DROPOUT\tGC_DROPOUT\tHET_SNP_SENSITIVITY\tHET_SNP_Q\tSAMPLE\tLIBRARY\tREAD_GROUP", + "baits\t158\t0.594937\t725\t3985\t22691\t0.171892\t0.828108\t0.153928\t4.588608\t0.026225\t0.000181\t4.995204\t\t0\t0\t0\t0\t0\t0\t94\t29829\t200\t200\t27645\t200\t197\t27401\t27401\t5\t1\t1\t0.985\t0.053191\t0\t1\t0\t0.75\t0\t0\t0.005438\t0.054487\t0.259516\t0.680377\t?\t0.053191\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t76.595745\t23.404255\t0.015734\t0\t\t\t", + "", + "## HISTOGRAM\tjava.lang.Integer", + "coverage_or_base_quality\thigh_quality_coverage_count\tunfiltered_baseq_count", + "0\t89\t0", + "1\t5\t0", + "2\t0\t0", + "3\t0\t0", + "4\t0\t0", + "5\t0\t0", + "6\t0\t0", + "7\t0\t0", + "8\t0\t0", + "9\t0\t0", + "10\t0\t0", + "11\t0\t0", + "12\t0\t0", + "13\t0\t0", + "14\t0\t5", + "15\t0\t0", + "16\t0\t0", + "17\t0\t0", + "18\t0\t0", + "19\t0\t0", + "20\t0\t0", + "21\t0\t1", + "22\t0\t0", + "23\t0\t0", + "24\t0\t0", + "25\t0\t0", + "26\t0\t0", + "27\t0\t0", + "28\t0\t0", + "29\t0\t0", + "30\t0\t0", + "31\t0\t0", + "32\t0\t1", + "33\t0\t0", + "34\t0\t0", + "35\t0\t0", + "36\t0\t3", + "37\t0\t0", + "38\t0\t0", + "39\t0\t0", + "40\t0\t0", + "41\t0\t0", + "42\t0\t0", + "43\t0\t0", + "44\t0\t0", + "45\t0\t0", + "46\t0\t0", + "47\t0\t0", + "48\t0\t0", + "49\t0\t0", + "50\t0\t0", + "51\t0\t0", + "52\t0\t0", + "53\t0\t0", + "54\t0\t0", + "55\t0\t0", + "56\t0\t0", + "57\t0\t0", + "58\t0\t0", + "59\t0\t0", + "60\t0\t0", + "61\t0\t0", + "62\t0\t0", + "63\t0\t0", + "64\t0\t0", + "65\t0\t0", + "66\t0\t0", + "67\t0\t0", + "68\t0\t0", + "69\t0\t0", + "70\t0\t0", + "71\t0\t0", + "72\t0\t0", + "73\t0\t0", + "74\t0\t0", + "75\t0\t0", + "76\t0\t0", + "77\t0\t0", + "78\t0\t0", + "79\t0\t0", + "80\t0\t0", + "81\t0\t0", + "82\t0\t0", + "83\t0\t0", + "84\t0\t0", + "85\t0\t0", + "86\t0\t0", + "87\t0\t0", + "88\t0\t0", + "89\t0\t0" + ], + [ + "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.7" + }, + "timestamp": "2025-09-15T10:37:32.831030701" }, "versions": { "content": [ [ - "versions.yml:md5,bdfc7b655683e7b66f68e894c999805e" + "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T10:51:30.748857589" + "timestamp": "2025-09-15T10:37:42.492104283" }, "sarscov2 - bam - samebed": { "content": [ @@ -234,14 +350,14 @@ "89\t0\t0" ], [ - "versions.yml:md5,bdfc7b655683e7b66f68e894c999805e" + "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T10:52:43.803456585" + "timestamp": "2025-09-15T10:38:39.302597954" }, "sarscov2 - bam": { "content": [ @@ -350,14 +466,14 @@ "89\t0\t0" ], [ - "versions.yml:md5,bdfc7b655683e7b66f68e894c999805e" + "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T10:51:01.881343611" + "timestamp": "2025-09-15T10:37:15.861292725" }, "sarscov2 - bam - bed": { "content": [ @@ -466,13 +582,13 @@ "89\t0\t0" ], [ - "versions.yml:md5,bdfc7b655683e7b66f68e894c999805e" + "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T10:52:22.830749735" + "timestamp": "2025-09-15T10:38:18.912909604" } } \ No newline at end of file diff --git a/modules/nf-core/picard/collecthsmetrics/tests/tags.yml b/modules/nf-core/picard/collecthsmetrics/tests/tags.yml deleted file mode 100644 index b353f95e..00000000 --- a/modules/nf-core/picard/collecthsmetrics/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -picard/collecthsmetrics: - - "modules/nf-core/picard/collecthsmetrics/**" diff --git a/modules/nf-core/picard/collectmultiplemetrics/environment.yml b/modules/nf-core/picard/collectmultiplemetrics/environment.yml index 1d715d56..b4ac4fe0 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/environment.yml +++ b/modules/nf-core/picard/collectmultiplemetrics/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::picard=3.3.0 + # renovate: datasource=conda depName=bioconda/picard + - bioconda::picard=3.4.0 diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index de390df1..e4d74998 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -4,8 +4,8 @@ process PICARD_COLLECTMULTIPLEMETRICS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.3.0--hdfd78af_0' : - 'biocontainers/picard:3.3.0--hdfd78af_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/08/0861295baa7c01fc593a9da94e82b44a729dcaf8da92be8e565da109aa549b25/data' : + 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" input: tuple val(meta) , path(bam), path(bai) ,path(fasta) ,path(fai) diff --git a/modules/nf-core/picard/collectmultiplemetrics/meta.yml b/modules/nf-core/picard/collectmultiplemetrics/meta.yml index 2b7981ac..3f0bf610 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/meta.yml +++ b/modules/nf-core/picard/collectmultiplemetrics/meta.yml @@ -26,10 +26,12 @@ input: type: file description: SAM/BAM/CRAM file pattern: "*.{sam,bam,cram}" + ontologies: [] - bai: type: file description: Optional SAM/BAM/CRAM file index pattern: "*.{sai,bai,crai}" + ontologies: [] - - meta2: type: map description: | @@ -38,6 +40,7 @@ input: - fasta: type: file description: Genome fasta file + ontologies: [] - - meta3: type: map description: | @@ -47,9 +50,10 @@ input: type: file description: Index of FASTA file. Only needed when fasta is supplied. pattern: "*.fai" + ontologies: [] output: - - metrics: - - meta: + metrics: + - - meta: type: map description: | Groovy Map containing sample information @@ -58,8 +62,9 @@ output: type: file description: Alignment metrics files generated by picard pattern: "*_{metrics}" - - pdf: - - meta: + ontologies: [] + pdf: + - - meta: type: map description: | Groovy Map containing sample information @@ -68,11 +73,14 @@ output: type: file description: PDF plots of metrics pattern: "*.{pdf}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap index a76a3237..5a1de114 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap +++ b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap @@ -16,14 +16,14 @@ "test.CollectMultipleMetrics.read_length_histogram.pdf" ], [ - "versions.yml:md5,791db2719d57a997f8253b3ba97d62d7" + "versions.yml:md5,aca7ca0dc0012ee97698236828ba242a" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T11:05:12.591021247" + "timestamp": "2025-09-15T10:41:26.126816186" }, "test-picard-collectmultiplemetrics-cram": { "content": [ @@ -42,14 +42,14 @@ "test.CollectMultipleMetrics.read_length_histogram.pdf" ], [ - "versions.yml:md5,791db2719d57a997f8253b3ba97d62d7" + "versions.yml:md5,aca7ca0dc0012ee97698236828ba242a" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T11:06:08.499320579" + "timestamp": "2025-09-15T10:41:50.933556225" }, "test-picard-collectmultiplemetrics-nofasta": { "content": [ @@ -68,13 +68,13 @@ "test.CollectMultipleMetrics.read_length_histogram.pdf" ], [ - "versions.yml:md5,791db2719d57a997f8253b3ba97d62d7" + "versions.yml:md5,aca7ca0dc0012ee97698236828ba242a" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T11:05:42.117033611" + "timestamp": "2025-09-15T10:41:38.213084333" } } \ No newline at end of file diff --git a/modules/nf-core/picard/collectwgsmetrics/environment.yml b/modules/nf-core/picard/collectwgsmetrics/environment.yml index 13265842..186d4a4b 100644 --- a/modules/nf-core/picard/collectwgsmetrics/environment.yml +++ b/modules/nf-core/picard/collectwgsmetrics/environment.yml @@ -1,6 +1,9 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json channels: - conda-forge - bioconda dependencies: - - bioconda::picard=3.3.0 + # renovate: datasource=conda depName=bioconda/picard + - bioconda::picard=3.4.0 - conda-forge::r-base=4.4.1 diff --git a/modules/nf-core/picard/collectwgsmetrics/main.nf b/modules/nf-core/picard/collectwgsmetrics/main.nf index 468e1c8a..cd4a7711 100644 --- a/modules/nf-core/picard/collectwgsmetrics/main.nf +++ b/modules/nf-core/picard/collectwgsmetrics/main.nf @@ -4,8 +4,8 @@ process PICARD_COLLECTWGSMETRICS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:3.3.0--hdfd78af_0' : - 'biocontainers/picard:3.3.0--hdfd78af_0' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/08/0861295baa7c01fc593a9da94e82b44a729dcaf8da92be8e565da109aa549b25/data' : + 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" input: tuple val(meta), path(bam), path(bai) ,path(fasta) ,path(fai) diff --git a/modules/nf-core/picard/collectwgsmetrics/meta.yml b/modules/nf-core/picard/collectwgsmetrics/meta.yml index bb748080..a27e0a88 100644 --- a/modules/nf-core/picard/collectwgsmetrics/meta.yml +++ b/modules/nf-core/picard/collectwgsmetrics/meta.yml @@ -26,10 +26,12 @@ input: type: file description: Aligned reads file pattern: "*.{bam, cram}" + ontologies: [] - bai: type: file description: (Optional) Aligned reads file index pattern: "*.{bai,crai}" + ontologies: [] - - meta2: type: map description: | @@ -39,6 +41,7 @@ input: type: file description: Genome fasta file pattern: "*.{fa,fasta,fna}" + ontologies: [] - - meta3: type: map description: | @@ -48,13 +51,15 @@ input: type: file description: Genome fasta file index pattern: "*.{fai}" - - - intervallist: - type: file - description: Picard Interval List. Defines which contigs to include. Can be - generated from a BED file with GATK BedToIntervalList. + ontologies: [] + - intervallist: + type: file + description: Picard Interval List. Defines which contigs to include. Can be generated + from a BED file with GATK BedToIntervalList. + ontologies: [] output: - - metrics: - - meta: + metrics: + - - meta: type: map description: | Groovy Map containing sample information @@ -63,11 +68,14 @@ output: type: file description: Alignment metrics files generated by picard pattern: "*_{metrics}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@drpatelh" - "@flowuenne" diff --git a/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap index 1958fcde..d944d96b 100644 --- a/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap +++ b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap @@ -3,26 +3,26 @@ "content": [ true, [ - "versions.yml:md5,9927db69fdd55176be5cdbd427d000c2" + "versions.yml:md5,0fa1034c5831e54d4534e6052a8d6b61" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T10:15:18.13771243" + "timestamp": "2025-09-15T10:45:19.40801445" }, "test-picard-collectwgsmetrics": { "content": [ true, [ - "versions.yml:md5,9927db69fdd55176be5cdbd427d000c2" + "versions.yml:md5,0fa1034c5831e54d4534e6052a8d6b61" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-10-18T10:14:57.786056996" + "timestamp": "2025-09-15T10:44:57.689335695" } } \ No newline at end of file From 4e99a19e42dab232842a5969f38a3f8a78e4aac2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:48:09 +0100 Subject: [PATCH 057/202] bump samtools modules --- modules.json | 18 +- modules/nf-core/samtools/cat/environment.yml | 6 +- modules/nf-core/samtools/cat/main.nf | 4 +- modules/nf-core/samtools/cat/meta.yml | 23 +- .../nf-core/samtools/cat/samtools-cat.diff | 3 +- .../samtools/cat/tests/main.nf.test.snap | 16 +- modules/nf-core/samtools/cat/tests/tags.yml | 2 - .../nf-core/samtools/convert/environment.yml | 6 +- modules/nf-core/samtools/convert/main.nf | 6 +- modules/nf-core/samtools/convert/meta.yml | 36 +- .../samtools/convert/tests/main.nf.test | 2 +- .../samtools/convert/tests/main.nf.test.snap | 30 +- .../nf-core/samtools/convert/tests/tags.yml | 2 - .../nf-core/samtools/coverage/environment.yml | 6 +- modules/nf-core/samtools/coverage/main.nf | 11 +- modules/nf-core/samtools/coverage/meta.yml | 21 +- .../samtools/coverage/tests/main.nf.test | 67 +++- .../samtools/coverage/tests/main.nf.test.snap | 30 +- .../nf-core/samtools/coverage/tests/tags.yml | 2 - .../nf-core/samtools/flagstat/environment.yml | 6 +- modules/nf-core/samtools/flagstat/main.nf | 18 +- modules/nf-core/samtools/flagstat/meta.yml | 19 +- .../samtools/flagstat/tests/main.nf.test.snap | 24 +- .../nf-core/samtools/flagstat/tests/tags.yml | 2 - .../nf-core/samtools/idxstats/environment.yml | 6 +- modules/nf-core/samtools/idxstats/main.nf | 5 +- modules/nf-core/samtools/idxstats/meta.yml | 19 +- .../samtools/idxstats/tests/main.nf.test.snap | 20 +- .../nf-core/samtools/idxstats/tests/tags.yml | 2 - .../nf-core/samtools/import/environment.yml | 6 +- modules/nf-core/samtools/import/main.nf | 4 +- modules/nf-core/samtools/import/meta.yml | 29 +- .../nf-core/samtools/import/tests/tags.yml | 2 - .../nf-core/samtools/sormadup/environment.yml | 6 +- modules/nf-core/samtools/sormadup/main.nf | 4 +- modules/nf-core/samtools/sormadup/meta.yml | 39 +- .../samtools/sormadup/tests/cram.config | 2 +- .../samtools/sormadup/tests/main.nf.test.snap | 28 +- .../nf-core/samtools/sormadup/tests/tags.yml | 2 - modules/nf-core/samtools/sort/environment.yml | 6 +- modules/nf-core/samtools/sort/main.nf | 67 ++-- modules/nf-core/samtools/sort/meta.yml | 81 +++- .../nf-core/samtools/sort/tests/main.nf.test | 156 +++++++- .../samtools/sort/tests/main.nf.test.snap | 371 +++++++++--------- .../samtools/sort/tests/nextflow.config | 1 - modules/nf-core/samtools/sort/tests/tags.yml | 3 - .../nf-core/samtools/stats/environment.yml | 6 +- modules/nf-core/samtools/stats/main.nf | 16 +- modules/nf-core/samtools/stats/meta.yml | 35 +- .../samtools/stats/tests/main.nf.test.snap | 88 +++-- modules/nf-core/samtools/stats/tests/tags.yml | 2 - 51 files changed, 867 insertions(+), 499 deletions(-) delete mode 100644 modules/nf-core/samtools/cat/tests/tags.yml delete mode 100644 modules/nf-core/samtools/convert/tests/tags.yml delete mode 100644 modules/nf-core/samtools/coverage/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/import/tests/tags.yml delete mode 100644 modules/nf-core/samtools/sormadup/tests/tags.yml delete mode 100644 modules/nf-core/samtools/sort/tests/tags.yml delete mode 100644 modules/nf-core/samtools/stats/tests/tags.yml diff --git a/modules.json b/modules.json index 54019971..7d0d7bc8 100644 --- a/modules.json +++ b/modules.json @@ -87,52 +87,52 @@ }, "samtools/cat": { "branch": "master", - "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", + "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/cat/samtools-cat.diff" }, "samtools/convert": { "branch": "master", - "git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/convert/samtools-convert.diff" }, "samtools/coverage": { "branch": "master", - "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, "samtools/flagstat": { "branch": "master", - "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", + "git_sha": "e334e12a1e985adc5ffc3fc78a68be1de711de45", "installed_by": ["modules"] }, "samtools/idxstats": { "branch": "master", - "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", + "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", "installed_by": ["modules"] }, "samtools/import": { "branch": "master", - "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", + "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", "installed_by": ["modules"] }, "samtools/sormadup": { "branch": "master", - "git_sha": "38f3b0200093498b70ac2d63a83eac5642e3c873", + "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sormadup/samtools-sormadup.diff" }, "samtools/sort": { "branch": "master", - "git_sha": "b7800db9b069ed505db3f9d91b8c72faea9be17b", + "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "samtools/stats": { "branch": "master", - "git_sha": "2d20463181b1c38981a02e90d3084b5f9fa8d540", + "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/stats/samtools-stats.diff" }, diff --git a/modules/nf-core/samtools/cat/environment.yml b/modules/nf-core/samtools/cat/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/cat/environment.yml +++ b/modules/nf-core/samtools/cat/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/cat/main.nf b/modules/nf-core/samtools/cat/main.nf index 61349e59..d200e501 100644 --- a/modules/nf-core/samtools/cat/main.nf +++ b/modules/nf-core/samtools/cat/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_CAT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(input_files, stageAs: "?/*") diff --git a/modules/nf-core/samtools/cat/meta.yml b/modules/nf-core/samtools/cat/meta.yml index dfb0f78c..a2ac0e21 100644 --- a/modules/nf-core/samtools/cat/meta.yml +++ b/modules/nf-core/samtools/cat/meta.yml @@ -27,9 +27,10 @@ input: type: file description: BAM/CRAM files pattern: "*.{bam,cram}" + ontologies: [] output: - - bam: - - meta: + bam: + - - meta: type: map description: | Groovy Map containing sample information @@ -38,8 +39,9 @@ output: type: file description: Concatenated BAM file pattern: "*.{bam}" - - cram: - - meta: + ontologies: [] + cram: + - - meta: type: map description: | Groovy Map containing sample information @@ -48,11 +50,14 @@ output: type: file description: Concatenated CRAM file pattern: "*.{cram}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@matthdsm" maintainers: diff --git a/modules/nf-core/samtools/cat/samtools-cat.diff b/modules/nf-core/samtools/cat/samtools-cat.diff index 71c58b5c..5b6918b7 100644 --- a/modules/nf-core/samtools/cat/samtools-cat.diff +++ b/modules/nf-core/samtools/cat/samtools-cat.diff @@ -1,4 +1,4 @@ -Changes in module 'nf-core/samtools/cat' +Changes in component 'nf-core/samtools/cat' 'modules/nf-core/samtools/cat/environment.yml' is unchanged 'modules/nf-core/samtools/cat/meta.yml' is unchanged Changes in 'samtools/cat/main.nf': @@ -19,6 +19,5 @@ Changes in 'samtools/cat/main.nf': when: 'modules/nf-core/samtools/cat/tests/main.nf.test.snap' is unchanged -'modules/nf-core/samtools/cat/tests/tags.yml' is unchanged 'modules/nf-core/samtools/cat/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/samtools/cat/tests/main.nf.test.snap b/modules/nf-core/samtools/cat/tests/main.nf.test.snap index 9af1b19f..2143309a 100644 --- a/modules/nf-core/samtools/cat/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/cat/tests/main.nf.test.snap @@ -14,14 +14,14 @@ "bams_stub_versions": { "content": [ [ - "versions.yml:md5,cd29ae344fb0bf5635527e1cb7a7d95f" + "versions.yml:md5,99695cce7873f354da5dd8660522cb4f" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T07:47:51.511914861" + "timestamp": "2025-09-10T13:02:09.79415" }, "bams_bam": { "content": [ @@ -58,13 +58,13 @@ "bams_versions": { "content": [ [ - "versions.yml:md5,cd29ae344fb0bf5635527e1cb7a7d95f" + "versions.yml:md5,99695cce7873f354da5dd8660522cb4f" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T08:47:50.783194958" + "timestamp": "2025-09-10T13:02:05.668116" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/cat/tests/tags.yml b/modules/nf-core/samtools/cat/tests/tags.yml deleted file mode 100644 index 97605570..00000000 --- a/modules/nf-core/samtools/cat/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/cat: - - "modules/nf-core/samtools/cat/**" diff --git a/modules/nf-core/samtools/convert/environment.yml b/modules/nf-core/samtools/convert/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/convert/environment.yml +++ b/modules/nf-core/samtools/convert/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/convert/main.nf b/modules/nf-core/samtools/convert/main.nf index 9942d052..f4003d42 100644 --- a/modules/nf-core/samtools/convert/main.nf +++ b/modules/nf-core/samtools/convert/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_CONVERT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(input), path(index), path(fasta), path(fai) @@ -48,7 +48,7 @@ process SAMTOOLS_CONVERT { """ touch ${prefix}.${output_extension} - touch ${prefix}.${index_extension} + touch ${prefix}.${output_extension}.${index_extension} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/convert/meta.yml b/modules/nf-core/samtools/convert/meta.yml index d5bfa161..519812ab 100644 --- a/modules/nf-core/samtools/convert/meta.yml +++ b/modules/nf-core/samtools/convert/meta.yml @@ -26,10 +26,12 @@ input: type: file description: BAM/CRAM file pattern: "*.{bam,cram}" + ontologies: [] - index: type: file description: BAM/CRAM index file pattern: "*.{bai,crai}" + ontologies: [] - - meta2: type: map description: | @@ -39,6 +41,7 @@ input: type: file description: Reference file to create the CRAM file pattern: "*.{fasta,fa}" + ontologies: [] - - meta3: type: map description: | @@ -48,9 +51,10 @@ input: type: file description: Reference index file to create the CRAM file pattern: "*.{fai}" + ontologies: [] output: - - bam: - - meta: + bam: + - - meta: type: map description: | Groovy Map containing sample information @@ -59,8 +63,9 @@ output: type: file description: filtered/converted BAM file pattern: "*{.bam}" - - cram: - - meta: + ontologies: [] + cram: + - - meta: type: map description: | Groovy Map containing sample information @@ -69,8 +74,9 @@ output: type: file description: filtered/converted CRAM file pattern: "*{cram}" - - bai: - - meta: + ontologies: [] + bai: + - - meta: type: map description: | Groovy Map containing sample information @@ -79,8 +85,9 @@ output: type: file description: filtered/converted BAM index pattern: "*{.bai}" - - crai: - - meta: + ontologies: [] + crai: + - - meta: type: map description: | Groovy Map containing sample information @@ -89,11 +96,14 @@ output: type: file description: filtered/converted CRAM index pattern: "*{.crai}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@FriederikeHanssen" - "@maxulysse" diff --git a/modules/nf-core/samtools/convert/tests/main.nf.test b/modules/nf-core/samtools/convert/tests/main.nf.test index 91a0c69e..cd603c53 100644 --- a/modules/nf-core/samtools/convert/tests/main.nf.test +++ b/modules/nf-core/samtools/convert/tests/main.nf.test @@ -74,7 +74,7 @@ nextflow_process { } test("sarscov2 - [bam, bai], fasta, fai - stub") { - + options "-stub" when { diff --git a/modules/nf-core/samtools/convert/tests/main.nf.test.snap b/modules/nf-core/samtools/convert/tests/main.nf.test.snap index a021254e..a9ef27e0 100644 --- a/modules/nf-core/samtools/convert/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/convert/tests/main.nf.test.snap @@ -22,26 +22,26 @@ "cram_to_bam_versions": { "content": [ [ - "versions.yml:md5,5bc6eb42ab2a1ea6661f8ee998467ad6" + "versions.yml:md5,13f74b35a5030e75c1e819b2cf602db8" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T07:52:35.516411351" + "timestamp": "2025-09-10T13:05:31.58641" }, "bam_to_cram_versions": { "content": [ [ - "versions.yml:md5,5bc6eb42ab2a1ea6661f8ee998467ad6" + "versions.yml:md5,13f74b35a5030e75c1e819b2cf602db8" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T07:52:24.694454205" + "timestamp": "2025-09-10T13:05:26.933516" }, "stub": { "content": [ @@ -67,11 +67,11 @@ "id": "test", "single_end": false }, - "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "4": [ - "versions.yml:md5,5bc6eb42ab2a1ea6661f8ee998467ad6" + "versions.yml:md5,13f74b35a5030e75c1e819b2cf602db8" ], "bai": [ @@ -85,7 +85,7 @@ "id": "test", "single_end": false }, - "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "cram": [ @@ -98,15 +98,15 @@ ] ], "versions": [ - "versions.yml:md5,5bc6eb42ab2a1ea6661f8ee998467ad6" + "versions.yml:md5,13f74b35a5030e75c1e819b2cf602db8" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T07:52:45.799885099" + "timestamp": "2025-09-10T13:05:36.333776" }, "bam_to_cram_index": { "content": [ diff --git a/modules/nf-core/samtools/convert/tests/tags.yml b/modules/nf-core/samtools/convert/tests/tags.yml deleted file mode 100644 index 030d5eb5..00000000 --- a/modules/nf-core/samtools/convert/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/convert: - - "modules/nf-core/samtools/convert/**" diff --git a/modules/nf-core/samtools/coverage/environment.yml b/modules/nf-core/samtools/coverage/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/coverage/environment.yml +++ b/modules/nf-core/samtools/coverage/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/coverage/main.nf b/modules/nf-core/samtools/coverage/main.nf index 11e347e8..e2adfddd 100644 --- a/modules/nf-core/samtools/coverage/main.nf +++ b/modules/nf-core/samtools/coverage/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_COVERAGE { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(input), path(input_index), path(fasta), path(fai) @@ -20,12 +20,17 @@ process SAMTOOLS_COVERAGE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def reference = fasta ? "--reference ${fasta}" : "" + + if (input.name.endsWith('.cram') && (!fasta || !fai)) { + error "CRAM input file provided but no reference FASTA and/or FAI index for said reference, both are required for CRAM input." + } """ samtools \\ coverage \\ $args \\ -o ${prefix}.txt \\ - --reference ${fasta} \\ + $reference \\ $input cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/samtools/coverage/meta.yml b/modules/nf-core/samtools/coverage/meta.yml index fb9ba6f3..28dceb03 100644 --- a/modules/nf-core/samtools/coverage/meta.yml +++ b/modules/nf-core/samtools/coverage/meta.yml @@ -25,10 +25,12 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" + ontologies: [] - input_index: type: file description: BAM/CRAM index file pattern: "*.{bai,crai}" + ontologies: [] - - meta2: type: map description: | @@ -38,6 +40,7 @@ input: type: file description: Reference genome file pattern: "*.{fa,fasta}" + ontologies: [] - - meta3: type: map description: | @@ -47,9 +50,10 @@ input: type: file description: Reference genome index file pattern: "*.fai" + ontologies: [] output: - - coverage: - - meta: + coverage: + - - meta: type: map description: | Groovy Map containing sample information @@ -59,11 +63,14 @@ output: description: Tabulated text containing the coverage at each position or region or an ASCII-art histogram (with --histogram). pattern: "*.txt" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@LouisLeNezet" maintainers: diff --git a/modules/nf-core/samtools/coverage/tests/main.nf.test b/modules/nf-core/samtools/coverage/tests/main.nf.test index 1e3ad5a4..ffd36109 100644 --- a/modules/nf-core/samtools/coverage/tests/main.nf.test +++ b/modules/nf-core/samtools/coverage/tests/main.nf.test @@ -20,12 +20,12 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) ]) input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + [:], // meta map + [] ]) input[2] = Channel.of([ - [ id:'fai' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + [:], // meta map + [] ]) """ } @@ -69,6 +69,65 @@ nextflow_process { } } + test("test_samtools_coverage_cram_no_fasta") { + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true) + ]) + input[1] = Channel.of([ + [:], // meta map + [] + ]) + input[2] = Channel.of([ + [ id:'fai' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ]) + """ + } + } + + then { + assertAll( + { assert !process.success }, + { assert process.stdout.toString().contains("CRAM input file provided but no reference FASTA and/or FAI index for said reference, both are required for CRAM input.") }, + ) + } + } + + test("test_samtools_coverage_cram_no_fai") { + when { + process { + """ + input[0] = Channel.of([ + [id: 'test', single_end: false], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = Channel.of([ + [:], // meta map + [] + ]) + """ + } + } + + then { + assertAll( + { assert !process.success }, + { assert process.stdout.toString().contains("CRAM input file provided but no reference FASTA and/or FAI index for said reference, both are required for CRAM input.") }, + ) + } + } + + test("test_samtools_coverage_stub") { options "-stub" diff --git a/modules/nf-core/samtools/coverage/tests/main.nf.test.snap b/modules/nf-core/samtools/coverage/tests/main.nf.test.snap index b9ddb18d..68cc3697 100644 --- a/modules/nf-core/samtools/coverage/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/coverage/tests/main.nf.test.snap @@ -12,7 +12,7 @@ ] ], "1": [ - "versions.yml:md5,9c876b9db54dc710c87c404e4b28243c" + "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" ], "coverage": [ [ @@ -24,15 +24,15 @@ ] ], "versions": [ - "versions.yml:md5,9c876b9db54dc710c87c404e4b28243c" + "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T07:53:42.773351407" + "timestamp": "2025-09-10T13:06:14.846123" }, "test_samtools_coverage_bam": { "content": [ @@ -47,7 +47,7 @@ ] ], "1": [ - "versions.yml:md5,9c876b9db54dc710c87c404e4b28243c" + "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" ], "coverage": [ [ @@ -59,15 +59,15 @@ ] ], "versions": [ - "versions.yml:md5,9c876b9db54dc710c87c404e4b28243c" + "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T07:53:22.798338025" + "timestamp": "2025-09-10T13:06:06.18797" }, "test_samtools_coverage_cram": { "content": [ @@ -82,7 +82,7 @@ ] ], "1": [ - "versions.yml:md5,9c876b9db54dc710c87c404e4b28243c" + "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" ], "coverage": [ [ @@ -94,14 +94,14 @@ ] ], "versions": [ - "versions.yml:md5,9c876b9db54dc710c87c404e4b28243c" + "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.7" }, - "timestamp": "2024-09-16T07:53:32.409876082" + "timestamp": "2025-10-02T11:22:34.018328" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/coverage/tests/tags.yml b/modules/nf-core/samtools/coverage/tests/tags.yml deleted file mode 100644 index 2b4f53c2..00000000 --- a/modules/nf-core/samtools/coverage/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/coverage: - - "modules/nf-core/samtools/coverage/**" diff --git a/modules/nf-core/samtools/flagstat/environment.yml b/modules/nf-core/samtools/flagstat/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/flagstat/environment.yml +++ b/modules/nf-core/samtools/flagstat/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/flagstat/main.nf b/modules/nf-core/samtools/flagstat/main.nf index c23f3a5c..f148f56b 100644 --- a/modules/nf-core/samtools/flagstat/main.nf +++ b/modules/nf-core/samtools/flagstat/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_FLAGSTAT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(bam), path(bai) @@ -35,7 +35,19 @@ process SAMTOOLS_FLAGSTAT { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.flagstat + cat <<-END_FLAGSTAT > ${prefix}.flagstat + 1000000 + 0 in total (QC-passed reads + QC-failed reads) + 0 + 0 secondary + 0 + 0 supplementary + 0 + 0 duplicates + 900000 + 0 mapped (90.00% : N/A) + 1000000 + 0 paired in sequencing + 500000 + 0 read1 + 500000 + 0 read2 + 800000 + 0 properly paired (80.00% : N/A) + 850000 + 0 with mate mapped to a different chr + 50000 + 0 with mate mapped to a different chr (mapQ>=5) + END_FLAGSTAT cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/flagstat/meta.yml b/modules/nf-core/samtools/flagstat/meta.yml index cdc4c254..ebbc15f2 100644 --- a/modules/nf-core/samtools/flagstat/meta.yml +++ b/modules/nf-core/samtools/flagstat/meta.yml @@ -29,13 +29,15 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" + ontologies: [] - bai: type: file description: Index for BAM/CRAM/SAM file pattern: "*.{bai,crai,sai}" + ontologies: [] output: - - flagstat: - - meta: + flagstat: + - - meta: type: map description: | Groovy Map containing sample information @@ -44,11 +46,14 @@ output: type: file description: File containing samtools flagstat output pattern: "*.{flagstat}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap b/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap index 04c3852b..0a0a9b15 100644 --- a/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap @@ -8,11 +8,11 @@ "id": "test", "single_end": false }, - "test.flagstat:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" ] ], "1": [ - "versions.yml:md5,108a155f2d4a99f50bf3176904208d27" + "versions.yml:md5,bdc0bfb2b0542580e7cd65e80d8570bc" ], "flagstat": [ [ @@ -20,19 +20,19 @@ "id": "test", "single_end": false }, - "test.flagstat:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" ] ], "versions": [ - "versions.yml:md5,108a155f2d4a99f50bf3176904208d27" + "versions.yml:md5,bdc0bfb2b0542580e7cd65e80d8570bc" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T08:02:58.866491759" + "timestamp": "2025-09-15T15:02:00.813612" }, "BAM": { "content": [ @@ -47,7 +47,7 @@ ] ], "1": [ - "versions.yml:md5,108a155f2d4a99f50bf3176904208d27" + "versions.yml:md5,bdc0bfb2b0542580e7cd65e80d8570bc" ], "flagstat": [ [ @@ -59,14 +59,14 @@ ] ], "versions": [ - "versions.yml:md5,108a155f2d4a99f50bf3176904208d27" + "versions.yml:md5,bdc0bfb2b0542580e7cd65e80d8570bc" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T08:02:47.383332837" + "timestamp": "2025-09-15T15:01:55.232954" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/flagstat/tests/tags.yml b/modules/nf-core/samtools/flagstat/tests/tags.yml deleted file mode 100644 index 2d2b7255..00000000 --- a/modules/nf-core/samtools/flagstat/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/flagstat: - - modules/nf-core/samtools/flagstat/** diff --git a/modules/nf-core/samtools/idxstats/environment.yml b/modules/nf-core/samtools/idxstats/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/idxstats/environment.yml +++ b/modules/nf-core/samtools/idxstats/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/idxstats/main.nf b/modules/nf-core/samtools/idxstats/main.nf index e2bb6b20..9181a1a5 100644 --- a/modules/nf-core/samtools/idxstats/main.nf +++ b/modules/nf-core/samtools/idxstats/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_IDXSTATS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(bam), path(bai) @@ -21,6 +21,7 @@ process SAMTOOLS_IDXSTATS { def prefix = task.ext.prefix ?: "${meta.id}" """ + # Note: --threads value represents *additional* CPUs to allocate (total CPUs = 1 + --threads). samtools \\ idxstats \\ --threads ${task.cpus-1} \\ diff --git a/modules/nf-core/samtools/idxstats/meta.yml b/modules/nf-core/samtools/idxstats/meta.yml index f0a6bcb2..96d42746 100644 --- a/modules/nf-core/samtools/idxstats/meta.yml +++ b/modules/nf-core/samtools/idxstats/meta.yml @@ -29,13 +29,15 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" + ontologies: [] - bai: type: file description: Index for BAM/CRAM/SAM file pattern: "*.{bai,crai,sai}" + ontologies: [] output: - - idxstats: - - meta: + idxstats: + - - meta: type: map description: | Groovy Map containing sample information @@ -44,11 +46,14 @@ output: type: file description: File containing samtools idxstats output pattern: "*.{idxstats}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/samtools/idxstats/tests/main.nf.test.snap b/modules/nf-core/samtools/idxstats/tests/main.nf.test.snap index 2cc89a3b..d3e785e0 100644 --- a/modules/nf-core/samtools/idxstats/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/idxstats/tests/main.nf.test.snap @@ -12,7 +12,7 @@ ] ], "1": [ - "versions.yml:md5,c8d7394830c3c1e5be150589571534fb" + "versions.yml:md5,6da44e5235401559cea62052bdc0197b" ], "idxstats": [ [ @@ -24,15 +24,15 @@ ] ], "versions": [ - "versions.yml:md5,c8d7394830c3c1e5be150589571534fb" + "versions.yml:md5,6da44e5235401559cea62052bdc0197b" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T08:11:56.466856235" + "timestamp": "2025-09-10T13:47:35.796569" }, "bam": { "content": [ @@ -47,7 +47,7 @@ ] ], "1": [ - "versions.yml:md5,c8d7394830c3c1e5be150589571534fb" + "versions.yml:md5,6da44e5235401559cea62052bdc0197b" ], "idxstats": [ [ @@ -59,14 +59,14 @@ ] ], "versions": [ - "versions.yml:md5,c8d7394830c3c1e5be150589571534fb" + "versions.yml:md5,6da44e5235401559cea62052bdc0197b" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T08:11:46.311550359" + "timestamp": "2025-09-10T13:47:31.86415" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/idxstats/tests/tags.yml b/modules/nf-core/samtools/idxstats/tests/tags.yml deleted file mode 100644 index d3057c61..00000000 --- a/modules/nf-core/samtools/idxstats/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/idxstats: - - modules/nf-core/samtools/idxstats/** diff --git a/modules/nf-core/samtools/import/environment.yml b/modules/nf-core/samtools/import/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/import/environment.yml +++ b/modules/nf-core/samtools/import/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/import/main.nf b/modules/nf-core/samtools/import/main.nf index b6927949..0efbc75a 100644 --- a/modules/nf-core/samtools/import/main.nf +++ b/modules/nf-core/samtools/import/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_IMPORT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0': - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0': + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(reads) diff --git a/modules/nf-core/samtools/import/meta.yml b/modules/nf-core/samtools/import/meta.yml index 5c98b8be..2b86ce79 100644 --- a/modules/nf-core/samtools/import/meta.yml +++ b/modules/nf-core/samtools/import/meta.yml @@ -28,9 +28,11 @@ input: type: file description: fastq data to be converted to SAM/BAM/CRAM pattern: "*.{fastq,fq,fastq.gz,fq.gz}" + ontologies: + - edam: http://edamontology.org/format_1930 # FASTQ output: - - sam: - - meta: + sam: + - - meta: type: map description: | Groovy Map containing sample information @@ -39,8 +41,9 @@ output: type: file description: SAM file pattern: "*.sam" - - bam: - - meta: + ontologies: [] + bam: + - - meta: type: map description: | Groovy Map containing sample information @@ -49,8 +52,9 @@ output: type: file description: Unaligned BAM file pattern: "*.bam" - - cram: - - meta: + ontologies: [] + cram: + - - meta: type: map description: | Groovy Map containing sample information @@ -59,11 +63,14 @@ output: type: file description: Unaligned CRAM file pattern: "*.cram" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@matthdsm" maintainers: diff --git a/modules/nf-core/samtools/import/tests/tags.yml b/modules/nf-core/samtools/import/tests/tags.yml deleted file mode 100644 index 89c89128..00000000 --- a/modules/nf-core/samtools/import/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/import: - - modules/nf-core/samtools/import/** diff --git a/modules/nf-core/samtools/sormadup/environment.yml b/modules/nf-core/samtools/sormadup/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/sormadup/environment.yml +++ b/modules/nf-core/samtools/sormadup/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/sormadup/main.nf b/modules/nf-core/samtools/sormadup/main.nf index 0ee7a0a7..25541ed8 100644 --- a/modules/nf-core/samtools/sormadup/main.nf +++ b/modules/nf-core/samtools/sormadup/main.nf @@ -4,8 +4,8 @@ process SAMTOOLS_SORMADUP { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(input), path(fasta) diff --git a/modules/nf-core/samtools/sormadup/meta.yml b/modules/nf-core/samtools/sormadup/meta.yml index bec58e87..bb6295bf 100644 --- a/modules/nf-core/samtools/sormadup/meta.yml +++ b/modules/nf-core/samtools/sormadup/meta.yml @@ -77,6 +77,7 @@ input: type: file description: BAM/CRAM/SAM files pattern: "*.{bam,cram,sam}" + ontologies: [] - - meta2: type: map description: | @@ -86,9 +87,10 @@ input: type: file description: Reference genome file pattern: "*.{fasta,fa,fna}" + ontologies: [] output: - - bam: - - meta: + bam: + - - meta: type: map description: | Groovy Map containing sample information @@ -97,8 +99,9 @@ output: type: file description: Sorted and duplicate marked BAM file pattern: "*.bam" - - cram: - - meta: + ontologies: [] + cram: + - - meta: type: map description: | Groovy Map containing sample information @@ -107,8 +110,9 @@ output: type: file description: Sorted and duplicate marked CRAM file pattern: "*.cram" - - csi: - - meta: + ontologies: [] + csi: + - - meta: type: map description: | Groovy Map containing sample information @@ -117,8 +121,9 @@ output: type: file description: Sorted and duplicate marked BAM index file pattern: "*.csi" - - crai: - - meta: + ontologies: [] + crai: + - - meta: type: map description: | Groovy Map containing sample information @@ -127,8 +132,9 @@ output: type: file description: Sorted and duplicate marked CRAM index file pattern: "*.crai" - - metrics: - - meta: + ontologies: [] + metrics: + - - meta: type: map description: | Groovy Map containing sample information @@ -137,11 +143,14 @@ output: type: file description: Duplicate metrics file pattern: "*.metrics" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML authors: - "@matthdsm" maintainers: diff --git a/modules/nf-core/samtools/sormadup/tests/cram.config b/modules/nf-core/samtools/sormadup/tests/cram.config index 8d6ce11a..69897ef7 100644 --- a/modules/nf-core/samtools/sormadup/tests/cram.config +++ b/modules/nf-core/samtools/sormadup/tests/cram.config @@ -7,7 +7,7 @@ process { "-d 2500", // The optical duplicate distance "--barcode-name", // Use the UMI/barcode embedded in the read name (eigth colon delimited part). "--write-index", // Write csi/crai index - "--output-fmt cram", // Output format + "--output-fmt cram,version=3.0",// Output format "--output-fmt-option archive" // Cram compression level ].join(" ").trim()} } diff --git a/modules/nf-core/samtools/sormadup/tests/main.nf.test.snap b/modules/nf-core/samtools/sormadup/tests/main.nf.test.snap index 56776605..7d36514f 100644 --- a/modules/nf-core/samtools/sormadup/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/sormadup/tests/main.nf.test.snap @@ -30,7 +30,7 @@ ] ], "5": [ - "versions.yml:md5,ad563b12da6299eec5c39564782d0814" + "versions.yml:md5,f747eda74610b9e2ffbe38a0fe32605c" ], "bam": [ [ @@ -60,15 +60,15 @@ ] ], "versions": [ - "versions.yml:md5,ad563b12da6299eec5c39564782d0814" + "versions.yml:md5,f747eda74610b9e2ffbe38a0fe32605c" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.2", + "nextflow": "25.04.6" }, - "timestamp": "2024-09-16T08:56:24.200237922" + "timestamp": "2025-09-10T14:41:27.357324" }, "sarscov2 - cram": { "content": [ @@ -80,15 +80,15 @@ "id": "test", "single_end": false }, - "test.merged.metrics:md5,548ff6d0d22ef710858639fe22e90004" + "test.merged.metrics:md5,02eebd31b097e165e1b18d84b023f18d" ] ] ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nextflow": "25.04.6" }, - "timestamp": "2025-02-05T12:24:12.517796" + "timestamp": "2025-09-10T15:34:19.685282" }, "sarscov2 - bam": { "content": [ @@ -99,7 +99,7 @@ "id": "test", "single_end": false }, - "test.bam:md5,4dd85f1abbd2806887c6942f9c84595a" + "test.bam:md5,22ccf80de9847da1fa532f7774580554" ] ], "1": [ @@ -121,7 +121,7 @@ ] ], "5": [ - "versions.yml:md5,ad563b12da6299eec5c39564782d0814" + "versions.yml:md5,f747eda74610b9e2ffbe38a0fe32605c" ], "bam": [ [ @@ -129,7 +129,7 @@ "id": "test", "single_end": false }, - "test.bam:md5,4dd85f1abbd2806887c6942f9c84595a" + "test.bam:md5,22ccf80de9847da1fa532f7774580554" ] ], "crai": [ @@ -151,14 +151,14 @@ ] ], "versions": [ - "versions.yml:md5,ad563b12da6299eec5c39564782d0814" + "versions.yml:md5,f747eda74610b9e2ffbe38a0fe32605c" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nextflow": "25.04.6" }, - "timestamp": "2025-02-05T11:48:51.866973" + "timestamp": "2025-09-10T14:41:11.744386" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/sormadup/tests/tags.yml b/modules/nf-core/samtools/sormadup/tests/tags.yml deleted file mode 100644 index cf362be7..00000000 --- a/modules/nf-core/samtools/sormadup/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/sormadup: - - "modules/nf-core/samtools/sormadup/**" diff --git a/modules/nf-core/samtools/sort/environment.yml b/modules/nf-core/samtools/sort/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/sort/environment.yml +++ b/modules/nf-core/samtools/sort/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index 53bb171a..7b83e4a1 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -4,30 +4,40 @@ process SAMTOOLS_SORT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta) , path(bam), path(fasta) output: - tuple val(meta), path("*.bam"), emit: bam, optional: true - tuple val(meta), path("*.cram"), emit: cram, optional: true - tuple val(meta), path("*.crai"), emit: crai, optional: true - tuple val(meta), path("*.csi"), emit: csi, optional: true - path "versions.yml", emit: versions + tuple val(meta), path("${prefix}.bam"), emit: bam, optional: true + tuple val(meta), path("${prefix}.cram"), emit: cram, optional: true + tuple val(meta), path("${prefix}.sam"), emit: sam, optional: true + tuple val(meta), path("${prefix}.${extension}.crai"), emit: crai, optional: true + tuple val(meta), path("${prefix}.${extension}.csi"), emit: csi, optional: true + tuple val(meta), path("${prefix}.${extension}.bai"), emit: bai, optional: true + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), topic: versions, emit: versions_samtools when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("--output-fmt sam") ? "sam" : - args.contains("--output-fmt cram") ? "cram" : - "bam" + prefix = task.ext.prefix ?: "${meta.id}" + extension = args.contains("--output-fmt sam") ? "sam" : + args.contains("--output-fmt cram") ? "cram" : + "bam" def reference = fasta ? "--reference ${fasta}" : "" def sort_memory = (task.memory.mega/task.cpus*0.75).intValue() + output_file = index_format ? "${prefix}.${extension}##idx##${prefix}.${extension}.${index_format} --write-index" : "${prefix}.${extension}" + if (index_format) { + if (!index_format.matches('bai|csi|crai')) { + error "Index format not one of bai, csi, crai." + } else if (extension == "sam") { + error "Indexing not compatible with SAM output" + } + } if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ @@ -40,34 +50,29 @@ process SAMTOOLS_SORT { --threads $task.cpus \\ ${reference} \\ -m ${sort_memory}M \\ - -o ${prefix}.${extension} \\ + -o ${output_file} \\ - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("--output-fmt sam") ? "sam" : - args.contains("--output-fmt cram") ? "cram" : - "bam" + prefix = task.ext.prefix ?: "${meta.id}" + extension = args.contains("--output-fmt sam") ? "sam" : + args.contains("--output-fmt cram") ? "cram" : + "bam" + if (index_format) { + if (!index_format.matches('bai|csi|crai')) { + error "Index format not one of bai, csi, crai." + } else if (extension == "sam") { + error "Indexing not compatible with SAM output" + } + } + index = index_format ? "touch ${prefix}.${extension}.${index_format}" : "" + """ touch ${prefix}.${extension} - if [ "${extension}" == "bam" ]; - then - touch ${prefix}.${extension}.csi - elif [ "${extension}" == "cram" ]; - then - touch ${prefix}.${extension}.crai - fi + ${index} - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml index a9dbec5a..809a57fc 100644 --- a/modules/nf-core/samtools/sort/meta.yml +++ b/modules/nf-core/samtools/sort/meta.yml @@ -26,6 +26,7 @@ input: type: file description: BAM/CRAM/SAM file(s) pattern: "*.{bam,cram,sam}" + ontologies: [] - - meta2: type: map description: | @@ -36,52 +37,100 @@ input: description: Reference genome FASTA file pattern: "*.{fa,fasta,fna}" optional: true + ontologies: [] + - index_format: + type: string + description: Index format to use (optional) + pattern: "bai|csi|crai" output: - - bam: - - meta: + bam: + - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.bam": + - "${prefix}.bam": type: file description: Sorted BAM file pattern: "*.{bam}" - - cram: - - meta: + ontologies: [] + cram: + - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.cram": + - "${prefix}.cram": type: file description: Sorted CRAM file pattern: "*.{cram}" - - crai: - - meta: + ontologies: [] + sam: + - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.crai": + - "${prefix}.sam": + type: file + description: Sorted SAM file + pattern: "*.{sam}" + ontologies: [] + crai: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "${prefix}.${extension}.crai": type: file description: CRAM index file (optional) pattern: "*.crai" - - csi: - - meta: + ontologies: [] + csi: + - - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - "*.csi": + - "${prefix}.${extension}.csi": type: file description: BAM index file (optional) pattern: "*.csi" - - versions: - - versions.yml: + ontologies: [] + bai: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "${prefix}.${extension}.bai": type: file - description: File containing software versions - pattern: "versions.yml" + description: BAM index file (optional) + pattern: "*.bai" + ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: The process the versions were collected from + - samtools: + type: string + description: The tool name + - "samtools version | sed '1!d;s/.* //'": + type: string + description: The command used to generate the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - samtools: + type: string + description: The tool name + - "samtools version | sed '1!d;s/.* //'": + type: string + description: The command used to generate the version of the tool authors: - "@drpatelh" - "@ewels" diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test b/modules/nf-core/samtools/sort/tests/main.nf.test index b05e6691..df47bb25 100644 --- a/modules/nf-core/samtools/sort/tests/main.nf.test +++ b/modules/nf-core/samtools/sort/tests/main.nf.test @@ -8,7 +8,7 @@ nextflow_process { tag "samtools" tag "samtools/sort" - test("bam") { + test("bam_no_index") { config "./nextflow.config" @@ -23,6 +23,7 @@ nextflow_process { [ id:'fasta' ], // meta map file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) + input[2] = '' """ } } @@ -32,8 +33,72 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.bam, - process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, - process.out.versions + process.out.bai, + process.out.findAll { key, val -> key.startsWith("versions") } + ).match()} + ) + } + } + + test("bam_bai_index") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = 'bai' + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.bam, + process.out.bai, + process.out.findAll { key, val -> key.startsWith("versions") } + ).match()} + ) + } + } + + test("bam_csi_index") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = 'csi' + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.bam, + process.out.csi, + process.out.findAll { key, val -> key.startsWith("versions") } ).match()} ) } @@ -57,6 +122,77 @@ nextflow_process { [ id:'fasta' ], // meta map file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ]) + input[2] = '' + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.bam, + process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.findAll { key, val -> key.startsWith("versions") } + ).match()} + ) + } + } + + test("multiple bam bai index") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // 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) + ] + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = 'bai' + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot( + process.out.bam, + process.out.bai.collect { it.collect { it instanceof Map ? it : file(it).name } }, + process.out.findAll { key, val -> key.startsWith("versions") } + ).match()} + ) + } + } + + test("multiple bam csi index") { + + config "./nextflow.config" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // 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) + ] + ]) + input[1] = Channel.of([ + [ id:'fasta' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ]) + input[2] = 'csi' """ } } @@ -67,7 +203,7 @@ nextflow_process { { assert snapshot( process.out.bam, process.out.csi.collect { it.collect { it instanceof Map ? it : file(it).name } }, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match()} ) } @@ -88,6 +224,7 @@ nextflow_process { [ id:'fasta' ], // meta map file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ]) + input[2] = '' """ } } @@ -98,7 +235,7 @@ nextflow_process { { assert snapshot( process.out.cram.collect { it.collect { it instanceof Map ? it : file(it).name } }, process.out.crai.collect { it.collect { it instanceof Map ? it : file(it).name } }, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match()} ) } @@ -120,6 +257,7 @@ nextflow_process { [ id:'fasta' ], // meta map file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) ]) + input[2] = '' """ } } @@ -127,7 +265,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match() } ) } } @@ -150,6 +288,7 @@ nextflow_process { [ id:'fasta' ], // meta map file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ]) + input[2] = '' """ } } @@ -157,7 +296,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match() } ) } } @@ -178,6 +317,7 @@ nextflow_process { [ id:'fasta' ], // meta map file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) ]) + input[2] = '' """ } } @@ -185,7 +325,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match() } ) } } diff --git a/modules/nf-core/samtools/sort/tests/main.nf.test.snap b/modules/nf-core/samtools/sort/tests/main.nf.test.snap index 469891fe..4e618fa3 100644 --- a/modules/nf-core/samtools/sort/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/sort/tests/main.nf.test.snap @@ -19,147 +19,77 @@ "test.sorted.cram.crai" ] ], - [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" - ] + { + "versions_samtools": [ + [ + "SAMTOOLS_SORT", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-09-16T08:49:58.207549273" + "timestamp": "2025-10-29T12:47:01.171084" }, - "bam - stub": { + "bam_csi_index": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,72ca1dff5344a5e5e6b892fe5f6b134d" + ] + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam.csi:md5,01394e702c729cb478df914ffaf9f7f8" + ] + ], { - "0": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "SAMTOOLS_SORT", + "samtools", + "1.22.1" ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" - ], - "bam": [ - [ - { - "id": "test", - "single_end": false - }, - "test.sorted.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "crai": [ - - ], - "cram": [ - - ], - "csi": [ - [ - { - "id": "test", - "single_end": false - }, - "test.sorted.bam.csi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-09-16T08:50:08.630951018" + "timestamp": "2025-10-29T12:46:00.961675" }, - "cram - stub": { + "bam - stub": { "content": [ { - "0": [ - - ], - "1": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.sorted.cram:md5,d41d8cd98f00b204e9800998ecf8427e" + "SAMTOOLS_SORT", + "samtools", + "1.22.1" ] - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - - ], - "4": [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" - ], - "bam": [ - - ], - "crai": [ - [ - { - "id": "test", - "single_end": false - }, - "test.sorted.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "cram": [ - [ - { - "id": "test", - "single_end": false - }, - "test.sorted.cram:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "csi": [ - - ], - "versions": [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-09-16T08:50:19.061912443" + "timestamp": "2025-10-29T12:47:12.154354" }, - "multiple bam": { + "multiple bam bai index": { "content": [ [ [ @@ -167,7 +97,7 @@ "id": "test", "single_end": false }, - "test.sorted.bam:md5,8a16ba90c7d294cbb4c33ac0f7127a12" + "test.sorted.bam:md5,3ffa2affc29f0aa6e7b36dded84625fe" ] ], [ @@ -176,85 +106,122 @@ "id": "test", "single_end": false }, - "test.sorted.bam.csi" + "test.sorted.bam.bai" ] ], - [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" - ] + { + "versions_samtools": [ + [ + "SAMTOOLS_SORT", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-10-08T11:59:55.479443" + "timestamp": "2025-10-29T12:46:25.488622" }, - "multiple bam - stub": { + "cram - stub": { "content": [ { - "0": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.sorted.bam:md5,8a16ba90c7d294cbb4c33ac0f7127a12" + "SAMTOOLS_SORT", + "samtools", + "1.22.1" ] - ], - "1": [ - - ], - "2": [ - - ], - "3": [ + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-10-29T12:47:28.485045" + }, + "multiple bam": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,cd4eb0077f25e9cff395366b8883dd1f" + ] + ], + [ + + ], + { + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.sorted.bam.csi:md5,d185916eaff9afeb4d0aeab3310371f9" + "SAMTOOLS_SORT", + "samtools", + "1.22.1" ] - ], - "4": [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" - ], - "bam": [ + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-10-29T12:46:13.168476" + }, + "multiple bam - stub": { + "content": [ + { + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.sorted.bam:md5,8a16ba90c7d294cbb4c33ac0f7127a12" + "SAMTOOLS_SORT", + "samtools", + "1.22.1" ] - ], - "crai": [ - - ], - "cram": [ - - ], - "csi": [ + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-10-29T12:47:21.628088" + }, + "bam_no_index": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,26b27d1f9bcb61c25da21b562349784e" + ] + ], + [ + + ], + { + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.sorted.bam.csi:md5,d185916eaff9afeb4d0aeab3310371f9" + "SAMTOOLS_SORT", + "samtools", + "1.22.1" ] - ], - "versions": [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-10-08T11:36:13.781404" + "timestamp": "2025-10-29T12:45:47.139418" }, - "bam": { + "multiple bam csi index": { "content": [ [ [ @@ -262,7 +229,7 @@ "id": "test", "single_end": false }, - "test.sorted.bam:md5,34aa85e86abefe637f7a4a9887f016fc" + "test.sorted.bam:md5,295503ba5342531a3310c33ad0efbc22" ] ], [ @@ -274,14 +241,56 @@ "test.sorted.bam.csi" ] ], + { + "versions_samtools": [ + [ + "SAMTOOLS_SORT", + "samtools", + "1.22.1" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.0" + }, + "timestamp": "2025-10-29T12:46:51.5531" + }, + "bam_bai_index": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam:md5,cae7564cb83bb4a5911205bf94124b54" + ] + ], [ - "versions.yml:md5,2659b187d681241451539d4c53500b9f" - ] + [ + { + "id": "test", + "single_end": false + }, + "test.sorted.bam.bai:md5,50dd467c169545a4d5d1f709f7e986e0" + ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_SORT", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.09.0" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-10-08T11:59:46.372244" + "timestamp": "2025-10-29T12:45:52.796936" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/sort/tests/nextflow.config b/modules/nf-core/samtools/sort/tests/nextflow.config index f642771f..723f62b2 100644 --- a/modules/nf-core/samtools/sort/tests/nextflow.config +++ b/modules/nf-core/samtools/sort/tests/nextflow.config @@ -2,7 +2,6 @@ process { withName: SAMTOOLS_SORT { ext.prefix = { "${meta.id}.sorted" } - ext.args = "--write-index" } } diff --git a/modules/nf-core/samtools/sort/tests/tags.yml b/modules/nf-core/samtools/sort/tests/tags.yml deleted file mode 100644 index cd63ea20..00000000 --- a/modules/nf-core/samtools/sort/tests/tags.yml +++ /dev/null @@ -1,3 +0,0 @@ -samtools/sort: - - modules/nf-core/samtools/sort/** - - tests/modules/nf-core/samtools/sort/** diff --git a/modules/nf-core/samtools/stats/environment.yml b/modules/nf-core/samtools/stats/environment.yml index 62054fc9..89e12a64 100644 --- a/modules/nf-core/samtools/stats/environment.yml +++ b/modules/nf-core/samtools/stats/environment.yml @@ -4,5 +4,7 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # renovate: datasource=conda depName=bioconda/htslib + - bioconda::htslib=1.22.1 + # renovate: datasource=conda depName=bioconda/samtools + - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf index 1e32e8a0..7b070ac3 100644 --- a/modules/nf-core/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -4,15 +4,15 @@ process SAMTOOLS_STATS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.21--h50ea8bc_0' : - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: tuple val(meta), path(input), path(input_index), path(fasta) output: tuple val(meta), path("*.stats"), emit: stats - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval('samtools version | sed "1!d;s/.* //"'), emit: versions_samtools, topic: versions when: task.ext.when == null || task.ext.when @@ -27,21 +27,11 @@ process SAMTOOLS_STATS { ${reference} \\ ${input} \\ > ${prefix}.stats - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.stats - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml index 77b020f7..a20509ae 100644 --- a/modules/nf-core/samtools/stats/meta.yml +++ b/modules/nf-core/samtools/stats/meta.yml @@ -27,10 +27,12 @@ input: type: file description: BAM/CRAM file from alignment pattern: "*.{bam,cram}" + ontologies: [] - input_index: type: file description: BAI/CRAI file from alignment pattern: "*.{bai,crai}" + ontologies: [] - - meta2: type: map description: | @@ -40,9 +42,10 @@ input: type: file description: Reference file the CRAM was created with (optional) pattern: "*.{fasta,fa}" + ontologies: [] output: - - stats: - - meta: + stats: + - - meta: type: map description: | Groovy Map containing sample information @@ -51,11 +54,29 @@ output: type: file description: File containing samtools stats output pattern: "*.{stats}" - - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" + ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: Name of the process + - samtools: + type: string + description: Name of the tool + - samtools version | sed "1!d;s/.* //: + type: string + description: The command used to generate the version of the tool + +topics: + versions: + - - ${task.process}: + type: string + description: The process the versions were collected from + - samtools: + type: string + description: The tool name + - samtools version | sed "1!d;s/.* //: + type: string + description: The command used to generate the version of the tool authors: - "@drpatelh" - "@FriederikeHanssen" diff --git a/modules/nf-core/samtools/stats/tests/main.nf.test.snap b/modules/nf-core/samtools/stats/tests/main.nf.test.snap index df507be7..94d981b2 100644 --- a/modules/nf-core/samtools/stats/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/stats/tests/main.nf.test.snap @@ -8,11 +8,15 @@ "id": "test", "single_end": false }, - "test.stats:md5,a27fe55e49a341f92379bb20a65c6a06" + "test.stats:md5,f4aec6c41b73d34ac2fc6b3253aa39ba" ] ], "1": [ - "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + [ + "SAMTOOLS_STATS", + "samtools", + "1.22.1" + ] ], "stats": [ [ @@ -20,19 +24,23 @@ "id": "test", "single_end": false }, - "test.stats:md5,a27fe55e49a341f92379bb20a65c6a06" + "test.stats:md5,f4aec6c41b73d34ac2fc6b3253aa39ba" ] ], - "versions": [ - "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + "versions_samtools": [ + [ + "SAMTOOLS_STATS", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-09-16T09:29:16.767396182" + "timestamp": "2025-11-01T02:27:18.460724" }, "bam - stub": { "content": [ @@ -47,7 +55,11 @@ ] ], "1": [ - "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + [ + "SAMTOOLS_STATS", + "samtools", + "1.22.1" + ] ], "stats": [ [ @@ -58,16 +70,20 @@ "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + "versions_samtools": [ + [ + "SAMTOOLS_STATS", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-09-16T09:29:29.721580274" + "timestamp": "2025-11-01T02:27:30.245839" }, "cram - stub": { "content": [ @@ -82,7 +98,11 @@ ] ], "1": [ - "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + [ + "SAMTOOLS_STATS", + "samtools", + "1.22.1" + ] ], "stats": [ [ @@ -93,16 +113,20 @@ "test.stats:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + "versions_samtools": [ + [ + "SAMTOOLS_STATS", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-09-16T09:29:53.567964304" + "timestamp": "2025-11-01T02:27:39.041649" }, "bam": { "content": [ @@ -113,11 +137,15 @@ "id": "test", "single_end": false }, - "test.stats:md5,d53a2584376d78942839e9933a34d11b" + "test.stats:md5,41ba8ad30ddb598dadb177a54c222ab9" ] ], "1": [ - "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + [ + "SAMTOOLS_STATS", + "samtools", + "1.22.1" + ] ], "stats": [ [ @@ -125,18 +153,22 @@ "id": "test", "single_end": false }, - "test.stats:md5,d53a2584376d78942839e9933a34d11b" + "test.stats:md5,41ba8ad30ddb598dadb177a54c222ab9" ] ], - "versions": [ - "versions.yml:md5,15b91d8c0e0440332e0fe4df80957043" + "versions_samtools": [ + [ + "SAMTOOLS_STATS", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.0" }, - "timestamp": "2024-09-16T09:28:50.73610604" + "timestamp": "2025-11-01T02:26:55.988241" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/stats/tests/tags.yml b/modules/nf-core/samtools/stats/tests/tags.yml deleted file mode 100644 index 7c28e30f..00000000 --- a/modules/nf-core/samtools/stats/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -samtools/stats: - - modules/nf-core/samtools/stats/** From 9c17c7919d0e3490b2d139d512397d9da53cf575 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:50:55 +0100 Subject: [PATCH 058/202] fix snap config --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 512adf84..acb7eefc 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -112,7 +112,7 @@ process { // -xf 2 : expansion factor for reading compressed data //// SNAP - withName: SNAP_ALIGN { + withName: SNAPALIGNER_ALIGN { ext.args = { [ "-b-", From 14cafdd41f0011eea48e74901bbdaabe43cb7348 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:51:05 +0100 Subject: [PATCH 059/202] update ro-crate --- ro-crate-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index 1bcdab89..632da7c3 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -23,7 +23,7 @@ "@type": "Dataset", "creativeWorkStatus": "InProgress", "datePublished": "2025-11-13T15:11:21+00:00", - "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that demultiplexes and aligns raw sequencing data.\nIt also performs basic QC and coverage analysis.\n\nThe pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.\n\nSteps inlcude:\n\n1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html)\n2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp)\n3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP) or [`snap`](https://github.com/amplab/snap) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq\n4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html)\n5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html)\n6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics)\n7. QC aggregation using [`multiqc`](https://multiqc.info/)\n\n![metro map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe full documentation can be found [here](docs/README.md)\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv` for fastq inputs:\n\n```csv\nid,samplename,organism,library,fastq_1,fastq_2\nsample1,sample1,Homo sapiens,Library_Name,reads1.fq.gz,reads2.fq.gz\n```\n\n`samplesheet.csv` for flowcell inputs:\n\n```csv\nid,samplesheet,lane,flowcell,sample_info\nflowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/path/to/sampleinfo.csv\n```\n\n`sampleinfo.csv` for use with flowcell inputs:\n\n```csv\nsamplename,library,organism,tag\nfc_sample1,test,Homo sapiens,WES\n```\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --igenomes_base /path/to/genomes \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by the CMGG ICT team.\n\n## Support\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that demultiplexes and aligns raw sequencing data.\nIt also performs basic QC and coverage analysis.\n\nThe pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.\n\nSteps inlcude:\n\n1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html)\n2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp)\n3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP), [`snap`](https://github.com/amplab/snap) or [`strobe`](https://github.com/ksahlin/strobealign) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq\n4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html)\n5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html)\n6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics)\n7. QC aggregation using [`multiqc`](https://multiqc.info/)\n\n![metro map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe full documentation can be found [here](docs/README.md)\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv` for fastq inputs:\n\n```csv\nid,samplename,organism,library,fastq_1,fastq_2\nsample1,sample1,Homo sapiens,Library_Name,reads1.fq.gz,reads2.fq.gz\n```\n\n`samplesheet.csv` for flowcell inputs:\n\n```csv\nid,samplesheet,lane,flowcell,sample_info\nflowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/path/to/sampleinfo.csv\n```\n\n`sampleinfo.csv` for use with flowcell inputs:\n\n```csv\nsamplename,library,organism,tag\nfc_sample1,test,Homo sapiens,WES\n```\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --igenomes_base /path/to/genomes \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by the CMGG ICT team.\n\n## Support\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf" From 1c8e34a4d4f3030217424a098293fa6a7d95d496 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:52:35 +0100 Subject: [PATCH 060/202] fix files-unchanged --- .github/workflows/linting.yml | 6 +- .prettierignore | 2 + .../fastq_align_dna/fastq_align_dna.diff | 85 ++++++++++++------- 3 files changed, 59 insertions(+), 34 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 30e66026..7a527a34 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -11,7 +11,7 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - name: Set up Python 3.14 uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out pipeline code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - name: Install Nextflow uses: nf-core/setup-nextflow@v2 @@ -71,7 +71,7 @@ jobs: - name: Upload linting log file artifact if: ${{ always() }} - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: linting-logs path: | diff --git a/.prettierignore b/.prettierignore index 2255e3e3..dd749d43 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,3 +12,5 @@ testing* bin/ .nf-test/ ro-crate-metadata.json +modules/nf-core/ +subworkflows/nf-core/ diff --git a/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff b/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff index 44d24df2..3b39944b 100644 --- a/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff +++ b/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff @@ -1,8 +1,26 @@ Changes in component 'nf-core/fastq_align_dna' +'subworkflows/nf-core/fastq_align_dna/meta.yml' is unchanged Changes in 'fastq_align_dna/main.nf': --- subworkflows/nf-core/fastq_align_dna/main.nf +++ subworkflows/nf-core/fastq_align_dna/main.nf -@@ -15,51 +15,59 @@ +@@ -5,68 +5,77 @@ + // + + +-include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" +-include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' +-include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' +-include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" +-include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' +-include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" ++include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" ++include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' ++include { BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' ++include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" ++include { SNAPALIGNER_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' ++include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" + + workflow FASTQ_ALIGN_DNA { take: @@ -36,6 +54,8 @@ Changes in 'fastq_align_dna/main.nf': + return [meta, reads, index, fasta] + snap : aligner == 'snap' + return [meta, reads, index] ++ strobe : aligner == 'strobe' ++ return [meta, reads, fasta, index] + other : true + } + .set{ch_to_align} @@ -48,63 +68,66 @@ Changes in 'fastq_align_dna/main.nf': // Align fastq files to reference genome and (optionally) sort - if (aligner == 'bowtie2') { - BOWTIE2_ALIGN(ch_reads, ch_aligner_index, ch_fasta, false, sort) // if aligner is bowtie2 -- ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) ++ BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) // if aligner is bowtie2 + ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) - ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions) - } - else if (aligner == 'bwamem'){ - BWAMEM1_MEM (ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is bwa-mem -- ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) -- ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) ++ ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions.first()) ++ ++ BWAMEM1_MEM (ch_to_align.bwamem, sort) // If aligner is bwa-mem + ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) + ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) - ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions) - } - else if (aligner == 'bwamem2'){ - BWAMEM2_MEM (ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is bwa-mem2 -- ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) ++ ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions.first()) ++ ++ BWAMEM2_MEM (ch_to_align.bwamem2, sort) // If aligner is bwa-mem2 + ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) - ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions) - } - else if (aligner == 'dragmap'){ - DRAGMAP_ALIGN(ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is dragmap -- ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) -- ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) ++ ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions.first()) ++ ++ DRAGMAP_ALIGN(ch_to_align.dragmap, sort) // If aligner is dragmap + ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) + ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) - ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions) - } - else if (aligner == 'snap'){ -- SNAP_ALIGN (ch_reads, ch_aligner_index) // If aligner is snap +- SNAP_ALIGN (ch_reads, ch_aligner_index) // If aligner is snap - ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) - ch_bam_index.mix(SNAP_ALIGN.out.bai) - ch_versions = ch_versions.mix(SNAP_ALIGN.out.versions) - } +- else if (aligner == 'strobealign'){ +- STROBEALIGN (ch_reads, ch_fasta, ch_aligner_index, sort) // If aligner is strobealign +- ch_bam = ch_bam.mix(STROBEALIGN.out.bam) +- ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) +- ch_versions = ch_versions.mix(STROBEALIGN.out.versions) +- } - else { - error "Unknown aligner: ${aligner}" - } -+ BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) // if aligner is bowtie2 -+ ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) -+ ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions.first()) -+ -+ BWAMEM1_MEM (ch_to_align.bwamem, sort) // If aligner is bwa-mem -+ ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) -+ ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) -+ ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions.first()) -+ -+ BWAMEM2_MEM (ch_to_align.bwamem2, sort) // If aligner is bwa-mem2 -+ ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) -+ ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions.first()) -+ -+ DRAGMAP_ALIGN(ch_to_align.dragmap, sort) // If aligner is dragmap -+ ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) -+ ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) + ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions.first()) + -+ SNAP_ALIGN(ch_to_align.snap) // If aligner is snap -+ ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) -+ ch_bam_index.mix(SNAP_ALIGN.out.bai) -+ ch_versions = ch_versions.mix(SNAP_ALIGN.out.versions.first()) ++ SNAPALIGNER_ALIGN(ch_to_align.snap) // If aligner is snap ++ ch_bam = ch_bam.mix(SNAPALIGNER_ALIGN.out.bam) ++ ch_bam_index.mix(SNAPALIGNER_ALIGN.out.bai) ++ ch_versions = ch_versions.mix(SNAPALIGNER_ALIGN.out.versions.first()) ++ ++ STROBEALIGN(ch_to_align.strobe, sort) // If aligner is strobealign ++ ch_bam = ch_bam.mix(STROBEALIGN.out.bam) ++ ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) ++ ch_versions = ch_versions.mix(STROBEALIGN.out.versions.first()) emit: bam = ch_bam // channel: [ [meta], bam ] -'subworkflows/nf-core/fastq_align_dna/meta.yml' is unchanged -'subworkflows/nf-core/fastq_align_dna/tests/main.nf.test' is unchanged 'subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap' is unchanged -'subworkflows/nf-core/fastq_align_dna/tests/nextflow.config' is unchanged +'subworkflows/nf-core/fastq_align_dna/tests/main.nf.test' is unchanged ************************************************************ From a4555b6438af40e02b0ef1bf3d679bcf60127e55 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:18:50 +0100 Subject: [PATCH 061/202] patch modules --- modules.json | 12 +++--- .../nf-core/bowtie2/align/bowtie2-align.diff | 5 +-- modules/nf-core/bwa/mem/bwa-mem.diff | 5 +-- modules/nf-core/bwamem2/mem/bwamem2-mem.diff | 5 +-- .../nf-core/dragmap/align/dragmap-align.diff | 13 +++--- modules/nf-core/fastp/fastp.diff | 21 ---------- modules/nf-core/mosdepth/mosdepth.diff | 5 +-- .../nf-core/picard/collecthsmetrics/main.nf | 6 +-- .../picard-collecthsmetrics.diff | 40 +++++++++++++++---- .../picard-collectmultiplemetrics.diff | 4 +- .../picard-collectwgsmetrics.diff | 4 +- .../samtools/convert/samtools-convert.diff | 5 +-- .../samtools/coverage/samtools-coverage.diff | 5 +-- .../samtools/sormadup/samtools-sormadup.diff | 5 +-- modules/nf-core/samtools/sort/main.nf | 1 + .../nf-core/samtools/sort/samtools-sort.diff | 24 +++++------ .../samtools/stats/samtools-stats.diff | 5 +-- .../snapaligner/align/snapaligner-align.diff | 2 +- modules/nf-core/star/align/star-align.diff | 10 ++--- modules/nf-core/strobealign/strobealign.diff | 22 ++++++++++ subworkflows/local/bam_qc/meta.yml | 0 subworkflows/local/coverage/meta.yml | 0 subworkflows/local/fastq_align_rna/meta.yml | 0 .../local/fastq_to_aligned_cram/meta.yml | 0 .../local/fastq_to_unaligned_cram/meta.yml | 0 .../meta.yml | 0 .../nf-core/utils_nfcore_pipeline/main.nf | 2 +- .../utils_nfcore_pipeline.diff | 21 ++++++++++ 28 files changed, 131 insertions(+), 91 deletions(-) delete mode 100644 modules/nf-core/fastp/fastp.diff create mode 100644 modules/nf-core/strobealign/strobealign.diff create mode 100644 subworkflows/local/bam_qc/meta.yml create mode 100644 subworkflows/local/coverage/meta.yml create mode 100644 subworkflows/local/fastq_align_rna/meta.yml create mode 100644 subworkflows/local/fastq_to_aligned_cram/meta.yml create mode 100644 subworkflows/local/fastq_to_unaligned_cram/meta.yml create mode 100644 subworkflows/local/utils_nfcore_preprocessing_pipeline/meta.yml create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff diff --git a/modules.json b/modules.json index 7d0d7bc8..d3c15c5a 100644 --- a/modules.json +++ b/modules.json @@ -48,8 +48,7 @@ "fastp": { "branch": "master", "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", - "installed_by": ["modules"], - "patch": "modules/nf-core/fastp/fastp.diff" + "installed_by": ["modules"] }, "md5sum": { "branch": "master", @@ -151,7 +150,8 @@ "strobealign": { "branch": "master", "git_sha": "d5cc72b63c4e1565cb66e83f0577b04c0bb54d5c", - "installed_by": ["fastq_align_dna", "modules"] + "installed_by": ["fastq_align_dna", "modules"], + "patch": "modules/nf-core/strobealign/strobealign.diff" } } }, @@ -165,8 +165,7 @@ "fastq_align_dna": { "branch": "master", "git_sha": "070ddae7fb59384d3d85bf69eb9a1d71ab33ada9", - "installed_by": ["subworkflows"], - "patch": "subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff" + "installed_by": ["subworkflows"] }, "utils_nextflow_pipeline": { "branch": "master", @@ -176,7 +175,8 @@ "utils_nfcore_pipeline": { "branch": "master", "git_sha": "271e7fc14eb1320364416d996fb077421f3faed2", - "installed_by": ["subworkflows"] + "installed_by": ["subworkflows"], + "patch": "subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff" }, "utils_nfschema_plugin": { "branch": "master", diff --git a/modules/nf-core/bowtie2/align/bowtie2-align.diff b/modules/nf-core/bowtie2/align/bowtie2-align.diff index 1a6f0ab5..33d3a5cf 100644 --- a/modules/nf-core/bowtie2/align/bowtie2-align.diff +++ b/modules/nf-core/bowtie2/align/bowtie2-align.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/bowtie2/align' +Changes in component 'nf-core/bowtie2/align' 'modules/nf-core/bowtie2/align/environment.yml' is unchanged 'modules/nf-core/bowtie2/align/meta.yml' is unchanged Changes in 'bowtie2/align/main.nf': --- modules/nf-core/bowtie2/align/main.nf +++ modules/nf-core/bowtie2/align/main.nf @@ -8,9 +8,7 @@ - 'biocontainers/mulled-v2-ac74a7f02cebcfcc07d8e8d1d750af9c83b4d45a:f70b31a2db15c023d641c32f433fb02cd04df5a6-0' }" + 'community.wave.seqera.io/library/bowtie2_htslib_samtools_pigz:edeb13799090a2a6' }" input: - tuple val(meta) , path(reads) @@ -19,7 +19,6 @@ Changes in 'bowtie2/align/main.nf': 'modules/nf-core/bowtie2/align/tests/main.nf.test.snap' is unchanged 'modules/nf-core/bowtie2/align/tests/large_index.config' is unchanged 'modules/nf-core/bowtie2/align/tests/sam2.config' is unchanged -'modules/nf-core/bowtie2/align/tests/tags.yml' is unchanged 'modules/nf-core/bowtie2/align/tests/main.nf.test' is unchanged 'modules/nf-core/bowtie2/align/tests/sam.config' is unchanged 'modules/nf-core/bowtie2/align/tests/cram_crai.config' is unchanged diff --git a/modules/nf-core/bwa/mem/bwa-mem.diff b/modules/nf-core/bwa/mem/bwa-mem.diff index e07a383f..07ca43b0 100644 --- a/modules/nf-core/bwa/mem/bwa-mem.diff +++ b/modules/nf-core/bwa/mem/bwa-mem.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/bwa/mem' +Changes in component 'nf-core/bwa/mem' 'modules/nf-core/bwa/mem/environment.yml' is unchanged 'modules/nf-core/bwa/mem/meta.yml' is unchanged Changes in 'bwa/mem/main.nf': --- modules/nf-core/bwa/mem/main.nf +++ modules/nf-core/bwa/mem/main.nf @@ -8,9 +8,7 @@ - 'biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:1bd8542a8a0b42e0981337910954371d0230828e-0' }" + 'community.wave.seqera.io/library/bwa_htslib_samtools:83b50ff84ead50d0' }" input: - tuple val(meta) , path(reads) @@ -17,6 +17,5 @@ Changes in 'bwa/mem/main.nf': output: 'modules/nf-core/bwa/mem/tests/main.nf.test.snap' is unchanged -'modules/nf-core/bwa/mem/tests/tags.yml' is unchanged 'modules/nf-core/bwa/mem/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/bwamem2/mem/bwamem2-mem.diff b/modules/nf-core/bwamem2/mem/bwamem2-mem.diff index 7c300098..37262b6f 100644 --- a/modules/nf-core/bwamem2/mem/bwamem2-mem.diff +++ b/modules/nf-core/bwamem2/mem/bwamem2-mem.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/bwamem2/mem' +Changes in component 'nf-core/bwamem2/mem' 'modules/nf-core/bwamem2/mem/environment.yml' is unchanged 'modules/nf-core/bwamem2/mem/meta.yml' is unchanged Changes in 'bwamem2/mem/main.nf': --- modules/nf-core/bwamem2/mem/main.nf +++ modules/nf-core/bwamem2/mem/main.nf @@ -8,9 +8,7 @@ - 'biocontainers/mulled-v2-e5d375990341c5aef3c9aff74f96f66f65375ef6:2d15960ccea84e249a150b7f5d4db3a42fc2d6c3-0' }" + 'community.wave.seqera.io/library/bwa-mem2_htslib_samtools:db98f81f55b64113' }" input: - tuple val(meta), path(reads) @@ -17,6 +17,5 @@ Changes in 'bwamem2/mem/main.nf': output: 'modules/nf-core/bwamem2/mem/tests/main.nf.test.snap' is unchanged -'modules/nf-core/bwamem2/mem/tests/tags.yml' is unchanged 'modules/nf-core/bwamem2/mem/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/dragmap/align/dragmap-align.diff b/modules/nf-core/dragmap/align/dragmap-align.diff index 60188aab..cf4c75e6 100644 --- a/modules/nf-core/dragmap/align/dragmap-align.diff +++ b/modules/nf-core/dragmap/align/dragmap-align.diff @@ -1,22 +1,23 @@ -Changes in module 'nf-core/dragmap/align' +Changes in component 'nf-core/dragmap/align' 'modules/nf-core/dragmap/align/environment.yml' is unchanged 'modules/nf-core/dragmap/align/meta.yml' is unchanged Changes in 'dragmap/align/main.nf': --- modules/nf-core/dragmap/align/main.nf +++ modules/nf-core/dragmap/align/main.nf -@@ -8,9 +8,7 @@ - 'biocontainers/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:7eed251370ac7f3537c3d9472cdb2f9f5d8da1c5-0' }" +@@ -9,10 +9,8 @@ + : 'biocontainers/mulled-v2-580d344d9d4a496cd403932da8765f9e0187774d:df80ed8d23d0a2c43181a2b3dd1b39f2d00fab5c-0'}" input: -- tuple val(meta) , path(reads) +- tuple val(meta), path(reads) - tuple val(meta2), path(hashmap) - tuple val(meta3), path(fasta) +- val sort_bam + tuple val(meta) , path(reads), path(hashmap), path(fasta) - val sort_bam ++ val sort_bam output: + tuple val(meta), path("*.sam"), emit: sam, optional: true 'modules/nf-core/dragmap/align/tests/main.nf.test.snap' is unchanged -'modules/nf-core/dragmap/align/tests/tags.yml' is unchanged 'modules/nf-core/dragmap/align/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/fastp/fastp.diff b/modules/nf-core/fastp/fastp.diff deleted file mode 100644 index 266c00b1..00000000 --- a/modules/nf-core/fastp/fastp.diff +++ /dev/null @@ -1,21 +0,0 @@ -Changes in module 'nf-core/fastp' -'modules/nf-core/fastp/environment.yml' is unchanged -'modules/nf-core/fastp/meta.yml' is unchanged -Changes in 'fastp/main.nf': ---- modules/nf-core/fastp/main.nf -+++ modules/nf-core/fastp/main.nf -@@ -92,7 +92,6 @@ - $fail_fastq \\ - $merge_fastq \\ - --thread $task.cpus \\ -- --detect_adapter_for_pe \\ - $args \\ - 2> >(tee ${prefix}.fastp.log >&2) - - -'modules/nf-core/fastp/tests/main.nf.test.snap' is unchanged -'modules/nf-core/fastp/tests/tags.yml' is unchanged -'modules/nf-core/fastp/tests/main.nf.test' is unchanged -'modules/nf-core/fastp/tests/nextflow.save_failed.config' is unchanged -'modules/nf-core/fastp/tests/nextflow.interleaved.config' is unchanged -************************************************************ diff --git a/modules/nf-core/mosdepth/mosdepth.diff b/modules/nf-core/mosdepth/mosdepth.diff index 53e32f2b..59a3adf0 100644 --- a/modules/nf-core/mosdepth/mosdepth.diff +++ b/modules/nf-core/mosdepth/mosdepth.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/mosdepth' +Changes in component 'nf-core/mosdepth' 'modules/nf-core/mosdepth/environment.yml' is unchanged 'modules/nf-core/mosdepth/meta.yml' is unchanged Changes in 'mosdepth/main.nf': --- modules/nf-core/mosdepth/main.nf +++ modules/nf-core/mosdepth/main.nf @@ -8,8 +8,7 @@ - 'biocontainers/mosdepth:0.3.8--hd299d5a_0'}" + 'community.wave.seqera.io/library/mosdepth_htslib:0f58993cb6d93294'}" input: - tuple val(meta), path(bam), path(bai), path(bed) @@ -18,7 +18,6 @@ Changes in 'mosdepth/main.nf': 'modules/nf-core/mosdepth/tests/main.nf.test.snap' is unchanged 'modules/nf-core/mosdepth/tests/threshold.config' is unchanged 'modules/nf-core/mosdepth/tests/quantized.config' is unchanged -'modules/nf-core/mosdepth/tests/tags.yml' is unchanged 'modules/nf-core/mosdepth/tests/main.nf.test' is unchanged 'modules/nf-core/mosdepth/tests/window.config' is unchanged ************************************************************ diff --git a/modules/nf-core/picard/collecthsmetrics/main.nf b/modules/nf-core/picard/collecthsmetrics/main.nf index 3a51548f..a1dc56d8 100644 --- a/modules/nf-core/picard/collecthsmetrics/main.nf +++ b/modules/nf-core/picard/collecthsmetrics/main.nf @@ -20,7 +20,7 @@ process PICARD_COLLECTHSMETRICS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def reference = ref ? "--REFERENCE_SEQUENCE ${ref}" : "" + def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" def avail_mem = 3072 if (!task.memory) { @@ -33,14 +33,14 @@ process PICARD_COLLECTHSMETRICS { def bait_intervallist_cmd = "" if (bait_intervals =~ /.(bed|bed.gz)$/){ bait_interval_list = bait_intervals.toString().replaceAll(/.(bed|bed.gz)$/, ".interval_list") - bait_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${bait_intervals} --OUTPUT ${bait_interval_list} --SEQUENCE_DICTIONARY ${ref_dict} --TMP_DIR ." + bait_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${bait_intervals} --OUTPUT ${bait_interval_list} --SEQUENCE_DICTIONARY ${dict} --TMP_DIR ." } def target_interval_list = target_intervals def target_intervallist_cmd = "" if (target_intervals =~ /.(bed|bed.gz)$/){ target_interval_list = target_intervals.toString().replaceAll(/.(bed|bed.gz)$/, ".interval_list") - target_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${target_intervals} --OUTPUT ${target_interval_list} --SEQUENCE_DICTIONARY ${ref_dict} --TMP_DIR ." + target_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${target_intervals} --OUTPUT ${target_interval_list} --SEQUENCE_DICTIONARY ${dict} --TMP_DIR ." } diff --git a/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff b/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff index 951f60dc..5907d093 100644 --- a/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff +++ b/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff @@ -1,23 +1,49 @@ -Changes in module 'nf-core/picard/collecthsmetrics' +Changes in component 'nf-core/picard/collecthsmetrics' 'modules/nf-core/picard/collecthsmetrics/environment.yml' is unchanged 'modules/nf-core/picard/collecthsmetrics/meta.yml' is unchanged Changes in 'picard/collecthsmetrics/main.nf': --- modules/nf-core/picard/collecthsmetrics/main.nf +++ modules/nf-core/picard/collecthsmetrics/main.nf -@@ -8,10 +8,7 @@ - 'biocontainers/picard:3.3.0--hdfd78af_0' }" +@@ -8,11 +8,7 @@ + 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" input: - tuple val(meta), path(bam), path(bai), path(bait_intervals, stageAs: "baits/*"), path(target_intervals, stageAs: 'targets/*') -- tuple val(meta2), path(fasta) -- tuple val(meta3), path(fai) -- tuple val(meta4), path(dict) +- tuple val(meta2), path(ref) +- tuple val(meta3), path(ref_fai) +- tuple val(meta4), path(ref_dict) +- tuple val(meta5), path(ref_gzi) // ref_gzi only required if reference is gzipped + tuple val(meta), path(bam), path(bai), path(bait_intervals, stageAs: "bait/*"), path(target_intervals, stageAs: "target/*") ,path(fasta) ,path(fai) ,path(dict) output: tuple val(meta), path("*_metrics") , emit: metrics +@@ -24,7 +20,7 @@ + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" +- def reference = ref ? "--REFERENCE_SEQUENCE ${ref}" : "" ++ def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" + + def avail_mem = 3072 + if (!task.memory) { +@@ -37,14 +33,14 @@ + def bait_intervallist_cmd = "" + if (bait_intervals =~ /.(bed|bed.gz)$/){ + bait_interval_list = bait_intervals.toString().replaceAll(/.(bed|bed.gz)$/, ".interval_list") +- bait_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${bait_intervals} --OUTPUT ${bait_interval_list} --SEQUENCE_DICTIONARY ${ref_dict} --TMP_DIR ." ++ bait_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${bait_intervals} --OUTPUT ${bait_interval_list} --SEQUENCE_DICTIONARY ${dict} --TMP_DIR ." + } + + def target_interval_list = target_intervals + def target_intervallist_cmd = "" + if (target_intervals =~ /.(bed|bed.gz)$/){ + target_interval_list = target_intervals.toString().replaceAll(/.(bed|bed.gz)$/, ".interval_list") +- target_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${target_intervals} --OUTPUT ${target_interval_list} --SEQUENCE_DICTIONARY ${ref_dict} --TMP_DIR ." ++ target_intervallist_cmd = "picard -Xmx${avail_mem}M BedToIntervalList --INPUT ${target_intervals} --OUTPUT ${target_interval_list} --SEQUENCE_DICTIONARY ${dict} --TMP_DIR ." + } + + 'modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap' is unchanged -'modules/nf-core/picard/collecthsmetrics/tests/tags.yml' is unchanged 'modules/nf-core/picard/collecthsmetrics/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff b/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff index 6c796d52..489076fb 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff +++ b/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/picard/collectmultiplemetrics' +Changes in component 'nf-core/picard/collectmultiplemetrics' 'modules/nf-core/picard/collectmultiplemetrics/environment.yml' is unchanged 'modules/nf-core/picard/collectmultiplemetrics/meta.yml' is unchanged Changes in 'picard/collectmultiplemetrics/main.nf': --- modules/nf-core/picard/collectmultiplemetrics/main.nf +++ modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -8,9 +8,7 @@ - 'biocontainers/picard:3.3.0--hdfd78af_0' }" + 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" input: - tuple val(meta) , path(bam), path(bai) diff --git a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff index 98d4a1eb..bf843c60 100644 --- a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff +++ b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/picard/collectwgsmetrics' +Changes in component 'nf-core/picard/collectwgsmetrics' 'modules/nf-core/picard/collectwgsmetrics/environment.yml' is unchanged 'modules/nf-core/picard/collectwgsmetrics/meta.yml' is unchanged Changes in 'picard/collectwgsmetrics/main.nf': --- modules/nf-core/picard/collectwgsmetrics/main.nf +++ modules/nf-core/picard/collectwgsmetrics/main.nf @@ -8,9 +8,7 @@ - 'biocontainers/picard:3.3.0--hdfd78af_0' }" + 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" input: - tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/samtools/convert/samtools-convert.diff b/modules/nf-core/samtools/convert/samtools-convert.diff index 67617c31..bd28d5da 100644 --- a/modules/nf-core/samtools/convert/samtools-convert.diff +++ b/modules/nf-core/samtools/convert/samtools-convert.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/samtools/convert' +Changes in component 'nf-core/samtools/convert' 'modules/nf-core/samtools/convert/environment.yml' is unchanged 'modules/nf-core/samtools/convert/meta.yml' is unchanged Changes in 'samtools/convert/main.nf': --- modules/nf-core/samtools/convert/main.nf +++ modules/nf-core/samtools/convert/main.nf @@ -8,9 +8,7 @@ - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input), path(index) @@ -17,6 +17,5 @@ Changes in 'samtools/convert/main.nf': tuple val(meta), path("*.bam") , emit: bam , optional: true 'modules/nf-core/samtools/convert/tests/main.nf.test.snap' is unchanged -'modules/nf-core/samtools/convert/tests/tags.yml' is unchanged 'modules/nf-core/samtools/convert/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/samtools/coverage/samtools-coverage.diff b/modules/nf-core/samtools/coverage/samtools-coverage.diff index 3b0e1f03..5dbbbd9e 100644 --- a/modules/nf-core/samtools/coverage/samtools-coverage.diff +++ b/modules/nf-core/samtools/coverage/samtools-coverage.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/samtools/coverage' +Changes in component 'nf-core/samtools/coverage' 'modules/nf-core/samtools/coverage/environment.yml' is unchanged 'modules/nf-core/samtools/coverage/meta.yml' is unchanged Changes in 'samtools/coverage/main.nf': --- modules/nf-core/samtools/coverage/main.nf +++ modules/nf-core/samtools/coverage/main.nf @@ -8,9 +8,7 @@ - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input), path(input_index) @@ -17,6 +17,5 @@ Changes in 'samtools/coverage/main.nf': tuple val(meta), path("*.txt"), emit: coverage 'modules/nf-core/samtools/coverage/tests/main.nf.test.snap' is unchanged -'modules/nf-core/samtools/coverage/tests/tags.yml' is unchanged 'modules/nf-core/samtools/coverage/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/samtools/sormadup/samtools-sormadup.diff b/modules/nf-core/samtools/sormadup/samtools-sormadup.diff index 6da27c02..f614f937 100644 --- a/modules/nf-core/samtools/sormadup/samtools-sormadup.diff +++ b/modules/nf-core/samtools/sormadup/samtools-sormadup.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/samtools/sormadup' +Changes in component 'nf-core/samtools/sormadup' 'modules/nf-core/samtools/sormadup/environment.yml' is unchanged 'modules/nf-core/samtools/sormadup/meta.yml' is unchanged Changes in 'samtools/sormadup/main.nf': --- modules/nf-core/samtools/sormadup/main.nf +++ modules/nf-core/samtools/sormadup/main.nf @@ -8,8 +8,7 @@ - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input) @@ -17,7 +17,6 @@ Changes in 'samtools/sormadup/main.nf': 'modules/nf-core/samtools/sormadup/tests/main.nf.test.snap' is unchanged 'modules/nf-core/samtools/sormadup/tests/bam.config' is unchanged -'modules/nf-core/samtools/sormadup/tests/tags.yml' is unchanged 'modules/nf-core/samtools/sormadup/tests/cram.config' is unchanged 'modules/nf-core/samtools/sormadup/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/samtools/sort/main.nf b/modules/nf-core/samtools/sort/main.nf index 7b83e4a1..4abb5f3c 100644 --- a/modules/nf-core/samtools/sort/main.nf +++ b/modules/nf-core/samtools/sort/main.nf @@ -9,6 +9,7 @@ process SAMTOOLS_SORT { input: tuple val(meta) , path(bam), path(fasta) + val index_format output: tuple val(meta), path("${prefix}.bam"), emit: bam, optional: true diff --git a/modules/nf-core/samtools/sort/samtools-sort.diff b/modules/nf-core/samtools/sort/samtools-sort.diff index 817f68c5..a7a10b78 100644 --- a/modules/nf-core/samtools/sort/samtools-sort.diff +++ b/modules/nf-core/samtools/sort/samtools-sort.diff @@ -1,39 +1,37 @@ -Changes in module 'nf-core/samtools/sort' +Changes in component 'nf-core/samtools/sort' 'modules/nf-core/samtools/sort/environment.yml' is unchanged 'modules/nf-core/samtools/sort/meta.yml' is unchanged Changes in 'samtools/sort/main.nf': --- modules/nf-core/samtools/sort/main.nf +++ modules/nf-core/samtools/sort/main.nf @@ -8,8 +8,7 @@ - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta) , path(bam) - tuple val(meta2), path(fasta) + tuple val(meta) , path(bam), path(fasta) + val index_format output: - tuple val(meta), path("*.bam"), emit: bam, optional: true - -@@ -28,6 +27,7 @@ - args.contains("--output-fmt cram") ? "cram" : - "bam" +@@ -31,6 +30,7 @@ + args.contains("--output-fmt cram") ? "cram" : + "bam" def reference = fasta ? "--reference ${fasta}" : "" + def sort_memory = (task.memory.mega/task.cpus*0.75).intValue() - if ("$bam" == "${prefix}.bam") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" - - """ -@@ -39,6 +39,7 @@ + output_file = index_format ? "${prefix}.${extension}##idx##${prefix}.${extension}.${index_format} --write-index" : "${prefix}.${extension}" + if (index_format) { + if (!index_format.matches('bai|csi|crai')) { +@@ -50,6 +50,7 @@ -T ${prefix} \\ --threads $task.cpus \\ ${reference} \\ + -m ${sort_memory}M \\ - -o ${prefix}.${extension} \\ + -o ${output_file} \\ - 'modules/nf-core/samtools/sort/tests/main.nf.test.snap' is unchanged -'modules/nf-core/samtools/sort/tests/tags.yml' is unchanged 'modules/nf-core/samtools/sort/tests/nextflow_cram.config' is unchanged 'modules/nf-core/samtools/sort/tests/nextflow.config' is unchanged 'modules/nf-core/samtools/sort/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/samtools/stats/samtools-stats.diff b/modules/nf-core/samtools/stats/samtools-stats.diff index dc243ad7..1ccaf8fe 100644 --- a/modules/nf-core/samtools/stats/samtools-stats.diff +++ b/modules/nf-core/samtools/stats/samtools-stats.diff @@ -1,11 +1,11 @@ -Changes in module 'nf-core/samtools/stats' +Changes in component 'nf-core/samtools/stats' 'modules/nf-core/samtools/stats/environment.yml' is unchanged 'modules/nf-core/samtools/stats/meta.yml' is unchanged Changes in 'samtools/stats/main.nf': --- modules/nf-core/samtools/stats/main.nf +++ modules/nf-core/samtools/stats/main.nf @@ -8,8 +8,7 @@ - 'biocontainers/samtools:1.21--h50ea8bc_0' }" + 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input), path(input_index) @@ -16,6 +16,5 @@ Changes in 'samtools/stats/main.nf': tuple val(meta), path("*.stats"), emit: stats 'modules/nf-core/samtools/stats/tests/main.nf.test.snap' is unchanged -'modules/nf-core/samtools/stats/tests/tags.yml' is unchanged 'modules/nf-core/samtools/stats/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/snapaligner/align/snapaligner-align.diff b/modules/nf-core/snapaligner/align/snapaligner-align.diff index f6f326aa..34d23cd4 100644 --- a/modules/nf-core/snapaligner/align/snapaligner-align.diff +++ b/modules/nf-core/snapaligner/align/snapaligner-align.diff @@ -5,7 +5,7 @@ Changes in 'snapaligner/align/main.nf': --- modules/nf-core/snapaligner/align/main.nf +++ modules/nf-core/snapaligner/align/main.nf @@ -8,8 +8,7 @@ - 'biocontainers/snap-aligner:2.0.3--hd03093a_0' }" + 'community.wave.seqera.io/library/snap-aligner:2.0.5--23601d3a3a2ae452' }" input: - tuple val(meta) , path(reads, stageAs: "?/*") diff --git a/modules/nf-core/star/align/star-align.diff b/modules/nf-core/star/align/star-align.diff index 019f65d6..398da009 100644 --- a/modules/nf-core/star/align/star-align.diff +++ b/modules/nf-core/star/align/star-align.diff @@ -1,4 +1,6 @@ Changes in component 'nf-core/star/align' +'modules/nf-core/star/align/environment.yml' is unchanged +'modules/nf-core/star/align/meta.yml' is unchanged Changes in 'star/align/main.nf': --- modules/nf-core/star/align/main.nf +++ modules/nf-core/star/align/main.nf @@ -24,11 +26,9 @@ Changes in 'star/align/main.nf': def seq_center_arg = seq_center ? "'CN:$seq_center'" : "" attrRG = args.contains("--outSAMattrRGline") ? "" : "--outSAMattrRGline 'ID:$prefix' $seq_center_arg 'SM:$prefix' $seq_platform_arg" -'modules/nf-core/star/align/environment.yml' is unchanged -'modules/nf-core/star/align/meta.yml' is unchanged -'modules/nf-core/star/align/tests/nextflow.starfusion.config' is unchanged -'modules/nf-core/star/align/tests/main.nf.test' is unchanged -'modules/nf-core/star/align/tests/nextflow.arriba.config' is unchanged 'modules/nf-core/star/align/tests/main.nf.test.snap' is unchanged +'modules/nf-core/star/align/tests/nextflow.arriba.config' is unchanged +'modules/nf-core/star/align/tests/nextflow.starfusion.config' is unchanged 'modules/nf-core/star/align/tests/nextflow.config' is unchanged +'modules/nf-core/star/align/tests/main.nf.test' is unchanged ************************************************************ diff --git a/modules/nf-core/strobealign/strobealign.diff b/modules/nf-core/strobealign/strobealign.diff new file mode 100644 index 00000000..2e5880dd --- /dev/null +++ b/modules/nf-core/strobealign/strobealign.diff @@ -0,0 +1,22 @@ +Changes in component 'nf-core/strobealign' +'modules/nf-core/strobealign/environment.yml' is unchanged +'modules/nf-core/strobealign/meta.yml' is unchanged +Changes in 'strobealign/main.nf': +--- modules/nf-core/strobealign/main.nf ++++ modules/nf-core/strobealign/main.nf +@@ -8,9 +8,7 @@ + 'community.wave.seqera.io/library/htslib_samtools_strobealign_pigz:4fa4f439c6bea386' }" + + input: +- tuple val(meta) , path(reads) +- tuple val(meta2), path(fasta) +- tuple val(meta3), path(index) ++ tuple val(meta) , path(reads), path(fasta), path(index) + val sort_bam + + output: + +'modules/nf-core/strobealign/tests/main.nf.test.snap' is unchanged +'modules/nf-core/strobealign/tests/nextflow.config' is unchanged +'modules/nf-core/strobealign/tests/main.nf.test' is unchanged +************************************************************ diff --git a/subworkflows/local/bam_qc/meta.yml b/subworkflows/local/bam_qc/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/coverage/meta.yml b/subworkflows/local/coverage/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/fastq_align_rna/meta.yml b/subworkflows/local/fastq_align_rna/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/fastq_to_aligned_cram/meta.yml b/subworkflows/local/fastq_to_aligned_cram/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/fastq_to_unaligned_cram/meta.yml b/subworkflows/local/fastq_to_unaligned_cram/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/local/utils_nfcore_preprocessing_pipeline/meta.yml b/subworkflows/local/utils_nfcore_preprocessing_pipeline/meta.yml new file mode 100644 index 00000000..e69de29b diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index 2f30e9a4..bfd25876 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -98,7 +98,7 @@ def workflowVersionToYAML() { // Get channel of software versions used in pipeline in YAML format // def softwareVersionsToYAML(ch_versions) { - return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML())) + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) } // diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff b/subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff new file mode 100644 index 00000000..38096acc --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff @@ -0,0 +1,21 @@ +Changes in component 'nf-core/utils_nfcore_pipeline' +'subworkflows/nf-core/utils_nfcore_pipeline/meta.yml' is unchanged +Changes in 'utils_nfcore_pipeline/main.nf': +--- subworkflows/nf-core/utils_nfcore_pipeline/main.nf ++++ subworkflows/nf-core/utils_nfcore_pipeline/main.nf +@@ -98,7 +98,7 @@ + // Get channel of software versions used in pipeline in YAML format + // + def softwareVersionsToYAML(ch_versions) { +- return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML())) ++ return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) + } + + // + +'subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test' is unchanged +'subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap' is unchanged +'subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap' is unchanged +'subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config' is unchanged +'subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test' is unchanged +************************************************************ From 3f9cc7cef00e198146b9d0f9724a7b15068d647d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:25:27 +0100 Subject: [PATCH 062/202] re-add analysis profiles --- nextflow.config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nextflow.config b/nextflow.config index a7453b62..01378b19 100644 --- a/nextflow.config +++ b/nextflow.config @@ -185,6 +185,12 @@ profiles { } test { includeConfig 'conf/test.config' } test_full { includeConfig 'conf/test_full.config' } + s3_ugent { includeConfig 'conf/profiles/s3_ugent.config' } + // analysis profiles + sWGS { includeConfig 'conf/profiles/sWGS.config' } + WGS { includeConfig 'conf/profiles/WGS.config' } + WES { includeConfig 'conf/profiles/WES.config' } + copgt { includeConfig 'conf/profiles/copgt.config' } } // Load nf-core custom profiles from different institutions From ef8d686b45c2230ebfd21f84c3b2eff78fee06ab Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:55:17 +0100 Subject: [PATCH 063/202] set cram output to v3 to ensure downstream compatibility --- conf/modules.config | 8 ++++---- subworkflows/local/bam_qc/main.nf | 1 - workflows/preprocessing.nf | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index acb7eefc..56bf31d1 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -48,7 +48,7 @@ process { ext.args = { [ meta.readgroup ? "--rg-line \"@RG\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\t") + "\"" : "", - "--output-fmt cram", + "--output-fmt cram,version=3.0", "--output-fmt-option archive", ].join(" ").trim() } @@ -153,7 +153,7 @@ process { "-d 2500", params.umi_aware ? "--barcode-name" : "", "--write-index", - "--output-fmt cram", + "--output-fmt cram,version=3.0", "--output-fmt-option archive", ].join(" ").trim() } @@ -165,7 +165,7 @@ process { ext.args = { [ "--write-index", - "--output-fmt cram", + "--output-fmt cram,version=3.0", "--output-fmt-option archive", ].join(" ").trim() } @@ -190,7 +190,7 @@ process { ext.args = { [ "-C", - "--output-fmt cram", + "--output-fmt cram,version=3.0", "--output-fmt-option archive", ].join(" ").trim() } diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index bd2cc469..e35555a8 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -23,7 +23,6 @@ workflow BAM_QC { .set { ch_bam_bai_fasta } SAMTOOLS_STATS(ch_bam_bai_fasta) - ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions.first()) ch_bam_bai_fasta .map { meta, bam, bai, _fasta -> diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 48c7b0d1..f90dd2eb 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -446,6 +446,32 @@ workflow PREPROCESSING { // // Collate and save software versions // + def topic_versions = Channel.topic("versions") + .distinct() + .branch { entry -> + versions_file: entry instanceof Path + versions_tuple: true + } + + def topic_versions_string = topic_versions.versions_tuple + .map { process, tool, version -> + [ process[process.lastIndexOf(':')+1..-1], " ${tool}: ${version}" ] + } + .groupTuple(by:0) + .map { process, tool_versions -> + tool_versions.unique().sort() + "${process}:\n${tool_versions.join('\n')}" + } + + softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + .mix(topic_versions_string) + .collectFile( + storeDir: "${params.outdir}/pipeline_info", + name: 'nf_cmgg_preprocessing_software_mqc_versions.yml', + sort: true, + newLine: true + ).set { ch_collated_versions } + softwareVersionsToYAML(ch_versions) .collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'preprocessing_software_mqc_versions.yml', sort: true, newLine: true) .set { ch_collated_versions } From 915702a421b8202fc37aa7f48218d862e83c9697 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:55:54 +0100 Subject: [PATCH 064/202] bump subwf --- modules.json | 5 ++--- .../utils_nfcore_pipeline.diff | 21 ------------------- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff diff --git a/modules.json b/modules.json index d3c15c5a..f5872c3f 100644 --- a/modules.json +++ b/modules.json @@ -174,9 +174,8 @@ }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "271e7fc14eb1320364416d996fb077421f3faed2", - "installed_by": ["subworkflows"], - "patch": "subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff" + "git_sha": "df4d1c8cdee98a1bbbed8fc51e82296568e0f9c1", + "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff b/subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff deleted file mode 100644 index 38096acc..00000000 --- a/subworkflows/nf-core/utils_nfcore_pipeline/utils_nfcore_pipeline.diff +++ /dev/null @@ -1,21 +0,0 @@ -Changes in component 'nf-core/utils_nfcore_pipeline' -'subworkflows/nf-core/utils_nfcore_pipeline/meta.yml' is unchanged -Changes in 'utils_nfcore_pipeline/main.nf': ---- subworkflows/nf-core/utils_nfcore_pipeline/main.nf -+++ subworkflows/nf-core/utils_nfcore_pipeline/main.nf -@@ -98,7 +98,7 @@ - // Get channel of software versions used in pipeline in YAML format - // - def softwareVersionsToYAML(ch_versions) { -- return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML())) -+ return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) - } - - // - -'subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test' is unchanged -'subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap' is unchanged -'subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap' is unchanged -'subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config' is unchanged -'subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test' is unchanged -************************************************************ From 05707f513829df79851980d7edded46dad1e6d77 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:26:41 +0100 Subject: [PATCH 065/202] fix snapshots --- .../local/bam_qc/main.nf.test.snap | 47 +++++----- .../local/coverage/main.nf.test.snap | 36 ++++---- .../fastq_to_aligned_cram/main.nf.test.snap | 36 ++++---- .../fastq_to_unaligned_cram/main.nf.test.snap | 10 +- tests/workflows/preprocessing.nf.test.snap | 91 +++++++++---------- 5 files changed, 107 insertions(+), 113 deletions(-) diff --git a/tests/subworkflows/local/bam_qc/main.nf.test.snap b/tests/subworkflows/local/bam_qc/main.nf.test.snap index daa07dff..2403cda0 100644 --- a/tests/subworkflows/local/bam_qc/main.nf.test.snap +++ b/tests/subworkflows/local/bam_qc/main.nf.test.snap @@ -68,23 +68,22 @@ "id": "test", "single_end": false }, - "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" + "test.stats:md5,3535d8d302e61ca0d77ac718db8309f1" ] ], "versions": [ - "versions.yml:md5,1e3d06d4435935cb6c01c1d94dad41c3", - "versions.yml:md5,25efd393aac661d8cb2aa8669127abac", - "versions.yml:md5,28cad528cb128dd7bdad050758f1801c", - "versions.yml:md5,ebcad29c0749995f2306fbcf31b03c8c", - "versions.yml:md5,ff0b9222ca016f9d2a7fa1d24010eccf" + "versions.yml:md5,15389a9f97668f320b9628da1903a93b", + "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5", + "versions.yml:md5,593804078c060457d011f7f6b650e500", + "versions.yml:md5,f5507938ec419f55239e3faa9f99376f" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:17:45.293786329" + "timestamp": "2025-12-02T12:48:55.096074" }, "Bam QC - Samtools": { "content": [ @@ -125,21 +124,20 @@ "id": "test", "single_end": false }, - "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" + "test.stats:md5,3535d8d302e61ca0d77ac718db8309f1" ] ], "versions": [ - "versions.yml:md5,1e3d06d4435935cb6c01c1d94dad41c3", - "versions.yml:md5,28cad528cb128dd7bdad050758f1801c", - "versions.yml:md5,ff0b9222ca016f9d2a7fa1d24010eccf" + "versions.yml:md5,15389a9f97668f320b9628da1903a93b", + "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:19:09.897986912" + "timestamp": "2025-12-02T12:50:04.027873" }, "Bam QC - WGSmetrics": { "content": [ @@ -210,22 +208,21 @@ "id": "test", "single_end": false }, - "test.stats:md5,18292ec37f6ff9eff458683e3abf638b" + "test.stats:md5,3535d8d302e61ca0d77ac718db8309f1" ] ], "versions": [ - "versions.yml:md5,1e3d06d4435935cb6c01c1d94dad41c3", - "versions.yml:md5,25efd393aac661d8cb2aa8669127abac", - "versions.yml:md5,28cad528cb128dd7bdad050758f1801c", - "versions.yml:md5,5da695471744af2707c6864e2773aa27", - "versions.yml:md5,ff0b9222ca016f9d2a7fa1d24010eccf" + "versions.yml:md5,15389a9f97668f320b9628da1903a93b", + "versions.yml:md5,3d2d9acb75406ea94b547be23a45601b", + "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5", + "versions.yml:md5,f5507938ec419f55239e3faa9f99376f" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:18:47.271352687" + "timestamp": "2025-12-02T12:49:52.298773" } } \ No newline at end of file diff --git a/tests/subworkflows/local/coverage/main.nf.test.snap b/tests/subworkflows/local/coverage/main.nf.test.snap index 7c779621..2891b942 100644 --- a/tests/subworkflows/local/coverage/main.nf.test.snap +++ b/tests/subworkflows/local/coverage/main.nf.test.snap @@ -49,9 +49,9 @@ ] ], "14": [ - "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", + "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", - "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ], "2": [ [ @@ -123,7 +123,7 @@ "single_end": false, "tag": "WES" }, - "test.quantized.bed.gz.csi:md5,39f0a425a3f11134e247141c0890fa89" + "test.quantized.bed.gz.csi:md5,22e9d1096b7afd3d628526c831b26397" ] ], "mosdepth_global": [ @@ -176,7 +176,7 @@ "single_end": false, "tag": "WES" }, - "test.quantized.bed.gz.csi:md5,39f0a425a3f11134e247141c0890fa89" + "test.quantized.bed.gz.csi:md5,22e9d1096b7afd3d628526c831b26397" ] ], "mosdepth_regions": [ @@ -246,17 +246,17 @@ ] ], "versions": [ - "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", + "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", - "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:20:02.213734734" + "timestamp": "2025-12-02T12:34:24.897893" }, "Coverage - seqcap": { "content": [ @@ -301,8 +301,8 @@ ], "14": [ - "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", - "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", + "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ], "2": [ [ @@ -374,7 +374,7 @@ "single_end": false, "tag": "seqcap" }, - "test.quantized.bed.gz.csi:md5,39f0a425a3f11134e247141c0890fa89" + "test.quantized.bed.gz.csi:md5,22e9d1096b7afd3d628526c831b26397" ] ], "mosdepth_global": [ @@ -427,7 +427,7 @@ "single_end": false, "tag": "seqcap" }, - "test.quantized.bed.gz.csi:md5,39f0a425a3f11134e247141c0890fa89" + "test.quantized.bed.gz.csi:md5,22e9d1096b7afd3d628526c831b26397" ] ], "mosdepth_regions": [ @@ -490,15 +490,15 @@ ] ], "versions": [ - "versions.yml:md5,2d22ebfca674911d28ac60f352a98b1b", - "versions.yml:md5,d7c2bc4717e6518d6ce017a70a3f1df0" + "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", + "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:19:32.672589279" + "timestamp": "2025-12-02T12:34:05.200571" } } \ No newline at end of file diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index bcaa1414..50296e7d 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -84,18 +84,18 @@ ] ], "versions": [ - "versions.yml:md5,7e9be834e78aaf958ee23618377d8da5", - "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d", - "versions.yml:md5,d92f130d879deee51a23917c6e272233", - "versions.yml:md5,d92f130d879deee51a23917c6e272233" + "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", + "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", + "versions.yml:md5,9598e8236a8fbab0f6745715fa0de9d3", + "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:24:09.28415088" + "timestamp": "2025-12-02T12:52:20.737608" }, "fastq to cram - bwa - samtools sormadup": { "content": [ @@ -137,21 +137,21 @@ } } }, - "test.merged.metrics:md5,6e4d03a56877997e0e035d267550e381" + "test.merged.metrics:md5,a4129081c3f2f10e6f6ecdf8b1c44852" ] ], "versions": [ - "versions.yml:md5,7d966b1716b0f134534741313257f0ec", - "versions.yml:md5,d92f130d879deee51a23917c6e272233", - "versions.yml:md5,d92f130d879deee51a23917c6e272233" + "versions.yml:md5,53fb2eac4cab0b817e852418eb0ba719", + "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", + "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:28:32.155644934" + "timestamp": "2025-12-02T13:04:47.356008" }, "fastq to cram - star - bamsormadup": { "content": [ @@ -197,16 +197,16 @@ ] ], "versions": [ - "versions.yml:md5,7e9be834e78aaf958ee23618377d8da5", + "versions.yml:md5,9598e8236a8fbab0f6745715fa0de9d3", "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:27:31.44516813" + "timestamp": "2025-12-02T13:04:21.082358" }, "fastq to cram - bwa - samtools sort": { "content": [ diff --git a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap index 3dfdcb8b..39fd0d73 100644 --- a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap @@ -16,15 +16,15 @@ ] ], "versions": [ - "versions.yml:md5,422c9b3605121c3528ee755bbdb12a85", - "versions.yml:md5,f494e9f15ef064e11d31abca2f2ba51c" + "versions.yml:md5,7d0123b33defe52fceb94bd95f802978", + "versions.yml:md5,f253e859e7aa43e34481f5493c4e847b" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:30:55.301756415" + "timestamp": "2025-12-02T13:05:20.48603" } } \ No newline at end of file diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 36fadad2..348c1fd2 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -102,7 +102,7 @@ "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, - "sample1.fastp.json:md5,543fb8fe4512975ce7dafd5287cae601" + "sample1.fastp.json:md5,caf903cc79784ceaa71d6ef743c02ff3" ] ], "md5sums": [ @@ -261,7 +261,7 @@ "id": "sample1" } }, - "sample1.quantized.bed.gz.csi:md5,ac24f9c737b984091364b3c5b1f45567" + "sample1.quantized.bed.gz.csi:md5,efa0455ec39b49b96fd44c1efcbef8ab" ] ], "mosdepth_regions": [ @@ -580,7 +580,7 @@ "id": "sample1" } }, - "sample1.stats:md5,0653e8f1834d58c557ad463c36ae6b61" + "sample1.stats:md5,33a10d02ce404301e012f07841815f59" ] ], "sormadup_metrics": [ @@ -613,27 +613,26 @@ ], "versions": [ - "versions.yml:md5,321e55c8f19102dc87a10e981635edda", - "versions.yml:md5,3e9382a1dc62d4f405bcfb58fe6b7768", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,84a41fdb642c270c5f36846cd7d8f033", - "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", - "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", - "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,02acae00818ba01a01e2bdb03b574343", + "versions.yml:md5,23b060bcc18a02fc8f981102ef3a3006", + "versions.yml:md5,31df076e5d21d61db772cb39643350e2", + "versions.yml:md5,b702df83d9ece54caa0e765a6286cdd2", + "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", + "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", + "versions.yml:md5,cdce7da7ce14e29fbd9fd72e88505ffa", + "versions.yml:md5,d00b52835d019d68e58aafd218429a75", "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", - "versions.yml:md5,ebdd9fe0c553612c66238375b920f178", - "versions.yml:md5,fecf2763ae04725fa0ca7c995018dcea" + "versions.yml:md5,f567cdcfb384cc7a2d9ff4dc850f3bad", + "versions.yml:md5,fe9b8b3a8dc895efcf8f7c0b3248ff2d" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-21T14:24:42.558578431" + "timestamp": "2025-12-02T13:07:39.314799" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -738,7 +737,7 @@ "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, - "sample1.fastp.json:md5,543fb8fe4512975ce7dafd5287cae601" + "sample1.fastp.json:md5,caf903cc79784ceaa71d6ef743c02ff3" ] ], "md5sums": [ @@ -907,7 +906,7 @@ "id": "sample1" } }, - "sample1.stats:md5,0653e8f1834d58c557ad463c36ae6b61" + "sample1.stats:md5,33a10d02ce404301e012f07841815f59" ] ], "sormadup_metrics": [ @@ -940,23 +939,22 @@ ], "versions": [ - "versions.yml:md5,321e55c8f19102dc87a10e981635edda", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", - "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", - "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", + "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", - "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868" + "versions.yml:md5,cdce7da7ce14e29fbd9fd72e88505ffa", + "versions.yml:md5,d00b52835d019d68e58aafd218429a75", + "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", + "versions.yml:md5,f567cdcfb384cc7a2d9ff4dc850f3bad", + "versions.yml:md5,fe9b8b3a8dc895efcf8f7c0b3248ff2d" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-21T14:29:48.196853611" + "timestamp": "2025-12-02T13:12:08.110112" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1058,7 +1056,7 @@ "aligner": "bwamem", "count": 1 }, - "sample1.fastp.json:md5,543fb8fe4512975ce7dafd5287cae601" + "sample1.fastp.json:md5,caf903cc79784ceaa71d6ef743c02ff3" ] ], "md5sums": [ @@ -1211,7 +1209,7 @@ "id": "sample1" } }, - "sample1.quantized.bed.gz.csi:md5,ac24f9c737b984091364b3c5b1f45567" + "sample1.quantized.bed.gz.csi:md5,efa0455ec39b49b96fd44c1efcbef8ab" ] ], "mosdepth_regions": [ @@ -1453,7 +1451,7 @@ "id": "sample1" } }, - "sample1.stats:md5,0653e8f1834d58c557ad463c36ae6b61" + "sample1.stats:md5,33a10d02ce404301e012f07841815f59" ] ], "sormadup_metrics": [ @@ -1485,26 +1483,25 @@ ], "versions": [ - "versions.yml:md5,2dbfdf50978986550dbe621f1d49fea7", - "versions.yml:md5,321e55c8f19102dc87a10e981635edda", - "versions.yml:md5,3e9382a1dc62d4f405bcfb58fe6b7768", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,4445e842758f99d74d032eab0af01ff6", - "versions.yml:md5,67e17554941666c3f3da7ab6e3b1ac5d", - "versions.yml:md5,84a41fdb642c270c5f36846cd7d8f033", - "versions.yml:md5,8ede2c6189fe1f73ef7e36b42528473c", - "versions.yml:md5,a18197a27823760677276bdf9a17c0b6", - "versions.yml:md5,bfc234edc6fd6d67600cac71c66ecd10", + "versions.yml:md5,1d2a9b13790c70a69a1f62facc9b3a6c", + "versions.yml:md5,23b060bcc18a02fc8f981102ef3a3006", + "versions.yml:md5,31df076e5d21d61db772cb39643350e2", + "versions.yml:md5,b702df83d9ece54caa0e765a6286cdd2", + "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", + "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", + "versions.yml:md5,cdce7da7ce14e29fbd9fd72e88505ffa", + "versions.yml:md5,d00b52835d019d68e58aafd218429a75", "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", - "versions.yml:md5,fecf2763ae04725fa0ca7c995018dcea" + "versions.yml:md5,f567cdcfb384cc7a2d9ff4dc850f3bad", + "versions.yml:md5,fe9b8b3a8dc895efcf8f7c0b3248ff2d" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-21T14:28:06.35129428" + "timestamp": "2025-12-02T13:10:35.894317" } } \ No newline at end of file From 3677efd7c51980ec654751bf2614797bfa88dc77 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:37:54 +0100 Subject: [PATCH 066/202] drop githubworkflow since we have no bot --- .../workflows/template-version-comment.yml | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/template-version-comment.yml diff --git a/.github/workflows/template-version-comment.yml b/.github/workflows/template-version-comment.yml deleted file mode 100644 index c5988af9..00000000 --- a/.github/workflows/template-version-comment.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: nf-core template version comment -# This workflow is triggered on PRs to check if the pipeline template version matches the latest nf-core version. -# It posts a comment to the PR, even if it comes from a fork. - -on: pull_request_target - -jobs: - template_version: - runs-on: ubuntu-latest - steps: - - name: Check out pipeline code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Read template version from .nf-core.yml - uses: nichmor/minimal-read-yaml@1f7205277e25e156e1f63815781db80a6d490b8f # v0.0.2 - id: read_yml - with: - config: ${{ github.workspace }}/.nf-core.yml - - - name: Install nf-core - run: | - python -m pip install --upgrade pip - pip install nf-core==${{ steps.read_yml.outputs['nf_core_version'] }} - - - name: Check nf-core outdated - id: nf_core_outdated - run: echo "OUTPUT=$(pip list --outdated | grep nf-core)" >> ${GITHUB_ENV} - - - name: Post nf-core template version comment - uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 - if: | - contains(env.OUTPUT, 'nf-core') - with: - repo-token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} - allow-repeats: false - message: | - > [!WARNING] - > Newer version of the nf-core template is available. - > - > Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}. - > Please update your pipeline to the latest version. - > - > For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync). - # From ad890074a3848ce35087616fc0a20e2047b38c4b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:47:25 +0100 Subject: [PATCH 067/202] fix test --- .../local/fastq_to_aligned_cram/main.nf | 5 ++--- .../fastq_to_aligned_cram/main.nf.test.snap | 22 +++++++++---------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index 76ea8b63..c00f4d75 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -110,10 +110,9 @@ workflow FASTQ_TO_CRAM { } else if (markdup == "false" || markdup == false) { // Merge bam files and compress - // SAMTOOLS_SORT([meta, [bam, bam], fasta]) - SAMTOOLS_SORT(ch_bam_fasta) + // SAMTOOLS_SORT([meta, [bam, bam], fasta],index_format) + SAMTOOLS_SORT(ch_bam_fasta, "crai") ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORT.out.cram.join(SAMTOOLS_SORT.out.crai, failOnMismatch: true, failOnDuplicate: true)) - ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions.first()) } else { error("markdup: ${markdup} not supported") diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index 50296e7d..d1459def 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -28,17 +28,16 @@ ], "versions": [ - "versions.yml:md5,a7ccfeb53d42f57673ea59012c30e897", - "versions.yml:md5,d92f130d879deee51a23917c6e272233", - "versions.yml:md5,d92f130d879deee51a23917c6e272233" + "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", + "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:30:29.475396941" + "timestamp": "2025-12-02T13:40:29.319628" }, "fastq to cram - bwa - bamsormadup": { "content": [ @@ -237,16 +236,15 @@ ], "versions": [ - "versions.yml:md5,a7ccfeb53d42f57673ea59012c30e897", - "versions.yml:md5,d92f130d879deee51a23917c6e272233", - "versions.yml:md5,d92f130d879deee51a23917c6e272233" + "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", + "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:29:30.443653387" + "timestamp": "2025-12-02T13:40:06.599667" } } \ No newline at end of file From f4490fc292ac4c2059193b4383b3eb52a967e3f9 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 19:42:20 +0100 Subject: [PATCH 068/202] try to fix bclconvert on GCP --- conf/profiles/s3_ugent.config | 1 + main.nf | 8 +++---- modules.json | 3 ++- modules/nf-core/bclconvert/bclconvert.diff | 25 ++++++++++++++++++++++ modules/nf-core/bclconvert/main.nf | 4 ++-- 5 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 modules/nf-core/bclconvert/bclconvert.diff diff --git a/conf/profiles/s3_ugent.config b/conf/profiles/s3_ugent.config index d29f80a0..7e2fe67a 100644 --- a/conf/profiles/s3_ugent.config +++ b/conf/profiles/s3_ugent.config @@ -1,4 +1,5 @@ aws { + profile = "ugent" client { endpoint = "https://s3.ugent.be" protocol = "https" diff --git a/main.nf b/main.nf index ee3fa058..640ad840 100644 --- a/main.nf +++ b/main.nf @@ -66,8 +66,8 @@ workflow { publish: demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by:1) - demultiplex_reports = PREPROCESSING.out.demultiplex_reports.map { meta, reports -> [ meta, files("${reports.toUri()}/*") ] }.transpose(by:1) - demultiplex_logs = PREPROCESSING.out.demultiplex_logs.map { meta, logs -> [ meta, files("${logs.toUri()}/*") ] }.transpose(by:1) + demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by:1) + demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by:1) fastp_json = PREPROCESSING.out.fastp_json fastp_html = PREPROCESSING.out.fastp_html ucrams = PREPROCESSING.out.ucrams @@ -107,11 +107,11 @@ output { bin >> "Interop/${bin.name}" } } demultiplex_reports { path { meta, report -> - def out_path = meta.lane ? "Reports/LOO${meta.lane}/${report.name}" as String : "Reports/${report.name}" + def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" report >> out_path } } demultiplex_logs { path { meta, log -> - def out_path = meta.lane ? "Logs/LOO${meta.lane}/${log.name}" as String : "Logs/${log.name}" + def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" log >> out_path } } fastp_json { path { meta, json -> diff --git a/modules.json b/modules.json index f5872c3f..f1b67967 100644 --- a/modules.json +++ b/modules.json @@ -13,7 +13,8 @@ "bclconvert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["bcl_demultiplex", "modules"] + "installed_by": ["bcl_demultiplex", "modules"], + "patch": "modules/nf-core/bclconvert/bclconvert.diff" }, "biobambam/bamsormadup": { "branch": "master", diff --git a/modules/nf-core/bclconvert/bclconvert.diff b/modules/nf-core/bclconvert/bclconvert.diff new file mode 100644 index 00000000..dc0dee2d --- /dev/null +++ b/modules/nf-core/bclconvert/bclconvert.diff @@ -0,0 +1,25 @@ +Changes in component 'nf-core/bclconvert' +'modules/nf-core/bclconvert/LICENSE' is unchanged +'modules/nf-core/bclconvert/Dockerfile' is unchanged +'modules/nf-core/bclconvert/README.md' is unchanged +'modules/nf-core/bclconvert/.gitignore' is unchanged +'modules/nf-core/bclconvert/meta.yml' is unchanged +Changes in 'bclconvert/main.nf': +--- modules/nf-core/bclconvert/main.nf ++++ modules/nf-core/bclconvert/main.nf +@@ -12,8 +12,8 @@ + tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , emit: fastq_idx , optional:true + tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined , optional:true + tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional:true +- tuple val(meta), path("output/Reports") , emit: reports +- tuple val(meta), path("output/Logs") , emit: logs ++ tuple val(meta), path("output/Reports/*") , emit: reports ++ tuple val(meta), path("output/Logs/*") , emit: logs + tuple val(meta), path("output/InterOp/*.bin") , emit: interop , optional:true + path("versions.yml") , emit: versions + + +'modules/nf-core/bclconvert/tests/main.nf.test.snap' is unchanged +'modules/nf-core/bclconvert/tests/nextflow.config' is unchanged +'modules/nf-core/bclconvert/tests/main.nf.test' is unchanged +************************************************************ diff --git a/modules/nf-core/bclconvert/main.nf b/modules/nf-core/bclconvert/main.nf index 82ad6b19..b61f2240 100644 --- a/modules/nf-core/bclconvert/main.nf +++ b/modules/nf-core/bclconvert/main.nf @@ -12,8 +12,8 @@ process BCLCONVERT { tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , emit: fastq_idx , optional:true tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined , optional:true tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional:true - tuple val(meta), path("output/Reports") , emit: reports - tuple val(meta), path("output/Logs") , emit: logs + tuple val(meta), path("output/Reports/*") , emit: reports + tuple val(meta), path("output/Logs/*") , emit: logs tuple val(meta), path("output/InterOp/*.bin") , emit: interop , optional:true path("versions.yml") , emit: versions From e192be17db11606ac9bff3dcd067fc34b764c6a6 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:34:38 +0100 Subject: [PATCH 069/202] update bcl-convert config for gcp --- conf/modules.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 56bf31d1..85c1c3c0 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -14,13 +14,13 @@ process { // BCL convert withName: BCLCONVERT { + cpus = 32 + memory = 64.GB ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", "--force", - "--bcl-num-parallel-tiles ${task.cpus}", - "--bcl-num-conversion-threads ${task.cpus}", - "--bcl-num-compression-threads ${task.cpus}", + "--strict", ].join(" ").trim() } } From 2c24f7bb8b83ffc59347e7d6270a14f0fdae28c8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 09:48:05 +0100 Subject: [PATCH 070/202] add dynamic disk allocation --- conf/modules.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/modules.config b/conf/modules.config index 85c1c3c0..05b20842 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -16,6 +16,7 @@ process { withName: BCLCONVERT { cpus = 32 memory = 64.GB + disk = { 500.GB * task.attempt } ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", From 2fcc5e77bada5848bb9f5f6c3fe977a7ad451177 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:17:19 +0100 Subject: [PATCH 071/202] increase mem --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 05b20842..da061387 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -15,7 +15,7 @@ process { // BCL convert withName: BCLCONVERT { cpus = 32 - memory = 64.GB + memory = 128.GB disk = { 500.GB * task.attempt } ext.args = { [ From de0daecc01bd13bc6115716cabd975400dfeb089 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 10:20:12 +0100 Subject: [PATCH 072/202] fix linting --- .nf-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nf-core.yml b/.nf-core.yml index 09005197..2b4bcc77 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -27,7 +27,7 @@ lint: template_strings: - bin/cmgg_genelists nf_test_content: false -nf_core_version: 3.4.1 +nf_core_version: 3.5.1 repository_type: pipeline template: author: Matthias De Smet, Nicolas Vannieuwkerke From 1231634495929e22dbe3cf78f656ffde7cfdb0c3 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 19:56:58 +0100 Subject: [PATCH 073/202] fix module config --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index da061387..1cedbcfa 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -21,7 +21,7 @@ process { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", "--force", - "--strict", + "--strict-mode true", ].join(" ").trim() } } From f3495f6393b324933f1a61a2f9c34a669200a600 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 20:19:17 +0100 Subject: [PATCH 074/202] update contributors --- nextflow.config | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/nextflow.config b/nextflow.config index 01378b19..d72f24cf 100644 --- a/nextflow.config +++ b/nextflow.config @@ -257,22 +257,21 @@ dag { manifest { name = 'nf-cmgg/preprocessing' contributors = [ - // TODO nf-core: Update the field with the details of the contributors to your pipeline. New with Nextflow version 24.10.0 [ name: 'Matthias De Smet', - affiliation: '', - email: '', - github: '', - contribution: [], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '' + affiliation: 'Center for Medical Genetics Ghent, Ghent University, Belgium', + email: 'matthias.desmet@ugent.be', + github: '@matthdsm', + contribution: ["author","maintainer"], // List of contribution types ('author', 'maintainer' or 'contributor') + orcid: 'https://orcid.org/0000-0003-2555-3114' ], [ name: ' Nicolas Vannieuwkerke', - affiliation: '', - email: '', - github: '', - contribution: [], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: '' + affiliation: 'Center for Medical Genetics Ghent, Ghent University Hospital, Belgium', + email: 'nicolas.vannieuwkerke@ugent.be', + github: '@nvnieuwk', + contribution: ["maintainer"], // List of contribution types ('author', 'maintainer' or 'contributor') + orcid: 'https://orcid.org/0009-0003-5619-1555' ], ] homePage = 'https://github.com/nf-cmgg/preprocessing' From 3713ccfe2efc6d620e51ffa9ed1091938c8e8db5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 2 Dec 2025 20:19:55 +0100 Subject: [PATCH 075/202] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf9c031..e929fc1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 2.1.0dev - Update the output handling to use the new workflow output definitions. +- Bump all modules to latest versions. ## v2.0.6 From 02697a6fddb0893961e646a9100fd75e36a22c63 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 3 Dec 2025 08:51:27 +0100 Subject: [PATCH 076/202] increase disk, set stageOutMode --- conf/modules.config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 1cedbcfa..f5416df9 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -16,7 +16,9 @@ process { withName: BCLCONVERT { cpus = 32 memory = 128.GB - disk = { 500.GB * task.attempt } + disk = { 1.TB * task.attempt } + stageOutMode = 'copy' + ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", From 753f55b61b1c644492301493b8ab20d683725809 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 3 Dec 2025 09:07:04 +0100 Subject: [PATCH 077/202] add strobealign config --- conf/modules.config | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/conf/modules.config b/conf/modules.config index f5416df9..0678b28b 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -130,6 +130,18 @@ process { } } + //// STROBEALIGN + withName: STROBEALIGN { + ext.args = { + [ + meta.readgroup ? "--rg-id ${meta.readgroup.ID}" : "", + meta.readgroup ? "--rg " + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join(" --rg ") : "", + "-C", + ].join(" ").trim() + } + } + + //// STAR withName: STAR_ALIGN { ext.args = { [ From fe0791ad046cc42e6ede61f06eea4b0fa6d55ec8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:21:57 +0100 Subject: [PATCH 078/202] add 50001 (spot pre-empted) to retry codes --- conf/base.config | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/conf/base.config b/conf/base.config index 4f3a0d41..67db29f3 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,22 +10,15 @@ process { - // TODO nf-core: Check the defaults for all processes cpus = { 1 * task.attempt } memory = { 6.GB * task.attempt } time = { 4.h * task.attempt } - errorStrategy = { task.exitStatus in ((130..145) + 104 + 175) ? 'retry' : 'finish' } - maxRetries = 1 + errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001) ? 'retry' : 'finish' } + maxRetries = 3 maxErrors = '-1' // Process-specific resource requirements - // NOTE - Please try and reuse the labels below as much as possible. - // These labels are used and recognised by default in DSL2 files hosted on nf-core/modules. - // If possible, it would be nice to keep the same label naming convention when - // adding in your local modules too. - // TODO nf-core: Customise requirements for specific processes. - // See https://www.nextflow.io/docs/latest/config.html#config-process-selectors withLabel:process_single { cpus = { 1 } memory = { 6.GB * task.attempt } From 6227b4bc56ddb76e4f7e653bcb2b33c83d3c2486 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 09:07:53 +0100 Subject: [PATCH 079/202] output files in library subdir where possible --- main.nf | 58 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/main.nf b/main.nf index 640ad840..913e2305 100644 --- a/main.nf +++ b/main.nf @@ -115,46 +115,46 @@ output { log >> out_path } } fastp_json { path { meta, json -> - json >> "${meta.samplename}/${json.name}" + json >> meta.library ? "${meta.library}/${meta.samplename}/${json.name}" : "${meta.samplename}/${json.name}" } } fastp_html { path { meta, html -> - html >> "${meta.samplename}/${html.name}" + html >> meta.library ? "${meta.library}/${meta.samplename}/${html.name}" : "${meta.samplename}/${html.name}" } } ucrams { path { meta, cram -> - cram >> "${meta.samplename}/${meta.samplename}.unaligned.cram" + cram >> meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.unaligned.cram" : "${meta.samplename}/${meta.samplename}.unaligned.cram" } } crams { path { meta, cram, crai -> - cram >> "${meta.samplename}/${meta.samplename}.cram" - crai >> "${meta.samplename}/${meta.samplename}.cram.crai" + cram >> meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" : "${meta.samplename}/${meta.samplename}.cram" + crai >> meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" : "${meta.samplename}/${meta.samplename}.cram.crai" } } align_reports { path { meta, log -> - log >> "${meta.samplename}/${log.name}" + log >> meta.library ? "${meta.library}/${meta.samplename}/${log.name}" : "${meta.samplename}/${log.name}" } } sormadup_metrics { path { meta, metrics -> - metrics >> "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" + metrics >> meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" } } - mosdepth_global { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_summary { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_regions { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_per_base_d4 { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_per_base_bed { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_per_base_csi { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_regions_bed { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_regions_csi { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_quantized_bed { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_quantized_csi { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_thresholds_bed { path { meta, _file -> "${meta.samplename}/" } } - mosdepth_thresholds_csi { path { meta, _file -> "${meta.samplename}/" } } - samtools_coverage { path { meta, _file -> "${meta.samplename}/" } } - panelcoverage { path { meta, _file -> "${meta.samplename}/" } } - samtools_stats { path { meta, _file -> "${meta.samplename}/" } } - samtools_flagstat { path { meta, _file -> "${meta.samplename}/" } } - samtools_idxstats { path { meta, _file -> "${meta.samplename}/" } } - picard_multiplemetrics { path { meta, _file -> "${meta.samplename}/" } } - picard_multiplemetrics_pdf { path { meta, _file -> "${meta.samplename}/" } } - picard_wgsmetrics { path { meta, _file -> "${meta.samplename}/" } } - picard_hsmetrics { path { meta, _file -> "${meta.samplename}/" } } - md5sums { path { meta, _file -> "${meta.samplename}/" } } + mosdepth_global { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_summary { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_regions { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_per_base_d4 { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_per_base_bed { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_per_base_csi { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_regions_bed { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_regions_csi { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_quantized_bed { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_quantized_csi { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_thresholds_bed { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + mosdepth_thresholds_csi { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + samtools_coverage { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + panelcoverage { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + samtools_stats { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + samtools_flagstat { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + samtools_idxstats { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + picard_multiplemetrics { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + picard_multiplemetrics_pdf { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + picard_wgsmetrics { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + picard_hsmetrics { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + md5sums { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } multiqc_report { path "multiqc/" } multiqc_data { path "multiqc/" } multiqc_plots { path "multiqc/" } From 58a6bed14647c542867f81cbedf050b2cfc53218 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 09:37:59 +0100 Subject: [PATCH 080/202] fix output definition, retain library in meta --- main.nf | 133 ++++++++++++++++++++++++++++--------- nextflow.config | 1 - workflows/preprocessing.nf | 2 +- 3 files changed, 104 insertions(+), 32 deletions(-) diff --git a/main.nf b/main.nf index 913e2305..70f05632 100644 --- a/main.nf +++ b/main.nf @@ -115,46 +115,119 @@ output { log >> out_path } } fastp_json { path { meta, json -> - json >> meta.library ? "${meta.library}/${meta.samplename}/${json.name}" : "${meta.samplename}/${json.name}" + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" + json >> out_path } } fastp_html { path { meta, html -> - html >> meta.library ? "${meta.library}/${meta.samplename}/${html.name}" : "${meta.samplename}/${html.name}" + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path } } ucrams { path { meta, cram -> - cram >> meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.unaligned.cram" : "${meta.samplename}/${meta.samplename}.unaligned.cram" + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.unaligned.cram" as String : "${meta.samplename}/${meta.samplename}.unaligned.cram" + cram >> out_path } } crams { path { meta, cram, crai -> - cram >> meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" : "${meta.samplename}/${meta.samplename}.cram" - crai >> meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" : "${meta.samplename}/${meta.samplename}.cram.crai" + def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" + def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" + cram >> out_cram + crai >> out_crai } } align_reports { path { meta, log -> - log >> meta.library ? "${meta.library}/${meta.samplename}/${log.name}" : "${meta.samplename}/${log.name}" + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" + log >> out_path } } sormadup_metrics { path { meta, metrics -> - metrics >> meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" - } } - mosdepth_global { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_summary { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_regions { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_per_base_d4 { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_per_base_bed { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_per_base_csi { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_regions_bed { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_regions_csi { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_quantized_bed { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_quantized_csi { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_thresholds_bed { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - mosdepth_thresholds_csi { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - samtools_coverage { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - panelcoverage { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - samtools_stats { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - samtools_flagstat { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - samtools_idxstats { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - picard_multiplemetrics { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - picard_multiplemetrics_pdf { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - picard_wgsmetrics { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - picard_hsmetrics { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } - md5sums { path { meta, _file -> meta.library ? "${meta.library}/${meta.samplename}/" : "${meta.samplename}/" } } + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" + metrics >> out_path + } } + mosdepth_global { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_summary { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_regions { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_per_base_d4 { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_per_base_bed { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_per_base_csi { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_regions_bed { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_regions_csi { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_quantized_bed { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_quantized_csi { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_thresholds_bed { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_thresholds_csi { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + samtools_coverage { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + panelcoverage { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + samtools_stats { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + samtools_flagstat { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + samtools_idxstats { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + picard_multiplemetrics { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + picard_multiplemetrics_pdf { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + picard_wgsmetrics { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + picard_hsmetrics { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + md5sums { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } multiqc_report { path "multiqc/" } multiqc_data { path "multiqc/" } multiqc_plots { path "multiqc/" } diff --git a/nextflow.config b/nextflow.config index d72f24cf..b41984a0 100644 --- a/nextflow.config +++ b/nextflow.config @@ -9,7 +9,6 @@ // Global default params, used in configs params { - // TODO nf-core: Specify your pipeline's command line flags // Input options input = null diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index f90dd2eb..486c49ef 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -189,7 +189,7 @@ workflow PREPROCESSING { .transpose() .map { meta_fastq, count -> [meta_fastq[0] + ['count': count], meta_fastq[1]] } .map { meta, fastq -> - return [meta - meta.subMap('fcid', 'lane', 'library'), fastq] + return [meta - meta.subMap('fcid', 'lane'), fastq] } .set { ch_fastq_per_sample } From 8728f8c9b15f861afd5146774fc368f19b7a39ca Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 09:45:30 +0100 Subject: [PATCH 081/202] fix outdir issue --- nextflow.config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nextflow.config b/nextflow.config index b41984a0..91cb7cf6 100644 --- a/nextflow.config +++ b/nextflow.config @@ -294,3 +294,8 @@ validation { // Load modules.config for DSL2 module specific options includeConfig 'conf/modules.config' + +// Set default output dir and publish mode +// Temporary fix until the nf-core template supports workflow output definitions +workflow.output.mode = params.publish_dir_mode +outputDir = params.outdir From d95df0f09239e86e5be6b48d7c77350cc755f885 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:57:31 +0100 Subject: [PATCH 082/202] add per-library multiqc --- conf/modules.config | 8 +- main.nf | 21 +-- modules.json | 3 +- modules/nf-core/multiqc/main.nf | 3 +- modules/nf-core/multiqc/multiqc.diff | 27 ++++ workflows/preprocessing.nf | 187 +++++++++++++-------------- 6 files changed, 144 insertions(+), 105 deletions(-) create mode 100644 modules/nf-core/multiqc/multiqc.diff diff --git a/conf/modules.config b/conf/modules.config index 0678b28b..e1603297 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -247,9 +247,15 @@ process { // MultiQC - withName: MULTIQC { + withName: MULTIQC_MAIN { + ext.prefix = { params.multiqc_title ? params.multiqc_title : "multiqc" } ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' } } + + withName: MULTIQC_LIBRARY { + ext.prefix = { meta.id ? "multiqc_library_${meta.id}" : "multiqc_library" } + ext.args = { meta.id ? "--title \"${meta.id} - Pool Summary\"" : '' } + } } env { diff --git a/main.nf b/main.nf index 70f05632..87371efa 100644 --- a/main.nf +++ b/main.nf @@ -61,7 +61,7 @@ workflow { params.outdir, params.monochrome_logs, params.hook_url, - PREPROCESSING.out.multiqc_report, + PREPROCESSING.out.multiqc_main_report, ) publish: @@ -96,10 +96,12 @@ workflow { picard_wgsmetrics = PREPROCESSING.out.picard_wgsmetrics picard_hsmetrics = PREPROCESSING.out.picard_hsmetrics md5sums = PREPROCESSING.out.md5sums - multiqc_report = PREPROCESSING.out.multiqc_report - multiqc_data = PREPROCESSING.out.multiqc_data - multiqc_plots = PREPROCESSING.out.multiqc_plots - + multiqc_main_report = PREPROCESSING.out.multiqc_main_report + multiqc_main_data = PREPROCESSING.out.multiqc_main_data + multiqc_main_plots = PREPROCESSING.out.multiqc_main_plots + multiqc_library_report = PREPROCESSING.out.multiqc_library_report + multiqc_library_data = PREPROCESSING.out.multiqc_library_data + multiqc_library_plots = PREPROCESSING.out.multiqc_library_plots } output { @@ -228,7 +230,10 @@ output { def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" return out_path } } - multiqc_report { path "multiqc/" } - multiqc_data { path "multiqc/" } - multiqc_plots { path "multiqc/" } + multiqc_main_report { path "multiqc/" } + multiqc_main_data { path "multiqc/" } + multiqc_main_plots { path "multiqc/" } + multiqc_library_report { path "multiqc/" } + multiqc_library_data { path "multiqc/" } + multiqc_library_plots { path "multiqc/" } } diff --git a/modules.json b/modules.json index f1b67967..cbebbe1e 100644 --- a/modules.json +++ b/modules.json @@ -65,7 +65,8 @@ "multiqc": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/multiqc/multiqc.diff" }, "picard/collecthsmetrics": { "branch": "master", diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 335afccc..2a9feaa3 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -1,4 +1,5 @@ process MULTIQC { + tag "$meta.id" label 'process_single' conda "${moduleDir}/environment.yml" @@ -7,7 +8,7 @@ process MULTIQC { 'community.wave.seqera.io/library/multiqc:1.32--d58f60e4deb769bf' }" input: - path multiqc_files, stageAs: "?/*" + tuple val(meta), path(multiqc_files, stageAs: "?/*") path(multiqc_config) path(extra_multiqc_config) path(multiqc_logo) diff --git a/modules/nf-core/multiqc/multiqc.diff b/modules/nf-core/multiqc/multiqc.diff new file mode 100644 index 00000000..947ff7e3 --- /dev/null +++ b/modules/nf-core/multiqc/multiqc.diff @@ -0,0 +1,27 @@ +Changes in component 'nf-core/multiqc' +'modules/nf-core/multiqc/environment.yml' is unchanged +'modules/nf-core/multiqc/meta.yml' is unchanged +Changes in 'multiqc/main.nf': +--- modules/nf-core/multiqc/main.nf ++++ modules/nf-core/multiqc/main.nf +@@ -1,4 +1,5 @@ + process MULTIQC { ++ tag "$meta.id" + label 'process_single' + + conda "${moduleDir}/environment.yml" +@@ -7,7 +8,7 @@ + 'community.wave.seqera.io/library/multiqc:1.32--d58f60e4deb769bf' }" + + input: +- path multiqc_files, stageAs: "?/*" ++ tuple val(meta), path(multiqc_files, stageAs: "?/*") + path(multiqc_config) + path(extra_multiqc_config) + path(multiqc_logo) + +'modules/nf-core/multiqc/tests/main.nf.test.snap' is unchanged +'modules/nf-core/multiqc/tests/nextflow.config' is unchanged +'modules/nf-core/multiqc/tests/main.nf.test' is unchanged +'modules/nf-core/multiqc/tests/custom_prefix.config' is unchanged +************************************************************ diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 486c49ef..ccdbea4d 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -7,25 +7,26 @@ include { samplesheetToList } from 'plugin/nf-schema' */ // Modules -include { FASTP } from '../modules/nf-core/fastp/main' -include { MD5SUM } from '../modules/nf-core/md5sum/main' -include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' -include { MULTIQC } from '../modules/nf-core/multiqc/main' -include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' +include { FASTP } from '../modules/nf-core/fastp/main' +include { MD5SUM } from '../modules/nf-core/md5sum/main' +include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' +include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' +include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' +include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' // Subworkflows -include { BAM_QC } from '../subworkflows/local/bam_qc/main' -include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' -include { COVERAGE } from '../subworkflows/local/coverage/main' -include { FASTQ_TO_UCRAM } from '../subworkflows/local/fastq_to_unaligned_cram/main' -include { FASTQ_TO_CRAM } from '../subworkflows/local/fastq_to_aligned_cram/main' +include { BAM_QC } from '../subworkflows/local/bam_qc/main' +include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' +include { COVERAGE } from '../subworkflows/local/coverage/main' +include { FASTQ_TO_UCRAM } from '../subworkflows/local/fastq_to_unaligned_cram/main' +include { FASTQ_TO_CRAM } from '../subworkflows/local/fastq_to_aligned_cram/main' // Functions -include { paramsSummaryMap } from 'plugin/nf-schema' -include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' -include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' -include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' -include { getGenomeAttribute } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' +include { getGenomeAttribute } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -78,12 +79,8 @@ workflow PREPROCESSING { BCL_DEMULTIPLEX(ch_illumina_flowcell.flowcell, "bclconvert") BCL_DEMULTIPLEX.out.fastq.dump(tag: "DEMULTIPLEX: fastq", pretty: true) ch_multiqc_files = ch_multiqc_files.mix( - BCL_DEMULTIPLEX.out.reports.map { _meta, reports -> - return reports - }, - BCL_DEMULTIPLEX.out.stats.map { _meta, stats -> - return stats - }, + BCL_DEMULTIPLEX.out.reports, + BCL_DEMULTIPLEX.out.stats ) ch_versions = ch_versions.mix(BCL_DEMULTIPLEX.out.versions) @@ -206,11 +203,7 @@ workflow PREPROCESSING { // Run QC, trimming and adapter removal // FASTP([meta, fastq], adapter_fasta, save_trimmed, save_merged) FASTP(ch_fastq_per_sample.map{ meta, fastq -> return [meta, fastq, []] }, false, false, false) - ch_multiqc_files = ch_multiqc_files.mix( - FASTP.out.json.map { _meta, json -> - return json - } - ) + ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) ch_versions = ch_versions.mix(FASTP.out.versions.first()) // edit meta.id to match sample name @@ -274,7 +267,7 @@ workflow PREPROCESSING { markdup, ) - ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.sormadup_metrics.map { _meta, metrics -> metrics }) + ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.sormadup_metrics) ch_versions = ch_versions.mix(FASTQ_TO_CRAM.out.versions) @@ -339,18 +332,10 @@ workflow PREPROCESSING { if (params.run_coverage) { COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) ch_multiqc_files = ch_multiqc_files.mix( - COVERAGE.out.mosdepth_summary.map { _meta, txt -> - return txt - }, - COVERAGE.out.mosdepth_global.map { _meta, txt -> - return txt - }, - COVERAGE.out.mosdepth_regions.map { _meta, txt -> - return txt - }, - COVERAGE.out.samtools_coverage.map { _meta, txt -> - return txt - }, + COVERAGE.out.mosdepth_summary, + COVERAGE.out.mosdepth_global, + COVERAGE.out.mosdepth_regions, + COVERAGE.out.samtools_coverage, ) mosdepth_global_out = COVERAGE.out.mosdepth_global mosdepth_summary_out = COVERAGE.out.mosdepth_summary @@ -403,24 +388,13 @@ workflow PREPROCESSING { BAM_QC(ch_cram_crai_roi_fasta_fai_dict, params.disable_picard_metrics) ch_multiqc_files = ch_multiqc_files.mix( - BAM_QC.out.samtools_stats.map { _meta, txt -> - return txt - }, - BAM_QC.out.samtools_flagstat.map { _meta, txt -> - return txt - }, - BAM_QC.out.samtools_idxstats.map { _meta, txt -> - return txt - }, - BAM_QC.out.picard_multiplemetrics.map { _meta, txt -> - return txt - }, - BAM_QC.out.picard_wgsmetrics.map { _meta, txt -> - return txt - }, - BAM_QC.out.picard_hsmetrics.map { _meta, txt -> - return txt - }, + BAM_QC.out.samtools_stats, + BAM_QC.out.samtools_flagstat, + BAM_QC.out.samtools_idxstats, + BAM_QC.out.picard_multiplemetrics, + BAM_QC.out.picard_wgsmetrics, + BAM_QC.out.picard_wgsmetrics, + BAM_QC.out.picard_hsmetrics, ) ch_versions = ch_versions.mix(BAM_QC.out.versions) @@ -486,11 +460,24 @@ workflow PREPROCESSING { ch_workflow_summary = channel.value(paramsSummaryMultiqc(summary_params)) ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) - ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + + ch_multiqc_library_files = ch_multiqc_files + .filter { meta, _file -> + meta.library != null && meta.library != "" + } + .map { meta, file -> + return [["id": meta.library] ?: meta.samplename, file] + } + .groupTuple() + ch_multiqc_library_files.dump(tag: "MULTIQC files per library", pretty: true) + + ch_multiqc_files = ch_multiqc_files.map{ _meta, files -> files }.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) + ch_multiqc_files = ch_multiqc_files.map { file -> [["id": "main"], file] }.groupTuple() + ch_multiqc_files.dump(tag: "MULTIQC files", pretty: true) - MULTIQC( + MULTIQC_MAIN( ch_multiqc_files.collect(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), @@ -499,42 +486,54 @@ workflow PREPROCESSING { [], ) + MULTIQC_LIBRARY( + ch_multiqc_library_files, + ch_multiqc_config.toList(), + ch_multiqc_custom_config.toList(), + ch_multiqc_logo.toList(), + [], + [], + ) + emit: - demultiplex_interop = BCL_DEMULTIPLEX.out.interop - demultiplex_reports = BCL_DEMULTIPLEX.out.reports - demultiplex_logs = BCL_DEMULTIPLEX.out.logs - fastp_json = FASTP.out.json - fastp_html = FASTP.out.html - ucrams = FASTQ_TO_UCRAM.out.cram - crams = FASTQ_TO_CRAM.out.cram_crai - align_reports = FASTQ_TO_CRAM.out.align_reports - sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics - mosdepth_global = mosdepth_global_out - mosdepth_summary = mosdepth_summary_out - mosdepth_regions = mosdepth_regions_out - mosdepth_per_base_d4 = mosdepth_per_base_d4_out - mosdepth_per_base_bed = mosdepth_per_base_bed_out - mosdepth_per_base_csi = mosdepth_per_base_csi_out - mosdepth_regions_bed = mosdepth_regions_bed_out - mosdepth_regions_csi = mosdepth_regions_csi_out - mosdepth_quantized_bed = mosdepth_quantized_bed_out - mosdepth_quantized_csi = mosdepth_quantized_csi_out - mosdepth_thresholds_bed = mosdepth_thresholds_bed_out - mosdepth_thresholds_csi = mosdepth_thresholds_csi_out - samtools_coverage = samtools_coverage_out - panelcoverage = panelcoverage_out - samtools_stats = BAM_QC.out.samtools_stats - samtools_flagstat = BAM_QC.out.samtools_flagstat - samtools_idxstats = BAM_QC.out.samtools_idxstats - picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics - picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf - picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics - picard_hsmetrics = BAM_QC.out.picard_hsmetrics - md5sums = MD5SUM.out.checksum - multiqc_report = MULTIQC.out.report.toList() // channel: /path/to/multiqc_report.html - multiqc_data = MULTIQC.out.data - multiqc_plots = MULTIQC.out.plots - versions = ch_versions // channel: [ path(versions.yml) ] + demultiplex_interop = BCL_DEMULTIPLEX.out.interop + demultiplex_reports = BCL_DEMULTIPLEX.out.reports + demultiplex_logs = BCL_DEMULTIPLEX.out.logs + fastp_json = FASTP.out.json + fastp_html = FASTP.out.html + ucrams = FASTQ_TO_UCRAM.out.cram + crams = FASTQ_TO_CRAM.out.cram_crai + align_reports = FASTQ_TO_CRAM.out.align_reports + sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics + mosdepth_global = mosdepth_global_out + mosdepth_summary = mosdepth_summary_out + mosdepth_regions = mosdepth_regions_out + mosdepth_per_base_d4 = mosdepth_per_base_d4_out + mosdepth_per_base_bed = mosdepth_per_base_bed_out + mosdepth_per_base_csi = mosdepth_per_base_csi_out + mosdepth_regions_bed = mosdepth_regions_bed_out + mosdepth_regions_csi = mosdepth_regions_csi_out + mosdepth_quantized_bed = mosdepth_quantized_bed_out + mosdepth_quantized_csi = mosdepth_quantized_csi_out + mosdepth_thresholds_bed = mosdepth_thresholds_bed_out + mosdepth_thresholds_csi = mosdepth_thresholds_csi_out + samtools_coverage = samtools_coverage_out + panelcoverage = panelcoverage_out + samtools_stats = BAM_QC.out.samtools_stats + samtools_flagstat = BAM_QC.out.samtools_flagstat + samtools_idxstats = BAM_QC.out.samtools_idxstats + picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics + picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf + picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics + picard_hsmetrics = BAM_QC.out.picard_hsmetrics + md5sums = MD5SUM.out.checksum + multiqc_main_report = MULTIQC_MAIN.out.report.toList() + multiqc_main_data = MULTIQC_MAIN.out.data + multiqc_main_plots = MULTIQC_MAIN.out.plots + multiqc_library_report = MULTIQC_LIBRARY.out.report.toList() + multiqc_library_data = MULTIQC_LIBRARY.out.data + multiqc_library_plots = MULTIQC_LIBRARY.out.plots + versions = ch_versions } /* From 1fc03e9b108d5c727d84d7856fc5b7d6f78c99d1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 13:06:43 +0100 Subject: [PATCH 083/202] improve logic --- nextflow.config | 4 ++++ workflows/preprocessing.nf | 29 +++++++++++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/nextflow.config b/nextflow.config index 91cb7cf6..6e2cfcae 100644 --- a/nextflow.config +++ b/nextflow.config @@ -238,18 +238,22 @@ nextflow.enable.configProcessNamesValidation = false timeline { enabled = true + overwrite = true file = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html" } report { enabled = true + overwrite = true file = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html" } trace { enabled = true + overwrite = true file = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt" } dag { enabled = true + overwrite = true file = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html" } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index ccdbea4d..11615222 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -461,24 +461,25 @@ workflow PREPROCESSING { ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) - ch_multiqc_library_files = ch_multiqc_files - .filter { meta, _file -> - meta.library != null && meta.library != "" - } - .map { meta, file -> - return [["id": meta.library] ?: meta.samplename, file] + ch_multiqc_files = ch_multiqc_files.map { meta, files -> + return [meta.library ? [id: meta.library] : [id: 'main'], files] } .groupTuple() - ch_multiqc_library_files.dump(tag: "MULTIQC files per library", pretty: true) + .branch { meta, files -> + main: meta.id == 'main' + return files.flatten() + library: meta.id != 'main' + return [meta, files.flatten()] + } + ch_multiqc_files.main.dump(tag: "MULTIQC files - main", pretty: true) + ch_multiqc_files.library.dump(tag: "MULTIQC files - library", pretty: true) - ch_multiqc_files = ch_multiqc_files.map{ _meta, files -> files }.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) - ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) - ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) - ch_multiqc_files = ch_multiqc_files.map { file -> [["id": "main"], file] }.groupTuple() - ch_multiqc_files.dump(tag: "MULTIQC files", pretty: true) + ch_multiqc_files.main = ch_multiqc_files.main.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) + ch_multiqc_files.main = ch_multiqc_files.main.mix(ch_collated_versions) + ch_multiqc_files.main = ch_multiqc_files.main.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) MULTIQC_MAIN( - ch_multiqc_files.collect(), + ch_multiqc_files.main.collect().map{ files -> [[id: 'main'], files] }, ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), @@ -487,7 +488,7 @@ workflow PREPROCESSING { ) MULTIQC_LIBRARY( - ch_multiqc_library_files, + ch_multiqc_files.library, ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), From 9d6cd02d0f3730c5a65de118c078dfcc24bdd352 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 14:10:36 +0100 Subject: [PATCH 084/202] fix for MQC errors --- workflows/preprocessing.nf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 11615222..fc51cbf6 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -444,23 +444,27 @@ workflow PREPROCESSING { name: 'nf_cmgg_preprocessing_software_mqc_versions.yml', sort: true, newLine: true - ).set { ch_collated_versions } - - softwareVersionsToYAML(ch_versions) - .collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'preprocessing_software_mqc_versions.yml', sort: true, newLine: true) + ) + .map { file -> [[id: 'main'], file] } // add meta for multiqc .set { ch_collated_versions } // // MODULE: MultiQC // - ch_multiqc_config = channel.fromPath("${projectDir}/assets/multiqc_config.yml", checkIfExists: true) + ch_multiqc_config = channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true) ch_multiqc_custom_config = params.multiqc_config ? channel.fromPath(params.multiqc_config, checkIfExists: true) : channel.empty() - ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() - summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() + + summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") ch_workflow_summary = channel.value(paramsSummaryMultiqc(summary_params)) - ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) + ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml').map{ file -> [[id: 'main'], file] }) + + ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) + ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) + ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true).map{ file -> [[id: 'main'], file] }) + ch_multiqc_files = ch_multiqc_files.map { meta, files -> return [meta.library ? [id: meta.library] : [id: 'main'], files] } @@ -474,10 +478,6 @@ workflow PREPROCESSING { ch_multiqc_files.main.dump(tag: "MULTIQC files - main", pretty: true) ch_multiqc_files.library.dump(tag: "MULTIQC files - library", pretty: true) - ch_multiqc_files.main = ch_multiqc_files.main.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml')) - ch_multiqc_files.main = ch_multiqc_files.main.mix(ch_collated_versions) - ch_multiqc_files.main = ch_multiqc_files.main.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: false)) - MULTIQC_MAIN( ch_multiqc_files.main.collect().map{ files -> [[id: 'main'], files] }, ch_multiqc_config.toList(), From ff2b95e4bdbc1a13241151d5ebde5c472753bca5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 14:24:58 +0100 Subject: [PATCH 085/202] update test samplesheet --- tests/inputs/fastq.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/inputs/fastq.yml b/tests/inputs/fastq.yml index bfb9e2d0..20a5ec56 100644 --- a/tests/inputs/fastq.yml +++ b/tests/inputs/fastq.yml @@ -2,14 +2,14 @@ # fastq inputs - id: sample1_L001 samplename: fastq_paired1 - library: test + library: test_library organism: Homo sapiens tag: WES fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz - id: sample1_L002 samplename: fastq_paired1 - library: test + library: test_library organism: Homo sapiens tag: WES fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz From 768997a22a33a4adfe406a6dd7b173cd3dc67341 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 4 Dec 2025 17:30:24 +0100 Subject: [PATCH 086/202] fix topics mess --- modules/nf-core/multiqc/main.nf | 2 +- workflows/preprocessing.nf | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 2a9feaa3..1d691b15 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -19,7 +19,7 @@ process MULTIQC { path "*.html" , emit: report path "*_data" , emit: data path "*_plots" , optional:true, emit: plots - tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), topic: versions, emit: versions_multiqc + tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), emit: versions_multiqc when: task.ext.when == null || task.ext.when diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index fc51cbf6..c737d2b1 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -468,12 +468,11 @@ workflow PREPROCESSING { ch_multiqc_files = ch_multiqc_files.map { meta, files -> return [meta.library ? [id: meta.library] : [id: 'main'], files] } - .groupTuple() .branch { meta, files -> main: meta.id == 'main' - return files.flatten() + return files library: meta.id != 'main' - return [meta, files.flatten()] + return [meta, files instanceof List ? files : [files]] } ch_multiqc_files.main.dump(tag: "MULTIQC files - main", pretty: true) ch_multiqc_files.library.dump(tag: "MULTIQC files - library", pretty: true) @@ -488,7 +487,7 @@ workflow PREPROCESSING { ) MULTIQC_LIBRARY( - ch_multiqc_files.library, + ch_multiqc_files.library.transpose(by:1).groupTuple(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), @@ -529,9 +528,9 @@ workflow PREPROCESSING { picard_hsmetrics = BAM_QC.out.picard_hsmetrics md5sums = MD5SUM.out.checksum multiqc_main_report = MULTIQC_MAIN.out.report.toList() - multiqc_main_data = MULTIQC_MAIN.out.data - multiqc_main_plots = MULTIQC_MAIN.out.plots - multiqc_library_report = MULTIQC_LIBRARY.out.report.toList() + multiqc_main_data = MULTIQC_MAIN.out.data.toList() + multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() + multiqc_library_report = MULTIQC_LIBRARY.out.report multiqc_library_data = MULTIQC_LIBRARY.out.data multiqc_library_plots = MULTIQC_LIBRARY.out.plots versions = ch_versions From dd391dca6809817dd2a4c40e70900e23cbdad1e1 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 4 Dec 2025 17:31:15 +0100 Subject: [PATCH 087/202] patch multiqc --- modules.json | 130 ++++++++++++++++++++------- modules/nf-core/multiqc/multiqc.diff | 17 +++- 2 files changed, 111 insertions(+), 36 deletions(-) diff --git a/modules.json b/modules.json index cbebbe1e..de8e0ac9 100644 --- a/modules.json +++ b/modules.json @@ -8,151 +8,207 @@ "bcl2fastq": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["bcl_demultiplex"] + "installed_by": [ + "bcl_demultiplex" + ] }, "bclconvert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["bcl_demultiplex", "modules"], + "installed_by": [ + "bcl_demultiplex", + "modules" + ], "patch": "modules/nf-core/bclconvert/bclconvert.diff" }, "biobambam/bamsormadup": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff" }, "bowtie2/align": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["fastq_align_dna", "modules"], + "installed_by": [ + "fastq_align_dna", + "modules" + ], "patch": "modules/nf-core/bowtie2/align/bowtie2-align.diff" }, "bwa/mem": { "branch": "master", "git_sha": "1c46359c837ef768b004519f535c30378e8289fc", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/bwa/mem/bwa-mem.diff" }, "bwamem2/mem": { "branch": "master", "git_sha": "d86336f3e7ae0d5f76c67b0859409769cfeb2af2", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, "dragmap/align": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, "fastp": { "branch": "master", "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "md5sum": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "mosdepth": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/mosdepth/mosdepth.diff" }, "multiqc": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/multiqc/multiqc.diff" }, "picard/collecthsmetrics": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff" }, "picard/collectmultiplemetrics": { "branch": "master", "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff" }, "picard/collectwgsmetrics": { "branch": "master", "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, "samtools/cat": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/cat/samtools-cat.diff" }, "samtools/convert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/convert/samtools-convert.diff" }, "samtools/coverage": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, "samtools/flagstat": { "branch": "master", "git_sha": "e334e12a1e985adc5ffc3fc78a68be1de711de45", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/idxstats": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/import": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/sormadup": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/sormadup/samtools-sormadup.diff" }, "samtools/sort": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "samtools/stats": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/stats/samtools-stats.diff" }, "snapaligner/align": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["fastq_align_dna", "modules"], + "installed_by": [ + "fastq_align_dna", + "modules" + ], "patch": "modules/nf-core/snapaligner/align/snapaligner-align.diff" }, "star/align": { "branch": "master", "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/align/star-align.diff" }, "strobealign": { "branch": "master", "git_sha": "d5cc72b63c4e1565cb66e83f0577b04c0bb54d5c", - "installed_by": ["fastq_align_dna", "modules"], + "installed_by": [ + "fastq_align_dna", + "modules" + ], "patch": "modules/nf-core/strobealign/strobealign.diff" } } @@ -162,30 +218,40 @@ "bcl_demultiplex": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "fastq_align_dna": { "branch": "master", "git_sha": "070ddae7fb59384d3d85bf69eb9a1d71ab33ada9", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "df4d1c8cdee98a1bbbed8fc51e82296568e0f9c1", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/multiqc/multiqc.diff b/modules/nf-core/multiqc/multiqc.diff index 947ff7e3..36396fa5 100644 --- a/modules/nf-core/multiqc/multiqc.diff +++ b/modules/nf-core/multiqc/multiqc.diff @@ -1,6 +1,4 @@ Changes in component 'nf-core/multiqc' -'modules/nf-core/multiqc/environment.yml' is unchanged -'modules/nf-core/multiqc/meta.yml' is unchanged Changes in 'multiqc/main.nf': --- modules/nf-core/multiqc/main.nf +++ modules/nf-core/multiqc/main.nf @@ -19,9 +17,20 @@ Changes in 'multiqc/main.nf': path(multiqc_config) path(extra_multiqc_config) path(multiqc_logo) +@@ -18,7 +19,7 @@ + path "*.html" , emit: report + path "*_data" , emit: data + path "*_plots" , optional:true, emit: plots +- tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), topic: versions, emit: versions_multiqc ++ tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), emit: versions_multiqc + + when: + task.ext.when == null || task.ext.when +'modules/nf-core/multiqc/environment.yml' is unchanged +'modules/nf-core/multiqc/meta.yml' is unchanged +'modules/nf-core/multiqc/tests/custom_prefix.config' is unchanged +'modules/nf-core/multiqc/tests/main.nf.test' is unchanged 'modules/nf-core/multiqc/tests/main.nf.test.snap' is unchanged 'modules/nf-core/multiqc/tests/nextflow.config' is unchanged -'modules/nf-core/multiqc/tests/main.nf.test' is unchanged -'modules/nf-core/multiqc/tests/custom_prefix.config' is unchanged ************************************************************ From 5a7c1e718d828c9ae3944e38bc7ac1f18c68e90a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 19:54:25 +0100 Subject: [PATCH 088/202] fix tests, add changelog --- CHANGELOG.md | 1 + tests/workflows/preprocessing.nf.test.snap | 782 ++++++++++++++++++++- 2 files changed, 762 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e929fc1e..69949def 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update the output handling to use the new workflow output definitions. - Bump all modules to latest versions. +- The workflow now outputs data in a subdirectory per `library`, including a library specific MultiQC report ## v2.0.6 diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 348c1fd2..961504d8 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -20,6 +20,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "sample_type": "DNA", @@ -55,6 +56,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "readgroup": { "CN": "CMGG", @@ -78,6 +80,7 @@ { "id": "sample1", "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -120,6 +123,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "sample_type": "DNA", @@ -137,6 +141,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -163,6 +168,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -189,6 +195,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -218,6 +225,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -244,6 +252,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -270,6 +279,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -296,6 +306,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -322,6 +333,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -348,6 +360,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -374,15 +387,286 @@ "mosdepth_thresholds_csi": [ ], - "multiqc_data": [ - "multiqc_data" + "multiqc_library_data": [ + [ + "biobambam2_deduplication.txt:md5,992b5decb6d017254ee9b02fbe076d81", + "fastp-insert-size-plot.txt:md5,66fec5f01198da8ecd97410ec1727021", + "fastp-seq-content-gc-plot_Read_1_After_filtering.txt:md5,23420affa90c1523becba23c09653a92", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.txt:md5,27bb3440b4edeab8a9dc2ec1077cfc0e", + "fastp-seq-content-gc-plot_Read_2_After_filtering.txt:md5,e49276ebe93bb8294ca51e6a0916e703", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.txt:md5,f7bf2354433b3514893f0fe18e7f7877", + "fastp-seq-content-n-plot_Read_1_After_filtering.txt:md5,6c20997febd11ea6c80fe13a1761898b", + "fastp-seq-content-n-plot_Read_1_Before_filtering.txt:md5,a1d1cdbb1a1fb48b6d6bdf1f2192b2b7", + "fastp-seq-content-n-plot_Read_2_After_filtering.txt:md5,e1d8dcf05d785f863cfb17c96c1f58a4", + "fastp-seq-content-n-plot_Read_2_Before_filtering.txt:md5,30bfcca763531e4ee1638031d5359e48", + "fastp-seq-quality-plot_Read_1_After_filtering.txt:md5,2b0a42468f68992639ac8eacbf533134", + "fastp-seq-quality-plot_Read_1_Before_filtering.txt:md5,4e6fea487fecc2ee55db1518ff30a0b5", + "fastp-seq-quality-plot_Read_2_After_filtering.txt:md5,72a6d8295748db4de13d6dc1d1eb83dc", + "fastp-seq-quality-plot_Read_2_Before_filtering.txt:md5,3b1c7675660e838e75d1d5c62c0f3a61", + "fastp_filtered_reads_plot.txt:md5,9e506f1c8dbad71540697d11af4ba6df", + "llms-full.txt:md5,a9dd5cb0ccb6d732ac915af862770693", + "mosdepth-coverage-per-contig-single.txt:md5,e5dd72804ecbe8429179eaae01118d39", + "mosdepth-cumcoverage-dist-id.txt:md5,49f3ec6d8639c9b0f794e4bf96bd11c4", + "mosdepth_cov_dist.txt:md5,704ae312ab6109b1724e3fac0dc740ed", + "mosdepth_cumcov_dist.txt:md5,704ae312ab6109b1724e3fac0dc740ed", + "mosdepth_perchrom.txt:md5,e5dd72804ecbe8429179eaae01118d39", + "multiqc.log:md5,0bf142cd568af28e39f166591e28b550", + "multiqc.parquet:md5,c66e2b2f6ba202acf3cda2ebbd7b2a06", + "multiqc_biobambam2_dups.txt:md5,31c942ce8964d0941cb79f8c9de8aa04", + "multiqc_citations.txt:md5,294fadee817c59c64f1b985ac204b224", + "multiqc_data.json:md5,0c06c19b2156369fab669049b6e37eb5", + "multiqc_fastp.txt:md5,f917618024634bb24850390c8f4836e7", + "multiqc_general_stats.txt:md5,439ff0539fa18ba86b79e990c42dff75", + "multiqc_picard_AlignmentSummaryMetrics.txt:md5,3f32124a666ad5fa6dda93759cf450f0", + "multiqc_picard_HsMetrics.txt:md5,a5ccd0c64f6e2944a559280aaabce595", + "multiqc_picard_baseContent.txt:md5,deba2098af2de348792a37b405eab78c", + "multiqc_picard_quality_by_cycle.txt:md5,eca76b6ed78d34d66e1e185c7158868f", + "multiqc_picard_quality_score_distribution.txt:md5,6ec87b3288ada8fb9456a3cd1e801514", + "multiqc_samtools_coverage.txt:md5,2b8ac198265a850d581d453eacb402cd", + "multiqc_samtools_flagstat.txt:md5,5ce133683245100011b77cd676471de1", + "multiqc_samtools_idxstats.txt:md5,7e542f20dd27d352b5d2be33e1920220", + "multiqc_samtools_stats.txt:md5,1dd571a033605b1224ebac95deceee0b", + "multiqc_sources.txt:md5,26011ccef291bca153e14a43437b4bbc", + "picard_MarkIlluminaAdapters_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "picard_MeanQualityByCycle_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "picard_MeanQualityByCycle_histogram_1.txt:md5,eca76b6ed78d34d66e1e185c7158868f", + "picard_QualityScoreDistribution_histogram.txt:md5,6ec87b3288ada8fb9456a3cd1e801514", + "picard_alignment_readlength_plot.txt:md5,891edbc18f01189de8c5bf52320ee6c7", + "picard_alignment_summary_Aligned_Bases.txt:md5,7d13622d8d4083fe2a4be5bf92ea77e6", + "picard_alignment_summary_Aligned_Reads.txt:md5,ed831c3df4e4465d9c6fb52ce731ee71", + "picard_base_distribution_by_cycle__Adenine.txt:md5,989b9c396dfa032d8ca02f57b7cc6e7d", + "picard_base_distribution_by_cycle__Cytosine.txt:md5,dc7b79f9ab4bc66db25b509e423abf2b", + "picard_base_distribution_by_cycle__Guanine.txt:md5,1f2a16426851c0e434558d437ac482e3", + "picard_base_distribution_by_cycle__Thymine.txt:md5,cbc90b7275fa29bf09d4be71fc443df1", + "picard_base_distribution_by_cycle__Undetermined.txt:md5,e0a643aff9cf4b0d277c4da6c798c6dc", + "picard_hsmetrics_table.txt:md5,a170b91563f01fc311048a9f1983ac87", + "picard_percentage_target_bases.txt:md5,f29ba29d0df56128046793ff26ca5950", + "picard_quality_by_cycle.txt:md5,f89d83da6f5a7fa00511a8959c2bd3c2", + "picard_quality_score_distribution.txt:md5,9d72562e154dba19a69180e2875ae8e9", + "samtools-coverage-table.txt:md5,0f9fe2b460eb659d5ce23deba4ee62d8", + "samtools-coverage_BQ.txt:md5,68b97b7434bd35c71d3d14de478ba1b9", + "samtools-coverage_Bases.txt:md5,f8fcf650945e7b347409d678fae3b006", + "samtools-coverage_Coverage.txt:md5,bc62f359fced9778f869022dd4ab6647", + "samtools-coverage_MQ.txt:md5,5f9ece387a8e160cedbb02874c46000b", + "samtools-coverage_Mean_depth.txt:md5,4d5f58688b4c653b617c709717475c25", + "samtools-coverage_Reads.txt:md5,3667b340251346e538e6f078adcec945", + "samtools-flagstat-pct-table.txt:md5,8b0e71fcfbb55f6e8b0e6949fb146e0c", + "samtools-flagstat-table.txt:md5,6203dc05b5eaee4f529300986aebbb3c", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", + "samtools-idxstats-mapped-reads-plot_Raw_Counts.txt:md5,e8f2b29a779d322cd56b00f4958ef841", + "samtools-stats-dp.txt:md5,07153313edc4f7a3754e9821c85ca0cf", + "samtools_alignment_plot.txt:md5,d60abeeecbb005aff19c12f19a726057" + ] + ], + "multiqc_library_plots": [ + [ + [ + "biobambam2_deduplication-cnt.pdf:md5,8dcf3c25c3a6d362a312683b0cc52254", + "biobambam2_deduplication-pct.pdf:md5,f38a15e73459aefdbf92f53a602eecab", + "fastp-insert-size-plot.pdf:md5,761cc56448ee9500fadf80330b6e6c18", + "fastp-seq-content-gc-plot_Read_1_After_filtering.pdf:md5,e4ba12f4f0c3961dfe7343a420210f74", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.pdf:md5,cbf4e5d5cd4bccc836ef8a4b00789608", + "fastp-seq-content-gc-plot_Read_2_After_filtering.pdf:md5,5c452cc418222a26b85bf2779ccc0e5f", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.pdf:md5,148e583db6040c29d07ae06ade0aae37", + "fastp-seq-content-n-plot_Read_1_After_filtering.pdf:md5,fdda12e04eceaabad0260e7694ca1a47", + "fastp-seq-content-n-plot_Read_1_Before_filtering.pdf:md5,f2d6ba7286870d31dbcdfdc501fa0fe4", + "fastp-seq-content-n-plot_Read_2_After_filtering.pdf:md5,7fc668801cd69b020c5f0dcb7ab780f4", + "fastp-seq-content-n-plot_Read_2_Before_filtering.pdf:md5,9c21674378164f3bd7010aedaf9f9c62", + "fastp-seq-quality-plot_Read_1_After_filtering.pdf:md5,8d69018e6c7babd707ed91a30a2f4373", + "fastp-seq-quality-plot_Read_1_Before_filtering.pdf:md5,1c14e7b644546b647e1525b0035d7095", + "fastp-seq-quality-plot_Read_2_After_filtering.pdf:md5,d30a990dc6d11a33b3a0bd385b7e2765", + "fastp-seq-quality-plot_Read_2_Before_filtering.pdf:md5,569074e2210e477a45c1196d967e0e03", + "fastp_filtered_reads_plot-cnt.pdf:md5,1572b3a72a231623c8ae927b4cb7a0ae", + "fastp_filtered_reads_plot-pct.pdf:md5,d3a4c1a1372f7b914ae6dac6b0b117aa", + "mosdepth-coverage-per-contig-single-cnt.pdf:md5,b532e220dbd44f1b5bccae17f3a423da", + "mosdepth-coverage-per-contig-single-pct.pdf:md5,eb539598e0da9e9c0f16033ff345594b", + "mosdepth-cumcoverage-dist-id.pdf:md5,017ca25a754de8ad1e59bb8e5f9384a9", + "picard_alignment_readlength_plot.pdf:md5,0f360805d8f8d8aeacf3aaae1dc6eb06", + "picard_alignment_summary_Aligned_Bases-cnt.pdf:md5,e0e630f9c98be95f6b26b895721925ca", + "picard_alignment_summary_Aligned_Bases-pct.pdf:md5,0afa444f1854208d7252dfd45c06a000", + "picard_alignment_summary_Aligned_Reads-cnt.pdf:md5,0419bd8fcd699e40575e7c1619937b3e", + "picard_alignment_summary_Aligned_Reads-pct.pdf:md5,aa9bb7e84867a2bd953756a95bc0f311", + "picard_base_distribution_by_cycle__Adenine.pdf:md5,e5a1c8fd676d7267bf0e16baff152f96", + "picard_base_distribution_by_cycle__Cytosine.pdf:md5,8093c223e5fc64be9db36341ee801a6a", + "picard_base_distribution_by_cycle__Guanine.pdf:md5,82d32c26160589945f4c395c98220cb4", + "picard_base_distribution_by_cycle__Thymine.pdf:md5,1c1ed09619d30f34ce0ddc9464d26706", + "picard_base_distribution_by_cycle__Undetermined.pdf:md5,785db14b8f88f7b5675a991172a3ea2a", + "picard_hsmetrics_table.pdf:md5,fc9411cf48ebd47c0c261f919849dd46", + "picard_percentage_target_bases.pdf:md5,3752afa592927e547bf0c03e1d1006eb", + "picard_quality_by_cycle.pdf:md5,673292cc4b18e8cca83522991b81a996", + "picard_quality_score_distribution.pdf:md5,88f913aed3ae94590bf10d11a2b59a09", + "samtools-coverage-table.pdf:md5,26da9fd5643611f77ae7d511d9b92a04", + "samtools-coverage_BQ-cnt.pdf:md5,d2602d8ee5faee419b10283104b12e46", + "samtools-coverage_BQ-log.pdf:md5,04983f8664bf34583140efef4594c91d", + "samtools-coverage_Bases-cnt.pdf:md5,e7d204151b84a425c030605c40e5ac98", + "samtools-coverage_Bases-log.pdf:md5,eb3195e76bc390a13bd786ce17994208", + "samtools-coverage_Coverage-cnt.pdf:md5,4cd335d85e8071f4d6b34c07da7e58b3", + "samtools-coverage_Coverage-log.pdf:md5,1a6d4126fd6390139db86ac9c59c10b8", + "samtools-coverage_MQ-cnt.pdf:md5,19b1ec40e0a622c79429cd2e5db6a2ab", + "samtools-coverage_MQ-log.pdf:md5,6bd0213a8e9437ea972d060a45dd32e0", + "samtools-coverage_Mean_depth-cnt.pdf:md5,2e6766ac06b6d61b1eec6e5a4a8e773e", + "samtools-coverage_Mean_depth-log.pdf:md5,a89995d4c79a6119465fb4899129ef73", + "samtools-coverage_Reads-cnt.pdf:md5,f3ed81fba0bd8fdf860db5d4541fb66c", + "samtools-coverage_Reads-log.pdf:md5,9aae76e8a17ae18bc7e1ea222736b4ff", + "samtools-flagstat-pct-table.pdf:md5,e6debd913a8442f56cc22c714021e0a7", + "samtools-flagstat-table.pdf:md5,28f63086a0ac9b57da1f0911b7f8940d", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.pdf:md5,ae4ddcc627dada8d861a8c15e49d97f1", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.pdf:md5,543a323fa0cede66f19ad512222954f4", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.pdf:md5,3e874efbf35563c0e52fd47611822494", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.pdf:md5,c18b4695893cde28c41de39fb16dbcee", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.pdf:md5,d4b9c1b844d0cf4e29d112dc755682b4", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.pdf:md5,f3bef9d1890b8a69acb9c52e07ce7ea3", + "samtools-stats-dp.pdf:md5,9872a7fcbd9e6047c6b3c9aca5a36ced", + "samtools_alignment_plot-cnt.pdf:md5,288be15b7710eadf32e6ba47511fe140", + "samtools_alignment_plot-pct.pdf:md5,6e4103b696b62faaa47989881f202dbe" + ], + [ + "biobambam2_deduplication-cnt.png:md5,5707c3cf44cff88666c3c7b4970ab021", + "biobambam2_deduplication-pct.png:md5,b2a0fece791ff0532a426f3faeecf3f4", + "fastp-insert-size-plot.png:md5,40a7c7edc7062c92d088e8974dd1fbe9", + "fastp-seq-content-gc-plot_Read_1_After_filtering.png:md5,ff993de7c7a0b2f4dd17aaf509c8209b", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.png:md5,124351c45a1bd7d611fd3ba89510018b", + "fastp-seq-content-gc-plot_Read_2_After_filtering.png:md5,058842506a3200770c46a4a70b64ce48", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.png:md5,985bf206443edf1417e2a0f9354abe3c", + "fastp-seq-content-n-plot_Read_1_After_filtering.png:md5,7855b3938c2b48578b2e1ca3486783de", + "fastp-seq-content-n-plot_Read_1_Before_filtering.png:md5,b9276b3bd8f2c57a51d12f76273fc322", + "fastp-seq-content-n-plot_Read_2_After_filtering.png:md5,45684fe478e5d2912848c032c3bc8ee4", + "fastp-seq-content-n-plot_Read_2_Before_filtering.png:md5,97606f1910cdbb47f68d5b7ac9f9bf4b", + "fastp-seq-quality-plot_Read_1_After_filtering.png:md5,44fe9279b3f2279c19d2ce541b9c6c19", + "fastp-seq-quality-plot_Read_1_Before_filtering.png:md5,93c06663d6ed02d11f4e5eab97d48917", + "fastp-seq-quality-plot_Read_2_After_filtering.png:md5,99219cc1b64c80e6ac8cf653add1990c", + "fastp-seq-quality-plot_Read_2_Before_filtering.png:md5,5d655406be9a2ff9a68ec461f51cfcc5", + "fastp_filtered_reads_plot-cnt.png:md5,75911dd91d24adfaae185ebcf0a8455a", + "fastp_filtered_reads_plot-pct.png:md5,4b3c0fd7f90c7c83b50c557d4aa3b6a5", + "mosdepth-coverage-per-contig-single-cnt.png:md5,ff9cec471c8a882b3ad608312b950332", + "mosdepth-coverage-per-contig-single-pct.png:md5,8f17612654e4217dd673c2788b473e7c", + "mosdepth-cumcoverage-dist-id.png:md5,64f3a8071bca0d22a72c72090b2eb638", + "picard_alignment_readlength_plot.png:md5,7c5708c6ed659731111242666746905e", + "picard_alignment_summary_Aligned_Bases-cnt.png:md5,ccd4cdf7a4b1f3f2a39adf2e0c700ed4", + "picard_alignment_summary_Aligned_Bases-pct.png:md5,de5771f0fc6d2feaf7ea1bef7b4f57ed", + "picard_alignment_summary_Aligned_Reads-cnt.png:md5,fa8f7e289fd84f0dfb877758b926c421", + "picard_alignment_summary_Aligned_Reads-pct.png:md5,18be469adf5d34e7296aa9e0feb10274", + "picard_base_distribution_by_cycle__Adenine.png:md5,b59076e9793e4a403228c477f99c6cf8", + "picard_base_distribution_by_cycle__Cytosine.png:md5,7c42741dd1ee386af449d29e21a8389d", + "picard_base_distribution_by_cycle__Guanine.png:md5,27a487a8587c180f08d3afb58e71fb17", + "picard_base_distribution_by_cycle__Thymine.png:md5,f99b137a9975db372a29c0400652eca4", + "picard_base_distribution_by_cycle__Undetermined.png:md5,e7428923e6530f7bd00ca05bf2b0dabe", + "picard_hsmetrics_table.png:md5,70c4f98f3056ebd1a5d49f4f91ab3001", + "picard_percentage_target_bases.png:md5,1e70e6c776d49296f3f8debc3b893851", + "picard_quality_by_cycle.png:md5,23c7dc421bf1a8b9c61e7abdea1b96e9", + "picard_quality_score_distribution.png:md5,f129878e0583e69cac53ec51cac62f4e", + "samtools-coverage-table.png:md5,ffc0a23dcfe8a1b44e7c585898a412ba", + "samtools-coverage_BQ-cnt.png:md5,42a7bfacd302c7924d59701a585957f8", + "samtools-coverage_BQ-log.png:md5,67d6d4c8072743a32dfa30dd22edd5fe", + "samtools-coverage_Bases-cnt.png:md5,8790b6226f16810deceb82c6834b21be", + "samtools-coverage_Bases-log.png:md5,7bdd54947c3ab74d06b9fc11cc35cb51", + "samtools-coverage_Coverage-cnt.png:md5,cdff6829f5d017e67668e6b77b8648fd", + "samtools-coverage_Coverage-log.png:md5,13441e809c66563bf7284ebe4038f368", + "samtools-coverage_MQ-cnt.png:md5,59265e8998386d8a6521296508b4f4e6", + "samtools-coverage_MQ-log.png:md5,0282c8f2fb311eb3830f6d33a8e0d2ef", + "samtools-coverage_Mean_depth-cnt.png:md5,7f0aa59d888da55c8b7e5ca00011b2fc", + "samtools-coverage_Mean_depth-log.png:md5,ab01268969d553decb36658ca785dac0", + "samtools-coverage_Reads-cnt.png:md5,f77fe84d95f5bebd12aa764ab377b6e7", + "samtools-coverage_Reads-log.png:md5,34d3ebbc83f073531328d633466cfcd9", + "samtools-flagstat-pct-table.png:md5,30a84ce2464168d8dedf65b47725e2e1", + "samtools-flagstat-table.png:md5,a828ba0e94ebd04d2ac50ecc43b007fd", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.png:md5,91267791bafff119d985db6b24f813dc", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.png:md5,d1c9fd2633128ed5af7113cedeba91d8", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.png:md5,eb81f43f6c5778f957ce85137758235e", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.png:md5,b1b15467c4b7e34b2a724c2fe9daefa8", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.png:md5,64927987623ac1715e607470f6bf055a", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.png:md5,09773cf98a65a96710a4fac9e2600ed9", + "samtools-stats-dp.png:md5,fe29585e232244237558512103d78fdc", + "samtools_alignment_plot-cnt.png:md5,e5523404a7622df41efaf24fb98ef4c5", + "samtools_alignment_plot-pct.png:md5,7945231e29b09915dee17a9fa620ef62" + ], + [ + "biobambam2_deduplication-cnt.svg:md5,effd09d8ad9d34872090a0bae6f5e967", + "biobambam2_deduplication-pct.svg:md5,e58bfa9f92464f78673fd1ad9e2450d0", + "fastp-insert-size-plot.svg:md5,83bcd604041b4fa6053dcb0d33f21fed", + "fastp-seq-content-gc-plot_Read_1_After_filtering.svg:md5,03a57f9e891bb8aeac9a4979b0e7e513", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.svg:md5,fe77090c3ee62106e5cdd0d243744ced", + "fastp-seq-content-gc-plot_Read_2_After_filtering.svg:md5,fc70efca2a6feb2ebd02712323ab858f", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.svg:md5,a9aeaf418a4af53db36fa495652538b5", + "fastp-seq-content-n-plot_Read_1_After_filtering.svg:md5,c45ccd2c9670cfc6a8fe7e7c411fa792", + "fastp-seq-content-n-plot_Read_1_Before_filtering.svg:md5,78d3817a16b013f647a23564878f1542", + "fastp-seq-content-n-plot_Read_2_After_filtering.svg:md5,f33d2472e82e715f9d33b6781d4671b2", + "fastp-seq-content-n-plot_Read_2_Before_filtering.svg:md5,e7bdb138105422f2eca236628ac1c024", + "fastp-seq-quality-plot_Read_1_After_filtering.svg:md5,353db00f7a3f20c0c07838236e88a5ed", + "fastp-seq-quality-plot_Read_1_Before_filtering.svg:md5,69cef5512260a6af8955d9785966a806", + "fastp-seq-quality-plot_Read_2_After_filtering.svg:md5,46f0ee90d934323da913b14927888a75", + "fastp-seq-quality-plot_Read_2_Before_filtering.svg:md5,bf833093bbc86d88a297d48ac7ad64ad", + "fastp_filtered_reads_plot-cnt.svg:md5,89f162c2fe82f89d487564c26b007003", + "fastp_filtered_reads_plot-pct.svg:md5,74c611b014426ffc6990fd278dd5077d", + "mosdepth-coverage-per-contig-single-cnt.svg:md5,4e8ee59993d08a72eb4545fb8378a8ba", + "mosdepth-coverage-per-contig-single-pct.svg:md5,6c79f39035c6cb6db7f135eefb155a0e", + "mosdepth-cumcoverage-dist-id.svg:md5,587529190643bec79f4c4da65e68fdae", + "picard_alignment_readlength_plot.svg:md5,b0bf8f98c4bfd66b8848b5cf645812a6", + "picard_alignment_summary_Aligned_Bases-cnt.svg:md5,1e4c349f358aa1375f00eeb19a638898", + "picard_alignment_summary_Aligned_Bases-pct.svg:md5,1b2f81b0a0a23d54f62946a266d352b1", + "picard_alignment_summary_Aligned_Reads-cnt.svg:md5,9ee533f876f4af410f0fdd3da6427d89", + "picard_alignment_summary_Aligned_Reads-pct.svg:md5,713905bb8f964ccbf5d0b730447ae9a1", + "picard_base_distribution_by_cycle__Adenine.svg:md5,1a8b1b45ba9b22e9c230adcfce962dd8", + "picard_base_distribution_by_cycle__Cytosine.svg:md5,82a8225f9561a6296aa0b2bb801bf568", + "picard_base_distribution_by_cycle__Guanine.svg:md5,a3bb637662550e5712909ebb90268b11", + "picard_base_distribution_by_cycle__Thymine.svg:md5,316858766a810aa7bac94e9fa82f6a0e", + "picard_base_distribution_by_cycle__Undetermined.svg:md5,f09460fa07c95a4b8d326c62eaeb7099", + "picard_hsmetrics_table.svg:md5,2882442c46a78a971612f03b60cdc9a7", + "picard_percentage_target_bases.svg:md5,bf71b0901b3f91350ea786c293500cd9", + "picard_quality_by_cycle.svg:md5,83b907ec1941f942498b8c19ac15d335", + "picard_quality_score_distribution.svg:md5,4b5a6ac776863aab6a0874a1788e838c", + "samtools-coverage-table.svg:md5,1d344020db642dc8ed73ce65384eaed9", + "samtools-coverage_BQ-cnt.svg:md5,e618e68a0e1d475030a5b86d05217ae6", + "samtools-coverage_BQ-log.svg:md5,d7af1801f148ea9bda9c0d105afc8270", + "samtools-coverage_Bases-cnt.svg:md5,af0bf231e9dfc5545686c9d0d7fc0bac", + "samtools-coverage_Bases-log.svg:md5,d6070217bb54d7f966b21c8563571945", + "samtools-coverage_Coverage-cnt.svg:md5,ffeb1e8ffd6318d30c9ffd72f8701eb8", + "samtools-coverage_Coverage-log.svg:md5,81aafb2970773832ccc95a6a87c0db12", + "samtools-coverage_MQ-cnt.svg:md5,9aaa9307dbe314b04e1e2f78dec852db", + "samtools-coverage_MQ-log.svg:md5,e530d20e0b9ac5ea89a1d7e99e561da3", + "samtools-coverage_Mean_depth-cnt.svg:md5,b3366c179f143419ef91bc2016e717d2", + "samtools-coverage_Mean_depth-log.svg:md5,c13a4e5c2f1e78b77c5bed76598d3e6b", + "samtools-coverage_Reads-cnt.svg:md5,153e7705058794c16bee02ce37daba50", + "samtools-coverage_Reads-log.svg:md5,68f3871ec68b060e54380d353e1a0ded", + "samtools-flagstat-pct-table.svg:md5,7a64df60de3c53a62ce1b9bc62d1e600", + "samtools-flagstat-table.svg:md5,9d6e77d29691f652ed21a493866c226b", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.svg:md5,aee092dd5c492ae70e542cab5b11e8a6", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.svg:md5,a7ef56dd58e80e225252e5bd78c830f2", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.svg:md5,613dcab15c764fafd2151da9b3d5c55e", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.svg:md5,b1f82c95aed78d4e219f16cc7d3f41c3", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.svg:md5,4855e19f8503ef463a338bfcab7af3a5", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.svg:md5,b98efafd11eea5fd5292e247d4530821", + "samtools-stats-dp.svg:md5,5c9cc7aeefc2a540d2b93bcdeda7aa39", + "samtools_alignment_plot-cnt.svg:md5,0a2910be102b4c0ef6ac156a25a67005", + "samtools_alignment_plot-pct.svg:md5,061886f9d0f5839eccb706a784f7eec7" + ] + ] + ], + "multiqc_library_report": [ + "multiqc_library_test.html:md5,20fd67ac14ace887e5f5b76f02dc2b20" + ], + "multiqc_main_data": [ + [ + [ + "llms-full.txt:md5,769bfe8a8b5b73ff5e31e480d5d129c9", + "multiqc.log:md5,1ec335a68a9d72f823a7bf0bf42e028c", + "multiqc.parquet:md5,73d600bb80fc3459bfba5edc970fc949", + "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", + "multiqc_data.json:md5,8ad88f47321bfad770cdc2387d5fa6f9", + "multiqc_software_versions.txt:md5,3e70a45b35aa87dab44c6b2b61033f14", + "multiqc_sources.txt:md5,d2a044df39ce3c6abe5cdc2d67473490" + ] + ] ], - "multiqc_plots": [ - "multiqc_plots" + "multiqc_main_plots": [ + [ + + ] ], - "multiqc_report": [ + "multiqc_main_report": [ [ - "multiqc_report.html" + "multiqc.html:md5,a05f843b1b044c86a850de70980b8af2" ] ], "panelcoverage": [ @@ -403,6 +687,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "sample_type": "DNA", @@ -429,6 +714,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "sample_type": "DNA", @@ -460,6 +746,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "sample_type": "DNA", @@ -485,6 +772,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -511,6 +799,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -537,6 +826,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -563,6 +853,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -589,6 +880,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -632,7 +924,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T13:07:39.314799" + "timestamp": "2025-12-04T19:48:21.07529" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -655,6 +947,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "sample_type": "DNA", @@ -690,6 +983,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "readgroup": { "CN": "CMGG", @@ -713,6 +1007,7 @@ { "id": "sample1", "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -755,6 +1050,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "sample_type": "DNA", @@ -802,15 +1098,162 @@ "mosdepth_thresholds_csi": [ ], - "multiqc_data": [ - "multiqc_data" + "multiqc_library_data": [ + [ + "biobambam2_deduplication.txt:md5,992b5decb6d017254ee9b02fbe076d81", + "fastp-insert-size-plot.txt:md5,66fec5f01198da8ecd97410ec1727021", + "fastp-seq-content-gc-plot_Read_1_After_filtering.txt:md5,23420affa90c1523becba23c09653a92", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.txt:md5,27bb3440b4edeab8a9dc2ec1077cfc0e", + "fastp-seq-content-gc-plot_Read_2_After_filtering.txt:md5,e49276ebe93bb8294ca51e6a0916e703", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.txt:md5,f7bf2354433b3514893f0fe18e7f7877", + "fastp-seq-content-n-plot_Read_1_After_filtering.txt:md5,6c20997febd11ea6c80fe13a1761898b", + "fastp-seq-content-n-plot_Read_1_Before_filtering.txt:md5,a1d1cdbb1a1fb48b6d6bdf1f2192b2b7", + "fastp-seq-content-n-plot_Read_2_After_filtering.txt:md5,e1d8dcf05d785f863cfb17c96c1f58a4", + "fastp-seq-content-n-plot_Read_2_Before_filtering.txt:md5,30bfcca763531e4ee1638031d5359e48", + "fastp-seq-quality-plot_Read_1_After_filtering.txt:md5,2b0a42468f68992639ac8eacbf533134", + "fastp-seq-quality-plot_Read_1_Before_filtering.txt:md5,4e6fea487fecc2ee55db1518ff30a0b5", + "fastp-seq-quality-plot_Read_2_After_filtering.txt:md5,72a6d8295748db4de13d6dc1d1eb83dc", + "fastp-seq-quality-plot_Read_2_Before_filtering.txt:md5,3b1c7675660e838e75d1d5c62c0f3a61", + "fastp_filtered_reads_plot.txt:md5,9e506f1c8dbad71540697d11af4ba6df", + "llms-full.txt:md5,02c5ed19814d3afd16ea5fccc3516865", + "multiqc.log:md5,faa526e1b74af6acf779e92caf5bd77a", + "multiqc.parquet:md5,f991c38b80ea4795193224a782e94750", + "multiqc_biobambam2_dups.txt:md5,31c942ce8964d0941cb79f8c9de8aa04", + "multiqc_citations.txt:md5,b64ab308dbc3a2e58e15527370655958", + "multiqc_data.json:md5,ea17bc7fc0063bb30073f9b5b3cc7bfb", + "multiqc_fastp.txt:md5,f917618024634bb24850390c8f4836e7", + "multiqc_general_stats.txt:md5,21152415bf3b3720dede9ada054ae5e1", + "multiqc_samtools_flagstat.txt:md5,5ce133683245100011b77cd676471de1", + "multiqc_samtools_idxstats.txt:md5,7e542f20dd27d352b5d2be33e1920220", + "multiqc_samtools_stats.txt:md5,1dd571a033605b1224ebac95deceee0b", + "multiqc_sources.txt:md5,08a7aa04a68650ae860f494ae1b5d4d2", + "samtools-flagstat-pct-table.txt:md5,8b0e71fcfbb55f6e8b0e6949fb146e0c", + "samtools-flagstat-table.txt:md5,6203dc05b5eaee4f529300986aebbb3c", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", + "samtools-idxstats-mapped-reads-plot_Raw_Counts.txt:md5,e8f2b29a779d322cd56b00f4958ef841", + "samtools-stats-dp.txt:md5,07153313edc4f7a3754e9821c85ca0cf", + "samtools_alignment_plot.txt:md5,d60abeeecbb005aff19c12f19a726057" + ] + ], + "multiqc_library_plots": [ + [ + [ + "biobambam2_deduplication-cnt.pdf:md5,32dc6feb5cfb2a681e1baea64ed174d2", + "biobambam2_deduplication-pct.pdf:md5,c210b96ff301c4699a981b7a747dd642", + "fastp-insert-size-plot.pdf:md5,ac28b57e2270b846462ec69d469403de", + "fastp-seq-content-gc-plot_Read_1_After_filtering.pdf:md5,70fc95d50564a9e34ffedaab55c7e3a3", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.pdf:md5,bfdadfab1ef45191268e8f19b5b56756", + "fastp-seq-content-gc-plot_Read_2_After_filtering.pdf:md5,be9b2f8bb0276f4da8cf20595035bb33", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.pdf:md5,a00ca04dd4577aa4706975016bf82618", + "fastp-seq-content-n-plot_Read_1_After_filtering.pdf:md5,9dd66bed0bb685993e1ac70aad2405a1", + "fastp-seq-content-n-plot_Read_1_Before_filtering.pdf:md5,95d07c4ea09e4ffb8473e84648eea599", + "fastp-seq-content-n-plot_Read_2_After_filtering.pdf:md5,c9550470037ba6eec53118c5db3ed62a", + "fastp-seq-content-n-plot_Read_2_Before_filtering.pdf:md5,9a9dff340890cd43c6ee7a689112c49e", + "fastp-seq-quality-plot_Read_1_After_filtering.pdf:md5,e3f499d8d0ccf8bf0df604e96f7be9cb", + "fastp-seq-quality-plot_Read_1_Before_filtering.pdf:md5,c490b53f4a9cddbd3659256aedbeb4cd", + "fastp-seq-quality-plot_Read_2_After_filtering.pdf:md5,31011ec67fc23ff867c60c45b9681396", + "fastp-seq-quality-plot_Read_2_Before_filtering.pdf:md5,b75dad16330483e160720bd89649167d", + "fastp_filtered_reads_plot-cnt.pdf:md5,e34eea79aa92a8f0a1cafa522d1204f3", + "fastp_filtered_reads_plot-pct.pdf:md5,0f6b66deb6fbff878987ca29069cb016", + "samtools-flagstat-pct-table.pdf:md5,781be091183f24877110f8d5be0ebbec", + "samtools-flagstat-table.pdf:md5,bc1eff95cf645832e0dee6d86bcf503b", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.pdf:md5,f392b8070efe5b7a4bd20993c0e66bfa", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.pdf:md5,282ddb8116e7c774149d24015d2a56bd", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.pdf:md5,824315ee6e029d3b42f37f02b9374734", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.pdf:md5,cd587a5ace7868b2b24fdd16ad079e40", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.pdf:md5,2be7c8ff5b10d0ee1fb6b01f4c2100ee", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.pdf:md5,f2caf54746b77da42fe4200fc1f2eb96", + "samtools-stats-dp.pdf:md5,8b63ef11ded4b2224f9d5f6d3f059c7a", + "samtools_alignment_plot-cnt.pdf:md5,3d6c545941eec5834f4c991ecf0be42c", + "samtools_alignment_plot-pct.pdf:md5,a62b1d31109315eacb4ce42c63ae0aef" + ], + [ + "biobambam2_deduplication-cnt.png:md5,5707c3cf44cff88666c3c7b4970ab021", + "biobambam2_deduplication-pct.png:md5,b2a0fece791ff0532a426f3faeecf3f4", + "fastp-insert-size-plot.png:md5,40a7c7edc7062c92d088e8974dd1fbe9", + "fastp-seq-content-gc-plot_Read_1_After_filtering.png:md5,ff993de7c7a0b2f4dd17aaf509c8209b", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.png:md5,124351c45a1bd7d611fd3ba89510018b", + "fastp-seq-content-gc-plot_Read_2_After_filtering.png:md5,058842506a3200770c46a4a70b64ce48", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.png:md5,985bf206443edf1417e2a0f9354abe3c", + "fastp-seq-content-n-plot_Read_1_After_filtering.png:md5,7855b3938c2b48578b2e1ca3486783de", + "fastp-seq-content-n-plot_Read_1_Before_filtering.png:md5,b9276b3bd8f2c57a51d12f76273fc322", + "fastp-seq-content-n-plot_Read_2_After_filtering.png:md5,45684fe478e5d2912848c032c3bc8ee4", + "fastp-seq-content-n-plot_Read_2_Before_filtering.png:md5,97606f1910cdbb47f68d5b7ac9f9bf4b", + "fastp-seq-quality-plot_Read_1_After_filtering.png:md5,44fe9279b3f2279c19d2ce541b9c6c19", + "fastp-seq-quality-plot_Read_1_Before_filtering.png:md5,93c06663d6ed02d11f4e5eab97d48917", + "fastp-seq-quality-plot_Read_2_After_filtering.png:md5,99219cc1b64c80e6ac8cf653add1990c", + "fastp-seq-quality-plot_Read_2_Before_filtering.png:md5,5d655406be9a2ff9a68ec461f51cfcc5", + "fastp_filtered_reads_plot-cnt.png:md5,75911dd91d24adfaae185ebcf0a8455a", + "fastp_filtered_reads_plot-pct.png:md5,4b3c0fd7f90c7c83b50c557d4aa3b6a5", + "samtools-flagstat-pct-table.png:md5,30a84ce2464168d8dedf65b47725e2e1", + "samtools-flagstat-table.png:md5,a828ba0e94ebd04d2ac50ecc43b007fd", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.png:md5,91267791bafff119d985db6b24f813dc", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.png:md5,d1c9fd2633128ed5af7113cedeba91d8", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.png:md5,eb81f43f6c5778f957ce85137758235e", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.png:md5,b1b15467c4b7e34b2a724c2fe9daefa8", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.png:md5,64927987623ac1715e607470f6bf055a", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.png:md5,09773cf98a65a96710a4fac9e2600ed9", + "samtools-stats-dp.png:md5,fe29585e232244237558512103d78fdc", + "samtools_alignment_plot-cnt.png:md5,e5523404a7622df41efaf24fb98ef4c5", + "samtools_alignment_plot-pct.png:md5,7945231e29b09915dee17a9fa620ef62" + ], + [ + "biobambam2_deduplication-cnt.svg:md5,9de3a4196707cc54a09ccab579551b45", + "biobambam2_deduplication-pct.svg:md5,383483ee720a0b93282f11cef90d8412", + "fastp-insert-size-plot.svg:md5,03e25e27d6f08e7eeef62edaac78705d", + "fastp-seq-content-gc-plot_Read_1_After_filtering.svg:md5,16db74211fea2dd026208e1ff8932921", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.svg:md5,ebce58ed6cef4ed79ea2ddd5d796e61e", + "fastp-seq-content-gc-plot_Read_2_After_filtering.svg:md5,2e6b93f07296d37a5fd08f493793ecf2", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.svg:md5,865602ee9731648cf55a8f6c6e3fcb20", + "fastp-seq-content-n-plot_Read_1_After_filtering.svg:md5,c38f3a392319e4b9e2147a96b33e1186", + "fastp-seq-content-n-plot_Read_1_Before_filtering.svg:md5,b8416f1f456e3a189822f22c26e388ad", + "fastp-seq-content-n-plot_Read_2_After_filtering.svg:md5,5c54a86a023e9ac204ece6eca7f4da3d", + "fastp-seq-content-n-plot_Read_2_Before_filtering.svg:md5,74ecf94d1bc8a2ea1315bad82e8da636", + "fastp-seq-quality-plot_Read_1_After_filtering.svg:md5,2136357bde8a33774139d892f78f24f8", + "fastp-seq-quality-plot_Read_1_Before_filtering.svg:md5,79c1c221969bdbcd7254eb8d9c6e15f2", + "fastp-seq-quality-plot_Read_2_After_filtering.svg:md5,a55b84e706aa6aaa796e74f29bc32ec7", + "fastp-seq-quality-plot_Read_2_Before_filtering.svg:md5,ddfc609e5a87d598e8abe9777130e8e6", + "fastp_filtered_reads_plot-cnt.svg:md5,5fd1528dbf165823db88a7cf666ecb23", + "fastp_filtered_reads_plot-pct.svg:md5,d8adcea8718c87a360b9d329e31cc64b", + "samtools-flagstat-pct-table.svg:md5,3a27df4db014b18226c51f41868c8387", + "samtools-flagstat-table.svg:md5,0c0bca9b4b56b6f1a7bac9b23be4bbe4", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.svg:md5,62227493b8c1c4abf2b9a56dee4aaee1", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.svg:md5,7e0a96a8947202ada7f3539f614aafbd", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.svg:md5,addf085c4878ef4c72bf2de0b1da73c5", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.svg:md5,198bee66f3e5232a1f389abf312f3230", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.svg:md5,1e1de4b4dfdaebb6c6c9cb6ecf78fc0d", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.svg:md5,2a42c274765d0a37f3eeef4b605ad55c", + "samtools-stats-dp.svg:md5,c3d026b17b884a56736a66cdba55865b", + "samtools_alignment_plot-cnt.svg:md5,55cf5b87a08d2fb1c4ee34099146a8b1", + "samtools_alignment_plot-pct.svg:md5,123f6620c817c04bb14336aae67dcaac" + ] + ] ], - "multiqc_plots": [ - "multiqc_plots" + "multiqc_library_report": [ + "multiqc_library_test.html:md5,379d95b311027e666745448a9e27fe65" ], - "multiqc_report": [ + "multiqc_main_data": [ [ - "multiqc_report.html" + [ + "llms-full.txt:md5,d188ca7a55d62d188c5c13608585d75c", + "multiqc.log:md5,4832cad68754c77e2de90985272b0342", + "multiqc.parquet:md5,182ff0904414468b20c9197f08ecf956", + "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", + "multiqc_data.json:md5,a9e50ebc69822d508d72da06c16bf9ff", + "multiqc_software_versions.txt:md5,4e94b4dd017aacfd34b89230176af1af", + "multiqc_sources.txt:md5,d2a044df39ce3c6abe5cdc2d67473490" + ] + ] + ], + "multiqc_main_plots": [ + [ + + ] + ], + "multiqc_main_report": [ + [ + "multiqc.html:md5,f3b0258eb0cd1c0ee4f206368de6b662" ] ], "panelcoverage": [ @@ -837,6 +1280,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -863,6 +1307,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -889,6 +1334,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -915,6 +1361,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", @@ -954,7 +1401,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T13:12:08.110112" + "timestamp": "2025-12-04T19:54:04.990092" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -977,6 +1424,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "sample_type": "DNA", "samplename": "sample1", @@ -1011,6 +1459,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "readgroup": { "CN": "CMGG", @@ -1033,6 +1482,7 @@ { "id": "sample1", "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1074,6 +1524,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "sample_type": "DNA", "samplename": "sample1", @@ -1090,6 +1541,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1115,6 +1567,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1140,6 +1593,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1168,6 +1622,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1193,6 +1648,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1227,6 +1683,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1252,15 +1709,290 @@ "mosdepth_thresholds_csi": [ ], - "multiqc_data": [ - "multiqc_data" + "multiqc_library_data": [ + [ + "biobambam2_deduplication.txt:md5,992b5decb6d017254ee9b02fbe076d81", + "fastp-insert-size-plot.txt:md5,66fec5f01198da8ecd97410ec1727021", + "fastp-seq-content-gc-plot_Read_1_After_filtering.txt:md5,23420affa90c1523becba23c09653a92", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.txt:md5,27bb3440b4edeab8a9dc2ec1077cfc0e", + "fastp-seq-content-gc-plot_Read_2_After_filtering.txt:md5,e49276ebe93bb8294ca51e6a0916e703", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.txt:md5,f7bf2354433b3514893f0fe18e7f7877", + "fastp-seq-content-n-plot_Read_1_After_filtering.txt:md5,6c20997febd11ea6c80fe13a1761898b", + "fastp-seq-content-n-plot_Read_1_Before_filtering.txt:md5,a1d1cdbb1a1fb48b6d6bdf1f2192b2b7", + "fastp-seq-content-n-plot_Read_2_After_filtering.txt:md5,e1d8dcf05d785f863cfb17c96c1f58a4", + "fastp-seq-content-n-plot_Read_2_Before_filtering.txt:md5,30bfcca763531e4ee1638031d5359e48", + "fastp-seq-quality-plot_Read_1_After_filtering.txt:md5,2b0a42468f68992639ac8eacbf533134", + "fastp-seq-quality-plot_Read_1_Before_filtering.txt:md5,4e6fea487fecc2ee55db1518ff30a0b5", + "fastp-seq-quality-plot_Read_2_After_filtering.txt:md5,72a6d8295748db4de13d6dc1d1eb83dc", + "fastp-seq-quality-plot_Read_2_Before_filtering.txt:md5,3b1c7675660e838e75d1d5c62c0f3a61", + "fastp_filtered_reads_plot.txt:md5,9e506f1c8dbad71540697d11af4ba6df", + "llms-full.txt:md5,5f245d44b703b37991e2130e2247adb9", + "mosdepth-coverage-per-contig-single.txt:md5,0c5d8872c18169b771168ca9fa7d40b2", + "mosdepth-cumcoverage-dist-id.txt:md5,2592e72a312feb3363dece668fb2ea90", + "mosdepth_cov_dist.txt:md5,f74eeba67b67d59def037884af206551", + "mosdepth_cumcov_dist.txt:md5,f74eeba67b67d59def037884af206551", + "mosdepth_perchrom.txt:md5,0c5d8872c18169b771168ca9fa7d40b2", + "multiqc.log:md5,443bae2f4f1af6e82ae0c2623b5d5b26", + "multiqc.parquet:md5,64c797120e6fe75c00726dd5a05b8613", + "multiqc_biobambam2_dups.txt:md5,31c942ce8964d0941cb79f8c9de8aa04", + "multiqc_citations.txt:md5,294fadee817c59c64f1b985ac204b224", + "multiqc_data.json:md5,b021f17bc01883a1e6bb04642de162ba", + "multiqc_fastp.txt:md5,f917618024634bb24850390c8f4836e7", + "multiqc_general_stats.txt:md5,94493aa967cdafb4c5f78b8981b1a185", + "multiqc_picard_AlignmentSummaryMetrics.txt:md5,3f32124a666ad5fa6dda93759cf450f0", + "multiqc_picard_baseContent.txt:md5,deba2098af2de348792a37b405eab78c", + "multiqc_picard_quality_by_cycle.txt:md5,eca76b6ed78d34d66e1e185c7158868f", + "multiqc_picard_quality_score_distribution.txt:md5,6ec87b3288ada8fb9456a3cd1e801514", + "multiqc_picard_wgsmetrics.txt:md5,54691f0bafd26c22b3339ac5133e3e59", + "multiqc_samtools_coverage.txt:md5,2b8ac198265a850d581d453eacb402cd", + "multiqc_samtools_flagstat.txt:md5,5ce133683245100011b77cd676471de1", + "multiqc_samtools_idxstats.txt:md5,7e542f20dd27d352b5d2be33e1920220", + "multiqc_samtools_stats.txt:md5,1dd571a033605b1224ebac95deceee0b", + "multiqc_sources.txt:md5,8bbd0fb5a901bd8e6da470a94357b8c7", + "picard_MarkIlluminaAdapters_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "picard_MeanQualityByCycle_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", + "picard_MeanQualityByCycle_histogram_1.txt:md5,eca76b6ed78d34d66e1e185c7158868f", + "picard_QualityScoreDistribution_histogram.txt:md5,6ec87b3288ada8fb9456a3cd1e801514", + "picard_alignment_readlength_plot.txt:md5,891edbc18f01189de8c5bf52320ee6c7", + "picard_alignment_summary_Aligned_Bases.txt:md5,7d13622d8d4083fe2a4be5bf92ea77e6", + "picard_alignment_summary_Aligned_Reads.txt:md5,ed831c3df4e4465d9c6fb52ce731ee71", + "picard_base_distribution_by_cycle__Adenine.txt:md5,989b9c396dfa032d8ca02f57b7cc6e7d", + "picard_base_distribution_by_cycle__Cytosine.txt:md5,dc7b79f9ab4bc66db25b509e423abf2b", + "picard_base_distribution_by_cycle__Guanine.txt:md5,1f2a16426851c0e434558d437ac482e3", + "picard_base_distribution_by_cycle__Thymine.txt:md5,cbc90b7275fa29bf09d4be71fc443df1", + "picard_base_distribution_by_cycle__Undetermined.txt:md5,e0a643aff9cf4b0d277c4da6c798c6dc", + "picard_quality_by_cycle.txt:md5,f89d83da6f5a7fa00511a8959c2bd3c2", + "picard_quality_score_distribution.txt:md5,9d72562e154dba19a69180e2875ae8e9", + "picard_wgs_metrics_bases.txt:md5,5efebe4a352e7d44392faded88e10ec9", + "picard_wgs_metrics_histogram_Counts_Histogram.txt:md5,681e302aec63d9b5fa8966ee8ee2373a", + "picard_wgs_metrics_histogram_Percentage_Drop-Off.txt:md5,b37badd0338d073b2557c2492c472280", + "samtools-coverage-table.txt:md5,0f9fe2b460eb659d5ce23deba4ee62d8", + "samtools-coverage_BQ.txt:md5,68b97b7434bd35c71d3d14de478ba1b9", + "samtools-coverage_Bases.txt:md5,f8fcf650945e7b347409d678fae3b006", + "samtools-coverage_Coverage.txt:md5,bc62f359fced9778f869022dd4ab6647", + "samtools-coverage_MQ.txt:md5,5f9ece387a8e160cedbb02874c46000b", + "samtools-coverage_Mean_depth.txt:md5,4d5f58688b4c653b617c709717475c25", + "samtools-coverage_Reads.txt:md5,3667b340251346e538e6f078adcec945", + "samtools-flagstat-pct-table.txt:md5,8b0e71fcfbb55f6e8b0e6949fb146e0c", + "samtools-flagstat-table.txt:md5,6203dc05b5eaee4f529300986aebbb3c", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", + "samtools-idxstats-mapped-reads-plot_Raw_Counts.txt:md5,e8f2b29a779d322cd56b00f4958ef841", + "samtools-stats-dp.txt:md5,07153313edc4f7a3754e9821c85ca0cf", + "samtools_alignment_plot.txt:md5,d60abeeecbb005aff19c12f19a726057" + ] ], - "multiqc_plots": [ - "multiqc_plots" + "multiqc_library_plots": [ + [ + [ + "biobambam2_deduplication-cnt.pdf:md5,076943b1c590633eede4b60e8aa2434c", + "biobambam2_deduplication-pct.pdf:md5,32d4caca75efe889205de73e3a0a4d97", + "fastp-insert-size-plot.pdf:md5,f1023409a45dc9d8a0931659b0dc697d", + "fastp-seq-content-gc-plot_Read_1_After_filtering.pdf:md5,acbf529d4de4de437a3b71ef99d27698", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.pdf:md5,04621f82d0b3f8d97bf99b8d59b9988e", + "fastp-seq-content-gc-plot_Read_2_After_filtering.pdf:md5,9e23be66eacb942bd55f0459836bc111", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.pdf:md5,93b6b5bda685f45fb8c81747d0bccd7f", + "fastp-seq-content-n-plot_Read_1_After_filtering.pdf:md5,a8c81efa4e85a5258b6c8930d5543c3d", + "fastp-seq-content-n-plot_Read_1_Before_filtering.pdf:md5,5fe572924ab5149f71f9c33a3aa2ef26", + "fastp-seq-content-n-plot_Read_2_After_filtering.pdf:md5,6332b41f6963f9c9a0ef57e307cd636c", + "fastp-seq-content-n-plot_Read_2_Before_filtering.pdf:md5,25511034f06bb9c2d1ba499568285338", + "fastp-seq-quality-plot_Read_1_After_filtering.pdf:md5,a5d9dbd669760bd35cabff4a957c72e0", + "fastp-seq-quality-plot_Read_1_Before_filtering.pdf:md5,5d8a4222b4d43f2383759d6612faf1af", + "fastp-seq-quality-plot_Read_2_After_filtering.pdf:md5,5eaaa59e813d0b5e86c833fa7030fa63", + "fastp-seq-quality-plot_Read_2_Before_filtering.pdf:md5,8386c931c7b0ccd2f1fda5caa10d4612", + "fastp_filtered_reads_plot-cnt.pdf:md5,07f08edd555887949d5732358c2adf56", + "fastp_filtered_reads_plot-pct.pdf:md5,25516919ae1120b1e05ad36a296ae49e", + "mosdepth-coverage-per-contig-single-cnt.pdf:md5,e31c2589a014aa1e1e6ac997119ad675", + "mosdepth-coverage-per-contig-single-pct.pdf:md5,6435a5fe0f4b51d95e6a4b6acdd2f3d5", + "mosdepth-cumcoverage-dist-id.pdf:md5,5d4af4029371ddba1ed19ed38f88c8f2", + "picard_alignment_readlength_plot.pdf:md5,aa1f2ae479ecae2c3ab65cf265987258", + "picard_alignment_summary_Aligned_Bases-cnt.pdf:md5,13b9efa703cde16499f597103e511ce9", + "picard_alignment_summary_Aligned_Bases-pct.pdf:md5,5d53049cb3bfe99985fbf840095b960f", + "picard_alignment_summary_Aligned_Reads-cnt.pdf:md5,89bd672088e27c155cf2d5a06f8b03b4", + "picard_alignment_summary_Aligned_Reads-pct.pdf:md5,ea3c23c71d88ceba0cb38629cb5ed9bd", + "picard_base_distribution_by_cycle__Adenine.pdf:md5,0305b7ed8db6442e58f6df0939aae0c2", + "picard_base_distribution_by_cycle__Cytosine.pdf:md5,9fc115666272868eea3201b4ad329e6f", + "picard_base_distribution_by_cycle__Guanine.pdf:md5,ea999ac900f032148ef8dc8311fbaf21", + "picard_base_distribution_by_cycle__Thymine.pdf:md5,75fee9ea401481bd3a89d2e9dbc93b64", + "picard_base_distribution_by_cycle__Undetermined.pdf:md5,5084d6ea1d038c2ad803ee61ea3d4beb", + "picard_quality_by_cycle.pdf:md5,d46426fb7f451c50f7ea3900fbee909c", + "picard_quality_score_distribution.pdf:md5,c4bace227e4be936499b16d8b791c4d2", + "picard_wgs_metrics_bases.pdf:md5,8f385b4242b2839521d355da67d1601c", + "picard_wgs_metrics_histogram_Counts_Histogram.pdf:md5,6d1fd94aab4dae5f06f9ab2fd18a2d14", + "picard_wgs_metrics_histogram_Percentage_Drop-Off.pdf:md5,2973a0bd94ce539443fe3f144d60a57d", + "samtools-coverage-table.pdf:md5,43f6c1db01c3d6e0cbeb598d8462c3bb", + "samtools-coverage_BQ-cnt.pdf:md5,a0e08adcfcf5963508675e5f73f3ddc4", + "samtools-coverage_BQ-log.pdf:md5,7cfa56d3008e2cbdd5ac1e6dd01a0da5", + "samtools-coverage_Bases-cnt.pdf:md5,fe22f1634930da794d44c425cd3f9f75", + "samtools-coverage_Bases-log.pdf:md5,a91260f7858bb59b05994a60c98b3d09", + "samtools-coverage_Coverage-cnt.pdf:md5,28224f499e3b6101c2996159f75e52b6", + "samtools-coverage_Coverage-log.pdf:md5,d24bb4c34863c442d9081d8c8c2ec92a", + "samtools-coverage_MQ-cnt.pdf:md5,be7f66cb438e5857125034f8308f1a9d", + "samtools-coverage_MQ-log.pdf:md5,0e67e1921c296fa19c8fc5b5b2808a4d", + "samtools-coverage_Mean_depth-cnt.pdf:md5,2422e0664ff8f9e22a64e9f60c29dc01", + "samtools-coverage_Mean_depth-log.pdf:md5,ccb6cda145cf3e19266e2de300bf5107", + "samtools-coverage_Reads-cnt.pdf:md5,be0940f017942fd1ea7eb3b7472e78a9", + "samtools-coverage_Reads-log.pdf:md5,147469231619cf8c5a1bcbfedd1536f9", + "samtools-flagstat-pct-table.pdf:md5,4da35ccf697cab3209ff58e65ea22985", + "samtools-flagstat-table.pdf:md5,ecf1cd68a33e2ffacd09bc26acd78c4f", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.pdf:md5,564d74b6292e8e644e80ebbc4f36cbe3", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.pdf:md5,008360a325c47b0eba81acf03f486221", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.pdf:md5,7e7b33224bcf3053b9f074c70d0e4342", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.pdf:md5,9f8fc3a6ff912245f7a3c5189bf9fcb1", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.pdf:md5,f4d9ff73a8b429e998c0fcbc143c468e", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.pdf:md5,eccf04a5b6928eaf4306b7404f2fd945", + "samtools-stats-dp.pdf:md5,022199feb31379c5b5fb74ee031d8697", + "samtools_alignment_plot-cnt.pdf:md5,889e13551f5a50465e5046bd101e8647", + "samtools_alignment_plot-pct.pdf:md5,d66282dbb006fcae5f4c582f7892ca43" + ], + [ + "biobambam2_deduplication-cnt.png:md5,5707c3cf44cff88666c3c7b4970ab021", + "biobambam2_deduplication-pct.png:md5,b2a0fece791ff0532a426f3faeecf3f4", + "fastp-insert-size-plot.png:md5,40a7c7edc7062c92d088e8974dd1fbe9", + "fastp-seq-content-gc-plot_Read_1_After_filtering.png:md5,ff993de7c7a0b2f4dd17aaf509c8209b", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.png:md5,124351c45a1bd7d611fd3ba89510018b", + "fastp-seq-content-gc-plot_Read_2_After_filtering.png:md5,058842506a3200770c46a4a70b64ce48", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.png:md5,985bf206443edf1417e2a0f9354abe3c", + "fastp-seq-content-n-plot_Read_1_After_filtering.png:md5,7855b3938c2b48578b2e1ca3486783de", + "fastp-seq-content-n-plot_Read_1_Before_filtering.png:md5,b9276b3bd8f2c57a51d12f76273fc322", + "fastp-seq-content-n-plot_Read_2_After_filtering.png:md5,45684fe478e5d2912848c032c3bc8ee4", + "fastp-seq-content-n-plot_Read_2_Before_filtering.png:md5,97606f1910cdbb47f68d5b7ac9f9bf4b", + "fastp-seq-quality-plot_Read_1_After_filtering.png:md5,44fe9279b3f2279c19d2ce541b9c6c19", + "fastp-seq-quality-plot_Read_1_Before_filtering.png:md5,93c06663d6ed02d11f4e5eab97d48917", + "fastp-seq-quality-plot_Read_2_After_filtering.png:md5,99219cc1b64c80e6ac8cf653add1990c", + "fastp-seq-quality-plot_Read_2_Before_filtering.png:md5,5d655406be9a2ff9a68ec461f51cfcc5", + "fastp_filtered_reads_plot-cnt.png:md5,75911dd91d24adfaae185ebcf0a8455a", + "fastp_filtered_reads_plot-pct.png:md5,4b3c0fd7f90c7c83b50c557d4aa3b6a5", + "mosdepth-coverage-per-contig-single-cnt.png:md5,4d6f6bf53791c7438153194cf5c28b58", + "mosdepth-coverage-per-contig-single-pct.png:md5,8f17612654e4217dd673c2788b473e7c", + "mosdepth-cumcoverage-dist-id.png:md5,9a1b83a02f39658f5896ed4b665f7327", + "picard_alignment_readlength_plot.png:md5,7c5708c6ed659731111242666746905e", + "picard_alignment_summary_Aligned_Bases-cnt.png:md5,ccd4cdf7a4b1f3f2a39adf2e0c700ed4", + "picard_alignment_summary_Aligned_Bases-pct.png:md5,de5771f0fc6d2feaf7ea1bef7b4f57ed", + "picard_alignment_summary_Aligned_Reads-cnt.png:md5,fa8f7e289fd84f0dfb877758b926c421", + "picard_alignment_summary_Aligned_Reads-pct.png:md5,18be469adf5d34e7296aa9e0feb10274", + "picard_base_distribution_by_cycle__Adenine.png:md5,b59076e9793e4a403228c477f99c6cf8", + "picard_base_distribution_by_cycle__Cytosine.png:md5,7c42741dd1ee386af449d29e21a8389d", + "picard_base_distribution_by_cycle__Guanine.png:md5,27a487a8587c180f08d3afb58e71fb17", + "picard_base_distribution_by_cycle__Thymine.png:md5,f99b137a9975db372a29c0400652eca4", + "picard_base_distribution_by_cycle__Undetermined.png:md5,e7428923e6530f7bd00ca05bf2b0dabe", + "picard_quality_by_cycle.png:md5,23c7dc421bf1a8b9c61e7abdea1b96e9", + "picard_quality_score_distribution.png:md5,f129878e0583e69cac53ec51cac62f4e", + "picard_wgs_metrics_bases.png:md5,6ae01c3c3e7a7f6bac5dd44e0e29dd6a", + "picard_wgs_metrics_histogram_Counts_Histogram.png:md5,cfd66c498f788418c650ec052c12c737", + "picard_wgs_metrics_histogram_Percentage_Drop-Off.png:md5,2b050e4750a49c843e8fd8a1c2e01424", + "samtools-coverage-table.png:md5,ffc0a23dcfe8a1b44e7c585898a412ba", + "samtools-coverage_BQ-cnt.png:md5,42a7bfacd302c7924d59701a585957f8", + "samtools-coverage_BQ-log.png:md5,67d6d4c8072743a32dfa30dd22edd5fe", + "samtools-coverage_Bases-cnt.png:md5,8790b6226f16810deceb82c6834b21be", + "samtools-coverage_Bases-log.png:md5,7bdd54947c3ab74d06b9fc11cc35cb51", + "samtools-coverage_Coverage-cnt.png:md5,cdff6829f5d017e67668e6b77b8648fd", + "samtools-coverage_Coverage-log.png:md5,13441e809c66563bf7284ebe4038f368", + "samtools-coverage_MQ-cnt.png:md5,59265e8998386d8a6521296508b4f4e6", + "samtools-coverage_MQ-log.png:md5,0282c8f2fb311eb3830f6d33a8e0d2ef", + "samtools-coverage_Mean_depth-cnt.png:md5,7f0aa59d888da55c8b7e5ca00011b2fc", + "samtools-coverage_Mean_depth-log.png:md5,ab01268969d553decb36658ca785dac0", + "samtools-coverage_Reads-cnt.png:md5,f77fe84d95f5bebd12aa764ab377b6e7", + "samtools-coverage_Reads-log.png:md5,34d3ebbc83f073531328d633466cfcd9", + "samtools-flagstat-pct-table.png:md5,30a84ce2464168d8dedf65b47725e2e1", + "samtools-flagstat-table.png:md5,a828ba0e94ebd04d2ac50ecc43b007fd", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.png:md5,91267791bafff119d985db6b24f813dc", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.png:md5,d1c9fd2633128ed5af7113cedeba91d8", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.png:md5,eb81f43f6c5778f957ce85137758235e", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.png:md5,b1b15467c4b7e34b2a724c2fe9daefa8", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.png:md5,64927987623ac1715e607470f6bf055a", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.png:md5,09773cf98a65a96710a4fac9e2600ed9", + "samtools-stats-dp.png:md5,fe29585e232244237558512103d78fdc", + "samtools_alignment_plot-cnt.png:md5,e5523404a7622df41efaf24fb98ef4c5", + "samtools_alignment_plot-pct.png:md5,7945231e29b09915dee17a9fa620ef62" + ], + [ + "biobambam2_deduplication-cnt.svg:md5,cfd25e0ac46d01b09f2196fc10487a97", + "biobambam2_deduplication-pct.svg:md5,c7ed58b8de114475f6ef551cc38246b6", + "fastp-insert-size-plot.svg:md5,463e2ebba19326fc07286ec96074439c", + "fastp-seq-content-gc-plot_Read_1_After_filtering.svg:md5,df2eff4d156ad7f187fa80e3340cbc9c", + "fastp-seq-content-gc-plot_Read_1_Before_filtering.svg:md5,de22f2c91d8abe074f24aada92336dae", + "fastp-seq-content-gc-plot_Read_2_After_filtering.svg:md5,c1119ba28aa972dcde0725e9ece9b452", + "fastp-seq-content-gc-plot_Read_2_Before_filtering.svg:md5,bf51d5e029164a62af8a97002bafaf91", + "fastp-seq-content-n-plot_Read_1_After_filtering.svg:md5,1cd1bb467239c3375c0670deb40910e4", + "fastp-seq-content-n-plot_Read_1_Before_filtering.svg:md5,58312bc31b5df1f981ddfaa464747d6a", + "fastp-seq-content-n-plot_Read_2_After_filtering.svg:md5,4b4d0bb5ee8e778e36d0b22b50e588ac", + "fastp-seq-content-n-plot_Read_2_Before_filtering.svg:md5,5a4346d963e57ef9dc93049473b299d4", + "fastp-seq-quality-plot_Read_1_After_filtering.svg:md5,8df1ad718fba86d1dc9100f686805969", + "fastp-seq-quality-plot_Read_1_Before_filtering.svg:md5,2ab2d86c525286641d2add385a2776b8", + "fastp-seq-quality-plot_Read_2_After_filtering.svg:md5,57fc98afa287a7efcb4cda584aaa1b03", + "fastp-seq-quality-plot_Read_2_Before_filtering.svg:md5,0255426c3f1eb52d8cc79e15becc30a2", + "fastp_filtered_reads_plot-cnt.svg:md5,e824977b86925e3f373258ecdd4043e3", + "fastp_filtered_reads_plot-pct.svg:md5,481a650cbb8337fd7324909c08782fbb", + "mosdepth-coverage-per-contig-single-cnt.svg:md5,54a9e9adab8aec8840883d8fbfd9a5d0", + "mosdepth-coverage-per-contig-single-pct.svg:md5,131d4cac8f19f0b95032c7233af5823e", + "mosdepth-cumcoverage-dist-id.svg:md5,179007d2d118f6a8e418e43aeaeb9c59", + "picard_alignment_readlength_plot.svg:md5,8251fdfdcf8d1cfcafa2c5e4274b5dd1", + "picard_alignment_summary_Aligned_Bases-cnt.svg:md5,fd201a6cf172881e6f665f3bf709e47d", + "picard_alignment_summary_Aligned_Bases-pct.svg:md5,000fee385374691cee56da73f6b1a6e3", + "picard_alignment_summary_Aligned_Reads-cnt.svg:md5,2dab47d583abe346da10f9cc7326afcf", + "picard_alignment_summary_Aligned_Reads-pct.svg:md5,d4a37067193df967815f12979b3af04c", + "picard_base_distribution_by_cycle__Adenine.svg:md5,218b08544c23a6efa4658d7f3752e104", + "picard_base_distribution_by_cycle__Cytosine.svg:md5,ab5e2bc1042bb94494552650de3f5572", + "picard_base_distribution_by_cycle__Guanine.svg:md5,b55b38dd248d4bb58d45727640b08bdb", + "picard_base_distribution_by_cycle__Thymine.svg:md5,3207e557593827437917773a6d7a3076", + "picard_base_distribution_by_cycle__Undetermined.svg:md5,ce646cb1a14cf74c5d07cd95ea3ea6fa", + "picard_quality_by_cycle.svg:md5,8d09b50d5323d7d08e78694e2b4f5783", + "picard_quality_score_distribution.svg:md5,252451413c9a1305642aeca9540fe95b", + "picard_wgs_metrics_bases.svg:md5,2433b911e40ebe4bf49fabfdd473f488", + "picard_wgs_metrics_histogram_Counts_Histogram.svg:md5,90789c6587b1924a203de3ea67051e1d", + "picard_wgs_metrics_histogram_Percentage_Drop-Off.svg:md5,57bf92e2f97b6698a78761e9133d696d", + "samtools-coverage-table.svg:md5,dc9a03bbcdc8e6c85ecdcbc473c284e5", + "samtools-coverage_BQ-cnt.svg:md5,3bf9dd0ff0afb7dac4e82c3cc0debee6", + "samtools-coverage_BQ-log.svg:md5,3503b4d291a6bc5f13321ea35367173c", + "samtools-coverage_Bases-cnt.svg:md5,1da43ab7b821f0950bc5fcd9d0ef4de6", + "samtools-coverage_Bases-log.svg:md5,5d6d1e30f71dc901bc854891f8a86c8b", + "samtools-coverage_Coverage-cnt.svg:md5,bd068ea990b4a9ab34f8ed7906ab4df7", + "samtools-coverage_Coverage-log.svg:md5,a84dbdcc47032a0802f0f4303fff79e5", + "samtools-coverage_MQ-cnt.svg:md5,a34d1b3ef3307b7f239f345c4c46417c", + "samtools-coverage_MQ-log.svg:md5,f0d92ed6064fe3857222add705200ebf", + "samtools-coverage_Mean_depth-cnt.svg:md5,beb5c52e77b588aff06211996b5c9c58", + "samtools-coverage_Mean_depth-log.svg:md5,bf0fe9b38385d501bfdc0eb8ae32dc0c", + "samtools-coverage_Reads-cnt.svg:md5,a0f29b2d300f8d441cf0444dfed15d2c", + "samtools-coverage_Reads-log.svg:md5,2b286ec78f439cc836c27b894355a649", + "samtools-flagstat-pct-table.svg:md5,a861423dc06a2c4343ac008da572cae6", + "samtools-flagstat-table.svg:md5,7e3929334dc02949b8a8624cee0b74f7", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.svg:md5,6beb4644520950ba9d88aa2fc76f97ca", + "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.svg:md5,bdd312d3b7078cf983b55365b073c8da", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.svg:md5,cacd164220e021555bfab9d77d1604d6", + "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.svg:md5,a0afc475e749152c8a1f68348e126468", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.svg:md5,70ee0003a9ad53ef889f8b1e6ab29fbd", + "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.svg:md5,10677c752400f74cb2d80b448a7ecb6e", + "samtools-stats-dp.svg:md5,7a82a092680d0a2f74bc6bd7ddaff3ff", + "samtools_alignment_plot-cnt.svg:md5,57bf2b3f8ae396795a58e41c6a13eaad", + "samtools_alignment_plot-pct.svg:md5,11319f379dfc395ae27e63e58911a7dc" + ] + ] + ], + "multiqc_library_report": [ + "multiqc_library_test.html:md5,39501e6d3e661aa5268cc7bc3013842e" + ], + "multiqc_main_data": [ + [ + [ + "llms-full.txt:md5,5c2ab84efb61df9527a502df6d502f6b", + "multiqc.log:md5,b1c042eb498add3a6e44b5b1198a11a3", + "multiqc.parquet:md5,38b4675edf61dc905c4e5001dc8dcde1", + "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", + "multiqc_data.json:md5,3372e515c6d7aee673f28f47c22507ba", + "multiqc_software_versions.txt:md5,b957e99d3c8616d8a0326be3f6114ced", + "multiqc_sources.txt:md5,d2a044df39ce3c6abe5cdc2d67473490" + ] + ] + ], + "multiqc_main_plots": [ + [ + + ] ], - "multiqc_report": [ + "multiqc_main_report": [ [ - "multiqc_report.html" + "multiqc.html:md5,62160777bc781484c4e2434e8c6009ff" ] ], "panelcoverage": [ @@ -1284,6 +2016,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "sample_type": "DNA", "samplename": "sample1", @@ -1314,6 +2047,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "sample_type": "DNA", "samplename": "sample1", @@ -1344,6 +2078,7 @@ "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, "id": "sample1", + "library": "test", "organism": "Homo sapiens", "sample_type": "DNA", "samplename": "sample1", @@ -1360,6 +2095,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1385,6 +2121,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1410,6 +2147,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1435,6 +2173,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1460,6 +2199,7 @@ "groupSize": 1, "groupTarget": { "samplename": "sample1", + "library": "test", "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", @@ -1502,6 +2242,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T13:10:35.894317" + "timestamp": "2025-12-04T19:51:58.967318" } } \ No newline at end of file From 00bcfcb60ff3166b586bba44a2556eb8314db370 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 20:01:04 +0100 Subject: [PATCH 089/202] fix linting --- modules.json | 130 +++++++-------------------- modules/nf-core/multiqc/multiqc.diff | 8 +- 2 files changed, 36 insertions(+), 102 deletions(-) diff --git a/modules.json b/modules.json index de8e0ac9..cbebbe1e 100644 --- a/modules.json +++ b/modules.json @@ -8,207 +8,151 @@ "bcl2fastq": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": [ - "bcl_demultiplex" - ] + "installed_by": ["bcl_demultiplex"] }, "bclconvert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "bcl_demultiplex", - "modules" - ], + "installed_by": ["bcl_demultiplex", "modules"], "patch": "modules/nf-core/bclconvert/bclconvert.diff" }, "biobambam/bamsormadup": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff" }, "bowtie2/align": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "fastq_align_dna", - "modules" - ], + "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/bowtie2/align/bowtie2-align.diff" }, "bwa/mem": { "branch": "master", "git_sha": "1c46359c837ef768b004519f535c30378e8289fc", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwa/mem/bwa-mem.diff" }, "bwamem2/mem": { "branch": "master", "git_sha": "d86336f3e7ae0d5f76c67b0859409769cfeb2af2", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, "dragmap/align": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, "fastp": { "branch": "master", "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "md5sum": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "mosdepth": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/mosdepth/mosdepth.diff" }, "multiqc": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/multiqc/multiqc.diff" }, "picard/collecthsmetrics": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff" }, "picard/collectmultiplemetrics": { "branch": "master", "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff" }, "picard/collectwgsmetrics": { "branch": "master", "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, "samtools/cat": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/cat/samtools-cat.diff" }, "samtools/convert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/convert/samtools-convert.diff" }, "samtools/coverage": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, "samtools/flagstat": { "branch": "master", "git_sha": "e334e12a1e985adc5ffc3fc78a68be1de711de45", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/idxstats": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/import": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sormadup": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sormadup/samtools-sormadup.diff" }, "samtools/sort": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "samtools/stats": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/stats/samtools-stats.diff" }, "snapaligner/align": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "fastq_align_dna", - "modules" - ], + "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/snapaligner/align/snapaligner-align.diff" }, "star/align": { "branch": "master", "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" }, "strobealign": { "branch": "master", "git_sha": "d5cc72b63c4e1565cb66e83f0577b04c0bb54d5c", - "installed_by": [ - "fastq_align_dna", - "modules" - ], + "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/strobealign/strobealign.diff" } } @@ -218,40 +162,30 @@ "bcl_demultiplex": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "fastq_align_dna": { "branch": "master", "git_sha": "070ddae7fb59384d3d85bf69eb9a1d71ab33ada9", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "df4d1c8cdee98a1bbbed8fc51e82296568e0f9c1", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} diff --git a/modules/nf-core/multiqc/multiqc.diff b/modules/nf-core/multiqc/multiqc.diff index 36396fa5..73a5eb45 100644 --- a/modules/nf-core/multiqc/multiqc.diff +++ b/modules/nf-core/multiqc/multiqc.diff @@ -1,4 +1,6 @@ Changes in component 'nf-core/multiqc' +'modules/nf-core/multiqc/environment.yml' is unchanged +'modules/nf-core/multiqc/meta.yml' is unchanged Changes in 'multiqc/main.nf': --- modules/nf-core/multiqc/main.nf +++ modules/nf-core/multiqc/main.nf @@ -27,10 +29,8 @@ Changes in 'multiqc/main.nf': when: task.ext.when == null || task.ext.when -'modules/nf-core/multiqc/environment.yml' is unchanged -'modules/nf-core/multiqc/meta.yml' is unchanged -'modules/nf-core/multiqc/tests/custom_prefix.config' is unchanged -'modules/nf-core/multiqc/tests/main.nf.test' is unchanged 'modules/nf-core/multiqc/tests/main.nf.test.snap' is unchanged 'modules/nf-core/multiqc/tests/nextflow.config' is unchanged +'modules/nf-core/multiqc/tests/main.nf.test' is unchanged +'modules/nf-core/multiqc/tests/custom_prefix.config' is unchanged ************************************************************ From e917d7fdc21c479de687536920146f7660804426 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 20:43:05 +0100 Subject: [PATCH 090/202] fix more tests --- tests/workflows/preprocessing.nf.test | 27 +- tests/workflows/preprocessing.nf.test.snap | 690 +-------------------- 2 files changed, 36 insertions(+), 681 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index 2f1c5e4c..54a187ec 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -58,9 +58,12 @@ nextflow_workflow { assert workflow.success assert snapshot( sanitizeOutput(workflow.out, unstableKeys:[ - "multiqc_report", - "multiqc_plots", - "multiqc_data", + "multiqc_main_report", + "multiqc_main_data", + "multiqc_main_plots", + "multiqc_library_report", + "multiqc_library_data", + "multiqc_library_plots", "md5sums", "fastp_html", "crams", @@ -124,9 +127,12 @@ nextflow_workflow { assert workflow.success assert snapshot( sanitizeOutput(workflow.out, unstableKeys:[ - "multiqc_report", - "multiqc_plots", - "multiqc_data", + "multiqc_main_report", + "multiqc_main_data", + "multiqc_main_plots", + "multiqc_library_report", + "multiqc_library_data", + "multiqc_library_plots", "md5sums", "fastp_html", "crams", @@ -193,9 +199,12 @@ nextflow_workflow { assert workflow.success assert snapshot( sanitizeOutput(workflow.out, unstableKeys:[ - "multiqc_report", - "multiqc_plots", - "multiqc_data", + "multiqc_main_report", + "multiqc_main_data", + "multiqc_main_plots", + "multiqc_library_report", + "multiqc_library_data", + "multiqc_library_plots", "md5sums", "fastp_html", "crams", diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 961504d8..4a0b52f8 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -388,275 +388,17 @@ ], "multiqc_library_data": [ - [ - "biobambam2_deduplication.txt:md5,992b5decb6d017254ee9b02fbe076d81", - "fastp-insert-size-plot.txt:md5,66fec5f01198da8ecd97410ec1727021", - "fastp-seq-content-gc-plot_Read_1_After_filtering.txt:md5,23420affa90c1523becba23c09653a92", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.txt:md5,27bb3440b4edeab8a9dc2ec1077cfc0e", - "fastp-seq-content-gc-plot_Read_2_After_filtering.txt:md5,e49276ebe93bb8294ca51e6a0916e703", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.txt:md5,f7bf2354433b3514893f0fe18e7f7877", - "fastp-seq-content-n-plot_Read_1_After_filtering.txt:md5,6c20997febd11ea6c80fe13a1761898b", - "fastp-seq-content-n-plot_Read_1_Before_filtering.txt:md5,a1d1cdbb1a1fb48b6d6bdf1f2192b2b7", - "fastp-seq-content-n-plot_Read_2_After_filtering.txt:md5,e1d8dcf05d785f863cfb17c96c1f58a4", - "fastp-seq-content-n-plot_Read_2_Before_filtering.txt:md5,30bfcca763531e4ee1638031d5359e48", - "fastp-seq-quality-plot_Read_1_After_filtering.txt:md5,2b0a42468f68992639ac8eacbf533134", - "fastp-seq-quality-plot_Read_1_Before_filtering.txt:md5,4e6fea487fecc2ee55db1518ff30a0b5", - "fastp-seq-quality-plot_Read_2_After_filtering.txt:md5,72a6d8295748db4de13d6dc1d1eb83dc", - "fastp-seq-quality-plot_Read_2_Before_filtering.txt:md5,3b1c7675660e838e75d1d5c62c0f3a61", - "fastp_filtered_reads_plot.txt:md5,9e506f1c8dbad71540697d11af4ba6df", - "llms-full.txt:md5,a9dd5cb0ccb6d732ac915af862770693", - "mosdepth-coverage-per-contig-single.txt:md5,e5dd72804ecbe8429179eaae01118d39", - "mosdepth-cumcoverage-dist-id.txt:md5,49f3ec6d8639c9b0f794e4bf96bd11c4", - "mosdepth_cov_dist.txt:md5,704ae312ab6109b1724e3fac0dc740ed", - "mosdepth_cumcov_dist.txt:md5,704ae312ab6109b1724e3fac0dc740ed", - "mosdepth_perchrom.txt:md5,e5dd72804ecbe8429179eaae01118d39", - "multiqc.log:md5,0bf142cd568af28e39f166591e28b550", - "multiqc.parquet:md5,c66e2b2f6ba202acf3cda2ebbd7b2a06", - "multiqc_biobambam2_dups.txt:md5,31c942ce8964d0941cb79f8c9de8aa04", - "multiqc_citations.txt:md5,294fadee817c59c64f1b985ac204b224", - "multiqc_data.json:md5,0c06c19b2156369fab669049b6e37eb5", - "multiqc_fastp.txt:md5,f917618024634bb24850390c8f4836e7", - "multiqc_general_stats.txt:md5,439ff0539fa18ba86b79e990c42dff75", - "multiqc_picard_AlignmentSummaryMetrics.txt:md5,3f32124a666ad5fa6dda93759cf450f0", - "multiqc_picard_HsMetrics.txt:md5,a5ccd0c64f6e2944a559280aaabce595", - "multiqc_picard_baseContent.txt:md5,deba2098af2de348792a37b405eab78c", - "multiqc_picard_quality_by_cycle.txt:md5,eca76b6ed78d34d66e1e185c7158868f", - "multiqc_picard_quality_score_distribution.txt:md5,6ec87b3288ada8fb9456a3cd1e801514", - "multiqc_samtools_coverage.txt:md5,2b8ac198265a850d581d453eacb402cd", - "multiqc_samtools_flagstat.txt:md5,5ce133683245100011b77cd676471de1", - "multiqc_samtools_idxstats.txt:md5,7e542f20dd27d352b5d2be33e1920220", - "multiqc_samtools_stats.txt:md5,1dd571a033605b1224ebac95deceee0b", - "multiqc_sources.txt:md5,26011ccef291bca153e14a43437b4bbc", - "picard_MarkIlluminaAdapters_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "picard_MeanQualityByCycle_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "picard_MeanQualityByCycle_histogram_1.txt:md5,eca76b6ed78d34d66e1e185c7158868f", - "picard_QualityScoreDistribution_histogram.txt:md5,6ec87b3288ada8fb9456a3cd1e801514", - "picard_alignment_readlength_plot.txt:md5,891edbc18f01189de8c5bf52320ee6c7", - "picard_alignment_summary_Aligned_Bases.txt:md5,7d13622d8d4083fe2a4be5bf92ea77e6", - "picard_alignment_summary_Aligned_Reads.txt:md5,ed831c3df4e4465d9c6fb52ce731ee71", - "picard_base_distribution_by_cycle__Adenine.txt:md5,989b9c396dfa032d8ca02f57b7cc6e7d", - "picard_base_distribution_by_cycle__Cytosine.txt:md5,dc7b79f9ab4bc66db25b509e423abf2b", - "picard_base_distribution_by_cycle__Guanine.txt:md5,1f2a16426851c0e434558d437ac482e3", - "picard_base_distribution_by_cycle__Thymine.txt:md5,cbc90b7275fa29bf09d4be71fc443df1", - "picard_base_distribution_by_cycle__Undetermined.txt:md5,e0a643aff9cf4b0d277c4da6c798c6dc", - "picard_hsmetrics_table.txt:md5,a170b91563f01fc311048a9f1983ac87", - "picard_percentage_target_bases.txt:md5,f29ba29d0df56128046793ff26ca5950", - "picard_quality_by_cycle.txt:md5,f89d83da6f5a7fa00511a8959c2bd3c2", - "picard_quality_score_distribution.txt:md5,9d72562e154dba19a69180e2875ae8e9", - "samtools-coverage-table.txt:md5,0f9fe2b460eb659d5ce23deba4ee62d8", - "samtools-coverage_BQ.txt:md5,68b97b7434bd35c71d3d14de478ba1b9", - "samtools-coverage_Bases.txt:md5,f8fcf650945e7b347409d678fae3b006", - "samtools-coverage_Coverage.txt:md5,bc62f359fced9778f869022dd4ab6647", - "samtools-coverage_MQ.txt:md5,5f9ece387a8e160cedbb02874c46000b", - "samtools-coverage_Mean_depth.txt:md5,4d5f58688b4c653b617c709717475c25", - "samtools-coverage_Reads.txt:md5,3667b340251346e538e6f078adcec945", - "samtools-flagstat-pct-table.txt:md5,8b0e71fcfbb55f6e8b0e6949fb146e0c", - "samtools-flagstat-table.txt:md5,6203dc05b5eaee4f529300986aebbb3c", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", - "samtools-idxstats-mapped-reads-plot_Raw_Counts.txt:md5,e8f2b29a779d322cd56b00f4958ef841", - "samtools-stats-dp.txt:md5,07153313edc4f7a3754e9821c85ca0cf", - "samtools_alignment_plot.txt:md5,d60abeeecbb005aff19c12f19a726057" - ] + "multiqc_library_test_data" ], "multiqc_library_plots": [ - [ - [ - "biobambam2_deduplication-cnt.pdf:md5,8dcf3c25c3a6d362a312683b0cc52254", - "biobambam2_deduplication-pct.pdf:md5,f38a15e73459aefdbf92f53a602eecab", - "fastp-insert-size-plot.pdf:md5,761cc56448ee9500fadf80330b6e6c18", - "fastp-seq-content-gc-plot_Read_1_After_filtering.pdf:md5,e4ba12f4f0c3961dfe7343a420210f74", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.pdf:md5,cbf4e5d5cd4bccc836ef8a4b00789608", - "fastp-seq-content-gc-plot_Read_2_After_filtering.pdf:md5,5c452cc418222a26b85bf2779ccc0e5f", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.pdf:md5,148e583db6040c29d07ae06ade0aae37", - "fastp-seq-content-n-plot_Read_1_After_filtering.pdf:md5,fdda12e04eceaabad0260e7694ca1a47", - "fastp-seq-content-n-plot_Read_1_Before_filtering.pdf:md5,f2d6ba7286870d31dbcdfdc501fa0fe4", - "fastp-seq-content-n-plot_Read_2_After_filtering.pdf:md5,7fc668801cd69b020c5f0dcb7ab780f4", - "fastp-seq-content-n-plot_Read_2_Before_filtering.pdf:md5,9c21674378164f3bd7010aedaf9f9c62", - "fastp-seq-quality-plot_Read_1_After_filtering.pdf:md5,8d69018e6c7babd707ed91a30a2f4373", - "fastp-seq-quality-plot_Read_1_Before_filtering.pdf:md5,1c14e7b644546b647e1525b0035d7095", - "fastp-seq-quality-plot_Read_2_After_filtering.pdf:md5,d30a990dc6d11a33b3a0bd385b7e2765", - "fastp-seq-quality-plot_Read_2_Before_filtering.pdf:md5,569074e2210e477a45c1196d967e0e03", - "fastp_filtered_reads_plot-cnt.pdf:md5,1572b3a72a231623c8ae927b4cb7a0ae", - "fastp_filtered_reads_plot-pct.pdf:md5,d3a4c1a1372f7b914ae6dac6b0b117aa", - "mosdepth-coverage-per-contig-single-cnt.pdf:md5,b532e220dbd44f1b5bccae17f3a423da", - "mosdepth-coverage-per-contig-single-pct.pdf:md5,eb539598e0da9e9c0f16033ff345594b", - "mosdepth-cumcoverage-dist-id.pdf:md5,017ca25a754de8ad1e59bb8e5f9384a9", - "picard_alignment_readlength_plot.pdf:md5,0f360805d8f8d8aeacf3aaae1dc6eb06", - "picard_alignment_summary_Aligned_Bases-cnt.pdf:md5,e0e630f9c98be95f6b26b895721925ca", - "picard_alignment_summary_Aligned_Bases-pct.pdf:md5,0afa444f1854208d7252dfd45c06a000", - "picard_alignment_summary_Aligned_Reads-cnt.pdf:md5,0419bd8fcd699e40575e7c1619937b3e", - "picard_alignment_summary_Aligned_Reads-pct.pdf:md5,aa9bb7e84867a2bd953756a95bc0f311", - "picard_base_distribution_by_cycle__Adenine.pdf:md5,e5a1c8fd676d7267bf0e16baff152f96", - "picard_base_distribution_by_cycle__Cytosine.pdf:md5,8093c223e5fc64be9db36341ee801a6a", - "picard_base_distribution_by_cycle__Guanine.pdf:md5,82d32c26160589945f4c395c98220cb4", - "picard_base_distribution_by_cycle__Thymine.pdf:md5,1c1ed09619d30f34ce0ddc9464d26706", - "picard_base_distribution_by_cycle__Undetermined.pdf:md5,785db14b8f88f7b5675a991172a3ea2a", - "picard_hsmetrics_table.pdf:md5,fc9411cf48ebd47c0c261f919849dd46", - "picard_percentage_target_bases.pdf:md5,3752afa592927e547bf0c03e1d1006eb", - "picard_quality_by_cycle.pdf:md5,673292cc4b18e8cca83522991b81a996", - "picard_quality_score_distribution.pdf:md5,88f913aed3ae94590bf10d11a2b59a09", - "samtools-coverage-table.pdf:md5,26da9fd5643611f77ae7d511d9b92a04", - "samtools-coverage_BQ-cnt.pdf:md5,d2602d8ee5faee419b10283104b12e46", - "samtools-coverage_BQ-log.pdf:md5,04983f8664bf34583140efef4594c91d", - "samtools-coverage_Bases-cnt.pdf:md5,e7d204151b84a425c030605c40e5ac98", - "samtools-coverage_Bases-log.pdf:md5,eb3195e76bc390a13bd786ce17994208", - "samtools-coverage_Coverage-cnt.pdf:md5,4cd335d85e8071f4d6b34c07da7e58b3", - "samtools-coverage_Coverage-log.pdf:md5,1a6d4126fd6390139db86ac9c59c10b8", - "samtools-coverage_MQ-cnt.pdf:md5,19b1ec40e0a622c79429cd2e5db6a2ab", - "samtools-coverage_MQ-log.pdf:md5,6bd0213a8e9437ea972d060a45dd32e0", - "samtools-coverage_Mean_depth-cnt.pdf:md5,2e6766ac06b6d61b1eec6e5a4a8e773e", - "samtools-coverage_Mean_depth-log.pdf:md5,a89995d4c79a6119465fb4899129ef73", - "samtools-coverage_Reads-cnt.pdf:md5,f3ed81fba0bd8fdf860db5d4541fb66c", - "samtools-coverage_Reads-log.pdf:md5,9aae76e8a17ae18bc7e1ea222736b4ff", - "samtools-flagstat-pct-table.pdf:md5,e6debd913a8442f56cc22c714021e0a7", - "samtools-flagstat-table.pdf:md5,28f63086a0ac9b57da1f0911b7f8940d", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.pdf:md5,ae4ddcc627dada8d861a8c15e49d97f1", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.pdf:md5,543a323fa0cede66f19ad512222954f4", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.pdf:md5,3e874efbf35563c0e52fd47611822494", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.pdf:md5,c18b4695893cde28c41de39fb16dbcee", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.pdf:md5,d4b9c1b844d0cf4e29d112dc755682b4", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.pdf:md5,f3bef9d1890b8a69acb9c52e07ce7ea3", - "samtools-stats-dp.pdf:md5,9872a7fcbd9e6047c6b3c9aca5a36ced", - "samtools_alignment_plot-cnt.pdf:md5,288be15b7710eadf32e6ba47511fe140", - "samtools_alignment_plot-pct.pdf:md5,6e4103b696b62faaa47989881f202dbe" - ], - [ - "biobambam2_deduplication-cnt.png:md5,5707c3cf44cff88666c3c7b4970ab021", - "biobambam2_deduplication-pct.png:md5,b2a0fece791ff0532a426f3faeecf3f4", - "fastp-insert-size-plot.png:md5,40a7c7edc7062c92d088e8974dd1fbe9", - "fastp-seq-content-gc-plot_Read_1_After_filtering.png:md5,ff993de7c7a0b2f4dd17aaf509c8209b", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.png:md5,124351c45a1bd7d611fd3ba89510018b", - "fastp-seq-content-gc-plot_Read_2_After_filtering.png:md5,058842506a3200770c46a4a70b64ce48", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.png:md5,985bf206443edf1417e2a0f9354abe3c", - "fastp-seq-content-n-plot_Read_1_After_filtering.png:md5,7855b3938c2b48578b2e1ca3486783de", - "fastp-seq-content-n-plot_Read_1_Before_filtering.png:md5,b9276b3bd8f2c57a51d12f76273fc322", - "fastp-seq-content-n-plot_Read_2_After_filtering.png:md5,45684fe478e5d2912848c032c3bc8ee4", - "fastp-seq-content-n-plot_Read_2_Before_filtering.png:md5,97606f1910cdbb47f68d5b7ac9f9bf4b", - "fastp-seq-quality-plot_Read_1_After_filtering.png:md5,44fe9279b3f2279c19d2ce541b9c6c19", - "fastp-seq-quality-plot_Read_1_Before_filtering.png:md5,93c06663d6ed02d11f4e5eab97d48917", - "fastp-seq-quality-plot_Read_2_After_filtering.png:md5,99219cc1b64c80e6ac8cf653add1990c", - "fastp-seq-quality-plot_Read_2_Before_filtering.png:md5,5d655406be9a2ff9a68ec461f51cfcc5", - "fastp_filtered_reads_plot-cnt.png:md5,75911dd91d24adfaae185ebcf0a8455a", - "fastp_filtered_reads_plot-pct.png:md5,4b3c0fd7f90c7c83b50c557d4aa3b6a5", - "mosdepth-coverage-per-contig-single-cnt.png:md5,ff9cec471c8a882b3ad608312b950332", - "mosdepth-coverage-per-contig-single-pct.png:md5,8f17612654e4217dd673c2788b473e7c", - "mosdepth-cumcoverage-dist-id.png:md5,64f3a8071bca0d22a72c72090b2eb638", - "picard_alignment_readlength_plot.png:md5,7c5708c6ed659731111242666746905e", - "picard_alignment_summary_Aligned_Bases-cnt.png:md5,ccd4cdf7a4b1f3f2a39adf2e0c700ed4", - "picard_alignment_summary_Aligned_Bases-pct.png:md5,de5771f0fc6d2feaf7ea1bef7b4f57ed", - "picard_alignment_summary_Aligned_Reads-cnt.png:md5,fa8f7e289fd84f0dfb877758b926c421", - "picard_alignment_summary_Aligned_Reads-pct.png:md5,18be469adf5d34e7296aa9e0feb10274", - "picard_base_distribution_by_cycle__Adenine.png:md5,b59076e9793e4a403228c477f99c6cf8", - "picard_base_distribution_by_cycle__Cytosine.png:md5,7c42741dd1ee386af449d29e21a8389d", - "picard_base_distribution_by_cycle__Guanine.png:md5,27a487a8587c180f08d3afb58e71fb17", - "picard_base_distribution_by_cycle__Thymine.png:md5,f99b137a9975db372a29c0400652eca4", - "picard_base_distribution_by_cycle__Undetermined.png:md5,e7428923e6530f7bd00ca05bf2b0dabe", - "picard_hsmetrics_table.png:md5,70c4f98f3056ebd1a5d49f4f91ab3001", - "picard_percentage_target_bases.png:md5,1e70e6c776d49296f3f8debc3b893851", - "picard_quality_by_cycle.png:md5,23c7dc421bf1a8b9c61e7abdea1b96e9", - "picard_quality_score_distribution.png:md5,f129878e0583e69cac53ec51cac62f4e", - "samtools-coverage-table.png:md5,ffc0a23dcfe8a1b44e7c585898a412ba", - "samtools-coverage_BQ-cnt.png:md5,42a7bfacd302c7924d59701a585957f8", - "samtools-coverage_BQ-log.png:md5,67d6d4c8072743a32dfa30dd22edd5fe", - "samtools-coverage_Bases-cnt.png:md5,8790b6226f16810deceb82c6834b21be", - "samtools-coverage_Bases-log.png:md5,7bdd54947c3ab74d06b9fc11cc35cb51", - "samtools-coverage_Coverage-cnt.png:md5,cdff6829f5d017e67668e6b77b8648fd", - "samtools-coverage_Coverage-log.png:md5,13441e809c66563bf7284ebe4038f368", - "samtools-coverage_MQ-cnt.png:md5,59265e8998386d8a6521296508b4f4e6", - "samtools-coverage_MQ-log.png:md5,0282c8f2fb311eb3830f6d33a8e0d2ef", - "samtools-coverage_Mean_depth-cnt.png:md5,7f0aa59d888da55c8b7e5ca00011b2fc", - "samtools-coverage_Mean_depth-log.png:md5,ab01268969d553decb36658ca785dac0", - "samtools-coverage_Reads-cnt.png:md5,f77fe84d95f5bebd12aa764ab377b6e7", - "samtools-coverage_Reads-log.png:md5,34d3ebbc83f073531328d633466cfcd9", - "samtools-flagstat-pct-table.png:md5,30a84ce2464168d8dedf65b47725e2e1", - "samtools-flagstat-table.png:md5,a828ba0e94ebd04d2ac50ecc43b007fd", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.png:md5,91267791bafff119d985db6b24f813dc", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.png:md5,d1c9fd2633128ed5af7113cedeba91d8", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.png:md5,eb81f43f6c5778f957ce85137758235e", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.png:md5,b1b15467c4b7e34b2a724c2fe9daefa8", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.png:md5,64927987623ac1715e607470f6bf055a", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.png:md5,09773cf98a65a96710a4fac9e2600ed9", - "samtools-stats-dp.png:md5,fe29585e232244237558512103d78fdc", - "samtools_alignment_plot-cnt.png:md5,e5523404a7622df41efaf24fb98ef4c5", - "samtools_alignment_plot-pct.png:md5,7945231e29b09915dee17a9fa620ef62" - ], - [ - "biobambam2_deduplication-cnt.svg:md5,effd09d8ad9d34872090a0bae6f5e967", - "biobambam2_deduplication-pct.svg:md5,e58bfa9f92464f78673fd1ad9e2450d0", - "fastp-insert-size-plot.svg:md5,83bcd604041b4fa6053dcb0d33f21fed", - "fastp-seq-content-gc-plot_Read_1_After_filtering.svg:md5,03a57f9e891bb8aeac9a4979b0e7e513", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.svg:md5,fe77090c3ee62106e5cdd0d243744ced", - "fastp-seq-content-gc-plot_Read_2_After_filtering.svg:md5,fc70efca2a6feb2ebd02712323ab858f", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.svg:md5,a9aeaf418a4af53db36fa495652538b5", - "fastp-seq-content-n-plot_Read_1_After_filtering.svg:md5,c45ccd2c9670cfc6a8fe7e7c411fa792", - "fastp-seq-content-n-plot_Read_1_Before_filtering.svg:md5,78d3817a16b013f647a23564878f1542", - "fastp-seq-content-n-plot_Read_2_After_filtering.svg:md5,f33d2472e82e715f9d33b6781d4671b2", - "fastp-seq-content-n-plot_Read_2_Before_filtering.svg:md5,e7bdb138105422f2eca236628ac1c024", - "fastp-seq-quality-plot_Read_1_After_filtering.svg:md5,353db00f7a3f20c0c07838236e88a5ed", - "fastp-seq-quality-plot_Read_1_Before_filtering.svg:md5,69cef5512260a6af8955d9785966a806", - "fastp-seq-quality-plot_Read_2_After_filtering.svg:md5,46f0ee90d934323da913b14927888a75", - "fastp-seq-quality-plot_Read_2_Before_filtering.svg:md5,bf833093bbc86d88a297d48ac7ad64ad", - "fastp_filtered_reads_plot-cnt.svg:md5,89f162c2fe82f89d487564c26b007003", - "fastp_filtered_reads_plot-pct.svg:md5,74c611b014426ffc6990fd278dd5077d", - "mosdepth-coverage-per-contig-single-cnt.svg:md5,4e8ee59993d08a72eb4545fb8378a8ba", - "mosdepth-coverage-per-contig-single-pct.svg:md5,6c79f39035c6cb6db7f135eefb155a0e", - "mosdepth-cumcoverage-dist-id.svg:md5,587529190643bec79f4c4da65e68fdae", - "picard_alignment_readlength_plot.svg:md5,b0bf8f98c4bfd66b8848b5cf645812a6", - "picard_alignment_summary_Aligned_Bases-cnt.svg:md5,1e4c349f358aa1375f00eeb19a638898", - "picard_alignment_summary_Aligned_Bases-pct.svg:md5,1b2f81b0a0a23d54f62946a266d352b1", - "picard_alignment_summary_Aligned_Reads-cnt.svg:md5,9ee533f876f4af410f0fdd3da6427d89", - "picard_alignment_summary_Aligned_Reads-pct.svg:md5,713905bb8f964ccbf5d0b730447ae9a1", - "picard_base_distribution_by_cycle__Adenine.svg:md5,1a8b1b45ba9b22e9c230adcfce962dd8", - "picard_base_distribution_by_cycle__Cytosine.svg:md5,82a8225f9561a6296aa0b2bb801bf568", - "picard_base_distribution_by_cycle__Guanine.svg:md5,a3bb637662550e5712909ebb90268b11", - "picard_base_distribution_by_cycle__Thymine.svg:md5,316858766a810aa7bac94e9fa82f6a0e", - "picard_base_distribution_by_cycle__Undetermined.svg:md5,f09460fa07c95a4b8d326c62eaeb7099", - "picard_hsmetrics_table.svg:md5,2882442c46a78a971612f03b60cdc9a7", - "picard_percentage_target_bases.svg:md5,bf71b0901b3f91350ea786c293500cd9", - "picard_quality_by_cycle.svg:md5,83b907ec1941f942498b8c19ac15d335", - "picard_quality_score_distribution.svg:md5,4b5a6ac776863aab6a0874a1788e838c", - "samtools-coverage-table.svg:md5,1d344020db642dc8ed73ce65384eaed9", - "samtools-coverage_BQ-cnt.svg:md5,e618e68a0e1d475030a5b86d05217ae6", - "samtools-coverage_BQ-log.svg:md5,d7af1801f148ea9bda9c0d105afc8270", - "samtools-coverage_Bases-cnt.svg:md5,af0bf231e9dfc5545686c9d0d7fc0bac", - "samtools-coverage_Bases-log.svg:md5,d6070217bb54d7f966b21c8563571945", - "samtools-coverage_Coverage-cnt.svg:md5,ffeb1e8ffd6318d30c9ffd72f8701eb8", - "samtools-coverage_Coverage-log.svg:md5,81aafb2970773832ccc95a6a87c0db12", - "samtools-coverage_MQ-cnt.svg:md5,9aaa9307dbe314b04e1e2f78dec852db", - "samtools-coverage_MQ-log.svg:md5,e530d20e0b9ac5ea89a1d7e99e561da3", - "samtools-coverage_Mean_depth-cnt.svg:md5,b3366c179f143419ef91bc2016e717d2", - "samtools-coverage_Mean_depth-log.svg:md5,c13a4e5c2f1e78b77c5bed76598d3e6b", - "samtools-coverage_Reads-cnt.svg:md5,153e7705058794c16bee02ce37daba50", - "samtools-coverage_Reads-log.svg:md5,68f3871ec68b060e54380d353e1a0ded", - "samtools-flagstat-pct-table.svg:md5,7a64df60de3c53a62ce1b9bc62d1e600", - "samtools-flagstat-table.svg:md5,9d6e77d29691f652ed21a493866c226b", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.svg:md5,aee092dd5c492ae70e542cab5b11e8a6", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.svg:md5,a7ef56dd58e80e225252e5bd78c830f2", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.svg:md5,613dcab15c764fafd2151da9b3d5c55e", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.svg:md5,b1f82c95aed78d4e219f16cc7d3f41c3", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.svg:md5,4855e19f8503ef463a338bfcab7af3a5", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.svg:md5,b98efafd11eea5fd5292e247d4530821", - "samtools-stats-dp.svg:md5,5c9cc7aeefc2a540d2b93bcdeda7aa39", - "samtools_alignment_plot-cnt.svg:md5,0a2910be102b4c0ef6ac156a25a67005", - "samtools_alignment_plot-pct.svg:md5,061886f9d0f5839eccb706a784f7eec7" - ] - ] + "multiqc_library_test_plots" ], "multiqc_library_report": [ - "multiqc_library_test.html:md5,20fd67ac14ace887e5f5b76f02dc2b20" + "multiqc_library_test.html" ], "multiqc_main_data": [ [ - [ - "llms-full.txt:md5,769bfe8a8b5b73ff5e31e480d5d129c9", - "multiqc.log:md5,1ec335a68a9d72f823a7bf0bf42e028c", - "multiqc.parquet:md5,73d600bb80fc3459bfba5edc970fc949", - "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", - "multiqc_data.json:md5,8ad88f47321bfad770cdc2387d5fa6f9", - "multiqc_software_versions.txt:md5,3e70a45b35aa87dab44c6b2b61033f14", - "multiqc_sources.txt:md5,d2a044df39ce3c6abe5cdc2d67473490" - ] + "multiqc_data" ] ], "multiqc_main_plots": [ @@ -666,7 +408,7 @@ ], "multiqc_main_report": [ [ - "multiqc.html:md5,a05f843b1b044c86a850de70980b8af2" + "multiqc.html" ] ], "panelcoverage": [ @@ -924,7 +666,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T19:48:21.07529" + "timestamp": "2025-12-04T20:36:50.85925" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -1099,151 +841,17 @@ ], "multiqc_library_data": [ - [ - "biobambam2_deduplication.txt:md5,992b5decb6d017254ee9b02fbe076d81", - "fastp-insert-size-plot.txt:md5,66fec5f01198da8ecd97410ec1727021", - "fastp-seq-content-gc-plot_Read_1_After_filtering.txt:md5,23420affa90c1523becba23c09653a92", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.txt:md5,27bb3440b4edeab8a9dc2ec1077cfc0e", - "fastp-seq-content-gc-plot_Read_2_After_filtering.txt:md5,e49276ebe93bb8294ca51e6a0916e703", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.txt:md5,f7bf2354433b3514893f0fe18e7f7877", - "fastp-seq-content-n-plot_Read_1_After_filtering.txt:md5,6c20997febd11ea6c80fe13a1761898b", - "fastp-seq-content-n-plot_Read_1_Before_filtering.txt:md5,a1d1cdbb1a1fb48b6d6bdf1f2192b2b7", - "fastp-seq-content-n-plot_Read_2_After_filtering.txt:md5,e1d8dcf05d785f863cfb17c96c1f58a4", - "fastp-seq-content-n-plot_Read_2_Before_filtering.txt:md5,30bfcca763531e4ee1638031d5359e48", - "fastp-seq-quality-plot_Read_1_After_filtering.txt:md5,2b0a42468f68992639ac8eacbf533134", - "fastp-seq-quality-plot_Read_1_Before_filtering.txt:md5,4e6fea487fecc2ee55db1518ff30a0b5", - "fastp-seq-quality-plot_Read_2_After_filtering.txt:md5,72a6d8295748db4de13d6dc1d1eb83dc", - "fastp-seq-quality-plot_Read_2_Before_filtering.txt:md5,3b1c7675660e838e75d1d5c62c0f3a61", - "fastp_filtered_reads_plot.txt:md5,9e506f1c8dbad71540697d11af4ba6df", - "llms-full.txt:md5,02c5ed19814d3afd16ea5fccc3516865", - "multiqc.log:md5,faa526e1b74af6acf779e92caf5bd77a", - "multiqc.parquet:md5,f991c38b80ea4795193224a782e94750", - "multiqc_biobambam2_dups.txt:md5,31c942ce8964d0941cb79f8c9de8aa04", - "multiqc_citations.txt:md5,b64ab308dbc3a2e58e15527370655958", - "multiqc_data.json:md5,ea17bc7fc0063bb30073f9b5b3cc7bfb", - "multiqc_fastp.txt:md5,f917618024634bb24850390c8f4836e7", - "multiqc_general_stats.txt:md5,21152415bf3b3720dede9ada054ae5e1", - "multiqc_samtools_flagstat.txt:md5,5ce133683245100011b77cd676471de1", - "multiqc_samtools_idxstats.txt:md5,7e542f20dd27d352b5d2be33e1920220", - "multiqc_samtools_stats.txt:md5,1dd571a033605b1224ebac95deceee0b", - "multiqc_sources.txt:md5,08a7aa04a68650ae860f494ae1b5d4d2", - "samtools-flagstat-pct-table.txt:md5,8b0e71fcfbb55f6e8b0e6949fb146e0c", - "samtools-flagstat-table.txt:md5,6203dc05b5eaee4f529300986aebbb3c", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", - "samtools-idxstats-mapped-reads-plot_Raw_Counts.txt:md5,e8f2b29a779d322cd56b00f4958ef841", - "samtools-stats-dp.txt:md5,07153313edc4f7a3754e9821c85ca0cf", - "samtools_alignment_plot.txt:md5,d60abeeecbb005aff19c12f19a726057" - ] + "multiqc_library_test_data" ], "multiqc_library_plots": [ - [ - [ - "biobambam2_deduplication-cnt.pdf:md5,32dc6feb5cfb2a681e1baea64ed174d2", - "biobambam2_deduplication-pct.pdf:md5,c210b96ff301c4699a981b7a747dd642", - "fastp-insert-size-plot.pdf:md5,ac28b57e2270b846462ec69d469403de", - "fastp-seq-content-gc-plot_Read_1_After_filtering.pdf:md5,70fc95d50564a9e34ffedaab55c7e3a3", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.pdf:md5,bfdadfab1ef45191268e8f19b5b56756", - "fastp-seq-content-gc-plot_Read_2_After_filtering.pdf:md5,be9b2f8bb0276f4da8cf20595035bb33", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.pdf:md5,a00ca04dd4577aa4706975016bf82618", - "fastp-seq-content-n-plot_Read_1_After_filtering.pdf:md5,9dd66bed0bb685993e1ac70aad2405a1", - "fastp-seq-content-n-plot_Read_1_Before_filtering.pdf:md5,95d07c4ea09e4ffb8473e84648eea599", - "fastp-seq-content-n-plot_Read_2_After_filtering.pdf:md5,c9550470037ba6eec53118c5db3ed62a", - "fastp-seq-content-n-plot_Read_2_Before_filtering.pdf:md5,9a9dff340890cd43c6ee7a689112c49e", - "fastp-seq-quality-plot_Read_1_After_filtering.pdf:md5,e3f499d8d0ccf8bf0df604e96f7be9cb", - "fastp-seq-quality-plot_Read_1_Before_filtering.pdf:md5,c490b53f4a9cddbd3659256aedbeb4cd", - "fastp-seq-quality-plot_Read_2_After_filtering.pdf:md5,31011ec67fc23ff867c60c45b9681396", - "fastp-seq-quality-plot_Read_2_Before_filtering.pdf:md5,b75dad16330483e160720bd89649167d", - "fastp_filtered_reads_plot-cnt.pdf:md5,e34eea79aa92a8f0a1cafa522d1204f3", - "fastp_filtered_reads_plot-pct.pdf:md5,0f6b66deb6fbff878987ca29069cb016", - "samtools-flagstat-pct-table.pdf:md5,781be091183f24877110f8d5be0ebbec", - "samtools-flagstat-table.pdf:md5,bc1eff95cf645832e0dee6d86bcf503b", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.pdf:md5,f392b8070efe5b7a4bd20993c0e66bfa", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.pdf:md5,282ddb8116e7c774149d24015d2a56bd", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.pdf:md5,824315ee6e029d3b42f37f02b9374734", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.pdf:md5,cd587a5ace7868b2b24fdd16ad079e40", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.pdf:md5,2be7c8ff5b10d0ee1fb6b01f4c2100ee", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.pdf:md5,f2caf54746b77da42fe4200fc1f2eb96", - "samtools-stats-dp.pdf:md5,8b63ef11ded4b2224f9d5f6d3f059c7a", - "samtools_alignment_plot-cnt.pdf:md5,3d6c545941eec5834f4c991ecf0be42c", - "samtools_alignment_plot-pct.pdf:md5,a62b1d31109315eacb4ce42c63ae0aef" - ], - [ - "biobambam2_deduplication-cnt.png:md5,5707c3cf44cff88666c3c7b4970ab021", - "biobambam2_deduplication-pct.png:md5,b2a0fece791ff0532a426f3faeecf3f4", - "fastp-insert-size-plot.png:md5,40a7c7edc7062c92d088e8974dd1fbe9", - "fastp-seq-content-gc-plot_Read_1_After_filtering.png:md5,ff993de7c7a0b2f4dd17aaf509c8209b", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.png:md5,124351c45a1bd7d611fd3ba89510018b", - "fastp-seq-content-gc-plot_Read_2_After_filtering.png:md5,058842506a3200770c46a4a70b64ce48", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.png:md5,985bf206443edf1417e2a0f9354abe3c", - "fastp-seq-content-n-plot_Read_1_After_filtering.png:md5,7855b3938c2b48578b2e1ca3486783de", - "fastp-seq-content-n-plot_Read_1_Before_filtering.png:md5,b9276b3bd8f2c57a51d12f76273fc322", - "fastp-seq-content-n-plot_Read_2_After_filtering.png:md5,45684fe478e5d2912848c032c3bc8ee4", - "fastp-seq-content-n-plot_Read_2_Before_filtering.png:md5,97606f1910cdbb47f68d5b7ac9f9bf4b", - "fastp-seq-quality-plot_Read_1_After_filtering.png:md5,44fe9279b3f2279c19d2ce541b9c6c19", - "fastp-seq-quality-plot_Read_1_Before_filtering.png:md5,93c06663d6ed02d11f4e5eab97d48917", - "fastp-seq-quality-plot_Read_2_After_filtering.png:md5,99219cc1b64c80e6ac8cf653add1990c", - "fastp-seq-quality-plot_Read_2_Before_filtering.png:md5,5d655406be9a2ff9a68ec461f51cfcc5", - "fastp_filtered_reads_plot-cnt.png:md5,75911dd91d24adfaae185ebcf0a8455a", - "fastp_filtered_reads_plot-pct.png:md5,4b3c0fd7f90c7c83b50c557d4aa3b6a5", - "samtools-flagstat-pct-table.png:md5,30a84ce2464168d8dedf65b47725e2e1", - "samtools-flagstat-table.png:md5,a828ba0e94ebd04d2ac50ecc43b007fd", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.png:md5,91267791bafff119d985db6b24f813dc", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.png:md5,d1c9fd2633128ed5af7113cedeba91d8", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.png:md5,eb81f43f6c5778f957ce85137758235e", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.png:md5,b1b15467c4b7e34b2a724c2fe9daefa8", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.png:md5,64927987623ac1715e607470f6bf055a", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.png:md5,09773cf98a65a96710a4fac9e2600ed9", - "samtools-stats-dp.png:md5,fe29585e232244237558512103d78fdc", - "samtools_alignment_plot-cnt.png:md5,e5523404a7622df41efaf24fb98ef4c5", - "samtools_alignment_plot-pct.png:md5,7945231e29b09915dee17a9fa620ef62" - ], - [ - "biobambam2_deduplication-cnt.svg:md5,9de3a4196707cc54a09ccab579551b45", - "biobambam2_deduplication-pct.svg:md5,383483ee720a0b93282f11cef90d8412", - "fastp-insert-size-plot.svg:md5,03e25e27d6f08e7eeef62edaac78705d", - "fastp-seq-content-gc-plot_Read_1_After_filtering.svg:md5,16db74211fea2dd026208e1ff8932921", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.svg:md5,ebce58ed6cef4ed79ea2ddd5d796e61e", - "fastp-seq-content-gc-plot_Read_2_After_filtering.svg:md5,2e6b93f07296d37a5fd08f493793ecf2", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.svg:md5,865602ee9731648cf55a8f6c6e3fcb20", - "fastp-seq-content-n-plot_Read_1_After_filtering.svg:md5,c38f3a392319e4b9e2147a96b33e1186", - "fastp-seq-content-n-plot_Read_1_Before_filtering.svg:md5,b8416f1f456e3a189822f22c26e388ad", - "fastp-seq-content-n-plot_Read_2_After_filtering.svg:md5,5c54a86a023e9ac204ece6eca7f4da3d", - "fastp-seq-content-n-plot_Read_2_Before_filtering.svg:md5,74ecf94d1bc8a2ea1315bad82e8da636", - "fastp-seq-quality-plot_Read_1_After_filtering.svg:md5,2136357bde8a33774139d892f78f24f8", - "fastp-seq-quality-plot_Read_1_Before_filtering.svg:md5,79c1c221969bdbcd7254eb8d9c6e15f2", - "fastp-seq-quality-plot_Read_2_After_filtering.svg:md5,a55b84e706aa6aaa796e74f29bc32ec7", - "fastp-seq-quality-plot_Read_2_Before_filtering.svg:md5,ddfc609e5a87d598e8abe9777130e8e6", - "fastp_filtered_reads_plot-cnt.svg:md5,5fd1528dbf165823db88a7cf666ecb23", - "fastp_filtered_reads_plot-pct.svg:md5,d8adcea8718c87a360b9d329e31cc64b", - "samtools-flagstat-pct-table.svg:md5,3a27df4db014b18226c51f41868c8387", - "samtools-flagstat-table.svg:md5,0c0bca9b4b56b6f1a7bac9b23be4bbe4", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.svg:md5,62227493b8c1c4abf2b9a56dee4aaee1", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.svg:md5,7e0a96a8947202ada7f3539f614aafbd", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.svg:md5,addf085c4878ef4c72bf2de0b1da73c5", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.svg:md5,198bee66f3e5232a1f389abf312f3230", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.svg:md5,1e1de4b4dfdaebb6c6c9cb6ecf78fc0d", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.svg:md5,2a42c274765d0a37f3eeef4b605ad55c", - "samtools-stats-dp.svg:md5,c3d026b17b884a56736a66cdba55865b", - "samtools_alignment_plot-cnt.svg:md5,55cf5b87a08d2fb1c4ee34099146a8b1", - "samtools_alignment_plot-pct.svg:md5,123f6620c817c04bb14336aae67dcaac" - ] - ] + "multiqc_library_test_plots" ], "multiqc_library_report": [ - "multiqc_library_test.html:md5,379d95b311027e666745448a9e27fe65" + "multiqc_library_test.html" ], "multiqc_main_data": [ [ - [ - "llms-full.txt:md5,d188ca7a55d62d188c5c13608585d75c", - "multiqc.log:md5,4832cad68754c77e2de90985272b0342", - "multiqc.parquet:md5,182ff0904414468b20c9197f08ecf956", - "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", - "multiqc_data.json:md5,a9e50ebc69822d508d72da06c16bf9ff", - "multiqc_software_versions.txt:md5,4e94b4dd017aacfd34b89230176af1af", - "multiqc_sources.txt:md5,d2a044df39ce3c6abe5cdc2d67473490" - ] + "multiqc_data" ] ], "multiqc_main_plots": [ @@ -1253,7 +861,7 @@ ], "multiqc_main_report": [ [ - "multiqc.html:md5,f3b0258eb0cd1c0ee4f206368de6b662" + "multiqc.html" ] ], "panelcoverage": [ @@ -1401,7 +1009,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T19:54:04.990092" + "timestamp": "2025-12-04T20:42:53.576667" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1710,279 +1318,17 @@ ], "multiqc_library_data": [ - [ - "biobambam2_deduplication.txt:md5,992b5decb6d017254ee9b02fbe076d81", - "fastp-insert-size-plot.txt:md5,66fec5f01198da8ecd97410ec1727021", - "fastp-seq-content-gc-plot_Read_1_After_filtering.txt:md5,23420affa90c1523becba23c09653a92", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.txt:md5,27bb3440b4edeab8a9dc2ec1077cfc0e", - "fastp-seq-content-gc-plot_Read_2_After_filtering.txt:md5,e49276ebe93bb8294ca51e6a0916e703", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.txt:md5,f7bf2354433b3514893f0fe18e7f7877", - "fastp-seq-content-n-plot_Read_1_After_filtering.txt:md5,6c20997febd11ea6c80fe13a1761898b", - "fastp-seq-content-n-plot_Read_1_Before_filtering.txt:md5,a1d1cdbb1a1fb48b6d6bdf1f2192b2b7", - "fastp-seq-content-n-plot_Read_2_After_filtering.txt:md5,e1d8dcf05d785f863cfb17c96c1f58a4", - "fastp-seq-content-n-plot_Read_2_Before_filtering.txt:md5,30bfcca763531e4ee1638031d5359e48", - "fastp-seq-quality-plot_Read_1_After_filtering.txt:md5,2b0a42468f68992639ac8eacbf533134", - "fastp-seq-quality-plot_Read_1_Before_filtering.txt:md5,4e6fea487fecc2ee55db1518ff30a0b5", - "fastp-seq-quality-plot_Read_2_After_filtering.txt:md5,72a6d8295748db4de13d6dc1d1eb83dc", - "fastp-seq-quality-plot_Read_2_Before_filtering.txt:md5,3b1c7675660e838e75d1d5c62c0f3a61", - "fastp_filtered_reads_plot.txt:md5,9e506f1c8dbad71540697d11af4ba6df", - "llms-full.txt:md5,5f245d44b703b37991e2130e2247adb9", - "mosdepth-coverage-per-contig-single.txt:md5,0c5d8872c18169b771168ca9fa7d40b2", - "mosdepth-cumcoverage-dist-id.txt:md5,2592e72a312feb3363dece668fb2ea90", - "mosdepth_cov_dist.txt:md5,f74eeba67b67d59def037884af206551", - "mosdepth_cumcov_dist.txt:md5,f74eeba67b67d59def037884af206551", - "mosdepth_perchrom.txt:md5,0c5d8872c18169b771168ca9fa7d40b2", - "multiqc.log:md5,443bae2f4f1af6e82ae0c2623b5d5b26", - "multiqc.parquet:md5,64c797120e6fe75c00726dd5a05b8613", - "multiqc_biobambam2_dups.txt:md5,31c942ce8964d0941cb79f8c9de8aa04", - "multiqc_citations.txt:md5,294fadee817c59c64f1b985ac204b224", - "multiqc_data.json:md5,b021f17bc01883a1e6bb04642de162ba", - "multiqc_fastp.txt:md5,f917618024634bb24850390c8f4836e7", - "multiqc_general_stats.txt:md5,94493aa967cdafb4c5f78b8981b1a185", - "multiqc_picard_AlignmentSummaryMetrics.txt:md5,3f32124a666ad5fa6dda93759cf450f0", - "multiqc_picard_baseContent.txt:md5,deba2098af2de348792a37b405eab78c", - "multiqc_picard_quality_by_cycle.txt:md5,eca76b6ed78d34d66e1e185c7158868f", - "multiqc_picard_quality_score_distribution.txt:md5,6ec87b3288ada8fb9456a3cd1e801514", - "multiqc_picard_wgsmetrics.txt:md5,54691f0bafd26c22b3339ac5133e3e59", - "multiqc_samtools_coverage.txt:md5,2b8ac198265a850d581d453eacb402cd", - "multiqc_samtools_flagstat.txt:md5,5ce133683245100011b77cd676471de1", - "multiqc_samtools_idxstats.txt:md5,7e542f20dd27d352b5d2be33e1920220", - "multiqc_samtools_stats.txt:md5,1dd571a033605b1224ebac95deceee0b", - "multiqc_sources.txt:md5,8bbd0fb5a901bd8e6da470a94357b8c7", - "picard_MarkIlluminaAdapters_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "picard_MeanQualityByCycle_histogram.txt:md5,d41d8cd98f00b204e9800998ecf8427e", - "picard_MeanQualityByCycle_histogram_1.txt:md5,eca76b6ed78d34d66e1e185c7158868f", - "picard_QualityScoreDistribution_histogram.txt:md5,6ec87b3288ada8fb9456a3cd1e801514", - "picard_alignment_readlength_plot.txt:md5,891edbc18f01189de8c5bf52320ee6c7", - "picard_alignment_summary_Aligned_Bases.txt:md5,7d13622d8d4083fe2a4be5bf92ea77e6", - "picard_alignment_summary_Aligned_Reads.txt:md5,ed831c3df4e4465d9c6fb52ce731ee71", - "picard_base_distribution_by_cycle__Adenine.txt:md5,989b9c396dfa032d8ca02f57b7cc6e7d", - "picard_base_distribution_by_cycle__Cytosine.txt:md5,dc7b79f9ab4bc66db25b509e423abf2b", - "picard_base_distribution_by_cycle__Guanine.txt:md5,1f2a16426851c0e434558d437ac482e3", - "picard_base_distribution_by_cycle__Thymine.txt:md5,cbc90b7275fa29bf09d4be71fc443df1", - "picard_base_distribution_by_cycle__Undetermined.txt:md5,e0a643aff9cf4b0d277c4da6c798c6dc", - "picard_quality_by_cycle.txt:md5,f89d83da6f5a7fa00511a8959c2bd3c2", - "picard_quality_score_distribution.txt:md5,9d72562e154dba19a69180e2875ae8e9", - "picard_wgs_metrics_bases.txt:md5,5efebe4a352e7d44392faded88e10ec9", - "picard_wgs_metrics_histogram_Counts_Histogram.txt:md5,681e302aec63d9b5fa8966ee8ee2373a", - "picard_wgs_metrics_histogram_Percentage_Drop-Off.txt:md5,b37badd0338d073b2557c2492c472280", - "samtools-coverage-table.txt:md5,0f9fe2b460eb659d5ce23deba4ee62d8", - "samtools-coverage_BQ.txt:md5,68b97b7434bd35c71d3d14de478ba1b9", - "samtools-coverage_Bases.txt:md5,f8fcf650945e7b347409d678fae3b006", - "samtools-coverage_Coverage.txt:md5,bc62f359fced9778f869022dd4ab6647", - "samtools-coverage_MQ.txt:md5,5f9ece387a8e160cedbb02874c46000b", - "samtools-coverage_Mean_depth.txt:md5,4d5f58688b4c653b617c709717475c25", - "samtools-coverage_Reads.txt:md5,3667b340251346e538e6f078adcec945", - "samtools-flagstat-pct-table.txt:md5,8b0e71fcfbb55f6e8b0e6949fb146e0c", - "samtools-flagstat-table.txt:md5,6203dc05b5eaee4f529300986aebbb3c", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts.txt:md5,ef2707df6eaa2bbc3989d17fd2fca0ce", - "samtools-idxstats-mapped-reads-plot_Raw_Counts.txt:md5,e8f2b29a779d322cd56b00f4958ef841", - "samtools-stats-dp.txt:md5,07153313edc4f7a3754e9821c85ca0cf", - "samtools_alignment_plot.txt:md5,d60abeeecbb005aff19c12f19a726057" - ] + "multiqc_library_test_data" ], "multiqc_library_plots": [ - [ - [ - "biobambam2_deduplication-cnt.pdf:md5,076943b1c590633eede4b60e8aa2434c", - "biobambam2_deduplication-pct.pdf:md5,32d4caca75efe889205de73e3a0a4d97", - "fastp-insert-size-plot.pdf:md5,f1023409a45dc9d8a0931659b0dc697d", - "fastp-seq-content-gc-plot_Read_1_After_filtering.pdf:md5,acbf529d4de4de437a3b71ef99d27698", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.pdf:md5,04621f82d0b3f8d97bf99b8d59b9988e", - "fastp-seq-content-gc-plot_Read_2_After_filtering.pdf:md5,9e23be66eacb942bd55f0459836bc111", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.pdf:md5,93b6b5bda685f45fb8c81747d0bccd7f", - "fastp-seq-content-n-plot_Read_1_After_filtering.pdf:md5,a8c81efa4e85a5258b6c8930d5543c3d", - "fastp-seq-content-n-plot_Read_1_Before_filtering.pdf:md5,5fe572924ab5149f71f9c33a3aa2ef26", - "fastp-seq-content-n-plot_Read_2_After_filtering.pdf:md5,6332b41f6963f9c9a0ef57e307cd636c", - "fastp-seq-content-n-plot_Read_2_Before_filtering.pdf:md5,25511034f06bb9c2d1ba499568285338", - "fastp-seq-quality-plot_Read_1_After_filtering.pdf:md5,a5d9dbd669760bd35cabff4a957c72e0", - "fastp-seq-quality-plot_Read_1_Before_filtering.pdf:md5,5d8a4222b4d43f2383759d6612faf1af", - "fastp-seq-quality-plot_Read_2_After_filtering.pdf:md5,5eaaa59e813d0b5e86c833fa7030fa63", - "fastp-seq-quality-plot_Read_2_Before_filtering.pdf:md5,8386c931c7b0ccd2f1fda5caa10d4612", - "fastp_filtered_reads_plot-cnt.pdf:md5,07f08edd555887949d5732358c2adf56", - "fastp_filtered_reads_plot-pct.pdf:md5,25516919ae1120b1e05ad36a296ae49e", - "mosdepth-coverage-per-contig-single-cnt.pdf:md5,e31c2589a014aa1e1e6ac997119ad675", - "mosdepth-coverage-per-contig-single-pct.pdf:md5,6435a5fe0f4b51d95e6a4b6acdd2f3d5", - "mosdepth-cumcoverage-dist-id.pdf:md5,5d4af4029371ddba1ed19ed38f88c8f2", - "picard_alignment_readlength_plot.pdf:md5,aa1f2ae479ecae2c3ab65cf265987258", - "picard_alignment_summary_Aligned_Bases-cnt.pdf:md5,13b9efa703cde16499f597103e511ce9", - "picard_alignment_summary_Aligned_Bases-pct.pdf:md5,5d53049cb3bfe99985fbf840095b960f", - "picard_alignment_summary_Aligned_Reads-cnt.pdf:md5,89bd672088e27c155cf2d5a06f8b03b4", - "picard_alignment_summary_Aligned_Reads-pct.pdf:md5,ea3c23c71d88ceba0cb38629cb5ed9bd", - "picard_base_distribution_by_cycle__Adenine.pdf:md5,0305b7ed8db6442e58f6df0939aae0c2", - "picard_base_distribution_by_cycle__Cytosine.pdf:md5,9fc115666272868eea3201b4ad329e6f", - "picard_base_distribution_by_cycle__Guanine.pdf:md5,ea999ac900f032148ef8dc8311fbaf21", - "picard_base_distribution_by_cycle__Thymine.pdf:md5,75fee9ea401481bd3a89d2e9dbc93b64", - "picard_base_distribution_by_cycle__Undetermined.pdf:md5,5084d6ea1d038c2ad803ee61ea3d4beb", - "picard_quality_by_cycle.pdf:md5,d46426fb7f451c50f7ea3900fbee909c", - "picard_quality_score_distribution.pdf:md5,c4bace227e4be936499b16d8b791c4d2", - "picard_wgs_metrics_bases.pdf:md5,8f385b4242b2839521d355da67d1601c", - "picard_wgs_metrics_histogram_Counts_Histogram.pdf:md5,6d1fd94aab4dae5f06f9ab2fd18a2d14", - "picard_wgs_metrics_histogram_Percentage_Drop-Off.pdf:md5,2973a0bd94ce539443fe3f144d60a57d", - "samtools-coverage-table.pdf:md5,43f6c1db01c3d6e0cbeb598d8462c3bb", - "samtools-coverage_BQ-cnt.pdf:md5,a0e08adcfcf5963508675e5f73f3ddc4", - "samtools-coverage_BQ-log.pdf:md5,7cfa56d3008e2cbdd5ac1e6dd01a0da5", - "samtools-coverage_Bases-cnt.pdf:md5,fe22f1634930da794d44c425cd3f9f75", - "samtools-coverage_Bases-log.pdf:md5,a91260f7858bb59b05994a60c98b3d09", - "samtools-coverage_Coverage-cnt.pdf:md5,28224f499e3b6101c2996159f75e52b6", - "samtools-coverage_Coverage-log.pdf:md5,d24bb4c34863c442d9081d8c8c2ec92a", - "samtools-coverage_MQ-cnt.pdf:md5,be7f66cb438e5857125034f8308f1a9d", - "samtools-coverage_MQ-log.pdf:md5,0e67e1921c296fa19c8fc5b5b2808a4d", - "samtools-coverage_Mean_depth-cnt.pdf:md5,2422e0664ff8f9e22a64e9f60c29dc01", - "samtools-coverage_Mean_depth-log.pdf:md5,ccb6cda145cf3e19266e2de300bf5107", - "samtools-coverage_Reads-cnt.pdf:md5,be0940f017942fd1ea7eb3b7472e78a9", - "samtools-coverage_Reads-log.pdf:md5,147469231619cf8c5a1bcbfedd1536f9", - "samtools-flagstat-pct-table.pdf:md5,4da35ccf697cab3209ff58e65ea22985", - "samtools-flagstat-table.pdf:md5,ecf1cd68a33e2ffacd09bc26acd78c4f", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.pdf:md5,564d74b6292e8e644e80ebbc4f36cbe3", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.pdf:md5,008360a325c47b0eba81acf03f486221", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.pdf:md5,7e7b33224bcf3053b9f074c70d0e4342", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.pdf:md5,9f8fc3a6ff912245f7a3c5189bf9fcb1", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.pdf:md5,f4d9ff73a8b429e998c0fcbc143c468e", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.pdf:md5,eccf04a5b6928eaf4306b7404f2fd945", - "samtools-stats-dp.pdf:md5,022199feb31379c5b5fb74ee031d8697", - "samtools_alignment_plot-cnt.pdf:md5,889e13551f5a50465e5046bd101e8647", - "samtools_alignment_plot-pct.pdf:md5,d66282dbb006fcae5f4c582f7892ca43" - ], - [ - "biobambam2_deduplication-cnt.png:md5,5707c3cf44cff88666c3c7b4970ab021", - "biobambam2_deduplication-pct.png:md5,b2a0fece791ff0532a426f3faeecf3f4", - "fastp-insert-size-plot.png:md5,40a7c7edc7062c92d088e8974dd1fbe9", - "fastp-seq-content-gc-plot_Read_1_After_filtering.png:md5,ff993de7c7a0b2f4dd17aaf509c8209b", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.png:md5,124351c45a1bd7d611fd3ba89510018b", - "fastp-seq-content-gc-plot_Read_2_After_filtering.png:md5,058842506a3200770c46a4a70b64ce48", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.png:md5,985bf206443edf1417e2a0f9354abe3c", - "fastp-seq-content-n-plot_Read_1_After_filtering.png:md5,7855b3938c2b48578b2e1ca3486783de", - "fastp-seq-content-n-plot_Read_1_Before_filtering.png:md5,b9276b3bd8f2c57a51d12f76273fc322", - "fastp-seq-content-n-plot_Read_2_After_filtering.png:md5,45684fe478e5d2912848c032c3bc8ee4", - "fastp-seq-content-n-plot_Read_2_Before_filtering.png:md5,97606f1910cdbb47f68d5b7ac9f9bf4b", - "fastp-seq-quality-plot_Read_1_After_filtering.png:md5,44fe9279b3f2279c19d2ce541b9c6c19", - "fastp-seq-quality-plot_Read_1_Before_filtering.png:md5,93c06663d6ed02d11f4e5eab97d48917", - "fastp-seq-quality-plot_Read_2_After_filtering.png:md5,99219cc1b64c80e6ac8cf653add1990c", - "fastp-seq-quality-plot_Read_2_Before_filtering.png:md5,5d655406be9a2ff9a68ec461f51cfcc5", - "fastp_filtered_reads_plot-cnt.png:md5,75911dd91d24adfaae185ebcf0a8455a", - "fastp_filtered_reads_plot-pct.png:md5,4b3c0fd7f90c7c83b50c557d4aa3b6a5", - "mosdepth-coverage-per-contig-single-cnt.png:md5,4d6f6bf53791c7438153194cf5c28b58", - "mosdepth-coverage-per-contig-single-pct.png:md5,8f17612654e4217dd673c2788b473e7c", - "mosdepth-cumcoverage-dist-id.png:md5,9a1b83a02f39658f5896ed4b665f7327", - "picard_alignment_readlength_plot.png:md5,7c5708c6ed659731111242666746905e", - "picard_alignment_summary_Aligned_Bases-cnt.png:md5,ccd4cdf7a4b1f3f2a39adf2e0c700ed4", - "picard_alignment_summary_Aligned_Bases-pct.png:md5,de5771f0fc6d2feaf7ea1bef7b4f57ed", - "picard_alignment_summary_Aligned_Reads-cnt.png:md5,fa8f7e289fd84f0dfb877758b926c421", - "picard_alignment_summary_Aligned_Reads-pct.png:md5,18be469adf5d34e7296aa9e0feb10274", - "picard_base_distribution_by_cycle__Adenine.png:md5,b59076e9793e4a403228c477f99c6cf8", - "picard_base_distribution_by_cycle__Cytosine.png:md5,7c42741dd1ee386af449d29e21a8389d", - "picard_base_distribution_by_cycle__Guanine.png:md5,27a487a8587c180f08d3afb58e71fb17", - "picard_base_distribution_by_cycle__Thymine.png:md5,f99b137a9975db372a29c0400652eca4", - "picard_base_distribution_by_cycle__Undetermined.png:md5,e7428923e6530f7bd00ca05bf2b0dabe", - "picard_quality_by_cycle.png:md5,23c7dc421bf1a8b9c61e7abdea1b96e9", - "picard_quality_score_distribution.png:md5,f129878e0583e69cac53ec51cac62f4e", - "picard_wgs_metrics_bases.png:md5,6ae01c3c3e7a7f6bac5dd44e0e29dd6a", - "picard_wgs_metrics_histogram_Counts_Histogram.png:md5,cfd66c498f788418c650ec052c12c737", - "picard_wgs_metrics_histogram_Percentage_Drop-Off.png:md5,2b050e4750a49c843e8fd8a1c2e01424", - "samtools-coverage-table.png:md5,ffc0a23dcfe8a1b44e7c585898a412ba", - "samtools-coverage_BQ-cnt.png:md5,42a7bfacd302c7924d59701a585957f8", - "samtools-coverage_BQ-log.png:md5,67d6d4c8072743a32dfa30dd22edd5fe", - "samtools-coverage_Bases-cnt.png:md5,8790b6226f16810deceb82c6834b21be", - "samtools-coverage_Bases-log.png:md5,7bdd54947c3ab74d06b9fc11cc35cb51", - "samtools-coverage_Coverage-cnt.png:md5,cdff6829f5d017e67668e6b77b8648fd", - "samtools-coverage_Coverage-log.png:md5,13441e809c66563bf7284ebe4038f368", - "samtools-coverage_MQ-cnt.png:md5,59265e8998386d8a6521296508b4f4e6", - "samtools-coverage_MQ-log.png:md5,0282c8f2fb311eb3830f6d33a8e0d2ef", - "samtools-coverage_Mean_depth-cnt.png:md5,7f0aa59d888da55c8b7e5ca00011b2fc", - "samtools-coverage_Mean_depth-log.png:md5,ab01268969d553decb36658ca785dac0", - "samtools-coverage_Reads-cnt.png:md5,f77fe84d95f5bebd12aa764ab377b6e7", - "samtools-coverage_Reads-log.png:md5,34d3ebbc83f073531328d633466cfcd9", - "samtools-flagstat-pct-table.png:md5,30a84ce2464168d8dedf65b47725e2e1", - "samtools-flagstat-table.png:md5,a828ba0e94ebd04d2ac50ecc43b007fd", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.png:md5,91267791bafff119d985db6b24f813dc", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.png:md5,d1c9fd2633128ed5af7113cedeba91d8", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.png:md5,eb81f43f6c5778f957ce85137758235e", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.png:md5,b1b15467c4b7e34b2a724c2fe9daefa8", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.png:md5,64927987623ac1715e607470f6bf055a", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.png:md5,09773cf98a65a96710a4fac9e2600ed9", - "samtools-stats-dp.png:md5,fe29585e232244237558512103d78fdc", - "samtools_alignment_plot-cnt.png:md5,e5523404a7622df41efaf24fb98ef4c5", - "samtools_alignment_plot-pct.png:md5,7945231e29b09915dee17a9fa620ef62" - ], - [ - "biobambam2_deduplication-cnt.svg:md5,cfd25e0ac46d01b09f2196fc10487a97", - "biobambam2_deduplication-pct.svg:md5,c7ed58b8de114475f6ef551cc38246b6", - "fastp-insert-size-plot.svg:md5,463e2ebba19326fc07286ec96074439c", - "fastp-seq-content-gc-plot_Read_1_After_filtering.svg:md5,df2eff4d156ad7f187fa80e3340cbc9c", - "fastp-seq-content-gc-plot_Read_1_Before_filtering.svg:md5,de22f2c91d8abe074f24aada92336dae", - "fastp-seq-content-gc-plot_Read_2_After_filtering.svg:md5,c1119ba28aa972dcde0725e9ece9b452", - "fastp-seq-content-gc-plot_Read_2_Before_filtering.svg:md5,bf51d5e029164a62af8a97002bafaf91", - "fastp-seq-content-n-plot_Read_1_After_filtering.svg:md5,1cd1bb467239c3375c0670deb40910e4", - "fastp-seq-content-n-plot_Read_1_Before_filtering.svg:md5,58312bc31b5df1f981ddfaa464747d6a", - "fastp-seq-content-n-plot_Read_2_After_filtering.svg:md5,4b4d0bb5ee8e778e36d0b22b50e588ac", - "fastp-seq-content-n-plot_Read_2_Before_filtering.svg:md5,5a4346d963e57ef9dc93049473b299d4", - "fastp-seq-quality-plot_Read_1_After_filtering.svg:md5,8df1ad718fba86d1dc9100f686805969", - "fastp-seq-quality-plot_Read_1_Before_filtering.svg:md5,2ab2d86c525286641d2add385a2776b8", - "fastp-seq-quality-plot_Read_2_After_filtering.svg:md5,57fc98afa287a7efcb4cda584aaa1b03", - "fastp-seq-quality-plot_Read_2_Before_filtering.svg:md5,0255426c3f1eb52d8cc79e15becc30a2", - "fastp_filtered_reads_plot-cnt.svg:md5,e824977b86925e3f373258ecdd4043e3", - "fastp_filtered_reads_plot-pct.svg:md5,481a650cbb8337fd7324909c08782fbb", - "mosdepth-coverage-per-contig-single-cnt.svg:md5,54a9e9adab8aec8840883d8fbfd9a5d0", - "mosdepth-coverage-per-contig-single-pct.svg:md5,131d4cac8f19f0b95032c7233af5823e", - "mosdepth-cumcoverage-dist-id.svg:md5,179007d2d118f6a8e418e43aeaeb9c59", - "picard_alignment_readlength_plot.svg:md5,8251fdfdcf8d1cfcafa2c5e4274b5dd1", - "picard_alignment_summary_Aligned_Bases-cnt.svg:md5,fd201a6cf172881e6f665f3bf709e47d", - "picard_alignment_summary_Aligned_Bases-pct.svg:md5,000fee385374691cee56da73f6b1a6e3", - "picard_alignment_summary_Aligned_Reads-cnt.svg:md5,2dab47d583abe346da10f9cc7326afcf", - "picard_alignment_summary_Aligned_Reads-pct.svg:md5,d4a37067193df967815f12979b3af04c", - "picard_base_distribution_by_cycle__Adenine.svg:md5,218b08544c23a6efa4658d7f3752e104", - "picard_base_distribution_by_cycle__Cytosine.svg:md5,ab5e2bc1042bb94494552650de3f5572", - "picard_base_distribution_by_cycle__Guanine.svg:md5,b55b38dd248d4bb58d45727640b08bdb", - "picard_base_distribution_by_cycle__Thymine.svg:md5,3207e557593827437917773a6d7a3076", - "picard_base_distribution_by_cycle__Undetermined.svg:md5,ce646cb1a14cf74c5d07cd95ea3ea6fa", - "picard_quality_by_cycle.svg:md5,8d09b50d5323d7d08e78694e2b4f5783", - "picard_quality_score_distribution.svg:md5,252451413c9a1305642aeca9540fe95b", - "picard_wgs_metrics_bases.svg:md5,2433b911e40ebe4bf49fabfdd473f488", - "picard_wgs_metrics_histogram_Counts_Histogram.svg:md5,90789c6587b1924a203de3ea67051e1d", - "picard_wgs_metrics_histogram_Percentage_Drop-Off.svg:md5,57bf92e2f97b6698a78761e9133d696d", - "samtools-coverage-table.svg:md5,dc9a03bbcdc8e6c85ecdcbc473c284e5", - "samtools-coverage_BQ-cnt.svg:md5,3bf9dd0ff0afb7dac4e82c3cc0debee6", - "samtools-coverage_BQ-log.svg:md5,3503b4d291a6bc5f13321ea35367173c", - "samtools-coverage_Bases-cnt.svg:md5,1da43ab7b821f0950bc5fcd9d0ef4de6", - "samtools-coverage_Bases-log.svg:md5,5d6d1e30f71dc901bc854891f8a86c8b", - "samtools-coverage_Coverage-cnt.svg:md5,bd068ea990b4a9ab34f8ed7906ab4df7", - "samtools-coverage_Coverage-log.svg:md5,a84dbdcc47032a0802f0f4303fff79e5", - "samtools-coverage_MQ-cnt.svg:md5,a34d1b3ef3307b7f239f345c4c46417c", - "samtools-coverage_MQ-log.svg:md5,f0d92ed6064fe3857222add705200ebf", - "samtools-coverage_Mean_depth-cnt.svg:md5,beb5c52e77b588aff06211996b5c9c58", - "samtools-coverage_Mean_depth-log.svg:md5,bf0fe9b38385d501bfdc0eb8ae32dc0c", - "samtools-coverage_Reads-cnt.svg:md5,a0f29b2d300f8d441cf0444dfed15d2c", - "samtools-coverage_Reads-log.svg:md5,2b286ec78f439cc836c27b894355a649", - "samtools-flagstat-pct-table.svg:md5,a861423dc06a2c4343ac008da572cae6", - "samtools-flagstat-table.svg:md5,7e3929334dc02949b8a8624cee0b74f7", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-cnt.svg:md5,6beb4644520950ba9d88aa2fc76f97ca", - "samtools-idxstats-mapped-reads-plot_Normalised_Counts-log.svg:md5,bdd312d3b7078cf983b55365b073c8da", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-cnt.svg:md5,cacd164220e021555bfab9d77d1604d6", - "samtools-idxstats-mapped-reads-plot_Observed_over_Expected_Counts-log.svg:md5,a0afc475e749152c8a1f68348e126468", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-cnt.svg:md5,70ee0003a9ad53ef889f8b1e6ab29fbd", - "samtools-idxstats-mapped-reads-plot_Raw_Counts-log.svg:md5,10677c752400f74cb2d80b448a7ecb6e", - "samtools-stats-dp.svg:md5,7a82a092680d0a2f74bc6bd7ddaff3ff", - "samtools_alignment_plot-cnt.svg:md5,57bf2b3f8ae396795a58e41c6a13eaad", - "samtools_alignment_plot-pct.svg:md5,11319f379dfc395ae27e63e58911a7dc" - ] - ] + "multiqc_library_test_plots" ], "multiqc_library_report": [ - "multiqc_library_test.html:md5,39501e6d3e661aa5268cc7bc3013842e" + "multiqc_library_test.html" ], "multiqc_main_data": [ [ - [ - "llms-full.txt:md5,5c2ab84efb61df9527a502df6d502f6b", - "multiqc.log:md5,b1c042eb498add3a6e44b5b1198a11a3", - "multiqc.parquet:md5,38b4675edf61dc905c4e5001dc8dcde1", - "multiqc_citations.txt:md5,4c806e63a283ec1b7e78cdae3a923d4f", - "multiqc_data.json:md5,3372e515c6d7aee673f28f47c22507ba", - "multiqc_software_versions.txt:md5,b957e99d3c8616d8a0326be3f6114ced", - "multiqc_sources.txt:md5,d2a044df39ce3c6abe5cdc2d67473490" - ] + "multiqc_data" ] ], "multiqc_main_plots": [ @@ -1992,7 +1338,7 @@ ], "multiqc_main_report": [ [ - "multiqc.html:md5,62160777bc781484c4e2434e8c6009ff" + "multiqc.html" ] ], "panelcoverage": [ @@ -2242,6 +1588,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T19:51:58.967318" + "timestamp": "2025-12-04T20:39:54.655718" } } \ No newline at end of file From d0da19e7166bc78e875825aab9bd2c952e509a85 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 15:31:47 +0100 Subject: [PATCH 091/202] Update schema and test input with aligner: false --- assets/schema_input.json | 4 ++-- assets/schema_sampleinfo.json | 4 ++-- nextflow_schema.json | 4 ++-- tests/inputs/fastq.yml | 18 ++++++++++++++++++ 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index deb42ab7..1e576bb7 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -35,9 +35,9 @@ }, "aligner": { "meta": ["aligner"], - "type": "string", + "type": ["string", "boolean"], "description": "Aligner to use to align sample to the reference genome", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star"] + "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star", "false", false] }, "tag": { "meta": ["tag"], diff --git a/assets/schema_sampleinfo.json b/assets/schema_sampleinfo.json index c5443971..daa63fc0 100644 --- a/assets/schema_sampleinfo.json +++ b/assets/schema_sampleinfo.json @@ -83,9 +83,9 @@ }, "aligner": { "meta": ["aligner"], - "type": "string", + "type": ["string", "boolean"], "description": "Aligner to use to align sample to the reference genome", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star"] + "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star", "false", false] } } }, diff --git a/nextflow_schema.json b/nextflow_schema.json index 1003fc1b..17c9bee5 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -52,10 +52,10 @@ "default": "", "properties": { "aligner": { - "type": "string", + "type": ["string", "boolean"], "default": "bowtie2", "description": "Which aligner to use", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star"] + "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star", "false", false] }, "markdup": { "type": "string", diff --git a/tests/inputs/fastq.yml b/tests/inputs/fastq.yml index 20a5ec56..87c8daf3 100644 --- a/tests/inputs/fastq.yml +++ b/tests/inputs/fastq.yml @@ -5,6 +5,7 @@ library: test_library organism: Homo sapiens tag: WES + aligner: bwamem fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz - id: sample1_L002 @@ -12,5 +13,22 @@ library: test_library organism: Homo sapiens tag: WES + aligner: bwamem + fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz + fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz +- id: sample2_L001 + samplename: fastq_paired_unaligned + library: test_unaligned + organism: Homo sapiens + tag: WES + aligner: false + fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz + fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz +- id: sample2_L002 + samplename: fastq_paired_unaligned + library: test_unaligned + organism: Homo sapiens + tag: WES + aligner: false fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz From e390159ed389f9dbc6d1a95214ef989c5625e0f8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 19:25:18 +0100 Subject: [PATCH 092/202] convert untrimmed fastq -> ucram --- workflows/preprocessing.nf | 65 +++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index c737d2b1..a51b5b09 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -166,6 +166,11 @@ workflow PREPROCESSING { if (aligner && !meta.aligner) { meta = meta + ["aligner": aligner] } + + // If the aligner is set to `false`, redirect sample to unaligned flow by dropping the genome_data key + if (meta.aligner == false || meta.aligner == "false") { + meta = meta - meta.subMap('genome_data') + } // set the ROI // // Special case for coPGT samples // // if there's no global ROI AND no sample speficic ROI @@ -188,12 +193,26 @@ workflow PREPROCESSING { .map { meta, fastq -> return [meta - meta.subMap('fcid', 'lane'), fastq] } + .branch { meta, _reads -> + supported: meta.genome_data instanceof Map && meta.genome_data.size() > 0 + other: true + } .set { ch_fastq_per_sample } - ch_fastq_per_sample.dump(tag: "FASTQ per sample", pretty: true) + ch_fastq_per_sample.supported.dump(tag: "Supported FASTQ per sample", pretty: true) + ch_fastq_per_sample.other.dump(tag: "Other FASTQ per sample", pretty: true) +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// STEP: FASTQ TO UNALIGNED CRAM CONVERSION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ - /* + FASTQ_TO_UCRAM(ch_fastq_per_sample.other) + ch_versions = ch_versions.mix(FASTQ_TO_UCRAM.out.versions) + + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // FASTQ TRIMMING AND QC ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -223,44 +242,26 @@ workflow PREPROCESSING { reads, ] } - .branch { meta, _reads -> - supported: meta.genome_data instanceof Map && meta.genome_data.size() > 0 - other: true - } .set { ch_trimmed_reads } - ch_trimmed_reads.supported.dump(tag: "Supported trimmed reads per sample", pretty: true) - ch_trimmed_reads.other.dump(tag: "Other trimmed reads per sample", pretty: true) - - - /* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// STEP: FASTQ TO UNALIGNED CRAM CONVERSION -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - - FASTQ_TO_UCRAM(ch_trimmed_reads.other) - ch_versions = ch_versions.mix(FASTQ_TO_UCRAM.out.versions) - - /* + ch_trimmed_reads.dump(tag: "Supported trimmed reads per sample", pretty: true) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: FASTQ TO ALIGNED CRAM CONVERSION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_trimmed_reads.supported - .map { meta, reads -> - return [ - meta, - reads, - meta.aligner, - getGenomeAttribute(meta.genome_data, meta.aligner), - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "gtf"), - ] - } - .set { ch_meta_reads_aligner_index_fasta_gtf } + ch_trimmed_reads.map { meta, reads -> + return [ + meta, + reads, + meta.aligner, + getGenomeAttribute(meta.genome_data, meta.aligner), + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "gtf"), + ] + } + .set { ch_meta_reads_aligner_index_fasta_gtf } FASTQ_TO_CRAM( ch_meta_reads_aligner_index_fasta_gtf, From 52c3f8a4207a0267c22ff0a8321f5301186ee554 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 19:59:16 +0100 Subject: [PATCH 093/202] Drop support for unaligned cram --- CHANGELOG.md | 1 + main.nf | 5 - modules.json | 11 -- modules/nf-core/samtools/cat/environment.yml | 10 -- modules/nf-core/samtools/cat/main.nf | 50 --------- modules/nf-core/samtools/cat/meta.yml | 64 ----------- .../nf-core/samtools/cat/samtools-cat.diff | 23 ---- .../nf-core/samtools/cat/tests/main.nf.test | 61 ----------- .../samtools/cat/tests/main.nf.test.snap | 70 ------------ .../nf-core/samtools/import/environment.yml | 10 -- modules/nf-core/samtools/import/main.nf | 59 ---------- modules/nf-core/samtools/import/meta.yml | 77 ------------- .../samtools/import/tests/main.nf.test | 83 -------------- .../samtools/import/tests/main.nf.test.snap | 103 ------------------ .../local/fastq_to_unaligned_cram/main.nf | 67 ------------ .../local/fastq_to_unaligned_cram/meta.yml | 0 .../fastq_to_unaligned_cram/main.nf.test | 36 ------ .../fastq_to_unaligned_cram/main.nf.test.snap | 30 ----- workflows/preprocessing.nf | 20 +--- 19 files changed, 5 insertions(+), 775 deletions(-) delete mode 100644 modules/nf-core/samtools/cat/environment.yml delete mode 100644 modules/nf-core/samtools/cat/main.nf delete mode 100644 modules/nf-core/samtools/cat/meta.yml delete mode 100644 modules/nf-core/samtools/cat/samtools-cat.diff delete mode 100644 modules/nf-core/samtools/cat/tests/main.nf.test delete mode 100644 modules/nf-core/samtools/cat/tests/main.nf.test.snap delete mode 100644 modules/nf-core/samtools/import/environment.yml delete mode 100644 modules/nf-core/samtools/import/main.nf delete mode 100644 modules/nf-core/samtools/import/meta.yml delete mode 100644 modules/nf-core/samtools/import/tests/main.nf.test delete mode 100644 modules/nf-core/samtools/import/tests/main.nf.test.snap delete mode 100644 subworkflows/local/fastq_to_unaligned_cram/main.nf delete mode 100644 subworkflows/local/fastq_to_unaligned_cram/meta.yml delete mode 100644 tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test delete mode 100644 tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap diff --git a/CHANGELOG.md b/CHANGELOG.md index 69949def..a93a96cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update the output handling to use the new workflow output definitions. - Bump all modules to latest versions. - The workflow now outputs data in a subdirectory per `library`, including a library specific MultiQC report +- Drop support for unaligned cram outputs. ## v2.0.6 diff --git a/main.nf b/main.nf index 87371efa..5cae5882 100644 --- a/main.nf +++ b/main.nf @@ -70,7 +70,6 @@ workflow { demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by:1) fastp_json = PREPROCESSING.out.fastp_json fastp_html = PREPROCESSING.out.fastp_html - ucrams = PREPROCESSING.out.ucrams crams = PREPROCESSING.out.crams align_reports = PREPROCESSING.out.align_reports sormadup_metrics = PREPROCESSING.out.sormadup_metrics @@ -124,10 +123,6 @@ output { def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" html >> out_path } } - ucrams { path { meta, cram -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.unaligned.cram" as String : "${meta.samplename}/${meta.samplename}.unaligned.cram" - cram >> out_path - } } crams { path { meta, cram, crai -> def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" diff --git a/modules.json b/modules.json index cbebbe1e..fe836420 100644 --- a/modules.json +++ b/modules.json @@ -86,12 +86,6 @@ "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, - "samtools/cat": { - "branch": "master", - "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": ["modules"], - "patch": "modules/nf-core/samtools/cat/samtools-cat.diff" - }, "samtools/convert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", @@ -114,11 +108,6 @@ "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", "installed_by": ["modules"] }, - "samtools/import": { - "branch": "master", - "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": ["modules"] - }, "samtools/sormadup": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", diff --git a/modules/nf-core/samtools/cat/environment.yml b/modules/nf-core/samtools/cat/environment.yml deleted file mode 100644 index 89e12a64..00000000 --- a/modules/nf-core/samtools/cat/environment.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - conda-forge - - bioconda -dependencies: - # renovate: datasource=conda depName=bioconda/htslib - - bioconda::htslib=1.22.1 - # renovate: datasource=conda depName=bioconda/samtools - - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/cat/main.nf b/modules/nf-core/samtools/cat/main.nf deleted file mode 100644 index d200e501..00000000 --- a/modules/nf-core/samtools/cat/main.nf +++ /dev/null @@ -1,50 +0,0 @@ -process SAMTOOLS_CAT { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.22.1--h96c455f_0' : - 'biocontainers/samtools:1.22.1--h96c455f_0' }" - - input: - tuple val(meta), path(input_files, stageAs: "?/*") - - output: - tuple val(meta), path("*.bam") , optional:true, emit: bam - tuple val(meta), path("*.cram"), optional:true, emit: cram - path "versions.yml" , emit: versions - - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def file_type = input_files instanceof List ? input_files[0].getExtension() : input_files.getExtension() - """ - samtools \\ - cat \\ - $args \\ - -o ${prefix}.${file_type} \\ - $input_files - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ - - stub: - prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}" - def file_type = input_files instanceof List ? input_files[0].getExtension() : input_files.getExtension() - """ - touch ${prefix}.${file_type} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/samtools/cat/meta.yml b/modules/nf-core/samtools/cat/meta.yml deleted file mode 100644 index a2ac0e21..00000000 --- a/modules/nf-core/samtools/cat/meta.yml +++ /dev/null @@ -1,64 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json -name: samtools_cat -description: Concatenate BAM or CRAM file -keywords: - - merge - - bam - - sam - - cram -tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: http://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] - identifier: biotools:samtools -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - input_files: - type: file - description: BAM/CRAM files - pattern: "*.{bam,cram}" - ontologies: [] -output: - bam: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.bam: - type: file - description: Concatenated BAM file - pattern: "*.{bam}" - ontologies: [] - cram: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - ${prefix}.cram: - type: file - description: Concatenated CRAM file - pattern: "*.{cram}" - ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML -authors: - - "@matthdsm" -maintainers: - - "@matthdsm" diff --git a/modules/nf-core/samtools/cat/samtools-cat.diff b/modules/nf-core/samtools/cat/samtools-cat.diff deleted file mode 100644 index 5b6918b7..00000000 --- a/modules/nf-core/samtools/cat/samtools-cat.diff +++ /dev/null @@ -1,23 +0,0 @@ -Changes in component 'nf-core/samtools/cat' -'modules/nf-core/samtools/cat/environment.yml' is unchanged -'modules/nf-core/samtools/cat/meta.yml' is unchanged -Changes in 'samtools/cat/main.nf': ---- modules/nf-core/samtools/cat/main.nf -+++ modules/nf-core/samtools/cat/main.nf -@@ -11,9 +11,9 @@ - tuple val(meta), path(input_files, stageAs: "?/*") - - output: -- tuple val(meta), path("${prefix}.bam") , optional:true, emit: bam -- tuple val(meta), path("${prefix}.cram"), optional:true, emit: cram -- path "versions.yml" , emit: versions -+ tuple val(meta), path("*.bam") , optional:true, emit: bam -+ tuple val(meta), path("*.cram"), optional:true, emit: cram -+ path "versions.yml" , emit: versions - - - when: - -'modules/nf-core/samtools/cat/tests/main.nf.test.snap' is unchanged -'modules/nf-core/samtools/cat/tests/main.nf.test' is unchanged -************************************************************ diff --git a/modules/nf-core/samtools/cat/tests/main.nf.test b/modules/nf-core/samtools/cat/tests/main.nf.test deleted file mode 100644 index dad80b83..00000000 --- a/modules/nf-core/samtools/cat/tests/main.nf.test +++ /dev/null @@ -1,61 +0,0 @@ -nextflow_process { - - name "Test Process SAMTOOLS_CAT" - script "../main.nf" - process "SAMTOOLS_CAT" - - tag "modules" - tag "modules_nfcore" - tag "samtools" - tag "samtools/cat" - - test("bams") { - - when { - process { - """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map - [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.unaligned.bam', checkIfExists: true) ] - ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("bams_bam") }, - { assert snapshot(process.out.cram).match("bams_cram") }, - { assert snapshot(process.out.versions).match("bams_versions") } - ) - } - } - - test("bams_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/bam/test.paired_end.bam', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.unaligned.bam', checkIfExists: true) ] - ]) - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("bams_stub_bam") }, - { assert snapshot(process.out.cram).match("bams_stub_cram") }, - { assert snapshot(process.out.versions).match("bams_stub_versions") } - ) - } - } -} diff --git a/modules/nf-core/samtools/cat/tests/main.nf.test.snap b/modules/nf-core/samtools/cat/tests/main.nf.test.snap deleted file mode 100644 index 2143309a..00000000 --- a/modules/nf-core/samtools/cat/tests/main.nf.test.snap +++ /dev/null @@ -1,70 +0,0 @@ -{ - "bams_stub_cram": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-02T16:45:42.587418" - }, - "bams_stub_versions": { - "content": [ - [ - "versions.yml:md5,99695cce7873f354da5dd8660522cb4f" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T13:02:09.79415" - }, - "bams_bam": { - "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-02T16:45:37.965199" - }, - "bams_cram": { - "content": [ - [ - - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-02T16:45:37.96805" - }, - "bams_stub_bam": { - "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.04.3" - }, - "timestamp": "2024-02-02T16:45:42.583881" - }, - "bams_versions": { - "content": [ - [ - "versions.yml:md5,99695cce7873f354da5dd8660522cb4f" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T13:02:05.668116" - } -} \ No newline at end of file diff --git a/modules/nf-core/samtools/import/environment.yml b/modules/nf-core/samtools/import/environment.yml deleted file mode 100644 index 89e12a64..00000000 --- a/modules/nf-core/samtools/import/environment.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - conda-forge - - bioconda -dependencies: - # renovate: datasource=conda depName=bioconda/htslib - - bioconda::htslib=1.22.1 - # renovate: datasource=conda depName=bioconda/samtools - - bioconda::samtools=1.22.1 diff --git a/modules/nf-core/samtools/import/main.nf b/modules/nf-core/samtools/import/main.nf deleted file mode 100644 index 0efbc75a..00000000 --- a/modules/nf-core/samtools/import/main.nf +++ /dev/null @@ -1,59 +0,0 @@ -process SAMTOOLS_IMPORT { - 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/samtools:1.22.1--h96c455f_0': - 'biocontainers/samtools:1.22.1--h96c455f_0' }" - - input: - tuple val(meta), path(reads) - - output: - tuple val(meta), path("*.sam") , emit: sam, optional: true - tuple val(meta), path("*.bam") , emit: bam, optional: true - tuple val(meta), path("*.cram"), emit: cram, optional: true - 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 suffix = args.contains("--output-fmt sam") ? "sam" : - args.contains("--output-fmt bam") ? "bam" : - args.contains("--output-fmt cram") ? "cram" : - "bam" - def input = reads instanceof List && meta.single_end ? reads.join(" -0") : // multiple single-end files - reads instanceof List && !meta.single_end ? "-1 ${reads[0]} -2 ${reads[1]}": // paired end file - meta.single_end ? "-0 $reads" : // single single-end file - !meta.single_end ? "-s $reads": // interleave paired-end file - reads // if all else fails, just add the reads without flags - """ - samtools \\ - import \\ - $input \\ - $args \\ - -@ $task.cpus \\ - -o ${prefix}.${suffix} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - - """ - touch ${prefix}.bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/nf-core/samtools/import/meta.yml b/modules/nf-core/samtools/import/meta.yml deleted file mode 100644 index 2b86ce79..00000000 --- a/modules/nf-core/samtools/import/meta.yml +++ /dev/null @@ -1,77 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json -name: "samtools_import" -description: converts FASTQ files to unmapped SAM/BAM/CRAM -keywords: - - import - - fastq - - bam - - sam - - cram -tools: - - samtools: - description: | - SAMtools is a set of utilities for interacting with and post-processing - short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. - These files are generated as output by short read aligners like BWA. - homepage: http://www.htslib.org/ - documentation: http://www.htslib.org/doc/samtools.html - doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] - identifier: biotools:samtools -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - reads: - type: file - description: fastq data to be converted to SAM/BAM/CRAM - pattern: "*.{fastq,fq,fastq.gz,fq.gz}" - ontologies: - - edam: http://edamontology.org/format_1930 # FASTQ -output: - sam: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - "*.sam": - type: file - description: SAM file - pattern: "*.sam" - ontologies: [] - bam: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - "*.bam": - type: file - description: Unaligned BAM file - pattern: "*.bam" - ontologies: [] - cram: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - "*.cram": - type: file - description: Unaligned CRAM file - pattern: "*.cram" - ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML -authors: - - "@matthdsm" -maintainers: - - "@matthdsm" diff --git a/modules/nf-core/samtools/import/tests/main.nf.test b/modules/nf-core/samtools/import/tests/main.nf.test deleted file mode 100644 index 9c7ce5d9..00000000 --- a/modules/nf-core/samtools/import/tests/main.nf.test +++ /dev/null @@ -1,83 +0,0 @@ -nextflow_process { - - name "Test Process SAMTOOLS_IMPORT" - script "../main.nf" - process "SAMTOOLS_IMPORT" - tag "modules" - tag "modules_nfcore" - tag "samtools" - tag "samtools/import" - - test("samtools_import_single ") { - - 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.bam.collect { it.collect { it instanceof Map ? it : file(it).name } }).match()} - ) - } - } - - test("samtools_import_paired ") { - - when { - params { - outdir = "$outputDir" - } - 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 { - assertAll( - {assert process.success}, - {assert snapshot(process.out.bam.collect { it.collect { it instanceof Map ? it : file(it).name } }).match()} - ) - } - } - - test("samtools_import_interleaved") { - - when { - params { - outdir = "$outputDir" - } - process { - """ - input[0] = Channel.of([ - [ id:'test', single_end:false ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_interleaved.fastq.gz', checkIfExists: true) - ]) - """ - } - } - - then { - assertAll( - {assert process.success}, - {assert snapshot(process.out.bam.collect { it.collect { it instanceof Map ? it : file(it).name } }).match()} - ) - } - } -} diff --git a/modules/nf-core/samtools/import/tests/main.nf.test.snap b/modules/nf-core/samtools/import/tests/main.nf.test.snap deleted file mode 100644 index eb730a06..00000000 --- a/modules/nf-core/samtools/import/tests/main.nf.test.snap +++ /dev/null @@ -1,103 +0,0 @@ -{ - "samtools_import_single ": { - "content": [ - [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-05-31T11:38:44.388259606" - }, - "samtools_import_interleaved": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-05-31T11:38:56.393371331" - }, - "samtools_import_paired ": { - "content": [ - [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam" - ] - ] - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-05-31T11:38:50.437197406" - }, - "samtools_import_interleaved ": { - "content": [ - { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam:md5,fad91b070f51c77d7abe22cd31243710" - ] - ], - "2": [ - - ], - "3": [ - "versions.yml:md5,a529fc2aa6485db14986c95c53638b11" - ], - "bam": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam:md5,fad91b070f51c77d7abe22cd31243710" - ] - ], - "cram": [ - - ], - "sam": [ - - ], - "versions": [ - "versions.yml:md5,a529fc2aa6485db14986c95c53638b11" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, - "timestamp": "2024-05-30T12:12:43.491200967" - } -} \ No newline at end of file diff --git a/subworkflows/local/fastq_to_unaligned_cram/main.nf b/subworkflows/local/fastq_to_unaligned_cram/main.nf deleted file mode 100644 index f1137f26..00000000 --- a/subworkflows/local/fastq_to_unaligned_cram/main.nf +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env nextflow - -// -// Take fastq; convert to ubam and compress - -// MODULES -include { SAMTOOLS_CAT } from '../../../modules/nf-core/samtools/cat/main' -include { SAMTOOLS_IMPORT } from "../../../modules/nf-core/samtools/import/main" - -workflow FASTQ_TO_UCRAM { - take: - ch_fastq // channel: [mandatory] [meta, [fastq, ...]] - - main: - - ch_versions = channel.empty() - - /* - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // STEP: FASTQ TO BAM CONVERSION - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ - - ch_fastq.dump(tag: "FASTQ_TO_UCRAM: reads to convert", pretty: true) - - // SAMTOOLS_IMPORT([meta, fastq]) - SAMTOOLS_IMPORT(ch_fastq) - ch_versions = ch_versions.mix(SAMTOOLS_IMPORT.out.versions.first()) - - SAMTOOLS_IMPORT.out.cram - .map { meta, files -> - def gk = (meta.chunks as Integer ?: 1) - return [ - groupKey( - meta - meta.subMap('id', 'readgroup', 'chunks') + [id: meta.samplename ? meta.samplename + ".unaligned" : meta.id + ".unaligned"], - gk, - ), - files, - ] - } - .groupTuple(by: [0]) - .dump(tag: "FASTQ_TO_UCRAM: unaligned cram per replicate", pretty: true) - .map { meta, files -> - def gk = (meta.count as Integer ?: 1) - return [ - groupKey( - meta - meta.subMap('count'), - gk, - ), - files, - ] - } - .groupTuple(by: [0]) - .map { meta, files -> - return [meta, files.flatten()] - } - .dump(tag: "FASTQ_TO_UCRAM: unaligned cram per sample", pretty: true) - .set { ch_ubam_per_sample } - - // Merge bam files per sample - SAMTOOLS_CAT(ch_ubam_per_sample) - ch_versions = ch_versions.mix(SAMTOOLS_CAT.out.versions.first()) - - emit: - cram = SAMTOOLS_CAT.out.cram // [meta, cram] - versions = ch_versions // versions -} diff --git a/subworkflows/local/fastq_to_unaligned_cram/meta.yml b/subworkflows/local/fastq_to_unaligned_cram/meta.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test b/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test deleted file mode 100644 index b3a3b185..00000000 --- a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test +++ /dev/null @@ -1,36 +0,0 @@ -nextflow_workflow { - - name "Test Workflow FASTQ_TO_UCRAM" - script "subworkflows/local/fastq_to_unaligned_cram/main.nf" - workflow "FASTQ_TO_UCRAM" - - tag "subworkflows" - tag "subworkflows/local" - tag "subworkflows/local/fastq_to_unaligned_cram" - - test("fastq to unaligned cram") { - - when { - workflow { - """ - input[0] = Channel.of([ - [ id:'test', samplename:'test', single_end:false ], // meta map - [ - file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), - file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz", checkIfExists: true) - ] - ]) - """ - } - } - - then { - assert workflow.success - assert snapshot( - sanitizeOutput(workflow.out, unstableKeys:["cram"]) - ).match() - } - - } - -} diff --git a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap deleted file mode 100644 index 39fd0d73..00000000 --- a/tests/subworkflows/local/fastq_to_unaligned_cram/main.nf.test.snap +++ /dev/null @@ -1,30 +0,0 @@ -{ - "fastq to unaligned cram": { - "content": [ - { - "cram": [ - [ - { - "groupSize": 1, - "groupTarget": { - "id": "test.unaligned", - "samplename": "test", - "single_end": false - } - }, - "test.unaligned.cram" - ] - ], - "versions": [ - "versions.yml:md5,7d0123b33defe52fceb94bd95f802978", - "versions.yml:md5,f253e859e7aa43e34481f5493c4e847b" - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2025-12-02T13:05:20.48603" - } -} \ No newline at end of file diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index a51b5b09..86297aa5 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -15,11 +15,10 @@ include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' // Subworkflows -include { BAM_QC } from '../subworkflows/local/bam_qc/main' -include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' -include { COVERAGE } from '../subworkflows/local/coverage/main' -include { FASTQ_TO_UCRAM } from '../subworkflows/local/fastq_to_unaligned_cram/main' -include { FASTQ_TO_CRAM } from '../subworkflows/local/fastq_to_aligned_cram/main' +include { BAM_QC } from '../subworkflows/local/bam_qc/main' +include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' +include { COVERAGE } from '../subworkflows/local/coverage/main' +include { FASTQ_TO_CRAM } from '../subworkflows/local/fastq_to_aligned_cram/main' // Functions include { paramsSummaryMap } from 'plugin/nf-schema' @@ -202,16 +201,6 @@ workflow PREPROCESSING { ch_fastq_per_sample.supported.dump(tag: "Supported FASTQ per sample", pretty: true) ch_fastq_per_sample.other.dump(tag: "Other FASTQ per sample", pretty: true) -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// STEP: FASTQ TO UNALIGNED CRAM CONVERSION -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - - FASTQ_TO_UCRAM(ch_fastq_per_sample.other) - ch_versions = ch_versions.mix(FASTQ_TO_UCRAM.out.versions) - - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // FASTQ TRIMMING AND QC @@ -502,7 +491,6 @@ workflow PREPROCESSING { demultiplex_logs = BCL_DEMULTIPLEX.out.logs fastp_json = FASTP.out.json fastp_html = FASTP.out.html - ucrams = FASTQ_TO_UCRAM.out.cram crams = FASTQ_TO_CRAM.out.cram_crai align_reports = FASTQ_TO_CRAM.out.align_reports sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics From 46368d86548b792e72378051ed31d4801077139b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 20:51:38 +0100 Subject: [PATCH 094/202] redirect fastq to output when aligner is unset --- workflows/preprocessing.nf | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 86297aa5..07c8c439 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -161,10 +161,6 @@ workflow PREPROCESSING { else { meta = meta + ["genome_data": [:]] } - // set the aligner - if (aligner && !meta.aligner) { - meta = meta + ["aligner": aligner] - } // If the aligner is set to `false`, redirect sample to unaligned flow by dropping the genome_data key if (meta.aligner == false || meta.aligner == "false") { @@ -193,7 +189,7 @@ workflow PREPROCESSING { return [meta - meta.subMap('fcid', 'lane'), fastq] } .branch { meta, _reads -> - supported: meta.genome_data instanceof Map && meta.genome_data.size() > 0 + supported: meta.genome_data instanceof Map && meta.genome_data.size() > 0 && meta.aligner other: true } .set { ch_fastq_per_sample } From 0a094c1ee41c616df326de5332f0dc3c885997fd Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 21:24:49 +0100 Subject: [PATCH 095/202] update workflow output --- CHANGELOG.md | 1 + main.nf | 5 +++++ workflows/preprocessing.nf | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a93a96cc..a6414d52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump all modules to latest versions. - The workflow now outputs data in a subdirectory per `library`, including a library specific MultiQC report - Drop support for unaligned cram outputs. +- Add support for untrimmed fastq outputs for unsupported genomes or when aligner is set to `false`. ## v2.0.6 diff --git a/main.nf b/main.nf index 5cae5882..c45b7344 100644 --- a/main.nf +++ b/main.nf @@ -68,6 +68,7 @@ workflow { demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by:1) demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by:1) demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by:1) + demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() fastp_json = PREPROCESSING.out.fastp_json fastp_html = PREPROCESSING.out.fastp_html crams = PREPROCESSING.out.crams @@ -115,6 +116,10 @@ output { def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" log >> out_path } } + demultiplex_fastq { path { meta, fastq -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" + fastq >> out_path + } } fastp_json { path { meta, json -> def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" json >> out_path diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 07c8c439..abb3a35b 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -205,8 +205,8 @@ workflow PREPROCESSING { // MODULE: fastp // Run QC, trimming and adapter removal - // FASTP([meta, fastq], adapter_fasta, save_trimmed, save_merged) - FASTP(ch_fastq_per_sample.map{ meta, fastq -> return [meta, fastq, []] }, false, false, false) + // FASTP([meta, fastq, adapter_fasta], save_trimmed, save_merged) + FASTP(ch_fastq_per_sample.supported.map{ meta, fastq -> return [meta, fastq, []] }, false, false, false) ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) ch_versions = ch_versions.mix(FASTP.out.versions.first()) @@ -485,6 +485,7 @@ workflow PREPROCESSING { demultiplex_interop = BCL_DEMULTIPLEX.out.interop demultiplex_reports = BCL_DEMULTIPLEX.out.reports demultiplex_logs = BCL_DEMULTIPLEX.out.logs + demultiplex_fastq = ch_fastq_per_sample.other fastp_json = FASTP.out.json fastp_html = FASTP.out.html crams = FASTQ_TO_CRAM.out.cram_crai From ae7e971d4600cb9ca07e1bdc87736a25a8d20a6a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 21:36:58 +0100 Subject: [PATCH 096/202] update docs --- README.md | 2 +- docs/parameters.md | 2 +- docs/usage.md | 44 ++++++++++++++++++++++---------------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 5bbc40e9..50e68f21 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) [![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/) -[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1) +[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.5.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.5.1) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) [![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) [![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) diff --git a/docs/parameters.md b/docs/parameters.md index ba546b9b..f3b3df8e 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -17,7 +17,7 @@ Define where the pipeline should find input data and save output data. | Parameter | Description | Type | Default | Required | Hidden | | ------------------------ | ----------------------------------------------------------------------- | --------- | ----------- | -------- | ------ | -| `aligner` | Which aligner to use | `string` | bowtie2 | True | | +| `aligner` | Which aligner to use. Set to `false` to output fastq. | `string` | bowtie2 | True | | | `markdup` | Which alignment postprocessor to use | `string` | bamsormadup | | | | `run_coverage` | Run coverage analysis steps | `boolean` | True | | | | `skip_trimming` | Skip adapter trimming | `boolean` | False | | | diff --git a/docs/usage.md b/docs/usage.md index fe0779ab..1f1d72d2 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -39,17 +39,17 @@ TREATMENT_REP3,TREATMENT_REP3,AEG588A6_S6_L004_R1_001.fastq.gz,,GRCh38,WES Following table shows the fields that are used by the `fastq` samplesheet: -| Column | Description | Required | -| ------------ | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | -| `fastq_1` | FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz' | :heavy_check_mark: | -| `fastq_2` | FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz' | :x: | -| `samplename` | The sample name corresponding to the sample in the Fastq file(s) | :heavy_check_mark: | -| `genome` | The genome build to use for the analysis. Currently supports GRCh38, GRCm39 and GRCz11 | :heavy_check_mark: (unless `organism` is given) | -| `organism` | Full name of the organism. Currently supports "Homo sapiens", "Mus musculus" and "Danio rerio" | :heavy_check_mark: (unless `genome` is given) | -| `library` | Sample library name | :x: | -| `tag` | The tag used by the sample. Can be one of WES, WGS or coPGT-M | :heavy_check_mark: | -| `roi` | The path to a BED file containing Regions Of Interest for coverage analysis | :x: | -| `aligner` | The aligner to use for this sample. Can be one of these: bowtie2, bwamem, bwamem2, dragmap and snap | :x: | +| Column | Description | Required | +| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | +| `fastq_1` | FastQ file for reads 1 must be provided, cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz' | :heavy_check_mark: | +| `fastq_2` | FastQ file for reads 2 cannot contain spaces and must have extension '.fq.gz' or '.fastq.gz' | :x: | +| `samplename` | The sample name corresponding to the sample in the Fastq file(s) | :heavy_check_mark: | +| `genome` | The genome build to use for the analysis. Currently supports GRCh38, GRCm39 and GRCz11 | :heavy_check_mark: (unless `organism` is given) | +| `organism` | Full name of the organism. Currently supports "Homo sapiens", "Mus musculus" and "Danio rerio" | :heavy_check_mark: (unless `genome` is given) | +| `library` | Sample library name | :x: | +| `tag` | The tag used by the sample. Can be one of WES, WGS or coPGT-M | :heavy_check_mark: | +| `roi` | The path to a BED file containing Regions Of Interest for coverage analysis | :x: | +| `aligner` | The aligner to use for this sample. Can be one of these: bowtie2, bwamem, bwamem2, dragmap, strobe and snap. set to `false` to output fastq. | :x: | An [example samplesheet](../tests/inputs/fastq.yml) has been provided with the pipeline. @@ -84,17 +84,17 @@ Sample1,test,Homo sapiens,WES Following table shows the fields that are used by the `flowcell` samplesheet: -| Column | Description | Required | -| --------------- | --------------------------------------------------------------------------------------------------- | ------------------ | -| `samplename` | The sample name | :heavy_check_mark: | -| `library` | The library name | :x: | -| `tag` | Sample tag. Has to be one of these: WES, WGS, coPGT-M | :heavy_check_mark: | -| `organism` | The organism of the sample. Has to be one of these: "Homo sapiens", "Mus musculus" or "Danio rerio" | :heavy_check_mark: | -| `vivar_project` | The vivar project name (currently not used by the pipeline) | :x: | -| `binsize` | The binsize for CNV analysis (currently not used by the pipeline) | :x: | -| `panels` | A list of panels for coverage analysis | :x: | -| `roi` | Region of interest BED file for coverage analysis | :x: | -| `aligner` | The aligner to use for this sample. Can be one of these: bowtie2, bwamem, bwamem2, dragmap and snap | :x: | +| Column | Description | Required | +| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| `samplename` | The sample name | :heavy_check_mark: | +| `library` | The library name | :x: | +| `tag` | Sample tag. Has to be one of these: WES, WGS, coPGT-M | :heavy_check_mark: | +| `organism` | The organism of the sample. Has to be one of these: "Homo sapiens", "Mus musculus" or "Danio rerio" | :heavy_check_mark: | +| `vivar_project` | The vivar project name (currently not used by the pipeline) | :x: | +| `binsize` | The binsize for CNV analysis (currently not used by the pipeline) | :x: | +| `panels` | A list of panels for coverage analysis | :x: | +| `roi` | Region of interest BED file for coverage analysis | :x: | +| `aligner` | The aligner to use for this sample. Can be one of these: bowtie2, bwamem, bwamem2, dragmap, strobe and snap. Set to `false` to output fastq. | :x: | ### Multiple runs of the same sample From efb3cf564b1c19909713a5c839dbbd6fc6cfbadb Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 22:12:39 +0100 Subject: [PATCH 097/202] output only fastq from demultiplexer, `aligner` param no longer mandatory --- nextflow.config | 2 +- nextflow_schema.json | 3 +-- tests/inputs/fastq.yml | 16 --------------- tests/workflows/preprocessing.nf.test.snap | 24 +++++++++++----------- workflows/preprocessing.nf | 15 +++++++++----- 5 files changed, 24 insertions(+), 36 deletions(-) diff --git a/nextflow.config b/nextflow.config index 6e2cfcae..fab6f6f3 100644 --- a/nextflow.config +++ b/nextflow.config @@ -18,7 +18,7 @@ params { igenomes_ignore = false // Analysis options - aligner = 'bowtie2' + aligner = null markdup = 'bamsormadup' umi_aware = false skip_trimming = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 17c9bee5..67767d53 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -115,8 +115,7 @@ "format": "directory-path", "description": "Directory containing gene list bed files for granular coverage analysis" } - }, - "required": ["aligner"] + } }, "institutional_config_options": { "title": "Institutional config options", diff --git a/tests/inputs/fastq.yml b/tests/inputs/fastq.yml index 87c8daf3..52668235 100644 --- a/tests/inputs/fastq.yml +++ b/tests/inputs/fastq.yml @@ -16,19 +16,3 @@ aligner: bwamem fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz -- id: sample2_L001 - samplename: fastq_paired_unaligned - library: test_unaligned - organism: Homo sapiens - tag: WES - aligner: false - fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz - fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz -- id: sample2_L002 - samplename: fastq_paired_unaligned - library: test_unaligned - organism: Homo sapiens - tag: WES - aligner: false - fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz - fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 4a0b52f8..89d55ce7 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -32,6 +32,9 @@ "sample1.cram", "sample1.cram.crai" ] + ], + "demultiplex_fastq": [ + ], "demultiplex_interop": [ @@ -642,9 +645,6 @@ }, "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" ] - ], - "ucrams": [ - ], "versions": [ "versions.yml:md5,02acae00818ba01a01e2bdb03b574343", @@ -666,7 +666,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T20:36:50.85925" + "timestamp": "2025-12-04T22:06:58.57247" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -701,6 +701,9 @@ "sample1.cram", "sample1.cram.crai" ] + ], + "demultiplex_fastq": [ + ], "demultiplex_interop": [ @@ -989,9 +992,6 @@ }, "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" ] - ], - "ucrams": [ - ], "versions": [ "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", @@ -1009,7 +1009,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T20:42:53.576667" + "timestamp": "2025-12-04T22:11:37.660609" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1043,6 +1043,9 @@ "sample1.cram", "sample1.cram.crai" ] + ], + "demultiplex_fastq": [ + ], "demultiplex_interop": [ @@ -1564,9 +1567,6 @@ }, "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" ] - ], - "ucrams": [ - ], "versions": [ "versions.yml:md5,1d2a9b13790c70a69a1f62facc9b3a6c", @@ -1588,6 +1588,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T20:39:54.655718" + "timestamp": "2025-12-04T22:09:54.979336" } } \ No newline at end of file diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index abb3a35b..29e8f295 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -107,6 +107,10 @@ workflow PREPROCESSING { .map { meta, fq -> return [meta, fq.flatten().unique()] } + .branch { meta, _fastq -> + to_align: meta.aligner && meta.aligner != "false" + other: true + } .set { ch_demultiplexed_fastq_with_sampleinfo } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -139,7 +143,7 @@ workflow PREPROCESSING { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ ch_input_fastq - .mix(ch_demultiplexed_fastq_with_sampleinfo) + .mix(ch_demultiplexed_fastq_with_sampleinfo.to_align) .map { meta, reads -> if (meta.organism && !meta.genome) { if (meta.organism ==~ /(?i)Homo[\s_]sapiens/) { @@ -162,10 +166,11 @@ workflow PREPROCESSING { meta = meta + ["genome_data": [:]] } - // If the aligner is set to `false`, redirect sample to unaligned flow by dropping the genome_data key - if (meta.aligner == false || meta.aligner == "false") { - meta = meta - meta.subMap('genome_data') + // set the aligner + if (aligner && !meta.aligner) { + meta = meta + ["aligner": aligner] } + // set the ROI // // Special case for coPGT samples // // if there's no global ROI AND no sample speficic ROI @@ -485,7 +490,7 @@ workflow PREPROCESSING { demultiplex_interop = BCL_DEMULTIPLEX.out.interop demultiplex_reports = BCL_DEMULTIPLEX.out.reports demultiplex_logs = BCL_DEMULTIPLEX.out.logs - demultiplex_fastq = ch_fastq_per_sample.other + demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other fastp_json = FASTP.out.json fastp_html = FASTP.out.html crams = FASTQ_TO_CRAM.out.cram_crai From 7a23490990145da8347d3cf7b03d5bdda97b7248 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 22:34:44 +0100 Subject: [PATCH 098/202] drop `params.aligner` in favour of per sample `aligner` meta field --- README.md | 8 +++---- assets/schema_input.json | 4 ++-- assets/schema_sampleinfo.json | 9 +++++++- conf/profiles/WES.config | 1 - conf/profiles/WGS.config | 1 - conf/profiles/copgt.config | 1 - conf/profiles/sWGS.config | 1 - conf/test.config | 1 - docs/parameters.md | 1 - main.nf | 1 - nextflow.config | 1 - nextflow_schema.json | 6 ----- tests/default.nf.test | 2 -- tests/workflows/preprocessing.nf.test | 33 ++++++++++++--------------- workflows/preprocessing.nf | 6 ----- 15 files changed, 29 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 50e68f21..f867fbba 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ First, prepare a samplesheet with your input data that looks as follows: `samplesheet.csv` for fastq inputs: ```csv -id,samplename,organism,library,fastq_1,fastq_2 -sample1,sample1,Homo sapiens,Library_Name,reads1.fq.gz,reads2.fq.gz +id,samplename,organism,library,aligner,fastq_1,fastq_2 +sample1,sample1,Homo sapiens,Library_Name,bwamem,reads1.fq.gz,reads2.fq.gz ``` `samplesheet.csv` for flowcell inputs: @@ -57,8 +57,8 @@ flowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/pa `sampleinfo.csv` for use with flowcell inputs: ```csv -samplename,library,organism,tag -fc_sample1,test,Homo sapiens,WES +samplename,library,organism,tag,aligner +fc_sample1,test,Homo sapiens,WES,bwamem ``` Now, you can run the pipeline using: diff --git a/assets/schema_input.json b/assets/schema_input.json index 1e576bb7..7eab645d 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -110,10 +110,10 @@ }, "anyOf": [ { - "required": ["id", "samplename", "organism", "tag", "fastq_1", "fastq_2"] + "required": ["id", "samplename", "organism", "aligner", "tag", "fastq_1", "fastq_2"] }, { - "required": ["id", "samplename", "genome", "tag", "fastq_1", "fastq_2"] + "required": ["id", "samplename", "genome", "aligner", "tag", "fastq_1", "fastq_2"] }, { "required": ["id", "samplesheet", "sample_info", "flowcell"] diff --git a/assets/schema_sampleinfo.json b/assets/schema_sampleinfo.json index daa63fc0..bac6789d 100644 --- a/assets/schema_sampleinfo.json +++ b/assets/schema_sampleinfo.json @@ -89,5 +89,12 @@ } } }, - "required": ["samplename", "tag", "organism"] + "anyOf": [ + { + "required": ["samplename", "organism", "aligner", "tag"] + }, + { + "required": ["samplename", "genome", "aligner", "tag"] + } + ] } diff --git a/conf/profiles/WES.config b/conf/profiles/WES.config index e7dd235b..2fd529a8 100644 --- a/conf/profiles/WES.config +++ b/conf/profiles/WES.config @@ -1,5 +1,4 @@ params { - aligner = "snap" run_coverage = true disable_picard_metrics = false roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v7.bed" diff --git a/conf/profiles/WGS.config b/conf/profiles/WGS.config index 2e1f2c11..657f8ec7 100644 --- a/conf/profiles/WGS.config +++ b/conf/profiles/WGS.config @@ -1,5 +1,4 @@ params { - aligner = "snap" markdup = "samtools" umi_aware = true run_coverage = true diff --git a/conf/profiles/copgt.config b/conf/profiles/copgt.config index 21a5bb45..67fd693b 100644 --- a/conf/profiles/copgt.config +++ b/conf/profiles/copgt.config @@ -1,5 +1,4 @@ params { - aligner = "snap" run_coverage = true disable_picard_metrics = true roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_coPGT-M_analyses_ROI_v1.bed" diff --git a/conf/profiles/sWGS.config b/conf/profiles/sWGS.config index 11be5b28..4497e094 100644 --- a/conf/profiles/sWGS.config +++ b/conf/profiles/sWGS.config @@ -1,5 +1,4 @@ params { - aligner = "bowtie2" run_coverage = false disable_picard_metrics = true } diff --git a/conf/test.config b/conf/test.config index 930c4538..f4ad2b2b 100644 --- a/conf/test.config +++ b/conf/test.config @@ -17,7 +17,6 @@ params { // Input data input = "${projectDir}/tests/inputs/fastq.yml" igenomes_base = "s3://reference-data/genomes" - aligner = "bwamem" } process { diff --git a/docs/parameters.md b/docs/parameters.md index f3b3df8e..914bd868 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -17,7 +17,6 @@ Define where the pipeline should find input data and save output data. | Parameter | Description | Type | Default | Required | Hidden | | ------------------------ | ----------------------------------------------------------------------- | --------- | ----------- | -------- | ------ | -| `aligner` | Which aligner to use. Set to `false` to output fastq. | `string` | bowtie2 | True | | | `markdup` | Which alignment postprocessor to use | `string` | bamsormadup | | | | `run_coverage` | Run coverage analysis steps | `boolean` | True | | | | `skip_trimming` | Skip adapter trimming | `boolean` | False | | | diff --git a/main.nf b/main.nf index c45b7344..9c2b4a22 100644 --- a/main.nf +++ b/main.nf @@ -45,7 +45,6 @@ workflow { PREPROCESSING( PIPELINE_INITIALISATION.out.samplesheet, params.genomes, - params.aligner, params.markdup, params.roi, params.genelists, diff --git a/nextflow.config b/nextflow.config index fab6f6f3..44d91929 100644 --- a/nextflow.config +++ b/nextflow.config @@ -18,7 +18,6 @@ params { igenomes_ignore = false // Analysis options - aligner = null markdup = 'bamsormadup' umi_aware = false skip_trimming = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 67767d53..d7b52ec4 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -51,12 +51,6 @@ "description": "", "default": "", "properties": { - "aligner": { - "type": ["string", "boolean"], - "default": "bowtie2", - "description": "Which aligner to use", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star", "false", false] - }, "markdup": { "type": "string", "default": "bamsormadup", diff --git a/tests/default.nf.test b/tests/default.nf.test index 6eb6875a..ba9b69e3 100644 --- a/tests/default.nf.test +++ b/tests/default.nf.test @@ -12,7 +12,6 @@ nextflow_pipeline { when { params { input = "${projectDir}/tests/inputs/fastq.yml" - aligner = "bwamem" igenomes_base = "s3://reference-data/genomes" outdir = "$outputDir" } @@ -29,7 +28,6 @@ nextflow_pipeline { when { params { input = "${projectDir}/tests/inputs/flowcell.yml" - aligner = "bwamem" igenomes_base = "s3://reference-data/genomes" outdir = "$outputDir" } diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index 54a187ec..6caacb09 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -21,7 +21,8 @@ nextflow_workflow { library: "test", organism: "Homo sapiens", tag: "WES", - sample_type: "DNA" + sample_type: "DNA", + aligner: "bwamem", ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -43,13 +44,11 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] - // aligner - input[2] = "bwamem" // markdup - input[3] = "bamsormadup" + input[2] = "bamsormadup" // roi - input[4] = "https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed" - input[5] = null + input[3] = "https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed" + input[4] = null """ } } @@ -90,7 +89,8 @@ nextflow_workflow { library: "test", organism: "Homo sapiens", tag: "WGS", - sample_type: "DNA" + sample_type: "DNA", + aligner: "bwamem", ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -112,13 +112,11 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] - // aligner - input[2] = "bwamem" // markdup - input[3] = "bamsormadup" + input[2] = "bamsormadup" // roi - input[4] = "" - input[5] = null + input[3] = "" + input[4] = null """ } } @@ -162,7 +160,8 @@ nextflow_workflow { library: "test", organism: "Homo sapiens", tag: "WES", - sample_type: "DNA" + sample_type: "DNA", + aligner: "bwamem", ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -184,13 +183,11 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] - // aligner - input[2] = "bwamem" // markdup - input[3] = "bamsormadup" + input[2] = "bamsormadup" // roi - input[4] = "https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed" - input[5] = null + input[3] = "https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed" + input[4] = null """ } } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 29e8f295..292b5b49 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -37,7 +37,6 @@ workflow PREPROCESSING { take: ch_samplesheet // channel: samplesheet read in from --input genomes // map: genome reference files - aligner // string: global aligner to use markdup // string: markdup method to use roi // file: regions of interest bed file to be applied to all samples genelists // file: directory containing genelist bed files for coverage analysis @@ -166,11 +165,6 @@ workflow PREPROCESSING { meta = meta + ["genome_data": [:]] } - // set the aligner - if (aligner && !meta.aligner) { - meta = meta + ["aligner": aligner] - } - // set the ROI // // Special case for coPGT samples // // if there's no global ROI AND no sample speficic ROI From 3907850fa3a78ce07c31f5e3f4cc7b796d89ab40 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 22:38:17 +0100 Subject: [PATCH 099/202] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6414d52..85b50d0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The workflow now outputs data in a subdirectory per `library`, including a library specific MultiQC report - Drop support for unaligned cram outputs. - Add support for untrimmed fastq outputs for unsupported genomes or when aligner is set to `false`. +- Drop support for globle `aligner` parameter. The aligner must now be specified per sample in the sample sheet or sample info. ## v2.0.6 From eb69f58d7c6f6e8e7126393af405f5d8d0a6db01 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 22:38:36 +0100 Subject: [PATCH 100/202] typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85b50d0c..0d4b7bef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The workflow now outputs data in a subdirectory per `library`, including a library specific MultiQC report - Drop support for unaligned cram outputs. - Add support for untrimmed fastq outputs for unsupported genomes or when aligner is set to `false`. -- Drop support for globle `aligner` parameter. The aligner must now be specified per sample in the sample sheet or sample info. +- Drop support for global `aligner` parameter. The aligner must now be specified per sample in the sample sheet or sample info. ## v2.0.6 From 10ca10007b30f3d659168b22b9c49343c1eee7a8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 4 Dec 2025 22:56:08 +0100 Subject: [PATCH 101/202] update snapshot --- tests/workflows/preprocessing.nf.test.snap | 70 +++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 89d55ce7..6c072d58 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -87,6 +87,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "readgroup": { "CN": "CMGG", @@ -104,7 +105,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, @@ -148,6 +148,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -157,7 +158,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -175,6 +175,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -184,7 +185,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -202,6 +202,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -211,7 +212,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -232,6 +232,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -241,7 +242,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -259,6 +259,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -268,7 +269,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -286,6 +286,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -295,7 +296,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -313,6 +313,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -322,7 +323,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -340,6 +340,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -349,7 +350,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -367,6 +367,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -376,7 +377,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -521,6 +521,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -530,7 +531,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -548,6 +548,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -557,7 +558,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -575,6 +575,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -584,7 +585,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -602,6 +602,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -611,7 +612,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -629,6 +629,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -638,7 +639,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -666,7 +666,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T22:06:58.57247" + "timestamp": "2025-12-04T22:49:24.788115" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -756,6 +756,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "readgroup": { "CN": "CMGG", @@ -773,7 +774,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, @@ -895,6 +895,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -904,7 +905,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -922,6 +922,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -931,7 +932,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -949,6 +949,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -958,7 +959,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -976,6 +976,7 @@ "organism": "Homo sapiens", "tag": "WES", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -985,7 +986,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } @@ -1009,7 +1009,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T22:11:37.660609" + "timestamp": "2025-12-04T22:53:59.211177" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1097,6 +1097,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "readgroup": { "CN": "CMGG", @@ -1114,7 +1115,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "count": 1 }, "sample1.fastp.json:md5,caf903cc79784ceaa71d6ef743c02ff3" @@ -1156,6 +1156,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1165,7 +1166,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1182,6 +1182,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1191,7 +1192,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1208,6 +1208,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1217,7 +1218,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1237,6 +1237,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1246,7 +1247,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1263,6 +1263,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1272,7 +1273,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1298,6 +1298,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1307,7 +1308,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1448,6 +1448,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1457,7 +1458,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1474,6 +1474,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1483,7 +1484,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1500,6 +1500,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1509,7 +1510,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1526,6 +1526,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1535,7 +1536,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1552,6 +1552,7 @@ "organism": "Homo sapiens", "tag": "WGS", "sample_type": "DNA", + "aligner": "bwamem", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1561,7 +1562,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "aligner": "bwamem", "id": "sample1" } }, @@ -1588,6 +1588,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T22:09:54.979336" + "timestamp": "2025-12-04T22:52:15.051988" } } \ No newline at end of file From 9f433ebd1879d3c0711d7910d27ef44c3eb71cc0 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 5 Dec 2025 09:02:51 +0100 Subject: [PATCH 102/202] add GCP error codes to retry clause --- conf/base.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/base.config b/conf/base.config index 67db29f3..27606500 100644 --- a/conf/base.config +++ b/conf/base.config @@ -14,7 +14,7 @@ process { memory = { 6.GB * task.attempt } time = { 4.h * task.attempt } - errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001) ? 'retry' : 'finish' } + errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006) ? 'retry' : 'finish' } maxRetries = 3 maxErrors = '-1' From 78655d03839c95be225b6882baba019b71b0287f Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Sun, 7 Dec 2025 08:00:14 +0100 Subject: [PATCH 103/202] improve MQC pool name --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index e1603297..0f975540 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -253,7 +253,7 @@ process { } withName: MULTIQC_LIBRARY { - ext.prefix = { meta.id ? "multiqc_library_${meta.id}" : "multiqc_library" } + ext.prefix = { meta.id ? "${meta.id}" : "multiqc_library" } ext.args = { meta.id ? "--title \"${meta.id} - Pool Summary\"" : '' } } } From 77c2139d278082201acd1648c3bec92451cbf2c9 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 8 Dec 2025 14:52:34 +0100 Subject: [PATCH 104/202] feat/improve_fq_shard --- CHANGELOG.md | 1 + conf/modules.config | 13 ++++++------- docs/parameters.md | 1 + nextflow.config | 1 + nextflow_schema.json | 15 +++++++++++++++ 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d4b7bef..2648d1d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Drop support for unaligned cram outputs. - Add support for untrimmed fastq outputs for unsupported genomes or when aligner is set to `false`. - Drop support for global `aligner` parameter. The aligner must now be specified per sample in the sample sheet or sample info. +- Simplify fastq sharding and make it user configurable via the `split_fastq` parameter. ## v2.0.6 diff --git a/conf/modules.config b/conf/modules.config index 0f975540..a001512a 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -32,13 +32,12 @@ process { withName: FASTP { ext.args = { [ - meta.single_end && reads.size() > 5000000000 ? "--split_by_lines 400000000" : "", - !meta.single_end && reads.any { f -> f.size() > 5000000000 } ? "--split_by_lines 400000000" : "", - params.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", - params.trim_front > 0 ? "--trim_front1 ${params.trim_front}" : "", - params.trim_tail > 0 ? "--trim_tail1 ${params.trim_tail}" : "", - params.adapter_R1 ? "--adapter_sequence ${params.adapter_R1}" : "", - params.adapter_R2 ? "--adapter_sequence_r2 ${params.adapter_R2}" : "", + params.split_fastq > 0 ? "--split_by_lines ${params.split_fastq * 4}" : '', + params.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", + params.trim_front > 0 ? "--trim_front1 ${params.trim_front}" : "", + params.trim_tail > 0 ? "--trim_tail1 ${params.trim_tail}" : "", + params.adapter_R1 ? "--adapter_sequence ${params.adapter_R1}" : "", + params.adapter_R2 ? "--adapter_sequence_r2 ${params.adapter_R2}" : "", "--compression 1", ].join(" ").trim() } diff --git a/docs/parameters.md b/docs/parameters.md index 914bd868..18c594f1 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -20,6 +20,7 @@ Define where the pipeline should find input data and save output data. | `markdup` | Which alignment postprocessor to use | `string` | bamsormadup | | | | `run_coverage` | Run coverage analysis steps | `boolean` | True | | | | `skip_trimming` | Skip adapter trimming | `boolean` | False | | | +| `split_fastq` | Number of reads per FastQ split (0 to disable splitting) | `integer` | 100000000 | | | | `trim_front` | Number of bases to trim from the front of the read | `integer` | 0 | | | | `trim_tail` | Number of bases to trim from the tail of the read | `integer` | 0 | | | | `adapter_R1` | Adapter sequence to be trimmed | `string` | None | | | diff --git a/nextflow.config b/nextflow.config index 44d91929..cd01f849 100644 --- a/nextflow.config +++ b/nextflow.config @@ -21,6 +21,7 @@ params { markdup = 'bamsormadup' umi_aware = false skip_trimming = false + split_fastq = 100000000 trim_front = 0 trim_tail = 0 adapter_R1 = null diff --git a/nextflow_schema.json b/nextflow_schema.json index d7b52ec4..efbaa2c0 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -72,6 +72,21 @@ "description": "Skip adapter trimming", "default": false }, + "split_fastq": { + "type": "integer", + "oneOf": [ + { + "minimum": 250 + }, + { + "const": 0 + } + ], + "default": 100000000, + "fa_icon": "fas fa-clock", + "description": "Specify how many reads each split of a FastQ file contains. Set 0 to turn off splitting at all.", + "help_text": "Use the the tool FastP to split FASTQ file by number of reads. This parallelizes across fastq file shards speeding up mapping. Note although the minimum value is 250 reads, if you have fewer than 250 reads a single FASTQ shard will still be created." + }, "trim_front": { "type": "integer", "default": 0, From aa5642bbb83a6d7841a5c2ffb9b07d831655c242 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 8 Dec 2025 22:28:23 +0100 Subject: [PATCH 105/202] add optimized resources for WGS on GCP --- conf/modules.config | 14 +----- conf/profiles/gcp.config | 92 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 12 deletions(-) create mode 100644 conf/profiles/gcp.config diff --git a/conf/modules.config b/conf/modules.config index a001512a..13de8a2f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -14,11 +14,6 @@ process { // BCL convert withName: BCLCONVERT { - cpus = 32 - memory = 128.GB - disk = { 1.TB * task.attempt } - stageOutMode = 'copy' - ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", @@ -227,11 +222,6 @@ process { ext.prefix = { "${meta.id}.coverage" } } - //// CoverageQC (Multiqc) - // withName: ".*:COVERAGE:COVERAGEQC" { - // ext.args = { "--title \"Coverage ${meta.samplename ?: meta.id}\" } - // } - // QC withName: '.*BAM_QC.*' { @@ -240,8 +230,8 @@ process { //// Picard withName: '.*PICARD.*' { - memory = { 8.GB * task.attempt } - ext.args = "--MAX_RECORDS_IN_RAM 15000000" + memory = { 16.GB * task.attempt } + ext.args = "--MAX_RECORDS_IN_RAM 50000000" } diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config new file mode 100644 index 00000000..7460fe7d --- /dev/null +++ b/conf/profiles/gcp.config @@ -0,0 +1,92 @@ +// Tweaked resources for GCP + +process { + executor = 'google-batch' + disk = 100.GB + errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006) ? 'retry' : 'finish' } + maxRetries = 5 + + // tentative fix for `cannot stat` error + // https://github.com/nextflow-io/nextflow/issues/6213#issuecomment-3173533808 + stageOutMode = 'copy' + + // BCL convert resources + withName: '.*PREPROCESSING:BCL_DEMULTIPLEX:BCLCONVERT' { + cpus = 32 + memory = { 64.GB * task.attempt } + disk = { 1.TB * task.attempt } + } + withName: '.*PREPROCESSING:BCL_DEMULTIPLEX:BCL2FASTQ' { + // Never used + } + + // Trimming resources + withName: '.*PREPROCESSING:FASTP' { + memory = { 4.GB * task.attempt } + } + + // Alignment resources + // DNA + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { + memory = 64.GB + } + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' { + memory = 64.GB + } + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' { + memory = 64.GB + } + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' { + memory = 64.GB + } + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { + memory = 64.GB + } + // RNA + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' { + memory = 64.GB + } + + // Alignment post-processing resources + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { + cpus = 16 + disk = { input instanceof List ? input.size().sum() * 2 * task.attempt : input.size() * 2 * task.attempt } + memory = 64.GB + time = 24.h + } + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORT' {} + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_CONVERT' {} + + // Coverage QC resources + withName: '.*PREPROCESSING:COVERAGE:MOSDEPTH' { + cpus = 4 + memory = 4.GB + } + withName: '.*PREPROCESSING:COVERAGE:SAMTOOLS_COVERAGE' { + cpus = 1 + memory = 1.GB + } + withName: '.*PREPROCESSING:COVERAGE:PANELCOVERAGE' {} + + // Bam QC resources + withName: '.*PREPROCESSING:BAM_QC:SAMTOOLS_.*$' { + cpus = 1 + memory = 1.GB + } + withName: '.*PREPROCESSING:BAM_QC:PICARD_.*$' { + cpus = 1 + memory = 16.GB + time = 24.h + } + + // Misc resources + withName: '.*PREPROCESSING:MD5SUM' { + cpus = 1 + memory = 128.MB + } + withName: '.*PREPROCESSING:MULTIQC_.*$' { + cpus = 1 + memory = 4.GB + } +} From 7b3fb476a66d1cfd9f5455d99f8647e8243c2cd0 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 8 Dec 2025 22:31:55 +0100 Subject: [PATCH 106/202] add profile to config --- nextflow.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nextflow.config b/nextflow.config index cd01f849..f3ec3448 100644 --- a/nextflow.config +++ b/nextflow.config @@ -184,6 +184,8 @@ profiles { } test { includeConfig 'conf/test.config' } test_full { includeConfig 'conf/test_full.config' } + // resource profiles + gcp { includeConfig 'conf/profiles/gcp.config' } s3_ugent { includeConfig 'conf/profiles/s3_ugent.config' } // analysis profiles sWGS { includeConfig 'conf/profiles/sWGS.config' } From e47543786f498e7e79ec76f74523aa67df3c610d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 9 Dec 2025 10:59:22 +0100 Subject: [PATCH 107/202] apply cpu/mem as default, make module selectors more specific --- conf/modules.config | 87 +++++++++++++++++++++++++--------------- conf/profiles/gcp.config | 62 ++++++++-------------------- 2 files changed, 71 insertions(+), 78 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 13de8a2f..af8e1c73 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -13,7 +13,9 @@ process { // BCL convert - withName: BCLCONVERT { + withName: '.*PREPROCESSING:BCL_DEMULTIPLEX:BCLCONVERT' { + cpus = 16 + memory = { 64.GB * task.attempt } ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", @@ -24,7 +26,9 @@ process { } // FastP - withName: FASTP { + withName: '.*PREPROCESSING:FASTP' { + cpus = 4 + memory = { 4.GB * task.attempt } ext.args = { [ params.split_fastq > 0 ? "--split_by_lines ${params.split_fastq * 4}" : '', @@ -38,19 +42,6 @@ process { } } - // FASTQ_TO_UCRAM - //// Samtools Import - withName: '.*FASTQ_TO_UCRAM:SAMTOOLS_IMPORT' { - label = "process_medium" - ext.args = { - [ - meta.readgroup ? "--rg-line \"@RG\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\t") + "\"" : "", - "--output-fmt cram,version=3.0", - "--output-fmt-option archive", - ].join(" ").trim() - } - } - // FASTQ_TO_CRAM // Readgroup // Example: @@ -63,7 +54,9 @@ process { // SM : samplename //// Bowtie2 - withName: BOWTIE2_ALIGN { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { + cpus = 16 + memory = 32.GB ext.args = { [ "--local", @@ -76,7 +69,9 @@ process { } //// BWA mem/BWA mem2 - withName: 'BWAMEM.*_MEM' { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' { + cpus = 16 + memory = 32.GB ext.args = { [ "-K 100000000", @@ -91,7 +86,9 @@ process { } //// DRAGEN - withName: DRAGMAP_ALIGN { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' { + cpus = 16 + memory = 32.GB ext.args = { [ meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : "" @@ -109,7 +106,9 @@ process { // -xf 2 : expansion factor for reading compressed data //// SNAP - withName: SNAPALIGNER_ALIGN { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { + cpus = 16 + memory = 64.GB ext.args = { [ "-b-", @@ -125,7 +124,9 @@ process { } //// STROBEALIGN - withName: STROBEALIGN { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' { + cpus = 16 + memory = 32.GB ext.args = { [ meta.readgroup ? "--rg-id ${meta.readgroup.ID}" : "", @@ -136,7 +137,9 @@ process { } //// STAR - withName: STAR_ALIGN { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' { + cpus = 16 + memory = 64.GB ext.args = { [ "--readFilesCommand gunzip -c", @@ -153,7 +156,9 @@ process { //// Samtools sormadup - withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { + cpus = 16 + memory = 64.GB ext.prefix = { "${meta.id}.merged" } ext.args5 = { [ @@ -169,7 +174,9 @@ process { } //// Samtools multisort - withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORT' { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORT' { + cpus = 16 + memory = 64.GB ext.prefix = { "${meta.id}.merged" } ext.args = { [ @@ -181,7 +188,9 @@ process { } //// BioBamBam Bamsormadup - withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' { + cpus = 8 + memory = 16.GB ext.prefix = { "${meta.id}.merged" } ext.args = { [ @@ -193,9 +202,9 @@ process { } //// Samtools convert - withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' { + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_CONVERT' { cpus = 8 - memory = 64.GB + memory = 8.GB ext.args = { [ "-C", @@ -207,7 +216,7 @@ process { // coverage //// Mosdepth - withName: '.*COVERAGE:MOSDEPTH' { + withName: '.*PREPROCESSING:COVERAGE:MOSDEPTH' { cpus = 4 memory = { 4.GB * task.attempt } ext.args = [ @@ -218,30 +227,44 @@ process { } //// Samtools coverage - withName: '.*:COVERAGE:SAMTOOLS_COVERAGE' { + withName: '.*PREPROCESSING:COVERAGE:SAMTOOLS_COVERAGE' { + cpus = 1 + memory = 1.GB ext.prefix = { "${meta.id}.coverage" } } // QC - withName: '.*BAM_QC.*' { + withName: '.*PREPROCESSING:BAM_QC:SAMTOOLS_.*$' { cpus = 1 + memory = 1.GB } //// Picard - withName: '.*PICARD.*' { + withName: '.*PREPROCESSING:BAM_QC:PICARD_.*$' { + cpus = 1 memory = { 16.GB * task.attempt } ext.args = "--MAX_RECORDS_IN_RAM 50000000" } + withName: '.*PREPROCESSING:MD5SUM' { + cpus = 1 + memory = 128.MB + } // MultiQC - withName: MULTIQC_MAIN { + withName: '.*PREPROCESSING:MULTIQC_.*$' { + cpus = 1 + memory = 4.GB + } + withName: '.*PREPROCESSING:MULTIQC_MAIN' { ext.prefix = { params.multiqc_title ? params.multiqc_title : "multiqc" } ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' } } - withName: MULTIQC_LIBRARY { + withName: '.*PREPROCESSING:MULTIQC_LIBRARY' { + cpus = 1 + memory = 4.GB ext.prefix = { meta.id ? "${meta.id}" : "multiqc_library" } ext.args = { meta.id ? "--title \"${meta.id} - Pool Summary\"" : '' } } diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config index 7460fe7d..6ab54a96 100644 --- a/conf/profiles/gcp.config +++ b/conf/profiles/gcp.config @@ -21,72 +21,42 @@ process { } // Trimming resources - withName: '.*PREPROCESSING:FASTP' { - memory = { 4.GB * task.attempt } - } + withName: '.*PREPROCESSING:FASTP' {} // Alignment resources // DNA - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { - memory = 64.GB - } - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' { - memory = 64.GB - } - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' { - memory = 64.GB - } - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' { - memory = 64.GB - } - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { - memory = 64.GB - } + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' {} + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' {} + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' {} + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' {} + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' {} // RNA - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' { - memory = 64.GB - } + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' {} // Alignment post-processing resources withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { - cpus = 16 disk = { input instanceof List ? input.size().sum() * 2 * task.attempt : input.size() * 2 * task.attempt } - memory = 64.GB time = 24.h } - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORT' {} + withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORT' { + disk = { input instanceof List ? input.size().sum() * 2 * task.attempt : input.size() * 2 * task.attempt } + time = 24.h + } withName: '.*PREPROCESSING:FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_CONVERT' {} // Coverage QC resources - withName: '.*PREPROCESSING:COVERAGE:MOSDEPTH' { - cpus = 4 - memory = 4.GB - } - withName: '.*PREPROCESSING:COVERAGE:SAMTOOLS_COVERAGE' { - cpus = 1 - memory = 1.GB - } + withName: '.*PREPROCESSING:COVERAGE:MOSDEPTH' {} + withName: '.*PREPROCESSING:COVERAGE:SAMTOOLS_COVERAGE' {} withName: '.*PREPROCESSING:COVERAGE:PANELCOVERAGE' {} // Bam QC resources - withName: '.*PREPROCESSING:BAM_QC:SAMTOOLS_.*$' { - cpus = 1 - memory = 1.GB - } + withName: '.*PREPROCESSING:BAM_QC:SAMTOOLS_.*$' {} withName: '.*PREPROCESSING:BAM_QC:PICARD_.*$' { - cpus = 1 - memory = 16.GB time = 24.h } // Misc resources - withName: '.*PREPROCESSING:MD5SUM' { - cpus = 1 - memory = 128.MB - } - withName: '.*PREPROCESSING:MULTIQC_.*$' { - cpus = 1 - memory = 4.GB - } + withName: '.*PREPROCESSING:MD5SUM' {} + withName: '.*PREPROCESSING:MULTIQC_.*$' {} } From ef81280f397dd3f85de292adbe20cd3d9be4f7b1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 9 Dec 2025 11:11:27 +0100 Subject: [PATCH 108/202] update snapshot --- tests/workflows/preprocessing.nf.test.snap | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 6c072d58..82cf9c36 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -108,7 +108,7 @@ "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, - "sample1.fastp.json:md5,caf903cc79784ceaa71d6ef743c02ff3" + "sample1.fastp.json:md5,2edca71b00e4804eb7b39ff72f1c304a" ] ], "md5sums": [ @@ -189,7 +189,7 @@ "id": "sample1" } }, - "sample1.per-base.bed.gz:md5,46115d39863826ae9199340c2eb888a6" + "sample1.per-base.bed.gz:md5,e5c10c94f3870f6ed2c75a904e9ade7f" ] ], "mosdepth_per_base_csi": [ @@ -216,7 +216,7 @@ "id": "sample1" } }, - "sample1.per-base.bed.gz.csi:md5,12fdbaf668bda28541b869adecc15dc7" + "sample1.per-base.bed.gz.csi:md5,b9223463b0f024768ebbbb3e42ace8da" ] ], "mosdepth_per_base_d4": [ @@ -327,7 +327,7 @@ "id": "sample1" } }, - "sample1.regions.bed.gz:md5,63a7fee57ae572a661fba2d14c6db1b4" + "sample1.regions.bed.gz:md5,6b7cc84380695011ffd0681dc79cefaa" ] ], "mosdepth_regions_csi": [ @@ -354,7 +354,7 @@ "id": "sample1" } }, - "sample1.regions.bed.gz.csi:md5,531956423eb6b53186ae4adc39e0e61e" + "sample1.regions.bed.gz.csi:md5,45cbd8c0f3d231c114a2d79d7dd21a80" ] ], "mosdepth_summary": [ @@ -381,7 +381,7 @@ "id": "sample1" } }, - "sample1.mosdepth.summary.txt:md5,cfd81f854b864f9630e8831b48cfc9a0" + "sample1.mosdepth.summary.txt:md5,f1f18d9bd23783bedb7f9e246e192a7e" ] ], "mosdepth_thresholds_bed": [ @@ -391,13 +391,13 @@ ], "multiqc_library_data": [ - "multiqc_library_test_data" + "test_data" ], "multiqc_library_plots": [ - "multiqc_library_test_plots" + "test_plots" ], "multiqc_library_report": [ - "multiqc_library_test.html" + "test.html" ], "multiqc_main_data": [ [ @@ -535,7 +535,7 @@ "id": "sample1" } }, - "sample1.coverage.txt:md5,82e6e6b4163459aeca0b9dd40ef67d13" + "sample1.coverage.txt:md5,656b7371132475783094d80b7d2292b5" ] ], "samtools_flagstat": [ @@ -562,7 +562,7 @@ "id": "sample1" } }, - "sample1.flagstat:md5,da197e74ff53116dd9b8b1241f468aac" + "sample1.flagstat:md5,cd826b1749737d52499cf543d101ecd2" ] ], "samtools_idxstats": [ @@ -589,7 +589,7 @@ "id": "sample1" } }, - "sample1.idxstats:md5,4e1b204d3bb59e42022c5d84be705ed8" + "sample1.idxstats:md5,ecc89a474dced28b0610f17a82785007" ] ], "samtools_stats": [ @@ -616,7 +616,7 @@ "id": "sample1" } }, - "sample1.stats:md5,33a10d02ce404301e012f07841815f59" + "sample1.stats:md5,bbe2999c6baf17c96d4f00370c6b9501" ] ], "sormadup_metrics": [ @@ -643,7 +643,7 @@ "id": "sample1" } }, - "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" + "sample1.merged.metrics.txt:md5,01b7286134f5cb6530c3bab2c86fd169" ] ], "versions": [ @@ -666,7 +666,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T22:49:24.788115" + "timestamp": "2025-12-09T11:03:22.986076" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -777,7 +777,7 @@ "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, - "sample1.fastp.json:md5,caf903cc79784ceaa71d6ef743c02ff3" + "sample1.fastp.json:md5,2edca71b00e4804eb7b39ff72f1c304a" ] ], "md5sums": [ @@ -844,13 +844,13 @@ ], "multiqc_library_data": [ - "multiqc_library_test_data" + "test_data" ], "multiqc_library_plots": [ - "multiqc_library_test_plots" + "test_plots" ], "multiqc_library_report": [ - "multiqc_library_test.html" + "test.html" ], "multiqc_main_data": [ [ @@ -909,7 +909,7 @@ "id": "sample1" } }, - "sample1.flagstat:md5,da197e74ff53116dd9b8b1241f468aac" + "sample1.flagstat:md5,cd826b1749737d52499cf543d101ecd2" ] ], "samtools_idxstats": [ @@ -936,7 +936,7 @@ "id": "sample1" } }, - "sample1.idxstats:md5,4e1b204d3bb59e42022c5d84be705ed8" + "sample1.idxstats:md5,ecc89a474dced28b0610f17a82785007" ] ], "samtools_stats": [ @@ -963,7 +963,7 @@ "id": "sample1" } }, - "sample1.stats:md5,33a10d02ce404301e012f07841815f59" + "sample1.stats:md5,bbe2999c6baf17c96d4f00370c6b9501" ] ], "sormadup_metrics": [ @@ -990,7 +990,7 @@ "id": "sample1" } }, - "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" + "sample1.merged.metrics.txt:md5,01b7286134f5cb6530c3bab2c86fd169" ] ], "versions": [ @@ -1009,7 +1009,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T22:53:59.211177" + "timestamp": "2025-12-09T11:09:14.114309" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1117,7 +1117,7 @@ }, "count": 1 }, - "sample1.fastp.json:md5,caf903cc79784ceaa71d6ef743c02ff3" + "sample1.fastp.json:md5,2edca71b00e4804eb7b39ff72f1c304a" ] ], "md5sums": [ @@ -1195,7 +1195,7 @@ "id": "sample1" } }, - "sample1.per-base.bed.gz:md5,46115d39863826ae9199340c2eb888a6" + "sample1.per-base.bed.gz:md5,e5c10c94f3870f6ed2c75a904e9ade7f" ] ], "mosdepth_per_base_csi": [ @@ -1221,7 +1221,7 @@ "id": "sample1" } }, - "sample1.per-base.bed.gz.csi:md5,12fdbaf668bda28541b869adecc15dc7" + "sample1.per-base.bed.gz.csi:md5,b9223463b0f024768ebbbb3e42ace8da" ] ], "mosdepth_per_base_d4": [ @@ -1311,7 +1311,7 @@ "id": "sample1" } }, - "sample1.mosdepth.summary.txt:md5,9799b90b7db86a6eab36f33b04a67ae0" + "sample1.mosdepth.summary.txt:md5,699b955719b06ff290edbe0692492213" ] ], "mosdepth_thresholds_bed": [ @@ -1321,13 +1321,13 @@ ], "multiqc_library_data": [ - "multiqc_library_test_data" + "test_data" ], "multiqc_library_plots": [ - "multiqc_library_test_plots" + "test_plots" ], "multiqc_library_report": [ - "multiqc_library_test.html" + "test.html" ], "multiqc_main_data": [ [ @@ -1461,7 +1461,7 @@ "id": "sample1" } }, - "sample1.coverage.txt:md5,82e6e6b4163459aeca0b9dd40ef67d13" + "sample1.coverage.txt:md5,656b7371132475783094d80b7d2292b5" ] ], "samtools_flagstat": [ @@ -1487,7 +1487,7 @@ "id": "sample1" } }, - "sample1.flagstat:md5,da197e74ff53116dd9b8b1241f468aac" + "sample1.flagstat:md5,cd826b1749737d52499cf543d101ecd2" ] ], "samtools_idxstats": [ @@ -1513,7 +1513,7 @@ "id": "sample1" } }, - "sample1.idxstats:md5,4e1b204d3bb59e42022c5d84be705ed8" + "sample1.idxstats:md5,ecc89a474dced28b0610f17a82785007" ] ], "samtools_stats": [ @@ -1539,7 +1539,7 @@ "id": "sample1" } }, - "sample1.stats:md5,33a10d02ce404301e012f07841815f59" + "sample1.stats:md5,bbe2999c6baf17c96d4f00370c6b9501" ] ], "sormadup_metrics": [ @@ -1565,7 +1565,7 @@ "id": "sample1" } }, - "sample1.merged.metrics.txt:md5,ba50ddef3f0147526ed1f01a98c47ed6" + "sample1.merged.metrics.txt:md5,01b7286134f5cb6530c3bab2c86fd169" ] ], "versions": [ @@ -1588,6 +1588,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-04T22:52:15.051988" + "timestamp": "2025-12-09T11:06:50.62591" } } \ No newline at end of file From bac9ba626cad01d486829a746a2201830a388dcc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:09:18 +0100 Subject: [PATCH 109/202] fix process selectors --- conf/modules.config | 40 ++++++++++++++++++++-------------------- conf/profiles/gcp.config | 40 ++++++++++++++++++++-------------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index af8e1c73..b895b341 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -13,7 +13,7 @@ process { // BCL convert - withName: '.*PREPROCESSING:BCL_DEMULTIPLEX:BCLCONVERT' { + withName: '.*BCL_DEMULTIPLEX:BCLCONVERT' { cpus = 16 memory = { 64.GB * task.attempt } ext.args = { @@ -26,7 +26,7 @@ process { } // FastP - withName: '.*PREPROCESSING:FASTP' { + withName: '.*FASTP' { cpus = 4 memory = { 4.GB * task.attempt } ext.args = { @@ -54,7 +54,7 @@ process { // SM : samplename //// Bowtie2 - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { cpus = 16 memory = 32.GB ext.args = { @@ -69,7 +69,7 @@ process { } //// BWA mem/BWA mem2 - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' { + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' { cpus = 16 memory = 32.GB ext.args = { @@ -86,7 +86,7 @@ process { } //// DRAGEN - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' { + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' { cpus = 16 memory = 32.GB ext.args = { @@ -106,7 +106,7 @@ process { // -xf 2 : expansion factor for reading compressed data //// SNAP - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { cpus = 16 memory = 64.GB ext.args = { @@ -124,7 +124,7 @@ process { } //// STROBEALIGN - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' { + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' { cpus = 16 memory = 32.GB ext.args = { @@ -137,7 +137,7 @@ process { } //// STAR - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' { + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' { cpus = 16 memory = 64.GB ext.args = { @@ -156,7 +156,7 @@ process { //// Samtools sormadup - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { cpus = 16 memory = 64.GB ext.prefix = { "${meta.id}.merged" } @@ -174,7 +174,7 @@ process { } //// Samtools multisort - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORT' { + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORT' { cpus = 16 memory = 64.GB ext.prefix = { "${meta.id}.merged" } @@ -188,7 +188,7 @@ process { } //// BioBamBam Bamsormadup - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' { + withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' { cpus = 8 memory = 16.GB ext.prefix = { "${meta.id}.merged" } @@ -202,7 +202,7 @@ process { } //// Samtools convert - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_CONVERT' { + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' { cpus = 8 memory = 8.GB ext.args = { @@ -216,7 +216,7 @@ process { // coverage //// Mosdepth - withName: '.*PREPROCESSING:COVERAGE:MOSDEPTH' { + withName: '.*COVERAGE:MOSDEPTH' { cpus = 4 memory = { 4.GB * task.attempt } ext.args = [ @@ -227,7 +227,7 @@ process { } //// Samtools coverage - withName: '.*PREPROCESSING:COVERAGE:SAMTOOLS_COVERAGE' { + withName: '.*COVERAGE:SAMTOOLS_COVERAGE' { cpus = 1 memory = 1.GB ext.prefix = { "${meta.id}.coverage" } @@ -235,34 +235,34 @@ process { // QC - withName: '.*PREPROCESSING:BAM_QC:SAMTOOLS_.*$' { + withName: '.*BAM_QC:SAMTOOLS_.*$' { cpus = 1 memory = 1.GB } //// Picard - withName: '.*PREPROCESSING:BAM_QC:PICARD_.*$' { + withName: '.*BAM_QC:PICARD_.*$' { cpus = 1 memory = { 16.GB * task.attempt } ext.args = "--MAX_RECORDS_IN_RAM 50000000" } - withName: '.*PREPROCESSING:MD5SUM' { + withName: '.*MD5SUM' { cpus = 1 memory = 128.MB } // MultiQC - withName: '.*PREPROCESSING:MULTIQC_.*$' { + withName: '.*MULTIQC_.*$' { cpus = 1 memory = 4.GB } - withName: '.*PREPROCESSING:MULTIQC_MAIN' { + withName: '.*MULTIQC_MAIN' { ext.prefix = { params.multiqc_title ? params.multiqc_title : "multiqc" } ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' } } - withName: '.*PREPROCESSING:MULTIQC_LIBRARY' { + withName: '.*MULTIQC_LIBRARY' { cpus = 1 memory = 4.GB ext.prefix = { meta.id ? "${meta.id}" : "multiqc_library" } diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config index 6ab54a96..2662a4b8 100644 --- a/conf/profiles/gcp.config +++ b/conf/profiles/gcp.config @@ -11,52 +11,52 @@ process { stageOutMode = 'copy' // BCL convert resources - withName: '.*PREPROCESSING:BCL_DEMULTIPLEX:BCLCONVERT' { + withName: '.*BCL_DEMULTIPLEX:BCLCONVERT' { cpus = 32 memory = { 64.GB * task.attempt } disk = { 1.TB * task.attempt } } - withName: '.*PREPROCESSING:BCL_DEMULTIPLEX:BCL2FASTQ' { + withName: '.*BCL_DEMULTIPLEX:BCL2FASTQ' { // Never used } // Trimming resources - withName: '.*PREPROCESSING:FASTP' {} + withName: '.*FASTP' {} // Alignment resources // DNA - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' {} - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' {} - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' {} - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' {} - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' {} + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' {} + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' {} + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' {} + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' {} + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' {} // RNA - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' {} + withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' {} // Alignment post-processing resources - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { disk = { input instanceof List ? input.size().sum() * 2 * task.attempt : input.size() * 2 * task.attempt } time = 24.h } - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_SORT' { + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORT' { disk = { input instanceof List ? input.size().sum() * 2 * task.attempt : input.size() * 2 * task.attempt } time = 24.h } - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} - withName: '.*PREPROCESSING:FASTQ_TO_CRAM:SAMTOOLS_CONVERT' {} + withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} + withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' {} // Coverage QC resources - withName: '.*PREPROCESSING:COVERAGE:MOSDEPTH' {} - withName: '.*PREPROCESSING:COVERAGE:SAMTOOLS_COVERAGE' {} - withName: '.*PREPROCESSING:COVERAGE:PANELCOVERAGE' {} + withName: '.*COVERAGE:MOSDEPTH' {} + withName: '.*COVERAGE:SAMTOOLS_COVERAGE' {} + withName: '.*COVERAGE:PANELCOVERAGE' {} // Bam QC resources - withName: '.*PREPROCESSING:BAM_QC:SAMTOOLS_.*$' {} - withName: '.*PREPROCESSING:BAM_QC:PICARD_.*$' { + withName: '.*BAM_QC:SAMTOOLS_.*$' {} + withName: '.*BAM_QC:PICARD_.*$' { time = 24.h } // Misc resources - withName: '.*PREPROCESSING:MD5SUM' {} - withName: '.*PREPROCESSING:MULTIQC_.*$' {} + withName: '.*MD5SUM' {} + withName: '.*MULTIQC_.*$' {} } From 02b268cb5500a799baa0b61bf15d1ceb5e9093a8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:13:19 +0100 Subject: [PATCH 110/202] update snapshots --- tests/subworkflows/local/coverage/main.nf.test.snap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/subworkflows/local/coverage/main.nf.test.snap b/tests/subworkflows/local/coverage/main.nf.test.snap index 2891b942..4df77336 100644 --- a/tests/subworkflows/local/coverage/main.nf.test.snap +++ b/tests/subworkflows/local/coverage/main.nf.test.snap @@ -35,7 +35,7 @@ "single_end": false, "tag": "WES" }, - "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + "test.coverage.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] ], "13": [ @@ -242,7 +242,7 @@ "single_end": false, "tag": "WES" }, - "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + "test.coverage.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] ], "versions": [ @@ -256,7 +256,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T12:34:24.897893" + "timestamp": "2025-12-09T12:02:48.263146" }, "Coverage - seqcap": { "content": [ @@ -294,7 +294,7 @@ "single_end": false, "tag": "seqcap" }, - "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + "test.coverage.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] ], "13": [ @@ -486,7 +486,7 @@ "single_end": false, "tag": "seqcap" }, - "test.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" + "test.coverage.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] ], "versions": [ @@ -499,6 +499,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T12:34:05.200571" + "timestamp": "2025-12-09T12:02:26.604953" } } \ No newline at end of file From 419f66ef1aaa0b90fb608ee804676233ae2d1115 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:41:02 +0100 Subject: [PATCH 111/202] fix process selectors even more --- conf/modules.config | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index b895b341..7cd68402 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -54,7 +54,7 @@ process { // SM : samplename //// Bowtie2 - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { + withName: '.*FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { cpus = 16 memory = 32.GB ext.args = { @@ -69,7 +69,7 @@ process { } //// BWA mem/BWA mem2 - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' { + withName: '.*FASTQ_ALIGN_DNA:BWAMEM.*_MEM' { cpus = 16 memory = 32.GB ext.args = { @@ -86,7 +86,7 @@ process { } //// DRAGEN - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' { + withName: '.*FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' { cpus = 16 memory = 32.GB ext.args = { @@ -106,7 +106,7 @@ process { // -xf 2 : expansion factor for reading compressed data //// SNAP - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { + withName: '.*FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { cpus = 16 memory = 64.GB ext.args = { @@ -124,7 +124,7 @@ process { } //// STROBEALIGN - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' { + withName: '.*FASTQ_ALIGN_DNA:STROBEALIGN' { cpus = 16 memory = 32.GB ext.args = { @@ -137,7 +137,7 @@ process { } //// STAR - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' { + withName: '.*FASTQ_ALIGN_RNA:STAR_ALIGN' { cpus = 16 memory = 64.GB ext.args = { From 6b648ddc387bde7cb4130e349aefa51eeabe7078 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 10 Dec 2025 10:41:03 +0100 Subject: [PATCH 112/202] gcp: comment unused selectors --- conf/profiles/gcp.config | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config index 2662a4b8..47cc2481 100644 --- a/conf/profiles/gcp.config +++ b/conf/profiles/gcp.config @@ -16,22 +16,19 @@ process { memory = { 64.GB * task.attempt } disk = { 1.TB * task.attempt } } - withName: '.*BCL_DEMULTIPLEX:BCL2FASTQ' { - // Never used - } // Trimming resources - withName: '.*FASTP' {} + // withName: '.*FASTP' {} // Alignment resources // DNA - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' {} - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' {} - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' {} - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' {} - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' {} + // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' {} + // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' {} + // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' {} + // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' {} + // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' {} // RNA - withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' {} + // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' {} // Alignment post-processing resources withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { @@ -42,21 +39,21 @@ process { disk = { input instanceof List ? input.size().sum() * 2 * task.attempt : input.size() * 2 * task.attempt } time = 24.h } - withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} - withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' {} + // withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} + // withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' {} // Coverage QC resources - withName: '.*COVERAGE:MOSDEPTH' {} - withName: '.*COVERAGE:SAMTOOLS_COVERAGE' {} - withName: '.*COVERAGE:PANELCOVERAGE' {} + // withName: '.*COVERAGE:MOSDEPTH' {} + // withName: '.*COVERAGE:SAMTOOLS_COVERAGE' {} + // withName: '.*COVERAGE:PANELCOVERAGE' {} // Bam QC resources - withName: '.*BAM_QC:SAMTOOLS_.*$' {} + // withName: '.*BAM_QC:SAMTOOLS_.*$' {} withName: '.*BAM_QC:PICARD_.*$' { time = 24.h } // Misc resources - withName: '.*MD5SUM' {} - withName: '.*MULTIQC_.*$' {} + // withName: '.*MD5SUM' {} + // withName: '.*MULTIQC_.*$' {} } From 6ae79743761abbfeabeba672d0f914068a21e76e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 10 Dec 2025 14:29:34 +0100 Subject: [PATCH 113/202] update gcp profile --- conf/profiles/gcp.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config index 47cc2481..1d3b072d 100644 --- a/conf/profiles/gcp.config +++ b/conf/profiles/gcp.config @@ -32,11 +32,11 @@ process { // Alignment post-processing resources withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { - disk = { input instanceof List ? input.size().sum() * 2 * task.attempt : input.size() * 2 * task.attempt } + disk = { input instanceof List ? input.size().sum() * 3 * task.attempt : input.size() * 3 * task.attempt } time = 24.h } withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORT' { - disk = { input instanceof List ? input.size().sum() * 2 * task.attempt : input.size() * 2 * task.attempt } + disk = { input instanceof List ? input.size().sum() * 3 * task.attempt : input.size() * 3 * task.attempt } time = 24.h } // withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} From ae5956e9c9d3d636522c1f19946f6d376834eaf2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 10 Dec 2025 15:35:15 +0100 Subject: [PATCH 114/202] bump multiqc --- modules.json | 2 +- modules/nf-core/multiqc/environment.yml | 2 +- modules/nf-core/multiqc/main.nf | 8 ++--- modules/nf-core/multiqc/meta.yml | 26 +++++----------- modules/nf-core/multiqc/multiqc.diff | 11 +------ .../nf-core/multiqc/tests/main.nf.test.snap | 30 +++++++++---------- 6 files changed, 30 insertions(+), 49 deletions(-) diff --git a/modules.json b/modules.json index fe836420..3b24ee17 100644 --- a/modules.json +++ b/modules.json @@ -64,7 +64,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "9656d955b700a8707c4a67821ab056f8c1095675", "installed_by": ["modules"], "patch": "modules/nf-core/multiqc/multiqc.diff" }, diff --git a/modules/nf-core/multiqc/environment.yml b/modules/nf-core/multiqc/environment.yml index d02016a0..009874d4 100644 --- a/modules/nf-core/multiqc/environment.yml +++ b/modules/nf-core/multiqc/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::multiqc=1.32 + - bioconda::multiqc=1.33 diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 1d691b15..25c2a503 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -4,8 +4,8 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/8c/8c6c120d559d7ee04c7442b61ad7cf5a9e8970be5feefb37d68eeaa60c1034eb/data' : - 'community.wave.seqera.io/library/multiqc:1.32--d58f60e4deb769bf' }" + 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/34/34e733a9ae16a27e80fe00f863ea1479c96416017f24a907996126283e7ecd4d/data' : + 'community.wave.seqera.io/library/multiqc:1.33--ee7739d47738383b' }" input: tuple val(meta), path(multiqc_files, stageAs: "?/*") @@ -19,7 +19,8 @@ process MULTIQC { path "*.html" , emit: report path "*_data" , emit: data path "*_plots" , optional:true, emit: plots - tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), emit: versions_multiqc + tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), emit: versions + // MultiQC should not push its versions to the `versions` topic. Its input depends on the versions topic to be resolved thus outputting to the topic will let the pipeline hang forever when: task.ext.when == null || task.ext.when @@ -51,6 +52,5 @@ process MULTIQC { touch multiqc_data/.stub mkdir multiqc_plots touch multiqc_report.html - """ } diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index 4a908611..e4b8f94d 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,6 +1,6 @@ name: multiqc -description: Aggregate results from bioinformatics analyses across many samples - into a single report +description: Aggregate results from bioinformatics analyses across many samples into + a single report keywords: - QC - bioinformatics tools @@ -28,8 +28,8 @@ input: - edam: http://edamontology.org/format_3750 # YAML - extra_multiqc_config: type: file - description: Second optional config yml for MultiQC. Will override common - sections in multiqc_config. + description: Second optional config yml for MultiQC. Will override common sections + in multiqc_config. pattern: "*.{yml,yaml}" ontologies: - edam: http://edamontology.org/format_3750 # YAML @@ -73,17 +73,6 @@ output: description: Plots created by MultiQC pattern: "*_data" ontologies: [] - versions_multiqc: - - - ${task.process}: - type: string - description: The process the versions were collected from - - multiqc: - type: string - description: The tool name - - multiqc --version | sed "s/.* //g: - type: string - description: The command used to generate the version of the tool -topics: versions: - - ${task.process}: type: string @@ -91,9 +80,10 @@ topics: - multiqc: type: string description: The tool name - - multiqc --version | sed "s/.* //g: - type: string - description: The command used to generate the version of the tool + - multiqc --version | sed "s/.* //g": + type: eval + description: The expression to obtain the version of the tool + authors: - "@abhi18av" - "@bunop" diff --git a/modules/nf-core/multiqc/multiqc.diff b/modules/nf-core/multiqc/multiqc.diff index 73a5eb45..f0991afe 100644 --- a/modules/nf-core/multiqc/multiqc.diff +++ b/modules/nf-core/multiqc/multiqc.diff @@ -11,7 +11,7 @@ Changes in 'multiqc/main.nf': conda "${moduleDir}/environment.yml" @@ -7,7 +8,7 @@ - 'community.wave.seqera.io/library/multiqc:1.32--d58f60e4deb769bf' }" + 'community.wave.seqera.io/library/multiqc:1.33--ee7739d47738383b' }" input: - path multiqc_files, stageAs: "?/*" @@ -19,15 +19,6 @@ Changes in 'multiqc/main.nf': path(multiqc_config) path(extra_multiqc_config) path(multiqc_logo) -@@ -18,7 +19,7 @@ - path "*.html" , emit: report - path "*_data" , emit: data - path "*_plots" , optional:true, emit: plots -- tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), topic: versions, emit: versions_multiqc -+ tuple val("${task.process}"), val('multiqc'), eval('multiqc --version | sed "s/.* //g"'), emit: versions_multiqc - - when: - task.ext.when == null || task.ext.when 'modules/nf-core/multiqc/tests/main.nf.test.snap' is unchanged 'modules/nf-core/multiqc/tests/nextflow.config' is unchanged diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index f76049d3..d72d35b7 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -2,20 +2,20 @@ "sarscov2 single-end [fastqc]": { "content": [ { - "versions_multiqc": [ + "versions": [ [ "MULTIQC", "multiqc", - "1.32" + "1.33" ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-10-28T15:27:59.813370216" + "timestamp": "2025-12-09T10:10:43.020315838" }, "sarscov2 single-end [fastqc] - stub": { "content": [ @@ -24,38 +24,38 @@ "multiqc_data", "multiqc_plots", { - "versions_multiqc": [ + "versions": [ [ "MULTIQC", "multiqc", - "1.32" + "1.33" ] ] } ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-10-28T15:30:48.963962021" + "timestamp": "2025-12-09T10:11:14.131950776" }, "sarscov2 single-end [fastqc] [config]": { "content": [ { - "versions_multiqc": [ + "versions": [ [ "MULTIQC", "multiqc", - "1.32" + "1.33" ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-10-28T15:29:30.664969334" + "timestamp": "2025-12-09T10:11:07.15692209" } } \ No newline at end of file From f9104c13b62c84734abd56f6597a5fe3dc1f7ecd Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 11 Dec 2025 13:12:58 +0100 Subject: [PATCH 115/202] gcp: set default time to 24h --- conf/profiles/gcp.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config index 1d3b072d..577dd18d 100644 --- a/conf/profiles/gcp.config +++ b/conf/profiles/gcp.config @@ -3,6 +3,7 @@ process { executor = 'google-batch' disk = 100.GB + time = 24.h errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006) ? 'retry' : 'finish' } maxRetries = 5 From 45df61cce3d3864d46ec653d09af074764bd332f Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 12 Dec 2025 16:36:53 +0100 Subject: [PATCH 116/202] increase samtools verbosity --- conf/modules.config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/modules.config b/conf/modules.config index 7cd68402..2fc9ba9e 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -160,8 +160,13 @@ process { cpus = 16 memory = 64.GB ext.prefix = { "${meta.id}.merged" } + ext.args = "--verbosity 5" + ext.args2 = "--verbosity 5" + ext.args3 = "--verbosity 5" + ext.args4 = "--verbosity 5" ext.args5 = { [ + "--verbosity 5", "-s", "--json", "-d 2500", From b0fa8989ea9aec02fd6f883271d074a93154e9c8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 12 Dec 2025 16:38:03 +0100 Subject: [PATCH 117/202] patch sormadup --- modules/nf-core/samtools/sormadup/main.nf | 1 - modules/nf-core/samtools/sormadup/samtools-sormadup.diff | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/samtools/sormadup/main.nf b/modules/nf-core/samtools/sormadup/main.nf index 25541ed8..9bc8a43b 100644 --- a/modules/nf-core/samtools/sormadup/main.nf +++ b/modules/nf-core/samtools/sormadup/main.nf @@ -63,7 +63,6 @@ process SAMTOOLS_SORMADUP { -u \\ -T ${prefix}.sort \\ --threads $task.cpus \\ - -m ${sort_memory}M \\ - \\ | \\ samtools markdup \\ diff --git a/modules/nf-core/samtools/sormadup/samtools-sormadup.diff b/modules/nf-core/samtools/sormadup/samtools-sormadup.diff index f614f937..1e13bac8 100644 --- a/modules/nf-core/samtools/sormadup/samtools-sormadup.diff +++ b/modules/nf-core/samtools/sormadup/samtools-sormadup.diff @@ -14,6 +14,14 @@ Changes in 'samtools/sormadup/main.nf': output: tuple val(meta), path("*.bam") , emit: bam, optional: true +@@ -64,7 +63,6 @@ + -u \\ + -T ${prefix}.sort \\ + --threads $task.cpus \\ +- -m ${sort_memory}M \\ + - \\ + | \\ + samtools markdup \\ 'modules/nf-core/samtools/sormadup/tests/main.nf.test.snap' is unchanged 'modules/nf-core/samtools/sormadup/tests/bam.config' is unchanged From 44b94211b03010b3c357ad11c4a1c2d457ef61dd Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 16 Dec 2025 14:53:38 +0100 Subject: [PATCH 118/202] rna: make sure the correct index is used --- subworkflows/local/fastq_to_aligned_cram/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index c00f4d75..09c4cec8 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -38,7 +38,7 @@ workflow FASTQ_TO_CRAM { ch_meta_reads_aligner_index_fasta_gtf .branch { meta, reads, aligner, index, fasta, gtf -> rna: meta.sample_type == "RNA" - return [meta, reads, "star", index, gtf] + return [meta, reads, "star", getGenomeAttribute(meta.genome_data, 'star'), gtf] dna: meta.sample_type == "DNA" || meta.sample_type == "Tissue" return [meta, reads, aligner, index, fasta] } From adfc3f08651106abec3c5f9177195b60a6246835 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 17 Dec 2025 13:33:48 +0100 Subject: [PATCH 119/202] add splice junctions and junctions to rna output --- conf/modules.config | 17 ++ main.nf | 10 + modules.json | 10 + modules/nf-core/cat/cat/environment.yml | 7 + modules/nf-core/cat/cat/main.nf | 78 +++++ modules/nf-core/cat/cat/meta.yml | 63 ++++ modules/nf-core/cat/cat/tests/main.nf.test | 192 ++++++++++++ .../nf-core/cat/cat/tests/main.nf.test.snap | 283 ++++++++++++++++++ modules/nf-core/cat/cat/tests/nextflow.config | 6 + modules/nf-core/gnu/sort/environment.yml | 7 + modules/nf-core/gnu/sort/main.nf | 48 +++ modules/nf-core/gnu/sort/meta.yml | 55 ++++ modules/nf-core/gnu/sort/tests/main.nf.test | 120 ++++++++ .../nf-core/gnu/sort/tests/main.nf.test.snap | 164 ++++++++++ .../gnu/sort/tests/sort_complex.config | 6 + .../gnu/sort/tests/sort_simple_bed.config | 6 + .../gnu/sort/tests/sort_simple_genome.config | 6 + subworkflows/local/fastq_align_rna/main.nf | 56 +++- .../local/fastq_to_aligned_cram/main.nf | 10 +- tests/default.nf.test | 16 + tests/inputs/fastq_rna.yml | 20 ++ workflows/preprocessing.nf | 2 + 22 files changed, 1174 insertions(+), 8 deletions(-) create mode 100644 modules/nf-core/cat/cat/environment.yml create mode 100644 modules/nf-core/cat/cat/main.nf create mode 100644 modules/nf-core/cat/cat/meta.yml create mode 100644 modules/nf-core/cat/cat/tests/main.nf.test create mode 100644 modules/nf-core/cat/cat/tests/main.nf.test.snap create mode 100644 modules/nf-core/cat/cat/tests/nextflow.config create mode 100644 modules/nf-core/gnu/sort/environment.yml create mode 100644 modules/nf-core/gnu/sort/main.nf create mode 100644 modules/nf-core/gnu/sort/meta.yml create mode 100644 modules/nf-core/gnu/sort/tests/main.nf.test create mode 100644 modules/nf-core/gnu/sort/tests/main.nf.test.snap create mode 100644 modules/nf-core/gnu/sort/tests/sort_complex.config create mode 100644 modules/nf-core/gnu/sort/tests/sort_simple_bed.config create mode 100644 modules/nf-core/gnu/sort/tests/sort_simple_genome.config create mode 100644 tests/inputs/fastq_rna.yml diff --git a/conf/modules.config b/conf/modules.config index 2fc9ba9e..d5364955 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -154,6 +154,23 @@ process { } } + withName: '.*FASTQ_ALIGN_RNA:CAT_SPLICE_JUNCTIONS' { + ext.prefix = { "${meta.id}.unsorted.Sj.out.tab" } + } + + withName: '.*FASTQ_ALIGN_RNA:CAT_JUNCTIONS' { + ext.prefix = { "${meta.id}.unsorted.Chimeric.out.junction" } + } + + withName: '.*FASTQ_ALIGN_RNA:SORT_SPLICE_JUNCTIONS' { + ext.prefix = { "${meta.id}.Sj.out" } + ext.args = '-k1,1n -k2,2n -k3,3n' + } + + withName: '.*FASTQ_ALIGN_RNA:SORT_JUNCTIONS' { + ext.prefix = { "${meta.id}.Chimeric.out" } + ext.args = '-k1,1n -k2,2n -k4,4n -k5,5n' + } //// Samtools sormadup withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { diff --git a/main.nf b/main.nf index 9c2b4a22..03dfac1a 100644 --- a/main.nf +++ b/main.nf @@ -71,6 +71,8 @@ workflow { fastp_json = PREPROCESSING.out.fastp_json fastp_html = PREPROCESSING.out.fastp_html crams = PREPROCESSING.out.crams + rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions + rna_junctions = PREPROCESSING.out.rna_junctions align_reports = PREPROCESSING.out.align_reports sormadup_metrics = PREPROCESSING.out.sormadup_metrics mosdepth_global = PREPROCESSING.out.mosdepth_global @@ -133,6 +135,14 @@ output { cram >> out_cram crai >> out_crai } } + rna_splice_junctions { path { meta, sjt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" + sjt >> out_path + } } + rna_junctions { path { meta, junctions -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" + junctions >> out_path + } } align_reports { path { meta, log -> def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" log >> out_path diff --git a/modules.json b/modules.json index 3b24ee17..8e111c49 100644 --- a/modules.json +++ b/modules.json @@ -40,6 +40,11 @@ "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, + "cat/cat": { + "branch": "master", + "git_sha": "69614d4579a6bd9b8a2ecffb35959809d9c36559", + "installed_by": ["modules"] + }, "dragmap/align": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", @@ -51,6 +56,11 @@ "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", "installed_by": ["modules"] }, + "gnu/sort": { + "branch": "master", + "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "installed_by": ["modules"] + }, "md5sum": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml new file mode 100644 index 00000000..98511769 --- /dev/null +++ b/modules/nf-core/cat/cat/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - conda-forge::pigz=2.8 diff --git a/modules/nf-core/cat/cat/main.nf b/modules/nf-core/cat/cat/main.nf new file mode 100644 index 00000000..aa72fc4d --- /dev/null +++ b/modules/nf-core/cat/cat/main.nf @@ -0,0 +1,78 @@ +process CAT_CAT { + tag "$meta.id" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + '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 + 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 + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def file_list = files_in.collect { it.toString() } + + // choose appropriate concatenation tool depending on input and output format + + // | input | output | command1 | command2 | + // |-----------|------------|----------|----------| + // | gzipped | gzipped | cat | | + // | ungzipped | ungzipped | cat | | + // | gzipped | ungzipped | zcat | | + // | ungzipped | gzipped | cat | pigz | + + // Use input file ending as default + prefix = task.ext.prefix ?: "${meta.id}${getFileSuffix(file_list[0])}" + out_zip = prefix.endsWith('.gz') + in_zip = file_list[0].endsWith('.gz') + command1 = (in_zip && !out_zip) ? 'zcat' : 'cat' + command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : '' + 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 " + + "module CAT_CAT (currently `$prefix`). Please choose a different one." + } + """ + $command1 \\ + $args \\ + ${file_list.join(' ')} \\ + $command2 \\ + > ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ + + stub: + def file_list = files_in.collect { it.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 " + + "module CAT_CAT (currently `$prefix`). Please choose a different one." + } + """ + touch $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) + END_VERSIONS + """ +} + +// for .gz files also include the second to last extension if it is present. E.g., .fasta.gz +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 new file mode 100644 index 00000000..36a7359b --- /dev/null +++ b/modules/nf-core/cat/cat/meta.yml @@ -0,0 +1,63 @@ +name: cat_cat +description: A module for concatenation of gzipped or uncompressed files +keywords: + - concatenate + - gzip + - cat +tools: + - cat: + 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: "*" + ontologies: [] +output: + 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" +maintainers: + - "@erikrikarddaniel" + - "@FriederikeHanssen" diff --git a/modules/nf-core/cat/cat/tests/main.nf.test b/modules/nf-core/cat/cat/tests/main.nf.test new file mode 100644 index 00000000..030c6649 --- /dev/null +++ b/modules/nf-core/cat/cat/tests/main.nf.test @@ -0,0 +1,192 @@ +nextflow_process { + + name "Test Process CAT_CAT" + script "../main.nf" + process "CAT_CAT" + + tag "modules" + tag "modules_nfcore" + tag "cat" + tag "cat/cat" + + test("sarscov2 - genome - error: name conflict") { + when { + process { + """ + input[0] = + [ + [ id:'genome', single_end:true ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) + ] + ] + """ + } + } + 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 snapshot(process.out).match() } + ) + } + } + + test("sarscov2 - [ fasta, sizes ] - unzipped") { + when { + process { + """ + input[0] = + [ + [ id:'test', single_end:true ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) + ] + ] + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + + test("sarscov2 - [ gff3_gz, maf_gz ] - zipped") { + when { + process { + """ + input[0] = + [ + [ id:'test', single_end:true ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/last/contigs.genome.maf.gz', checkIfExists: true) + ] + ] + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() + } + ) + } + } + + test("sarscov2 - [ gff3_gz, maf_gz ] - unzipped") { + config './nextflow.config' + + when { + params { + cat_prefix = "cat.txt" + } + process { + """ + input[0] = + [ + [ id:'test', single_end:true ], + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/last/contigs.genome.maf.gz', checkIfExists: true) + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("sarscov2 - [ fasta, sizes ] - zipped") { + config './nextflow.config' + + when { + params { + 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), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) + ] + ] + """ + } + } + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 - fasta - zipped") { + config './nextflow.config' + + when { + params { + 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] = + [ + [ 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() } + ) + } + } +} diff --git a/modules/nf-core/cat/cat/tests/main.nf.test.snap b/modules/nf-core/cat/cat/tests/main.nf.test.snap new file mode 100644 index 00000000..5b4e4cc3 --- /dev/null +++ b/modules/nf-core/cat/cat/tests/main.nf.test.snap @@ -0,0 +1,283 @@ +{ + "sarscov2 - [ gff3_gz, maf_gz ] - unzipped": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T09:08:31.479828" + }, + "sarscov2 - fasta - unzipped - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ], + "file_out": [ + [ + { + "id": "test", + "single_end": true + }, + "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_cat": [ + [ + "CAT_CAT", + "pigz", + "2.8" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:16:28.118094" + }, + "sarscov2 - [ fasta, sizes ] - zipped": { + "content": [ + { + "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" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:15:56.529595" + }, + "sarscov2 - genome - error: name conflict": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "file_out": [ + + ], + "versions_cat": [ + + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T16:14:54.496538" + }, + "sarscov2 - [ fasta, sizes ] - unzipped": { + "content": [ + { + "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" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T11:26:29.942203" + }, + "sarscov2 - [ gff3_gz, maf_gz ] - zipped": { + "content": [ + { + "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" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2025-12-10T11:26:45.679401" + }, + "sarscov2 - fasta - zipped": { + "content": [ + { + "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" + ] + ] + } + ], + "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/gnu/sort/environment.yml b/modules/nf-core/gnu/sort/environment.yml new file mode 100644 index 00000000..0c4cd942 --- /dev/null +++ b/modules/nf-core/gnu/sort/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - conda-forge::coreutils=9.5 diff --git a/modules/nf-core/gnu/sort/main.nf b/modules/nf-core/gnu/sort/main.nf new file mode 100644 index 00000000..6190210d --- /dev/null +++ b/modules/nf-core/gnu/sort/main.nf @@ -0,0 +1,48 @@ +process GNU_SORT { + tag "$meta.id" + label "process_low" + + conda "${moduleDir}/environment.yml" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/coreutils:9.5': + 'biocontainers/coreutils:9.5' }" + + input: + tuple val(meta), path(input) + + output: + tuple val(meta), path( "${output_file}" ) , emit: sorted + 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}" + suffix = task.ext.suffix ?: "${input.extension}" + output_file = "${prefix}.${suffix}" + if ("$input" == "$output_file") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ + sort ${args} ${input} > ${output_file} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + coreutils: \$(sort --version |& sed '1!d ; s/sort (GNU coreutils) //') + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + suffix = task.ext.suffix ?: "${input.extension}" + output_file = "${prefix}.${suffix}" + if ("$input" == "$output_file") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" + """ + touch ${output_file} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + coreutils: \$(sort --version |& sed '1!d ; s/sort (GNU coreutils) //') + END_VERSIONS + """ +} diff --git a/modules/nf-core/gnu/sort/meta.yml b/modules/nf-core/gnu/sort/meta.yml new file mode 100644 index 00000000..feba2c1f --- /dev/null +++ b/modules/nf-core/gnu/sort/meta.yml @@ -0,0 +1,55 @@ +name: "gnu_sort" +description: | + Writes a sorted concatenation of file/s +keywords: + - GNU + - coreutils + - sort + - merge compare +tools: + - gnu: + description: "The GNU Core Utilities are the basic file, shell and text manipulation + utilities of the GNU operating system. These are the core utilities which are + expected to exist on every operating system." + homepage: "https://www.gnu.org/software/coreutils/" + documentation: "https://www.gnu.org/software/coreutils/manual/html_node/index.html" + tool_dev_url: "https://git.savannah.gnu.org/cgit/coreutils.git" + doi: "10.5281/zenodo.581670" + licence: ["GPL"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: Draft assembly file + pattern: "*.{txt,bed,interval,genome,bins}" + ontologies: [] +output: + sorted: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + pattern: "${output_file}" + - "${output_file}": + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + pattern: "${output_file}" + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@DLBPointon" +maintainers: + - "@DLBPointon" diff --git a/modules/nf-core/gnu/sort/tests/main.nf.test b/modules/nf-core/gnu/sort/tests/main.nf.test new file mode 100644 index 00000000..e4030187 --- /dev/null +++ b/modules/nf-core/gnu/sort/tests/main.nf.test @@ -0,0 +1,120 @@ +nextflow_process { + + name "Test Process GNU_SORT" + script "modules/nf-core/gnu/sort/main.nf" + process "GNU_SORT" + + tag "modules" + tag "modules_nfcore" + tag "gnu" + tag "gnu/sort" + + test("unsorted_genome_sort") { + config "./sort_simple_bed.config" + + when { + process { + """ + input[0] = [ + [id:'genome_test'], + file(params.test_data['generic']['unsorted_data']['unsorted_text']['genome_file'], + checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot( + file(process.out.sorted[0][1]).name + ).match("genome_sort") + } + ) + } + + } + + test("unsorted_intervals_sort") { + config "./sort_simple_bed.config" + when { + process { + """ + input[0] = [ + [id:'test'], + file(params.test_data['generic']['unsorted_data']['unsorted_text']['intervals'], + checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot( + file(process.out.sorted[0][1]).name + ).match("interval_sort") + } + ) + } + + } + + test("unsorted_csv_sort") { + config "./sort_complex.config" + + when { + process { + """ + input[0] = [ + [id:'test'], + file(params.test_data['generic']['unsorted_data']['unsorted_text']['numbers_csv'], + checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + { assert snapshot( + file(process.out.sorted[0][1]).name + ).match("csv_sort") + } + ) + } + + } + + test("unsorted_csv_sort_stub") { + config "./sort_complex.config" + options "-stub" + + when { + process { + """ + input[0] = [ + [id:'test'], + file(params.test_data['generic']['unsorted_data']['unsorted_text']['numbers_csv'], + checkIfExists: true) + ] + """ + } + } + + then { + assertAll ( + { assert process.success }, + { assert snapshot(process.out).match() }, + ) + } + + } + +} diff --git a/modules/nf-core/gnu/sort/tests/main.nf.test.snap b/modules/nf-core/gnu/sort/tests/main.nf.test.snap new file mode 100644 index 00000000..20e17080 --- /dev/null +++ b/modules/nf-core/gnu/sort/tests/main.nf.test.snap @@ -0,0 +1,164 @@ +{ + "unsorted_csv_sort": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.csv.sorted:md5,0b52d1b4c4a0c6e972c6f94aafd75a1d" + ] + ], + "1": [ + "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + ], + "sorted": [ + [ + { + "id": "test" + }, + "test.csv.sorted:md5,0b52d1b4c4a0c6e972c6f94aafd75a1d" + ] + ], + "versions": [ + "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-04-30T14:27:50.564838" + }, + "interval_sort": { + "content": [ + "test.bed.sorted" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-04-30T14:27:34.740893" + }, + "unsorted_csv_sort_stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.csv.sorted:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + ], + "sorted": [ + [ + { + "id": "test" + }, + "test.csv.sorted:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-04-30T14:28:06.468116" + }, + "csv_sort": { + "content": [ + "test.csv.sorted" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-04-30T14:27:50.596931" + }, + "unsorted_genome_sort": { + "content": [ + { + "0": [ + [ + { + "id": "genome_test" + }, + "genome_test.bed.sorted:md5,fd97f7efafdbbfa71d9b560f10b4b048" + ] + ], + "1": [ + "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + ], + "sorted": [ + [ + { + "id": "genome_test" + }, + "genome_test.bed.sorted:md5,fd97f7efafdbbfa71d9b560f10b4b048" + ] + ], + "versions": [ + "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-04-30T14:27:19.192354" + }, + "genome_sort": { + "content": [ + "genome_test.bed.sorted" + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-04-30T14:27:19.234221" + }, + "unsorted_intervals_sort": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.bed.sorted:md5,abbce903ef263d38b2f71856387799ab" + ] + ], + "1": [ + "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + ], + "sorted": [ + [ + { + "id": "test" + }, + "test.bed.sorted:md5,abbce903ef263d38b2f71856387799ab" + ] + ], + "versions": [ + "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.4" + }, + "timestamp": "2025-04-30T14:27:34.711885" + } +} \ No newline at end of file diff --git a/modules/nf-core/gnu/sort/tests/sort_complex.config b/modules/nf-core/gnu/sort/tests/sort_complex.config new file mode 100644 index 00000000..ce4f1518 --- /dev/null +++ b/modules/nf-core/gnu/sort/tests/sort_complex.config @@ -0,0 +1,6 @@ +process { + withName: GNU_SORT { + ext.args = { "-t ';' -g -k 1,1 -k 2,2" } + ext.suffix = { "csv.sorted" } + } +} diff --git a/modules/nf-core/gnu/sort/tests/sort_simple_bed.config b/modules/nf-core/gnu/sort/tests/sort_simple_bed.config new file mode 100644 index 00000000..8496c8d7 --- /dev/null +++ b/modules/nf-core/gnu/sort/tests/sort_simple_bed.config @@ -0,0 +1,6 @@ +process { + withName: GNU_SORT { + ext.args = { "-k1,1 -k2,2n" } + ext.suffix = { "bed.sorted" } + } +} diff --git a/modules/nf-core/gnu/sort/tests/sort_simple_genome.config b/modules/nf-core/gnu/sort/tests/sort_simple_genome.config new file mode 100644 index 00000000..c408ece1 --- /dev/null +++ b/modules/nf-core/gnu/sort/tests/sort_simple_genome.config @@ -0,0 +1,6 @@ +process { + withName: GNU_SORT { + ext.args = { "-k1,1 -k2,2n" } + ext.suffix = { "genome.sorted" } + } +} diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index 03b9c585..ed99fa48 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -5,7 +5,11 @@ // -include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" +include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" +include { CAT_CAT as CAT_JUNCTIONS } from "../../../modules/nf-core/cat/cat/main.nf" +include { CAT_CAT as CAT_SPLICE_JUNCTIONS } from "../../../modules/nf-core/cat/cat/main.nf" +include { GNU_SORT as SORT_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" +include { GNU_SORT as SORT_SPLICE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" workflow FASTQ_ALIGN_RNA { take: @@ -40,8 +44,52 @@ workflow FASTQ_ALIGN_RNA { ) ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) + // Concatenate splice junction files + def ch_splice_junctions_to_merge = group_junctions(STAR_ALIGN.out.spl_junc_tab) + + CAT_SPLICE_JUNCTIONS(ch_splice_junctions_to_merge) + SORT_SPLICE_JUNCTIONS(CAT_SPLICE_JUNCTIONS.out.file_out) + ch_versions = ch_versions.mix(SORT_SPLICE_JUNCTIONS.out.versions.first()) + + // Concatenate junction files + def ch_junctions_to_merge = group_junctions(STAR_ALIGN.out.junction) + + CAT_JUNCTIONS(ch_junctions_to_merge) + SORT_JUNCTIONS(CAT_JUNCTIONS.out.file_out) + ch_versions = ch_versions.mix(SORT_JUNCTIONS.out.versions.first()) + emit: - bam = ch_bam // channel: [ [meta], bam ] - reports = ch_reports // channel: [ [meta], log ] - versions = ch_versions // channel: [ versions.yml ] + bam = ch_bam // channel: [ [meta], bam ] + splice_junctions = SORT_SPLICE_JUNCTIONS.out.sorted // channel: [ [meta], splice_junctions ] + junctions = SORT_JUNCTIONS.out.sorted // channel: [ [meta], junctions ] + reports = ch_reports // channel: [ [meta], log ] + versions = ch_versions // channel: [ versions.yml ] +} + +def group_junctions(ch) { + return ch.map { meta, files -> + def gk = (meta.chunks as Integer ?: 1) + return [ + groupKey( + meta - meta.subMap('readgroup', 'chunks') + [id: meta.id ==~ /^\d{4}\..*$/ ? meta.id[5..-1] : meta.id], + gk, + ), + files, + ] + } + .groupTuple() + .map { meta, files -> + def gk = (meta.count as Integer ?: 1) + return [ + groupKey( + meta - meta.subMap('count') + [id: meta.samplename ?: meta.id], + gk, + ), + files, + ] + } + .groupTuple() + .map { meta, files -> + return [meta, files.flatten()] + } } diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index c00f4d75..8c0cf445 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -151,8 +151,10 @@ workflow FASTQ_TO_CRAM { ch_cram_crai.dump(tag: "FASTQ_TO_CRAM: cram and crai", pretty: true) emit: - cram_crai = ch_cram_crai - sormadup_metrics = ch_sormadup_metrics - align_reports = FASTQ_ALIGN_DNA.out.reports - versions = ch_versions + cram_crai = ch_cram_crai + rna_splice_junctions = FASTQ_ALIGN_RNA.out.splice_junctions + rna_junctions = FASTQ_ALIGN_RNA.out.junctions + sormadup_metrics = ch_sormadup_metrics + align_reports = FASTQ_ALIGN_DNA.out.reports + versions = ch_versions } diff --git a/tests/default.nf.test b/tests/default.nf.test index ba9b69e3..66a790d4 100644 --- a/tests/default.nf.test +++ b/tests/default.nf.test @@ -39,4 +39,20 @@ nextflow_pipeline { } + test("main - fastq RNA input") { + + when { + params { + input = "${projectDir}/tests/inputs/fastq_rna.yml" + igenomes_base = "s3://reference-data/genomes" + outdir = "$outputDir" + } + } + + then { + assert workflow.success + } + + } + } diff --git a/tests/inputs/fastq_rna.yml b/tests/inputs/fastq_rna.yml new file mode 100644 index 00000000..878dab22 --- /dev/null +++ b/tests/inputs/fastq_rna.yml @@ -0,0 +1,20 @@ +--- +# fastq inputs +- id: sample1_L001 + samplename: fastq_paired1 + library: test_library + organism: Homo sapiens + tag: WES + sample_type: RNA + aligner: star + fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz + fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz +- id: sample1_L002 + samplename: fastq_paired1 + library: test_library + organism: Homo sapiens + tag: WES + sample_type: RNA + aligner: star + fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz + fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 292b5b49..9149e445 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -488,6 +488,8 @@ workflow PREPROCESSING { fastp_json = FASTP.out.json fastp_html = FASTP.out.html crams = FASTQ_TO_CRAM.out.cram_crai + rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions + rna_junctions = FASTQ_TO_CRAM.out.rna_junctions align_reports = FASTQ_TO_CRAM.out.align_reports sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics mosdepth_global = mosdepth_global_out From cf107cf1f34e9f6bb0c939f146ebdfb47b20dbf3 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 17 Dec 2025 13:35:09 +0100 Subject: [PATCH 120/202] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2648d1d9..def4121f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add support for untrimmed fastq outputs for unsupported genomes or when aligner is set to `false`. - Drop support for global `aligner` parameter. The aligner must now be specified per sample in the sample sheet or sample info. - Simplify fastq sharding and make it user configurable via the `split_fastq` parameter. +- Added splice junctions and junctions outputs for RNA-seq alignments using STAR. ## v2.0.6 From 4bf8735b9ce7ad108397eb66c84861d3e47a72b2 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 17 Dec 2025 14:11:18 +0100 Subject: [PATCH 121/202] merge with the sort module --- conf/modules.config | 18 +- modules.json | 131 +++++--- modules/nf-core/cat/cat/environment.yml | 7 - modules/nf-core/cat/cat/main.nf | 78 ----- modules/nf-core/cat/cat/meta.yml | 63 ---- modules/nf-core/cat/cat/tests/main.nf.test | 192 ------------ .../nf-core/cat/cat/tests/main.nf.test.snap | 283 ------------------ modules/nf-core/cat/cat/tests/nextflow.config | 6 - subworkflows/local/fastq_align_rna/main.nf | 22 +- 9 files changed, 110 insertions(+), 690 deletions(-) delete mode 100644 modules/nf-core/cat/cat/environment.yml delete mode 100644 modules/nf-core/cat/cat/main.nf delete mode 100644 modules/nf-core/cat/cat/meta.yml delete mode 100644 modules/nf-core/cat/cat/tests/main.nf.test delete mode 100644 modules/nf-core/cat/cat/tests/main.nf.test.snap delete mode 100644 modules/nf-core/cat/cat/tests/nextflow.config diff --git a/conf/modules.config b/conf/modules.config index d5364955..9aa74e0e 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -154,22 +154,16 @@ process { } } - withName: '.*FASTQ_ALIGN_RNA:CAT_SPLICE_JUNCTIONS' { - ext.prefix = { "${meta.id}.unsorted.Sj.out.tab" } - } - - withName: '.*FASTQ_ALIGN_RNA:CAT_JUNCTIONS' { - ext.prefix = { "${meta.id}.unsorted.Chimeric.out.junction" } - } - - withName: '.*FASTQ_ALIGN_RNA:SORT_SPLICE_JUNCTIONS' { + withName: '.*FASTQ_ALIGN_RNA:SORT_MERGE_SPLICE_JUNCTIONS' { ext.prefix = { "${meta.id}.Sj.out" } - ext.args = '-k1,1n -k2,2n -k3,3n' + ext.suffix = "tab" + ext.args = '-k1,1n -k2,2n -k3,3n --merge' } - withName: '.*FASTQ_ALIGN_RNA:SORT_JUNCTIONS' { + withName: '.*FASTQ_ALIGN_RNA:SORT_MERGE_JUNCTIONS' { ext.prefix = { "${meta.id}.Chimeric.out" } - ext.args = '-k1,1n -k2,2n -k4,4n -k5,5n' + ext.suffix = "junction" + ext.args = '-k1,1n -k2,2n -k4,4n -k5,5n --merge' } //// Samtools sormadup diff --git a/modules.json b/modules.json index 8e111c49..c83142f7 100644 --- a/modules.json +++ b/modules.json @@ -8,150 +8,199 @@ "bcl2fastq": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["bcl_demultiplex"] + "installed_by": [ + "bcl_demultiplex" + ] }, "bclconvert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["bcl_demultiplex", "modules"], + "installed_by": [ + "bcl_demultiplex", + "modules" + ], "patch": "modules/nf-core/bclconvert/bclconvert.diff" }, "biobambam/bamsormadup": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff" }, "bowtie2/align": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["fastq_align_dna", "modules"], + "installed_by": [ + "fastq_align_dna", + "modules" + ], "patch": "modules/nf-core/bowtie2/align/bowtie2-align.diff" }, "bwa/mem": { "branch": "master", "git_sha": "1c46359c837ef768b004519f535c30378e8289fc", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/bwa/mem/bwa-mem.diff" }, "bwamem2/mem": { "branch": "master", "git_sha": "d86336f3e7ae0d5f76c67b0859409769cfeb2af2", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, - "cat/cat": { - "branch": "master", - "git_sha": "69614d4579a6bd9b8a2ecffb35959809d9c36559", - "installed_by": ["modules"] - }, "dragmap/align": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": ["fastq_align_dna"], + "installed_by": [ + "fastq_align_dna" + ], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, "fastp": { "branch": "master", "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "gnu/sort": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "md5sum": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "mosdepth": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/mosdepth/mosdepth.diff" }, "multiqc": { "branch": "master", "git_sha": "9656d955b700a8707c4a67821ab056f8c1095675", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/multiqc/multiqc.diff" }, "picard/collecthsmetrics": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff" }, "picard/collectmultiplemetrics": { "branch": "master", "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff" }, "picard/collectwgsmetrics": { "branch": "master", "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, "samtools/convert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/convert/samtools-convert.diff" }, "samtools/coverage": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, "samtools/flagstat": { "branch": "master", "git_sha": "e334e12a1e985adc5ffc3fc78a68be1de711de45", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/idxstats": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": ["modules"] + "installed_by": [ + "modules" + ] }, "samtools/sormadup": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/sormadup/samtools-sormadup.diff" }, "samtools/sort": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "samtools/stats": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/samtools/stats/samtools-stats.diff" }, "snapaligner/align": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["fastq_align_dna", "modules"], + "installed_by": [ + "fastq_align_dna", + "modules" + ], "patch": "modules/nf-core/snapaligner/align/snapaligner-align.diff" }, "star/align": { "branch": "master", "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", - "installed_by": ["modules"], + "installed_by": [ + "modules" + ], "patch": "modules/nf-core/star/align/star-align.diff" }, "strobealign": { "branch": "master", "git_sha": "d5cc72b63c4e1565cb66e83f0577b04c0bb54d5c", - "installed_by": ["fastq_align_dna", "modules"], + "installed_by": [ + "fastq_align_dna", + "modules" + ], "patch": "modules/nf-core/strobealign/strobealign.diff" } } @@ -161,30 +210,40 @@ "bcl_demultiplex": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "fastq_align_dna": { "branch": "master", "git_sha": "070ddae7fb59384d3d85bf69eb9a1d71ab33ada9", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "df4d1c8cdee98a1bbbed8fc51e82296568e0f9c1", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": ["subworkflows"] + "installed_by": [ + "subworkflows" + ] } } } } } -} +} \ No newline at end of file diff --git a/modules/nf-core/cat/cat/environment.yml b/modules/nf-core/cat/cat/environment.yml deleted file mode 100644 index 98511769..00000000 --- a/modules/nf-core/cat/cat/environment.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - conda-forge - - bioconda -dependencies: - - conda-forge::pigz=2.8 diff --git a/modules/nf-core/cat/cat/main.nf b/modules/nf-core/cat/cat/main.nf deleted file mode 100644 index aa72fc4d..00000000 --- a/modules/nf-core/cat/cat/main.nf +++ /dev/null @@ -1,78 +0,0 @@ -process CAT_CAT { - tag "$meta.id" - label 'process_low' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - '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 - 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 - - script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def file_list = files_in.collect { it.toString() } - - // choose appropriate concatenation tool depending on input and output format - - // | input | output | command1 | command2 | - // |-----------|------------|----------|----------| - // | gzipped | gzipped | cat | | - // | ungzipped | ungzipped | cat | | - // | gzipped | ungzipped | zcat | | - // | ungzipped | gzipped | cat | pigz | - - // Use input file ending as default - prefix = task.ext.prefix ?: "${meta.id}${getFileSuffix(file_list[0])}" - out_zip = prefix.endsWith('.gz') - in_zip = file_list[0].endsWith('.gz') - command1 = (in_zip && !out_zip) ? 'zcat' : 'cat' - command2 = (!in_zip && out_zip) ? "| pigz -c -p $task.cpus $args2" : '' - 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 " + - "module CAT_CAT (currently `$prefix`). Please choose a different one." - } - """ - $command1 \\ - $args \\ - ${file_list.join(' ')} \\ - $command2 \\ - > ${prefix} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ - - stub: - def file_list = files_in.collect { it.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 " + - "module CAT_CAT (currently `$prefix`). Please choose a different one." - } - """ - touch $prefix - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS - """ -} - -// for .gz files also include the second to last extension if it is present. E.g., .fasta.gz -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 deleted file mode 100644 index 36a7359b..00000000 --- a/modules/nf-core/cat/cat/meta.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: cat_cat -description: A module for concatenation of gzipped or uncompressed files -keywords: - - concatenate - - gzip - - cat -tools: - - cat: - 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: "*" - ontologies: [] -output: - 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" -maintainers: - - "@erikrikarddaniel" - - "@FriederikeHanssen" diff --git a/modules/nf-core/cat/cat/tests/main.nf.test b/modules/nf-core/cat/cat/tests/main.nf.test deleted file mode 100644 index 030c6649..00000000 --- a/modules/nf-core/cat/cat/tests/main.nf.test +++ /dev/null @@ -1,192 +0,0 @@ -nextflow_process { - - name "Test Process CAT_CAT" - script "../main.nf" - process "CAT_CAT" - - tag "modules" - tag "modules_nfcore" - tag "cat" - tag "cat/cat" - - test("sarscov2 - genome - error: name conflict") { - when { - process { - """ - input[0] = - [ - [ id:'genome', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) - ] - ] - """ - } - } - 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 snapshot(process.out).match() } - ) - } - } - - test("sarscov2 - [ fasta, sizes ] - unzipped") { - when { - process { - """ - input[0] = - [ - [ id:'test', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) - ] - ] - """ - } - } - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - - test("sarscov2 - [ gff3_gz, maf_gz ] - zipped") { - when { - process { - """ - input[0] = - [ - [ id:'test', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/last/contigs.genome.maf.gz', checkIfExists: true) - ] - ] - """ - } - } - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() - } - ) - } - } - - test("sarscov2 - [ gff3_gz, maf_gz ] - unzipped") { - config './nextflow.config' - - when { - params { - cat_prefix = "cat.txt" - } - process { - """ - input[0] = - [ - [ id:'test', single_end:true ], - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.gff3.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/last/contigs.genome.maf.gz', checkIfExists: true) - ] - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - - test("sarscov2 - [ fasta, sizes ] - zipped") { - config './nextflow.config' - - when { - params { - 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), - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.sizes', checkIfExists: true) - ] - ] - """ - } - } - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("sarscov2 - fasta - zipped") { - config './nextflow.config' - - when { - params { - 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] = - [ - [ 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() } - ) - } - } -} diff --git a/modules/nf-core/cat/cat/tests/main.nf.test.snap b/modules/nf-core/cat/cat/tests/main.nf.test.snap deleted file mode 100644 index 5b4e4cc3..00000000 --- a/modules/nf-core/cat/cat/tests/main.nf.test.snap +++ /dev/null @@ -1,283 +0,0 @@ -{ - "sarscov2 - [ gff3_gz, maf_gz ] - unzipped": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" - ] - ], - "1": [ - [ - "CAT_CAT", - "pigz", - "2.8" - ] - ], - "file_out": [ - [ - { - "id": "test", - "single_end": true - }, - "cat.txt:md5,c439d3b60e7bc03e8802a451a0d9a5d9" - ] - ], - "versions_cat": [ - [ - "CAT_CAT", - "pigz", - "2.8" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2025-12-10T09:08:31.479828" - }, - "sarscov2 - fasta - unzipped - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - "CAT_CAT", - "pigz", - "2.8" - ] - ], - "file_out": [ - [ - { - "id": "test", - "single_end": true - }, - "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions_cat": [ - [ - "CAT_CAT", - "pigz", - "2.8" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2025-12-10T16:16:28.118094" - }, - "sarscov2 - [ fasta, sizes ] - zipped": { - "content": [ - { - "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" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2025-12-10T16:15:56.529595" - }, - "sarscov2 - genome - error: name conflict": { - "content": [ - { - "0": [ - - ], - "1": [ - - ], - "file_out": [ - - ], - "versions_cat": [ - - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2025-12-10T16:14:54.496538" - }, - "sarscov2 - [ fasta, sizes ] - unzipped": { - "content": [ - { - "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" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2025-12-10T11:26:29.942203" - }, - "sarscov2 - [ gff3_gz, maf_gz ] - zipped": { - "content": [ - { - "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" - ] - ] - } - ], - "meta": { - "nf-test": "0.9.3", - "nextflow": "25.10.2" - }, - "timestamp": "2025-12-10T11:26:45.679401" - }, - "sarscov2 - fasta - zipped": { - "content": [ - { - "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" - ] - ] - } - ], - "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 deleted file mode 100644 index 5bc9bf50..00000000 --- a/modules/nf-core/cat/cat/tests/nextflow.config +++ /dev/null @@ -1,6 +0,0 @@ - -process { - withName: CAT_CAT { - ext.prefix = "${params.cat_prefix}" - } -} diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index ed99fa48..ce0d6862 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -5,11 +5,9 @@ // -include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" -include { CAT_CAT as CAT_JUNCTIONS } from "../../../modules/nf-core/cat/cat/main.nf" -include { CAT_CAT as CAT_SPLICE_JUNCTIONS } from "../../../modules/nf-core/cat/cat/main.nf" -include { GNU_SORT as SORT_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" -include { GNU_SORT as SORT_SPLICE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" +include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" +include { GNU_SORT as SORT_MERGE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" +include { GNU_SORT as SORT_MERGE_SPLICE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" workflow FASTQ_ALIGN_RNA { take: @@ -47,21 +45,19 @@ workflow FASTQ_ALIGN_RNA { // Concatenate splice junction files def ch_splice_junctions_to_merge = group_junctions(STAR_ALIGN.out.spl_junc_tab) - CAT_SPLICE_JUNCTIONS(ch_splice_junctions_to_merge) - SORT_SPLICE_JUNCTIONS(CAT_SPLICE_JUNCTIONS.out.file_out) - ch_versions = ch_versions.mix(SORT_SPLICE_JUNCTIONS.out.versions.first()) + SORT_MERGE_SPLICE_JUNCTIONS(ch_splice_junctions_to_merge) + ch_versions = ch_versions.mix(SORT_MERGE_SPLICE_JUNCTIONS.out.versions.first()) // Concatenate junction files def ch_junctions_to_merge = group_junctions(STAR_ALIGN.out.junction) - CAT_JUNCTIONS(ch_junctions_to_merge) - SORT_JUNCTIONS(CAT_JUNCTIONS.out.file_out) - ch_versions = ch_versions.mix(SORT_JUNCTIONS.out.versions.first()) + SORT_MERGE_JUNCTIONS(ch_junctions_to_merge) + ch_versions = ch_versions.mix(SORT_MERGE_JUNCTIONS.out.versions.first()) emit: bam = ch_bam // channel: [ [meta], bam ] - splice_junctions = SORT_SPLICE_JUNCTIONS.out.sorted // channel: [ [meta], splice_junctions ] - junctions = SORT_JUNCTIONS.out.sorted // channel: [ [meta], junctions ] + splice_junctions = SORT_MERGE_SPLICE_JUNCTIONS.out.sorted // channel: [ [meta], splice_junctions ] + junctions = SORT_MERGE_JUNCTIONS.out.sorted // channel: [ [meta], junctions ] reports = ch_reports // channel: [ [meta], log ] versions = ch_versions // channel: [ versions.yml ] } From 9453c195183460e64b95044ad3304b38a9b45e47 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 17 Dec 2025 14:26:05 +0100 Subject: [PATCH 122/202] prettier --- modules.json | 126 +++++++++++++-------------------------------------- 1 file changed, 31 insertions(+), 95 deletions(-) diff --git a/modules.json b/modules.json index c83142f7..d1d3d5eb 100644 --- a/modules.json +++ b/modules.json @@ -8,199 +8,145 @@ "bcl2fastq": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": [ - "bcl_demultiplex" - ] + "installed_by": ["bcl_demultiplex"] }, "bclconvert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "bcl_demultiplex", - "modules" - ], + "installed_by": ["bcl_demultiplex", "modules"], "patch": "modules/nf-core/bclconvert/bclconvert.diff" }, "biobambam/bamsormadup": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff" }, "bowtie2/align": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "fastq_align_dna", - "modules" - ], + "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/bowtie2/align/bowtie2-align.diff" }, "bwa/mem": { "branch": "master", "git_sha": "1c46359c837ef768b004519f535c30378e8289fc", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwa/mem/bwa-mem.diff" }, "bwamem2/mem": { "branch": "master", "git_sha": "d86336f3e7ae0d5f76c67b0859409769cfeb2af2", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, "dragmap/align": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", - "installed_by": [ - "fastq_align_dna" - ], + "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, "fastp": { "branch": "master", "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "gnu/sort": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "md5sum": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "mosdepth": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/mosdepth/mosdepth.diff" }, "multiqc": { "branch": "master", "git_sha": "9656d955b700a8707c4a67821ab056f8c1095675", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/multiqc/multiqc.diff" }, "picard/collecthsmetrics": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff" }, "picard/collectmultiplemetrics": { "branch": "master", "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff" }, "picard/collectwgsmetrics": { "branch": "master", "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, "samtools/convert": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/convert/samtools-convert.diff" }, "samtools/coverage": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, "samtools/flagstat": { "branch": "master", "git_sha": "e334e12a1e985adc5ffc3fc78a68be1de711de45", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/idxstats": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": [ - "modules" - ] + "installed_by": ["modules"] }, "samtools/sormadup": { "branch": "master", "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sormadup/samtools-sormadup.diff" }, "samtools/sort": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, "samtools/stats": { "branch": "master", "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/samtools/stats/samtools-stats.diff" }, "snapaligner/align": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "fastq_align_dna", - "modules" - ], + "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/snapaligner/align/snapaligner-align.diff" }, "star/align": { "branch": "master", "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", - "installed_by": [ - "modules" - ], + "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" }, "strobealign": { "branch": "master", "git_sha": "d5cc72b63c4e1565cb66e83f0577b04c0bb54d5c", - "installed_by": [ - "fastq_align_dna", - "modules" - ], + "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/strobealign/strobealign.diff" } } @@ -210,40 +156,30 @@ "bcl_demultiplex": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "fastq_align_dna": { "branch": "master", "git_sha": "070ddae7fb59384d3d85bf69eb9a1d71ab33ada9", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nextflow_pipeline": { "branch": "master", "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", "git_sha": "df4d1c8cdee98a1bbbed8fc51e82296568e0f9c1", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", - "installed_by": [ - "subworkflows" - ] + "installed_by": ["subworkflows"] } } } } } -} \ No newline at end of file +} From 6a7d91d6511fa573f34b1912cc52a6601091aca5 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 17 Dec 2025 14:52:29 +0100 Subject: [PATCH 123/202] fix tests --- conf/modules.config | 1 + .../local/fastq_align_rna/main.nf.test.snap | 52 ++++++++++-- .../fastq_to_aligned_cram/main.nf.test.snap | 82 ++++++++++++++++--- tests/workflows/preprocessing.nf.test.snap | 34 ++++++-- 4 files changed, 143 insertions(+), 26 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 9aa74e0e..db240008 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -138,6 +138,7 @@ process { //// STAR withName: '.*FASTQ_ALIGN_RNA:STAR_ALIGN' { + ext.prefix = { "${meta.id}.star" } cpus = 16 memory = 64.GB ext.args = { diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap index bd1553c9..3c8c8522 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap @@ -14,7 +14,25 @@ "samplename": "test", "single_end": false }, - "test.Aligned.out.bam" + "test.star.Aligned.out.bam" + ] + ], + "junctions": [ + [ + { + "groupSize": 1, + "groupTarget": { + "id": "test", + "samplename": "test", + "single_end": false, + "sample_type": "RNA", + "genome": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + } + } + }, + "test.Chimeric.out.junction:md5,b560229eb850489cf0cc6f60baee57b5" ] ], "reports": [ @@ -29,7 +47,7 @@ "samplename": "test", "single_end": false }, - "test.Log.final.out" + "test.star.Log.final.out" ], [ { @@ -42,7 +60,7 @@ "samplename": "test", "single_end": false }, - "test.Log.out" + "test.star.Log.out" ], [ { @@ -55,19 +73,39 @@ "samplename": "test", "single_end": false }, - "test.Log.progress.out" + "test.star.Log.progress.out" + ] + ], + "splice_junctions": [ + [ + { + "groupSize": 1, + "groupTarget": { + "id": "test", + "samplename": "test", + "single_end": false, + "sample_type": "RNA", + "genome": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + } + } + }, + "test.Sj.out.tab:md5,15852c5678c04e86dcb66793b7e02bb9" ] ], "versions": [ - "versions.yml:md5,a08c174f2d393f0b39c2cfe003ffafb9" + "versions.yml:md5,a08c174f2d393f0b39c2cfe003ffafb9", + "versions.yml:md5,e0beb4fb46280de51c432ed766a0cdb2", + "versions.yml:md5,e1135512a195d12c4b6aaadd8e84dcf6" ] } ], "meta": { "nf-test": "0.9.2", - "nextflow": "25.10.0" + "nextflow": "25.10.2" }, - "timestamp": "2025-11-04T14:22:48.650056385" + "timestamp": "2025-12-17T14:44:53.335659555" }, "fastq align rna - unknown aligner": { "content": [ diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index d1459def..a4ee2182 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -23,6 +23,12 @@ "test.merged.cram", "test.merged.cram.crai" ] + ], + "rna_junctions": [ + + ], + "rna_splice_junctions": [ + ], "sormadup_metrics": [ @@ -34,10 +40,10 @@ } ], "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T13:40:29.319628" + "timestamp": "2025-12-17T14:52:18.252297311" }, "fastq to cram - bwa - bamsormadup": { "content": [ @@ -63,6 +69,12 @@ "test.cram", "test.cram.crai" ] + ], + "rna_junctions": [ + + ], + "rna_splice_junctions": [ + ], "sormadup_metrics": [ [ @@ -91,10 +103,10 @@ } ], "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T12:52:20.737608" + "timestamp": "2025-12-17T14:46:54.525880067" }, "fastq to cram - bwa - samtools sormadup": { "content": [ @@ -120,6 +132,12 @@ "test.merged.cram", "test.merged.cram.crai" ] + ], + "rna_junctions": [ + + ], + "rna_splice_junctions": [ + ], "sormadup_metrics": [ [ @@ -136,7 +154,7 @@ } } }, - "test.merged.metrics:md5,a4129081c3f2f10e6f6ecdf8b1c44852" + "test.merged.metrics:md5,795c73aa836eb480e418f52db98e37cc" ] ], "versions": [ @@ -147,10 +165,10 @@ } ], "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T13:04:47.356008" + "timestamp": "2025-12-17T14:50:28.614932101" }, "fastq to cram - star - bamsormadup": { "content": [ @@ -177,6 +195,42 @@ "test.cram.crai" ] ], + "rna_junctions": [ + [ + { + "groupSize": 1, + "groupTarget": { + "id": "test", + "samplename": "test", + "single_end": false, + "sample_type": "RNA", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + } + } + }, + "test.Chimeric.out.junction:md5,b560229eb850489cf0cc6f60baee57b5" + ] + ], + "rna_splice_junctions": [ + [ + { + "groupSize": 1, + "groupTarget": { + "id": "test", + "samplename": "test", + "single_end": false, + "sample_type": "RNA", + "genome_data": { + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + } + } + }, + "test.Sj.out.tab:md5,15852c5678c04e86dcb66793b7e02bb9" + ] + ], "sormadup_metrics": [ [ { @@ -202,10 +256,10 @@ } ], "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T13:04:21.082358" + "timestamp": "2025-12-17T14:49:33.159222222" }, "fastq to cram - bwa - samtools sort": { "content": [ @@ -231,6 +285,12 @@ "test.merged.cram", "test.merged.cram.crai" ] + ], + "rna_junctions": [ + + ], + "rna_splice_junctions": [ + ], "sormadup_metrics": [ @@ -242,9 +302,9 @@ } ], "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-02T13:40:06.599667" + "timestamp": "2025-12-17T14:51:22.925873858" } } \ No newline at end of file diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 82cf9c36..79b6910d 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -510,6 +510,12 @@ ], "picard_wgsmetrics": [ + ], + "rna_junctions": [ + + ], + "rna_splice_junctions": [ + ], "samtools_coverage": [ [ @@ -535,7 +541,7 @@ "id": "sample1" } }, - "sample1.coverage.txt:md5,656b7371132475783094d80b7d2292b5" + "sample1.coverage.txt:md5,2273df8af027c91ad1a51ab62ff39f13" ] ], "samtools_flagstat": [ @@ -616,7 +622,7 @@ "id": "sample1" } }, - "sample1.stats:md5,bbe2999c6baf17c96d4f00370c6b9501" + "sample1.stats:md5,48c3d9d21314717edf49cfd80014be2a" ] ], "sormadup_metrics": [ @@ -663,10 +669,10 @@ } ], "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-09T11:03:22.986076" + "timestamp": "2025-12-17T14:17:54.029873192" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -881,6 +887,12 @@ ], "picard_wgsmetrics": [ + ], + "rna_junctions": [ + + ], + "rna_splice_junctions": [ + ], "samtools_coverage": [ @@ -1006,10 +1018,10 @@ } ], "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-09T11:09:14.114309" + "timestamp": "2025-12-17T14:25:25.520000109" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1437,6 +1449,12 @@ }, "sample1.CollectWgsMetrics.coverage_metrics" ] + ], + "rna_junctions": [ + + ], + "rna_splice_junctions": [ + ], "samtools_coverage": [ [ @@ -1585,9 +1603,9 @@ } ], "meta": { - "nf-test": "0.9.3", + "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-09T11:06:50.62591" + "timestamp": "2025-12-17T14:22:40.972493649" } } \ No newline at end of file From b077cf6a2b1b62dc27a5d01ce86f8c6e4dbc1117 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 17 Dec 2025 15:30:28 +0100 Subject: [PATCH 124/202] fix unstable stat files in snapshot --- tests/workflows/preprocessing.nf.test | 4 +- tests/workflows/preprocessing.nf.test.snap | 48 +++++++++++----------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index 6caacb09..e7c17760 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -69,7 +69,9 @@ nextflow_workflow { "picard_wgsmetrics", "picard_multiplemetrics_pdf", "picard_multiplemetrics", - "picard_hsmetrics" + "picard_hsmetrics", + "samtools_flagstat", + "samtools_coverage" ]) ).match() } diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 79b6910d..d0d59981 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -522,26 +522,26 @@ { "groupSize": 1, "groupTarget": { - "samplename": "sample1", - "library": "test", - "organism": "Homo sapiens", - "tag": "WES", - "sample_type": "DNA", "aligner": "bwamem", - "single_end": false, "genome": "GRCh38", "genome_data": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, + "id": "sample1", + "library": "test", + "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", - "id": "sample1" + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" } }, - "sample1.coverage.txt:md5,2273df8af027c91ad1a51ab62ff39f13" + "sample1.coverage.txt" ] ], "samtools_flagstat": [ @@ -549,26 +549,26 @@ { "groupSize": 1, "groupTarget": { - "samplename": "sample1", - "library": "test", - "organism": "Homo sapiens", - "tag": "WES", - "sample_type": "DNA", "aligner": "bwamem", - "single_end": false, "genome": "GRCh38", "genome_data": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, + "id": "sample1", + "library": "test", + "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", - "id": "sample1" + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" } }, - "sample1.flagstat:md5,cd826b1749737d52499cf543d101ecd2" + "sample1.flagstat" ] ], "samtools_idxstats": [ @@ -622,7 +622,7 @@ "id": "sample1" } }, - "sample1.stats:md5,48c3d9d21314717edf49cfd80014be2a" + "sample1.stats:md5,bbe2999c6baf17c96d4f00370c6b9501" ] ], "sormadup_metrics": [ @@ -672,7 +672,7 @@ "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T14:17:54.029873192" + "timestamp": "2025-12-17T15:25:16.549534093" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ From a0bbefba0143862c9cbeb9bc69e7c579b1f77a6a Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 17 Dec 2025 16:03:17 +0100 Subject: [PATCH 125/202] fix unstable stat files in snapshot --- tests/workflows/preprocessing.nf.test | 8 ++- tests/workflows/preprocessing.nf.test.snap | 70 +++++++++++----------- 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index e7c17760..50e25c9e 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -139,7 +139,9 @@ nextflow_workflow { "picard_wgsmetrics", "picard_multiplemetrics_pdf", "picard_multiplemetrics", - "picard_hsmetrics" + "picard_hsmetrics", + "samtools_flagstat", + "samtools_coverage" ]) ).match() } @@ -210,7 +212,9 @@ nextflow_workflow { "picard_wgsmetrics", "picard_multiplemetrics_pdf", "picard_multiplemetrics", - "picard_hsmetrics" + "picard_hsmetrics", + "samtools_flagstat", + "samtools_coverage" ]) ).match() } diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index d0d59981..f072b009 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -902,26 +902,26 @@ { "groupSize": 1, "groupTarget": { - "samplename": "sample1", - "library": "test", - "organism": "Homo sapiens", - "tag": "WES", - "sample_type": "DNA", "aligner": "bwamem", - "single_end": false, "genome": "GRCh38", "genome_data": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, + "id": "sample1", + "library": "test", + "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", - "id": "sample1" + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" } }, - "sample1.flagstat:md5,cd826b1749737d52499cf543d101ecd2" + "sample1.flagstat" ] ], "samtools_idxstats": [ @@ -1021,7 +1021,7 @@ "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T14:25:25.520000109" + "timestamp": "2025-12-17T15:54:33.813455843" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1461,25 +1461,25 @@ { "groupSize": 1, "groupTarget": { - "samplename": "sample1", - "library": "test", - "organism": "Homo sapiens", - "tag": "WGS", - "sample_type": "DNA", "aligner": "bwamem", - "single_end": false, "genome": "GRCh38", "genome_data": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "id": "sample1" + "id": "sample1", + "library": "test", + "organism": "Homo sapiens", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" } }, - "sample1.coverage.txt:md5,656b7371132475783094d80b7d2292b5" + "sample1.coverage.txt" ] ], "samtools_flagstat": [ @@ -1487,25 +1487,25 @@ { "groupSize": 1, "groupTarget": { - "samplename": "sample1", - "library": "test", - "organism": "Homo sapiens", - "tag": "WGS", - "sample_type": "DNA", "aligner": "bwamem", - "single_end": false, "genome": "GRCh38", "genome_data": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "id": "sample1" + "id": "sample1", + "library": "test", + "organism": "Homo sapiens", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" } }, - "sample1.flagstat:md5,cd826b1749737d52499cf543d101ecd2" + "sample1.flagstat" ] ], "samtools_idxstats": [ @@ -1606,6 +1606,6 @@ "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T14:22:40.972493649" + "timestamp": "2025-12-17T15:51:53.194202966" } } \ No newline at end of file From 68c3b7727c9bd54e2252600c01eebe15765251b5 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 17 Dec 2025 16:45:28 +0100 Subject: [PATCH 126/202] fixing tests took waaaaaaay too long --- .../local/fastq_align_rna/main.nf.test | 2 +- .../local/fastq_align_rna/main.nf.test.snap | 16 ++--- .../local/fastq_to_aligned_cram/main.nf.test | 3 +- .../fastq_to_aligned_cram/main.nf.test.snap | 14 ++-- tests/workflows/preprocessing.nf.test | 9 ++- tests/workflows/preprocessing.nf.test.snap | 72 +++++++++---------- 6 files changed, 62 insertions(+), 54 deletions(-) diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test b/tests/subworkflows/local/fastq_align_rna/main.nf.test index caf71651..c8319d20 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test @@ -39,7 +39,7 @@ nextflow_workflow { then { assert workflow.success assert snapshot( - sanitizeOutput(workflow.out, unstableKeys:["bam", "reports"]) + sanitizeOutput(workflow.out, unstableKeys:["bam", "reports", "junctions"]) ).match() } diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap index 3c8c8522..cf2552d1 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap @@ -22,17 +22,17 @@ { "groupSize": 1, "groupTarget": { + "genome": { + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + }, "id": "test", - "samplename": "test", - "single_end": false, "sample_type": "RNA", - "genome": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" - } + "samplename": "test", + "single_end": false } }, - "test.Chimeric.out.junction:md5,b560229eb850489cf0cc6f60baee57b5" + "test.Chimeric.out.junction" ] ], "reports": [ @@ -105,7 +105,7 @@ "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T14:44:53.335659555" + "timestamp": "2025-12-17T16:44:58.048883426" }, "fastq align rna - unknown aligner": { "content": [ diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test index 6ee92e5e..9a7a9eb3 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test @@ -64,7 +64,8 @@ nextflow_workflow { sample_type:'RNA', genome_data: [ fasta: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - fai: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + fai: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + star: "s3://test-data/genomics/homo_sapiens/genome/star/" ] ], // meta map [ diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index a4ee2182..dd208219 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -183,7 +183,8 @@ "groupTarget": { "genome_data": { "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", + "star": "s3://test-data/genomics/homo_sapiens/genome/star/" }, "id": "test", "sample_type": "RNA", @@ -206,7 +207,8 @@ "sample_type": "RNA", "genome_data": { "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "star": "s3://test-data/genomics/homo_sapiens/genome/star/" } } }, @@ -224,7 +226,8 @@ "sample_type": "RNA", "genome_data": { "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "star": "s3://test-data/genomics/homo_sapiens/genome/star/" } } }, @@ -242,7 +245,8 @@ "sample_type": "RNA", "genome_data": { "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "star": "s3://test-data/genomics/homo_sapiens/genome/star/" } } }, @@ -259,7 +263,7 @@ "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T14:49:33.159222222" + "timestamp": "2025-12-17T16:27:53.162318921" }, "fastq to cram - bwa - samtools sort": { "content": [ diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index 50e25c9e..45c0fba2 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -71,7 +71,8 @@ nextflow_workflow { "picard_multiplemetrics", "picard_hsmetrics", "samtools_flagstat", - "samtools_coverage" + "samtools_coverage", + "samtools_stats" ]) ).match() } @@ -141,7 +142,8 @@ nextflow_workflow { "picard_multiplemetrics", "picard_hsmetrics", "samtools_flagstat", - "samtools_coverage" + "samtools_coverage", + "samtools_stats" ]) ).match() } @@ -214,7 +216,8 @@ nextflow_workflow { "picard_multiplemetrics", "picard_hsmetrics", "samtools_flagstat", - "samtools_coverage" + "samtools_coverage", + "samtools_stats" ]) ).match() } diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index f072b009..20333b5b 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -603,26 +603,26 @@ { "groupSize": 1, "groupTarget": { - "samplename": "sample1", - "library": "test", - "organism": "Homo sapiens", - "tag": "WES", - "sample_type": "DNA", "aligner": "bwamem", - "single_end": false, "genome": "GRCh38", "genome_data": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, + "id": "sample1", + "library": "test", + "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", - "id": "sample1" + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" } }, - "sample1.stats:md5,bbe2999c6baf17c96d4f00370c6b9501" + "sample1.stats" ] ], "sormadup_metrics": [ @@ -672,7 +672,7 @@ "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T15:25:16.549534093" + "timestamp": "2025-12-17T16:32:55.414537131" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -956,26 +956,26 @@ { "groupSize": 1, "groupTarget": { - "samplename": "sample1", - "library": "test", - "organism": "Homo sapiens", - "tag": "WES", - "sample_type": "DNA", "aligner": "bwamem", - "single_end": false, "genome": "GRCh38", "genome_data": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, + "id": "sample1", + "library": "test", + "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", - "id": "sample1" + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WES" } }, - "sample1.stats:md5,bbe2999c6baf17c96d4f00370c6b9501" + "sample1.stats" ] ], "sormadup_metrics": [ @@ -1021,7 +1021,7 @@ "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T15:54:33.813455843" + "timestamp": "2025-12-17T16:40:10.119231711" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1539,25 +1539,25 @@ { "groupSize": 1, "groupTarget": { - "samplename": "sample1", - "library": "test", - "organism": "Homo sapiens", - "tag": "WGS", - "sample_type": "DNA", "aligner": "bwamem", - "single_end": false, "genome": "GRCh38", "genome_data": { - "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", - "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", - "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", + "dict": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", + "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", + "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "id": "sample1" + "id": "sample1", + "library": "test", + "organism": "Homo sapiens", + "sample_type": "DNA", + "samplename": "sample1", + "single_end": false, + "tag": "WGS" } }, - "sample1.stats:md5,bbe2999c6baf17c96d4f00370c6b9501" + "sample1.stats" ] ], "sormadup_metrics": [ @@ -1606,6 +1606,6 @@ "nf-test": "0.9.2", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T15:51:53.194202966" + "timestamp": "2025-12-17T16:37:31.272800991" } } \ No newline at end of file From ddc9928a4c57cae00c7c2fef12f505c3f31cf290 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 19 Dec 2025 10:01:17 +0100 Subject: [PATCH 127/202] fix splice junctions file name --- conf/modules.config | 2 +- .../local/fastq_align_rna/main.nf.test.snap | 4 +-- .../fastq_to_aligned_cram/main.nf.test.snap | 34 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index db240008..f35f76e7 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -156,7 +156,7 @@ process { } withName: '.*FASTQ_ALIGN_RNA:SORT_MERGE_SPLICE_JUNCTIONS' { - ext.prefix = { "${meta.id}.Sj.out" } + ext.prefix = { "${meta.id}.SJ.out" } ext.suffix = "tab" ext.args = '-k1,1n -k2,2n -k3,3n --merge' } diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap index cf2552d1..2cd3d63c 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap @@ -91,7 +91,7 @@ } } }, - "test.Sj.out.tab:md5,15852c5678c04e86dcb66793b7e02bb9" + "test.SJ.out.tab:md5,15852c5678c04e86dcb66793b7e02bb9" ] ], "versions": [ @@ -119,4 +119,4 @@ }, "timestamp": "2024-05-28T16:17:08.089796673" } -} \ No newline at end of file +} diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index dd208219..aabf04cd 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -3,7 +3,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -25,13 +25,13 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ - + ], "versions": [ "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", @@ -49,7 +49,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -71,10 +71,10 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ [ @@ -112,7 +112,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -134,10 +134,10 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ [ @@ -174,7 +174,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -231,7 +231,7 @@ } } }, - "test.Sj.out.tab:md5,15852c5678c04e86dcb66793b7e02bb9" + "test.SJ.out.tab:md5,15852c5678c04e86dcb66793b7e02bb9" ] ], "sormadup_metrics": [ @@ -269,7 +269,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -291,13 +291,13 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ - + ], "versions": [ "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", @@ -311,4 +311,4 @@ }, "timestamp": "2025-12-17T14:51:22.925873858" } -} \ No newline at end of file +} From b4181518839604e5cfda9f84c61242fb88bec3f5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Sun, 21 Dec 2025 14:47:48 +0100 Subject: [PATCH 128/202] fix conditional config for samtools_sormadup --- conf/modules.config | 2 ++ conf/profiles/gcp.config | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index f35f76e7..480d1c75 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -156,12 +156,14 @@ process { } withName: '.*FASTQ_ALIGN_RNA:SORT_MERGE_SPLICE_JUNCTIONS' { + cpus = 1 ext.prefix = { "${meta.id}.SJ.out" } ext.suffix = "tab" ext.args = '-k1,1n -k2,2n -k3,3n --merge' } withName: '.*FASTQ_ALIGN_RNA:SORT_MERGE_JUNCTIONS' { + cpus = 1 ext.prefix = { "${meta.id}.Chimeric.out" } ext.suffix = "junction" ext.args = '-k1,1n -k2,2n -k4,4n -k5,5n --merge' diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config index 577dd18d..2bab1b6d 100644 --- a/conf/profiles/gcp.config +++ b/conf/profiles/gcp.config @@ -33,11 +33,11 @@ process { // Alignment post-processing resources withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { - disk = { input instanceof List ? input.size().sum() * 3 * task.attempt : input.size() * 3 * task.attempt } + disk = { input instanceof List ? input.sum { it.size() } * 3 * task.attempt : input.size() * 3 * task.attempt } time = 24.h } withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORT' { - disk = { input instanceof List ? input.size().sum() * 3 * task.attempt : input.size() * 3 * task.attempt } + disk = { input instanceof List ? input.sum { it.size() } * 3 * task.attempt : input.size() * 3 * task.attempt } time = 24.h } // withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} From 082a73685b7943316b321f12bfe449c83025a3da Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 23 Dec 2025 13:42:13 +0100 Subject: [PATCH 129/202] bump fastp module --- modules.json | 2 +- modules/nf-core/fastp/main.nf | 18 +-- modules/nf-core/fastp/tests/main.nf.test.snap | 108 +++++++++--------- workflows/preprocessing.nf | 2 +- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/modules.json b/modules.json index d1d3d5eb..0b710f92 100644 --- a/modules.json +++ b/modules.json @@ -48,7 +48,7 @@ }, "fastp": { "branch": "master", - "git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b", + "git_sha": "b8f1de0ac853ae5b56c63450d47438f899c553d0", "installed_by": ["modules"] }, "gnu/sort": { diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf index 85013f5d..7538fc3a 100644 --- a/modules/nf-core/fastp/main.nf +++ b/modules/nf-core/fastp/main.nf @@ -29,9 +29,9 @@ process FASTP { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def adapter_list = adapter_fasta ? "--adapter_fasta ${adapter_fasta}" : "" - def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--failed_out ${prefix}.paired.fail.fastq.gz --unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : '' - def out_fq1 = discard_trimmed_pass ?: ( meta.single_end ? "--out1 ${prefix}.fastp.fastq.gz" : "--out1 ${prefix}_1.fastp.fastq.gz" ) - def out_fq2 = discard_trimmed_pass ?: "--out2 ${prefix}_2.fastp.fastq.gz" + def fail_fastq = save_trimmed_fail && meta.single_end ? "--failed_out ${prefix}.fail.fastq.gz" : save_trimmed_fail && !meta.single_end ? "--failed_out ${prefix}.paired.fail.fastq.gz --unpaired1 ${prefix}_R1.fail.fastq.gz --unpaired2 ${prefix}_R2.fail.fastq.gz" : '' + def out_fq1 = discard_trimmed_pass ?: ( meta.single_end ? "--out1 ${prefix}.fastp.fastq.gz" : "--out1 ${prefix}_R1.fastp.fastq.gz" ) + def out_fq2 = discard_trimmed_pass ?: "--out2 ${prefix}_R2.fastp.fastq.gz" // Added soft-links to original fastqs for consistent naming in MultiQC // Use single ended for interleaved. Add --interleaved_in in config. if ( task.ext.args?.contains('--interleaved_in') ) { @@ -78,11 +78,11 @@ process FASTP { } else { def merge_fastq = save_merged ? "-m --merged_out ${prefix}.merged.fastq.gz" : '' """ - [ ! -f ${prefix}_1.fastq.gz ] && ln -sf ${reads[0]} ${prefix}_1.fastq.gz - [ ! -f ${prefix}_2.fastq.gz ] && ln -sf ${reads[1]} ${prefix}_2.fastq.gz + [ ! -f ${prefix}_R1.fastq.gz ] && ln -sf ${reads[0]} ${prefix}_R1.fastq.gz + [ ! -f ${prefix}_R2.fastq.gz ] && ln -sf ${reads[1]} ${prefix}_R2.fastq.gz fastp \\ - --in1 ${prefix}_1.fastq.gz \\ - --in2 ${prefix}_2.fastq.gz \\ + --in1 ${prefix}_R1.fastq.gz \\ + --in2 ${prefix}_R2.fastq.gz \\ $out_fq1 \\ $out_fq2 \\ --json ${prefix}.fastp.json \\ @@ -105,9 +105,9 @@ process FASTP { stub: def prefix = task.ext.prefix ?: "${meta.id}" def is_single_output = task.ext.args?.contains('--interleaved_in') || meta.single_end - def touch_reads = (discard_trimmed_pass) ? "" : (is_single_output) ? "echo '' | gzip > ${prefix}.fastp.fastq.gz" : "echo '' | gzip > ${prefix}_1.fastp.fastq.gz ; echo '' | gzip > ${prefix}_2.fastp.fastq.gz" + def touch_reads = (discard_trimmed_pass) ? "" : (is_single_output) ? "echo '' | gzip > ${prefix}.fastp.fastq.gz" : "echo '' | gzip > ${prefix}_R1.fastp.fastq.gz ; echo '' | gzip > ${prefix}_R2.fastp.fastq.gz" def touch_merged = (!is_single_output && save_merged) ? "echo '' | gzip > ${prefix}.merged.fastq.gz" : "" - def touch_fail_fastq = (!save_trimmed_fail) ? "" : meta.single_end ? "echo '' | gzip > ${prefix}.fail.fastq.gz" : "echo '' | gzip > ${prefix}.paired.fail.fastq.gz ; echo '' | gzip > ${prefix}_1.fail.fastq.gz ; echo '' | gzip > ${prefix}_2.fail.fastq.gz" + def touch_fail_fastq = (!save_trimmed_fail) ? "" : meta.single_end ? "echo '' | gzip > ${prefix}.fail.fastq.gz" : "echo '' | gzip > ${prefix}.paired.fail.fastq.gz ; echo '' | gzip > ${prefix}_R1.fail.fastq.gz ; echo '' | gzip > ${prefix}_R2.fail.fastq.gz" """ $touch_reads $touch_fail_fastq diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap index a30c680d..2276fc08 100644 --- a/modules/nf-core/fastp/tests/main.nf.test.snap +++ b/modules/nf-core/fastp/tests/main.nf.test.snap @@ -97,8 +97,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", - "test_2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" + "test_R1.fastp.fastq.gz:md5,67b2bbae47f073e05a97a9c2edce23c7", + "test_R2.fastp.fastq.gz:md5,25cbdca08e2083dbd4f0502de6b62f39" ] ] ], @@ -113,10 +113,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:23:12.436191" + "timestamp": "2025-12-22T14:32:22.887952042" }, "test_fastp_paired_end_merged_adapterlist": { "content": [ @@ -127,8 +127,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + "test_R1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_R2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" ] ] ], @@ -149,10 +149,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:23:32.267735" + "timestamp": "2025-12-22T14:32:53.752975682" }, "test_fastp_single_end_qc_only": { "content": [ @@ -193,8 +193,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", - "test_2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" + "test_R1.fastp.fastq.gz:md5,6ff32a64c5188b9a9192be1398c262c7", + "test_R2.fastp.fastq.gz:md5,db0cb7c9977e94ac2b4b446ebd017a8a" ] ] ], @@ -206,8 +206,8 @@ }, [ "test.paired.fail.fastq.gz:md5,409b687c734cedd7a1fec14d316e1366", - "test_1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", - "test_2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" + "test_R1.fail.fastq.gz:md5,4f273cf3159c13f79e8ffae12f5661f6", + "test_R2.fail.fastq.gz:md5,f97b9edefb5649aab661fbc9e71fc995" ] ] ], @@ -219,10 +219,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:23:24.23891" + "timestamp": "2025-12-22T14:32:41.270456637" }, "fastp - stub test_fastp_interleaved": { "content": [ @@ -436,8 +436,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -517,8 +517,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -540,10 +540,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:55:37.413738" + "timestamp": "2025-12-22T14:33:44.204950729" }, "test_fastp_paired_end_merged - stub": { "content": [ @@ -555,8 +555,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -636,8 +636,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -659,10 +659,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:55:32.965652" + "timestamp": "2025-12-22T14:33:38.518882433" }, "test_fastp_paired_end_merged": { "content": [ @@ -673,8 +673,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", - "test_2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" + "test_R1.fastp.fastq.gz:md5,54b726a55e992a869fd3fa778afe1672", + "test_R2.fastp.fastq.gz:md5,29d3b33b869f7b63417b8ff07bb128ba" ] ] ], @@ -695,10 +695,10 @@ ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-19T16:23:28.074624" + "timestamp": "2025-12-22T14:32:47.366974895" }, "test_fastp_paired_end - stub": { "content": [ @@ -710,8 +710,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -785,8 +785,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -802,10 +802,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:55:14.414258" + "timestamp": "2025-12-22T14:33:16.494574544" }, "test_fastp_single_end": { "content": [ @@ -957,8 +957,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -997,8 +997,8 @@ }, [ "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1042,8 +1042,8 @@ "single_end": false }, [ - "test_1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fastp.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1055,8 +1055,8 @@ }, [ "test.paired.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test_2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + "test_R1.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test_R2.fail.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ] ], @@ -1069,10 +1069,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-09-11T09:55:28.399328" + "timestamp": "2025-12-22T14:33:32.863505882" }, "fastp test_fastp_interleaved": { "content": [ diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 9149e445..6d2802eb 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -220,7 +220,7 @@ workflow PREPROCESSING { } .transpose() .map { meta, reads -> - def new_id = reads instanceof List ? reads[0].getName() - ~/_1.fastp.*/ : reads.getName() - ~/.fastp.*/ + def new_id = reads instanceof List ? reads[0].getName() - ~/_R1.fastp.*/ : reads.getName() - ~/.fastp.*/ return [ meta - meta.subMap('id') + [id: new_id], reads, From 6ee5e9d9b3b8cb982fb3726580be29659029479c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 23 Dec 2025 14:30:07 +0100 Subject: [PATCH 130/202] fix snapshots --- tests/workflows/preprocessing.nf.test.snap | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 20333b5b..15d55f4e 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -108,7 +108,7 @@ "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, - "sample1.fastp.json:md5,2edca71b00e4804eb7b39ff72f1c304a" + "sample1.fastp.json:md5,5a65f5141251ac26b8f0a0d0a618b524" ] ], "md5sums": [ @@ -669,10 +669,10 @@ } ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T16:32:55.414537131" + "timestamp": "2025-12-23T13:59:59.404732" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -783,7 +783,7 @@ "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, - "sample1.fastp.json:md5,2edca71b00e4804eb7b39ff72f1c304a" + "sample1.fastp.json:md5,5a65f5141251ac26b8f0a0d0a618b524" ] ], "md5sums": [ @@ -1018,10 +1018,10 @@ } ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T16:40:10.119231711" + "timestamp": "2025-12-23T14:06:35.503463" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1129,7 +1129,7 @@ }, "count": 1 }, - "sample1.fastp.json:md5,2edca71b00e4804eb7b39ff72f1c304a" + "sample1.fastp.json:md5,5a65f5141251ac26b8f0a0d0a618b524" ] ], "md5sums": [ @@ -1603,9 +1603,9 @@ } ], "meta": { - "nf-test": "0.9.2", + "nf-test": "0.9.3", "nextflow": "25.10.2" }, - "timestamp": "2025-12-17T16:37:31.272800991" + "timestamp": "2025-12-23T14:04:00.643521" } } \ No newline at end of file From aa029ef91a6927e76999248deef22d44798efd14 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Sat, 24 Jan 2026 07:43:58 +0100 Subject: [PATCH 131/202] Change export_plots setting from true to false takes too long --- assets/multiqc_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 755c9880..cc354c76 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -8,7 +8,7 @@ report_section_order: order: -1001 "nf-cmgg-preprocessing-summary": order: -1002 -export_plots: true +export_plots: false disable_version_detection: true bclconvert: create_undetermined_barcode_barplots: true From 605c622c984c76df8fcc20a17f548e2c5b238e61 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 4 Feb 2026 13:34:29 +0100 Subject: [PATCH 132/202] use custom multiqc --- conf/modules.config | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 480d1c75..794ca8e8 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -273,19 +273,28 @@ process { // MultiQC withName: '.*MULTIQC_.*$' { + container = "cmgg/multiqc_cmgg:0.0.2-multiqc-v1.33" cpus = 1 memory = 4.GB } withName: '.*MULTIQC_MAIN' { ext.prefix = { params.multiqc_title ? params.multiqc_title : "multiqc" } - ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' } + ext.args = { + [ + "--template \"cmgg\"", + params.multiqc_title ? "--title \"${params.multiqc_title}\"" : "", + ].join(" ").trim() + } } withName: '.*MULTIQC_LIBRARY' { - cpus = 1 - memory = 4.GB ext.prefix = { meta.id ? "${meta.id}" : "multiqc_library" } - ext.args = { meta.id ? "--title \"${meta.id} - Pool Summary\"" : '' } + ext.args = { + [ + "--template \"cmgg\"", + meta.id ? "--title \"${meta.id} - Pool Summary\"" : "", + ].join(" ").trim() + } } } From 2c0dcc8a655119a508f8005202cc3377859c1d04 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 4 Feb 2026 13:48:48 +0100 Subject: [PATCH 133/202] disable AI in reports --- conf/modules.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/modules.config b/conf/modules.config index 794ca8e8..36734a8a 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -282,6 +282,7 @@ process { ext.args = { [ "--template \"cmgg\"", + "--no-ai", params.multiqc_title ? "--title \"${params.multiqc_title}\"" : "", ].join(" ").trim() } @@ -292,6 +293,7 @@ process { ext.args = { [ "--template \"cmgg\"", + "--no-ai", meta.id ? "--title \"${meta.id} - Pool Summary\"" : "", ].join(" ").trim() } From 29c77e626198281095b0bd10d1d83a18fe9af367 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:04:59 +0100 Subject: [PATCH 134/202] fix linting --- .nf-core.yml | 5 ++--- ro-crate-metadata.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index 2b4bcc77..a9c2a6ae 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -19,15 +19,14 @@ lint: - LICENSE merge_markers: - bin/cmgg_genelists - multiqc_config: - - report_comment + multiqc_config: false nextflow_config: - manifest.name - manifest.homePage template_strings: - bin/cmgg_genelists nf_test_content: false -nf_core_version: 3.5.1 +nf_core_version: 3.5.2 repository_type: pipeline template: author: Matthias De Smet, Nicolas Vannieuwkerke diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index 632da7c3..55c3e77d 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -23,7 +23,7 @@ "@type": "Dataset", "creativeWorkStatus": "InProgress", "datePublished": "2025-11-13T15:11:21+00:00", - "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.4.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.4.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that demultiplexes and aligns raw sequencing data.\nIt also performs basic QC and coverage analysis.\n\nThe pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.\n\nSteps inlcude:\n\n1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html)\n2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp)\n3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP), [`snap`](https://github.com/amplab/snap) or [`strobe`](https://github.com/ksahlin/strobealign) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq\n4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html)\n5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html)\n6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics)\n7. QC aggregation using [`multiqc`](https://multiqc.info/)\n\n![metro map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe full documentation can be found [here](docs/README.md)\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv` for fastq inputs:\n\n```csv\nid,samplename,organism,library,fastq_1,fastq_2\nsample1,sample1,Homo sapiens,Library_Name,reads1.fq.gz,reads2.fq.gz\n```\n\n`samplesheet.csv` for flowcell inputs:\n\n```csv\nid,samplesheet,lane,flowcell,sample_info\nflowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/path/to/sampleinfo.csv\n```\n\n`sampleinfo.csv` for use with flowcell inputs:\n\n```csv\nsamplename,library,organism,tag\nfc_sample1,test,Homo sapiens,WES\n```\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --igenomes_base /path/to/genomes \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by the CMGG ICT team.\n\n## Support\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.5.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.5.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that demultiplexes and aligns raw sequencing data.\nIt also performs basic QC and coverage analysis.\n\nThe pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.\n\nSteps inlcude:\n\n1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html)\n2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp)\n3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP), [`snap`](https://github.com/amplab/snap) or [`strobe`](https://github.com/ksahlin/strobealign) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq\n4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html)\n5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html)\n6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics)\n7. QC aggregation using [`multiqc`](https://multiqc.info/)\n\n![metro map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe full documentation can be found [here](docs/README.md)\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv` for fastq inputs:\n\n```csv\nid,samplename,organism,library,aligner,fastq_1,fastq_2\nsample1,sample1,Homo sapiens,Library_Name,bwamem,reads1.fq.gz,reads2.fq.gz\n```\n\n`samplesheet.csv` for flowcell inputs:\n\n```csv\nid,samplesheet,lane,flowcell,sample_info\nflowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/path/to/sampleinfo.csv\n```\n\n`sampleinfo.csv` for use with flowcell inputs:\n\n```csv\nsamplename,library,organism,tag,aligner\nfc_sample1,test,Homo sapiens,WES,bwamem\n```\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --igenomes_base /path/to/genomes \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by the CMGG ICT team.\n\n## Support\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf" From f32013180f1c8b00a5ab4e352207ef91b63c400e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:30:23 +0100 Subject: [PATCH 135/202] gcp config: add instance templates --- conf/base.config | 22 ++++++++++++---------- conf/profiles/gcp.config | 3 +++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/conf/base.config b/conf/base.config index 27606500..60cf57dd 100644 --- a/conf/base.config +++ b/conf/base.config @@ -11,8 +11,9 @@ process { cpus = { 1 * task.attempt } - memory = { 6.GB * task.attempt } + memory = { 8.GB * task.attempt } time = { 4.h * task.attempt } + machineType = 'template://gen-nfbatch-dev-small' // e2-standard-4 errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006) ? 'retry' : 'finish' } maxRetries = 3 @@ -20,31 +21,32 @@ process { // Process-specific resource requirements withLabel:process_single { + machineType = 'template://gen-nfbatch-dev-small' // e2-standard-4 cpus = { 1 } - memory = { 6.GB * task.attempt } + memory = { 8.GB * task.attempt } time = { 4.h * task.attempt } } withLabel:process_low { + machineType = 'template://gen-nfbatch-dev-small' // e2-standard-4 cpus = { 2 * task.attempt } - memory = { 12.GB * task.attempt } + memory = { 16.GB * task.attempt } time = { 4.h * task.attempt } } withLabel:process_medium { - cpus = { 6 * task.attempt } - memory = { 36.GB * task.attempt } + machineType = 'template://gen-nfbatch-dev-medium' // n2-highmem-8 + cpus = { 8 * task.attempt } + memory = { 64.GB * task.attempt } time = { 8.h * task.attempt } } withLabel:process_high { - cpus = { 12 * task.attempt } - memory = { 72.GB * task.attempt } + machineType = 'template://gen-nfbatch-dev-large' // n2-highmem-16 + cpus = { 16 * task.attempt } + memory = { 128.GB * task.attempt } time = { 16.h * task.attempt } } withLabel:process_long { time = { 20.h * task.attempt } } - withLabel:process_high_memory { - memory = { 200.GB * task.attempt } - } withLabel:error_ignore { errorStrategy = 'ignore' } diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config index 2bab1b6d..cd2ebcba 100644 --- a/conf/profiles/gcp.config +++ b/conf/profiles/gcp.config @@ -13,6 +13,7 @@ process { // BCL convert resources withName: '.*BCL_DEMULTIPLEX:BCLCONVERT' { + machineType = 'template://gen-nfbatch-dev-xlarge' // n2-highmem-32, 1TB disk cpus = 32 memory = { 64.GB * task.attempt } disk = { 1.TB * task.attempt } @@ -33,10 +34,12 @@ process { // Alignment post-processing resources withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { + machineType = 'template://gen-nfbatch-dev-medium' // n2-highmem-8, 100GB disk disk = { input instanceof List ? input.sum { it.size() } * 3 * task.attempt : input.size() * 3 * task.attempt } time = 24.h } withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORT' { + machineType = 'template://gen-nfbatch-dev-medium' // n2-highmem-8, 100GB disk disk = { input instanceof List ? input.sum { it.size() } * 3 * task.attempt : input.size() * 3 * task.attempt } time = 24.h } From 3c107281bf1cc7fd07a55428143cbaaa606ae9de Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 Feb 2026 14:56:32 +0100 Subject: [PATCH 136/202] remove analysis profiles and migrate to exernal repo --- conf/base.config | 6 ---- conf/profiles/WES.config | 6 ---- conf/profiles/WGS.config | 6 ---- conf/profiles/copgt.config | 13 -------- conf/profiles/gcp.config | 63 ----------------------------------- conf/profiles/s3_ugent.config | 9 ----- conf/profiles/sWGS.config | 4 --- nextflow.config | 19 +++-------- 8 files changed, 5 insertions(+), 121 deletions(-) delete mode 100644 conf/profiles/WES.config delete mode 100644 conf/profiles/WGS.config delete mode 100644 conf/profiles/copgt.config delete mode 100644 conf/profiles/gcp.config delete mode 100644 conf/profiles/s3_ugent.config delete mode 100644 conf/profiles/sWGS.config diff --git a/conf/base.config b/conf/base.config index 60cf57dd..ff798214 100644 --- a/conf/base.config +++ b/conf/base.config @@ -13,33 +13,27 @@ process { cpus = { 1 * task.attempt } memory = { 8.GB * task.attempt } time = { 4.h * task.attempt } - machineType = 'template://gen-nfbatch-dev-small' // e2-standard-4 - errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006) ? 'retry' : 'finish' } maxRetries = 3 maxErrors = '-1' // Process-specific resource requirements withLabel:process_single { - machineType = 'template://gen-nfbatch-dev-small' // e2-standard-4 cpus = { 1 } memory = { 8.GB * task.attempt } time = { 4.h * task.attempt } } withLabel:process_low { - machineType = 'template://gen-nfbatch-dev-small' // e2-standard-4 cpus = { 2 * task.attempt } memory = { 16.GB * task.attempt } time = { 4.h * task.attempt } } withLabel:process_medium { - machineType = 'template://gen-nfbatch-dev-medium' // n2-highmem-8 cpus = { 8 * task.attempt } memory = { 64.GB * task.attempt } time = { 8.h * task.attempt } } withLabel:process_high { - machineType = 'template://gen-nfbatch-dev-large' // n2-highmem-16 cpus = { 16 * task.attempt } memory = { 128.GB * task.attempt } time = { 16.h * task.attempt } diff --git a/conf/profiles/WES.config b/conf/profiles/WES.config deleted file mode 100644 index 2fd529a8..00000000 --- a/conf/profiles/WES.config +++ /dev/null @@ -1,6 +0,0 @@ -params { - run_coverage = true - disable_picard_metrics = false - roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v7.bed" - genelists = "${params.igenomes_base}/Hsapiens/GRCh38/regions/genelists" -} diff --git a/conf/profiles/WGS.config b/conf/profiles/WGS.config deleted file mode 100644 index 657f8ec7..00000000 --- a/conf/profiles/WGS.config +++ /dev/null @@ -1,6 +0,0 @@ -params { - markdup = "samtools" - umi_aware = true - run_coverage = true - disable_picard_metrics = false -} diff --git a/conf/profiles/copgt.config b/conf/profiles/copgt.config deleted file mode 100644 index 67fd693b..00000000 --- a/conf/profiles/copgt.config +++ /dev/null @@ -1,13 +0,0 @@ -params { - run_coverage = true - disable_picard_metrics = true - roi = "${params.igenomes_base}/Hsapiens/GRCh38/regions/CMGG_coPGT-M_analyses_ROI_v1.bed" - - // trimming options - skip_trimming = false - trim_front = 6 - adapter_R1 = "CAGATC" - - // markduplicates options - markdup = false -} diff --git a/conf/profiles/gcp.config b/conf/profiles/gcp.config deleted file mode 100644 index cd2ebcba..00000000 --- a/conf/profiles/gcp.config +++ /dev/null @@ -1,63 +0,0 @@ -// Tweaked resources for GCP - -process { - executor = 'google-batch' - disk = 100.GB - time = 24.h - errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006) ? 'retry' : 'finish' } - maxRetries = 5 - - // tentative fix for `cannot stat` error - // https://github.com/nextflow-io/nextflow/issues/6213#issuecomment-3173533808 - stageOutMode = 'copy' - - // BCL convert resources - withName: '.*BCL_DEMULTIPLEX:BCLCONVERT' { - machineType = 'template://gen-nfbatch-dev-xlarge' // n2-highmem-32, 1TB disk - cpus = 32 - memory = { 64.GB * task.attempt } - disk = { 1.TB * task.attempt } - } - - // Trimming resources - // withName: '.*FASTP' {} - - // Alignment resources - // DNA - // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' {} - // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:BWAMEM.*_MEM' {} - // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:DRAGMAP_ALIGN' {} - // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:STROBEALIGN' {} - // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' {} - // RNA - // withName: '.*FASTQ_TO_CRAM:FASTQ_ALIGN_RNA:STAR_ALIGN' {} - - // Alignment post-processing resources - withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORMADUP' { - machineType = 'template://gen-nfbatch-dev-medium' // n2-highmem-8, 100GB disk - disk = { input instanceof List ? input.sum { it.size() } * 3 * task.attempt : input.size() * 3 * task.attempt } - time = 24.h - } - withName: '.*FASTQ_TO_CRAM:SAMTOOLS_SORT' { - machineType = 'template://gen-nfbatch-dev-medium' // n2-highmem-8, 100GB disk - disk = { input instanceof List ? input.sum { it.size() } * 3 * task.attempt : input.size() * 3 * task.attempt } - time = 24.h - } - // withName: '.*FASTQ_TO_CRAM:BIOBAMBAM_BAMSORMADUP' {} - // withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' {} - - // Coverage QC resources - // withName: '.*COVERAGE:MOSDEPTH' {} - // withName: '.*COVERAGE:SAMTOOLS_COVERAGE' {} - // withName: '.*COVERAGE:PANELCOVERAGE' {} - - // Bam QC resources - // withName: '.*BAM_QC:SAMTOOLS_.*$' {} - withName: '.*BAM_QC:PICARD_.*$' { - time = 24.h - } - - // Misc resources - // withName: '.*MD5SUM' {} - // withName: '.*MULTIQC_.*$' {} -} diff --git a/conf/profiles/s3_ugent.config b/conf/profiles/s3_ugent.config deleted file mode 100644 index 7e2fe67a..00000000 --- a/conf/profiles/s3_ugent.config +++ /dev/null @@ -1,9 +0,0 @@ -aws { - profile = "ugent" - client { - endpoint = "https://s3.ugent.be" - protocol = "https" - s3PathStyleAccess = true - connectionTimeout = 60000 - } -} diff --git a/conf/profiles/sWGS.config b/conf/profiles/sWGS.config deleted file mode 100644 index 4497e094..00000000 --- a/conf/profiles/sWGS.config +++ /dev/null @@ -1,4 +0,0 @@ -params { - run_coverage = false - disable_picard_metrics = true -} diff --git a/nextflow.config b/nextflow.config index f3ec3448..2787bdd6 100644 --- a/nextflow.config +++ b/nextflow.config @@ -57,8 +57,8 @@ params { config_profile_name = null config_profile_description = null - custom_config_version = 'master' - custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" + custom_config_version = 'main' + custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.custom_config_version}" config_profile_contact = null config_profile_url = null @@ -184,26 +184,17 @@ profiles { } test { includeConfig 'conf/test.config' } test_full { includeConfig 'conf/test_full.config' } - // resource profiles - gcp { includeConfig 'conf/profiles/gcp.config' } - s3_ugent { includeConfig 'conf/profiles/s3_ugent.config' } - // analysis profiles - sWGS { includeConfig 'conf/profiles/sWGS.config' } - WGS { includeConfig 'conf/profiles/WGS.config' } - WES { includeConfig 'conf/profiles/WES.config' } - copgt { includeConfig 'conf/profiles/copgt.config' } } // Load nf-core custom profiles from different institutions // If params.custom_config_base is set AND either the NXF_OFFLINE environment variable is not set or params.custom_config_base is a local path, the nfcore_custom.config file from the specified base path is included. // Load nf-cmgg/preprocessing custom profiles from different institutions. -includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" +// includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" -// Load nf-cmgg/preprocessing custom profiles from different institutions. -// TODO nf-core: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs -// includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" +// Load nf-cmgg/preprocessing custom profiles. +includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" // Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile // Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled From 8cfdd7865553e4b2ea99a16050782e8ba3e39bcf Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:40:12 +0100 Subject: [PATCH 137/202] fix linting --- .nf-core.yml | 4 +--- nextflow_schema.json | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index a9c2a6ae..b17c6d97 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -20,9 +20,7 @@ lint: merge_markers: - bin/cmgg_genelists multiqc_config: false - nextflow_config: - - manifest.name - - manifest.homePage + nextflow_config: false template_strings: - bin/cmgg_genelists nf_test_content: false diff --git a/nextflow_schema.json b/nextflow_schema.json index efbaa2c0..19a00a3f 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -136,16 +136,16 @@ "custom_config_version": { "type": "string", "description": "Git commit id for Institutional configs.", - "default": "master", + "default": "main", "hidden": true, "fa_icon": "fas fa-users-cog" }, "custom_config_base": { "type": "string", - "description": "Base directory for Institutional configs.", - "default": "https://raw.githubusercontent.com/nf-core/configs/master", + "description": "Base directory for custom configs.", + "default": "https://raw.githubusercontent.com/nf-cmgg/configs/main", "hidden": true, - "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", + "help_text": "If you're running offline, Nextflow will not be able to fetch the custom config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", "fa_icon": "fas fa-users-cog" }, "config_profile_name": { From 2b0370b736ac9de3e7e250b6724a3eeaa22c89e5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 Feb 2026 16:53:58 +0100 Subject: [PATCH 138/202] fix snaps --- tests/workflows/preprocessing.nf.test.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 15d55f4e..0bdfd83c 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -394,7 +394,7 @@ "test_data" ], "multiqc_library_plots": [ - "test_plots" + ], "multiqc_library_report": [ "test.html" @@ -853,7 +853,7 @@ "test_data" ], "multiqc_library_plots": [ - "test_plots" + ], "multiqc_library_report": [ "test.html" @@ -1336,7 +1336,7 @@ "test_data" ], "multiqc_library_plots": [ - "test_plots" + ], "multiqc_library_report": [ "test.html" From 2b03d68f379b257954bbb8fd436a1106040cce1b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 9 Feb 2026 13:50:29 +0100 Subject: [PATCH 139/202] nf-cmgg/configs fix --- nextflow.config | 23 +++++++++++++++----- nextflow_schema.json | 51 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 5 deletions(-) diff --git a/nextflow.config b/nextflow.config index 2787bdd6..6a275948 100644 --- a/nextflow.config +++ b/nextflow.config @@ -57,11 +57,20 @@ params { config_profile_name = null config_profile_description = null - custom_config_version = 'main' - custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.custom_config_version}" + custom_config_version = 'master' + custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" config_profile_contact = null config_profile_url = null + // CMGG Config options + cmgg_config_profile_name = null + cmgg_config_profile_description = null + + cmgg_custom_config_version = 'main' + cmgg_custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.cmgg_custom_config_version}" + cmgg_config_profile_contact = null + cmgg_config_profile_url = null + // Schema validation default options validate_params = true } @@ -190,11 +199,15 @@ profiles { // If params.custom_config_base is set AND either the NXF_OFFLINE environment variable is not set or params.custom_config_base is a local path, the nfcore_custom.config file from the specified base path is included. // Load nf-cmgg/preprocessing custom profiles from different institutions. -// includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" +includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/nfcore_custom.config" : "/dev/null" -// Load nf-cmgg/preprocessing custom profiles. -includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" +// Load nf-cmgg/preprocessing custom profiles from different institutions. +// TODO nf-core: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs +// includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" + +// Load nf-cmgg/preprocessing custom profiles from nf-cmgg/configs. +includeConfig params.cmgg_custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.cmgg_custom_config_base.startsWith('http')) ? "${params.cmgg_custom_config_base}/pipeline/preprocessing.config" : "/dev/null" // Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile // Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled diff --git a/nextflow_schema.json b/nextflow_schema.json index 19a00a3f..63d39f34 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -174,6 +174,54 @@ } } }, + "cmgg_institutional_config_options": { + "title": "nf-cmgg config options", + "type": "object", + "fa_icon": "fas fa-university", + "description": "Parameters used to describe centralised config profiles. These should not be edited.", + "help_text": "The centralised nf-cmgg configuration profiles use a handful of pipeline parameters to describe themselves. This information is then printed to the Nextflow log when you run a pipeline. You should not need to change these values when you run a pipeline.", + "properties": { + "cmgg_custom_config_version": { + "type": "string", + "description": "Git commit id for nf-cmgg configs.", + "default": "master", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "cmgg_custom_config_base": { + "type": "string", + "description": "Base directory for nf-cmgg configs.", + "default": "https://raw.githubusercontent.com/nf-cmgg/configs/master", + "hidden": true, + "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", + "fa_icon": "fas fa-users-cog" + }, + "cmgg_config_profile_name": { + "type": "string", + "description": "nf-cmgg config name.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "cmgg_config_profile_description": { + "type": "string", + "description": "nf-cmgg config description.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "cmgg_config_profile_contact": { + "type": "string", + "description": "nf-cmgg config contact information.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + }, + "cmgg_config_profile_url": { + "type": "string", + "description": "nf-cmgg config URL link.", + "hidden": true, + "fa_icon": "fas fa-users-cog" + } + } + }, "generic_options": { "title": "Generic options", "type": "object", @@ -315,6 +363,9 @@ { "$ref": "#/$defs/institutional_config_options" }, + { + "$ref": "#/$defs/cmgg_institutional_config_options" + }, { "$ref": "#/$defs/generic_options" } From 926ab4988da1a40bb7b09b7cf75b5524638c0523 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 9 Feb 2026 14:21:32 +0100 Subject: [PATCH 140/202] bump version to 3.0.0dev --- .nf-core.yml | 5 ++- CHANGELOG.md | 2 +- nextflow.config | 2 +- ro-crate-metadata.json | 79 +++++++++++++++++++++++++++++++++++++----- 4 files changed, 75 insertions(+), 13 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index b17c6d97..e1b35ad2 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -28,12 +28,11 @@ nf_core_version: 3.5.2 repository_type: pipeline template: author: Matthias De Smet, Nicolas Vannieuwkerke - description: Demultiplexing, adapter trimming, alignment, and coverage calculation - for NGS data. + description: Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data. force: false is_nfcore: false name: preprocessing org: nf-cmgg outdir: . skip_features: ["fastqc"] - version: 2.1.0dev + version: 3.0.0dev diff --git a/CHANGELOG.md b/CHANGELOG.md index def4121f..4963ab44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 2.1.0dev +## 3.0.0dev - Update the output handling to use the new workflow output definitions. - Bump all modules to latest versions. diff --git a/nextflow.config b/nextflow.config index 6a275948..2beb9d9e 100644 --- a/nextflow.config +++ b/nextflow.config @@ -288,7 +288,7 @@ manifest { mainScript = 'main.nf' defaultBranch = 'main' nextflowVersion = '!>=25.10.0' - version = '2.1.0dev' + version = '3.0.0dev' doi = '' } diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index 55c3e77d..1d3d46af 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -22,24 +22,36 @@ "@id": "./", "@type": "Dataset", "creativeWorkStatus": "InProgress", - "datePublished": "2025-11-13T15:11:21+00:00", + "datePublished": "2026-02-09T13:16:20+00:00", "description": "# nf-cmgg/preprocessing\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new/nf-cmgg/preprocessing)\n[![GitHub Actions CI Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-cmgg/preprocessing/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.10.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.5.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.5.1)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-cmgg/preprocessing)\n\n## Introduction\n\n**nf-cmgg/preprocessing** is a bioinformatics pipeline that demultiplexes and aligns raw sequencing data.\nIt also performs basic QC and coverage analysis.\n\nThe pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker containers making installation trivial and results highly reproducible.\n\nSteps inlcude:\n\n1. Demultiplexing using [`BCLconvert`](https://emea.support.illumina.com/sequencing/sequencing_software/bcl-convert.html)\n2. Read QC and trimming using [`fastp`](https://github.com/OpenGene/fastp)\n3. Alignment using either [`bwa`](https://github.com/lh3/bwa), [`bwa-mem2`](https://github.com/bwa-mem2/bwa-mem2), [`bowtie2`](https://github.com/BenLangmead/bowtie2), [`dragmap`](https://github.com/Illumina/DRAGMAP), [`snap`](https://github.com/amplab/snap) or [`strobe`](https://github.com/ksahlin/strobealign) for DNA-seq and [`STAR`](https://github.com/alexdobin/STAR) for RNA-seq\n4. Duplicate marking using [`bamsormadup`](https://gitlab.com/german.tischler/biobambam2) or [`samtools markdup`](http://www.htslib.org/doc/samtools-markdup.html)\n5. Coverage analysis using [`mosdepth`](https://github.com/brentp/mosdepth) and [`samtools coverage`](http://www.htslib.org/doc/samtools-coverage.html)\n6. Alignment QC using [`samtools flagstat`](http://www.htslib.org/doc/samtools-flagstat.html), [`samtools stats`](http://www.htslib.org/doc/samtools-stats.html), [`samtools idxstats`](http://www.htslib.org/doc/samtools-idxstats.html) and [`picard CollecHsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectHsMetrics), [`picard CollectWgsMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectWgsMetrics), [`picard CollectMultipleMetrics`](https://broadinstitute.github.io/picard/command-line-overview.html#CollectMultipleMetrics)\n7. QC aggregation using [`multiqc`](https://multiqc.info/)\n\n![metro map](docs/images/metro_map.png)\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe full documentation can be found [here](docs/README.md)\n\nFirst, prepare a samplesheet with your input data that looks as follows:\n\n`samplesheet.csv` for fastq inputs:\n\n```csv\nid,samplename,organism,library,aligner,fastq_1,fastq_2\nsample1,sample1,Homo sapiens,Library_Name,bwamem,reads1.fq.gz,reads2.fq.gz\n```\n\n`samplesheet.csv` for flowcell inputs:\n\n```csv\nid,samplesheet,lane,flowcell,sample_info\nflowcell_id,/path/to/illumina_samplesheet.csv,1,/path/to/sequencer_uploaddir,/path/to/sampleinfo.csv\n```\n\n`sampleinfo.csv` for use with flowcell inputs:\n\n```csv\nsamplename,library,organism,tag,aligner\nfc_sample1,test,Homo sapiens,WES,bwamem\n```\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run nf-cmgg/preprocessing \\\n -profile \\\n --igenomes_base /path/to/genomes \\\n --input samplesheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n> see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nnf-cmgg/preprocessing was originally written by the CMGG ICT team.\n\n## Support\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf" }, + { + "@id": "docs/images/metro_map.png" + }, { "@id": "assets/" }, + { + "@id": "bin/" + }, { "@id": "conf/" }, { "@id": "docs/" }, + { + "@id": "docs/images/" + }, { "@id": "modules/" }, + { + "@id": "modules/local/" + }, { "@id": "modules/nf-core/" }, @@ -93,7 +105,7 @@ }, "mentions": [ { - "@id": "#3be06551-eaa0-4c8e-8ad8-cf70f05fb90c" + "@id": "#e939b96d-700d-40a2-9ff8-added4e0ade4" } ], "name": "nf-cmgg/preprocessing" @@ -120,9 +132,20 @@ "SoftwareSourceCode", "ComputationalWorkflow" ], + "creator": [ + { + "@id": "https://orcid.org/0000-0003-2555-3114" + }, + { + "@id": "https://orcid.org/0009-0003-5619-1555" + } + ], "dateCreated": "", - "dateModified": "2025-11-13T16:11:21Z", + "dateModified": "2026-02-09T14:16:20Z", "dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/", + "image": { + "@id": "docs/images/metro_map.png" + }, "keywords": [ "nf-core", "nextflow" @@ -130,6 +153,11 @@ "license": [ "MIT" ], + "maintainer": [ + { + "@id": "https://orcid.org/0000-0003-2555-3114" + } + ], "name": [ "nf-cmgg/preprocessing" ], @@ -144,7 +172,7 @@ "https://nf-co.re/nf-cmgg/preprocessing/dev/" ], "version": [ - "2.1.0dev" + "3.0.0dev" ] }, { @@ -157,14 +185,22 @@ "url": { "@id": "https://www.nextflow.io/" }, - "version": "!>=25.04.0" + "version": "!>=25.10.0" }, { - "@id": "#3be06551-eaa0-4c8e-8ad8-cf70f05fb90c", + "@id": "docs/images/metro_map.png", + "@type": [ + "File", + "ImageObject" + ], + "name": "Workflow diagram" + }, + { + "@id": "#e939b96d-700d-40a2-9ff8-added4e0ade4", "@type": "TestSuite", "instance": [ { - "@id": "#4d67a865-3114-4fc8-94e4-c36091fb7276" + "@id": "#a6c6a5a5-b7e8-4825-8dce-3f467dbc2c91" } ], "mainEntity": { @@ -173,7 +209,7 @@ "name": "Test suite for nf-cmgg/preprocessing" }, { - "@id": "#4d67a865-3114-4fc8-94e4-c36091fb7276", + "@id": "#a6c6a5a5-b7e8-4825-8dce-3f467dbc2c91", "@type": "TestInstance", "name": "GitHub Actions workflow for testing nf-cmgg/preprocessing", "resource": "repos/nf-cmgg/preprocessing/actions/workflows/nf-test.yml", @@ -195,6 +231,11 @@ "@type": "Dataset", "description": "Additional files" }, + { + "@id": "bin/", + "@type": "Dataset", + "description": "Scripts that must be callable from a pipeline process" + }, { "@id": "conf/", "@type": "Dataset", @@ -205,11 +246,21 @@ "@type": "Dataset", "description": "Markdown files for documenting the pipeline" }, + { + "@id": "docs/images/", + "@type": "Dataset", + "description": "Images for the documentation files" + }, { "@id": "modules/", "@type": "Dataset", "description": "Modules used by the pipeline" }, + { + "@id": "modules/local/", + "@type": "Dataset", + "description": "Pipeline-specific modules" + }, { "@id": "modules/nf-core/", "@type": "Dataset", @@ -290,6 +341,18 @@ "@type": "Organization", "name": "nf-core", "url": "https://nf-co.re/" + }, + { + "@id": "https://orcid.org/0000-0003-2555-3114", + "@type": "Person", + "email": "11850640+matthdsm@users.noreply.github.com", + "name": "Matthias De Smet" + }, + { + "@id": "https://orcid.org/0009-0003-5619-1555", + "@type": "Person", + "email": "101190534+nvnieuwk@users.noreply.github.com", + "name": "Nicolas Vannieuwkerke" } ] } \ No newline at end of file From f1d78fe1e2a404a5e2f7d6e4ff8a8cbe89f98f36 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:20:21 +0100 Subject: [PATCH 141/202] deprecate global analysis params in favor of per sample settings --- CHANGELOG.md | 4 + assets/schema_input.json | 80 ++++++-- assets/schema_sampleinfo.json | 70 ++++++- main.nf | 2 - .../picard/collectmultiplemetrics/main.nf | 4 +- nextflow.config | 10 - nextflow_schema.json | 51 ----- subworkflows/local/bam_qc/main.nf | 70 +++---- .../local/fastq_to_aligned_cram/main.nf | 79 ++++---- workflows/preprocessing.nf | 191 +++++------------- 10 files changed, 260 insertions(+), 301 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4963ab44..aeda298e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Drop support for unaligned cram outputs. - Add support for untrimmed fastq outputs for unsupported genomes or when aligner is set to `false`. - Drop support for global `aligner` parameter. The aligner must now be specified per sample in the sample sheet or sample info. +- Drop support for global `markdup` and `umi_aware` parameters. Marking duplicates must now be specified per sample in the sample sheet or sample info. +- Drop support for global `run_coverage` and `disable_picard_metrics` parameters. Running coverage analysis must now be specified per sample in the sample sheet or sample info. +- Drop support for global `skip_trimming`, `trim_front`, `trim_tail`, `adapter_R1` and `adapter_R2` parameters. Trimming must now be specified per sample in the sample sheet or sample info. +- Drop support for global `roi` parameter. Regions of interest must now be specified per sample in the sample sheet or sample info. - Simplify fastq sharding and make it user configurable via the `split_fastq` parameter. - Added splice junctions and junctions outputs for RNA-seq alignments using STAR. diff --git a/assets/schema_input.json b/assets/schema_input.json index 7eab645d..59ee5046 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -37,7 +37,71 @@ "meta": ["aligner"], "type": ["string", "boolean"], "description": "Aligner to use to align sample to the reference genome", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star", "false", false] + "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star", "false", false], + "default": "false" + }, + "markdup": { + "meta": ["markdup"], + "type": ["string", "boolean"], + "description": "Mark duplicates tool to use", + "enum": ["bamsormadup", "samtools", "false", false], + "default": "bamsormadup" + }, + "umi_aware": { + "meta": ["umi_aware"], + "type": "boolean", + "description": "Run markdup in UMI-aware mode. This applies to Samtools only and requires the UMI to be in the read name.", + "default": false + }, + "skip_trimming": { + "meta": ["skip_trimming"], + "type": "boolean", + "description": "Skip adapter trimming", + "default": false + }, + "trim_front": { + "meta": ["trim_front"], + "type": "integer", + "description": "Number of bases to trim from the front of each read", + "default": 0 + }, + "trim_tail": { + "meta": ["trim_tail"], + "type": "integer", + "description": "Number of bases to trim from the tail of each read", + "default": 0 + }, + "adapter_R1": { + "meta": ["adapter_R1"], + "type": "string", + "description": "Adapter sequence to trim from read 1", + "default": null + }, + "adapter_R2": { + "meta": ["adapter_R2"], + "type": "string", + "description": "Adapter sequence to trim from read 2", + "default": null + }, + "run_coverage": { + "meta": ["run_coverage"], + "type": "boolean", + "description": "Whether to run coverage analysis for the sample", + "default": false + }, + "disable_picard_metrics": { + "meta": ["disable_picard_metrics"], + "type": "boolean", + "description": "Whether to disable Picard metrics calculation. This can be used to speed up processing if Picard is not needed.", + "default": true + }, + "roi": { + "meta": ["roi"], + "type": "string", + "format": "file-path", + "description": "Region of interest BED file for coverage analysis", + "pattern": "^\\S+\\.bed$", + "default": null }, "tag": { "meta": ["tag"], @@ -45,12 +109,6 @@ "description": "Sample tag", "pattern": "^[a-zA-Z0-9_-]+$" }, - "purpose": { - "meta": ["purpose"], - "type": "string", - "description": "Sample purpose, can be either 'research' or 'diagnostic'", - "enum": ["research", "diagnostic"] - }, "sample_type": { "meta": ["sample_type"], "type": "string", @@ -64,14 +122,6 @@ "pattern": "^[a-zA-Z0-9_-]+$", "description": "Sample library name" }, - "roi": { - "meta": ["roi"], - "type": "string", - "format": "file-path", - "description": "Region of interest BED file for coverage analysis", - "pattern": "^\\S+\\.bed$", - "default": null - }, "lane": { "type": "integer", "meta": ["lane"], diff --git a/assets/schema_sampleinfo.json b/assets/schema_sampleinfo.json index bac6789d..26bb486a 100644 --- a/assets/schema_sampleinfo.json +++ b/assets/schema_sampleinfo.json @@ -73,19 +73,75 @@ "type": "string" } }, + "aligner": { + "meta": ["aligner"], + "type": ["string", "boolean"], + "description": "Aligner to use to align sample to the reference genome", + "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star", "false", false], + "default": "false" + }, + "markdup": { + "meta": ["markdup"], + "type": ["string", "boolean"], + "description": "Mark duplicates tool to use", + "enum": ["bamsormadup", "samtools", "false", false], + "default": "bamsormadup" + }, + "umi_aware": { + "meta": ["umi_aware"], + "type": "boolean", + "description": "Run markdup in UMI-aware mode. This applies to Samtools only and requires the UMI to be in the read name.", + "default": false + }, + "skip_trimming": { + "meta": ["skip_trimming"], + "type": "boolean", + "description": "Skip adapter trimming", + "default": false + }, + "trim_front": { + "meta": ["trim_front"], + "type": "integer", + "description": "Number of bases to trim from the front of each read", + "default": 0 + }, + "trim_tail": { + "meta": ["trim_tail"], + "type": "integer", + "description": "Number of bases to trim from the tail of each read", + "default": 0 + }, + "adapter_R1": { + "meta": ["adapter_R1"], + "type": "string", + "description": "Adapter sequence to trim from read 1", + "default": null + }, + "adapter_R2": { + "meta": ["adapter_R2"], + "type": "string", + "description": "Adapter sequence to trim from read 2", + "default": null + }, + "run_coverage": { + "meta": ["run_coverage"], + "type": "boolean", + "description": "Whether to run coverage analysis for the sample", + "default": false + }, + "disable_picard_metrics": { + "meta": ["disable_picard_metrics"], + "type": "boolean", + "description": "Whether to disable Picard metrics calculation. This can be used to speed up processing if Picard is not needed.", + "default": true + }, "roi": { "meta": ["roi"], "type": "string", "format": "file-path", "description": "Region of interest BED file for coverage analysis", - "pattern": "^[a-zA-Z0-9_]+.bed$", + "pattern": "^\\S+\\.bed$", "default": null - }, - "aligner": { - "meta": ["aligner"], - "type": ["string", "boolean"], - "description": "Aligner to use to align sample to the reference genome", - "enum": ["bowtie2", "bwamem", "bwamem2", "dragmap", "snap", "strobe", "star", "false", false] } } }, diff --git a/main.nf b/main.nf index 03dfac1a..305e0e6b 100644 --- a/main.nf +++ b/main.nf @@ -45,8 +45,6 @@ workflow { PREPROCESSING( PIPELINE_INITIALISATION.out.samplesheet, params.genomes, - params.markdup, - params.roi, params.genelists, ) diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index e4d74998..765d2ce9 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -8,7 +8,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" input: - tuple val(meta) , path(bam), path(bai) ,path(fasta) ,path(fai) + tuple val(meta) , path(bam), path(bai), path(intervals), path(fasta) ,path(fai), path(dict) output: tuple val(meta), path("*_metrics"), emit: metrics @@ -21,6 +21,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def intervals = intervals ? "--INTERVALS ${intervals.join(',')}" : "" def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" def avail_mem = 3072 if (!task.memory) { @@ -35,6 +36,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { $args \\ --INPUT $bam \\ --OUTPUT ${prefix}.CollectMultipleMetrics \\ + $intervals \\ $reference cat <<-END_VERSIONS > versions.yml diff --git a/nextflow.config b/nextflow.config index 2beb9d9e..30835d39 100644 --- a/nextflow.config +++ b/nextflow.config @@ -18,17 +18,7 @@ params { igenomes_ignore = false // Analysis options - markdup = 'bamsormadup' - umi_aware = false - skip_trimming = false split_fastq = 100000000 - trim_front = 0 - trim_tail = 0 - adapter_R1 = null - adapter_R2 = null - run_coverage = true - disable_picard_metrics = false - roi = null genelists = null // MultiQC options diff --git a/nextflow_schema.json b/nextflow_schema.json index 63d39f34..722c57ce 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -51,27 +51,6 @@ "description": "", "default": "", "properties": { - "markdup": { - "type": "string", - "default": "bamsormadup", - "description": "Which alignment postprocessor to use", - "enum": ["bamsormadup", "samtools", "false"] - }, - "umi_aware": { - "type": "boolean", - "default": "false", - "description": "Run markdup in UMI-aware mode. This applies to Samtools only and requires the UMI to be in the read name." - }, - "run_coverage": { - "type": "boolean", - "description": "Run coverage analysis steps", - "default": true - }, - "skip_trimming": { - "type": "boolean", - "description": "Skip adapter trimming", - "default": false - }, "split_fastq": { "type": "integer", "oneOf": [ @@ -87,36 +66,6 @@ "description": "Specify how many reads each split of a FastQ file contains. Set 0 to turn off splitting at all.", "help_text": "Use the the tool FastP to split FASTQ file by number of reads. This parallelizes across fastq file shards speeding up mapping. Note although the minimum value is 250 reads, if you have fewer than 250 reads a single FASTQ shard will still be created." }, - "trim_front": { - "type": "integer", - "default": 0, - "description": "Number of bases to trim from the front of the read" - }, - "trim_tail": { - "type": "integer", - "default": 0, - "description": "Number of bases to trim from the tail of the read" - }, - "adapter_R1": { - "type": "string", - "default": null, - "description": "Adapter sequence to be trimmed" - }, - "adapter_R2": { - "type": "string", - "default": null, - "description": "Adapter sequence to be trimmed" - }, - "disable_picard_metrics": { - "type": "boolean", - "default": false, - "description": "Disable the calculation of (slow) Picard metrics" - }, - "roi": { - "type": "string", - "default": null, - "description": "Region of interest for coverage analysis to be applied to all samples" - }, "genelists": { "type": "string", "default": null, diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index e35555a8..4978c5dd 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -11,65 +11,57 @@ include { PICARD_COLLECTWGSMETRICS } from '../../../modules/nf-core/picard/ workflow BAM_QC { take: ch_bam_bai_roi_fasta_fai_dict // channel: [ val(meta), path(bam), path(bai), path(roi), path(fasta), path(fai), path(dict)] - disable_picard // boolean main: ch_versions = channel.empty() ch_bam_bai_roi_fasta_fai_dict - .map { meta, bam, bai, _roi, fasta, _fai, _dict -> - return [meta, bam, bai, fasta] - } - .set { ch_bam_bai_fasta } - - SAMTOOLS_STATS(ch_bam_bai_fasta) + .map { meta, bam, bai, _roi, fasta, _fai, _dict -> + return [meta, bam, bai, fasta, fai] + } + .set { ch_bam_bai_fasta_fai } - ch_bam_bai_fasta - .map { meta, bam, bai, _fasta -> - return [meta, bam, bai] - } - .set { ch_bam_bai } + SAMTOOLS_STATS(ch_bam_bai_fasta_fai) + ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions.first()) - SAMTOOLS_FLAGSTAT(ch_bam_bai) + SAMTOOLS_FLAGSTAT(ch_bam_bai_fasta_fai) ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions.first()) - SAMTOOLS_IDXSTATS(ch_bam_bai) + SAMTOOLS_IDXSTATS(ch_bam_bai_fasta_fai) ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions.first()) ch_picard_hsmetrics = channel.empty() ch_picard_multiplemetrics = channel.empty() ch_picard_multiplemetrics_pdf = channel.empty() ch_picard_wgsmetrics = channel.empty() - if (!disable_picard) { - ch_bam_bai_roi_fasta_fai_dict - .map { meta, bam, bai, _roi, fasta, fai, _dict -> - return [meta, bam, bai, fasta, fai] - } - .set { ch_bam_bai_fasta_fai } + ch_bam_bai_roi_fasta_fai_dict + .filter { meta, _bam, _bai, _roi, _fasta, _fai, _dict -> + meta.disable_picard_metrics != true + } + .set { ch_picard } + + PICARD_COLLECTMULTIPLEMETRICS(ch_picard) + ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) + ch_picard_multiplemetrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics + ch_picard_multiplemetrics_pdf = PICARD_COLLECTMULTIPLEMETRICS.out.pdf - PICARD_COLLECTMULTIPLEMETRICS(ch_bam_bai_fasta_fai) - ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) - ch_picard_multiplemetrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics - ch_picard_multiplemetrics_pdf = PICARD_COLLECTMULTIPLEMETRICS.out.pdf + ch_picard + .branch { meta, bam, bai, roi, fasta, fai, dict -> + hsmetrics: roi != [] + return [meta, bam, bai, roi, fasta, fai, dict] + wgsmetrics: roi == [] + return [meta, bam, bai, fasta, fai, dict] + .set { ch_picard_coverage } } - ch_bam_bai_roi_fasta_fai_dict - .branch { meta, bam, bai, roi, fasta, fai, dict -> - hsmetrics: roi != [] - return [meta, bam, bai, roi, roi, fasta, fai, dict] - wgsmetrics: roi == [] - return [meta, bam, bai, fasta, fai] - } - .set { ch_picard } + PICARD_COLLECTWGSMETRICS(ch_picard_coverage.wgsmetrics, []) + ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) + ch_picard_wgsmetrics = PICARD_COLLECTWGSMETRICS.out.metrics - PICARD_COLLECTWGSMETRICS(ch_picard.wgsmetrics, []) - ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) - ch_picard_wgsmetrics = PICARD_COLLECTWGSMETRICS.out.metrics + PICARD_COLLECTHSMETRICS(ch_picard_coverage.hsmetrics) + ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) + ch_picard_hsmetrics = PICARD_COLLECTHSMETRICS.out.metrics - PICARD_COLLECTHSMETRICS(ch_picard.hsmetrics) - ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) - ch_picard_hsmetrics = PICARD_COLLECTHSMETRICS.out.metrics - } emit: samtools_stats = SAMTOOLS_STATS.out.stats diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index 1460d083..9d30ea92 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -20,7 +20,6 @@ include { getGenomeAttribute } from '../../local/utils_nfcore_preprocessing_p workflow FASTQ_TO_CRAM { take: ch_meta_reads_aligner_index_fasta_gtf // channel: [mandatory] [meta, [fastq, ...], aligner [bowtie2, bwamem, bwamem2, dragmap, snap, star], aligner_index, fasta, gtf] - markdup // string: [optional ] markdup [bamsormadup, samtools, false] main: @@ -28,10 +27,10 @@ workflow FASTQ_TO_CRAM { ch_sormadup_metrics = channel.empty() /* - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // STEP: ALIGNMENT - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // STEP: ALIGNMENT + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ ch_meta_reads_aligner_index_fasta_gtf.dump(tag: "FASTQ_TO_CRAM: reads to align", pretty: true) @@ -39,7 +38,8 @@ workflow FASTQ_TO_CRAM { .branch { meta, reads, aligner, index, fasta, gtf -> rna: meta.sample_type == "RNA" return [meta, reads, "star", getGenomeAttribute(meta.genome_data, 'star'), gtf] - dna: meta.sample_type == "DNA" || meta.sample_type == "Tissue" + dna: true // catch all non-RNA samples as DNA, as some may be missing sample_type or have other sample types (e.g. tissue, cell line, etc.) that should be aligned with the DNA aligner + //dna: meta.sample_type == "DNA" || meta.sample_type == "Tissue" return [meta, reads, aligner, index, fasta] } .set { ch_meta_reads_aligner_index_fasta_datatype } @@ -58,10 +58,10 @@ workflow FASTQ_TO_CRAM { ch_versions = ch_versions.mix(FASTQ_ALIGN_DNA.out.versions) /* - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // STEP: MARK DUPLICATES - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // STEP: MARK DUPLICATES + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ FASTQ_ALIGN_DNA.out.bam .mix(FASTQ_ALIGN_RNA.out.bam) @@ -90,40 +90,45 @@ workflow FASTQ_TO_CRAM { .map { meta, files -> return [meta, files.flatten(), getGenomeAttribute(meta.genome_data, 'fasta')] } + .dump(tag: "FASTQ_TO_CRAM: aligned bam per sample", pretty: true) + .branch { meta, files, fasta -> + bamsormadup: meta.markdup == "bamsormadup" + return [meta, files, fasta] + samtools: meta.markdup == "samtools" + return [meta, files, fasta] + sort: meta.markdup == "false" || meta.markdup == false + return [meta, files, fasta] + unknown: true + error("markdup option ${meta.markdup} not supported") + } .set { ch_bam_fasta } - ch_bam_fasta.dump(tag: "FASTQ_TO_CRAM: aligned bam per sample", pretty: true) ch_markdup_index = channel.empty() - if (markdup == "bamsormadup") { - // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta) - BIOBAMBAM_BAMSORMADUP(ch_bam_fasta) - ch_markdup_index = ch_markdup_index.mix(BIOBAMBAM_BAMSORMADUP.out.bam.join(BIOBAMBAM_BAMSORMADUP.out.bam_index, failOnMismatch: true, failOnDuplicate: true)) - ch_sormadup_metrics = ch_sormadup_metrics.mix(BIOBAMBAM_BAMSORMADUP.out.metrics) - ch_versions = ch_versions.mix(BIOBAMBAM_BAMSORMADUP.out.versions.first()) - } - else if (markdup == "samtools") { - SAMTOOLS_SORMADUP(ch_bam_fasta) - ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORMADUP.out.cram.join(SAMTOOLS_SORMADUP.out.crai, failOnMismatch: true, failOnDuplicate: true)) - ch_sormadup_metrics = ch_sormadup_metrics.mix(SAMTOOLS_SORMADUP.out.metrics) - ch_versions = ch_versions.mix(SAMTOOLS_SORMADUP.out.versions.first()) - } - else if (markdup == "false" || markdup == false) { - // Merge bam files and compress - // SAMTOOLS_SORT([meta, [bam, bam], fasta],index_format) - SAMTOOLS_SORT(ch_bam_fasta, "crai") - ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORT.out.cram.join(SAMTOOLS_SORT.out.crai, failOnMismatch: true, failOnDuplicate: true)) - } - else { - error("markdup: ${markdup} not supported") - } + // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta) + BIOBAMBAM_BAMSORMADUP(ch_bam_fasta.bamsormadup) + ch_markdup_index = ch_markdup_index.mix(BIOBAMBAM_BAMSORMADUP.out.bam.join(BIOBAMBAM_BAMSORMADUP.out.bam_index, failOnMismatch: true, failOnDuplicate: true)) + ch_sormadup_metrics = ch_sormadup_metrics.mix(BIOBAMBAM_BAMSORMADUP.out.metrics) + ch_versions = ch_versions.mix(BIOBAMBAM_BAMSORMADUP.out.versions.first()) + + // SAMTOOLS_SORMADUP([meta, [bam, bam]], fasta) + SAMTOOLS_SORMADUP(ch_bam_fasta.samtools) + ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORMADUP.out.cram.join(SAMTOOLS_SORMADUP.out.crai, failOnMismatch: true, failOnDuplicate: true)) + ch_sormadup_metrics = ch_sormadup_metrics.mix(SAMTOOLS_SORMADUP.out.metrics) + ch_versions = ch_versions.mix(SAMTOOLS_SORMADUP.out.versions.first()) + + // Merge bam files and compress + // SAMTOOLS_SORT([meta, [bam, bam], fasta],index_format) + SAMTOOLS_SORT(ch_bam_fasta.sort, "crai") + ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORT.out.cram.join(SAMTOOLS_SORT.out.crai, failOnMismatch: true, failOnDuplicate: true)) + ch_markdup_index.dump(tag: "FASTQ_TO_CRAM: postprocessed bam", pretty: true) /* - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // COMPRESSION - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - */ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + // COMPRESSION + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ ch_markdup_index .branch { meta, reads, index -> diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 6d2802eb..3b22a329 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -37,8 +37,6 @@ workflow PREPROCESSING { take: ch_samplesheet // channel: samplesheet read in from --input genomes // map: genome reference files - markdup // string: markdup method to use - roi // file: regions of interest bed file to be applied to all samples genelists // file: directory containing genelist bed files for coverage analysis main: @@ -55,9 +53,6 @@ workflow PREPROCESSING { error("Unable to determine input type, please check inputs") } .set { ch_inputs_from_samplesheet } - - roi = roi ? file(roi, checkIfExists: true) : null - genelists = genelists ? channel.value(file(genelists + "/*.bed", checkIfExists: true)) : channel.empty() /* @@ -164,19 +159,6 @@ workflow PREPROCESSING { else { meta = meta + ["genome_data": [:]] } - - // set the ROI - // // Special case for coPGT samples - // // if there's no global ROI AND no sample speficic ROI - // // AND the sample tag is "coPGT-M", set the sample ROI to "roi_copgt" - if (!roi && !meta.roi && meta.tag == "coPGT-M") { - meta = meta + ["roi": getGenomeAttribute(meta.genome_data, "roi_copgt")] - } - // // if there's a global ROI AND no sample specific ROI - // // set the global ROI to the sample - if (roi && !meta.roi) { - meta = meta + ["roi": roi] - } return [meta, reads] } .map { meta, reads -> [meta.samplename, [meta, reads]] } @@ -248,130 +230,61 @@ workflow PREPROCESSING { .set { ch_meta_reads_aligner_index_fasta_gtf } FASTQ_TO_CRAM( - ch_meta_reads_aligner_index_fasta_gtf, - markdup, + ch_meta_reads_aligner_index_fasta_gtf ) ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.sormadup_metrics) ch_versions = ch_versions.mix(FASTQ_TO_CRAM.out.versions) - - /* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// STEP: FILTER SAMPLES WITH 'SNP' TAG -// samples with SNP tag contain only data for sample tracking -// and as such don't need all the QC steps -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - - FASTQ_TO_CRAM.out.cram_crai - .filter { meta, _cram, _crai -> - meta.tag != "SNP" - } - .set { ch_no_snp_samples } - - /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: COVERAGE ANALYSIS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_no_snp_samples - .map { meta, cram, crai -> - if (meta.roi) { - return [ - meta, - cram, - crai, - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - file(meta.roi, checkIfExists: true), - ] - } - else { - return [ - meta, - cram, - crai, - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - [], - ] - } - } - .set { ch_cram_crai_fasta_fai_roi } - - def mosdepth_global_out = channel.empty() - def mosdepth_summary_out = channel.empty() - def mosdepth_regions_out = channel.empty() - def mosdepth_per_base_d4_out = channel.empty() - def mosdepth_per_base_bed_out = channel.empty() - def mosdepth_per_base_csi_out = channel.empty() - def mosdepth_regions_bed_out = channel.empty() - def mosdepth_regions_csi_out = channel.empty() - def mosdepth_quantized_bed_out = channel.empty() - def mosdepth_quantized_csi_out = channel.empty() - def mosdepth_thresholds_bed_out = channel.empty() - def mosdepth_thresholds_csi_out = channel.empty() - def samtools_coverage_out = channel.empty() - def panelcoverage_out = channel.empty() - if (params.run_coverage) { - COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) - ch_multiqc_files = ch_multiqc_files.mix( - COVERAGE.out.mosdepth_summary, - COVERAGE.out.mosdepth_global, - COVERAGE.out.mosdepth_regions, - COVERAGE.out.samtools_coverage, - ) - mosdepth_global_out = COVERAGE.out.mosdepth_global - mosdepth_summary_out = COVERAGE.out.mosdepth_summary - mosdepth_regions_out = COVERAGE.out.mosdepth_regions - mosdepth_per_base_d4_out = COVERAGE.out.mosdepth_per_base_d4 - mosdepth_per_base_bed_out = COVERAGE.out.mosdepth_per_base_bed - mosdepth_per_base_csi_out = COVERAGE.out.mosdepth_per_base_csi - mosdepth_regions_bed_out = COVERAGE.out.mosdepth_regions_bed - mosdepth_regions_csi_out = COVERAGE.out.mosdepth_regions_csi - mosdepth_quantized_bed_out = COVERAGE.out.mosdepth_quantized_bed - mosdepth_quantized_csi_out = COVERAGE.out.mosdepth_quantized_csi - mosdepth_thresholds_bed_out = COVERAGE.out.mosdepth_thresholds_bed - mosdepth_thresholds_csi_out = COVERAGE.out.mosdepth_thresholds_csi - samtools_coverage_out = COVERAGE.out.samtools_coverage - panelcoverage_out = COVERAGE.out.panelcoverage - ch_versions = ch_versions.mix(COVERAGE.out.versions) + FASTQ_TO_CRAM.out.cram_crai + .filter { meta, _cram, _crai -> + meta.run_coverage.toBoolean() == true + } + .map { meta, cram, crai -> + return [ + meta, + cram, + crai, + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "fai"), + meta.roi ? file(meta.roi, checkIfExists: true) : [], + ] } + .set { ch_cram_crai_fasta_fai_roi } + + COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) + ch_multiqc_files = ch_multiqc_files.mix( + COVERAGE.out.mosdepth_summary, + COVERAGE.out.mosdepth_global, + COVERAGE.out.mosdepth_regions, + COVERAGE.out.samtools_coverage, + ) + ch_versions = ch_versions.mix(COVERAGE.out.versions) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: QC FOR ALIGNMENTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_no_snp_samples - .map { meta, cram, crai -> - if (meta.roi) { - return [ - meta, - cram, - crai, - file(meta.roi, checkIfExists: true), - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - getGenomeAttribute(meta.genome_data, "dict"), - ] - } - else { - return [ - meta, - cram, - crai, - [], - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - getGenomeAttribute(meta.genome_data, "dict"), - ] - } - } - .set { ch_cram_crai_roi_fasta_fai_dict } + FASTQ_TO_CRAM.out.cram_crai + .map { meta, cram, crai -> + return [ + meta, + cram, + crai, + meta.roi ? file(meta.roi, checkIfExists: true) : [], + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "fai"), + getGenomeAttribute(meta.genome_data, "dict"), + ] + } + .set { ch_cram_crai_roi_fasta_fai_dict } - BAM_QC(ch_cram_crai_roi_fasta_fai_dict, params.disable_picard_metrics) + BAM_QC(ch_cram_crai_roi_fasta_fai_dict) ch_multiqc_files = ch_multiqc_files.mix( BAM_QC.out.samtools_stats, BAM_QC.out.samtools_flagstat, @@ -492,20 +405,20 @@ workflow PREPROCESSING { rna_junctions = FASTQ_TO_CRAM.out.rna_junctions align_reports = FASTQ_TO_CRAM.out.align_reports sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics - mosdepth_global = mosdepth_global_out - mosdepth_summary = mosdepth_summary_out - mosdepth_regions = mosdepth_regions_out - mosdepth_per_base_d4 = mosdepth_per_base_d4_out - mosdepth_per_base_bed = mosdepth_per_base_bed_out - mosdepth_per_base_csi = mosdepth_per_base_csi_out - mosdepth_regions_bed = mosdepth_regions_bed_out - mosdepth_regions_csi = mosdepth_regions_csi_out - mosdepth_quantized_bed = mosdepth_quantized_bed_out - mosdepth_quantized_csi = mosdepth_quantized_csi_out - mosdepth_thresholds_bed = mosdepth_thresholds_bed_out - mosdepth_thresholds_csi = mosdepth_thresholds_csi_out - samtools_coverage = samtools_coverage_out - panelcoverage = panelcoverage_out + mosdepth_global = COVERAGE.out.mosdepth_global + mosdepth_summary = COVERAGE.out.mosdepth_summary + mosdepth_regions = COVERAGE.out.mosdepth_regions + mosdepth_per_base_d4 = COVERAGE.out.mosdepth_per_base_d4 + mosdepth_per_base_bed = COVERAGE.out.mosdepth_per_base_bed + mosdepth_per_base_csi = COVERAGE.out.mosdepth_per_base_csi + mosdepth_regions_bed = COVERAGE.out.mosdepth_regions_bed + mosdepth_regions_csi = COVERAGE.out.mosdepth_regions_csi + mosdepth_quantized_bed = COVERAGE.out.mosdepth_quantized_bed + mosdepth_quantized_csi = COVERAGE.out.mosdepth_quantized_csi + mosdepth_thresholds_bed = COVERAGE.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi = COVERAGE.out.mosdepth_thresholds_csi + samtools_coverage = COVERAGE.out.samtools_coverage + panelcoverage = COVERAGE.out.panelcoverage samtools_stats = BAM_QC.out.samtools_stats samtools_flagstat = BAM_QC.out.samtools_flagstat samtools_idxstats = BAM_QC.out.samtools_idxstats From dcb2a6e1cf1f974021d49d73cebe32e54e9084b5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:51:55 +0100 Subject: [PATCH 142/202] nextflow lint --- .../picard/collectmultiplemetrics/main.nf | 8 +- modules/nf-core/samtools/sormadup/main.nf | 3 - subworkflows/local/bam_qc/main.nf | 5 +- .../nf-core/utils_nfcore_pipeline/main.nf | 2 +- workflows/preprocessing.nf | 248 +++++++++--------- 5 files changed, 137 insertions(+), 129 deletions(-) diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index 765d2ce9..2dc6679d 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -21,8 +21,8 @@ process PICARD_COLLECTMULTIPLEMETRICS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def intervals = intervals ? "--INTERVALS ${intervals.join(',')}" : "" - def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" + def intervals_cmd = intervals ? "--INTERVALS ${intervals.join(',')}" : "" + def reference_cmd = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" def avail_mem = 3072 if (!task.memory) { log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' @@ -36,8 +36,8 @@ process PICARD_COLLECTMULTIPLEMETRICS { $args \\ --INPUT $bam \\ --OUTPUT ${prefix}.CollectMultipleMetrics \\ - $intervals \\ - $reference + $intervals_cmd \\ + $reference_cmd cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/samtools/sormadup/main.nf b/modules/nf-core/samtools/sormadup/main.nf index 9bc8a43b..86afb479 100644 --- a/modules/nf-core/samtools/sormadup/main.nf +++ b/modules/nf-core/samtools/sormadup/main.nf @@ -32,9 +32,6 @@ process SAMTOOLS_SORMADUP { args5.contains("--output-fmt cram") ? "cram" : "bam" def reference = fasta ? "--reference ${fasta}" : "" - // memory per thread for samtools sort - // set to 50% of the memory per thread, but at least 768M (samtools default) - def sort_memory = Math.max(768,(task.memory.mega/task.cpus*0.50).intValue()) """ samtools cat \\ diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index 4978c5dd..37ef16a7 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -16,7 +16,7 @@ workflow BAM_QC { ch_versions = channel.empty() ch_bam_bai_roi_fasta_fai_dict - .map { meta, bam, bai, _roi, fasta, _fai, _dict -> + .map { meta, bam, bai, _roi, fasta, fai, _dict -> return [meta, bam, bai, fasta, fai] } .set { ch_bam_bai_fasta_fai } @@ -52,7 +52,8 @@ workflow BAM_QC { return [meta, bam, bai, roi, fasta, fai, dict] wgsmetrics: roi == [] return [meta, bam, bai, fasta, fai, dict] - .set { ch_picard_coverage } } + } + .set { ch_picard_coverage } PICARD_COLLECTWGSMETRICS(ch_picard_coverage.wgsmetrics, []) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index bfd25876..2f30e9a4 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -98,7 +98,7 @@ def workflowVersionToYAML() { // Get channel of software versions used in pipeline in YAML format // def softwareVersionsToYAML(ch_versions) { - return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML())) } // diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 3b22a329..33c0930b 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -1,4 +1,4 @@ -include { samplesheetToList } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -7,25 +7,25 @@ include { samplesheetToList } from 'plugin/nf-schema' */ // Modules -include { FASTP } from '../modules/nf-core/fastp/main' -include { MD5SUM } from '../modules/nf-core/md5sum/main' -include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' -include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' -include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' -include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' +include { FASTP } from '../modules/nf-core/fastp/main' +include { MD5SUM } from '../modules/nf-core/md5sum/main' +include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' +include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' +include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' +include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' // Subworkflows -include { BAM_QC } from '../subworkflows/local/bam_qc/main' -include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' -include { COVERAGE } from '../subworkflows/local/coverage/main' -include { FASTQ_TO_CRAM } from '../subworkflows/local/fastq_to_aligned_cram/main' +include { BAM_QC } from '../subworkflows/local/bam_qc/main' +include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' +include { COVERAGE } from '../subworkflows/local/coverage/main' +include { FASTQ_TO_CRAM } from '../subworkflows/local/fastq_to_aligned_cram/main' // Functions -include { paramsSummaryMap } from 'plugin/nf-schema' -include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' -include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' -include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' -include { getGenomeAttribute } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' +include { getGenomeAttribute } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -36,8 +36,8 @@ include { getGenomeAttribute } from '../subworkflows/local/utils_nfco workflow PREPROCESSING { take: ch_samplesheet // channel: samplesheet read in from --input - genomes // map: genome reference files - genelists // file: directory containing genelist bed files for coverage analysis + genomes // map: genome reference files + genelists // file: directory containing genelist bed files for coverage analysis main: ch_versions = channel.empty() @@ -73,7 +73,7 @@ workflow PREPROCESSING { BCL_DEMULTIPLEX.out.fastq.dump(tag: "DEMULTIPLEX: fastq", pretty: true) ch_multiqc_files = ch_multiqc_files.mix( BCL_DEMULTIPLEX.out.reports, - BCL_DEMULTIPLEX.out.stats + BCL_DEMULTIPLEX.out.stats, ) ch_versions = ch_versions.mix(BCL_DEMULTIPLEX.out.versions) @@ -178,7 +178,7 @@ workflow PREPROCESSING { ch_fastq_per_sample.supported.dump(tag: "Supported FASTQ per sample", pretty: true) ch_fastq_per_sample.other.dump(tag: "Other FASTQ per sample", pretty: true) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // FASTQ TRIMMING AND QC ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -187,7 +187,14 @@ workflow PREPROCESSING { // MODULE: fastp // Run QC, trimming and adapter removal // FASTP([meta, fastq, adapter_fasta], save_trimmed, save_merged) - FASTP(ch_fastq_per_sample.supported.map{ meta, fastq -> return [meta, fastq, []] }, false, false, false) + FASTP( + ch_fastq_per_sample.supported.map { meta, fastq -> + return [meta, fastq, []] + }, + false, + false, + false, + ) ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) ch_versions = ch_versions.mix(FASTP.out.versions.first()) @@ -212,22 +219,23 @@ workflow PREPROCESSING { ch_trimmed_reads.dump(tag: "Supported trimmed reads per sample", pretty: true) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: FASTQ TO ALIGNED CRAM CONVERSION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_trimmed_reads.map { meta, reads -> - return [ - meta, - reads, - meta.aligner, - getGenomeAttribute(meta.genome_data, meta.aligner), - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "gtf"), - ] - } - .set { ch_meta_reads_aligner_index_fasta_gtf } + ch_trimmed_reads + .map { meta, reads -> + return [ + meta, + reads, + meta.aligner, + getGenomeAttribute(meta.genome_data, meta.aligner), + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "gtf"), + ] + } + .set { ch_meta_reads_aligner_index_fasta_gtf } FASTQ_TO_CRAM( ch_meta_reads_aligner_index_fasta_gtf @@ -236,25 +244,26 @@ workflow PREPROCESSING { ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.sormadup_metrics) ch_versions = ch_versions.mix(FASTQ_TO_CRAM.out.versions) + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: COVERAGE ANALYSIS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ FASTQ_TO_CRAM.out.cram_crai - .filter { meta, _cram, _crai -> - meta.run_coverage.toBoolean() == true - } - .map { meta, cram, crai -> - return [ - meta, - cram, - crai, - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - meta.roi ? file(meta.roi, checkIfExists: true) : [], - ] - } - .set { ch_cram_crai_fasta_fai_roi } + .filter { meta, _cram, _crai -> + meta.run_coverage.toBoolean() + } + .map { meta, cram, crai -> + return [ + meta, + cram, + crai, + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "fai"), + meta.roi ? file(meta.roi, checkIfExists: true) : [], + ] + } + .set { ch_cram_crai_fasta_fai_roi } COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) ch_multiqc_files = ch_multiqc_files.mix( @@ -271,18 +280,18 @@ workflow PREPROCESSING { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ FASTQ_TO_CRAM.out.cram_crai - .map { meta, cram, crai -> - return [ - meta, - cram, - crai, - meta.roi ? file(meta.roi, checkIfExists: true) : [], - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "fai"), - getGenomeAttribute(meta.genome_data, "dict"), - ] - } - .set { ch_cram_crai_roi_fasta_fai_dict } + .map { meta, cram, crai -> + return [ + meta, + cram, + crai, + meta.roi ? file(meta.roi, checkIfExists: true) : [], + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "fai"), + getGenomeAttribute(meta.genome_data, "dict"), + ] + } + .set { ch_cram_crai_roi_fasta_fai_dict } BAM_QC(ch_cram_crai_roi_fasta_fai_dict) ch_multiqc_files = ch_multiqc_files.mix( @@ -318,7 +327,7 @@ workflow PREPROCESSING { // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -327,9 +336,9 @@ workflow PREPROCESSING { def topic_versions_string = topic_versions.versions_tuple .map { process, tool, version -> - [ process[process.lastIndexOf(':')+1..-1], " ${tool}: ${version}" ] + [process[process.lastIndexOf(':') + 1..-1], " ${tool}: ${version}"] } - .groupTuple(by:0) + .groupTuple(by: 0) .map { process, tool_versions -> tool_versions.unique().sort() "${process}:\n${tool_versions.join('\n')}" @@ -341,42 +350,43 @@ workflow PREPROCESSING { storeDir: "${params.outdir}/pipeline_info", name: 'nf_cmgg_preprocessing_software_mqc_versions.yml', sort: true, - newLine: true + newLine: true, ) - .map { file -> [[id: 'main'], file] } // add meta for multiqc + .map { file -> [[id: 'main'], file] } .set { ch_collated_versions } // // MODULE: MultiQC // - ch_multiqc_config = channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true) + ch_multiqc_config = channel.fromPath("${projectDir}/assets/multiqc_config.yml", checkIfExists: true) ch_multiqc_custom_config = params.multiqc_config ? channel.fromPath(params.multiqc_config, checkIfExists: true) : channel.empty() - ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() + ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() - summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") ch_workflow_summary = channel.value(paramsSummaryMultiqc(summary_params)) - ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml').map{ file -> [[id: 'main'], file] }) + ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml').map { file -> [[id: 'main'], file] }) - ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) + ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) - ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true).map{ file -> [[id: 'main'], file] }) + ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true).map { file -> [[id: 'main'], file] }) - ch_multiqc_files = ch_multiqc_files.map { meta, files -> - return [meta.library ? [id: meta.library] : [id: 'main'], files] - } - .branch { meta, files -> - main: meta.id == 'main' + ch_multiqc_files = ch_multiqc_files + .map { meta, files -> + return [meta.library ? [id: meta.library] : [id: 'main'], files] + } + .branch { meta, files -> + main: meta.id == 'main' return files - library: meta.id != 'main' + library: meta.id != 'main' return [meta, files instanceof List ? files : [files]] - } + } ch_multiqc_files.main.dump(tag: "MULTIQC files - main", pretty: true) ch_multiqc_files.library.dump(tag: "MULTIQC files - library", pretty: true) MULTIQC_MAIN( - ch_multiqc_files.main.collect().map{ files -> [[id: 'main'], files] }, + ch_multiqc_files.main.collect().map { files -> [[id: 'main'], files] }, ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), @@ -385,7 +395,7 @@ workflow PREPROCESSING { ) MULTIQC_LIBRARY( - ch_multiqc_files.library.transpose(by:1).groupTuple(), + ch_multiqc_files.library.transpose(by: 1).groupTuple(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), @@ -394,46 +404,46 @@ workflow PREPROCESSING { ) emit: - demultiplex_interop = BCL_DEMULTIPLEX.out.interop - demultiplex_reports = BCL_DEMULTIPLEX.out.reports - demultiplex_logs = BCL_DEMULTIPLEX.out.logs - demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other - fastp_json = FASTP.out.json - fastp_html = FASTP.out.html - crams = FASTQ_TO_CRAM.out.cram_crai - rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions - rna_junctions = FASTQ_TO_CRAM.out.rna_junctions - align_reports = FASTQ_TO_CRAM.out.align_reports - sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics - mosdepth_global = COVERAGE.out.mosdepth_global - mosdepth_summary = COVERAGE.out.mosdepth_summary - mosdepth_regions = COVERAGE.out.mosdepth_regions - mosdepth_per_base_d4 = COVERAGE.out.mosdepth_per_base_d4 - mosdepth_per_base_bed = COVERAGE.out.mosdepth_per_base_bed - mosdepth_per_base_csi = COVERAGE.out.mosdepth_per_base_csi - mosdepth_regions_bed = COVERAGE.out.mosdepth_regions_bed - mosdepth_regions_csi = COVERAGE.out.mosdepth_regions_csi - mosdepth_quantized_bed = COVERAGE.out.mosdepth_quantized_bed - mosdepth_quantized_csi = COVERAGE.out.mosdepth_quantized_csi - mosdepth_thresholds_bed = COVERAGE.out.mosdepth_thresholds_bed - mosdepth_thresholds_csi = COVERAGE.out.mosdepth_thresholds_csi - samtools_coverage = COVERAGE.out.samtools_coverage - panelcoverage = COVERAGE.out.panelcoverage - samtools_stats = BAM_QC.out.samtools_stats - samtools_flagstat = BAM_QC.out.samtools_flagstat - samtools_idxstats = BAM_QC.out.samtools_idxstats - picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics - picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf - picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics - picard_hsmetrics = BAM_QC.out.picard_hsmetrics - md5sums = MD5SUM.out.checksum - multiqc_main_report = MULTIQC_MAIN.out.report.toList() - multiqc_main_data = MULTIQC_MAIN.out.data.toList() - multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() - multiqc_library_report = MULTIQC_LIBRARY.out.report - multiqc_library_data = MULTIQC_LIBRARY.out.data - multiqc_library_plots = MULTIQC_LIBRARY.out.plots - versions = ch_versions + demultiplex_interop = BCL_DEMULTIPLEX.out.interop + demultiplex_reports = BCL_DEMULTIPLEX.out.reports + demultiplex_logs = BCL_DEMULTIPLEX.out.logs + demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other + fastp_json = FASTP.out.json + fastp_html = FASTP.out.html + crams = FASTQ_TO_CRAM.out.cram_crai + rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions + rna_junctions = FASTQ_TO_CRAM.out.rna_junctions + align_reports = FASTQ_TO_CRAM.out.align_reports + sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics + mosdepth_global = COVERAGE.out.mosdepth_global + mosdepth_summary = COVERAGE.out.mosdepth_summary + mosdepth_regions = COVERAGE.out.mosdepth_regions + mosdepth_per_base_d4 = COVERAGE.out.mosdepth_per_base_d4 + mosdepth_per_base_bed = COVERAGE.out.mosdepth_per_base_bed + mosdepth_per_base_csi = COVERAGE.out.mosdepth_per_base_csi + mosdepth_regions_bed = COVERAGE.out.mosdepth_regions_bed + mosdepth_regions_csi = COVERAGE.out.mosdepth_regions_csi + mosdepth_quantized_bed = COVERAGE.out.mosdepth_quantized_bed + mosdepth_quantized_csi = COVERAGE.out.mosdepth_quantized_csi + mosdepth_thresholds_bed = COVERAGE.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi = COVERAGE.out.mosdepth_thresholds_csi + samtools_coverage = COVERAGE.out.samtools_coverage + panelcoverage = COVERAGE.out.panelcoverage + samtools_stats = BAM_QC.out.samtools_stats + samtools_flagstat = BAM_QC.out.samtools_flagstat + samtools_idxstats = BAM_QC.out.samtools_idxstats + picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics + picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf + picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics + picard_hsmetrics = BAM_QC.out.picard_hsmetrics + md5sums = MD5SUM.out.checksum + multiqc_main_report = MULTIQC_MAIN.out.report.toList() + multiqc_main_data = MULTIQC_MAIN.out.data.toList() + multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() + multiqc_library_report = MULTIQC_LIBRARY.out.report + multiqc_library_data = MULTIQC_LIBRARY.out.data + multiqc_library_plots = MULTIQC_LIBRARY.out.plots + versions = ch_versions } /* From c672154501ebb44ec9d37c806c94fb11a9a12837 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 9 Feb 2026 19:00:53 +0100 Subject: [PATCH 143/202] fix tests --- conf/modules.config | 12 ++++++------ subworkflows/local/bam_qc/main.nf | 2 -- tests/subworkflows/local/bam_qc/main.nf.test | 6 ------ tests/workflows/preprocessing.nf.test | 18 +++--------------- 4 files changed, 9 insertions(+), 29 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 36734a8a..d0ac2fe6 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -32,11 +32,11 @@ process { ext.args = { [ params.split_fastq > 0 ? "--split_by_lines ${params.split_fastq * 4}" : '', - params.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", - params.trim_front > 0 ? "--trim_front1 ${params.trim_front}" : "", - params.trim_tail > 0 ? "--trim_tail1 ${params.trim_tail}" : "", - params.adapter_R1 ? "--adapter_sequence ${params.adapter_R1}" : "", - params.adapter_R2 ? "--adapter_sequence_r2 ${params.adapter_R2}" : "", + meta.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", + meta.trim_front > 0 ? "--trim_front1 ${meta.trim_front}" : "", + meta.trim_tail > 0 ? "--trim_tail1 ${meta.trim_tail}" : "", + meta.adapter_R1 ? "--adapter_sequence ${meta.adapter_R1}" : "", + meta.adapter_R2 ? "--adapter_sequence_r2 ${meta.adapter_R2}" : "", "--compression 1", ].join(" ").trim() } @@ -184,7 +184,7 @@ process { "-s", "--json", "-d 2500", - params.umi_aware ? "--barcode-name" : "", + meta.umi_aware ? "--barcode-name" : "", "--write-index", "--output-fmt cram,version=3.0", "--output-fmt-option archive", diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index 37ef16a7..6eb6a0ea 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -22,8 +22,6 @@ workflow BAM_QC { .set { ch_bam_bai_fasta_fai } SAMTOOLS_STATS(ch_bam_bai_fasta_fai) - ch_versions = ch_versions.mix(SAMTOOLS_STATS.out.versions.first()) - SAMTOOLS_FLAGSTAT(ch_bam_bai_fasta_fai) ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions.first()) diff --git a/tests/subworkflows/local/bam_qc/main.nf.test b/tests/subworkflows/local/bam_qc/main.nf.test index 90e3c564..8cd0106b 100644 --- a/tests/subworkflows/local/bam_qc/main.nf.test +++ b/tests/subworkflows/local/bam_qc/main.nf.test @@ -23,8 +23,6 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", checkIfExists: true), ]) - // boolean - input[1] = false """ } } @@ -57,8 +55,6 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", checkIfExists: true), ]) - // boolean - input[1] = false """ } } @@ -90,8 +86,6 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict", checkIfExists: true), ]) - // boolean - input[1] = true """ } } diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index 45c0fba2..fdcd70ec 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -44,11 +44,7 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] - // markdup - input[2] = "bamsormadup" - // roi - input[3] = "https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed" - input[4] = null + input[2] = null """ } } @@ -115,11 +111,7 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] - // markdup - input[2] = "bamsormadup" - // roi - input[3] = "" - input[4] = null + input[2] = null """ } } @@ -189,11 +181,7 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] - // markdup - input[2] = "bamsormadup" - // roi - input[3] = "https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed" - input[4] = null + input[2] = null """ } } From f723b97b4cb1de477b2e9fa415e945b602587af7 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 07:17:05 +0100 Subject: [PATCH 144/202] fix linting --- modules.json | 4 ++-- .../nf-core/samtools/sormadup/samtools-sormadup.diff | 12 +++++++++++- subworkflows/nf-core/utils_nfschema_plugin/main.nf | 2 +- .../utils_nfschema_plugin/tests/nextflow.config | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/modules.json b/modules.json index 0b710f92..037ebfe4 100644 --- a/modules.json +++ b/modules.json @@ -170,12 +170,12 @@ }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "df4d1c8cdee98a1bbbed8fc51e82296568e0f9c1", + "git_sha": "65f5e638d901a51534c68fd5c1c19e8112fb4df1", "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", "installed_by": ["subworkflows"] } } diff --git a/modules/nf-core/samtools/sormadup/samtools-sormadup.diff b/modules/nf-core/samtools/sormadup/samtools-sormadup.diff index 1e13bac8..e5a640be 100644 --- a/modules/nf-core/samtools/sormadup/samtools-sormadup.diff +++ b/modules/nf-core/samtools/sormadup/samtools-sormadup.diff @@ -14,7 +14,17 @@ Changes in 'samtools/sormadup/main.nf': output: tuple val(meta), path("*.bam") , emit: bam, optional: true -@@ -64,7 +63,6 @@ +@@ -33,9 +32,6 @@ + args5.contains("--output-fmt cram") ? "cram" : + "bam" + def reference = fasta ? "--reference ${fasta}" : "" +- // memory per thread for samtools sort +- // set to 50% of the memory per thread, but at least 768M (samtools default) +- def sort_memory = Math.max(768,(task.memory.mega/task.cpus*0.50).intValue()) + + """ + samtools cat \\ +@@ -64,7 +60,6 @@ -u \\ -T ${prefix}.sort \\ --threads $task.cpus \\ diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf index acb39724..1df8b76f 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/main.nf +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -38,7 +38,7 @@ workflow UTILS_NFSCHEMA_PLUGIN { } log.info paramsHelp( help_options, - params.help instanceof String ? params.help : "", + (params.help instanceof String && params.help != "true") ? params.help : "", ) exit 0 } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config index 8d8c7371..f6537cc3 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -1,5 +1,5 @@ plugins { - id "nf-schema@2.5.1" + id "nf-schema@2.6.1" } validation { From e479866d171034926da16c7abda822068b48c644 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 07:26:46 +0100 Subject: [PATCH 145/202] fix fq_to_aligned cram test --- .../local/fastq_to_aligned_cram/main.nf.test | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test index 9a7a9eb3..549854ff 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test @@ -19,6 +19,7 @@ nextflow_workflow { samplename:'test', single_end:false, sample_type:'DNA', + markdup: "bamsormadup", genome_data: [ fasta: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", fai: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" @@ -33,8 +34,6 @@ nextflow_workflow { file("s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna"), [] ]) - // markdup - input[1] = "bamsormadup" """ } } @@ -62,6 +61,7 @@ nextflow_workflow { samplename:'test', single_end:false, sample_type:'RNA', + markdup: "bamsormadup", genome_data: [ fasta: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", fai: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", @@ -77,8 +77,6 @@ nextflow_workflow { file("s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna"), [] ]) - // markdup - input[1] = "bamsormadup" """ } } @@ -102,10 +100,11 @@ nextflow_workflow { // [meta, [fq_1,fq_2], aligner, index, fasta] input[0] = Channel.of([ [ - id:'test', - samplename:'test', - single_end:false, - sample_type:'DNA', + id: "test", + samplename: "test", + single_end: false, + sample_type: "DNA", + markdup: "samtools", genome_data: [ fasta: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", fai: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" @@ -120,8 +119,6 @@ nextflow_workflow { file("s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna"), [] ]) - // markdup - input[1] = "samtools" """ } } @@ -145,10 +142,11 @@ nextflow_workflow { // [meta, [fq_1,fq_2], aligner, index, fasta] input[0] = Channel.of([ [ - id:'test', - samplename:'test', - single_end:false, - sample_type:'DNA', + id: "test", + samplename: "test", + single_end: false, + sample_type: "DNA", + markdup: "false", genome_data: [ fasta: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", fai: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" @@ -163,8 +161,6 @@ nextflow_workflow { file("s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna"), [] ]) - // markdup - input[1] = "false" """ } } @@ -189,10 +185,11 @@ nextflow_workflow { // [meta, [fq_1,fq_2], aligner, index, fasta] input[0] = Channel.of([ [ - id:'test', - samplename:'test', - single_end:false, - sample_type:'DNA', + id: "test", + samplename: "test", + single_end: false, + sample_type: "DNA", + markdup: "false", genome_data: [ fasta: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", fai: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" @@ -207,8 +204,6 @@ nextflow_workflow { file("s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna"), [] ]) - // markdup - input[1] = "false" """ } } From 1472bc59105f17c27746d38b2d59934743b36911 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 07:34:25 +0100 Subject: [PATCH 146/202] fix preprocessing test inputs --- tests/workflows/preprocessing.nf.test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index fdcd70ec..f31029f4 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -23,6 +23,7 @@ nextflow_workflow { tag: "WES", sample_type: "DNA", aligner: "bwamem", + markdup: "bamsormadup" ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -90,6 +91,7 @@ nextflow_workflow { tag: "WGS", sample_type: "DNA", aligner: "bwamem", + markdup: "bamsormadup" ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -160,6 +162,7 @@ nextflow_workflow { tag: "WES", sample_type: "DNA", aligner: "bwamem", + markdup: "bamsormadup" ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), From bdd54c17b56e0bf76149c6a290899f8d098f8925 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 09:37:45 +0100 Subject: [PATCH 147/202] update snapshot --- .../fastq_to_aligned_cram/main.nf.test.snap | 72 +++++++++++-------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index aabf04cd..5db51b5f 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -3,7 +3,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -15,6 +15,7 @@ "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" }, "id": "test", + "markdup": "false", "sample_type": "DNA", "samplename": "test", "single_end": false @@ -25,13 +26,13 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ - + ], "versions": [ "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", @@ -40,16 +41,16 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-12-17T14:52:18.252297311" + "timestamp": "2026-02-10T09:29:24.149695" }, "fastq to cram - bwa - bamsormadup": { "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -61,6 +62,7 @@ "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" }, "id": "test", + "markdup": "bamsormadup", "sample_type": "DNA", "samplename": "test", "single_end": false @@ -71,10 +73,10 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ [ @@ -85,6 +87,7 @@ "samplename": "test", "single_end": false, "sample_type": "DNA", + "markdup": "bamsormadup", "genome_data": { "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" @@ -103,16 +106,16 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-12-17T14:46:54.525880067" + "timestamp": "2026-02-10T09:24:26.615795" }, "fastq to cram - bwa - samtools sormadup": { "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -124,6 +127,7 @@ "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" }, "id": "test", + "markdup": "samtools", "sample_type": "DNA", "samplename": "test", "single_end": false @@ -134,10 +138,10 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ [ @@ -148,6 +152,7 @@ "samplename": "test", "single_end": false, "sample_type": "DNA", + "markdup": "samtools", "genome_data": { "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" @@ -165,16 +170,16 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-12-17T14:50:28.614932101" + "timestamp": "2026-02-10T09:27:45.908866" }, "fastq to cram - star - bamsormadup": { "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -187,6 +192,7 @@ "star": "s3://test-data/genomics/homo_sapiens/genome/star/" }, "id": "test", + "markdup": "bamsormadup", "sample_type": "RNA", "samplename": "test", "single_end": false @@ -205,6 +211,7 @@ "samplename": "test", "single_end": false, "sample_type": "RNA", + "markdup": "bamsormadup", "genome_data": { "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", @@ -224,6 +231,7 @@ "samplename": "test", "single_end": false, "sample_type": "RNA", + "markdup": "bamsormadup", "genome_data": { "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", @@ -243,6 +251,7 @@ "samplename": "test", "single_end": false, "sample_type": "RNA", + "markdup": "bamsormadup", "genome_data": { "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna", "fai": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai", @@ -260,16 +269,16 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-12-17T16:27:53.162318921" + "timestamp": "2026-02-10T09:26:55.879993" }, "fastq to cram - bwa - samtools sort": { "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -281,6 +290,7 @@ "fasta": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" }, "id": "test", + "markdup": "false", "sample_type": "DNA", "samplename": "test", "single_end": false @@ -291,13 +301,13 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ - + ], "versions": [ "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", @@ -306,9 +316,9 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-12-17T14:51:22.925873858" + "timestamp": "2026-02-10T09:28:34.042629" } -} +} \ No newline at end of file From 3ded077caa9e110d7f67de6c838b26e7be3ccc14 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 09:49:21 +0100 Subject: [PATCH 148/202] update snapshot --- tests/subworkflows/local/fastq_align_rna/main.nf.test.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap index 2cd3d63c..cf11ffe9 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap @@ -119,4 +119,4 @@ }, "timestamp": "2024-05-28T16:17:08.089796673" } -} +} \ No newline at end of file From 71c8972a0061936c08e76169a737acfa77bf19b5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 09:57:01 +0100 Subject: [PATCH 149/202] fix roi default --- assets/schema_input.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index 59ee5046..f656f58f 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -101,7 +101,7 @@ "format": "file-path", "description": "Region of interest BED file for coverage analysis", "pattern": "^\\S+\\.bed$", - "default": null + "default": "[]" }, "tag": { "meta": ["tag"], From 0b4e4bd735dd75174b08c87d6e254867ae44171b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:24:01 +0100 Subject: [PATCH 150/202] nextflow lint entire pipeline --- assets/schema_input.json | 2 +- conf/base.config | 38 +- conf/modules.config | 60 +-- conf/test_full.config | 4 +- main.nf | 432 +++++++++++------- nextflow.config | 252 +++++----- nf-test.config | 12 +- subworkflows/local/bam_qc/main.nf | 43 +- subworkflows/local/coverage/main.nf | 32 +- subworkflows/local/fastq_align_rna/main.nf | 19 +- .../local/fastq_to_aligned_cram/main.nf | 23 +- .../main.nf | 91 ++-- tests/inputs/fastq.yml | 2 + tests/inputs/fastq_rna.yml | 2 + workflows/preprocessing.nf | 4 +- 15 files changed, 550 insertions(+), 466 deletions(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index f656f58f..59ee5046 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -101,7 +101,7 @@ "format": "file-path", "description": "Region of interest BED file for coverage analysis", "pattern": "^\\S+\\.bed$", - "default": "[]" + "default": null }, "tag": { "meta": ["tag"], diff --git a/conf/base.config b/conf/base.config index ff798214..ac353851 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,41 +10,41 @@ process { - cpus = { 1 * task.attempt } - memory = { 8.GB * task.attempt } - time = { 4.h * task.attempt } + cpus = { 1 * task.attempt } + memory = { 8.GB * task.attempt } + time = { 4.h * task.attempt } errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006) ? 'retry' : 'finish' } maxRetries = 3 maxErrors = '-1' // Process-specific resource requirements - withLabel:process_single { - cpus = { 1 } + withLabel: process_single { + cpus = { 1 } memory = { 8.GB * task.attempt } - time = { 4.h * task.attempt } + time = { 4.h * task.attempt } } - withLabel:process_low { - cpus = { 2 * task.attempt } + withLabel: process_low { + cpus = { 2 * task.attempt } memory = { 16.GB * task.attempt } - time = { 4.h * task.attempt } + time = { 4.h * task.attempt } } - withLabel:process_medium { - cpus = { 8 * task.attempt } + withLabel: process_medium { + cpus = { 8 * task.attempt } memory = { 64.GB * task.attempt } - time = { 8.h * task.attempt } + time = { 8.h * task.attempt } } - withLabel:process_high { - cpus = { 16 * task.attempt } + withLabel: process_high { + cpus = { 16 * task.attempt } memory = { 128.GB * task.attempt } - time = { 16.h * task.attempt } + time = { 16.h * task.attempt } } - withLabel:process_long { - time = { 20.h * task.attempt } + withLabel: process_long { + time = { 20.h * task.attempt } } - withLabel:error_ignore { + withLabel: error_ignore { errorStrategy = 'ignore' } - withLabel:error_retry { + withLabel: error_retry { errorStrategy = 'retry' maxRetries = 2 } diff --git a/conf/modules.config b/conf/modules.config index d0ac2fe6..16f7338f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -14,9 +14,9 @@ process { // BCL convert withName: '.*BCL_DEMULTIPLEX:BCLCONVERT' { - cpus = 16 - memory = { 64.GB * task.attempt } - ext.args = { + cpus = 16 + memory = { 64.GB * task.attempt } + ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", "--force", @@ -27,16 +27,16 @@ process { // FastP withName: '.*FASTP' { - cpus = 4 - memory = { 4.GB * task.attempt } - ext.args = { + cpus = 4 + memory = { 4.GB * task.attempt } + ext.args = { [ - params.split_fastq > 0 ? "--split_by_lines ${params.split_fastq * 4}" : '', - meta.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", - meta.trim_front > 0 ? "--trim_front1 ${meta.trim_front}" : "", - meta.trim_tail > 0 ? "--trim_tail1 ${meta.trim_tail}" : "", - meta.adapter_R1 ? "--adapter_sequence ${meta.adapter_R1}" : "", - meta.adapter_R2 ? "--adapter_sequence_r2 ${meta.adapter_R2}" : "", + params.split_fastq > 0 ? "--split_by_lines ${params.split_fastq * 4}" : '', + meta.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", + meta.trim_front > 0 ? "--trim_front1 ${meta.trim_front}" : "", + meta.trim_tail > 0 ? "--trim_tail1 ${meta.trim_tail}" : "", + meta.adapter_R1 ? "--adapter_sequence ${meta.adapter_R1}" : "", + meta.adapter_R2 ? "--adapter_sequence_r2 ${meta.adapter_R2}" : "", "--compression 1", ].join(" ").trim() } @@ -57,7 +57,7 @@ process { withName: '.*FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { cpus = 16 memory = 32.GB - ext.args = { + ext.args = { [ "--local", "--fast-local", @@ -65,7 +65,7 @@ process { meta.readgroup ? "--rg " + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join(" --rg ") : "", ].join(" ").trim() } - ext.args2 = "--fast" + ext.args2 = "--fast" } //// BWA mem/BWA mem2 @@ -107,8 +107,8 @@ process { //// SNAP withName: '.*FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { - cpus = 16 - memory = 64.GB + cpus = 16 + memory = 64.GB ext.args = { [ "-b-", @@ -125,8 +125,8 @@ process { //// STROBEALIGN withName: '.*FASTQ_ALIGN_DNA:STROBEALIGN' { - cpus = 16 - memory = 32.GB + cpus = 16 + memory = 32.GB ext.args = { [ meta.readgroup ? "--rg-id ${meta.readgroup.ID}" : "", @@ -139,9 +139,9 @@ process { //// STAR withName: '.*FASTQ_ALIGN_RNA:STAR_ALIGN' { ext.prefix = { "${meta.id}.star" } - cpus = 16 - memory = 64.GB - ext.args = { + cpus = 16 + memory = 64.GB + ext.args = { [ "--readFilesCommand gunzip -c", "--twopassMode Basic", @@ -222,9 +222,9 @@ process { //// Samtools convert withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' { - cpus = 8 - memory = 8.GB - ext.args = { + cpus = 8 + memory = 8.GB + ext.args = { [ "-C", "--output-fmt cram,version=3.0", @@ -247,15 +247,15 @@ process { //// Samtools coverage withName: '.*COVERAGE:SAMTOOLS_COVERAGE' { - cpus = 1 - memory = 1.GB + cpus = 1 + memory = 1.GB ext.prefix = { "${meta.id}.coverage" } } // QC withName: '.*BAM_QC:SAMTOOLS_.*$' { - cpus = 1 + cpus = 1 memory = 1.GB } @@ -267,15 +267,15 @@ process { } withName: '.*MD5SUM' { - cpus = 1 + cpus = 1 memory = 128.MB } // MultiQC withName: '.*MULTIQC_.*$' { container = "cmgg/multiqc_cmgg:0.0.2-multiqc-v1.33" - cpus = 1 - memory = 4.GB + cpus = 1 + memory = 4.GB } withName: '.*MULTIQC_MAIN' { ext.prefix = { params.multiqc_title ? params.multiqc_title : "multiqc" } diff --git a/conf/test_full.config b/conf/test_full.config index 6225119a..bad1c6f1 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -17,8 +17,8 @@ params { // Input data for full size test // TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA) // TODO nf-core: Give any required params for the test so that command line flags are not needed - input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' // Genome references - genome = 'R64-1-1' + genome = 'R64-1-1' } diff --git a/main.nf b/main.nf index 305e0e6b..f9ce7868 100644 --- a/main.nf +++ b/main.nf @@ -62,185 +62,263 @@ workflow { ) publish: - demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by:1) - demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by:1) - demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by:1) - demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() - fastp_json = PREPROCESSING.out.fastp_json - fastp_html = PREPROCESSING.out.fastp_html - crams = PREPROCESSING.out.crams - rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions - rna_junctions = PREPROCESSING.out.rna_junctions - align_reports = PREPROCESSING.out.align_reports - sormadup_metrics = PREPROCESSING.out.sormadup_metrics - mosdepth_global = PREPROCESSING.out.mosdepth_global - mosdepth_summary = PREPROCESSING.out.mosdepth_summary - mosdepth_regions = PREPROCESSING.out.mosdepth_regions - mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 - mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed - mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi - mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed - mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi - mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed - mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi - mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed - mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi - samtools_coverage = PREPROCESSING.out.samtools_coverage - panelcoverage = PREPROCESSING.out.panelcoverage - samtools_stats = PREPROCESSING.out.samtools_stats - samtools_flagstat = PREPROCESSING.out.samtools_flagstat - samtools_idxstats = PREPROCESSING.out.samtools_idxstats - picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics + demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by: 1) + demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by: 1) + demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by: 1) + demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() + fastp_json = PREPROCESSING.out.fastp_json + fastp_html = PREPROCESSING.out.fastp_html + crams = PREPROCESSING.out.crams + rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions + rna_junctions = PREPROCESSING.out.rna_junctions + align_reports = PREPROCESSING.out.align_reports + sormadup_metrics = PREPROCESSING.out.sormadup_metrics + mosdepth_global = PREPROCESSING.out.mosdepth_global + mosdepth_summary = PREPROCESSING.out.mosdepth_summary + mosdepth_regions = PREPROCESSING.out.mosdepth_regions + mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 + mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed + mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi + mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed + mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi + mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed + mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi + mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi + samtools_coverage = PREPROCESSING.out.samtools_coverage + panelcoverage = PREPROCESSING.out.panelcoverage + samtools_stats = PREPROCESSING.out.samtools_stats + samtools_flagstat = PREPROCESSING.out.samtools_flagstat + samtools_idxstats = PREPROCESSING.out.samtools_idxstats + picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics picard_multiplemetrics_pdf = PREPROCESSING.out.picard_multiplemetrics_pdf - picard_wgsmetrics = PREPROCESSING.out.picard_wgsmetrics - picard_hsmetrics = PREPROCESSING.out.picard_hsmetrics - md5sums = PREPROCESSING.out.md5sums - multiqc_main_report = PREPROCESSING.out.multiqc_main_report - multiqc_main_data = PREPROCESSING.out.multiqc_main_data - multiqc_main_plots = PREPROCESSING.out.multiqc_main_plots - multiqc_library_report = PREPROCESSING.out.multiqc_library_report - multiqc_library_data = PREPROCESSING.out.multiqc_library_data - multiqc_library_plots = PREPROCESSING.out.multiqc_library_plots + picard_wgsmetrics = PREPROCESSING.out.picard_wgsmetrics + picard_hsmetrics = PREPROCESSING.out.picard_hsmetrics + md5sums = PREPROCESSING.out.md5sums + multiqc_main_report = PREPROCESSING.out.multiqc_main_report + multiqc_main_data = PREPROCESSING.out.multiqc_main_data + multiqc_main_plots = PREPROCESSING.out.multiqc_main_plots + multiqc_library_report = PREPROCESSING.out.multiqc_library_report + multiqc_library_data = PREPROCESSING.out.multiqc_library_data + multiqc_library_plots = PREPROCESSING.out.multiqc_library_plots } output { - demultiplex_interop { path { _meta, bin -> - bin >> "Interop/${bin.name}" - } } - demultiplex_reports { path { meta, report -> - def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" - report >> out_path - } } - demultiplex_logs { path { meta, log -> - def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" - log >> out_path - } } - demultiplex_fastq { path { meta, fastq -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" - fastq >> out_path - } } - fastp_json { path { meta, json -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" - json >> out_path - } } - fastp_html { path { meta, html -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" - html >> out_path - } } - crams { path { meta, cram, crai -> - def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" - def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" - cram >> out_cram - crai >> out_crai - } } - rna_splice_junctions { path { meta, sjt -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" - sjt >> out_path - } } - rna_junctions { path { meta, junctions -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" - junctions >> out_path - } } - align_reports { path { meta, log -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" - log >> out_path - } } - sormadup_metrics { path { meta, metrics -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" - metrics >> out_path - } } - mosdepth_global { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_summary { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_d4 { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_quantized_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_quantized_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_thresholds_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_thresholds_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_coverage { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - panelcoverage { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_stats { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_flagstat { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_idxstats { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_multiplemetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_multiplemetrics_pdf { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_wgsmetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_hsmetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - md5sums { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - multiqc_main_report { path "multiqc/" } - multiqc_main_data { path "multiqc/" } - multiqc_main_plots { path "multiqc/" } - multiqc_library_report { path "multiqc/" } - multiqc_library_data { path "multiqc/" } - multiqc_library_plots { path "multiqc/" } + demultiplex_interop { + path { _meta, bin -> + bin >> "Interop/${bin.name}" + } + } + demultiplex_reports { + path { meta, report -> + def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" + report >> out_path + } + } + demultiplex_logs { + path { meta, log -> + def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" + log >> out_path + } + } + demultiplex_fastq { + path { meta, fastq -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" + fastq >> out_path + } + } + fastp_json { + path { meta, json -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" + json >> out_path + } + } + fastp_html { + path { meta, html -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path + } + } + crams { + path { meta, cram, crai -> + def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" + def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" + cram >> out_cram + crai >> out_crai + } + } + rna_splice_junctions { + path { meta, sjt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" + sjt >> out_path + } + } + rna_junctions { + path { meta, junctions -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" + junctions >> out_path + } + } + align_reports { + path { meta, log -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" + log >> out_path + } + } + sormadup_metrics { + path { meta, metrics -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" + metrics >> out_path + } + } + mosdepth_global { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_summary { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_d4 { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_quantized_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_quantized_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_thresholds_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_thresholds_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_coverage { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + panelcoverage { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_stats { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_flagstat { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_idxstats { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_multiplemetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_multiplemetrics_pdf { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_wgsmetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_hsmetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + md5sums { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + multiqc_main_report { + path "multiqc/" + } + multiqc_main_data { + path "multiqc/" + } + multiqc_main_plots { + path "multiqc/" + } + multiqc_library_report { + path "multiqc/" + } + multiqc_library_data { + path "multiqc/" + } + multiqc_library_plots { + path "multiqc/" + } } diff --git a/nextflow.config b/nextflow.config index 30835d39..05719293 100644 --- a/nextflow.config +++ b/nextflow.config @@ -10,47 +10,47 @@ params { // Input options - input = null + input = null // References - genome = null - igenomes_base = '/references/' - igenomes_ignore = false + genome = null + igenomes_base = '/references/' + igenomes_ignore = false // Analysis options - split_fastq = 100000000 - genelists = null + split_fastq = 100000000 + genelists = null // MultiQC options - multiqc_config = null - multiqc_title = null - multiqc_logo = null - max_multiqc_email_size = '25.MB' - multiqc_methods_description = null + multiqc_config = null + multiqc_title = null + multiqc_logo = null + max_multiqc_email_size = '25.MB' + multiqc_methods_description = null // Boilerplate options - outdir = null - publish_dir_mode = 'copy' - email = null - email_on_fail = null - plaintext_email = false - monochrome_logs = false - hook_url = System.getenv('HOOK_URL') - help = false - help_full = false - show_hidden = false - version = false - pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' - trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') + outdir = null + publish_dir_mode = 'copy' + email = null + email_on_fail = null + plaintext_email = false + monochrome_logs = false + hook_url = System.getenv('HOOK_URL') + help = false + help_full = false + show_hidden = false + version = false + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' + trace_report_suffix = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') // Config options - config_profile_name = null - config_profile_description = null + config_profile_name = null + config_profile_description = null - custom_config_version = 'master' - custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" - config_profile_contact = null - config_profile_url = null + custom_config_version = 'master' + custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" + config_profile_contact = null + config_profile_url = null // CMGG Config options cmgg_config_profile_name = null @@ -62,7 +62,7 @@ params { cmgg_config_profile_url = null // Schema validation default options - validate_params = true + validate_params = true } // Load base.config by default for all pipelines @@ -73,40 +73,40 @@ includeConfig !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ profiles { debug { - dumpHashes = true - process.beforeScript = 'echo $HOSTNAME' - cleanup = false + dumpHashes = true + process.beforeScript = 'echo $HOSTNAME' + cleanup = false nextflow.enable.configProcessNamesValidation = true } conda { - conda.enabled = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - conda.channels = ['conda-forge', 'bioconda'] - apptainer.enabled = false + conda.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + conda.channels = ['conda-forge', 'bioconda'] + apptainer.enabled = false } mamba { - conda.enabled = true - conda.useMamba = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + conda.enabled = true + conda.useMamba = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } docker { - docker.enabled = true - conda.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false - docker.runOptions = '-u $(id -u):$(id -g)' + docker.enabled = true + conda.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + docker.runOptions = '-u $(id -u):$(id -g)' } arm64 { process.arch = 'arm64' @@ -120,54 +120,54 @@ profiles { wave.strategy = 'conda,container' } emulate_amd64 { - docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' + docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { - singularity.enabled = true - singularity.autoMounts = true - conda.enabled = false - docker.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + singularity.enabled = true + singularity.autoMounts = true + conda.enabled = false + docker.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } podman { - podman.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + podman.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } shifter { - shifter.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + shifter.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } charliecloud { - charliecloud.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - apptainer.enabled = false + charliecloud.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + apptainer.enabled = false } apptainer { - apptainer.enabled = true - apptainer.autoMounts = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false + apptainer.enabled = true + apptainer.autoMounts = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false } wave { apptainer.ociAutoPull = true @@ -177,12 +177,16 @@ profiles { wave.strategy = 'conda,container' } gpu { - docker.runOptions = '-u $(id -u):$(id -g) --gpus all' - apptainer.runOptions = '--nv' - singularity.runOptions = '--nv' + docker.runOptions = '-u $(id -u):$(id -g) --gpus all' + apptainer.runOptions = '--nv' + singularity.runOptions = '--nv' + } + test { + includeConfig 'conf/test.config' + } + test_full { + includeConfig 'conf/test_full.config' } - test { includeConfig 'conf/test.config' } - test_full { includeConfig 'conf/test_full.config' } } // Load nf-core custom profiles from different institutions @@ -202,10 +206,10 @@ includeConfig params.cmgg_custom_config_base && (!System.getenv('NXF_OFFLINE') | // Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile // Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled // Set to your registry if you have a mirror of containers -apptainer.registry = 'quay.io' -docker.registry = 'quay.io' -podman.registry = 'quay.io' -singularity.registry = 'quay.io' +apptainer.registry = 'quay.io' +docker.registry = 'quay.io' +podman.registry = 'quay.io' +singularity.registry = 'quay.io' charliecloud.registry = 'quay.io' // Export these variables to prevent local Python/R libraries from conflicting with those in the container @@ -222,35 +226,35 @@ env { // Set bash options process.shell = [ "bash", - "-C", // No clobber - prevent output redirection from overwriting files. - "-e", // Exit if a tool returns a non-zero status/exit code - "-u", // Treat unset variables and parameters as an error - "-o", // Returns the status of the last command to exit.. - "pipefail" // ..with a non-zero status or zero if all successfully execute + "-C", + "-e", + "-u", + "-o", + "pipefail", ] // Disable process selector warnings by default. Use debug profile to enable warnings. nextflow.enable.configProcessNamesValidation = false timeline { - enabled = true + enabled = true overwrite = true - file = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html" + file = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html" } report { - enabled = true + enabled = true overwrite = true - file = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html" + file = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html" } trace { - enabled = true + enabled = true overwrite = true - file = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt" + file = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt" } dag { - enabled = true + enabled = true overwrite = true - file = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html" + file = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html" } manifest { @@ -261,16 +265,16 @@ manifest { affiliation: 'Center for Medical Genetics Ghent, Ghent University, Belgium', email: 'matthias.desmet@ugent.be', github: '@matthdsm', - contribution: ["author","maintainer"], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: 'https://orcid.org/0000-0003-2555-3114' + contribution: ["author", "maintainer"], + orcid: 'https://orcid.org/0000-0003-2555-3114', ], [ name: ' Nicolas Vannieuwkerke', affiliation: 'Center for Medical Genetics Ghent, Ghent University Hospital, Belgium', email: 'nicolas.vannieuwkerke@ugent.be', github: '@nvnieuwk', - contribution: ["maintainer"], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: 'https://orcid.org/0009-0003-5619-1555' + contribution: ["maintainer"], + orcid: 'https://orcid.org/0009-0003-5619-1555', ], ] homePage = 'https://github.com/nf-cmgg/preprocessing' @@ -284,12 +288,12 @@ manifest { // Nextflow plugins plugins { - id 'nf-schema@2.6.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-schema@2.6.1' } validation { defaultIgnoreParams = ["genomes"] - monochromeLogs = params.monochrome_logs + monochromeLogs = params.monochrome_logs } // Load modules.config for DSL2 module specific options diff --git a/nf-test.config b/nf-test.config index fa368ccb..c5d343b4 100644 --- a/nf-test.config +++ b/nf-test.config @@ -1,21 +1,21 @@ config { // location for all nf-test tests - testsDir "." + testsDir = "." // nf-test directory including temporary files for each test - workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + workDir = System.getenv("NFT_WORKDIR") ?: ".nf-test" // location of an optional nextflow.config file specific for executing tests - configFile "tests/nextflow.config" + configFile = "tests/nextflow.config" // ignore tests coming from the nf-core/modules repo - ignore 'modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*' + ignore = ['modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*'] // run all test with defined profile(s) from the main nextflow.config - profile "test" + profile = "test" // list of filenames or patterns that should be trigger a full test run - triggers 'nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore' + triggers = ['nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore'] // load the necessary plugins plugins { diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index 6eb6a0ea..ba8f4b5f 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -16,10 +16,10 @@ workflow BAM_QC { ch_versions = channel.empty() ch_bam_bai_roi_fasta_fai_dict - .map { meta, bam, bai, _roi, fasta, fai, _dict -> - return [meta, bam, bai, fasta, fai] - } - .set { ch_bam_bai_fasta_fai } + .map { meta, bam, bai, _roi, fasta, fai, _dict -> + return [meta, bam, bai, fasta, fai] + } + .set { ch_bam_bai_fasta_fai } SAMTOOLS_STATS(ch_bam_bai_fasta_fai) SAMTOOLS_FLAGSTAT(ch_bam_bai_fasta_fai) @@ -34,10 +34,10 @@ workflow BAM_QC { ch_picard_wgsmetrics = channel.empty() ch_bam_bai_roi_fasta_fai_dict - .filter { meta, _bam, _bai, _roi, _fasta, _fai, _dict -> - meta.disable_picard_metrics != true - } - .set { ch_picard } + .filter { meta, _bam, _bai, _roi, _fasta, _fai, _dict -> + meta.disable_picard_metrics != true + } + .set { ch_picard } PICARD_COLLECTMULTIPLEMETRICS(ch_picard) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) @@ -45,13 +45,13 @@ workflow BAM_QC { ch_picard_multiplemetrics_pdf = PICARD_COLLECTMULTIPLEMETRICS.out.pdf ch_picard - .branch { meta, bam, bai, roi, fasta, fai, dict -> - hsmetrics: roi != [] + .branch { meta, bam, bai, roi, fasta, fai, dict -> + hsmetrics: roi != [] return [meta, bam, bai, roi, fasta, fai, dict] - wgsmetrics: roi == [] + wgsmetrics: roi == [] return [meta, bam, bai, fasta, fai, dict] - } - .set { ch_picard_coverage } + } + .set { ch_picard_coverage } PICARD_COLLECTWGSMETRICS(ch_picard_coverage.wgsmetrics, []) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) @@ -61,14 +61,13 @@ workflow BAM_QC { ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) ch_picard_hsmetrics = PICARD_COLLECTHSMETRICS.out.metrics - emit: - samtools_stats = SAMTOOLS_STATS.out.stats - samtools_flagstat = SAMTOOLS_FLAGSTAT.out.flagstat - samtools_idxstats = SAMTOOLS_IDXSTATS.out.idxstats - picard_multiplemetrics = ch_picard_multiplemetrics - picard_multiplemetrics_pdf = ch_picard_multiplemetrics_pdf - picard_wgsmetrics = ch_picard_wgsmetrics - picard_hsmetrics = ch_picard_hsmetrics - versions = ch_versions + samtools_stats = SAMTOOLS_STATS.out.stats + samtools_flagstat = SAMTOOLS_FLAGSTAT.out.flagstat + samtools_idxstats = SAMTOOLS_IDXSTATS.out.idxstats + picard_multiplemetrics = ch_picard_multiplemetrics + picard_multiplemetrics_pdf = ch_picard_multiplemetrics_pdf + picard_wgsmetrics = ch_picard_wgsmetrics + picard_hsmetrics = ch_picard_hsmetrics + versions = ch_versions } diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 27a19c43..501b0773 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -8,7 +8,7 @@ include { PANELCOVERAGE } from "../../../modules/local/panelcoverage/main" workflow COVERAGE { take: ch_meta_cram_crai_fasta_fai_roi // channel: [mandatory] [meta, cram, crai, fasta, fai, roi] - ch_genelists // channel: [optional] [genelists] + ch_genelists // channel: [optional] [genelists] main: @@ -56,19 +56,19 @@ workflow COVERAGE { ch_coverageqc_files = ch_coverageqc_files.mix(PANELCOVERAGE.out.regiondist) emit: - mosdepth_global = MOSDEPTH.out.global_txt - mosdepth_summary = MOSDEPTH.out.summary_txt - mosdepth_regions = MOSDEPTH.out.regions_txt - mosdepth_per_base_d4 = MOSDEPTH.out.per_base_d4 - mosdepth_per_base_bed = MOSDEPTH.out.per_base_bed - mosdepth_per_base_csi = MOSDEPTH.out.per_base_csi - mosdepth_regions_bed = MOSDEPTH.out.regions_bed - mosdepth_regions_csi = MOSDEPTH.out.regions_csi - mosdepth_quantized_bed = MOSDEPTH.out.quantized_bed - mosdepth_quantized_csi = MOSDEPTH.out.quantized_csi - mosdepth_thresholds_bed = MOSDEPTH.out.thresholds_bed - mosdepth_thresholds_csi = MOSDEPTH.out.thresholds_csi - samtools_coverage = SAMTOOLS_COVERAGE.out.coverage - panelcoverage = PANELCOVERAGE.out.regiondist - versions = ch_versions + mosdepth_global = MOSDEPTH.out.global_txt + mosdepth_summary = MOSDEPTH.out.summary_txt + mosdepth_regions = MOSDEPTH.out.regions_txt + mosdepth_per_base_d4 = MOSDEPTH.out.per_base_d4 + mosdepth_per_base_bed = MOSDEPTH.out.per_base_bed + mosdepth_per_base_csi = MOSDEPTH.out.per_base_csi + mosdepth_regions_bed = MOSDEPTH.out.regions_bed + mosdepth_regions_csi = MOSDEPTH.out.regions_csi + mosdepth_quantized_bed = MOSDEPTH.out.quantized_bed + mosdepth_quantized_csi = MOSDEPTH.out.quantized_csi + mosdepth_thresholds_bed = MOSDEPTH.out.thresholds_bed + mosdepth_thresholds_csi = MOSDEPTH.out.thresholds_csi + samtools_coverage = SAMTOOLS_COVERAGE.out.coverage + panelcoverage = PANELCOVERAGE.out.regiondist + versions = ch_versions } diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index ce0d6862..1ca27833 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -5,9 +5,9 @@ // -include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" -include { GNU_SORT as SORT_MERGE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" -include { GNU_SORT as SORT_MERGE_SPLICE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" +include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" +include { GNU_SORT as SORT_MERGE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" +include { GNU_SORT as SORT_MERGE_SPLICE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" workflow FASTQ_ALIGN_RNA { take: @@ -55,15 +55,16 @@ workflow FASTQ_ALIGN_RNA { ch_versions = ch_versions.mix(SORT_MERGE_JUNCTIONS.out.versions.first()) emit: - bam = ch_bam // channel: [ [meta], bam ] - splice_junctions = SORT_MERGE_SPLICE_JUNCTIONS.out.sorted // channel: [ [meta], splice_junctions ] - junctions = SORT_MERGE_JUNCTIONS.out.sorted // channel: [ [meta], junctions ] - reports = ch_reports // channel: [ [meta], log ] - versions = ch_versions // channel: [ versions.yml ] + bam = ch_bam // channel: [ [meta], bam ] + splice_junctions = SORT_MERGE_SPLICE_JUNCTIONS.out.sorted // channel: [ [meta], splice_junctions ] + junctions = SORT_MERGE_JUNCTIONS.out.sorted // channel: [ [meta], junctions ] + reports = ch_reports // channel: [ [meta], log ] + versions = ch_versions // channel: [ versions.yml ] } def group_junctions(ch) { - return ch.map { meta, files -> + return ch + .map { meta, files -> def gk = (meta.chunks as Integer ?: 1) return [ groupKey( diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index 9d30ea92..226e97b9 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -38,7 +38,8 @@ workflow FASTQ_TO_CRAM { .branch { meta, reads, aligner, index, fasta, gtf -> rna: meta.sample_type == "RNA" return [meta, reads, "star", getGenomeAttribute(meta.genome_data, 'star'), gtf] - dna: true // catch all non-RNA samples as DNA, as some may be missing sample_type or have other sample types (e.g. tissue, cell line, etc.) that should be aligned with the DNA aligner + dna: true + // catch all non-RNA samples as DNA, as some may be missing sample_type or have other sample types (e.g. tissue, cell line, etc.) that should be aligned with the DNA aligner //dna: meta.sample_type == "DNA" || meta.sample_type == "Tissue" return [meta, reads, aligner, index, fasta] } @@ -93,13 +94,13 @@ workflow FASTQ_TO_CRAM { .dump(tag: "FASTQ_TO_CRAM: aligned bam per sample", pretty: true) .branch { meta, files, fasta -> bamsormadup: meta.markdup == "bamsormadup" - return [meta, files, fasta] + return [meta, files, fasta] samtools: meta.markdup == "samtools" - return [meta, files, fasta] + return [meta, files, fasta] sort: meta.markdup == "false" || meta.markdup == false - return [meta, files, fasta] + return [meta, files, fasta] unknown: true - error("markdup option ${meta.markdup} not supported") + error("markdup option ${meta.markdup} not supported") } .set { ch_bam_fasta } @@ -156,10 +157,10 @@ workflow FASTQ_TO_CRAM { ch_cram_crai.dump(tag: "FASTQ_TO_CRAM: cram and crai", pretty: true) emit: - cram_crai = ch_cram_crai - rna_splice_junctions = FASTQ_ALIGN_RNA.out.splice_junctions - rna_junctions = FASTQ_ALIGN_RNA.out.junctions - sormadup_metrics = ch_sormadup_metrics - align_reports = FASTQ_ALIGN_DNA.out.reports - versions = ch_versions + cram_crai = ch_cram_crai + rna_splice_junctions = FASTQ_ALIGN_RNA.out.splice_junctions + rna_junctions = FASTQ_ALIGN_RNA.out.junctions + sormadup_metrics = ch_sormadup_metrics + align_reports = FASTQ_ALIGN_DNA.out.reports + versions = ch_versions } diff --git a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf index c66aaf01..4c65f558 100644 --- a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf @@ -8,15 +8,15 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' -include { paramsSummaryMap } from 'plugin/nf-schema' -include { samplesheetToList } from 'plugin/nf-schema' -include { paramsHelp } from 'plugin/nf-schema' -include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' -include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' -include { imNotification } from '../../nf-core/utils_nfcore_pipeline' -include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' -include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' +include { paramsHelp } from 'plugin/nf-schema' +include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' +include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' +include { imNotification } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -25,16 +25,15 @@ include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipelin */ workflow PIPELINE_INITIALISATION { - take: - version // boolean: Display version and exit - validate_params // boolean: Boolean whether to validate parameters against the schema at runtime + version // boolean: Display version and exit + validate_params // boolean: Boolean whether to validate parameters against the schema at runtime nextflow_cli_args // array: List of positional nextflow CLI args - outdir // string: The output directory where the results will be saved - input // string: Path to input samplesheet - help // boolean: Display help message and exit - help_full // boolean: Show the full help message - show_hidden // boolean: Show hidden parameters in the help message + outdir // string: The output directory where the results will be saved + input // string: Path to input samplesheet + help // boolean: Display help message and exit + help_full // boolean: Show the full help message + show_hidden // boolean: Show hidden parameters in the help message main: @@ -43,11 +42,11 @@ workflow PIPELINE_INITIALISATION { // // Print version and exit if required and dump pipeline parameters to JSON file // - UTILS_NEXTFLOW_PIPELINE ( + UTILS_NEXTFLOW_PIPELINE( version, true, outdir, - workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1 + workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1, ) // @@ -55,7 +54,7 @@ workflow PIPELINE_INITIALISATION { // command = "nextflow run ${workflow.manifest.name} -profile --input samplesheet.csv --outdir " - UTILS_NFSCHEMA_PLUGIN ( + UTILS_NFSCHEMA_PLUGIN( workflow, validate_params, null, @@ -64,13 +63,13 @@ workflow PIPELINE_INITIALISATION { show_hidden, "", "", - command + command, ) // // Check config provided to the pipeline // - UTILS_NFCORE_PIPELINE ( + UTILS_NFCORE_PIPELINE( nextflow_cli_args ) @@ -97,15 +96,14 @@ workflow PIPELINE_INITIALISATION { */ workflow PIPELINE_COMPLETION { - take: - email // string: email address - email_on_fail // string: email address sent on pipeline failure + email // string: email address + email_on_fail // string: email address sent on pipeline failure plaintext_email // boolean: Send plain-text email instead of HTML - outdir // path: Path to output directory where results will be published + outdir // path: Path to output directory where results will be published monochrome_logs // boolean: Disable ANSI colour codes in log output - hook_url // string: hook URL for notifications - multiqc_report // string: Path to MultiQC report + hook_url // string: hook URL for notifications + multiqc_report // string: Path to MultiQC report main: summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") @@ -134,7 +132,7 @@ workflow PIPELINE_COMPLETION { } workflow.onError { - log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" + log.error("Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting") } } @@ -157,19 +155,19 @@ def validateInputSamplesheet(input) { def (metas, fastqs) = input[1..2] // Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end - def endedness_ok = metas.collect{ meta -> meta.single_end }.unique().size == 1 + def endedness_ok = metas.collect { meta -> meta.single_end }.unique().size == 1 if (!endedness_ok) { error("Please check input samplesheet -> Multiple runs of a sample must be of the same datatype i.e. single-end or paired-end: ${metas[0].id}") } - return [ metas[0], fastqs ] + return [metas[0], fastqs] } // // Get attribute from genome config file e.g. fasta // def getGenomeAttribute(genomes, attribute) { if (genomes && genomes.containsKey(attribute)) { - return genomes[ attribute ] + return genomes[attribute] } return null } @@ -179,11 +177,7 @@ def getGenomeAttribute(genomes, attribute) { // def genomeExistsError() { if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { - def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + - " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + - " Currently, the available genome keys are:\n" + - " ${params.genomes.keySet().join(", ")}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + " Currently, the available genome keys are:\n" + " ${params.genomes.keySet().join(", ")}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" error(error_string) } } @@ -195,11 +189,11 @@ def toolCitationText() { // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "Tool (Foo et al. 2023)" : "", // Uncomment function in methodsDescriptionText to render in MultiQC report def citation_text = [ - "Tools used in the workflow included:", - "FastQC (Andrews 2010),", - "MultiQC (Ewels et al. 2016)", - "." - ].join(' ').trim() + "Tools used in the workflow included:", + "FastQC (Andrews 2010),", + "MultiQC (Ewels et al. 2016)", + ".", + ].join(' ').trim() return citation_text } @@ -209,9 +203,9 @@ def toolBibliographyText() { // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "
  • Author (2023) Pub name, Journal, DOI
  • " : "", // Uncomment function in methodsDescriptionText to render in MultiQC report def reference_text = [ - "
  • Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).
  • ", - "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • " - ].join(' ').trim() + "
  • Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).
  • ", + "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • ", + ].join(' ').trim() return reference_text } @@ -233,7 +227,10 @@ def methodsDescriptionText(mqc_methods_yaml) { temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), " } meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2) - } else meta["doi_text"] = "" + } + else { + meta["doi_text"] = "" + } meta["nodoi_text"] = meta.manifest_map.doi ? "" : "
  • If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used.
  • " // Tool references @@ -247,7 +244,7 @@ def methodsDescriptionText(mqc_methods_yaml) { def methods_text = mqc_methods_yaml.text - def engine = new groovy.text.SimpleTemplateEngine() + def engine = new groovy.text.SimpleTemplateEngine() def description_html = engine.createTemplate(methods_text).make(meta) return description_html.toString() diff --git a/tests/inputs/fastq.yml b/tests/inputs/fastq.yml index 52668235..a0033b21 100644 --- a/tests/inputs/fastq.yml +++ b/tests/inputs/fastq.yml @@ -6,6 +6,7 @@ organism: Homo sapiens tag: WES aligner: bwamem + markdup: bamsormadup fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz - id: sample1_L002 @@ -14,5 +15,6 @@ organism: Homo sapiens tag: WES aligner: bwamem + markdup: bamsormadup fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz diff --git a/tests/inputs/fastq_rna.yml b/tests/inputs/fastq_rna.yml index 878dab22..998af6b5 100644 --- a/tests/inputs/fastq_rna.yml +++ b/tests/inputs/fastq_rna.yml @@ -7,6 +7,7 @@ tag: WES sample_type: RNA aligner: star + markdup: bamsormadup fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz - id: sample1_L002 @@ -16,5 +17,6 @@ tag: WES sample_type: RNA aligner: star + markdup: bamsormadup fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 33c0930b..bfe1a63d 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -260,7 +260,7 @@ workflow PREPROCESSING { crai, getGenomeAttribute(meta.genome_data, "fasta"), getGenomeAttribute(meta.genome_data, "fai"), - meta.roi ? file(meta.roi, checkIfExists: true) : [], + meta.roi && meta.roi != [] ? file(meta.roi, checkIfExists: true) : [], ] } .set { ch_cram_crai_fasta_fai_roi } @@ -285,7 +285,7 @@ workflow PREPROCESSING { meta, cram, crai, - meta.roi ? file(meta.roi, checkIfExists: true) : [], + meta.roi && meta.roi != [] ? file(meta.roi, checkIfExists: true) : [], getGenomeAttribute(meta.genome_data, "fasta"), getGenomeAttribute(meta.genome_data, "fai"), getGenomeAttribute(meta.genome_data, "dict"), From efb99f01c064e56a97474e776e0cddfb3bcc8260 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:57:19 +0100 Subject: [PATCH 151/202] meta fixes --- assets/schema_input.json | 2 +- assets/schema_sampleinfo.json | 2 +- tests/inputs/fastq.yml | 2 ++ tests/inputs/fastq_rna.yml | 2 ++ tests/workflows/preprocessing.nf.test | 9 ++++++--- workflows/preprocessing.nf | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index 59ee5046..a6cd4941 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -87,7 +87,7 @@ "meta": ["run_coverage"], "type": "boolean", "description": "Whether to run coverage analysis for the sample", - "default": false + "default": true }, "disable_picard_metrics": { "meta": ["disable_picard_metrics"], diff --git a/assets/schema_sampleinfo.json b/assets/schema_sampleinfo.json index 26bb486a..dee4c572 100644 --- a/assets/schema_sampleinfo.json +++ b/assets/schema_sampleinfo.json @@ -127,7 +127,7 @@ "meta": ["run_coverage"], "type": "boolean", "description": "Whether to run coverage analysis for the sample", - "default": false + "default": true }, "disable_picard_metrics": { "meta": ["disable_picard_metrics"], diff --git a/tests/inputs/fastq.yml b/tests/inputs/fastq.yml index a0033b21..8195b58b 100644 --- a/tests/inputs/fastq.yml +++ b/tests/inputs/fastq.yml @@ -7,6 +7,7 @@ tag: WES aligner: bwamem markdup: bamsormadup + run_coverage: true fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz - id: sample1_L002 @@ -16,5 +17,6 @@ tag: WES aligner: bwamem markdup: bamsormadup + run_coverage: true fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz diff --git a/tests/inputs/fastq_rna.yml b/tests/inputs/fastq_rna.yml index 998af6b5..3945eb53 100644 --- a/tests/inputs/fastq_rna.yml +++ b/tests/inputs/fastq_rna.yml @@ -8,6 +8,7 @@ sample_type: RNA aligner: star markdup: bamsormadup + run_coverage: true fastq_1: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R2.fastq.gz - id: sample1_L002 @@ -18,5 +19,6 @@ sample_type: RNA aligner: star markdup: bamsormadup + run_coverage: true fastq_1: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R1.fastq.gz fastq_2: https://github.com/nf-cmgg/test-datasets/raw/main/data/genomics/homo_sapiens/illumina/fastq/test_R2.fastq.gz diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index f31029f4..dfc856d0 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -23,7 +23,8 @@ nextflow_workflow { tag: "WES", sample_type: "DNA", aligner: "bwamem", - markdup: "bamsormadup" + markdup: "bamsormadup", + run_coverage: true ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -91,7 +92,8 @@ nextflow_workflow { tag: "WGS", sample_type: "DNA", aligner: "bwamem", - markdup: "bamsormadup" + markdup: "bamsormadup", + run_coverage: true ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -162,7 +164,8 @@ nextflow_workflow { tag: "WES", sample_type: "DNA", aligner: "bwamem", - markdup: "bamsormadup" + markdup: "bamsormadup", + run_coverage: true ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index bfe1a63d..16618c2e 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -251,7 +251,7 @@ workflow PREPROCESSING { */ FASTQ_TO_CRAM.out.cram_crai .filter { meta, _cram, _crai -> - meta.run_coverage.toBoolean() + meta.run_coverage && meta.run_coverage.toBoolean() } .map { meta, cram, crai -> return [ From 6614d338d2c15ae4ab22d4c86f138a81e4f4396d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:36:06 +0100 Subject: [PATCH 152/202] bump picard/collectmultiplemetrics module --- modules.json | 2 +- .../picard/collectmultiplemetrics/main.nf | 12 +- .../picard/collectmultiplemetrics/meta.yml | 28 ++++- .../picard-collectmultiplemetrics.diff | 30 ++++- .../collectmultiplemetrics/tests/main.nf.test | 6 +- .../tests/main.nf.test.snap | 54 ++++++--- subworkflows/local/bam_qc/main.nf | 2 +- tests/subworkflows/local/bam_qc/main.nf.test | 6 +- .../local/bam_qc/main.nf.test.snap | 106 ++++-------------- 9 files changed, 120 insertions(+), 126 deletions(-) diff --git a/modules.json b/modules.json index 037ebfe4..5b76e3b7 100644 --- a/modules.json +++ b/modules.json @@ -81,7 +81,7 @@ }, "picard/collectmultiplemetrics": { "branch": "master", - "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", + "git_sha": "74ec93d00bef147da3fb1f2262e8d31c14108f88", "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff" }, diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index 2dc6679d..158a746f 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -13,7 +13,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { output: tuple val(meta), path("*_metrics"), emit: metrics tuple val(meta), path("*.pdf") , emit: pdf, optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('picard'), eval("picard CollectMultipleMetrics --version 2>&1 | sed -n 's/^Version:*//p'"), topic: versions, emit: versions_picard when: task.ext.when == null || task.ext.when @@ -38,11 +38,6 @@ process PICARD_COLLECTMULTIPLEMETRICS { --OUTPUT ${prefix}.CollectMultipleMetrics \\ $intervals_cmd \\ $reference_cmd - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - picard: \$(picard CollectMultipleMetrics --version 2>&1 | grep -o 'Version.*' | cut -f2- -d:) - END_VERSIONS """ stub: @@ -58,10 +53,5 @@ process PICARD_COLLECTMULTIPLEMETRICS { touch ${prefix}.CollectMultipleMetrics.quality_by_cycle.pdf touch ${prefix}.CollectMultipleMetrics.insert_size_histogram.pdf touch ${prefix}.CollectMultipleMetrics.quality_distribution_metrics - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - picard: \$(echo \$(picard CollectMultipleMetrics --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) - END_VERSIONS """ } diff --git a/modules/nf-core/picard/collectmultiplemetrics/meta.yml b/modules/nf-core/picard/collectmultiplemetrics/meta.yml index 3f0bf610..1ea47244 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/meta.yml +++ b/modules/nf-core/picard/collectmultiplemetrics/meta.yml @@ -74,13 +74,29 @@ output: description: PDF plots of metrics pattern: "*.{pdf}" ontologies: [] + versions_picard: + - - ${task.process}: + type: string + description: The process the versions were collected from + - picard: + type: string + description: The tool name + - "picard CollectMultipleMetrics --version 2>&1 | sed -n 's/^Version:*//p'": + type: string + description: The command used to generate the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - picard: + type: string + description: The tool name + - "picard CollectMultipleMetrics --version 2>&1 | sed -n 's/^Version:*//p'": + type: string + description: The command used to generate the version of the tool + authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff b/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff index 489076fb..c3cd8e55 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff +++ b/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff @@ -11,10 +11,38 @@ Changes in 'picard/collectmultiplemetrics/main.nf': - tuple val(meta) , path(bam), path(bai) - tuple val(meta2), path(fasta) - tuple val(meta3), path(fai) -+ tuple val(meta) , path(bam), path(bai) ,path(fasta) ,path(fai) ++ tuple val(meta) , path(bam), path(bai), path(intervals), path(fasta) ,path(fai), path(dict) output: tuple val(meta), path("*_metrics"), emit: metrics +@@ -23,7 +21,8 @@ + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" +- def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" ++ def intervals_cmd = intervals ? "--INTERVALS ${intervals.join(',')}" : "" ++ def reference_cmd = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" + def avail_mem = 3072 + if (!task.memory) { + log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' +@@ -37,8 +36,8 @@ + $args \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectMultipleMetrics \\ +- $reference +- ++ $intervals_cmd \\ ++ $reference_cmd + """ + + stub: +@@ -54,6 +53,5 @@ + touch ${prefix}.CollectMultipleMetrics.quality_by_cycle.pdf + touch ${prefix}.CollectMultipleMetrics.insert_size_histogram.pdf + touch ${prefix}.CollectMultipleMetrics.quality_distribution_metrics +- + """ + } 'modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test index 5b67774f..08456941 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test +++ b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test @@ -36,7 +36,7 @@ nextflow_process { { assert snapshot( process.out.metrics[0][1].collect { file(it).name }.toSorted(), process.out.pdf[0][1].collect { file(it).name }.toSorted(), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -66,7 +66,7 @@ nextflow_process { { assert snapshot( process.out.metrics[0][1].collect { file(it).name }.toSorted(), process.out.pdf[0][1].collect { file(it).name }.toSorted(), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -102,7 +102,7 @@ nextflow_process { { assert snapshot( process.out.metrics[0][1].collect { file(it).name }.toSorted(), process.out.pdf[0][1].collect { file(it).name }.toSorted(), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) diff --git a/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap index 5a1de114..1acf3776 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap +++ b/modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap @@ -15,15 +15,21 @@ "test.CollectMultipleMetrics.quality_distribution.pdf", "test.CollectMultipleMetrics.read_length_histogram.pdf" ], - [ - "versions.yml:md5,aca7ca0dc0012ee97698236828ba242a" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTMULTIPLEMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:41:26.126816186" + "timestamp": "2026-02-02T10:22:21.230301646" }, "test-picard-collectmultiplemetrics-cram": { "content": [ @@ -41,15 +47,21 @@ "test.CollectMultipleMetrics.quality_distribution.pdf", "test.CollectMultipleMetrics.read_length_histogram.pdf" ], - [ - "versions.yml:md5,aca7ca0dc0012ee97698236828ba242a" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTMULTIPLEMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:41:50.933556225" + "timestamp": "2026-02-02T10:23:52.23446844" }, "test-picard-collectmultiplemetrics-nofasta": { "content": [ @@ -67,14 +79,20 @@ "test.CollectMultipleMetrics.quality_distribution.pdf", "test.CollectMultipleMetrics.read_length_histogram.pdf" ], - [ - "versions.yml:md5,aca7ca0dc0012ee97698236828ba242a" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTMULTIPLEMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:41:38.213084333" + "timestamp": "2026-02-02T10:23:27.387621193" } } \ No newline at end of file diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index ba8f4b5f..ebea484d 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -35,7 +35,7 @@ workflow BAM_QC { ch_bam_bai_roi_fasta_fai_dict .filter { meta, _bam, _bai, _roi, _fasta, _fai, _dict -> - meta.disable_picard_metrics != true + !meta.disable_picard_metrics } .set { ch_picard } diff --git a/tests/subworkflows/local/bam_qc/main.nf.test b/tests/subworkflows/local/bam_qc/main.nf.test index 8cd0106b..acb2f53a 100644 --- a/tests/subworkflows/local/bam_qc/main.nf.test +++ b/tests/subworkflows/local/bam_qc/main.nf.test @@ -15,7 +15,7 @@ nextflow_workflow { """ // [meta, bam, bai, roi, fasta, fai, dict] input[0] = Channel.of([ - [ id:'test', single_end:false ], + [ id:'test', single_end:false, disable_picard_metrics:false ], file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram.crai", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), @@ -47,7 +47,7 @@ nextflow_workflow { """ // [meta, bam, bai, roi, fasta, fai, dict] input[0] = Channel.of([ - [ id:'test', single_end:false ], + [ id:'test', single_end:false, disable_picard_metrics:false ], file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram.crai", checkIfExists: true), [], @@ -78,7 +78,7 @@ nextflow_workflow { """ // [meta, bam, bai, roi, fasta, fai, dict] input[0] = Channel.of([ - [ id:'test', single_end:false ], + [ id:'test', single_end:false, disable_picard_metrics:true ], file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/cram/sample1.sorted.cram.crai", checkIfExists: true), file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), diff --git a/tests/subworkflows/local/bam_qc/main.nf.test.snap b/tests/subworkflows/local/bam_qc/main.nf.test.snap index 2403cda0..3392b3dd 100644 --- a/tests/subworkflows/local/bam_qc/main.nf.test.snap +++ b/tests/subworkflows/local/bam_qc/main.nf.test.snap @@ -3,43 +3,13 @@ "content": [ { "picard_hsmetrics": [ - [ - { - "id": "test", - "single_end": false - }, - "test.CollectHsMetrics.coverage_metrics" - ] + ], "picard_multiplemetrics": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.CollectMultipleMetrics.alignment_summary_metrics", - "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", - "test.CollectMultipleMetrics.insert_size_metrics", - "test.CollectMultipleMetrics.quality_by_cycle_metrics", - "test.CollectMultipleMetrics.quality_distribution_metrics" - ] - ] + ], "picard_multiplemetrics_pdf": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", - "test.CollectMultipleMetrics.insert_size_histogram.pdf", - "test.CollectMultipleMetrics.quality_by_cycle.pdf", - "test.CollectMultipleMetrics.quality_distribution.pdf", - "test.CollectMultipleMetrics.read_length_histogram.pdf" - ] - ] + ], "picard_wgsmetrics": [ @@ -48,7 +18,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": false }, "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" ] @@ -57,7 +28,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": false }, "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" ] @@ -66,24 +38,23 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": false }, "test.stats:md5,3535d8d302e61ca0d77ac718db8309f1" ] ], "versions": [ "versions.yml:md5,15389a9f97668f320b9628da1903a93b", - "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5", - "versions.yml:md5,593804078c060457d011f7f6b650e500", - "versions.yml:md5,f5507938ec419f55239e3faa9f99376f" + "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.3" }, - "timestamp": "2025-12-02T12:48:55.096074" + "timestamp": "2026-02-10T19:21:23.498543" }, "Bam QC - Samtools": { "content": [ @@ -146,49 +117,20 @@ ], "picard_multiplemetrics": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.CollectMultipleMetrics.alignment_summary_metrics", - "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", - "test.CollectMultipleMetrics.insert_size_metrics", - "test.CollectMultipleMetrics.quality_by_cycle_metrics", - "test.CollectMultipleMetrics.quality_distribution_metrics" - ] - ] + ], "picard_multiplemetrics_pdf": [ - [ - { - "id": "test", - "single_end": false - }, - [ - "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", - "test.CollectMultipleMetrics.insert_size_histogram.pdf", - "test.CollectMultipleMetrics.quality_by_cycle.pdf", - "test.CollectMultipleMetrics.quality_distribution.pdf", - "test.CollectMultipleMetrics.read_length_histogram.pdf" - ] - ] + ], "picard_wgsmetrics": [ - [ - { - "id": "test", - "single_end": false - }, - "test.CollectWgsMetrics.coverage_metrics" - ] + ], "samtools_flagstat": [ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": false }, "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" ] @@ -197,7 +139,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": false }, "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" ] @@ -206,23 +149,22 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": false }, "test.stats:md5,3535d8d302e61ca0d77ac718db8309f1" ] ], "versions": [ "versions.yml:md5,15389a9f97668f320b9628da1903a93b", - "versions.yml:md5,3d2d9acb75406ea94b547be23a45601b", - "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5", - "versions.yml:md5,f5507938ec419f55239e3faa9f99376f" + "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.3" }, - "timestamp": "2025-12-02T12:49:52.298773" + "timestamp": "2026-02-10T19:25:10.626677" } } \ No newline at end of file From f4fc5c7b1a419c9eca79611b2f88543eb80bd06d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:37:37 +0100 Subject: [PATCH 153/202] bump picard/collecthsmetrics module --- modules.json | 2 +- .../nf-core/picard/collecthsmetrics/main.nf | 12 +- .../nf-core/picard/collecthsmetrics/meta.yml | 27 +++- .../collecthsmetrics/tests/main.nf.test | 12 +- .../collecthsmetrics/tests/main.nf.test.snap | 145 +++++++++++++----- 5 files changed, 132 insertions(+), 66 deletions(-) diff --git a/modules.json b/modules.json index 5b76e3b7..d8bc7b60 100644 --- a/modules.json +++ b/modules.json @@ -75,7 +75,7 @@ }, "picard/collecthsmetrics": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "976ed20e328a92cb24ab6c63a8983ed31bf48469", "installed_by": ["modules"], "patch": "modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff" }, diff --git a/modules/nf-core/picard/collecthsmetrics/main.nf b/modules/nf-core/picard/collecthsmetrics/main.nf index a1dc56d8..63b3479c 100644 --- a/modules/nf-core/picard/collecthsmetrics/main.nf +++ b/modules/nf-core/picard/collecthsmetrics/main.nf @@ -12,7 +12,7 @@ process PICARD_COLLECTHSMETRICS { output: tuple val(meta), path("*_metrics") , emit: metrics - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('picard'), eval("picard CollectHsMetrics --version 2>&1 | sed -n 's/^Version:*//p'"), topic: versions, emit: versions_picard when: task.ext.when == null || task.ext.when @@ -59,21 +59,11 @@ process PICARD_COLLECTHSMETRICS { --INPUT $bam \\ --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - picard: \$(echo \$(picard CollectHsMetrics --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) - END_VERSIONS """ stub: def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.CollectHsMetrics.coverage_metrics - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - picard: \$(echo \$(picard CollectHsMetrics --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) - END_VERSIONS """ } diff --git a/modules/nf-core/picard/collecthsmetrics/meta.yml b/modules/nf-core/picard/collecthsmetrics/meta.yml index 511ae959..a21aa6ec 100644 --- a/modules/nf-core/picard/collecthsmetrics/meta.yml +++ b/modules/nf-core/picard/collecthsmetrics/meta.yml @@ -99,13 +99,28 @@ output: description: Alignment metrics files generated by picard pattern: "*_{metrics}" ontologies: [] + versions_picard: + - - ${task.process}: + type: string + description: The process the versions were collected from + - picard: + type: string + description: The tool name + - "picard CollectHsMetrics --version 2>&1 | sed -n 's/^Version:*//p'": + type: string + description: The command used to generate the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - picard: + type: string + description: The tool name + - "picard CollectHsMetrics --version 2>&1 | sed -n 's/^Version:*//p'": + type: string + description: The command used to generate the version of the tool authors: - "@projectoriented" - "@matthdsm" diff --git a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test index fe40e7b0..07a9ccf4 100644 --- a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test +++ b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test @@ -39,7 +39,7 @@ nextflow_process { file(process.out.metrics[0][1]).name, size, lines, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -77,7 +77,7 @@ nextflow_process { file(process.out.metrics[0][1]).name, size, lines, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -110,7 +110,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.versions).match("versions") } + { assert snapshot(process.out).match() } ) } @@ -146,7 +146,7 @@ nextflow_process { file(process.out.metrics[0][1]).name, size, lines, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -185,7 +185,7 @@ nextflow_process { file(process.out.metrics[0][1]).name, size, lines, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -224,7 +224,7 @@ nextflow_process { file(process.out.metrics[0][1]).name, size, lines, - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) diff --git a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap index 11b0f7c5..74d9441f 100644 --- a/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap +++ b/modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap @@ -105,15 +105,64 @@ "88\t0\t0", "89\t0\t0" ], - [ - "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTHSMETRICS", + "picard", + "3.4.0" + ] + ] + } + ], + "meta": { + "nf-test": "0.9.3", + "nextflow": "25.10.2" + }, + "timestamp": "2026-01-05T17:03:29.566021877" + }, + "sarscov2 - bam - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.CollectHsMetrics.coverage_metrics:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + "PICARD_COLLECTHSMETRICS", + "picard", + "3.4.0" + ] + ], + "metrics": [ + [ + { + "id": "test", + "single_end": false + }, + "test.CollectHsMetrics.coverage_metrics:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_picard": [ + [ + "PICARD_COLLECTHSMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:37:59.62099935" + "timestamp": "2026-01-05T17:03:13.333276975" }, "sarscov2 - bam - gzippedfa": { "content": [ @@ -221,27 +270,21 @@ "88\t0\t0", "89\t0\t0" ], - [ - "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" - ] - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" - }, - "timestamp": "2025-09-15T10:37:32.831030701" - }, - "versions": { - "content": [ - [ - "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTHSMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:37:42.492104283" + "timestamp": "2026-01-05T17:03:04.382110367" }, "sarscov2 - bam - samebed": { "content": [ @@ -349,15 +392,21 @@ "88\t0\t0", "89\t0\t0" ], - [ - "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTHSMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:38:39.302597954" + "timestamp": "2026-01-05T17:13:22.872920293" }, "sarscov2 - bam": { "content": [ @@ -465,15 +514,21 @@ "88\t0\t0", "89\t0\t0" ], - [ - "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTHSMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:37:15.861292725" + "timestamp": "2026-01-05T17:02:47.615784738" }, "sarscov2 - bam - bed": { "content": [ @@ -581,14 +636,20 @@ "88\t0\t0", "89\t0\t0" ], - [ - "versions.yml:md5,533cf1e35d36fdacbb762f5df2e1b322" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTHSMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:38:18.912909604" + "timestamp": "2026-01-05T17:13:02.812282052" } } \ No newline at end of file From 60deb6a75c48d613d75a15b039fb8e43fe0f113a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:38:35 +0100 Subject: [PATCH 154/202] bump picard/collectwgsmetrics module --- modules.json | 2 +- .../nf-core/picard/collectwgsmetrics/main.nf | 11 +----- .../nf-core/picard/collectwgsmetrics/meta.yml | 27 ++++++++++---- .../collectwgsmetrics/tests/main.nf.test | 4 +-- .../collectwgsmetrics/tests/main.nf.test.snap | 36 ++++++++++++------- 5 files changed, 49 insertions(+), 31 deletions(-) diff --git a/modules.json b/modules.json index d8bc7b60..a18151a1 100644 --- a/modules.json +++ b/modules.json @@ -87,7 +87,7 @@ }, "picard/collectwgsmetrics": { "branch": "master", - "git_sha": "df124e87c74d8b40285199f8cc20151f5aa57255", + "git_sha": "66d5808eaaabd9de8997c4c31a9e8cdd3b56c080", "installed_by": ["modules"], "patch": "modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff" }, diff --git a/modules/nf-core/picard/collectwgsmetrics/main.nf b/modules/nf-core/picard/collectwgsmetrics/main.nf index cd4a7711..63330d22 100644 --- a/modules/nf-core/picard/collectwgsmetrics/main.nf +++ b/modules/nf-core/picard/collectwgsmetrics/main.nf @@ -13,7 +13,7 @@ process PICARD_COLLECTWGSMETRICS { output: tuple val(meta), path("*_metrics"), emit: metrics - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('picard'), eval("picard CollectWgsMetrics --version 2>&1 | sed -n 's/^Version:*//p'"), topic: versions, emit: versions_picard when: task.ext.when == null || task.ext.when @@ -38,11 +38,6 @@ process PICARD_COLLECTWGSMETRICS { --REFERENCE_SEQUENCE ${fasta} \\ $interval - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - picard: \$(picard CollectWgsMetrics --version 2>&1 | grep -o 'Version.*' | cut -f2- -d:) - END_VERSIONS """ stub: @@ -50,9 +45,5 @@ process PICARD_COLLECTWGSMETRICS { """ touch ${prefix}.CollectWgsMetrics.coverage_metrics - cat <<-END_VERSIONS > versions.yml - "${task.process}": - picard: \$(picard CollectWgsMetrics --version 2>&1 | grep -o 'Version.*' | cut -f2- -d:) - END_VERSIONS """ } diff --git a/modules/nf-core/picard/collectwgsmetrics/meta.yml b/modules/nf-core/picard/collectwgsmetrics/meta.yml index a27e0a88..c59811d5 100644 --- a/modules/nf-core/picard/collectwgsmetrics/meta.yml +++ b/modules/nf-core/picard/collectwgsmetrics/meta.yml @@ -69,13 +69,28 @@ output: description: Alignment metrics files generated by picard pattern: "*_{metrics}" ontologies: [] + versions_picard: + - - ${task.process}: + type: string + description: The process the versions were collected from + - picard: + type: string + description: The tool name + - "picard CollectWgsMetrics --version 2>&1 | sed -n 's/^Version:*//p'": + type: string + description: The command used to generate the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - picard: + type: string + description: The tool name + - "picard CollectWgsMetrics --version 2>&1 | sed -n 's/^Version:*//p'": + type: string + description: The command used to generate the version of the tool authors: - "@drpatelh" - "@flowuenne" diff --git a/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test index a3984566..d6a60e6b 100644 --- a/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test +++ b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test @@ -38,7 +38,7 @@ nextflow_process { { assert process.success }, { assert snapshot( file(process.out.metrics[0][1]).text.contains('coverage high_quality_coverage_count'), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -73,7 +73,7 @@ nextflow_process { { assert process.success }, { assert snapshot( file(process.out.metrics[0][1]).text.contains('coverage high_quality_coverage_count'), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) diff --git a/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap index d944d96b..375c2ef9 100644 --- a/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap +++ b/modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap @@ -2,27 +2,39 @@ "test-picard-collectwgsmetrics-with-interval": { "content": [ true, - [ - "versions.yml:md5,0fa1034c5831e54d4534e6052a8d6b61" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTWGSMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:45:19.40801445" + "timestamp": "2026-02-02T14:52:55.091876466" }, "test-picard-collectwgsmetrics": { "content": [ true, - [ - "versions.yml:md5,0fa1034c5831e54d4534e6052a8d6b61" - ] + { + "versions_picard": [ + [ + "PICARD_COLLECTWGSMETRICS", + "picard", + "3.4.0" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-15T10:44:57.689335695" + "timestamp": "2026-02-02T14:52:11.334274481" } } \ No newline at end of file From d66d99c7fc81ff54824efb2c971c68348b4b0674 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:43:04 +0100 Subject: [PATCH 155/202] bam_qc -> topic --- modules.json | 6 +- modules/nf-core/samtools/flagstat/main.nf | 12 +-- modules/nf-core/samtools/flagstat/meta.yml | 33 +++++--- .../samtools/flagstat/tests/main.nf.test.snap | 40 +++++++--- modules/nf-core/samtools/idxstats/main.nf | 12 +-- modules/nf-core/samtools/idxstats/meta.yml | 29 +++++-- .../samtools/idxstats/tests/main.nf.test | 10 ++- .../samtools/idxstats/tests/main.nf.test.snap | 80 ++++++++----------- modules/nf-core/samtools/stats/main.nf | 4 +- modules/nf-core/samtools/stats/meta.yml | 17 ++-- subworkflows/local/bam_qc/main.nf | 10 +-- workflows/preprocessing.nf | 1 - 12 files changed, 132 insertions(+), 122 deletions(-) diff --git a/modules.json b/modules.json index a18151a1..744675f8 100644 --- a/modules.json +++ b/modules.json @@ -105,12 +105,12 @@ }, "samtools/flagstat": { "branch": "master", - "git_sha": "e334e12a1e985adc5ffc3fc78a68be1de711de45", + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", "installed_by": ["modules"] }, "samtools/idxstats": { "branch": "master", - "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", + "git_sha": "1d2fbdcbca677bbe8da0f9d0d2bb7c02f2cab1c9", "installed_by": ["modules"] }, "samtools/sormadup": { @@ -127,7 +127,7 @@ }, "samtools/stats": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "fe93fde0845f907fc91ad7cc7d797930408824df", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/stats/samtools-stats.diff" }, diff --git a/modules/nf-core/samtools/flagstat/main.nf b/modules/nf-core/samtools/flagstat/main.nf index f148f56b..0cfb7e87 100644 --- a/modules/nf-core/samtools/flagstat/main.nf +++ b/modules/nf-core/samtools/flagstat/main.nf @@ -12,7 +12,7 @@ process SAMTOOLS_FLAGSTAT { output: tuple val(meta), path("*.flagstat"), emit: flagstat - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), emit: versions_samtools, topic: versions when: task.ext.when == null || task.ext.when @@ -25,11 +25,6 @@ process SAMTOOLS_FLAGSTAT { --threads ${task.cpus} \\ $bam \\ > ${prefix}.flagstat - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: @@ -48,10 +43,5 @@ process SAMTOOLS_FLAGSTAT { 850000 + 0 with mate mapped to a different chr 50000 + 0 with mate mapped to a different chr (mapQ>=5) END_FLAGSTAT - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/samtools/flagstat/meta.yml b/modules/nf-core/samtools/flagstat/meta.yml index ebbc15f2..8caa1bcc 100644 --- a/modules/nf-core/samtools/flagstat/meta.yml +++ b/modules/nf-core/samtools/flagstat/meta.yml @@ -1,6 +1,6 @@ name: samtools_flagstat -description: Counts the number of alignments in a BAM/CRAM/SAM file for each FLAG - type +description: Counts the number of alignments in a BAM/CRAM/SAM file for each + FLAG type keywords: - stats - mapping @@ -17,7 +17,8 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" identifier: biotools:samtools input: - - meta: @@ -47,13 +48,27 @@ output: description: File containing samtools flagstat output pattern: "*.{flagstat}" ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap b/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap index 0a0a9b15..f5c882da 100644 --- a/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/flagstat/tests/main.nf.test.snap @@ -12,7 +12,11 @@ ] ], "1": [ - "versions.yml:md5,bdc0bfb2b0542580e7cd65e80d8570bc" + [ + "SAMTOOLS_FLAGSTAT", + "samtools", + "1.22.1" + ] ], "flagstat": [ [ @@ -23,16 +27,20 @@ "test.flagstat:md5,67394650dbae96d1a4fcc70484822159" ] ], - "versions": [ - "versions.yml:md5,bdc0bfb2b0542580e7cd65e80d8570bc" + "versions_samtools": [ + [ + "SAMTOOLS_FLAGSTAT", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-15T15:02:00.813612" + "timestamp": "2026-02-03T11:14:30.820969684" }, "BAM": { "content": [ @@ -47,7 +55,11 @@ ] ], "1": [ - "versions.yml:md5,bdc0bfb2b0542580e7cd65e80d8570bc" + [ + "SAMTOOLS_FLAGSTAT", + "samtools", + "1.22.1" + ] ], "flagstat": [ [ @@ -58,15 +70,19 @@ "test.flagstat:md5,4f7ffd1e6a5e85524d443209ac97d783" ] ], - "versions": [ - "versions.yml:md5,bdc0bfb2b0542580e7cd65e80d8570bc" + "versions_samtools": [ + [ + "SAMTOOLS_FLAGSTAT", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-15T15:01:55.232954" + "timestamp": "2026-02-03T11:14:25.581619424" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/idxstats/main.nf b/modules/nf-core/samtools/idxstats/main.nf index 9181a1a5..d5b70a7f 100644 --- a/modules/nf-core/samtools/idxstats/main.nf +++ b/modules/nf-core/samtools/idxstats/main.nf @@ -12,7 +12,7 @@ process SAMTOOLS_IDXSTATS { output: tuple val(meta), path("*.idxstats"), emit: idxstats - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), emit: versions_samtools, topic: versions when: task.ext.when == null || task.ext.when @@ -27,11 +27,6 @@ process SAMTOOLS_IDXSTATS { --threads ${task.cpus-1} \\ $bam \\ > ${prefix}.idxstats - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: @@ -39,10 +34,5 @@ process SAMTOOLS_IDXSTATS { """ touch ${prefix}.idxstats - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/samtools/idxstats/meta.yml b/modules/nf-core/samtools/idxstats/meta.yml index 96d42746..fd153841 100644 --- a/modules/nf-core/samtools/idxstats/meta.yml +++ b/modules/nf-core/samtools/idxstats/meta.yml @@ -17,7 +17,8 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" identifier: biotools:samtools input: - - meta: @@ -47,13 +48,27 @@ output: description: File containing samtools idxstats output pattern: "*.{idxstats}" ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" maintainers: diff --git a/modules/nf-core/samtools/idxstats/tests/main.nf.test b/modules/nf-core/samtools/idxstats/tests/main.nf.test index 5fd1fc78..c990cd55 100644 --- a/modules/nf-core/samtools/idxstats/tests/main.nf.test +++ b/modules/nf-core/samtools/idxstats/tests/main.nf.test @@ -25,7 +25,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.idxstats, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } } @@ -47,7 +50,10 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out.idxstats, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } ) } }} diff --git a/modules/nf-core/samtools/idxstats/tests/main.nf.test.snap b/modules/nf-core/samtools/idxstats/tests/main.nf.test.snap index d3e785e0..19a54c7c 100644 --- a/modules/nf-core/samtools/idxstats/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/idxstats/tests/main.nf.test.snap @@ -1,72 +1,56 @@ { "bam - stub": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - "versions.yml:md5,6da44e5235401559cea62052bdc0197b" - ], - "idxstats": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.idxstats:md5,d41d8cd98f00b204e9800998ecf8427e" + "SAMTOOLS_IDXSTATS", + "samtools", + "1.22.1" ] - ], - "versions": [ - "versions.yml:md5,6da44e5235401559cea62052bdc0197b" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-10T13:47:35.796569" + "timestamp": "2026-02-02T16:21:46.333090477" }, "bam": { "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + "test.idxstats:md5,df60a8c8d6621100d05178c93fb053a2" + ] + ], { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.idxstats:md5,df60a8c8d6621100d05178c93fb053a2" - ] - ], - "1": [ - "versions.yml:md5,6da44e5235401559cea62052bdc0197b" - ], - "idxstats": [ + "versions_samtools": [ [ - { - "id": "test", - "single_end": false - }, - "test.idxstats:md5,df60a8c8d6621100d05178c93fb053a2" + "SAMTOOLS_IDXSTATS", + "samtools", + "1.22.1" ] - ], - "versions": [ - "versions.yml:md5,6da44e5235401559cea62052bdc0197b" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-10T13:47:31.86415" + "timestamp": "2026-02-02T16:21:41.063422521" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/stats/main.nf b/modules/nf-core/samtools/stats/main.nf index 7b070ac3..f9032148 100644 --- a/modules/nf-core/samtools/stats/main.nf +++ b/modules/nf-core/samtools/stats/main.nf @@ -18,11 +18,13 @@ process SAMTOOLS_STATS { task.ext.when == null || task.ext.when script: - def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--reference ${fasta}" : "" """ samtools \\ stats \\ + ${args} \\ --threads ${task.cpus} \\ ${reference} \\ ${input} \\ diff --git a/modules/nf-core/samtools/stats/meta.yml b/modules/nf-core/samtools/stats/meta.yml index a20509ae..5c59cce4 100644 --- a/modules/nf-core/samtools/stats/meta.yml +++ b/modules/nf-core/samtools/stats/meta.yml @@ -62,21 +62,22 @@ output: - samtools: type: string description: Name of the tool - - samtools version | sed "1!d;s/.* //: - type: string - description: The command used to generate the version of the tool + - samtools version | sed "1!d;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 + description: Name of the process - samtools: type: string - description: The tool name - - samtools version | sed "1!d;s/.* //: - type: string - description: The command used to generate the version of the tool + description: Name of the tool + - samtools version | sed "1!d;s/.* //": + type: eval + description: The expression to obtain the version of the tool + authors: - "@drpatelh" - "@FriederikeHanssen" diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index ebea484d..d6e1c8bd 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -13,8 +13,6 @@ workflow BAM_QC { ch_bam_bai_roi_fasta_fai_dict // channel: [ val(meta), path(bam), path(bai), path(roi), path(fasta), path(fai), path(dict)] main: - ch_versions = channel.empty() - ch_bam_bai_roi_fasta_fai_dict .map { meta, bam, bai, _roi, fasta, fai, _dict -> return [meta, bam, bai, fasta, fai] @@ -23,10 +21,7 @@ workflow BAM_QC { SAMTOOLS_STATS(ch_bam_bai_fasta_fai) SAMTOOLS_FLAGSTAT(ch_bam_bai_fasta_fai) - ch_versions = ch_versions.mix(SAMTOOLS_FLAGSTAT.out.versions.first()) - SAMTOOLS_IDXSTATS(ch_bam_bai_fasta_fai) - ch_versions = ch_versions.mix(SAMTOOLS_IDXSTATS.out.versions.first()) ch_picard_hsmetrics = channel.empty() ch_picard_multiplemetrics = channel.empty() @@ -40,7 +35,6 @@ workflow BAM_QC { .set { ch_picard } PICARD_COLLECTMULTIPLEMETRICS(ch_picard) - ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) ch_picard_multiplemetrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics ch_picard_multiplemetrics_pdf = PICARD_COLLECTMULTIPLEMETRICS.out.pdf @@ -54,11 +48,10 @@ workflow BAM_QC { .set { ch_picard_coverage } PICARD_COLLECTWGSMETRICS(ch_picard_coverage.wgsmetrics, []) - ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) ch_picard_wgsmetrics = PICARD_COLLECTWGSMETRICS.out.metrics PICARD_COLLECTHSMETRICS(ch_picard_coverage.hsmetrics) - ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) + ch_picard_hsmetrics = PICARD_COLLECTHSMETRICS.out.metrics ch_picard_hsmetrics = PICARD_COLLECTHSMETRICS.out.metrics emit: @@ -69,5 +62,4 @@ workflow BAM_QC { picard_multiplemetrics_pdf = ch_picard_multiplemetrics_pdf picard_wgsmetrics = ch_picard_wgsmetrics picard_hsmetrics = ch_picard_hsmetrics - versions = ch_versions } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 16618c2e..e7af9c5d 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -303,7 +303,6 @@ workflow PREPROCESSING { BAM_QC.out.picard_wgsmetrics, BAM_QC.out.picard_hsmetrics, ) - ch_versions = ch_versions.mix(BAM_QC.out.versions) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 39a4884cfb3bf4d643bbf0a99a37826f7569b39b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:48:03 +0100 Subject: [PATCH 156/202] bump mqc module --- modules.json | 2 +- modules/nf-core/multiqc/meta.yml | 27 +++++++++++++++++++++++++-- workflows/preprocessing.nf | 2 +- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/modules.json b/modules.json index 744675f8..2ac331be 100644 --- a/modules.json +++ b/modules.json @@ -69,7 +69,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "9656d955b700a8707c4a67821ab056f8c1095675", + "git_sha": "575e1a4b51a9bad7a8cd1316a88fb85684ef7c7b", "installed_by": ["modules"], "patch": "modules/nf-core/multiqc/multiqc.diff" }, diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index e4b8f94d..9fd34f37 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -71,7 +71,7 @@ output: - "*_plots": type: file description: Plots created by MultiQC - pattern: "*_data" + pattern: "*_plots" ontologies: [] versions: - - ${task.process}: @@ -83,7 +83,6 @@ output: - multiqc --version | sed "s/.* //g": type: eval description: The expression to obtain the version of the tool - authors: - "@abhi18av" - "@bunop" @@ -94,3 +93,27 @@ maintainers: - "@bunop" - "@drpatelh" - "@jfy133" +containers: + conda: + linux/amd64: + lock_file: https://wave.seqera.io/v1alpha1/builds/bd-ee7739d47738383b_1/condalock + linux/arm64: + lock_file: https://wave.seqera.io/v1alpha1/builds/bd-58d7dee710ab3aa8_1/condalock + docker: + linux/amd64: + build_id: bd-ee7739d47738383b_1 + name: community.wave.seqera.io/library/multiqc:1.33--ee7739d47738383b + scanId: sc-6ddec592dcadd583_4 + linux/arm64: + build_id: bd-58d7dee710ab3aa8_1 + name: community.wave.seqera.io/library/multiqc:1.33--58d7dee710ab3aa8 + scanId: sc-a04c42273e34c55c_2 + singularity: + linux/amd64: + build_id: bd-e3576ddf588fa00d_1 + https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/34/34e733a9ae16a27e80fe00f863ea1479c96416017f24a907996126283e7ecd4d/data + name: oras://community.wave.seqera.io/library/multiqc:1.33--e3576ddf588fa00d + linux/arm64: + build_id: bd-2537ca5f8445e3c2_1 + https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/78/78b89e91d89e9cc99ad5ade5be311f347838cb2acbfb4f13bc343b170be09ce4/data + name: oras://community.wave.seqera.io/library/multiqc:1.33--2537ca5f8445e3c2 diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index e7af9c5d..365327af 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -285,7 +285,7 @@ workflow PREPROCESSING { meta, cram, crai, - meta.roi && meta.roi != [] ? file(meta.roi, checkIfExists: true) : [], + (meta.roi && meta.roi) != [] ? file(meta.roi, checkIfExists: true) : [], getGenomeAttribute(meta.genome_data, "fasta"), getGenomeAttribute(meta.genome_data, "fai"), getGenomeAttribute(meta.genome_data, "dict"), From 6e56545a364de08884152240aa8934a6368f6b9d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:50:01 +0100 Subject: [PATCH 157/202] bump star/align module --- modules.json | 2 +- modules/nf-core/star/align/main.nf | 18 +- modules/nf-core/star/align/meta.yml | 68 +- modules/nf-core/star/align/star-align.diff | 2 +- modules/nf-core/star/align/tests/main.nf.test | 10 +- .../star/align/tests/main.nf.test.snap | 670 +++++++++++++----- subworkflows/local/fastq_align_rna/main.nf | 1 - 7 files changed, 546 insertions(+), 225 deletions(-) diff --git a/modules.json b/modules.json index 2ac331be..aa368218 100644 --- a/modules.json +++ b/modules.json @@ -139,7 +139,7 @@ }, "star/align": { "branch": "master", - "git_sha": "ce9e10540a1555145ddd1ddd8b15f7443cbe1449", + "git_sha": "d6419d592de78e193625b209c1d0a5cc09206df3", "installed_by": ["modules"], "patch": "modules/nf-core/star/align/star-align.diff" }, diff --git a/modules/nf-core/star/align/main.nf b/modules/nf-core/star/align/main.nf index 034f91df..653996ad 100644 --- a/modules/nf-core/star/align/main.nf +++ b/modules/nf-core/star/align/main.nf @@ -16,7 +16,9 @@ process STAR_ALIGN { tuple val(meta), path('*Log.final.out') , emit: log_final tuple val(meta), path('*Log.out') , emit: log_out tuple val(meta), path('*Log.progress.out'), emit: log_progress - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('star'), eval('STAR --version | sed "s/STAR_//"'), emit: versions_star, topic: versions + tuple val("${task.process}"), val('samtools'), eval("samtools --version | sed -n '1s/samtools //p'"), emit: versions_samtools, topic: versions + tuple val("${task.process}"), val('gawk'), eval("gawk --version | sed -n '1s/GNU Awk \\([0-9.]*\\).*/\\1/p'"), emit: versions_gawk, topic: versions tuple val(meta), path('*d.out.bam') , optional:true, emit: bam tuple val(meta), path("${prefix}.sortedByCoord.out.bam") , optional:true, emit: bam_sorted @@ -68,13 +70,6 @@ process STAR_ALIGN { mv ${prefix}.Unmapped.out.mate2 ${prefix}.unmapped_2.fastq gzip ${prefix}.unmapped_2.fastq fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') - END_VERSIONS """ stub: @@ -97,12 +92,5 @@ process STAR_ALIGN { touch ${prefix}.out.sam touch ${prefix}.Signal.UniqueMultiple.str1.out.wig touch ${prefix}.Signal.UniqueMultiple.str1.out.bg - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - star: \$(STAR --version | sed -e "s/STAR_//g") - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - gawk: \$(echo \$(gawk --version 2>&1) | sed 's/^.*GNU Awk //; s/, .*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/star/align/meta.yml b/modules/nf-core/star/align/meta.yml index 1ee46905..d1441570 100644 --- a/modules/nf-core/star/align/meta.yml +++ b/modules/nf-core/star/align/meta.yml @@ -89,13 +89,37 @@ output: description: STAR log progress file pattern: "*Log.progress.out" ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + versions_star: + - - ${task.process}: + type: string + description: The name of the process + - star: + type: string + description: The name of the tool + - STAR --version | sed "s/STAR_//": + type: eval + description: The expression to obtain the version of the tool + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools --version | sed -n '1s/samtools //p': + type: eval + description: The expression to obtain the version of the tool + versions_gawk: + - - ${task.process}: + type: string + description: The name of the process + - gawk: + type: string + description: The name of the tool + - gawk --version | sed -n '1s/GNU Awk \([0-9.]*\).*/\1/p': + type: eval + description: The expression to obtain the version of the tool + bam: - - meta: type: map @@ -243,6 +267,36 @@ output: description: STAR output bedGraph format file(s) (optional) pattern: "*.bg" ontologies: [] +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - star: + type: string + description: The name of the tool + - STAR --version | sed "s/STAR_//": + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools --version | sed -n '1s/samtools //p': + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - gawk: + type: string + description: The name of the tool + - gawk --version | sed -n '1s/GNU Awk \([0-9.]*\).*/\1/p': + type: eval + description: The expression to obtain the version of the tool + authors: - "@kevinmenden" - "@drpatelh" diff --git a/modules/nf-core/star/align/star-align.diff b/modules/nf-core/star/align/star-align.diff index 398da009..0c9c6621 100644 --- a/modules/nf-core/star/align/star-align.diff +++ b/modules/nf-core/star/align/star-align.diff @@ -16,7 +16,7 @@ Changes in 'star/align/main.nf': val seq_platform val seq_center -@@ -44,7 +41,7 @@ +@@ -46,7 +43,7 @@ def reads1 = [] def reads2 = [] meta.single_end ? [reads].flatten().each{ read -> reads1 << read} : reads.eachWithIndex{ v, ix -> ( ix & 1 ? reads2 : reads1) << v } diff --git a/modules/nf-core/star/align/tests/main.nf.test b/modules/nf-core/star/align/tests/main.nf.test index a62c17db..da0cc07e 100644 --- a/modules/nf-core/star/align/tests/main.nf.test +++ b/modules/nf-core/star/align/tests/main.nf.test @@ -65,7 +65,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -130,7 +130,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -194,7 +194,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -259,7 +259,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -326,7 +326,7 @@ nextflow_process { process.out.spl_junc_tab, process.out.tab, process.out.wig, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } diff --git a/modules/nf-core/star/align/tests/main.nf.test.snap b/modules/nf-core/star/align/tests/main.nf.test.snap index a1ec3a3d..2b5755db 100644 --- a/modules/nf-core/star/align/tests/main.nf.test.snap +++ b/modules/nf-core/star/align/tests/main.nf.test.snap @@ -21,6 +21,27 @@ ] ], "10": [ + [ + { + "id": "test", + "single_end": true + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "12": [ [ { "id": "test", @@ -33,7 +54,7 @@ ] ] ], - "11": [ + "13": [ [ { "id": "test", @@ -42,7 +63,7 @@ "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "12": [ + "14": [ [ { "id": "test", @@ -51,7 +72,7 @@ "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "13": [ + "15": [ [ { "id": "test", @@ -60,7 +81,7 @@ "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "14": [ + "16": [ [ { "id": "test", @@ -69,7 +90,7 @@ "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "15": [ + "17": [ [ { "id": "test", @@ -78,7 +99,7 @@ "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "16": [ + "18": [ [ { "id": "test", @@ -97,28 +118,24 @@ ] ], "3": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "4": [ [ - { - "id": "test", - "single_end": true - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + "STAR_ALIGN", + "samtools", + "1.21" ] ], "5": [ [ - { - "id": "test", - "single_end": true - }, - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "STAR_ALIGN", + "gawk", + "5.1.0" ] ], "6": [ @@ -127,7 +144,11 @@ "id": "test", "single_end": true }, - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "7": [ @@ -136,7 +157,7 @@ "id": "test", "single_end": true }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "8": [ @@ -145,7 +166,7 @@ "id": "test", "single_end": true }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "9": [ @@ -154,10 +175,7 @@ "id": "test", "single_end": true }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "bam": [ @@ -306,8 +324,26 @@ ] ] ], - "versions": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "wig": [ [ @@ -321,10 +357,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-12-11T16:28:39.242074494" + "timestamp": "2026-02-03T09:28:25.802437191" }, "homo_sapiens - paired_end - arriba - stub": { "content": [ @@ -348,6 +384,27 @@ ] ], "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "12": [ [ { "id": "test", @@ -360,7 +417,7 @@ ] ] ], - "11": [ + "13": [ [ { "id": "test", @@ -369,7 +426,7 @@ "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "12": [ + "14": [ [ { "id": "test", @@ -378,7 +435,7 @@ "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "13": [ + "15": [ [ { "id": "test", @@ -387,7 +444,7 @@ "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "14": [ + "16": [ [ { "id": "test", @@ -396,7 +453,7 @@ "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "15": [ + "17": [ [ { "id": "test", @@ -405,7 +462,7 @@ "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "16": [ + "18": [ [ { "id": "test", @@ -424,28 +481,24 @@ ] ], "3": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "4": [ [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + "STAR_ALIGN", + "samtools", + "1.21" ] ], "5": [ [ - { - "id": "test", - "single_end": false - }, - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "STAR_ALIGN", + "gawk", + "5.1.0" ] ], "6": [ @@ -454,7 +507,11 @@ "id": "test", "single_end": false }, - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "7": [ @@ -463,7 +520,7 @@ "id": "test", "single_end": false }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "8": [ @@ -472,7 +529,7 @@ "id": "test", "single_end": false }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "9": [ @@ -481,10 +538,7 @@ "id": "test", "single_end": false }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "bam": [ @@ -633,8 +687,26 @@ ] ] ], - "versions": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "wig": [ [ @@ -648,10 +720,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-12-11T16:29:08.392620556" + "timestamp": "2026-02-03T09:28:38.483306917" }, "homo_sapiens - single_end": { "content": [ @@ -702,15 +774,35 @@ [ ], - [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" - ] + { + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-12-11T16:21:34.549483887" + "timestamp": "2026-02-02T23:44:45.378997" }, "homo_sapiens - paired_end": { "content": [ @@ -761,15 +853,35 @@ [ ], - [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" - ] + { + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2024-12-11T16:22:17.011253146" + "timestamp": "2026-02-02T23:50:50.657212" }, "homo_sapiens - paired_end - multiple - stub": { "content": [ @@ -793,6 +905,27 @@ ] ], "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "12": [ [ { "id": "test", @@ -805,7 +938,7 @@ ] ] ], - "11": [ + "13": [ [ { "id": "test", @@ -814,7 +947,7 @@ "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "12": [ + "14": [ [ { "id": "test", @@ -823,7 +956,7 @@ "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "13": [ + "15": [ [ { "id": "test", @@ -832,7 +965,7 @@ "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "14": [ + "16": [ [ { "id": "test", @@ -841,7 +974,7 @@ "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "15": [ + "17": [ [ { "id": "test", @@ -850,7 +983,7 @@ "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "16": [ + "18": [ [ { "id": "test", @@ -869,28 +1002,24 @@ ] ], "3": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "4": [ [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + "STAR_ALIGN", + "samtools", + "1.21" ] ], "5": [ [ - { - "id": "test", - "single_end": false - }, - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "STAR_ALIGN", + "gawk", + "5.1.0" ] ], "6": [ @@ -899,7 +1028,11 @@ "id": "test", "single_end": false }, - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "7": [ @@ -908,7 +1041,7 @@ "id": "test", "single_end": false }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "8": [ @@ -917,7 +1050,7 @@ "id": "test", "single_end": false }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "9": [ @@ -926,10 +1059,7 @@ "id": "test", "single_end": false }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "bam": [ @@ -1078,8 +1208,26 @@ ] ] ], - "versions": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "wig": [ [ @@ -1093,10 +1241,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-12-11T16:29:31.072104862" + "timestamp": "2026-02-03T09:28:51.288466085" }, "homo_sapiens - paired_end - multiple": { "content": [ @@ -1147,15 +1295,35 @@ [ ], - [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" - ] + { + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-12-11T16:28:26.645008336" + "timestamp": "2026-02-03T09:28:19.516063466" }, "homo_sapiens - paired_end - stub": { "content": [ @@ -1179,6 +1347,27 @@ ] ], "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "12": [ [ { "id": "test", @@ -1191,7 +1380,7 @@ ] ] ], - "11": [ + "13": [ [ { "id": "test", @@ -1200,7 +1389,7 @@ "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "12": [ + "14": [ [ { "id": "test", @@ -1209,7 +1398,7 @@ "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "13": [ + "15": [ [ { "id": "test", @@ -1218,7 +1407,7 @@ "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "14": [ + "16": [ [ { "id": "test", @@ -1227,7 +1416,7 @@ "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "15": [ + "17": [ [ { "id": "test", @@ -1236,7 +1425,7 @@ "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "16": [ + "18": [ [ { "id": "test", @@ -1255,28 +1444,24 @@ ] ], "3": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "4": [ [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + "STAR_ALIGN", + "samtools", + "1.21" ] ], "5": [ [ - { - "id": "test", - "single_end": false - }, - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "STAR_ALIGN", + "gawk", + "5.1.0" ] ], "6": [ @@ -1285,7 +1470,11 @@ "id": "test", "single_end": false }, - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "7": [ @@ -1294,7 +1483,7 @@ "id": "test", "single_end": false }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "8": [ @@ -1303,7 +1492,7 @@ "id": "test", "single_end": false }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "9": [ @@ -1312,10 +1501,7 @@ "id": "test", "single_end": false }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "bam": [ @@ -1464,8 +1650,26 @@ ] ] ], - "versions": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "wig": [ [ @@ -1479,10 +1683,10 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-12-11T16:28:53.816280805" + "timestamp": "2026-02-03T09:28:32.099657738" }, "homo_sapiens - paired_end - starfusion": { "content": [ @@ -1524,15 +1728,35 @@ [ ], - [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" - ] + { + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-12-11T16:27:14.136111964" + "timestamp": "2026-02-03T09:26:46.244829386" }, "homo_sapiens - paired_end - arriba": { "content": [ @@ -1573,15 +1797,35 @@ [ ], - [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" - ] + { + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-12-11T16:24:00.829462526" + "timestamp": "2026-02-03T09:22:41.580434639" }, "homo_sapiens - paired_end - starfusion - stub": { "content": [ @@ -1605,6 +1849,27 @@ ] ], "10": [ + [ + { + "id": "test", + "single_end": false + }, + "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "11": [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", + "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ] + ], + "12": [ [ { "id": "test", @@ -1617,7 +1882,7 @@ ] ] ], - "11": [ + "13": [ [ { "id": "test", @@ -1626,7 +1891,7 @@ "test.SJ.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "12": [ + "14": [ [ { "id": "test", @@ -1635,7 +1900,7 @@ "test.ReadsPerGene.out.tab:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "13": [ + "15": [ [ { "id": "test", @@ -1644,7 +1909,7 @@ "test.Chimeric.out.junction:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "14": [ + "16": [ [ { "id": "test", @@ -1653,7 +1918,7 @@ "test.out.sam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "15": [ + "17": [ [ { "id": "test", @@ -1662,7 +1927,7 @@ "test.Signal.UniqueMultiple.str1.out.wig:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "16": [ + "18": [ [ { "id": "test", @@ -1681,28 +1946,24 @@ ] ], "3": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "4": [ [ - { - "id": "test", - "single_end": false - }, - [ - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", - "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] + "STAR_ALIGN", + "samtools", + "1.21" ] ], "5": [ [ - { - "id": "test", - "single_end": false - }, - "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "STAR_ALIGN", + "gawk", + "5.1.0" ] ], "6": [ @@ -1711,7 +1972,11 @@ "id": "test", "single_end": false }, - "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + [ + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e", + "testXd.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "7": [ @@ -1720,7 +1985,7 @@ "id": "test", "single_end": false }, - "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "8": [ @@ -1729,7 +1994,7 @@ "id": "test", "single_end": false }, - "test.Aligned.unsort.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + "test.Aligned.sortedByCoord.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "9": [ @@ -1738,10 +2003,7 @@ "id": "test", "single_end": false }, - [ - "test.unmapped_1.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940", - "test.unmapped_2.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" - ] + "test.toTranscriptome.out.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "bam": [ @@ -1890,8 +2152,26 @@ ] ] ], - "versions": [ - "versions.yml:md5,b416145d7b5b8a080e832a7f7cde4c44" + "versions_gawk": [ + [ + "STAR_ALIGN", + "gawk", + "5.1.0" + ] + ], + "versions_samtools": [ + [ + "STAR_ALIGN", + "samtools", + "1.21" + ] + ], + "versions_star": [ + [ + "STAR_ALIGN", + "star", + "2.7.11b" + ] ], "wig": [ [ @@ -1905,9 +2185,9 @@ } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-12-11T16:29:20.015372487" + "timestamp": "2026-02-03T09:28:44.836246776" } } \ No newline at end of file diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index 1ca27833..5e86bff2 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -40,7 +40,6 @@ workflow FASTQ_ALIGN_RNA { STAR_ALIGN.out.log_progress, STAR_ALIGN.out.log_out, ) - ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first()) // Concatenate splice junction files def ch_splice_junctions_to_merge = group_junctions(STAR_ALIGN.out.spl_junc_tab) From 1dfaee82bd16a7f7a79b1af032332295d75a6d70 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:51:52 +0100 Subject: [PATCH 158/202] bump samtools/sormadup module --- modules.json | 2 +- modules/nf-core/samtools/sormadup/main.nf | 13 +-- modules/nf-core/samtools/sormadup/meta.yml | 47 +++++++--- .../samtools/sormadup/tests/main.nf.test | 52 ++++++----- .../samtools/sormadup/tests/main.nf.test.snap | 88 +++++++++++-------- 5 files changed, 118 insertions(+), 84 deletions(-) diff --git a/modules.json b/modules.json index aa368218..8332985d 100644 --- a/modules.json +++ b/modules.json @@ -115,7 +115,7 @@ }, "samtools/sormadup": { "branch": "master", - "git_sha": "c8be52dba1166c678e74cda9c3a3c221635c8bb1", + "git_sha": "0043d7ccd6b7278cd566db278c2f6ceb937e04ba", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sormadup/samtools-sormadup.diff" }, diff --git a/modules/nf-core/samtools/sormadup/main.nf b/modules/nf-core/samtools/sormadup/main.nf index 86afb479..15bcf5ff 100644 --- a/modules/nf-core/samtools/sormadup/main.nf +++ b/modules/nf-core/samtools/sormadup/main.nf @@ -8,7 +8,7 @@ process SAMTOOLS_SORMADUP { 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input), path(fasta) + tuple val(meta), path(input), path(fasta), path(fai) output: tuple val(meta), path("*.bam") , emit: bam, optional: true @@ -16,7 +16,7 @@ process SAMTOOLS_SORMADUP { tuple val(meta), path("*.csi") , emit: csi, optional: true tuple val(meta), path("*.crai") , emit: crai, optional: true tuple val(meta), path("*.metrics") , emit: metrics - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), topic: versions, emit: versions_samtools when: task.ext.when == null || task.ext.when @@ -71,10 +71,6 @@ process SAMTOOLS_SORMADUP { - \\ ${prefix}.${extension} - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: @@ -87,10 +83,5 @@ process SAMTOOLS_SORMADUP { """ touch ${prefix}.${extension} touch ${prefix}.metrics - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/samtools/sormadup/meta.yml b/modules/nf-core/samtools/sormadup/meta.yml index bb6295bf..02b9ad4e 100644 --- a/modules/nf-core/samtools/sormadup/meta.yml +++ b/modules/nf-core/samtools/sormadup/meta.yml @@ -1,4 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json name: "samtools_sormadup" description: Collate/Fixmate/Sort/Markdup SAM/BAM/CRAM file keywords: @@ -20,7 +19,8 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" args_id: "$args" identifier: biotools:samtools - samtools_collate: @@ -31,7 +31,8 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" args_id: "$args2" identifier: biotools:samtools - samtools_fixmate: @@ -42,7 +43,8 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" args_id: "$args3" identifier: biotools:samtools - samtools_sort: @@ -53,7 +55,8 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" args_id: "$args4" identifier: biotools:samtools - samtools_markdup: @@ -64,7 +67,8 @@ tools: homepage: http://www.htslib.org/ documentation: http://www.htslib.org/doc/samtools.html doi: 10.1093/bioinformatics/btp352 - licence: ["MIT"] + licence: + - "MIT" args_id: "$args5" identifier: biotools:samtools input: @@ -88,6 +92,11 @@ input: description: Reference genome file pattern: "*.{fasta,fa,fna}" ontologies: [] + - fai: + type: file + description: Reference genome index file + pattern: "*.fai" + ontologies: [] output: bam: - - meta: @@ -144,13 +153,27 @@ output: description: Duplicate metrics file pattern: "*.metrics" ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: The process the versions were collected from + - samtools: + type: string + description: The tool name + - "samtools version | sed '1!d;s/.* //'": + type: eval + description: The command used to generate the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - samtools: + type: string + description: The tool name + - "samtools version | sed '1!d;s/.* //'": + type: eval + description: The command used to generate the version of the tool authors: - "@matthdsm" maintainers: diff --git a/modules/nf-core/samtools/sormadup/tests/main.nf.test b/modules/nf-core/samtools/sormadup/tests/main.nf.test index 574d70c6..f9bc34e5 100644 --- a/modules/nf-core/samtools/sormadup/tests/main.nf.test +++ b/modules/nf-core/samtools/sormadup/tests/main.nf.test @@ -13,22 +13,23 @@ nextflow_process { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] """ } } then { + assert process.success assertAll( - { assert process.success }, { assert snapshot(process.out).match() } ) } @@ -42,23 +43,24 @@ nextflow_process { } process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] """ } } then { + assert process.success def fasta = params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta' assertAll( - { assert process.success }, { assert snapshot( cram( @@ -67,6 +69,7 @@ nextflow_process { ).getReadsMD5(), file(process.out.crai[0][1]).name, process.out.metrics, + process.out.findAll { key, val -> key.startsWith("versions") } ).match() } ) @@ -81,22 +84,23 @@ nextflow_process { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + ] """ } } then { + assert process.success assertAll( - { assert process.success }, { assert snapshot(process.out).match() } ) } diff --git a/modules/nf-core/samtools/sormadup/tests/main.nf.test.snap b/modules/nf-core/samtools/sormadup/tests/main.nf.test.snap index 7d36514f..9d04d5d2 100644 --- a/modules/nf-core/samtools/sormadup/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/sormadup/tests/main.nf.test.snap @@ -5,8 +5,7 @@ "0": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -23,20 +22,22 @@ "4": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.metrics:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "5": [ - "versions.yml:md5,f747eda74610b9e2ffbe38a0fe32605c" + [ + "SAMTOOLS_SORMADUP", + "samtools", + "1.22.1" + ] ], "bam": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -53,22 +54,25 @@ "metrics": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.metrics:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,f747eda74610b9e2ffbe38a0fe32605c" + "versions_samtools": [ + [ + "SAMTOOLS_SORMADUP", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T14:41:27.357324" + "timestamp": "2026-02-03T14:50:54.695296905" }, "sarscov2 - cram": { "content": [ @@ -77,18 +81,26 @@ [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.merged.metrics:md5,02eebd31b097e165e1b18d84b023f18d" ] - ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_SORMADUP", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-10T15:34:19.685282" + "timestamp": "2026-02-04T09:59:00.393494" }, "sarscov2 - bam": { "content": [ @@ -96,10 +108,9 @@ "0": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test.bam:md5,22ccf80de9847da1fa532f7774580554" + "test.bam:md5,b191a8b4d5b8b9884def3a613fee914a" ] ], "1": [ @@ -114,22 +125,24 @@ "4": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.metrics:md5,6093d8853805578a1868f22ff68177e7" ] ], "5": [ - "versions.yml:md5,f747eda74610b9e2ffbe38a0fe32605c" + [ + "SAMTOOLS_SORMADUP", + "samtools", + "1.22.1" + ] ], "bam": [ [ { - "id": "test", - "single_end": false + "id": "test" }, - "test.bam:md5,22ccf80de9847da1fa532f7774580554" + "test.bam:md5,b191a8b4d5b8b9884def3a613fee914a" ] ], "crai": [ @@ -144,21 +157,24 @@ "metrics": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.metrics:md5,6093d8853805578a1868f22ff68177e7" ] ], - "versions": [ - "versions.yml:md5,f747eda74610b9e2ffbe38a0fe32605c" + "versions_samtools": [ + [ + "SAMTOOLS_SORMADUP", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-10T14:41:11.744386" + "timestamp": "2026-02-04T10:01:06.229966" } } \ No newline at end of file From 1391207e61914361193d22b9653e45ae14b650ee Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:53:23 +0100 Subject: [PATCH 159/202] bump bcl2fastq/bclconvert modules --- modules.json | 4 ++-- modules/nf-core/bcl2fastq/main.nf | 2 +- modules/nf-core/bclconvert/main.nf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules.json b/modules.json index 8332985d..b2c74466 100644 --- a/modules.json +++ b/modules.json @@ -7,12 +7,12 @@ "nf-core": { "bcl2fastq": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "051e7c60dbdcc5d96ce7814c31426ce776f5319b", "installed_by": ["bcl_demultiplex"] }, "bclconvert": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "051e7c60dbdcc5d96ce7814c31426ce776f5319b", "installed_by": ["bcl_demultiplex", "modules"], "patch": "modules/nf-core/bclconvert/bclconvert.diff" }, diff --git a/modules/nf-core/bcl2fastq/main.nf b/modules/nf-core/bcl2fastq/main.nf index 2759a364..865f7951 100644 --- a/modules/nf-core/bcl2fastq/main.nf +++ b/modules/nf-core/bcl2fastq/main.nf @@ -1,5 +1,5 @@ process BCL2FASTQ { - tag {"$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } + tag { "$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } label 'process_high' container "nf-core/bcl2fastq:2.20.0.422" diff --git a/modules/nf-core/bclconvert/main.nf b/modules/nf-core/bclconvert/main.nf index b61f2240..db0dac03 100644 --- a/modules/nf-core/bclconvert/main.nf +++ b/modules/nf-core/bclconvert/main.nf @@ -1,5 +1,5 @@ process BCLCONVERT { - tag {"$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } + tag { "$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } label 'process_high' container "nf-core/bclconvert:4.4.6" From 69ad5d3365f63e7951f454f382b9a52167923dd8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:55:31 +0100 Subject: [PATCH 160/202] bump biobambam/bamsormadup module --- modules.json | 2 +- .../bamsormadup/biobambam-bamsormadup.diff | 24 +------- .../biobambam/bamsormadup/environment.yml | 2 +- modules/nf-core/biobambam/bamsormadup/main.nf | 6 +- .../biobambam/bamsormadup/tests/main.nf.test | 55 ++++++++++--------- .../bamsormadup/tests/main.nf.test.snap | 49 ++++++++++++----- 6 files changed, 72 insertions(+), 66 deletions(-) diff --git a/modules.json b/modules.json index b2c74466..7a31dc10 100644 --- a/modules.json +++ b/modules.json @@ -18,7 +18,7 @@ }, "biobambam/bamsormadup": { "branch": "master", - "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "git_sha": "051e7c60dbdcc5d96ce7814c31426ce776f5319b", "installed_by": ["modules"], "patch": "modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff" }, diff --git a/modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff b/modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff index 9c5a8c3e..ba8b093d 100644 --- a/modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff +++ b/modules/nf-core/biobambam/bamsormadup/biobambam-bamsormadup.diff @@ -4,34 +4,16 @@ Changes in component 'nf-core/biobambam/bamsormadup' Changes in 'biobambam/bamsormadup/main.nf': --- modules/nf-core/biobambam/bamsormadup/main.nf +++ modules/nf-core/biobambam/bamsormadup/main.nf -@@ -6,8 +6,7 @@ - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biobambam:2.0.183--h9f5acd7_1' : 'biocontainers/biobambam:2.0.183--h9f5acd7_1'}" +@@ -8,8 +8,7 @@ + 'biocontainers/biobambam:2.0.185--h85de650_1'}" input: - tuple val(meta) , path(bams, stageAs: "?/*") - tuple val(meta2), path(fasta) -+ tuple val(meta) , path(bams, stageAs: "?/*"), path(fasta) ++ tuple val(meta) , path(bams, stageAs: "?/*"), path(fasta), path(fai) output: tuple val(meta), path("*.bam") ,optional:true, emit: bam -@@ -25,7 +24,7 @@ - def prefix = task.ext.prefix ?: "${meta.id}" - def suffix = args.contains("outputformat=cram") ? "cram" : "bam" - def input_string = bams instanceof List ? bams.join(" I=") : bams -- if (args.contains("outputformat=cram") && reference == null) error "Reference required for CRAM output." -+ if (args.contains("outputformat=cram") && fasta == null) error "Reference required for CRAM output." - - """ - bamcat \\ -@@ -53,7 +52,7 @@ - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def suffix = args.contains("outputformat=cram") ? "cram" : "bam" -- if (args.contains("outputformat=cram") && reference == null) error "Reference required for CRAM output." -+ if (args.contains("outputformat=cram") && fasta == null) error "Reference required for CRAM output." - - """ - touch ${prefix}.${suffix} 'modules/nf-core/biobambam/bamsormadup/tests/main.nf.test.snap' is unchanged 'modules/nf-core/biobambam/bamsormadup/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/biobambam/bamsormadup/environment.yml b/modules/nf-core/biobambam/bamsormadup/environment.yml index 8c8c3166..948d0ad9 100644 --- a/modules/nf-core/biobambam/bamsormadup/environment.yml +++ b/modules/nf-core/biobambam/bamsormadup/environment.yml @@ -4,4 +4,4 @@ channels: - conda-forge - bioconda dependencies: - - bioconda::biobambam=2.0.183 + - bioconda::biobambam=2.0.185=h85de650_1 diff --git a/modules/nf-core/biobambam/bamsormadup/main.nf b/modules/nf-core/biobambam/bamsormadup/main.nf index bb6edc3e..032e718d 100644 --- a/modules/nf-core/biobambam/bamsormadup/main.nf +++ b/modules/nf-core/biobambam/bamsormadup/main.nf @@ -3,10 +3,12 @@ process BIOBAMBAM_BAMSORMADUP { label "process_medium" conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/biobambam:2.0.183--h9f5acd7_1' : 'biocontainers/biobambam:2.0.183--h9f5acd7_1'}" + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/biobambam:2.0.185--h85de650_1' : + 'biocontainers/biobambam:2.0.185--h85de650_1'}" input: - tuple val(meta) , path(bams, stageAs: "?/*"), path(fasta) + tuple val(meta) , path(bams, stageAs: "?/*"), path(fasta), path(fai) output: tuple val(meta), path("*.bam") ,optional:true, emit: bam diff --git a/modules/nf-core/biobambam/bamsormadup/tests/main.nf.test b/modules/nf-core/biobambam/bamsormadup/tests/main.nf.test index 43272ff1..0c4c8498 100644 --- a/modules/nf-core/biobambam/bamsormadup/tests/main.nf.test +++ b/modules/nf-core/biobambam/bamsormadup/tests/main.nf.test @@ -16,13 +16,13 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map - [ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) ] - ] - input[1] = [[:],[]] + ] + input[1] = [[:],[]] """ } @@ -32,13 +32,12 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - bam(process.out.bam[0][1]).getReadsMD5(), - process.out.bam_index, - process.out.cram, - file(process.out.metrics[0][1]).readLines()[3..5], - process.out.versions - ).match() - } + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.bam_index, + process.out.cram, + file(process.out.metrics[0][1]).readLines()[3..5], + process.out.versions.collect{ path(it).yaml } + ).match()} ) } } @@ -49,12 +48,12 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map - [ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) ] - ] - input[1] = [[:],[]] + ] + input[1] = [[:],[]] """ } @@ -64,13 +63,12 @@ nextflow_process { assertAll( { assert process.success }, { assert snapshot( - bam(process.out.bam[0][1]).getReadsMD5(), - process.out.bam_index, - process.out.cram, - file(process.out.metrics[0][1]).readLines()[3..5], - process.out.versions - ).match() - } + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.bam_index, + process.out.cram, + file(process.out.metrics[0][1]).readLines()[3..5], + process.out.versions.collect{ path(it).yaml } + ).match()} ) } } @@ -83,12 +81,12 @@ nextflow_process { process { """ input[0] = [ - [ id:'test', single_end:false ], // meta map - [ + [ id:'test', single_end:false ], // meta map + [ file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) ] - ] - input[1] = [[:],[]] + ] + input[1] = [[:],[]] """ } @@ -97,7 +95,10 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot( + process.out, + process.out.versions.collect{ path(it).yaml } + ).match() } ) } } diff --git a/modules/nf-core/biobambam/bamsormadup/tests/main.nf.test.snap b/modules/nf-core/biobambam/bamsormadup/tests/main.nf.test.snap index f7a41ca6..b820e405 100644 --- a/modules/nf-core/biobambam/bamsormadup/tests/main.nf.test.snap +++ b/modules/nf-core/biobambam/bamsormadup/tests/main.nf.test.snap @@ -14,14 +14,20 @@ "" ], [ - "versions.yml:md5,67ab301f20567acd9d0e648c2a3e158c" + { + "BIOBAMBAM_BAMSORMADUP": { + "bamcat": "2.0.185", + "bamcollate2": "2.0.185", + "bamsormadup": "2.0.185" + } + } ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-09-05T22:00:39.772883" + "timestamp": "2026-02-06T12:52:41.351378528" }, "test-biobambam-bamsormadup-multi-input": { "content": [ @@ -38,14 +44,20 @@ "testN\t0\t2820\t2\t0\t828\t0\t0.293617\t3807" ], [ - "versions.yml:md5,67ab301f20567acd9d0e648c2a3e158c" + { + "BIOBAMBAM_BAMSORMADUP": { + "bamcat": "2.0.185", + "bamcollate2": "2.0.185", + "bamsormadup": "2.0.185" + } + } ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-09-05T22:00:31.187999" + "timestamp": "2026-02-06T12:52:29.639539709" }, "test-biobambam-bamsormadup-single-input-stub": { "content": [ @@ -75,7 +87,7 @@ ] ], "4": [ - "versions.yml:md5,67ab301f20567acd9d0e648c2a3e158c" + "versions.yml:md5,a3e9cdb2ef49dc4722663257b23c5cb6" ], "bam": [ [ @@ -102,14 +114,23 @@ ] ], "versions": [ - "versions.yml:md5,67ab301f20567acd9d0e648c2a3e158c" + "versions.yml:md5,a3e9cdb2ef49dc4722663257b23c5cb6" ] - } + }, + [ + { + "BIOBAMBAM_BAMSORMADUP": { + "bamcat": "2.0.185", + "bamcollate2": "2.0.185", + "bamsormadup": "2.0.185" + } + } + ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-09-05T21:57:13.430982" + "timestamp": "2026-02-06T13:56:01.80534017" } } \ No newline at end of file From fe6f856ba61d1ee615ec87f77ff845f2d3330971 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:59:13 +0100 Subject: [PATCH 161/202] bump aligner module --- modules.json | 11 +- modules/nf-core/bowtie2/align/main.nf | 18 +- modules/nf-core/bowtie2/align/meta.yml | 66 ++- .../nf-core/bowtie2/align/tests/main.nf.test | 24 +- .../bowtie2/align/tests/main.nf.test.snap | 384 ++++++++++++++---- modules/nf-core/bwa/mem/tests/main.nf.test | 5 - .../nf-core/bwa/mem/tests/main.nf.test.snap | 35 +- modules/nf-core/bwamem2/mem/main.nf | 14 +- modules/nf-core/bwamem2/mem/meta.yml | 45 +- .../nf-core/bwamem2/mem/tests/main.nf.test | 8 +- .../bwamem2/mem/tests/main.nf.test.snap | 92 +++-- .../fastq_align_dna/fastq_align_dna.diff | 37 +- subworkflows/nf-core/fastq_align_dna/main.nf | 16 +- .../fastq_align_dna/tests/main.nf.test.snap | 32 +- 14 files changed, 537 insertions(+), 250 deletions(-) diff --git a/modules.json b/modules.json index 7a31dc10..5413652a 100644 --- a/modules.json +++ b/modules.json @@ -24,19 +24,19 @@ }, "bowtie2/align": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "ab146e7909edbf6dcc6459de57eef29dceb61d42", "installed_by": ["fastq_align_dna", "modules"], "patch": "modules/nf-core/bowtie2/align/bowtie2-align.diff" }, "bwa/mem": { "branch": "master", - "git_sha": "1c46359c837ef768b004519f535c30378e8289fc", + "git_sha": "966ba9887e2b04d89d64db06c01508873bde13b1", "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwa/mem/bwa-mem.diff" }, "bwamem2/mem": { "branch": "master", - "git_sha": "d86336f3e7ae0d5f76c67b0859409769cfeb2af2", + "git_sha": "5dd46a36fca68d6ad1a6b22ec47adc8c6863717d", "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/bwamem2/mem/bwamem2-mem.diff" }, @@ -160,8 +160,9 @@ }, "fastq_align_dna": { "branch": "master", - "git_sha": "070ddae7fb59384d3d85bf69eb9a1d71ab33ada9", - "installed_by": ["subworkflows"] + "git_sha": "5dd46a36fca68d6ad1a6b22ec47adc8c6863717d", + "installed_by": ["subworkflows"], + "patch": "subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff" }, "utils_nextflow_pipeline": { "branch": "master", diff --git a/modules/nf-core/bowtie2/align/main.nf b/modules/nf-core/bowtie2/align/main.nf index 4f153522..86aa8bef 100644 --- a/modules/nf-core/bowtie2/align/main.nf +++ b/modules/nf-core/bowtie2/align/main.nf @@ -20,7 +20,9 @@ process BOWTIE2_ALIGN { tuple val(meta), path("*.crai") , emit: crai , optional:true tuple val(meta), path("*.log") , emit: log tuple val(meta), path("*fastq.gz") , emit: fastq , optional:true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bowtie2'), eval("bowtie2 --version 2>&1 | sed -n '1s/.*bowtie2-align-s version //p'"), emit: versions_bowtie2, topic: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), emit: versions_samtools, topic: versions + tuple val("${task.process}"), val('pigz'), eval("pigz --version 2>&1 | sed 's/pigz //'"), emit: versions_pigz, topic: versions when: task.ext.when == null || task.ext.when @@ -68,13 +70,6 @@ process BOWTIE2_ALIGN { if [ -f ${prefix}.unmapped.fastq.2.gz ]; then mv ${prefix}.unmapped.fastq.2.gz ${prefix}.unmapped_2.fastq.gz fi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS """ stub: @@ -102,13 +97,6 @@ process BOWTIE2_ALIGN { ${create_index} touch ${prefix}.bowtie2.log ${create_unmapped} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bowtie2: \$(echo \$(bowtie2 --version 2>&1) | sed 's/^.*bowtie2-align-s version //; s/ .*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' ) - END_VERSIONS """ } diff --git a/modules/nf-core/bowtie2/align/meta.yml b/modules/nf-core/bowtie2/align/meta.yml index 0c12b28a..2d8051da 100644 --- a/modules/nf-core/bowtie2/align/meta.yml +++ b/modules/nf-core/bowtie2/align/meta.yml @@ -123,13 +123,67 @@ output: pattern: "*.fastq.gz" ontologies: - edam: http://edamontology.org/format_3989 # GZIP format + versions_bowtie2: + - - ${task.process}: + type: string + description: The name of the process + - bowtie2: + type: string + description: The name of the tool + - "bowtie2 --version 2>&1 | sed -n '1s/.*bowtie2-align-s version //p'": + type: eval + description: The expression to obtain the version of bowtie2 + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - "samtools version | sed '1!d;s/.* //'": + type: eval + description: The expression to obtain the version of samtools + versions_pigz: + - - ${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 //'": + type: eval + description: The expression to obtain the version of pigz + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - bowtie2: + type: string + description: The name of the tool + - "bowtie2 --version 2>&1 | sed -n '1s/.*bowtie2-align-s version //p'": + type: eval + description: The expression to obtain the version of bowtie2 + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - "samtools version | sed '1!d;s/.* //'": + type: eval + description: The expression to obtain the version of samtools + - - ${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 //'": + type: eval + description: The expression to obtain the version of pigz + authors: - "@joseespinosa" - "@drpatelh" diff --git a/modules/nf-core/bowtie2/align/tests/main.nf.test b/modules/nf-core/bowtie2/align/tests/main.nf.test index 0de5950f..1705b66d 100644 --- a/modules/nf-core/bowtie2/align/tests/main.nf.test +++ b/modules/nf-core/bowtie2/align/tests/main.nf.test @@ -47,7 +47,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -93,7 +93,7 @@ nextflow_process { file(process.out.sam[0][1]).readLines()[0..4], process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -139,7 +139,7 @@ nextflow_process { file(process.out.sam[0][1]).readLines()[0..4], process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -184,7 +184,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -232,7 +232,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -280,7 +280,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -326,7 +326,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -375,7 +375,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -423,7 +423,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -468,7 +468,7 @@ nextflow_process { file(process.out.bam[0][1]).name, process.out.log, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) @@ -566,7 +566,7 @@ nextflow_process { file(process.out.csi[0][1]).name, file(process.out.log[0][1]).name, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } @@ -613,7 +613,7 @@ nextflow_process { file(process.out.csi[0][1]).name, file(process.out.log[0][1]).name, process.out.fastq, - process.out.versions + process.out.findAll { key, val -> key.startsWith('versions') } ).match() } ) } diff --git a/modules/nf-core/bowtie2/align/tests/main.nf.test.snap b/modules/nf-core/bowtie2/align/tests/main.nf.test.snap index 4ffd62e9..c8c6d4b5 100644 --- a/modules/nf-core/bowtie2/align/tests/main.nf.test.snap +++ b/modules/nf-core/bowtie2/align/tests/main.nf.test.snap @@ -14,15 +14,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T12:45:59.038637" + "timestamp": "2026-02-03T15:18:12.706444258" }, "sarscov2 - fastq, index, fasta, false, false - sam2": { "content": [ @@ -45,15 +65,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-25T08:28:51.065380563" + "timestamp": "2026-02-03T15:17:39.204319466" }, "sarscov2 - [fastq1, fastq2], index, fasta, true, true - cram": { "content": [ @@ -81,15 +121,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-03-24T11:38:12.222762" + "timestamp": "2026-02-03T10:46:53.843035" }, "sarscov2 - fastq, index, fasta, true, false - bam": { "content": [ @@ -106,15 +166,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T12:46:12.766061" + "timestamp": "2026-02-03T15:18:25.788314396" }, "sarscov2 - fastq, large_index, fasta, false, false - bam": { "content": [ @@ -131,15 +211,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T11:24:03.499074" + "timestamp": "2026-02-03T15:18:06.123712951" }, "sarscov2 - fastq, index, fasta, false, true - bam": { "content": [ @@ -156,15 +256,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T11:08:30.329879" + "timestamp": "2026-02-03T15:17:45.85694104" }, "sarscov2 - fastq, index, fasta, true, false - stub": { "content": [ @@ -174,15 +294,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T13:48:54.684859" + "timestamp": "2026-02-03T15:18:45.009237771" }, "sarscov2 - [fastq1, fastq2], index, fasta, false, false - bam": { "content": [ @@ -199,15 +339,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T11:13:41.815354" + "timestamp": "2026-02-03T15:17:52.571603438" }, "sarscov2 - [fastq1, fastq2], index, fasta, false, false - stub": { "content": [ @@ -217,15 +377,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T13:06:00.821232" + "timestamp": "2026-02-03T15:18:38.851739544" }, "sarscov2 - fastq, index, fasta, false, false - sam": { "content": [ @@ -248,15 +428,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-25T08:28:26.086145568" + "timestamp": "2026-02-03T15:17:32.669170305" }, "sarscov2 - [fastq1, fastq2], index, fasta, true, false - bam": { "content": [ @@ -273,15 +473,35 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T12:46:05.840695" + "timestamp": "2026-02-03T15:18:19.168328408" }, "sarscov2 - [fastq1, fastq2], index, fasta, false, true - bam": { "content": [ @@ -298,14 +518,34 @@ [ ], - [ - "versions.yml:md5,2768d626cdb54c9a9b5ed7aecbc3ca11" - ] + { + "versions_bowtie2": [ + [ + "BOWTIE2_ALIGN", + "bowtie2", + "2.5.4" + ] + ], + "versions_pigz": [ + [ + "BOWTIE2_ALIGN", + "pigz", + "2.8" + ] + ], + "versions_samtools": [ + [ + "BOWTIE2_ALIGN", + "samtools", + "1.21" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T11:18:52.825034" + "timestamp": "2026-02-03T15:17:59.201650301" } } \ No newline at end of file diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test b/modules/nf-core/bwa/mem/tests/main.nf.test index 5de2c2f4..d7b69b9e 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test +++ b/modules/nf-core/bwa/mem/tests/main.nf.test @@ -49,7 +49,6 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5() ).match() } @@ -84,7 +83,6 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5() ).match() } @@ -120,7 +118,6 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5() ).match() } @@ -156,7 +153,6 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5() ).match() } @@ -192,7 +188,6 @@ nextflow_process { process.out.csi, process.out.crai, process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5() ).match() } diff --git a/modules/nf-core/bwa/mem/tests/main.nf.test.snap b/modules/nf-core/bwa/mem/tests/main.nf.test.snap index 51496a3c..70b7b89b 100644 --- a/modules/nf-core/bwa/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwa/mem/tests/main.nf.test.snap @@ -13,14 +13,13 @@ [ "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "37b4ee1649480bd1ff98666447f64fa5", "798439cbd7fd81cbcc5078022dc5479d" ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-23T11:05:11.396076472" + "timestamp": "2026-01-26T15:16:52.718077761" }, "Single-End Sort": { "content": [ @@ -36,14 +35,13 @@ [ "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "57106634fcaf3bf503d5487a7717c5d3", "94fcf617f5b994584c4e8d4044e16b4f" ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-23T11:05:19.529514701" + "timestamp": "2026-01-26T15:17:00.554958251" }, "Paired-End": { "content": [ @@ -59,14 +57,13 @@ [ "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "57770ff7c7186ed40c42f3d71c16ce3c", "57aeef88ed701a8ebc8e2f0a381b2a6" ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-23T11:05:27.433790935" + "timestamp": "2026-01-26T15:17:08.162122031" }, "Paired-End Sort": { "content": [ @@ -82,14 +79,13 @@ [ "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "8f5d8f83b485dcfa1f47a73ae645e3a7", "af8628d9df18b2d3d4f6fd47ef2bb872" ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-23T11:05:35.775774487" + "timestamp": "2026-01-26T15:17:15.713464923" }, "Single-end - stub": { "content": [ @@ -182,14 +178,13 @@ [ "versions.yml:md5,f882069f942ae2a95e2c91f82e4445c6" ], - "57770ff7c7186ed40c42f3d71c16ce3c", "57aeef88ed701a8ebc8e2f0a381b2a6" ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-23T11:05:43.764589371" + "timestamp": "2026-01-26T15:17:23.395002931" }, "Paired-end - stub": { "content": [ diff --git a/modules/nf-core/bwamem2/mem/main.nf b/modules/nf-core/bwamem2/mem/main.nf index 830c1710..5ac348f2 100644 --- a/modules/nf-core/bwamem2/mem/main.nf +++ b/modules/nf-core/bwamem2/mem/main.nf @@ -17,7 +17,7 @@ process BWAMEM2_MEM { tuple val(meta), path("*.cram") , emit: cram, optional:true tuple val(meta), path("*.crai") , emit: crai, optional:true tuple val(meta), path("*.csi") , emit: csi , optional:true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('bwamem2'), eval('bwa-mem2 version | grep -o -E "[0-9]+(\\.[0-9]+)+"'), emit: versions_bwamem2, topic: versions when: task.ext.when == null || task.ext.when @@ -44,12 +44,6 @@ process BWAMEM2_MEM { \$INDEX \\ $reads \\ | samtools $samtools_command $args2 -@ $task.cpus ${reference} -o ${prefix}.${extension} - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: @@ -71,11 +65,5 @@ process BWAMEM2_MEM { """ touch ${prefix}.${extension} ${create_index} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/bwamem2/mem/meta.yml b/modules/nf-core/bwamem2/mem/meta.yml index 6c7d1728..bcfd006d 100644 --- a/modules/nf-core/bwamem2/mem/meta.yml +++ b/modules/nf-core/bwamem2/mem/meta.yml @@ -16,7 +16,8 @@ tools: homepage: https://github.com/bwa-mem2/bwa-mem2 documentation: http://www.htslib.org/doc/samtools.html arxiv: arXiv:1303.3997 - licence: ["MIT"] + licence: + - "MIT" identifier: "biotools:bwa-mem2" input: - - meta: @@ -30,8 +31,8 @@ input: List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively. ontologies: - - edam: "http://edamontology.org/data_2044" # Sequence - - edam: "http://edamontology.org/format_1930" # FASTQ + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1930" - - meta2: type: map description: | @@ -42,7 +43,7 @@ input: description: BWA genome index files pattern: "Directory containing BWA index *.{0132,amb,ann,bwt.2bit.64,pac}" ontologies: - - edam: "http://edamontology.org/data_3210" # Genome index + - edam: "http://edamontology.org/data_3210" - - meta3: type: map description: | @@ -53,8 +54,8 @@ input: description: Reference genome in FASTA format pattern: "*.{fa,fasta,fna}" ontologies: - - edam: "http://edamontology.org/data_2044" # Sequence - - edam: "http://edamontology.org/format_1929" # FASTA + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1929" - sort_bam: type: boolean description: use samtools sort (true) or samtools view (false) @@ -71,7 +72,7 @@ output: description: Output SAM file containing read alignments pattern: "*.{sam}" ontologies: - - edam: "http://edamontology.org/format_2573" # SAM + - edam: "http://edamontology.org/format_2573" bam: - - meta: type: map @@ -83,7 +84,7 @@ output: description: Output BAM file containing read alignments pattern: "*.{bam}" ontologies: - - edam: "http://edamontology.org/format_2572" # BAM + - edam: "http://edamontology.org/format_2572" cram: - - meta: type: map @@ -95,7 +96,7 @@ output: description: Output CRAM file containing read alignments pattern: "*.{cram}" ontologies: - - edam: "http://edamontology.org/format_3462" # CRAM + - edam: "http://edamontology.org/format_3462" crai: - - meta: type: map @@ -118,13 +119,27 @@ output: description: Index file for BAM file pattern: "*.{csi}" ontologies: [] + versions_bwamem2: + - - ${task.process}: + type: string + description: The name of the process + - bwamem2: + type: string + description: The name of the tool + - bwa-mem2 version | grep -o -E "[0-9]+(\.[0-9]+)+": + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - bwamem2: + type: string + description: The name of the tool + - bwa-mem2 version | grep -o -E "[0-9]+(\.[0-9]+)+": + type: eval + description: The expression to obtain the version of the tool authors: - "@maxulysse" - "@matthdsm" diff --git a/modules/nf-core/bwamem2/mem/tests/main.nf.test b/modules/nf-core/bwamem2/mem/tests/main.nf.test index 9e0ab14a..20e37254 100644 --- a/modules/nf-core/bwamem2/mem/tests/main.nf.test +++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test @@ -46,7 +46,7 @@ nextflow_process { { assert snapshot( bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5(), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } @@ -75,7 +75,7 @@ nextflow_process { { assert snapshot( bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5(), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } @@ -107,7 +107,7 @@ nextflow_process { { assert snapshot( bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5(), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions")} ).match() } ) } @@ -139,7 +139,7 @@ nextflow_process { { assert snapshot( bam(process.out.bam[0][1]).getHeaderMD5(), bam(process.out.bam[0][1]).getReadsMD5(), - process.out.versions + process.out.findAll { key, val -> key.startsWith("versions")} ).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 index b7d40a68..74763935 100644 --- a/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap +++ b/modules/nf-core/bwamem2/mem/tests/main.nf.test.snap @@ -3,15 +3,21 @@ "content": [ "e414c2d48e2e44c2c52c20ecd88e8bd8", "57aeef88ed701a8ebc8e2f0a381b2a6", - [ - "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" - ] + { + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-23T11:44:52.73673293" + "timestamp": "2026-02-09T16:25:00.500092" }, "sarscov2 - [fastq1, fastq2], index, fasta, true - stub": { "content": [ @@ -44,7 +50,11 @@ ] ], "5": [ - "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] ], "bam": [ [ @@ -73,57 +83,79 @@ "sam": [ ], - "versions": [ - "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-23T11:45:14.834888709" + "timestamp": "2026-02-09T16:25:22.004027" }, "sarscov2 - [fastq1, fastq2], index, fasta, true": { "content": [ "716ed1ef39deaad346ca7cf86e08f959", "af8628d9df18b2d3d4f6fd47ef2bb872", - [ - "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" - ] + { + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-23T11:45:04.750057645" + "timestamp": "2026-02-09T16:25:14.131056" }, "sarscov2 - fastq, index, fasta, false": { "content": [ "283a83f604f3f5338acedfee349dccf4", "798439cbd7fd81cbcc5078022dc5479d", - [ - "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" - ] + { + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-23T11:44:28.57550711" + "timestamp": "2026-02-09T16:24:34.624533" }, "sarscov2 - fastq, index, fasta, true": { "content": [ "ed99048bb552cac58e39923b550b6d5b", "94fcf617f5b994584c4e8d4044e16b4f", - [ - "versions.yml:md5,3574188ab1f33fd99cff9f5562dfb885" - ] + { + "versions_bwamem2": [ + [ + "BWAMEM2_MEM", + "bwamem2", + "2.2.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-23T11:44:40.437183765" + "timestamp": "2026-02-09T16:24:47.191245" } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff b/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff index 3b39944b..dbe123ad 100644 --- a/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff +++ b/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff @@ -3,24 +3,7 @@ Changes in component 'nf-core/fastq_align_dna' Changes in 'fastq_align_dna/main.nf': --- subworkflows/nf-core/fastq_align_dna/main.nf +++ subworkflows/nf-core/fastq_align_dna/main.nf -@@ -5,68 +5,77 @@ - // - - --include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" --include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' --include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' --include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" --include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' --include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" -+include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" -+include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' -+include { BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' -+include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" -+include { SNAPALIGNER_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' -+include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" - - +@@ -16,55 +16,66 @@ workflow FASTQ_ALIGN_DNA { take: @@ -70,7 +53,6 @@ Changes in 'fastq_align_dna/main.nf': - BOWTIE2_ALIGN(ch_reads, ch_aligner_index, ch_fasta, false, sort) // if aligner is bowtie2 + BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) // if aligner is bowtie2 ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) -- ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions) - } - else if (aligner == 'bwamem'){ - BWAMEM1_MEM (ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is bwa-mem @@ -87,7 +69,6 @@ Changes in 'fastq_align_dna/main.nf': + + BWAMEM2_MEM (ch_to_align.bwamem2, sort) // If aligner is bwa-mem2 ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) -- ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions) - } - else if (aligner == 'dragmap'){ - DRAGMAP_ALIGN(ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is dragmap @@ -106,13 +87,6 @@ Changes in 'fastq_align_dna/main.nf': - } - else if (aligner == 'strobealign'){ - STROBEALIGN (ch_reads, ch_fasta, ch_aligner_index, sort) // If aligner is strobealign -- ch_bam = ch_bam.mix(STROBEALIGN.out.bam) -- ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) -- ch_versions = ch_versions.mix(STROBEALIGN.out.versions) -- } -- else { -- error "Unknown aligner: ${aligner}" -- } + ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions.first()) + + SNAPALIGNER_ALIGN(ch_to_align.snap) // If aligner is snap @@ -121,8 +95,13 @@ Changes in 'fastq_align_dna/main.nf': + ch_versions = ch_versions.mix(SNAPALIGNER_ALIGN.out.versions.first()) + + STROBEALIGN(ch_to_align.strobe, sort) // If aligner is strobealign -+ ch_bam = ch_bam.mix(STROBEALIGN.out.bam) -+ ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) + ch_bam = ch_bam.mix(STROBEALIGN.out.bam) + ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) +- ch_versions = ch_versions.mix(STROBEALIGN.out.versions) +- } +- else { +- error "Unknown aligner: ${aligner}" +- } + ch_versions = ch_versions.mix(STROBEALIGN.out.versions.first()) emit: diff --git a/subworkflows/nf-core/fastq_align_dna/main.nf b/subworkflows/nf-core/fastq_align_dna/main.nf index 95cdf670..37e62d70 100644 --- a/subworkflows/nf-core/fastq_align_dna/main.nf +++ b/subworkflows/nf-core/fastq_align_dna/main.nf @@ -5,12 +5,12 @@ // -include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" -include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' -include { BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' -include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" -include { SNAPALIGNER_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' -include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" +include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" +include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' +include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' +include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" +include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' +include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" @@ -73,8 +73,8 @@ workflow FASTQ_ALIGN_DNA { ch_versions = ch_versions.mix(SNAPALIGNER_ALIGN.out.versions.first()) STROBEALIGN(ch_to_align.strobe, sort) // If aligner is strobealign - ch_bam = ch_bam.mix(STROBEALIGN.out.bam) - ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) + ch_bam = ch_bam.mix(STROBEALIGN.out.bam) + ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) ch_versions = ch_versions.mix(STROBEALIGN.out.versions.first()) emit: diff --git a/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap b/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap index 9e34d924..60e6bea9 100644 --- a/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap +++ b/subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap @@ -9,14 +9,14 @@ ], [ - "versions.yml:md5,792091aac50160e3fbc865eba482e0c4" + ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-23T11:46:20.36265064" + "timestamp": "2026-02-09T16:57:50.690737" }, "test_fastq_align_dragmap_PE": { "content": [ @@ -113,14 +113,14 @@ ], [ - "versions.yml:md5,792091aac50160e3fbc865eba482e0c4" + ] ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-23T11:46:07.813351063" + "timestamp": "2026-02-09T16:57:37.848527" }, "test_fastq_align_bwa_mem_PE": { "content": [ @@ -144,13 +144,13 @@ "test_fastq_align_bowtie2_SE": { "content": [ "test.bam", - "versions.yml:md5,ef191e9624d747934f15d368715d87db" + null ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T14:20:30.468391" + "timestamp": "2026-02-03T15:14:58.560970561" }, "test_fastq_align_dragmap_SE": { "content": [ @@ -174,13 +174,13 @@ "test_fastq_align_bowtie2_PE": { "content": [ "test.bam", - "versions.yml:md5,ef191e9624d747934f15d368715d87db" + null ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-03-24T14:25:41.372083" + "timestamp": "2026-02-03T15:15:05.862448716" }, "test_fastq_align_snapaligner_PE": { "content": [ From fca02a203d4bbaf161bbd1afe595a920ec4b6e26 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 20:05:41 +0100 Subject: [PATCH 162/202] update remaining modules --- modules.json | 12 +- modules/nf-core/fastp/main.nf | 22 +- modules/nf-core/fastp/meta.yml | 29 +- modules/nf-core/fastp/tests/main.nf.test | 18 +- modules/nf-core/fastp/tests/main.nf.test.snap | 326 ++++++++++++------ modules/nf-core/gnu/sort/main.nf | 10 +- modules/nf-core/gnu/sort/meta.yml | 26 +- modules/nf-core/gnu/sort/tests/main.nf.test | 20 +- .../nf-core/gnu/sort/tests/main.nf.test.snap | 110 +++--- modules/nf-core/mosdepth/environment.yml | 3 +- modules/nf-core/mosdepth/main.nf | 25 +- modules/nf-core/mosdepth/meta.yml | 28 +- modules/nf-core/mosdepth/mosdepth.diff | 4 +- modules/nf-core/mosdepth/tests/main.nf.test | 68 ++-- .../nf-core/mosdepth/tests/main.nf.test.snap | 112 ++++-- .../nf-core/mosdepth/tests/nextflow.config | 5 + .../nf-core/mosdepth/tests/quantized.config | 3 - .../nf-core/mosdepth/tests/threshold.config | 3 - modules/nf-core/mosdepth/tests/window.config | 3 - modules/nf-core/samtools/convert/main.nf | 15 +- modules/nf-core/samtools/convert/meta.yml | 31 +- .../samtools/convert/tests/main.nf.test | 87 ++--- .../samtools/convert/tests/main.nf.test.snap | 158 ++++----- modules/nf-core/samtools/coverage/main.nf | 7 +- modules/nf-core/samtools/coverage/meta.yml | 32 +- .../samtools/coverage/tests/main.nf.test.snap | 60 +++- modules/nf-core/samtools/sort/meta.yml | 1 + 27 files changed, 716 insertions(+), 502 deletions(-) create mode 100644 modules/nf-core/mosdepth/tests/nextflow.config delete mode 100644 modules/nf-core/mosdepth/tests/quantized.config delete mode 100644 modules/nf-core/mosdepth/tests/threshold.config delete mode 100644 modules/nf-core/mosdepth/tests/window.config diff --git a/modules.json b/modules.json index 5413652a..4ec35dbd 100644 --- a/modules.json +++ b/modules.json @@ -48,12 +48,12 @@ }, "fastp": { "branch": "master", - "git_sha": "b8f1de0ac853ae5b56c63450d47438f899c553d0", + "git_sha": "a331ecfd1aa48b2b2298aab23bb4516c800e410b", "installed_by": ["modules"] }, "gnu/sort": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "f35fac92470336be03b96bae7547d81d88a3331a", "installed_by": ["modules"] }, "md5sum": { @@ -63,7 +63,7 @@ }, "mosdepth": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "6832b69ef7f98c54876d6436360b6b945370c615", "installed_by": ["modules"], "patch": "modules/nf-core/mosdepth/mosdepth.diff" }, @@ -93,13 +93,13 @@ }, "samtools/convert": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "51fa714751883254ede046c50acf20076b46ca81", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/convert/samtools-convert.diff" }, "samtools/coverage": { "branch": "master", - "git_sha": "e753770db613ce014b3c4bc94f6cba443427b726", + "git_sha": "4154ced8a82f5f17b57e48c68dbb03ecb0e9ca14", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, @@ -121,7 +121,7 @@ }, "samtools/sort": { "branch": "master", - "git_sha": "0b2435805036a16dcdcf21533632d956b8273ac4", + "git_sha": "5cb9a8694da0a0e550921636bb60bc8c56445fd7", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/sort/samtools-sort.diff" }, diff --git a/modules/nf-core/fastp/main.nf b/modules/nf-core/fastp/main.nf index 7538fc3a..e13509ca 100644 --- a/modules/nf-core/fastp/main.nf +++ b/modules/nf-core/fastp/main.nf @@ -20,7 +20,7 @@ process FASTP { tuple val(meta), path('*.log') , emit: log tuple val(meta), path('*.fail.fastq.gz') , optional:true, emit: reads_fail tuple val(meta), path('*.merged.fastq.gz'), optional:true, emit: reads_merged - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('fastp'), eval('fastp --version 2>&1 | sed -e "s/fastp //g"'), emit: versions_fastp, topic: versions when: task.ext.when == null || task.ext.when @@ -49,11 +49,6 @@ process FASTP { $args \\ 2>| >(tee ${prefix}.fastp.log >&2) \\ | gzip -c > ${prefix}.fastp.fastq.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g") - END_VERSIONS """ } else if (meta.single_end) { """ @@ -69,11 +64,6 @@ process FASTP { $fail_fastq \\ $args \\ 2>| >(tee ${prefix}.fastp.log >&2) - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g") - END_VERSIONS """ } else { def merge_fastq = save_merged ? "-m --merged_out ${prefix}.merged.fastq.gz" : '' @@ -94,11 +84,6 @@ process FASTP { --detect_adapter_for_pe \\ $args \\ 2>| >(tee ${prefix}.fastp.log >&2) - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g") - END_VERSIONS """ } @@ -115,10 +100,5 @@ process FASTP { touch "${prefix}.fastp.json" touch "${prefix}.fastp.html" touch "${prefix}.fastp.log" - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - fastp: \$(fastp --version 2>&1 | sed -e "s/fastp //g") - END_VERSIONS """ } diff --git a/modules/nf-core/fastp/meta.yml b/modules/nf-core/fastp/meta.yml index 324025fe..a67be395 100644 --- a/modules/nf-core/fastp/meta.yml +++ b/modules/nf-core/fastp/meta.yml @@ -54,6 +54,7 @@ output: description: The trimmed/modified/unmerged fastq reads pattern: "*fastp.fastq.gz" ontologies: + - edam: http://edamontology.org/format_1930 # FASTQ - edam: http://edamontology.org/format_3989 # GZIP format json: - - meta: @@ -100,6 +101,7 @@ output: description: Reads the failed the preprocessing pattern: "*fail.fastq.gz" ontologies: + - edam: http://edamontology.org/format_1930 # FASTQ - edam: http://edamontology.org/format_3989 # GZIP format reads_merged: - - meta: @@ -112,16 +114,31 @@ output: description: Reads that were successfully merged pattern: "*.{merged.fastq.gz}" ontologies: [] + versions_fastp: + - - "${task.process}": + type: string + description: The name of the process + - fastp: + type: string + description: The name of the tool + - 'fastp --version 2>&1 | sed -e "s/fastp //g"': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - "${task.process}": + type: string + description: The name of the process + - fastp: + type: string + description: The name of the tool + - 'fastp --version 2>&1 | sed -e "s/fastp //g"': + type: eval + description: The expression to obtain the version of the tool authors: - "@drpatelh" - "@kevinmenden" + - "@eit-maxlcummins" maintainers: - "@drpatelh" - "@kevinmenden" diff --git a/modules/nf-core/fastp/tests/main.nf.test b/modules/nf-core/fastp/tests/main.nf.test index 5125705c..b7901578 100644 --- a/modules/nf-core/fastp/tests/main.nf.test +++ b/modules/nf-core/fastp/tests/main.nf.test @@ -39,7 +39,7 @@ nextflow_process { process.out.reads, process.out.reads_fail, process.out.reads_merged, - process.out.versions).match() + process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } @@ -80,7 +80,7 @@ nextflow_process { process.out.reads, process.out.reads_fail, process.out.reads_merged, - process.out.versions).match() } + process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } } @@ -117,7 +117,7 @@ nextflow_process { { assert process.out.reads_merged == [] }, { assert snapshot( process.out.reads, - process.out.versions).match() } + process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } } @@ -154,7 +154,7 @@ nextflow_process { process.out.reads, process.out.reads_fail, process.out.reads_merged, - process.out.versions).match() } + process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } } @@ -194,7 +194,7 @@ nextflow_process { process.out.reads, process.out.reads_fail, process.out.reads_merged, - process.out.versions).match() } + process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } } @@ -233,7 +233,7 @@ nextflow_process { process.out.reads, process.out.reads_fail, process.out.reads_merged, - process.out.versions).match() }, + process.out.findAll { key, val -> key.startsWith('versions') }).match() }, ) } } @@ -272,7 +272,7 @@ nextflow_process { process.out.reads, process.out.reads_fail, process.out.reads_merged, - process.out.versions).match() } + process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } } @@ -312,7 +312,7 @@ nextflow_process { process.out.reads_fail, process.out.reads_merged, process.out.reads_merged, - process.out.versions).match() } + process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } } @@ -354,7 +354,7 @@ nextflow_process { process.out.reads_fail, process.out.reads_merged, process.out.reads_merged, - process.out.versions).match() } + process.out.findAll { key, val -> key.startsWith('versions') }).match() } ) } } diff --git a/modules/nf-core/fastp/tests/main.nf.test.snap b/modules/nf-core/fastp/tests/main.nf.test.snap index 2276fc08..56772358 100644 --- a/modules/nf-core/fastp/tests/main.nf.test.snap +++ b/modules/nf-core/fastp/tests/main.nf.test.snap @@ -39,7 +39,11 @@ ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -77,16 +81,20 @@ "reads_merged": [ ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-11T09:55:42.073182" + "timestamp": "2026-01-22T13:00:52.14535813" }, "test_fastp_paired_end": { "content": [ @@ -108,15 +116,21 @@ [ ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-12-22T14:32:22.887952042" + "timestamp": "2026-01-23T09:46:26.421773402" }, "test_fastp_paired_end_merged_adapterlist": { "content": [ @@ -144,15 +158,21 @@ "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" ] ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-12-22T14:32:53.752975682" + "timestamp": "2026-01-23T09:46:59.832295907" }, "test_fastp_single_end_qc_only": { "content": [ @@ -174,15 +194,21 @@ [ ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-19T16:23:36.149003" + "timestamp": "2026-01-23T09:47:06.486959565" }, "test_fastp_paired_end_trim_fail": { "content": [ @@ -214,15 +240,21 @@ [ ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-12-22T14:32:41.270456637" + "timestamp": "2026-01-23T09:46:46.736511024" }, "fastp - stub test_fastp_interleaved": { "content": [ @@ -270,7 +302,11 @@ ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -314,16 +350,20 @@ "reads_merged": [ ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-11T09:55:19.47199" + "timestamp": "2026-01-22T13:00:16.097071654" }, "test_fastp_single_end - stub": { "content": [ @@ -371,7 +411,11 @@ ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -415,16 +459,20 @@ "reads_merged": [ ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-11T09:55:09.617001" + "timestamp": "2026-01-22T13:00:03.317192706" }, "test_fastp_paired_end_merged_adapterlist - stub": { "content": [ @@ -481,7 +529,11 @@ ] ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -534,16 +586,20 @@ "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-12-22T14:33:44.204950729" + "timestamp": "2026-01-22T13:00:44.851708205" }, "test_fastp_paired_end_merged - stub": { "content": [ @@ -600,7 +656,11 @@ ] ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -653,16 +713,20 @@ "test.merged.fastq.gz:md5,68b329da9893e34099c7d8ad5cb9c940" ] ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-12-22T14:33:38.518882433" + "timestamp": "2026-01-22T13:00:37.581047713" }, "test_fastp_paired_end_merged": { "content": [ @@ -690,15 +754,21 @@ "test.merged.fastq.gz:md5,c873bb1ab3fa859dcc47306465e749d5" ] ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-12-22T14:32:47.366974895" + "timestamp": "2026-01-23T09:46:53.190202914" }, "test_fastp_paired_end - stub": { "content": [ @@ -749,7 +819,11 @@ ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -796,16 +870,20 @@ "reads_merged": [ ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-12-22T14:33:16.494574544" + "timestamp": "2026-01-22T13:00:09.585957282" }, "test_fastp_single_end": { "content": [ @@ -824,15 +902,21 @@ [ ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-19T16:23:08.469846" + "timestamp": "2026-01-23T09:46:19.624824985" }, "test_fastp_single_end_trim_fail - stub": { "content": [ @@ -886,7 +970,11 @@ ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -936,16 +1024,20 @@ "reads_merged": [ ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-11T09:55:23.871395" + "timestamp": "2026-01-22T13:00:22.800659826" }, "test_fastp_paired_end_trim_fail - stub": { "content": [ @@ -1006,7 +1098,11 @@ ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -1063,16 +1159,20 @@ "reads_merged": [ ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.04.8" + "nextflow": "25.10.2" }, - "timestamp": "2025-12-22T14:33:32.863505882" + "timestamp": "2026-01-22T13:00:30.271734068" }, "fastp test_fastp_interleaved": { "content": [ @@ -1085,15 +1185,21 @@ "test.fastp.fastq.gz:md5,217d62dc13a23e92513a1bd8e1bcea39" ] ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-19T16:23:16.479494" + "timestamp": "2026-01-23T09:46:33.4628687" }, "test_fastp_single_end_trim_fail": { "content": [ @@ -1118,15 +1224,21 @@ [ ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-19T16:23:20.299076" + "timestamp": "2026-01-23T09:46:39.895973372" }, "test_fastp_paired_end_qc_only": { "content": [ @@ -1148,15 +1260,21 @@ [ ], - [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" - ] + { + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-19T16:23:40.113724" + "timestamp": "2026-01-23T09:47:13.015833707" }, "test_fastp_paired_end_qc_only - stub": { "content": [ @@ -1198,7 +1316,11 @@ ], "6": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + [ + "FASTP", + "fastp", + "1.0.1" + ] ], "html": [ [ @@ -1236,15 +1358,19 @@ "reads_merged": [ ], - "versions": [ - "versions.yml:md5,c4974822658d02533e660fae343f281b" + "versions_fastp": [ + [ + "FASTP", + "fastp", + "1.0.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-11T09:55:46.696419" + "timestamp": "2026-01-22T13:00:59.670106791" } } \ No newline at end of file diff --git a/modules/nf-core/gnu/sort/main.nf b/modules/nf-core/gnu/sort/main.nf index 6190210d..a16f6291 100644 --- a/modules/nf-core/gnu/sort/main.nf +++ b/modules/nf-core/gnu/sort/main.nf @@ -12,7 +12,7 @@ process GNU_SORT { output: tuple val(meta), path( "${output_file}" ) , emit: sorted - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('coreutils'), eval("sort --version |& sed '1!d ; s/sort (GNU coreutils) //'"), emit: versions_coreutils, topic: versions when: task.ext.when == null || task.ext.when @@ -26,10 +26,6 @@ process GNU_SORT { """ sort ${args} ${input} > ${output_file} - cat <<-END_VERSIONS > versions.yml - "${task.process}": - coreutils: \$(sort --version |& sed '1!d ; s/sort (GNU coreutils) //') - END_VERSIONS """ stub: @@ -40,9 +36,5 @@ process GNU_SORT { """ touch ${output_file} - cat <<-END_VERSIONS > versions.yml - "${task.process}": - coreutils: \$(sort --version |& sed '1!d ; s/sort (GNU coreutils) //') - END_VERSIONS """ } diff --git a/modules/nf-core/gnu/sort/meta.yml b/modules/nf-core/gnu/sort/meta.yml index feba2c1f..48dde4a0 100644 --- a/modules/nf-core/gnu/sort/meta.yml +++ b/modules/nf-core/gnu/sort/meta.yml @@ -42,13 +42,27 @@ output: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] pattern: "${output_file}" + versions_coreutils: + - - ${task.process}: + type: string + description: The process the versions were collected from + - coreutils: + type: string + description: The tool name + - "sort --version |& sed '1!d ; s/sort (GNU coreutils) //'": + type: string + description: The command used to generate the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - coreutils: + type: string + description: The tool name + - "sort --version |& sed '1!d ; s/sort (GNU coreutils) //'": + type: string + description: The command used to generate the version of the tool authors: - "@DLBPointon" maintainers: diff --git a/modules/nf-core/gnu/sort/tests/main.nf.test b/modules/nf-core/gnu/sort/tests/main.nf.test index e4030187..dbe473d2 100644 --- a/modules/nf-core/gnu/sort/tests/main.nf.test +++ b/modules/nf-core/gnu/sort/tests/main.nf.test @@ -27,11 +27,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.sorted[0][1]).name - ).match("genome_sort") - } + { assert snapshot(process.out).match() } ) } @@ -54,11 +50,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.sorted[0][1]).name - ).match("interval_sort") - } + { assert snapshot(process.out).match() } ) } @@ -82,11 +74,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, - { assert snapshot( - file(process.out.sorted[0][1]).name - ).match("csv_sort") - } + { assert snapshot(process.out).match() } ) } @@ -111,7 +99,7 @@ nextflow_process { then { assertAll ( { assert process.success }, - { assert snapshot(process.out).match() }, + { assert snapshot(process.out).match() } ) } diff --git a/modules/nf-core/gnu/sort/tests/main.nf.test.snap b/modules/nf-core/gnu/sort/tests/main.nf.test.snap index 20e17080..f57dc6bb 100644 --- a/modules/nf-core/gnu/sort/tests/main.nf.test.snap +++ b/modules/nf-core/gnu/sort/tests/main.nf.test.snap @@ -11,7 +11,11 @@ ] ], "1": [ - "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + [ + "GNU_SORT", + "coreutils", + "9.5" + ] ], "sorted": [ [ @@ -21,26 +25,20 @@ "test.csv.sorted:md5,0b52d1b4c4a0c6e972c6f94aafd75a1d" ] ], - "versions": [ - "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + "versions_coreutils": [ + [ + "GNU_SORT", + "coreutils", + "9.5" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" - }, - "timestamp": "2025-04-30T14:27:50.564838" - }, - "interval_sort": { - "content": [ - "test.bed.sorted" - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-04-30T14:27:34.740893" + "timestamp": "2026-01-23T15:48:28.77537237" }, "unsorted_csv_sort_stub": { "content": [ @@ -54,7 +52,11 @@ ] ], "1": [ - "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + [ + "GNU_SORT", + "coreutils", + "9.5" + ] ], "sorted": [ [ @@ -64,26 +66,20 @@ "test.csv.sorted:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + "versions_coreutils": [ + [ + "GNU_SORT", + "coreutils", + "9.5" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-04-30T14:28:06.468116" - }, - "csv_sort": { - "content": [ - "test.csv.sorted" - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" - }, - "timestamp": "2025-04-30T14:27:50.596931" + "timestamp": "2026-01-23T15:48:45.534463019" }, "unsorted_genome_sort": { "content": [ @@ -97,7 +93,11 @@ ] ], "1": [ - "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + [ + "GNU_SORT", + "coreutils", + "9.5" + ] ], "sorted": [ [ @@ -107,26 +107,20 @@ "genome_test.bed.sorted:md5,fd97f7efafdbbfa71d9b560f10b4b048" ] ], - "versions": [ - "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + "versions_coreutils": [ + [ + "GNU_SORT", + "coreutils", + "9.5" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-04-30T14:27:19.192354" - }, - "genome_sort": { - "content": [ - "genome_test.bed.sorted" - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" - }, - "timestamp": "2025-04-30T14:27:19.234221" + "timestamp": "2026-01-23T15:47:54.290932481" }, "unsorted_intervals_sort": { "content": [ @@ -140,7 +134,11 @@ ] ], "1": [ - "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + [ + "GNU_SORT", + "coreutils", + "9.5" + ] ], "sorted": [ [ @@ -150,15 +148,19 @@ "test.bed.sorted:md5,abbce903ef263d38b2f71856387799ab" ] ], - "versions": [ - "versions.yml:md5,0d7afd9c97fa2ed3cc6273a6158fb1c8" + "versions_coreutils": [ + [ + "GNU_SORT", + "coreutils", + "9.5" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.4" + "nf-test": "0.9.3", + "nextflow": "25.04.8" }, - "timestamp": "2025-04-30T14:27:34.711885" + "timestamp": "2026-01-23T15:48:11.626509684" } } \ No newline at end of file diff --git a/modules/nf-core/mosdepth/environment.yml b/modules/nf-core/mosdepth/environment.yml index 97c93721..1c7f3ee8 100644 --- a/modules/nf-core/mosdepth/environment.yml +++ b/modules/nf-core/mosdepth/environment.yml @@ -5,6 +5,5 @@ channels: - bioconda dependencies: # renovate: datasource=conda depName=bioconda/mosdepth - - mosdepth=0.3.11=h0ec343a_1 - # renovate: datasource=conda depName=bioconda/htslib - htslib=1.22.1 + - mosdepth=0.3.11=h0ec343a_1 diff --git a/modules/nf-core/mosdepth/main.nf b/modules/nf-core/mosdepth/main.nf index 8166ac0b..b5ee3823 100644 --- a/modules/nf-core/mosdepth/main.nf +++ b/modules/nf-core/mosdepth/main.nf @@ -23,7 +23,7 @@ process MOSDEPTH { tuple val(meta), path('*.quantized.bed.gz.csi') , optional:true, emit: quantized_csi tuple val(meta), path('*.thresholds.bed.gz') , optional:true, emit: thresholds_bed tuple val(meta), path('*.thresholds.bed.gz.csi'), optional:true, emit: thresholds_csi - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('mosdepth'), eval("mosdepth --version | sed 's/mosdepth //g'"), topic: versions, emit: versions_mosdepth when: task.ext.when == null || task.ext.when @@ -33,11 +33,11 @@ process MOSDEPTH { def prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--fasta ${fasta}" : "" def interval = bed ? "--by ${bed}" : "" - if (bed && args.contains("--by")) { + if (bed && (args.contains("--by") || args.contains("-b "))) { error "'--by' can only be specified once when running mosdepth! Either remove input BED file definition or remove '--by' from 'ext.args' definition" } - if (!bed && args.contains("--thresholds")) { - error "'--thresholds' can only be specified in conjunction with '--by'" + if (args.contains("--thresholds") && !(bed || args.contains("--by") || args.contains("-b "))) { + error "'--thresholds' can only be specified in conjunction with '--by' or an input bed file" } """ @@ -48,15 +48,17 @@ process MOSDEPTH { $args \\ $prefix \\ $bam - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mosdepth: \$(mosdepth --version 2>&1 | sed 's/^.*mosdepth //; s/ .*\$//') - END_VERSIONS """ stub: + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + if (bed && (args.contains("--by") || args.contains("-b "))) { + error "'--by' can only be specified once when running mosdepth! Either remove input BED file definition or remove '--by' from 'ext.args' definition" + } + if (args.contains("--thresholds") && !(bed || args.contains("--by") || args.contains("-b "))) { + error "'--thresholds' can only be specified in conjunction with '--by' or an input bed file" + } """ touch ${prefix}.global.dist.txt touch ${prefix}.region.dist.txt @@ -70,10 +72,5 @@ process MOSDEPTH { touch ${prefix}.quantized.bed.gz.csi echo "" | gzip > ${prefix}.thresholds.bed.gz touch ${prefix}.thresholds.bed.gz.csi - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - mosdepth: \$(mosdepth --version 2>&1 | sed 's/^.*mosdepth //; s/ .*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/mosdepth/meta.yml b/modules/nf-core/mosdepth/meta.yml index af1ea44a..04c8bfe1 100644 --- a/modules/nf-core/mosdepth/meta.yml +++ b/modules/nf-core/mosdepth/meta.yml @@ -178,13 +178,28 @@ output: description: Index file for BED file with threshold coverage pattern: "*.{thresholds.bed.gz.csi}" ontologies: [] + versions_mosdepth: + - - ${task.process}: + type: string + description: The process the versions were collected from + - mosdepth: + type: string + description: The tool name + - "mosdepth --version | sed 's/mosdepth //g'": + type: string + description: The command used to generate the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The process the versions were collected from + - mosdepth: + type: string + description: The tool name + - "mosdepth --version | sed 's/mosdepth //g'": + type: string + description: The command used to generate the version of the tool authors: - "@joseespinosa" - "@drpatelh" @@ -192,6 +207,5 @@ authors: - "@matthdsm" maintainers: - "@joseespinosa" - - "@drpatelh" - "@ramprasadn" - "@matthdsm" diff --git a/modules/nf-core/mosdepth/mosdepth.diff b/modules/nf-core/mosdepth/mosdepth.diff index 59a3adf0..ba8f8c40 100644 --- a/modules/nf-core/mosdepth/mosdepth.diff +++ b/modules/nf-core/mosdepth/mosdepth.diff @@ -16,8 +16,6 @@ Changes in 'mosdepth/main.nf': tuple val(meta), path('*.global.dist.txt') , emit: global_txt 'modules/nf-core/mosdepth/tests/main.nf.test.snap' is unchanged -'modules/nf-core/mosdepth/tests/threshold.config' is unchanged -'modules/nf-core/mosdepth/tests/quantized.config' is unchanged +'modules/nf-core/mosdepth/tests/nextflow.config' is unchanged 'modules/nf-core/mosdepth/tests/main.nf.test' is unchanged -'modules/nf-core/mosdepth/tests/window.config' is unchanged ************************************************************ diff --git a/modules/nf-core/mosdepth/tests/main.nf.test b/modules/nf-core/mosdepth/tests/main.nf.test index 0b3c860d..b05dde5b 100644 --- a/modules/nf-core/mosdepth/tests/main.nf.test +++ b/modules/nf-core/mosdepth/tests/main.nf.test @@ -7,10 +7,14 @@ nextflow_process { tag "modules" tag "modules_nfcore" tag "mosdepth" + config "./nextflow.config" test("homo_sapiens - bam, bai, []") { when { + params { + module_args = "" + } process { """ input[0] = [ @@ -25,9 +29,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match()} ) } @@ -36,6 +40,9 @@ nextflow_process { test("homo_sapiens - bam, bai, bed") { when { + params { + module_args = "" + } process { """ input[0] = [ @@ -50,9 +57,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match()} ) } @@ -61,6 +68,9 @@ nextflow_process { test("homo_sapiens - cram, crai, []") { when { + params { + module_args = "" + } process { """ input[0] = [ @@ -78,9 +88,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match()} ) } @@ -89,6 +99,9 @@ nextflow_process { test("homo_sapiens - cram, crai, bed") { when { + params { + module_args = "" + } process { """ input[0] = [ @@ -106,9 +119,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match()} ) } @@ -116,8 +129,10 @@ nextflow_process { test("homo_sapiens - bam, bai, [] - window") { - config "./window.config" when { + params { + module_args = "--by 100" + } process { """ input[0] = [ @@ -132,9 +147,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match()} ) } @@ -142,8 +157,10 @@ nextflow_process { test("homo_sapiens - bam, bai, [] - quantized") { - config "./quantized.config" when { + params { + module_args = "--quantize 0:1:4:100:200" + } process { """ input[0] = [ @@ -158,9 +175,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match()} ) } @@ -168,8 +185,10 @@ nextflow_process { test("homo_sapiens - bam, bai, bed - thresholds") { - config "./threshold.config" when { + params { + module_args = "--thresholds 1,10,20,30" + } process { """ input[0] = [ @@ -184,9 +203,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match()} ) } @@ -194,8 +213,10 @@ nextflow_process { test("homo_sapiens - bam, bai, bed - fail") { - config "./window.config" when { + params { + module_args = "--by 100" + } process { """ input[0] = [ @@ -210,9 +231,7 @@ nextflow_process { } then { - assertAll( - { assert process.failed } - ) + assert process.failed } } @@ -221,6 +240,9 @@ nextflow_process { options "-stub" when { + params { + module_args = "" + } process { """ input[0] = [ @@ -235,9 +257,9 @@ nextflow_process { } then { + assert process.success assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(process.out).match()} ) } diff --git a/modules/nf-core/mosdepth/tests/main.nf.test.snap b/modules/nf-core/mosdepth/tests/main.nf.test.snap index a063dd9f..c27fcc79 100644 --- a/modules/nf-core/mosdepth/tests/main.nf.test.snap +++ b/modules/nf-core/mosdepth/tests/main.nf.test.snap @@ -39,7 +39,11 @@ ] ], "12": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ], "2": [ [ @@ -221,8 +225,12 @@ "test.thresholds.bed.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + "versions_mosdepth": [ + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ] } ], @@ -260,7 +268,11 @@ ], "12": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ], "2": [ [ @@ -394,8 +406,12 @@ "thresholds_csi": [ ], - "versions": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + "versions_mosdepth": [ + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ] } ], @@ -433,7 +449,11 @@ ], "12": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ], "2": [ @@ -555,8 +575,12 @@ "thresholds_csi": [ ], - "versions": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + "versions_mosdepth": [ + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ] } ], @@ -594,7 +618,11 @@ ], "12": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ], "2": [ [ @@ -728,8 +756,12 @@ "thresholds_csi": [ ], - "versions": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + "versions_mosdepth": [ + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ] } ], @@ -767,7 +799,11 @@ ], "12": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ], "2": [ [ @@ -901,8 +937,12 @@ "thresholds_csi": [ ], - "versions": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + "versions_mosdepth": [ + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ] } ], @@ -940,7 +980,11 @@ ], "12": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ], "2": [ @@ -1038,8 +1082,12 @@ "thresholds_csi": [ ], - "versions": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + "versions_mosdepth": [ + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ] } ], @@ -1077,7 +1125,11 @@ ], "12": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ], "2": [ @@ -1175,8 +1227,12 @@ "thresholds_csi": [ ], - "versions": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + "versions_mosdepth": [ + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ] } ], @@ -1226,7 +1282,11 @@ ] ], "12": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ], "2": [ [ @@ -1372,8 +1432,12 @@ "test.thresholds.bed.gz.csi:md5,2c52ab89e7496af475de3cb2ca04c7b3" ] ], - "versions": [ - "versions.yml:md5,74f14bf8082836f8dc941b8c77c176fb" + "versions_mosdepth": [ + [ + "MOSDEPTH", + "mosdepth", + "0.3.11" + ] ] } ], diff --git a/modules/nf-core/mosdepth/tests/nextflow.config b/modules/nf-core/mosdepth/tests/nextflow.config new file mode 100644 index 00000000..b21c05b5 --- /dev/null +++ b/modules/nf-core/mosdepth/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: "MOSDEPTH" { + ext.args = params.module_args + } +} diff --git a/modules/nf-core/mosdepth/tests/quantized.config b/modules/nf-core/mosdepth/tests/quantized.config deleted file mode 100644 index c208a4ce..00000000 --- a/modules/nf-core/mosdepth/tests/quantized.config +++ /dev/null @@ -1,3 +0,0 @@ -process { - ext.args = "--quantize 0:1:4:100:200" -} diff --git a/modules/nf-core/mosdepth/tests/threshold.config b/modules/nf-core/mosdepth/tests/threshold.config deleted file mode 100644 index 3302da60..00000000 --- a/modules/nf-core/mosdepth/tests/threshold.config +++ /dev/null @@ -1,3 +0,0 @@ -process { - ext.args = "--thresholds 1,10,20,30" -} diff --git a/modules/nf-core/mosdepth/tests/window.config b/modules/nf-core/mosdepth/tests/window.config deleted file mode 100644 index 7f0d08d6..00000000 --- a/modules/nf-core/mosdepth/tests/window.config +++ /dev/null @@ -1,3 +0,0 @@ -process { - ext.args = "--by 100" -} diff --git a/modules/nf-core/samtools/convert/main.nf b/modules/nf-core/samtools/convert/main.nf index f4003d42..f302b319 100644 --- a/modules/nf-core/samtools/convert/main.nf +++ b/modules/nf-core/samtools/convert/main.nf @@ -8,14 +8,15 @@ process SAMTOOLS_CONVERT { 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input), path(index), path(fasta), path(fai) + tuple val(meta), path(input), path(index) + tuple val(meta2), path(fasta), path(fai) output: tuple val(meta), path("*.bam") , emit: bam , optional: true tuple val(meta), path("*.cram") , emit: cram, optional: true tuple val(meta), path("*.bai") , emit: bai , optional: true tuple val(meta), path("*.crai") , emit: crai, optional: true - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), topic: versions, emit: versions_samtools when: task.ext.when == null || task.ext.when @@ -34,11 +35,6 @@ process SAMTOOLS_CONVERT { -o ${prefix}.${output_extension} samtools index -@${task.cpus} ${prefix}.${output_extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ stub: @@ -49,10 +45,5 @@ process SAMTOOLS_CONVERT { """ touch ${prefix}.${output_extension} touch ${prefix}.${output_extension}.${index_extension} - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS """ } diff --git a/modules/nf-core/samtools/convert/meta.yml b/modules/nf-core/samtools/convert/meta.yml index 519812ab..286f812f 100644 --- a/modules/nf-core/samtools/convert/meta.yml +++ b/modules/nf-core/samtools/convert/meta.yml @@ -42,11 +42,6 @@ input: description: Reference file to create the CRAM file pattern: "*.{fasta,fa}" ontologies: [] - - - meta3: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - fai: type: file description: Reference index file to create the CRAM file @@ -97,13 +92,27 @@ output: description: filtered/converted CRAM index pattern: "*{.crai}" ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool authors: - "@FriederikeHanssen" - "@maxulysse" diff --git a/modules/nf-core/samtools/convert/tests/main.nf.test b/modules/nf-core/samtools/convert/tests/main.nf.test index cd603c53..638caabe 100644 --- a/modules/nf-core/samtools/convert/tests/main.nf.test +++ b/modules/nf-core/samtools/convert/tests/main.nf.test @@ -9,99 +9,88 @@ nextflow_process { tag "samtools" tag "samtools/convert" - test("sarscov2 - [bam, bai], fasta, fai") { + test("sarscov2 - [bam, bai], [fasta, fai]") { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) - input[2] = Channel.of([ - [ id:'fai' ], // meta map + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) - ]) + ] """ } } then { - assertAll( - { assert process.success }, - { assert snapshot(file(process.out.cram[0][1]).name).match("bam_to_cram_alignment") }, - { assert snapshot(file(process.out.crai[0][1]).name).match("bam_to_cram_index") }, - { assert snapshot(process.out.versions).match("bam_to_cram_versions") } - ) + assert process.success + assert snapshot( + process.out.cram.collect{ meta, cram_file -> [ meta, file(cram_file).name] }, + process.out.crai.collect{ meta, crai_file -> [ meta, file(crai_file).name] }, + ["versions_samtools": process.out.versions_samtools] + ).match() } } - test("homo_sapiens - [cram, crai], fasta, fai") { + test("homo_sapiens - [cram, crai], [fasta, fai]") { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ]) - input[2] = Channel.of([ - [ id:'fai' ], // meta map + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ]) + ] """ } } then { - assertAll( - { assert process.success }, - { assert snapshot(file(process.out.bam[0][1]).name).match("cram_to_bam_alignment") }, - { assert snapshot(file(process.out.bai[0][1]).name).match("cram_to_bam_alignment_index") }, - { assert snapshot(process.out.versions).match("cram_to_bam_versions") } - ) + assert process.success + assert snapshot( + process.out.bam.collect{ meta, bam_file -> [ meta, file(bam_file).name, bam(bam_file).getReadsMD5()] }, + process.out.bai.collect{ meta, bai_file -> [ meta, file(bai_file).name] }, + ["versions_samtools": process.out.versions_samtools] + ).match() } } - test("sarscov2 - [bam, bai], fasta, fai - stub") { + test("sarscov2 - [bam, bai], [fasta, fai] - stub") { options "-stub" when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) - input[2] = Channel.of([ - [ id:'fai' ], // meta map + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) - ]) + ] """ } } then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match("stub") } - ) + assert process.success + assert snapshot(sanitizeOutput(process.out)).match() } } } diff --git a/modules/nf-core/samtools/convert/tests/main.nf.test.snap b/modules/nf-core/samtools/convert/tests/main.nf.test.snap index a9ef27e0..57e7ccb3 100644 --- a/modules/nf-core/samtools/convert/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/convert/tests/main.nf.test.snap @@ -1,78 +1,76 @@ { - "cram_to_bam_alignment": { - "content": [ - "test.bam" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-06T11:14:51.300147176" - }, - "bam_to_cram_alignment": { - "content": [ - "test.cram" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-06T11:14:36.625470184" - }, - "cram_to_bam_versions": { + "sarscov2 - [bam, bai], [fasta, fai]": { "content": [ [ - "versions.yml:md5,13f74b35a5030e75c1e819b2cf602db8" - ] + [ + { + "id": "test" + }, + "test.cram" + ] + ], + [ + [ + { + "id": "test" + }, + "test.cram.crai" + ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_CONVERT", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-10T13:05:31.58641" + "timestamp": "2026-02-05T11:02:26.691358025" }, - "bam_to_cram_versions": { + "homo_sapiens - [cram, crai], [fasta, fai]": { "content": [ [ - "versions.yml:md5,13f74b35a5030e75c1e819b2cf602db8" - ] + [ + { + "id": "test" + }, + "test.bam", + "2f11e4fe3390b8ad0a1852616fd1da04" + ] + ], + [ + [ + { + "id": "test" + }, + "test.bam.bai" + ] + ], + { + "versions_samtools": [ + [ + "SAMTOOLS_CONVERT", + "samtools", + "1.22.1" + ] + ] + } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2025-09-10T13:05:26.933516" + "timestamp": "2026-02-05T11:24:13.012572069" }, - "stub": { + "sarscov2 - [bam, bai], [fasta, fai] - stub": { "content": [ { - "0": [ - - ], - "1": [ - [ - { - "id": "test", - "single_end": false - }, - "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "2": [ - - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - "versions.yml:md5,13f74b35a5030e75c1e819b2cf602db8" - ], "bai": [ ], @@ -82,8 +80,7 @@ "crai": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.cram.crai:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -91,41 +88,24 @@ "cram": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.cram:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,13f74b35a5030e75c1e819b2cf602db8" + "versions_samtools": [ + [ + "SAMTOOLS_CONVERT", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-10T13:05:36.333776" - }, - "bam_to_cram_index": { - "content": [ - "test.cram.crai" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-03-06T11:14:36.640009334" - }, - "cram_to_bam_alignment_index": { - "content": [ - "test.bam.bai" - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.3" }, - "timestamp": "2024-03-06T11:14:51.304477426" + "timestamp": "2026-02-05T11:24:19.471055529" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/coverage/main.nf b/modules/nf-core/samtools/coverage/main.nf index e2adfddd..25754d35 100644 --- a/modules/nf-core/samtools/coverage/main.nf +++ b/modules/nf-core/samtools/coverage/main.nf @@ -12,7 +12,7 @@ process SAMTOOLS_COVERAGE { output: tuple val(meta), path("*.txt"), emit: coverage - path "versions.yml" , emit: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), topic: versions, emit: versions_samtools when: task.ext.when == null || task.ext.when @@ -32,11 +32,6 @@ process SAMTOOLS_COVERAGE { -o ${prefix}.txt \\ $reference \\ $input - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' ) - END_VERSIONS """ stub: diff --git a/modules/nf-core/samtools/coverage/meta.yml b/modules/nf-core/samtools/coverage/meta.yml index 28dceb03..754f5f49 100644 --- a/modules/nf-core/samtools/coverage/meta.yml +++ b/modules/nf-core/samtools/coverage/meta.yml @@ -60,17 +60,33 @@ output: e.g. [ id:'test', single_end:false ] - "*.txt": type: file - description: Tabulated text containing the coverage at each position or region - or an ASCII-art histogram (with --histogram). + description: Tabulated text containing the coverage at each position or + region or an ASCII-art histogram (with --histogram). pattern: "*.txt" ontologies: [] + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool + +topics: versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool + authors: - "@LouisLeNezet" maintainers: diff --git a/modules/nf-core/samtools/coverage/tests/main.nf.test.snap b/modules/nf-core/samtools/coverage/tests/main.nf.test.snap index 68cc3697..2069c8c1 100644 --- a/modules/nf-core/samtools/coverage/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/coverage/tests/main.nf.test.snap @@ -12,7 +12,11 @@ ] ], "1": [ - "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" + [ + "SAMTOOLS_COVERAGE", + "samtools", + "1.22.1" + ] ], "coverage": [ [ @@ -23,16 +27,20 @@ "test.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions": [ - "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" + "versions_samtools": [ + [ + "SAMTOOLS_COVERAGE", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T13:06:14.846123" + "timestamp": "2026-01-22T10:43:34.392105918" }, "test_samtools_coverage_bam": { "content": [ @@ -47,7 +55,11 @@ ] ], "1": [ - "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" + [ + "SAMTOOLS_COVERAGE", + "samtools", + "1.22.1" + ] ], "coverage": [ [ @@ -58,16 +70,20 @@ "test.txt:md5,99a521b3bf53b6acf8055a44a571ea84" ] ], - "versions": [ - "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" + "versions_samtools": [ + [ + "SAMTOOLS_COVERAGE", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-09-10T13:06:06.18797" + "timestamp": "2026-01-22T10:43:08.216921812" }, "test_samtools_coverage_cram": { "content": [ @@ -82,7 +98,11 @@ ] ], "1": [ - "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" + [ + "SAMTOOLS_COVERAGE", + "samtools", + "1.22.1" + ] ], "coverage": [ [ @@ -93,15 +113,19 @@ "test.txt:md5,ce896534bac51cfcc97e5508ae907e99" ] ], - "versions": [ - "versions.yml:md5,a457b33609ed582818fbe3bc2a20008a" + "versions_samtools": [ + [ + "SAMTOOLS_COVERAGE", + "samtools", + "1.22.1" + ] ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.7" + "nf-test": "0.9.3", + "nextflow": "25.10.2" }, - "timestamp": "2025-10-02T11:22:34.018328" + "timestamp": "2026-01-22T10:43:15.389524183" } } \ No newline at end of file diff --git a/modules/nf-core/samtools/sort/meta.yml b/modules/nf-core/samtools/sort/meta.yml index 809a57fc..69968304 100644 --- a/modules/nf-core/samtools/sort/meta.yml +++ b/modules/nf-core/samtools/sort/meta.yml @@ -131,6 +131,7 @@ topics: - "samtools version | sed '1!d;s/.* //'": type: string description: The command used to generate the version of the tool + authors: - "@drpatelh" - "@ewels" From 38dd555289e56357a4efcd85465431380cb9f54d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 20:26:44 +0100 Subject: [PATCH 163/202] topic conversion work --- modules/nf-core/samtools/convert/main.nf | 3 +- subworkflows/local/fastq_align_rna/main.nf | 13 +- .../local/fastq_to_aligned_cram/main.nf | 10 -- .../fastq_align_dna/fastq_align_dna.diff | 145 +++++++++++------- subworkflows/nf-core/fastq_align_dna/main.nf | 126 ++++++++------- workflows/preprocessing.nf | 3 - 6 files changed, 149 insertions(+), 151 deletions(-) diff --git a/modules/nf-core/samtools/convert/main.nf b/modules/nf-core/samtools/convert/main.nf index f302b319..c3ee32ac 100644 --- a/modules/nf-core/samtools/convert/main.nf +++ b/modules/nf-core/samtools/convert/main.nf @@ -8,8 +8,7 @@ process SAMTOOLS_CONVERT { 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input), path(index) - tuple val(meta2), path(fasta), path(fai) + tuple val(meta), path(input), path(index), path(fasta), path(fai) output: tuple val(meta), path("*.bam") , emit: bam , optional: true diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index 5e86bff2..676b6172 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -16,7 +16,6 @@ workflow FASTQ_ALIGN_RNA { main: ch_bam = channel.empty() ch_reports = channel.empty() - ch_versions = channel.empty() ch_reads_aligner_index_gtf .branch { meta, reads, aligner, index, gtf -> @@ -42,23 +41,15 @@ workflow FASTQ_ALIGN_RNA { ) // Concatenate splice junction files - def ch_splice_junctions_to_merge = group_junctions(STAR_ALIGN.out.spl_junc_tab) - - SORT_MERGE_SPLICE_JUNCTIONS(ch_splice_junctions_to_merge) - ch_versions = ch_versions.mix(SORT_MERGE_SPLICE_JUNCTIONS.out.versions.first()) - + SORT_MERGE_SPLICE_JUNCTIONS(group_junctions(STAR_ALIGN.out.spl_junc_tab)) // Concatenate junction files - def ch_junctions_to_merge = group_junctions(STAR_ALIGN.out.junction) - - SORT_MERGE_JUNCTIONS(ch_junctions_to_merge) - ch_versions = ch_versions.mix(SORT_MERGE_JUNCTIONS.out.versions.first()) + SORT_MERGE_JUNCTIONS(group_junctions(STAR_ALIGN.out.junction)) emit: bam = ch_bam // channel: [ [meta], bam ] splice_junctions = SORT_MERGE_SPLICE_JUNCTIONS.out.sorted // channel: [ [meta], splice_junctions ] junctions = SORT_MERGE_JUNCTIONS.out.sorted // channel: [ [meta], junctions ] reports = ch_reports // channel: [ [meta], log ] - versions = ch_versions // channel: [ versions.yml ] } def group_junctions(ch) { diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index 226e97b9..9ce33bc8 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -22,8 +22,6 @@ workflow FASTQ_TO_CRAM { ch_meta_reads_aligner_index_fasta_gtf // channel: [mandatory] [meta, [fastq, ...], aligner [bowtie2, bwamem, bwamem2, dragmap, snap, star], aligner_index, fasta, gtf] main: - - ch_versions = channel.empty() ch_sormadup_metrics = channel.empty() /* @@ -33,7 +31,6 @@ workflow FASTQ_TO_CRAM { */ ch_meta_reads_aligner_index_fasta_gtf.dump(tag: "FASTQ_TO_CRAM: reads to align", pretty: true) - ch_meta_reads_aligner_index_fasta_gtf .branch { meta, reads, aligner, index, fasta, gtf -> rna: meta.sample_type == "RNA" @@ -51,12 +48,9 @@ workflow FASTQ_TO_CRAM { ch_meta_reads_aligner_index_fasta_datatype.dna, false, ) - ch_versions = ch_versions.mix(FASTQ_ALIGN_DNA.out.versions) - FASTQ_ALIGN_RNA( ch_meta_reads_aligner_index_fasta_datatype.rna ) - ch_versions = ch_versions.mix(FASTQ_ALIGN_DNA.out.versions) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -110,13 +104,11 @@ workflow FASTQ_TO_CRAM { BIOBAMBAM_BAMSORMADUP(ch_bam_fasta.bamsormadup) ch_markdup_index = ch_markdup_index.mix(BIOBAMBAM_BAMSORMADUP.out.bam.join(BIOBAMBAM_BAMSORMADUP.out.bam_index, failOnMismatch: true, failOnDuplicate: true)) ch_sormadup_metrics = ch_sormadup_metrics.mix(BIOBAMBAM_BAMSORMADUP.out.metrics) - ch_versions = ch_versions.mix(BIOBAMBAM_BAMSORMADUP.out.versions.first()) // SAMTOOLS_SORMADUP([meta, [bam, bam]], fasta) SAMTOOLS_SORMADUP(ch_bam_fasta.samtools) ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORMADUP.out.cram.join(SAMTOOLS_SORMADUP.out.crai, failOnMismatch: true, failOnDuplicate: true)) ch_sormadup_metrics = ch_sormadup_metrics.mix(SAMTOOLS_SORMADUP.out.metrics) - ch_versions = ch_versions.mix(SAMTOOLS_SORMADUP.out.versions.first()) // Merge bam files and compress // SAMTOOLS_SORT([meta, [bam, bam], fasta],index_format) @@ -147,7 +139,6 @@ workflow FASTQ_TO_CRAM { .set { ch_bam_bai_fasta_fai } SAMTOOLS_CONVERT(ch_bam_bai_fasta_fai) - ch_versions = ch_versions.mix(SAMTOOLS_CONVERT.out.versions.first()) ch_markdup_index.cram .mix( @@ -162,5 +153,4 @@ workflow FASTQ_TO_CRAM { rna_junctions = FASTQ_ALIGN_RNA.out.junctions sormadup_metrics = ch_sormadup_metrics align_reports = FASTQ_ALIGN_DNA.out.reports - versions = ch_versions } diff --git a/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff b/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff index dbe123ad..5aec63ce 100644 --- a/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff +++ b/subworkflows/nf-core/fastq_align_dna/fastq_align_dna.diff @@ -3,7 +3,24 @@ Changes in component 'nf-core/fastq_align_dna' Changes in 'fastq_align_dna/main.nf': --- subworkflows/nf-core/fastq_align_dna/main.nf +++ subworkflows/nf-core/fastq_align_dna/main.nf -@@ -16,55 +16,66 @@ +@@ -5,70 +5,75 @@ + // + + +-include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" +-include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' +-include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' +-include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" +-include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' +-include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" ++include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" ++include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' ++include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' ++include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" ++include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' ++include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" + + workflow FASTQ_ALIGN_DNA { take: @@ -12,8 +29,8 @@ Changes in 'fastq_align_dna/main.nf': - ch_fasta // channel: [mandatory] fasta file - aligner // string: [mandatory] aligner [bowtie2, bwamem, bwamem2, dragmap, snap] - sort // boolean: [mandatory] true -> sort, false -> don't sort -+ ch_reads_aligner_index_fasta // channel: [mandatory] reads, aligner, index, fasta -+ sort // boolean: [mandatory] true -> sort, false -> don't sort ++ ch_reads_aligner_index_fasta // channel: [mandatory] reads, aligner, index, fasta ++ sort // boolean: [mandatory] true -> sort, false -> don't sort main: @@ -21,62 +38,44 @@ Changes in 'fastq_align_dna/main.nf': - ch_bam = Channel.empty() - ch_reports = Channel.empty() - ch_versions = Channel.empty() -+ ch_bam_index = channel.empty() -+ ch_bam = channel.empty() -+ ch_reports = channel.empty() -+ ch_versions = channel.empty() -+ -+ ch_reads_aligner_index_fasta.branch { meta, reads, aligner, index, fasta -> -+ bowtie2 : aligner == 'bowtie2' -+ return [meta, reads, index, fasta] -+ bwamem : aligner == 'bwamem' -+ return [meta, reads, index, fasta] -+ bwamem2 : aligner == 'bwamem2' -+ return [meta, reads, index, fasta] -+ dragmap : aligner == 'dragmap' -+ return [meta, reads, index, fasta] -+ snap : aligner == 'snap' -+ return [meta, reads, index] -+ strobe : aligner == 'strobe' -+ return [meta, reads, fasta, index] -+ other : true -+ } -+ .set{ch_to_align} -+ -+ // Throw error for all samples with unsupported aligners -+ ch_to_align.other.map{ meta, _reads, aligner, _index, _fasta -> -+ error "Unsupported aligner ${aligner} for sample ${meta.id}" -+ } ++ ch_bam_index = channel.empty() ++ ch_bam = channel.empty() ++ ch_reports = channel.empty() - // Align fastq files to reference genome and (optionally) sort +- // Align fastq files to reference genome and (optionally) sort - if (aligner == 'bowtie2') { - BOWTIE2_ALIGN(ch_reads, ch_aligner_index, ch_fasta, false, sort) // if aligner is bowtie2 -+ BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) // if aligner is bowtie2 - ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) -- } +- ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) ++ ch_reads_aligner_index_fasta ++ .branch { meta, reads, aligner, index, fasta -> ++ bowtie2: aligner == 'bowtie2' ++ return [meta, reads, index, fasta] ++ bwamem: aligner == 'bwamem' ++ return [meta, reads, index, fasta] ++ bwamem2: aligner == 'bwamem2' ++ return [meta, reads, index, fasta] ++ dragmap: aligner == 'dragmap' ++ return [meta, reads, index, fasta] ++ snap: aligner == 'snap' ++ return [meta, reads, index] ++ strobe: aligner == 'strobe' ++ return [meta, reads, fasta, index] ++ other: true + } - else if (aligner == 'bwamem'){ - BWAMEM1_MEM (ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is bwa-mem -+ ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions.first()) -+ -+ BWAMEM1_MEM (ch_to_align.bwamem, sort) // If aligner is bwa-mem - ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) - ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) +- ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) +- ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) - ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions) - } - else if (aligner == 'bwamem2'){ - BWAMEM2_MEM (ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is bwa-mem2 -+ ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions.first()) -+ -+ BWAMEM2_MEM (ch_to_align.bwamem2, sort) // If aligner is bwa-mem2 - ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) +- ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) - } - else if (aligner == 'dragmap'){ - DRAGMAP_ALIGN(ch_reads, ch_aligner_index, ch_fasta, sort) // If aligner is dragmap -+ ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions.first()) -+ -+ DRAGMAP_ALIGN(ch_to_align.dragmap, sort) // If aligner is dragmap - ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) - ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) +- ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) +- ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) - ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions) - } - else if (aligner == 'snap'){ @@ -87,25 +86,53 @@ Changes in 'fastq_align_dna/main.nf': - } - else if (aligner == 'strobealign'){ - STROBEALIGN (ch_reads, ch_fasta, ch_aligner_index, sort) // If aligner is strobealign -+ ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions.first()) -+ -+ SNAPALIGNER_ALIGN(ch_to_align.snap) // If aligner is snap -+ ch_bam = ch_bam.mix(SNAPALIGNER_ALIGN.out.bam) -+ ch_bam_index.mix(SNAPALIGNER_ALIGN.out.bai) -+ ch_versions = ch_versions.mix(SNAPALIGNER_ALIGN.out.versions.first()) -+ -+ STROBEALIGN(ch_to_align.strobe, sort) // If aligner is strobealign - ch_bam = ch_bam.mix(STROBEALIGN.out.bam) - ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) +- ch_bam = ch_bam.mix(STROBEALIGN.out.bam) +- ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) - ch_versions = ch_versions.mix(STROBEALIGN.out.versions) - } - else { - error "Unknown aligner: ${aligner}" - } -+ ch_versions = ch_versions.mix(STROBEALIGN.out.versions.first()) ++ .set { ch_to_align } ++ ++ // Throw error for all samples with unsupported aligners ++ ch_to_align.other.map { meta, _reads, aligner, _index, _fasta -> ++ error("Unsupported aligner ${aligner} for sample ${meta.id}") ++ } ++ ++ // Align fastq files to reference genome and (optionally) sort ++ BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) ++ // if aligner is bowtie2 ++ ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) ++ BWAMEM1_MEM(ch_to_align.bwamem, sort) ++ // If aligner is bwa-mem ++ ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) ++ ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) ++ BWAMEM2_MEM(ch_to_align.bwamem2, sort) ++ // If aligner is bwa-mem2 ++ ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) ++ DRAGMAP_ALIGN(ch_to_align.dragmap, sort) ++ // If aligner is dragmap ++ ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) ++ ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) ++ SNAP_ALIGN(ch_to_align.snap) ++ // If aligner is snap ++ ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) ++ ch_bam_index.mix(SNAP_ALIGN.out.bai) ++ STROBEALIGN(ch_to_align.strobe, sort) ++ // If aligner is strobealign ++ ch_bam = ch_bam.mix(STROBEALIGN.out.bam) ++ ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) emit: - bam = ch_bam // channel: [ [meta], bam ] +- bam = ch_bam // channel: [ [meta], bam ] +- bam_index = ch_bam_index // channel: [ [meta], csi/bai ] +- reports = ch_reports // channel: [ [meta], log ] +- versions = ch_versions // channel: [ versions.yml ] ++ bam = ch_bam // channel: [ [meta], bam ] ++ bam_index = ch_bam_index // channel: [ [meta], csi/bai ] ++ reports = ch_reports // channel: [ [meta], log ] + } 'subworkflows/nf-core/fastq_align_dna/tests/main.nf.test.snap' is unchanged 'subworkflows/nf-core/fastq_align_dna/tests/main.nf.test' is unchanged diff --git a/subworkflows/nf-core/fastq_align_dna/main.nf b/subworkflows/nf-core/fastq_align_dna/main.nf index 37e62d70..3e7cf051 100644 --- a/subworkflows/nf-core/fastq_align_dna/main.nf +++ b/subworkflows/nf-core/fastq_align_dna/main.nf @@ -5,81 +5,75 @@ // -include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" -include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' -include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' -include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" -include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' -include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" +include { BOWTIE2_ALIGN } from "../../../modules/nf-core/bowtie2/align/main" +include { BWA_MEM as BWAMEM1_MEM } from '../../../modules/nf-core/bwa/mem/main' +include { BWAMEM2_MEM as BWAMEM2_MEM } from '../../../modules/nf-core/bwamem2/mem/main' +include { DRAGMAP_ALIGN } from "../../../modules/nf-core/dragmap/align/main" +include { SNAPALIGNER_ALIGN as SNAP_ALIGN } from '../../../modules/nf-core/snapaligner/align/main' +include { STROBEALIGN } from "../../../modules/nf-core/strobealign/main" workflow FASTQ_ALIGN_DNA { take: - ch_reads_aligner_index_fasta // channel: [mandatory] reads, aligner, index, fasta - sort // boolean: [mandatory] true -> sort, false -> don't sort + ch_reads_aligner_index_fasta // channel: [mandatory] reads, aligner, index, fasta + sort // boolean: [mandatory] true -> sort, false -> don't sort main: - ch_bam_index = channel.empty() - ch_bam = channel.empty() - ch_reports = channel.empty() - ch_versions = channel.empty() - - ch_reads_aligner_index_fasta.branch { meta, reads, aligner, index, fasta -> - bowtie2 : aligner == 'bowtie2' - return [meta, reads, index, fasta] - bwamem : aligner == 'bwamem' - return [meta, reads, index, fasta] - bwamem2 : aligner == 'bwamem2' - return [meta, reads, index, fasta] - dragmap : aligner == 'dragmap' - return [meta, reads, index, fasta] - snap : aligner == 'snap' - return [meta, reads, index] - strobe : aligner == 'strobe' - return [meta, reads, fasta, index] - other : true - } - .set{ch_to_align} - - // Throw error for all samples with unsupported aligners - ch_to_align.other.map{ meta, _reads, aligner, _index, _fasta -> - error "Unsupported aligner ${aligner} for sample ${meta.id}" + ch_bam_index = channel.empty() + ch_bam = channel.empty() + ch_reports = channel.empty() + + ch_reads_aligner_index_fasta + .branch { meta, reads, aligner, index, fasta -> + bowtie2: aligner == 'bowtie2' + return [meta, reads, index, fasta] + bwamem: aligner == 'bwamem' + return [meta, reads, index, fasta] + bwamem2: aligner == 'bwamem2' + return [meta, reads, index, fasta] + dragmap: aligner == 'dragmap' + return [meta, reads, index, fasta] + snap: aligner == 'snap' + return [meta, reads, index] + strobe: aligner == 'strobe' + return [meta, reads, fasta, index] + other: true } - - // Align fastq files to reference genome and (optionally) sort - BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) // if aligner is bowtie2 - ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) - ch_versions = ch_versions.mix(BOWTIE2_ALIGN.out.versions.first()) - - BWAMEM1_MEM (ch_to_align.bwamem, sort) // If aligner is bwa-mem - ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) - ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) - ch_versions = ch_versions.mix(BWAMEM1_MEM.out.versions.first()) - - BWAMEM2_MEM (ch_to_align.bwamem2, sort) // If aligner is bwa-mem2 - ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) - ch_versions = ch_versions.mix(BWAMEM2_MEM.out.versions.first()) - - DRAGMAP_ALIGN(ch_to_align.dragmap, sort) // If aligner is dragmap - ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) - ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) - ch_versions = ch_versions.mix(DRAGMAP_ALIGN.out.versions.first()) - - SNAPALIGNER_ALIGN(ch_to_align.snap) // If aligner is snap - ch_bam = ch_bam.mix(SNAPALIGNER_ALIGN.out.bam) - ch_bam_index.mix(SNAPALIGNER_ALIGN.out.bai) - ch_versions = ch_versions.mix(SNAPALIGNER_ALIGN.out.versions.first()) - - STROBEALIGN(ch_to_align.strobe, sort) // If aligner is strobealign - ch_bam = ch_bam.mix(STROBEALIGN.out.bam) - ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) - ch_versions = ch_versions.mix(STROBEALIGN.out.versions.first()) + .set { ch_to_align } + + // Throw error for all samples with unsupported aligners + ch_to_align.other.map { meta, _reads, aligner, _index, _fasta -> + error("Unsupported aligner ${aligner} for sample ${meta.id}") + } + + // Align fastq files to reference genome and (optionally) sort + BOWTIE2_ALIGN(ch_to_align.bowtie2, false, sort) + // if aligner is bowtie2 + ch_bam = ch_bam.mix(BOWTIE2_ALIGN.out.bam) + BWAMEM1_MEM(ch_to_align.bwamem, sort) + // If aligner is bwa-mem + ch_bam = ch_bam.mix(BWAMEM1_MEM.out.bam) + ch_bam_index = ch_bam_index.mix(BWAMEM1_MEM.out.csi) + BWAMEM2_MEM(ch_to_align.bwamem2, sort) + // If aligner is bwa-mem2 + ch_bam = ch_bam.mix(BWAMEM2_MEM.out.bam) + DRAGMAP_ALIGN(ch_to_align.dragmap, sort) + // If aligner is dragmap + ch_bam = ch_bam.mix(DRAGMAP_ALIGN.out.bam) + ch_reports = ch_reports.mix(DRAGMAP_ALIGN.out.log) + SNAP_ALIGN(ch_to_align.snap) + // If aligner is snap + ch_bam = ch_bam.mix(SNAP_ALIGN.out.bam) + ch_bam_index.mix(SNAP_ALIGN.out.bai) + STROBEALIGN(ch_to_align.strobe, sort) + // If aligner is strobealign + ch_bam = ch_bam.mix(STROBEALIGN.out.bam) + ch_bam_index = ch_bam_index.mix(STROBEALIGN.out.csi) emit: - bam = ch_bam // channel: [ [meta], bam ] - bam_index = ch_bam_index // channel: [ [meta], csi/bai ] - reports = ch_reports // channel: [ [meta], log ] - versions = ch_versions // channel: [ versions.yml ] + bam = ch_bam // channel: [ [meta], bam ] + bam_index = ch_bam_index // channel: [ [meta], csi/bai ] + reports = ch_reports // channel: [ [meta], log ] } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 365327af..e440222c 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -196,7 +196,6 @@ workflow PREPROCESSING { false, ) ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) - ch_versions = ch_versions.mix(FASTP.out.versions.first()) // edit meta.id to match sample name FASTP.out.reads @@ -240,9 +239,7 @@ workflow PREPROCESSING { FASTQ_TO_CRAM( ch_meta_reads_aligner_index_fasta_gtf ) - ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.sormadup_metrics) - ch_versions = ch_versions.mix(FASTQ_TO_CRAM.out.versions) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 2772ae24a79cae082f6ab3b8fa67b2db5f2e606d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 20:35:15 +0100 Subject: [PATCH 164/202] more topic work --- modules/nf-core/samtools/convert/samtools-convert.diff | 5 ++--- subworkflows/local/coverage/main.nf | 6 ------ workflows/preprocessing.nf | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/samtools/convert/samtools-convert.diff b/modules/nf-core/samtools/convert/samtools-convert.diff index bd28d5da..2ded55b4 100644 --- a/modules/nf-core/samtools/convert/samtools-convert.diff +++ b/modules/nf-core/samtools/convert/samtools-convert.diff @@ -4,13 +4,12 @@ Changes in component 'nf-core/samtools/convert' Changes in 'samtools/convert/main.nf': --- modules/nf-core/samtools/convert/main.nf +++ modules/nf-core/samtools/convert/main.nf -@@ -8,9 +8,7 @@ +@@ -8,8 +8,7 @@ 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input), path(index) -- tuple val(meta2), path(fasta) -- tuple val(meta3), path(fai) +- tuple val(meta2), path(fasta), path(fai) + tuple val(meta), path(input), path(index), path(fasta), path(fai) output: diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 501b0773..cca3ca59 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -20,18 +20,14 @@ workflow COVERAGE { return [meta, cram, crai, roi, fasta] } ) - ch_versions = ch_versions.mix(MOSDEPTH.out.versions.first()) SAMTOOLS_COVERAGE( ch_meta_cram_crai_fasta_fai_roi.map { meta, cram, crai, fasta, fai, _roi -> return [meta, cram, crai, fasta, fai] } ) - ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) ch_coverageqc_files = ch_coverageqc_files.merge(SAMTOOLS_COVERAGE.out.coverage) - ch_genelists.view() - PANELCOVERAGE( MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).map { meta, bed, index, genelists -> if (genelists !instanceof List) { @@ -52,7 +48,6 @@ workflow COVERAGE { } } ) - ch_versions = ch_versions.mix(PANELCOVERAGE.out.versions.first()) ch_coverageqc_files = ch_coverageqc_files.mix(PANELCOVERAGE.out.regiondist) emit: @@ -70,5 +65,4 @@ workflow COVERAGE { mosdepth_thresholds_csi = MOSDEPTH.out.thresholds_csi samtools_coverage = SAMTOOLS_COVERAGE.out.coverage panelcoverage = PANELCOVERAGE.out.regiondist - versions = ch_versions } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index e440222c..94cb7fdb 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -269,7 +269,6 @@ workflow PREPROCESSING { COVERAGE.out.mosdepth_regions, COVERAGE.out.samtools_coverage, ) - ch_versions = ch_versions.mix(COVERAGE.out.versions) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 693fad72f03c1d886f191e5bcf9bc87bedd06b3e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 20:42:09 +0100 Subject: [PATCH 165/202] add falco for unsupported fastq qc --- main.nf | 10 ++ modules.json | 5 + modules/nf-core/falco/environment.yml | 7 ++ modules/nf-core/falco/main.nf | 57 +++++++++ modules/nf-core/falco/meta.yml | 61 ++++++++++ modules/nf-core/falco/tests/main.nf.test | 108 ++++++++++++++++++ modules/nf-core/falco/tests/main.nf.test.snap | 61 ++++++++++ workflows/preprocessing.nf | 11 ++ 8 files changed, 320 insertions(+) create mode 100644 modules/nf-core/falco/environment.yml create mode 100644 modules/nf-core/falco/main.nf create mode 100644 modules/nf-core/falco/meta.yml create mode 100644 modules/nf-core/falco/tests/main.nf.test create mode 100644 modules/nf-core/falco/tests/main.nf.test.snap diff --git a/main.nf b/main.nf index 03dfac1a..6b0e25f3 100644 --- a/main.nf +++ b/main.nf @@ -68,6 +68,8 @@ workflow { demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by:1) demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by:1) demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() + falco_html = PREPROCESSING.out.falco_html + falco_txt = PREPROCESSING.out.falco_txt fastp_json = PREPROCESSING.out.fastp_json fastp_html = PREPROCESSING.out.fastp_html crams = PREPROCESSING.out.crams @@ -121,6 +123,14 @@ output { def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" fastq >> out_path } } + falco_html { path { meta, html -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path + } } + falco_txt { path { meta, txt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${txt.name}" as String : "${meta.samplename}/${txt.name}" + txt >> out_path + } } fastp_json { path { meta, json -> def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" json >> out_path diff --git a/modules.json b/modules.json index 0b710f92..845562bf 100644 --- a/modules.json +++ b/modules.json @@ -46,6 +46,11 @@ "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, + "falco": { + "branch": "master", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "installed_by": ["modules"] + }, "fastp": { "branch": "master", "git_sha": "b8f1de0ac853ae5b56c63450d47438f899c553d0", diff --git a/modules/nf-core/falco/environment.yml b/modules/nf-core/falco/environment.yml new file mode 100644 index 00000000..59c973a9 --- /dev/null +++ b/modules/nf-core/falco/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::falco=1.2.1 diff --git a/modules/nf-core/falco/main.nf b/modules/nf-core/falco/main.nf new file mode 100644 index 00000000..a4b343b2 --- /dev/null +++ b/modules/nf-core/falco/main.nf @@ -0,0 +1,57 @@ +process FALCO { + 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/falco:1.2.1--h867801b_3': + 'biocontainers/falco:1.2.1--h867801b_3' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.txt") , emit: txt + 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}" + if ( reads.toList().size() == 1 ) { + """ + falco $args --threads $task.cpus ${reads} -D ${prefix}_fastqc_data.txt -S ${prefix}_summary.txt -R ${prefix}_report.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + falco:\$( falco --version | sed -e "s/falco//g" ) + END_VERSIONS + """ + } else { + """ + falco $args --threads $task.cpus ${reads} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + falco:\$( falco --version | sed -e "s/falco//g" ) + END_VERSIONS + """ + } + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_data.txt + touch ${prefix}_fastqc_data.html + touch ${prefix}_summary.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + falco: \$( falco --version | sed -e "s/falco v//g" ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/falco/meta.yml b/modules/nf-core/falco/meta.yml new file mode 100644 index 00000000..1450f2da --- /dev/null +++ b/modules/nf-core/falco/meta.yml @@ -0,0 +1,61 @@ +name: falco +description: Run falco on sequenced reads +keywords: + - quality control + - qc + - adapters + - fastq +tools: + - fastqc: + description: "falco is a drop-in C++ implementation of FastQC to assess the quality + of sequence reads." + homepage: "https://falco.readthedocs.io/" + documentation: "https://falco.readthedocs.io/" + licence: ["GPL v3"] + identifier: biotools:falco-rna +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. + ontologies: [] +output: + html: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.html": + type: file + description: FastQC like report + pattern: "*_{fastqc_report.html}" + ontologies: [] + txt: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.txt": + type: file + description: falco report data + pattern: "*_{data.txt}" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@lucacozzuto" +maintainers: + - "@lucacozzuto" diff --git a/modules/nf-core/falco/tests/main.nf.test b/modules/nf-core/falco/tests/main.nf.test new file mode 100644 index 00000000..816c72ba --- /dev/null +++ b/modules/nf-core/falco/tests/main.nf.test @@ -0,0 +1,108 @@ +nextflow_process { + + name "Test Process FALCO" + script "../main.nf" + process "FALCO" + + tag "modules" + tag "modules_nfcore" + tag "falco" + + test("sarscov2 - fastq - single end") { + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file( + params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], + checkIfExists: true + ), + ], + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.txt, + file(process.out.html.get(0).get(1)).list(), + ).match() + }, + ) + } + + } + + test("sarscov2 - fastq - paired end") { + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:false ], + [ + file( + params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], + checkIfExists: true + ), + file( + params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], + checkIfExists: true + ), + ], + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.txt, + process.out.html.get(0).get(1).collect{ it.split("/")[-1] }.sort(), + ).match() + }, + ) + } + + } + + test("sarscov2 - fastq - interleaved") { + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:false ], + [ + file( + params.test_data['sarscov2']['illumina']['test_interleaved_fastq_gz'], + checkIfExists: true + ), + ], + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.txt, + file(process.out.html.get(0).get(1)).list(), + ).match() + }, + ) + } + + } + +} diff --git a/modules/nf-core/falco/tests/main.nf.test.snap b/modules/nf-core/falco/tests/main.nf.test.snap new file mode 100644 index 00000000..34ac64e3 --- /dev/null +++ b/modules/nf-core/falco/tests/main.nf.test.snap @@ -0,0 +1,61 @@ +{ + "sarscov2 - fastq - single end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test_fastqc_data.txt:md5,36d989bb9e2d5a632e19452f4e6c2a4e", + "test_summary.txt:md5,a925aec214a83d2f6252847166f2ef3a" + ] + ] + ], + null + ], + "timestamp": "2024-02-02T16:28:17.756764" + }, + "sarscov2 - fastq - paired end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastq.gz_fastqc_data.txt:md5,36d989bb9e2d5a632e19452f4e6c2a4e", + "test_1.fastq.gz_summary.txt:md5,a925aec214a83d2f6252847166f2ef3a", + "test_2.fastq.gz_fastqc_data.txt:md5,ad5c45dfc8f79754dd5d8029456b715b", + "test_2.fastq.gz_summary.txt:md5,d0cb642adefb5635a25e808f1f38780a" + ] + ] + ], + [ + "test_1.fastq.gz_fastqc_report.html", + "test_2.fastq.gz_fastqc_report.html" + ] + ], + "timestamp": "2024-02-02T16:22:11.757473" + }, + "sarscov2 - fastq - interleaved": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_fastqc_data.txt:md5,b5e593f140fe578bdd25ceb84e98fd37", + "test_summary.txt:md5,ca52f458b1223d89db69e2d5e73cf867" + ] + ] + ], + null + ], + "timestamp": "2024-02-02T16:28:36.035899" + } +} \ No newline at end of file diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 6d2802eb..3bc525fb 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -7,6 +7,7 @@ include { samplesheetToList } from 'plugin/nf-schema' */ // Modules +include { FALCO } from '../modules/nf-core/falcon/main' include { FASTP } from '../modules/nf-core/fastp/main' include { MD5SUM } from '../modules/nf-core/md5sum/main' include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' @@ -202,6 +203,14 @@ workflow PREPROCESSING { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + // MODULE: FALCO + // Run FALCO for "unsupported" fastq QC + // FALCO([meta, fastq]) + FALCO(ch_fastq_per_sample.other, false) + ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.html) + ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.txt) + ch_versions = ch_versions.mix(FALCO.out.versions.first()) + // MODULE: fastp // Run QC, trimming and adapter removal // FASTP([meta, fastq, adapter_fasta], save_trimmed, save_merged) @@ -485,6 +494,8 @@ workflow PREPROCESSING { demultiplex_reports = BCL_DEMULTIPLEX.out.reports demultiplex_logs = BCL_DEMULTIPLEX.out.logs demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other + falco_html = FALCO.out.html + falco_txt = FALCO.out.txt fastp_json = FASTP.out.json fastp_html = FASTP.out.html crams = FASTQ_TO_CRAM.out.cram_crai From 4ed927795877c6302c0b9dc2de1b07f4261345c4 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 08:45:02 +0100 Subject: [PATCH 166/202] fix typo + linting --- main.nf | 456 ++++++++++++++++++++++--------------- workflows/preprocessing.nf | 208 ++++++++--------- 2 files changed, 375 insertions(+), 289 deletions(-) diff --git a/main.nf b/main.nf index 6b0e25f3..412538d8 100644 --- a/main.nf +++ b/main.nf @@ -64,195 +64,277 @@ workflow { ) publish: - demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by:1) - demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by:1) - demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by:1) - demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() - falco_html = PREPROCESSING.out.falco_html - falco_txt = PREPROCESSING.out.falco_txt - fastp_json = PREPROCESSING.out.fastp_json - fastp_html = PREPROCESSING.out.fastp_html - crams = PREPROCESSING.out.crams - rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions - rna_junctions = PREPROCESSING.out.rna_junctions - align_reports = PREPROCESSING.out.align_reports - sormadup_metrics = PREPROCESSING.out.sormadup_metrics - mosdepth_global = PREPROCESSING.out.mosdepth_global - mosdepth_summary = PREPROCESSING.out.mosdepth_summary - mosdepth_regions = PREPROCESSING.out.mosdepth_regions - mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 - mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed - mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi - mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed - mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi - mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed - mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi - mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed - mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi - samtools_coverage = PREPROCESSING.out.samtools_coverage - panelcoverage = PREPROCESSING.out.panelcoverage - samtools_stats = PREPROCESSING.out.samtools_stats - samtools_flagstat = PREPROCESSING.out.samtools_flagstat - samtools_idxstats = PREPROCESSING.out.samtools_idxstats - picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics + demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by: 1) + demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by: 1) + demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by: 1) + demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() + falco_html = PREPROCESSING.out.falco_html + falco_txt = PREPROCESSING.out.falco_txt + fastp_json = PREPROCESSING.out.fastp_json + fastp_html = PREPROCESSING.out.fastp_html + crams = PREPROCESSING.out.crams + rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions + rna_junctions = PREPROCESSING.out.rna_junctions + align_reports = PREPROCESSING.out.align_reports + sormadup_metrics = PREPROCESSING.out.sormadup_metrics + mosdepth_global = PREPROCESSING.out.mosdepth_global + mosdepth_summary = PREPROCESSING.out.mosdepth_summary + mosdepth_regions = PREPROCESSING.out.mosdepth_regions + mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 + mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed + mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi + mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed + mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi + mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed + mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi + mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi + samtools_coverage = PREPROCESSING.out.samtools_coverage + panelcoverage = PREPROCESSING.out.panelcoverage + samtools_stats = PREPROCESSING.out.samtools_stats + samtools_flagstat = PREPROCESSING.out.samtools_flagstat + samtools_idxstats = PREPROCESSING.out.samtools_idxstats + picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics picard_multiplemetrics_pdf = PREPROCESSING.out.picard_multiplemetrics_pdf - picard_wgsmetrics = PREPROCESSING.out.picard_wgsmetrics - picard_hsmetrics = PREPROCESSING.out.picard_hsmetrics - md5sums = PREPROCESSING.out.md5sums - multiqc_main_report = PREPROCESSING.out.multiqc_main_report - multiqc_main_data = PREPROCESSING.out.multiqc_main_data - multiqc_main_plots = PREPROCESSING.out.multiqc_main_plots - multiqc_library_report = PREPROCESSING.out.multiqc_library_report - multiqc_library_data = PREPROCESSING.out.multiqc_library_data - multiqc_library_plots = PREPROCESSING.out.multiqc_library_plots + picard_wgsmetrics = PREPROCESSING.out.picard_wgsmetrics + picard_hsmetrics = PREPROCESSING.out.picard_hsmetrics + md5sums = PREPROCESSING.out.md5sums + multiqc_main_report = PREPROCESSING.out.multiqc_main_report + multiqc_main_data = PREPROCESSING.out.multiqc_main_data + multiqc_main_plots = PREPROCESSING.out.multiqc_main_plots + multiqc_library_report = PREPROCESSING.out.multiqc_library_report + multiqc_library_data = PREPROCESSING.out.multiqc_library_data + multiqc_library_plots = PREPROCESSING.out.multiqc_library_plots } output { - demultiplex_interop { path { _meta, bin -> - bin >> "Interop/${bin.name}" - } } - demultiplex_reports { path { meta, report -> - def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" - report >> out_path - } } - demultiplex_logs { path { meta, log -> - def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" - log >> out_path - } } - demultiplex_fastq { path { meta, fastq -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" - fastq >> out_path - } } - falco_html { path { meta, html -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" - html >> out_path - } } - falco_txt { path { meta, txt -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${txt.name}" as String : "${meta.samplename}/${txt.name}" - txt >> out_path - } } - fastp_json { path { meta, json -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" - json >> out_path - } } - fastp_html { path { meta, html -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" - html >> out_path - } } - crams { path { meta, cram, crai -> - def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" - def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" - cram >> out_cram - crai >> out_crai - } } - rna_splice_junctions { path { meta, sjt -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" - sjt >> out_path - } } - rna_junctions { path { meta, junctions -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" - junctions >> out_path - } } - align_reports { path { meta, log -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" - log >> out_path - } } - sormadup_metrics { path { meta, metrics -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" - metrics >> out_path - } } - mosdepth_global { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_summary { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_d4 { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_quantized_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_quantized_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_thresholds_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_thresholds_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_coverage { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - panelcoverage { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_stats { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_flagstat { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_idxstats { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_multiplemetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_multiplemetrics_pdf { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_wgsmetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_hsmetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - md5sums { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - multiqc_main_report { path "multiqc/" } - multiqc_main_data { path "multiqc/" } - multiqc_main_plots { path "multiqc/" } - multiqc_library_report { path "multiqc/" } - multiqc_library_data { path "multiqc/" } - multiqc_library_plots { path "multiqc/" } + demultiplex_interop { + path { _meta, bin -> + bin >> "Interop/${bin.name}" + } + } + demultiplex_reports { + path { meta, report -> + def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" + report >> out_path + } + } + demultiplex_logs { + path { meta, log -> + def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" + log >> out_path + } + } + demultiplex_fastq { + path { meta, fastq -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" + fastq >> out_path + } + } + falco_html { + path { meta, html -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path + } + } + falco_txt { + path { meta, txt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${txt.name}" as String : "${meta.samplename}/${txt.name}" + txt >> out_path + } + } + fastp_json { + path { meta, json -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" + json >> out_path + } + } + fastp_html { + path { meta, html -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path + } + } + crams { + path { meta, cram, crai -> + def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" + def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" + cram >> out_cram + crai >> out_crai + } + } + rna_splice_junctions { + path { meta, sjt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" + sjt >> out_path + } + } + rna_junctions { + path { meta, junctions -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" + junctions >> out_path + } + } + align_reports { + path { meta, log -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" + log >> out_path + } + } + sormadup_metrics { + path { meta, metrics -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" + metrics >> out_path + } + } + mosdepth_global { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_summary { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_d4 { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_quantized_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_quantized_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_thresholds_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_thresholds_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_coverage { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + panelcoverage { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_stats { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_flagstat { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_idxstats { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_multiplemetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_multiplemetrics_pdf { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_wgsmetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_hsmetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + md5sums { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + multiqc_main_report { + path "multiqc/" + } + multiqc_main_data { + path "multiqc/" + } + multiqc_main_plots { + path "multiqc/" + } + multiqc_library_report { + path "multiqc/" + } + multiqc_library_data { + path "multiqc/" + } + multiqc_library_plots { + path "multiqc/" + } } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 3bc525fb..e76ee226 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -1,4 +1,4 @@ -include { samplesheetToList } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -7,26 +7,26 @@ include { samplesheetToList } from 'plugin/nf-schema' */ // Modules -include { FALCO } from '../modules/nf-core/falcon/main' -include { FASTP } from '../modules/nf-core/fastp/main' -include { MD5SUM } from '../modules/nf-core/md5sum/main' -include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' -include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' -include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' -include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' +include { FALCO } from '../modules/nf-core/falco/main' +include { FASTP } from '../modules/nf-core/fastp/main' +include { MD5SUM } from '../modules/nf-core/md5sum/main' +include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' +include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' +include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' +include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' // Subworkflows -include { BAM_QC } from '../subworkflows/local/bam_qc/main' -include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' -include { COVERAGE } from '../subworkflows/local/coverage/main' -include { FASTQ_TO_CRAM } from '../subworkflows/local/fastq_to_aligned_cram/main' +include { BAM_QC } from '../subworkflows/local/bam_qc/main' +include { BCL_DEMULTIPLEX } from '../subworkflows/nf-core/bcl_demultiplex/main' +include { COVERAGE } from '../subworkflows/local/coverage/main' +include { FASTQ_TO_CRAM } from '../subworkflows/local/fastq_to_aligned_cram/main' // Functions -include { paramsSummaryMap } from 'plugin/nf-schema' -include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' -include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' -include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' -include { getGenomeAttribute } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' +include { methodsDescriptionText } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' +include { getGenomeAttribute } from '../subworkflows/local/utils_nfcore_preprocessing_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -37,10 +37,10 @@ include { getGenomeAttribute } from '../subworkflows/local/utils_nfco workflow PREPROCESSING { take: ch_samplesheet // channel: samplesheet read in from --input - genomes // map: genome reference files - markdup // string: markdup method to use - roi // file: regions of interest bed file to be applied to all samples - genelists // file: directory containing genelist bed files for coverage analysis + genomes // map: genome reference files + markdup // string: markdup method to use + roi // file: regions of interest bed file to be applied to all samples + genelists // file: directory containing genelist bed files for coverage analysis main: ch_versions = channel.empty() @@ -79,7 +79,7 @@ workflow PREPROCESSING { BCL_DEMULTIPLEX.out.fastq.dump(tag: "DEMULTIPLEX: fastq", pretty: true) ch_multiqc_files = ch_multiqc_files.mix( BCL_DEMULTIPLEX.out.reports, - BCL_DEMULTIPLEX.out.stats + BCL_DEMULTIPLEX.out.stats, ) ch_versions = ch_versions.mix(BCL_DEMULTIPLEX.out.versions) @@ -197,7 +197,7 @@ workflow PREPROCESSING { ch_fastq_per_sample.supported.dump(tag: "Supported FASTQ per sample", pretty: true) ch_fastq_per_sample.other.dump(tag: "Other FASTQ per sample", pretty: true) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // FASTQ TRIMMING AND QC ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -206,15 +206,17 @@ workflow PREPROCESSING { // MODULE: FALCO // Run FALCO for "unsupported" fastq QC // FALCO([meta, fastq]) - FALCO(ch_fastq_per_sample.other, false) - ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.html) - ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.txt) - ch_versions = ch_versions.mix(FALCO.out.versions.first()) + FALCO(ch_fastq_per_sample.other) + ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.html) + ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.txt) + ch_versions = ch_versions.mix(FALCO.out.versions.first()) // MODULE: fastp // Run QC, trimming and adapter removal // FASTP([meta, fastq, adapter_fasta], save_trimmed, save_merged) - FASTP(ch_fastq_per_sample.supported.map{ meta, fastq -> return [meta, fastq, []] }, false, false, false) + FASTP(ch_fastq_per_sample.supported.map { meta, fastq -> + return [meta, fastq, []] + }, false, false, false) ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) ch_versions = ch_versions.mix(FASTP.out.versions.first()) @@ -239,22 +241,23 @@ workflow PREPROCESSING { ch_trimmed_reads.dump(tag: "Supported trimmed reads per sample", pretty: true) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: FASTQ TO ALIGNED CRAM CONVERSION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ - ch_trimmed_reads.map { meta, reads -> - return [ - meta, - reads, - meta.aligner, - getGenomeAttribute(meta.genome_data, meta.aligner), - getGenomeAttribute(meta.genome_data, "fasta"), - getGenomeAttribute(meta.genome_data, "gtf"), - ] - } - .set { ch_meta_reads_aligner_index_fasta_gtf } + ch_trimmed_reads + .map { meta, reads -> + return [ + meta, + reads, + meta.aligner, + getGenomeAttribute(meta.genome_data, meta.aligner), + getGenomeAttribute(meta.genome_data, "fasta"), + getGenomeAttribute(meta.genome_data, "gtf"), + ] + } + .set { ch_meta_reads_aligner_index_fasta_gtf } FASTQ_TO_CRAM( ch_meta_reads_aligner_index_fasta_gtf, @@ -414,7 +417,7 @@ workflow PREPROCESSING { // // Collate and save software versions // - def topic_versions = Channel.topic("versions") + def topic_versions = channel.topic("versions") .distinct() .branch { entry -> versions_file: entry instanceof Path @@ -423,9 +426,9 @@ workflow PREPROCESSING { def topic_versions_string = topic_versions.versions_tuple .map { process, tool, version -> - [ process[process.lastIndexOf(':')+1..-1], " ${tool}: ${version}" ] + [process[process.lastIndexOf(':') + 1..-1], " ${tool}: ${version}"] } - .groupTuple(by:0) + .groupTuple(by: 0) .map { process, tool_versions -> tool_versions.unique().sort() "${process}:\n${tool_versions.join('\n')}" @@ -437,42 +440,43 @@ workflow PREPROCESSING { storeDir: "${params.outdir}/pipeline_info", name: 'nf_cmgg_preprocessing_software_mqc_versions.yml', sort: true, - newLine: true + newLine: true, ) - .map { file -> [[id: 'main'], file] } // add meta for multiqc + .map { file -> [[id: 'main'], file] } .set { ch_collated_versions } // // MODULE: MultiQC // - ch_multiqc_config = channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true) + ch_multiqc_config = channel.fromPath("${projectDir}/assets/multiqc_config.yml", checkIfExists: true) ch_multiqc_custom_config = params.multiqc_config ? channel.fromPath(params.multiqc_config, checkIfExists: true) : channel.empty() - ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() + ch_multiqc_logo = params.multiqc_logo ? channel.fromPath(params.multiqc_logo, checkIfExists: true) : channel.empty() - summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") + summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") ch_workflow_summary = channel.value(paramsSummaryMultiqc(summary_params)) - ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml').map{ file -> [[id: 'main'], file] }) + ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml').map { file -> [[id: 'main'], file] }) - ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true) + ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("${projectDir}/assets/methods_description_template.yml", checkIfExists: true) ch_methods_description = channel.value(methodsDescriptionText(ch_multiqc_custom_methods_description)) ch_multiqc_files = ch_multiqc_files.mix(ch_collated_versions) - ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true).map{ file -> [[id: 'main'], file] }) + ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml', sort: true).map { file -> [[id: 'main'], file] }) - ch_multiqc_files = ch_multiqc_files.map { meta, files -> - return [meta.library ? [id: meta.library] : [id: 'main'], files] - } - .branch { meta, files -> - main: meta.id == 'main' + ch_multiqc_files = ch_multiqc_files + .map { meta, files -> + return [meta.library ? [id: meta.library] : [id: 'main'], files] + } + .branch { meta, files -> + main: meta.id == 'main' return files - library: meta.id != 'main' + library: meta.id != 'main' return [meta, files instanceof List ? files : [files]] - } + } ch_multiqc_files.main.dump(tag: "MULTIQC files - main", pretty: true) ch_multiqc_files.library.dump(tag: "MULTIQC files - library", pretty: true) MULTIQC_MAIN( - ch_multiqc_files.main.collect().map{ files -> [[id: 'main'], files] }, + ch_multiqc_files.main.collect().map { files -> [[id: 'main'], files] }, ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), @@ -481,7 +485,7 @@ workflow PREPROCESSING { ) MULTIQC_LIBRARY( - ch_multiqc_files.library.transpose(by:1).groupTuple(), + ch_multiqc_files.library.transpose(by: 1).groupTuple(), ch_multiqc_config.toList(), ch_multiqc_custom_config.toList(), ch_multiqc_logo.toList(), @@ -490,48 +494,48 @@ workflow PREPROCESSING { ) emit: - demultiplex_interop = BCL_DEMULTIPLEX.out.interop - demultiplex_reports = BCL_DEMULTIPLEX.out.reports - demultiplex_logs = BCL_DEMULTIPLEX.out.logs - demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other - falco_html = FALCO.out.html - falco_txt = FALCO.out.txt - fastp_json = FASTP.out.json - fastp_html = FASTP.out.html - crams = FASTQ_TO_CRAM.out.cram_crai - rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions - rna_junctions = FASTQ_TO_CRAM.out.rna_junctions - align_reports = FASTQ_TO_CRAM.out.align_reports - sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics - mosdepth_global = mosdepth_global_out - mosdepth_summary = mosdepth_summary_out - mosdepth_regions = mosdepth_regions_out - mosdepth_per_base_d4 = mosdepth_per_base_d4_out - mosdepth_per_base_bed = mosdepth_per_base_bed_out - mosdepth_per_base_csi = mosdepth_per_base_csi_out - mosdepth_regions_bed = mosdepth_regions_bed_out - mosdepth_regions_csi = mosdepth_regions_csi_out - mosdepth_quantized_bed = mosdepth_quantized_bed_out - mosdepth_quantized_csi = mosdepth_quantized_csi_out - mosdepth_thresholds_bed = mosdepth_thresholds_bed_out - mosdepth_thresholds_csi = mosdepth_thresholds_csi_out - samtools_coverage = samtools_coverage_out - panelcoverage = panelcoverage_out - samtools_stats = BAM_QC.out.samtools_stats - samtools_flagstat = BAM_QC.out.samtools_flagstat - samtools_idxstats = BAM_QC.out.samtools_idxstats - picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics - picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf - picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics - picard_hsmetrics = BAM_QC.out.picard_hsmetrics - md5sums = MD5SUM.out.checksum - multiqc_main_report = MULTIQC_MAIN.out.report.toList() - multiqc_main_data = MULTIQC_MAIN.out.data.toList() - multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() - multiqc_library_report = MULTIQC_LIBRARY.out.report - multiqc_library_data = MULTIQC_LIBRARY.out.data - multiqc_library_plots = MULTIQC_LIBRARY.out.plots - versions = ch_versions + demultiplex_interop = BCL_DEMULTIPLEX.out.interop + demultiplex_reports = BCL_DEMULTIPLEX.out.reports + demultiplex_logs = BCL_DEMULTIPLEX.out.logs + demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other + falco_html = FALCO.out.html + falco_txt = FALCO.out.txt + fastp_json = FASTP.out.json + fastp_html = FASTP.out.html + crams = FASTQ_TO_CRAM.out.cram_crai + rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions + rna_junctions = FASTQ_TO_CRAM.out.rna_junctions + align_reports = FASTQ_TO_CRAM.out.align_reports + sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics + mosdepth_global = mosdepth_global_out + mosdepth_summary = mosdepth_summary_out + mosdepth_regions = mosdepth_regions_out + mosdepth_per_base_d4 = mosdepth_per_base_d4_out + mosdepth_per_base_bed = mosdepth_per_base_bed_out + mosdepth_per_base_csi = mosdepth_per_base_csi_out + mosdepth_regions_bed = mosdepth_regions_bed_out + mosdepth_regions_csi = mosdepth_regions_csi_out + mosdepth_quantized_bed = mosdepth_quantized_bed_out + mosdepth_quantized_csi = mosdepth_quantized_csi_out + mosdepth_thresholds_bed = mosdepth_thresholds_bed_out + mosdepth_thresholds_csi = mosdepth_thresholds_csi_out + samtools_coverage = samtools_coverage_out + panelcoverage = panelcoverage_out + samtools_stats = BAM_QC.out.samtools_stats + samtools_flagstat = BAM_QC.out.samtools_flagstat + samtools_idxstats = BAM_QC.out.samtools_idxstats + picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics + picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf + picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics + picard_hsmetrics = BAM_QC.out.picard_hsmetrics + md5sums = MD5SUM.out.checksum + multiqc_main_report = MULTIQC_MAIN.out.report.toList() + multiqc_main_data = MULTIQC_MAIN.out.data.toList() + multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() + multiqc_library_report = MULTIQC_LIBRARY.out.report + multiqc_library_data = MULTIQC_LIBRARY.out.data + multiqc_library_plots = MULTIQC_LIBRARY.out.plots + versions = ch_versions } /* From 27e1dd69a242604229c55694947adaa6cbab641d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:04:36 +0100 Subject: [PATCH 167/202] drop unused gh workflows --- .github/workflows/fix-linting.yml | 89 ------------------------------- .github/workflows/fix_linting.yml | 89 ------------------------------- 2 files changed, 178 deletions(-) delete mode 100644 .github/workflows/fix-linting.yml delete mode 100644 .github/workflows/fix_linting.yml diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml deleted file mode 100644 index 2230aafb..00000000 --- a/.github/workflows/fix-linting.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Fix linting from a comment -on: - issue_comment: - types: [created] - -jobs: - fix-linting: - # Only run if comment is on a PR with the main repo, and if it contains the magic keywords - if: > - contains(github.event.comment.html_url, '/pull/') && - contains(github.event.comment.body, '@nf-core-bot fix linting') && - github.repository == 'nf-cmgg/preprocessing' - runs-on: ubuntu-latest - steps: - # Use the @nf-core-bot token to check out so we can push later - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - token: ${{ secrets.nf_core_bot_auth_token }} - - # indication that the linting is being fixed - - name: React on comment - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - comment-id: ${{ github.event.comment.id }} - reactions: eyes - - # Action runs on the issue comment, so we don't get the PR by default - # Use the gh cli to check out the PR - - name: Checkout Pull Request - run: gh pr checkout ${{ github.event.issue.number }} - env: - GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} - - # Install and run pre-commit - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 - with: - python-version: 3.11 - - - name: Install pre-commit - run: pip install pre-commit - - - name: Run pre-commit - id: pre-commit - run: pre-commit run --all-files - continue-on-error: true - - # indication that the linting has finished - - name: react if linting finished succesfully - if: steps.pre-commit.outcome == 'success' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - comment-id: ${{ github.event.comment.id }} - reactions: "+1" - - - name: Commit & push changes - id: commit-and-push - if: steps.pre-commit.outcome == 'failure' - run: | - git config user.email "core@nf-co.re" - git config user.name "nf-core-bot" - git config push.default upstream - git add . - git status - git commit -m "[automated] Fix code linting" - git push - - - name: react if linting errors were fixed - id: react-if-fixed - if: steps.commit-and-push.outcome == 'success' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - comment-id: ${{ github.event.comment.id }} - reactions: hooray - - - name: react if linting errors were not fixed - if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - comment-id: ${{ github.event.comment.id }} - reactions: confused - - - name: react if linting errors were not fixed - if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - issue-number: ${{ github.event.issue.number }} - body: | - @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually. - See [CI log](https://github.com/nf-cmgg/preprocessing/actions/runs/${{ github.run_id }}) for more details. diff --git a/.github/workflows/fix_linting.yml b/.github/workflows/fix_linting.yml deleted file mode 100644 index 63b82243..00000000 --- a/.github/workflows/fix_linting.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Fix linting from a comment -on: - issue_comment: - types: [created] - -jobs: - fix-linting: - # Only run if comment is on a PR with the main repo, and if it contains the magic keywords - if: > - contains(github.event.comment.html_url, '/pull/') && - contains(github.event.comment.body, '@nf-core-bot fix linting') && - github.repository == 'nf-cmgg/preprocessing' - runs-on: ubuntu-latest - steps: - # Use the @nf-core-bot token to check out so we can push later - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - with: - token: ${{ secrets.nf_core_bot_auth_token }} - - # indication that the linting is being fixed - - name: React on comment - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - comment-id: ${{ github.event.comment.id }} - reactions: eyes - - # Action runs on the issue comment, so we don't get the PR by default - # Use the gh cli to check out the PR - - name: Checkout Pull Request - run: gh pr checkout ${{ github.event.issue.number }} - env: - GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} - - # Install and run pre-commit - - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 - with: - python-version: "3.14" - - - name: Install pre-commit - run: pip install pre-commit - - - name: Run pre-commit - id: pre-commit - run: pre-commit run --all-files - continue-on-error: true - - # indication that the linting has finished - - name: react if linting finished succesfully - if: steps.pre-commit.outcome == 'success' - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - comment-id: ${{ github.event.comment.id }} - reactions: "+1" - - - name: Commit & push changes - id: commit-and-push - if: steps.pre-commit.outcome == 'failure' - run: | - git config user.email "core@nf-co.re" - git config user.name "nf-core-bot" - git config push.default upstream - git add . - git status - git commit -m "[automated] Fix code linting" - git push - - - name: react if linting errors were fixed - id: react-if-fixed - if: steps.commit-and-push.outcome == 'success' - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - comment-id: ${{ github.event.comment.id }} - reactions: hooray - - - name: react if linting errors were not fixed - if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - comment-id: ${{ github.event.comment.id }} - reactions: confused - - - name: react if linting errors were not fixed - if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - issue-number: ${{ github.event.issue.number }} - body: | - @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually. - See [CI log](https://github.com/nf-cmgg/preprocessing/actions/runs/${{ github.run_id }}) for more details. From 9ebb533815b3826902d3d1f9c19f3bb762f4c1bc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:04:57 +0100 Subject: [PATCH 168/202] calculate checksums for fastq output --- workflows/preprocessing.nf | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index e76ee226..12d4b8b2 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -214,9 +214,14 @@ workflow PREPROCESSING { // MODULE: fastp // Run QC, trimming and adapter removal // FASTP([meta, fastq, adapter_fasta], save_trimmed, save_merged) - FASTP(ch_fastq_per_sample.supported.map { meta, fastq -> - return [meta, fastq, []] - }, false, false, false) + FASTP( + ch_fastq_per_sample.supported.map { meta, fastq -> + return [meta, fastq, []] + }, + false, + false, + false, + ) ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) ch_versions = ch_versions.mix(FASTP.out.versions.first()) @@ -402,9 +407,11 @@ workflow PREPROCESSING { */ MD5SUM( - FASTQ_TO_CRAM.out.cram_crai.map { meta, cram, _crai -> - return [meta, cram] - }, + ch_fastq_per_sample.other.mix( + FASTQ_TO_CRAM.out.cram_crai.map { meta, cram, _crai -> + return [meta, cram] + } + ), false, ) ch_versions = ch_versions.mix(MD5SUM.out.versions.first()) From e5bd5487129a9a1315e70fae760d529e041e56d9 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:03:53 +0100 Subject: [PATCH 169/202] nextflow config lint --- nextflow.config | 272 +++++++++++++++++++------------------------ nextflow_schema.json | 51 -------- 2 files changed, 121 insertions(+), 202 deletions(-) diff --git a/nextflow.config b/nextflow.config index 2beb9d9e..c6205a67 100644 --- a/nextflow.config +++ b/nextflow.config @@ -10,33 +10,33 @@ params { // Input options - input = null + input = null // References - genome = null - igenomes_base = '/references/' - igenomes_ignore = false + genome = null + igenomes_base = '/references/' + igenomes_ignore = false // Analysis options - markdup = 'bamsormadup' - umi_aware = false - skip_trimming = false - split_fastq = 100000000 - trim_front = 0 - trim_tail = 0 - adapter_R1 = null - adapter_R2 = null - run_coverage = true - disable_picard_metrics = false - roi = null - genelists = null + markdup = 'bamsormadup' + umi_aware = false + skip_trimming = false + split_fastq = 100000000 + trim_front = 0 + trim_tail = 0 + adapter_R1 = null + adapter_R2 = null + run_coverage = true + disable_picard_metrics = false + roi = null + genelists = null // MultiQC options - multiqc_config = null - multiqc_title = null - multiqc_logo = null - max_multiqc_email_size = '25.MB' - multiqc_methods_description = null + multiqc_config = null + multiqc_title = null + multiqc_logo = null + max_multiqc_email_size = '25.MB' + multiqc_methods_description = null // Boilerplate options outdir = null @@ -51,28 +51,19 @@ params { show_hidden = false version = false pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' - trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') + trace_report_suffix = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') // Config options - config_profile_name = null - config_profile_description = null + config_profile_name = null + config_profile_description = null - custom_config_version = 'master' - custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" - config_profile_contact = null - config_profile_url = null - - // CMGG Config options - cmgg_config_profile_name = null - cmgg_config_profile_description = null - - cmgg_custom_config_version = 'main' - cmgg_custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.cmgg_custom_config_version}" - cmgg_config_profile_contact = null - cmgg_config_profile_url = null + custom_config_version = 'main' + custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.custom_config_version}" + config_profile_contact = null + config_profile_url = null // Schema validation default options - validate_params = true + validate_params = true } // Load base.config by default for all pipelines @@ -83,40 +74,40 @@ includeConfig !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ profiles { debug { - dumpHashes = true - process.beforeScript = 'echo $HOSTNAME' - cleanup = false + dumpHashes = true + process.beforeScript = 'echo $HOSTNAME' + cleanup = false nextflow.enable.configProcessNamesValidation = true } conda { - conda.enabled = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - conda.channels = ['conda-forge', 'bioconda'] - apptainer.enabled = false + conda.enabled = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + conda.channels = ['conda-forge', 'bioconda'] + apptainer.enabled = false } mamba { - conda.enabled = true - conda.useMamba = true - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + conda.enabled = true + conda.useMamba = true + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } docker { - docker.enabled = true - conda.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false - docker.runOptions = '-u $(id -u):$(id -g)' + docker.enabled = true + conda.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false + docker.runOptions = '-u $(id -u):$(id -g)' } arm64 { process.arch = 'arm64' @@ -130,54 +121,54 @@ profiles { wave.strategy = 'conda,container' } emulate_amd64 { - docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' + docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { - singularity.enabled = true - singularity.autoMounts = true - conda.enabled = false - docker.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + singularity.enabled = true + singularity.autoMounts = true + conda.enabled = false + docker.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } podman { - podman.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - shifter.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + podman.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + shifter.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } shifter { - shifter.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - charliecloud.enabled = false - apptainer.enabled = false + shifter.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + charliecloud.enabled = false + apptainer.enabled = false } charliecloud { - charliecloud.enabled = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - apptainer.enabled = false + charliecloud.enabled = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + apptainer.enabled = false } apptainer { - apptainer.enabled = true - apptainer.autoMounts = true - conda.enabled = false - docker.enabled = false - singularity.enabled = false - podman.enabled = false - shifter.enabled = false - charliecloud.enabled = false + apptainer.enabled = true + apptainer.autoMounts = true + conda.enabled = false + docker.enabled = false + singularity.enabled = false + podman.enabled = false + shifter.enabled = false + charliecloud.enabled = false } wave { apptainer.ociAutoPull = true @@ -187,12 +178,16 @@ profiles { wave.strategy = 'conda,container' } gpu { - docker.runOptions = '-u $(id -u):$(id -g) --gpus all' - apptainer.runOptions = '--nv' - singularity.runOptions = '--nv' + docker.runOptions = '-u $(id -u):$(id -g) --gpus all' + apptainer.runOptions = '--nv' + singularity.runOptions = '--nv' + } + test { + includeConfig 'conf/test.config' + } + test_full { + includeConfig 'conf/test_full.config' } - test { includeConfig 'conf/test.config' } - test_full { includeConfig 'conf/test_full.config' } } // Load nf-core custom profiles from different institutions @@ -203,19 +198,15 @@ includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !pa // Load nf-cmgg/preprocessing custom profiles from different institutions. -// TODO nf-core: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs -// includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" - -// Load nf-cmgg/preprocessing custom profiles from nf-cmgg/configs. -includeConfig params.cmgg_custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.cmgg_custom_config_base.startsWith('http')) ? "${params.cmgg_custom_config_base}/pipeline/preprocessing.config" : "/dev/null" +includeConfig params.custom_config_base && params.custom_config_base.contains('nf-cmgg') && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" // Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile // Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled // Set to your registry if you have a mirror of containers -apptainer.registry = 'quay.io' -docker.registry = 'quay.io' -podman.registry = 'quay.io' -singularity.registry = 'quay.io' +apptainer.registry = 'quay.io' +docker.registry = 'quay.io' +podman.registry = 'quay.io' +singularity.registry = 'quay.io' charliecloud.registry = 'quay.io' // Export these variables to prevent local Python/R libraries from conflicting with those in the container @@ -230,58 +221,37 @@ env { } // Set bash options -process.shell = [ - "bash", - "-C", // No clobber - prevent output redirection from overwriting files. - "-e", // Exit if a tool returns a non-zero status/exit code - "-u", // Treat unset variables and parameters as an error - "-o", // Returns the status of the last command to exit.. - "pipefail" // ..with a non-zero status or zero if all successfully execute -] +process.shell = ["bash", "-C", "-e", "-u", "-o", "pipefail"] // Disable process selector warnings by default. Use debug profile to enable warnings. nextflow.enable.configProcessNamesValidation = false timeline { - enabled = true + enabled = true overwrite = true - file = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html" + file = "${params.outdir}/pipeline_info/execution_timeline_${params.trace_report_suffix}.html" } report { - enabled = true + enabled = true overwrite = true - file = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html" + file = "${params.outdir}/pipeline_info/execution_report_${params.trace_report_suffix}.html" } trace { - enabled = true + enabled = true overwrite = true - file = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt" + file = "${params.outdir}/pipeline_info/execution_trace_${params.trace_report_suffix}.txt" } dag { - enabled = true + enabled = true overwrite = true - file = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html" + file = "${params.outdir}/pipeline_info/pipeline_dag_${params.trace_report_suffix}.html" } manifest { name = 'nf-cmgg/preprocessing' contributors = [ - [ - name: 'Matthias De Smet', - affiliation: 'Center for Medical Genetics Ghent, Ghent University, Belgium', - email: 'matthias.desmet@ugent.be', - github: '@matthdsm', - contribution: ["author","maintainer"], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: 'https://orcid.org/0000-0003-2555-3114' - ], - [ - name: ' Nicolas Vannieuwkerke', - affiliation: 'Center for Medical Genetics Ghent, Ghent University Hospital, Belgium', - email: 'nicolas.vannieuwkerke@ugent.be', - github: '@nvnieuwk', - contribution: ["maintainer"], // List of contribution types ('author', 'maintainer' or 'contributor') - orcid: 'https://orcid.org/0009-0003-5619-1555' - ], + [name: 'Matthias De Smet', affiliation: 'Center for Medical Genetics Ghent, Ghent University, Belgium', email: 'matthias.desmet@ugent.be', github: '@matthdsm', contribution: ["author", "maintainer"], orcid: 'https://orcid.org/0000-0003-2555-3114'], + [name: ' Nicolas Vannieuwkerke', affiliation: 'Center for Medical Genetics Ghent, Ghent University Hospital, Belgium', email: 'nicolas.vannieuwkerke@ugent.be', github: '@nvnieuwk', contribution: ["maintainer"], orcid: 'https://orcid.org/0009-0003-5619-1555'], ] homePage = 'https://github.com/nf-cmgg/preprocessing' description = """Demultiplexing, adapter trimming, alignment, and coverage calculation for NGS data.""" @@ -294,12 +264,12 @@ manifest { // Nextflow plugins plugins { - id 'nf-schema@2.6.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-schema@2.6.1' } validation { defaultIgnoreParams = ["genomes"] - monochromeLogs = params.monochrome_logs + monochromeLogs = params.monochrome_logs } // Load modules.config for DSL2 module specific options diff --git a/nextflow_schema.json b/nextflow_schema.json index 63d39f34..19a00a3f 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -174,54 +174,6 @@ } } }, - "cmgg_institutional_config_options": { - "title": "nf-cmgg config options", - "type": "object", - "fa_icon": "fas fa-university", - "description": "Parameters used to describe centralised config profiles. These should not be edited.", - "help_text": "The centralised nf-cmgg configuration profiles use a handful of pipeline parameters to describe themselves. This information is then printed to the Nextflow log when you run a pipeline. You should not need to change these values when you run a pipeline.", - "properties": { - "cmgg_custom_config_version": { - "type": "string", - "description": "Git commit id for nf-cmgg configs.", - "default": "master", - "hidden": true, - "fa_icon": "fas fa-users-cog" - }, - "cmgg_custom_config_base": { - "type": "string", - "description": "Base directory for nf-cmgg configs.", - "default": "https://raw.githubusercontent.com/nf-cmgg/configs/master", - "hidden": true, - "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", - "fa_icon": "fas fa-users-cog" - }, - "cmgg_config_profile_name": { - "type": "string", - "description": "nf-cmgg config name.", - "hidden": true, - "fa_icon": "fas fa-users-cog" - }, - "cmgg_config_profile_description": { - "type": "string", - "description": "nf-cmgg config description.", - "hidden": true, - "fa_icon": "fas fa-users-cog" - }, - "cmgg_config_profile_contact": { - "type": "string", - "description": "nf-cmgg config contact information.", - "hidden": true, - "fa_icon": "fas fa-users-cog" - }, - "cmgg_config_profile_url": { - "type": "string", - "description": "nf-cmgg config URL link.", - "hidden": true, - "fa_icon": "fas fa-users-cog" - } - } - }, "generic_options": { "title": "Generic options", "type": "object", @@ -363,9 +315,6 @@ { "$ref": "#/$defs/institutional_config_options" }, - { - "$ref": "#/$defs/cmgg_institutional_config_options" - }, { "$ref": "#/$defs/generic_options" } From 78e0750ad6dcf296a76c297e4b0f10166c130a72 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:49:18 +0100 Subject: [PATCH 170/202] fix tests --- conf/modules.config | 3 ++ .../nf-core/picard/collecthsmetrics/main.nf | 5 +-- .../picard/collectmultiplemetrics/main.nf | 2 ++ .../nf-core/picard/collectwgsmetrics/main.nf | 2 ++ subworkflows/local/coverage/main.nf | 10 +++--- tests/config/igenomes_test.config | 1 + .../local/fastq_align_rna/main.nf.test.snap | 2 +- .../fastq_to_aligned_cram/main.nf.test.snap | 32 +++++++++---------- 8 files changed, 32 insertions(+), 25 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 36734a8a..07ea1623 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -305,4 +305,7 @@ env { MOSDEPTH_Q0 = 'NO_COVERAGE' MOSDEPTH_Q1 = 'LOW_COVERAGE' MOSDEPTH_Q2 = 'CALLABLE' + + // Set TMPDIR for all modules + TMPDIR = "$PWD" } diff --git a/modules/nf-core/picard/collecthsmetrics/main.nf b/modules/nf-core/picard/collecthsmetrics/main.nf index a1dc56d8..914ae62c 100644 --- a/modules/nf-core/picard/collecthsmetrics/main.nf +++ b/modules/nf-core/picard/collecthsmetrics/main.nf @@ -45,6 +45,7 @@ process PICARD_COLLECTHSMETRICS { """ + export TMP=\$PWD $bait_intervallist_cmd $target_intervallist_cmd @@ -57,8 +58,8 @@ process PICARD_COLLECTHSMETRICS { --BAIT_INTERVALS $bait_interval_list \\ --TARGET_INTERVALS $target_interval_list \\ --INPUT $bam \\ - --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics - + --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics \\ + --TMP_DIR . cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index e4d74998..b1a45737 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -29,12 +29,14 @@ process PICARD_COLLECTMULTIPLEMETRICS { avail_mem = (task.memory.mega*0.8).intValue() } """ + export TMP=\$PWD picard \\ -Xmx${avail_mem}M \\ CollectMultipleMetrics \\ $args \\ --INPUT $bam \\ --OUTPUT ${prefix}.CollectMultipleMetrics \\ + --TMP_DIR . \\ $reference cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/picard/collectwgsmetrics/main.nf b/modules/nf-core/picard/collectwgsmetrics/main.nf index cd4a7711..bd8d5b5f 100644 --- a/modules/nf-core/picard/collectwgsmetrics/main.nf +++ b/modules/nf-core/picard/collectwgsmetrics/main.nf @@ -29,6 +29,7 @@ process PICARD_COLLECTWGSMETRICS { avail_mem = (task.memory.mega*0.8).intValue() } """ + export TMP=\$PWD picard \\ -Xmx${avail_mem}M \\ CollectWgsMetrics \\ @@ -36,6 +37,7 @@ process PICARD_COLLECTWGSMETRICS { --INPUT $bam \\ --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ --REFERENCE_SEQUENCE ${fasta} \\ + --TMP_DIR . \\ $interval diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 27a19c43..58e76db6 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -34,13 +34,11 @@ workflow COVERAGE { PANELCOVERAGE( MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).map { meta, bed, index, genelists -> - if (genelists !instanceof List) { - // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... - genelists = [genelists] - } + // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... + def genelists_array = genelists !instanceof List ? [genelists] : genelists def filtered_genelists = meta.tag.toLowerCase() == "seqcap" - ? genelists.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } - : genelists.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } + ? genelists_array.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } + : genelists_array.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } if (filtered_genelists.size() > 0) { return [ diff --git a/tests/config/igenomes_test.config b/tests/config/igenomes_test.config index 80984075..74154eec 100644 --- a/tests/config/igenomes_test.config +++ b/tests/config/igenomes_test.config @@ -9,6 +9,7 @@ params { gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" } } + genelists = null } aws { diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap index 2cd3d63c..cf11ffe9 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap @@ -119,4 +119,4 @@ }, "timestamp": "2024-05-28T16:17:08.089796673" } -} +} \ No newline at end of file diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index aabf04cd..1714e2fb 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -3,7 +3,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -25,13 +25,13 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ - + ], "versions": [ "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", @@ -49,7 +49,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -71,10 +71,10 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ [ @@ -112,7 +112,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -134,10 +134,10 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ [ @@ -174,7 +174,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -269,7 +269,7 @@ "content": [ { "align_reports": [ - + ], "cram_crai": [ [ @@ -291,13 +291,13 @@ ] ], "rna_junctions": [ - + ], "rna_splice_junctions": [ - + ], "sormadup_metrics": [ - + ], "versions": [ "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", @@ -311,4 +311,4 @@ }, "timestamp": "2025-12-17T14:51:22.925873858" } -} +} \ No newline at end of file From d5e139208c0a63affa44e149513e8921266c96ed Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:50:33 +0100 Subject: [PATCH 171/202] module patches --- .../picard-collecthsmetrics.diff | 18 +++++++++++++++++- .../picard-collectmultiplemetrics.diff | 15 +++++++++++++++ .../picard-collectwgsmetrics.diff | 16 ++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff b/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff index 5907d093..1407a35a 100644 --- a/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff +++ b/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff @@ -26,7 +26,7 @@ Changes in 'picard/collecthsmetrics/main.nf': def avail_mem = 3072 if (!task.memory) { -@@ -37,14 +33,14 @@ +@@ -37,18 +33,19 @@ def bait_intervallist_cmd = "" if (bait_intervals =~ /.(bed|bed.gz)$/){ bait_interval_list = bait_intervals.toString().replaceAll(/.(bed|bed.gz)$/, ".interval_list") @@ -43,6 +43,22 @@ Changes in 'picard/collecthsmetrics/main.nf': } + """ ++ export TMP=\$PWD + + $bait_intervallist_cmd + $target_intervallist_cmd +@@ -61,8 +58,8 @@ + --BAIT_INTERVALS $bait_interval_list \\ + --TARGET_INTERVALS $target_interval_list \\ + --INPUT $bam \\ +- --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics +- ++ --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics \\ ++ --TMP_DIR . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": 'modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collecthsmetrics/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff b/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff index 489076fb..d4fbba56 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff +++ b/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff @@ -15,6 +15,21 @@ Changes in 'picard/collectmultiplemetrics/main.nf': output: tuple val(meta), path("*_metrics"), emit: metrics +@@ -31,12 +29,14 @@ + avail_mem = (task.memory.mega*0.8).intValue() + } + """ ++ export TMP=\$PWD + picard \\ + -Xmx${avail_mem}M \\ + CollectMultipleMetrics \\ + $args \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectMultipleMetrics \\ ++ --TMP_DIR . \\ + $reference + + cat <<-END_VERSIONS > versions.yml 'modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff index bf843c60..04fea62a 100644 --- a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff +++ b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff @@ -15,6 +15,22 @@ Changes in 'picard/collectwgsmetrics/main.nf': path intervallist output: +@@ -31,6 +29,7 @@ + avail_mem = (task.memory.mega*0.8).intValue() + } + """ ++ export TMP=\$PWD + picard \\ + -Xmx${avail_mem}M \\ + CollectWgsMetrics \\ +@@ -38,6 +37,7 @@ + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ + --REFERENCE_SEQUENCE ${fasta} \\ ++ --TMP_DIR . \\ + $interval + + 'modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test' is unchanged From 35dec2c82d66e17b3306235364d9469d435064c9 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 12:26:28 +0100 Subject: [PATCH 172/202] fix snapshot --- tests/workflows/preprocessing.nf.test.snap | 36 ++++++++++++++++------ 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 0bdfd83c..d40bc343 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -44,6 +44,12 @@ ], "demultiplex_reports": [ + ], + "falco_html": [ + + ], + "falco_txt": [ + ], "fastp_html": [ [ @@ -394,7 +400,7 @@ "test_data" ], "multiqc_library_plots": [ - + ], "multiqc_library_report": [ "test.html" @@ -670,9 +676,9 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-23T13:59:59.404732" + "timestamp": "2026-02-11T12:00:40.443933" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -719,6 +725,12 @@ ], "demultiplex_reports": [ + ], + "falco_html": [ + + ], + "falco_txt": [ + ], "fastp_html": [ [ @@ -853,7 +865,7 @@ "test_data" ], "multiqc_library_plots": [ - + ], "multiqc_library_report": [ "test.html" @@ -1019,9 +1031,9 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-23T14:06:35.503463" + "timestamp": "2026-02-11T12:11:20.398961" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1067,6 +1079,12 @@ ], "demultiplex_reports": [ + ], + "falco_html": [ + + ], + "falco_txt": [ + ], "fastp_html": [ [ @@ -1336,7 +1354,7 @@ "test_data" ], "multiqc_library_plots": [ - + ], "multiqc_library_report": [ "test.html" @@ -1604,8 +1622,8 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-23T14:04:00.643521" + "timestamp": "2026-02-11T12:06:12.331519" } } \ No newline at end of file From 78b9e050f7bd558e08cb76359a5e2a80099fe943 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:08:18 +0100 Subject: [PATCH 173/202] fix coverage issues --- conf/base.config | 38 ++++---- conf/modules.config | 66 +++++++------- conf/test_full.config | 4 +- nf-test.config | 12 +-- subworkflows/local/bam_qc/main.nf | 18 ++-- subworkflows/local/coverage/main.nf | 17 ++-- subworkflows/local/fastq_align_rna/main.nf | 19 ++-- .../local/fastq_to_aligned_cram/main.nf | 14 +-- .../main.nf | 87 ++++++++----------- tests/config/igenomes_test.config | 14 +-- .../subworkflows/local/coverage/main.nf.test | 10 +-- .../local/coverage/main.nf.test.snap | 38 ++++++-- workflows/preprocessing.nf | 3 +- 13 files changed, 174 insertions(+), 166 deletions(-) diff --git a/conf/base.config b/conf/base.config index ff798214..ac353851 100644 --- a/conf/base.config +++ b/conf/base.config @@ -10,41 +10,41 @@ process { - cpus = { 1 * task.attempt } - memory = { 8.GB * task.attempt } - time = { 4.h * task.attempt } + cpus = { 1 * task.attempt } + memory = { 8.GB * task.attempt } + time = { 4.h * task.attempt } errorStrategy = { task.exitStatus in ((130..145) + 104 + 175 + 50001 + 50002 + 50003 + 50004 + 50005 + 50006) ? 'retry' : 'finish' } maxRetries = 3 maxErrors = '-1' // Process-specific resource requirements - withLabel:process_single { - cpus = { 1 } + withLabel: process_single { + cpus = { 1 } memory = { 8.GB * task.attempt } - time = { 4.h * task.attempt } + time = { 4.h * task.attempt } } - withLabel:process_low { - cpus = { 2 * task.attempt } + withLabel: process_low { + cpus = { 2 * task.attempt } memory = { 16.GB * task.attempt } - time = { 4.h * task.attempt } + time = { 4.h * task.attempt } } - withLabel:process_medium { - cpus = { 8 * task.attempt } + withLabel: process_medium { + cpus = { 8 * task.attempt } memory = { 64.GB * task.attempt } - time = { 8.h * task.attempt } + time = { 8.h * task.attempt } } - withLabel:process_high { - cpus = { 16 * task.attempt } + withLabel: process_high { + cpus = { 16 * task.attempt } memory = { 128.GB * task.attempt } - time = { 16.h * task.attempt } + time = { 16.h * task.attempt } } - withLabel:process_long { - time = { 20.h * task.attempt } + withLabel: process_long { + time = { 20.h * task.attempt } } - withLabel:error_ignore { + withLabel: error_ignore { errorStrategy = 'ignore' } - withLabel:error_retry { + withLabel: error_retry { errorStrategy = 'retry' maxRetries = 2 } diff --git a/conf/modules.config b/conf/modules.config index 07ea1623..a284297f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -14,9 +14,9 @@ process { // BCL convert withName: '.*BCL_DEMULTIPLEX:BCLCONVERT' { - cpus = 16 - memory = { 64.GB * task.attempt } - ext.args = { + cpus = 16 + memory = { 64.GB * task.attempt } + ext.args = { [ meta.lane ? "--bcl-only-lane ${meta.lane}" : "", "--force", @@ -27,16 +27,16 @@ process { // FastP withName: '.*FASTP' { - cpus = 4 - memory = { 4.GB * task.attempt } - ext.args = { + cpus = 4 + memory = { 4.GB * task.attempt } + ext.args = { [ - params.split_fastq > 0 ? "--split_by_lines ${params.split_fastq * 4}" : '', - params.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", - params.trim_front > 0 ? "--trim_front1 ${params.trim_front}" : "", - params.trim_tail > 0 ? "--trim_tail1 ${params.trim_tail}" : "", - params.adapter_R1 ? "--adapter_sequence ${params.adapter_R1}" : "", - params.adapter_R2 ? "--adapter_sequence_r2 ${params.adapter_R2}" : "", + params.split_fastq > 0 ? "--split_by_lines ${params.split_fastq * 4}" : '', + params.skip_trimming ? "--disable_adapter_trimming" : "--detect_adapter_for_pe", + params.trim_front > 0 ? "--trim_front1 ${params.trim_front}" : "", + params.trim_tail > 0 ? "--trim_tail1 ${params.trim_tail}" : "", + params.adapter_R1 ? "--adapter_sequence ${params.adapter_R1}" : "", + params.adapter_R2 ? "--adapter_sequence_r2 ${params.adapter_R2}" : "", "--compression 1", ].join(" ").trim() } @@ -57,7 +57,7 @@ process { withName: '.*FASTQ_ALIGN_DNA:BOWTIE2_ALIGN' { cpus = 16 memory = 32.GB - ext.args = { + ext.args = { [ "--local", "--fast-local", @@ -65,7 +65,7 @@ process { meta.readgroup ? "--rg " + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join(" --rg ") : "", ].join(" ").trim() } - ext.args2 = "--fast" + ext.args2 = "--fast" } //// BWA mem/BWA mem2 @@ -90,9 +90,7 @@ process { cpus = 16 memory = 32.GB ext.args = { - [ - meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : "" - ].join(" ").trim() + [meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : ""].join(" ").trim() } ext.args2 = "--fast" } @@ -107,8 +105,8 @@ process { //// SNAP withName: '.*FASTQ_ALIGN_DNA:SNAPALIGNER_ALIGN' { - cpus = 16 - memory = 64.GB + cpus = 16 + memory = 64.GB ext.args = { [ "-b-", @@ -125,8 +123,8 @@ process { //// STROBEALIGN withName: '.*FASTQ_ALIGN_DNA:STROBEALIGN' { - cpus = 16 - memory = 32.GB + cpus = 16 + memory = 32.GB ext.args = { [ meta.readgroup ? "--rg-id ${meta.readgroup.ID}" : "", @@ -139,9 +137,9 @@ process { //// STAR withName: '.*FASTQ_ALIGN_RNA:STAR_ALIGN' { ext.prefix = { "${meta.id}.star" } - cpus = 16 - memory = 64.GB - ext.args = { + cpus = 16 + memory = 64.GB + ext.args = { [ "--readFilesCommand gunzip -c", "--twopassMode Basic", @@ -222,9 +220,9 @@ process { //// Samtools convert withName: '.*FASTQ_TO_CRAM:SAMTOOLS_CONVERT' { - cpus = 8 - memory = 8.GB - ext.args = { + cpus = 8 + memory = 8.GB + ext.args = { [ "-C", "--output-fmt cram,version=3.0", @@ -247,15 +245,15 @@ process { //// Samtools coverage withName: '.*COVERAGE:SAMTOOLS_COVERAGE' { - cpus = 1 - memory = 1.GB + cpus = 1 + memory = 1.GB ext.prefix = { "${meta.id}.coverage" } } // QC withName: '.*BAM_QC:SAMTOOLS_.*$' { - cpus = 1 + cpus = 1 memory = 1.GB } @@ -267,15 +265,15 @@ process { } withName: '.*MD5SUM' { - cpus = 1 + cpus = 1 memory = 128.MB } // MultiQC withName: '.*MULTIQC_.*$' { container = "cmgg/multiqc_cmgg:0.0.2-multiqc-v1.33" - cpus = 1 - memory = 4.GB + cpus = 1 + memory = 4.GB } withName: '.*MULTIQC_MAIN' { ext.prefix = { params.multiqc_title ? params.multiqc_title : "multiqc" } @@ -307,5 +305,5 @@ env { MOSDEPTH_Q2 = 'CALLABLE' // Set TMPDIR for all modules - TMPDIR = "$PWD" + TMPDIR = "\$PWD" } diff --git a/conf/test_full.config b/conf/test_full.config index 6225119a..bad1c6f1 100644 --- a/conf/test_full.config +++ b/conf/test_full.config @@ -17,8 +17,8 @@ params { // Input data for full size test // TODO nf-core: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA) // TODO nf-core: Give any required params for the test so that command line flags are not needed - input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' + input = params.pipelines_testdata_base_path + 'viralrecon/samplesheet/samplesheet_full_illumina_amplicon.csv' // Genome references - genome = 'R64-1-1' + genome = 'R64-1-1' } diff --git a/nf-test.config b/nf-test.config index fa368ccb..c5d343b4 100644 --- a/nf-test.config +++ b/nf-test.config @@ -1,21 +1,21 @@ config { // location for all nf-test tests - testsDir "." + testsDir = "." // nf-test directory including temporary files for each test - workDir System.getenv("NFT_WORKDIR") ?: ".nf-test" + workDir = System.getenv("NFT_WORKDIR") ?: ".nf-test" // location of an optional nextflow.config file specific for executing tests - configFile "tests/nextflow.config" + configFile = "tests/nextflow.config" // ignore tests coming from the nf-core/modules repo - ignore 'modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*' + ignore = ['modules/nf-core/**/tests/*', 'subworkflows/nf-core/**/tests/*'] // run all test with defined profile(s) from the main nextflow.config - profile "test" + profile = "test" // list of filenames or patterns that should be trigger a full test run - triggers 'nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore' + triggers = ['nextflow.config', 'nf-test.config', 'conf/test.config', 'tests/nextflow.config', 'tests/.nftignore'] // load the necessary plugins plugins { diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index e35555a8..1f20203d 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -11,7 +11,7 @@ include { PICARD_COLLECTWGSMETRICS } from '../../../modules/nf-core/picard/ workflow BAM_QC { take: ch_bam_bai_roi_fasta_fai_dict // channel: [ val(meta), path(bam), path(bai), path(roi), path(fasta), path(fai), path(dict)] - disable_picard // boolean + disable_picard // boolean main: ch_versions = channel.empty() @@ -72,12 +72,12 @@ workflow BAM_QC { } emit: - samtools_stats = SAMTOOLS_STATS.out.stats - samtools_flagstat = SAMTOOLS_FLAGSTAT.out.flagstat - samtools_idxstats = SAMTOOLS_IDXSTATS.out.idxstats - picard_multiplemetrics = ch_picard_multiplemetrics - picard_multiplemetrics_pdf = ch_picard_multiplemetrics_pdf - picard_wgsmetrics = ch_picard_wgsmetrics - picard_hsmetrics = ch_picard_hsmetrics - versions = ch_versions + samtools_stats = SAMTOOLS_STATS.out.stats + samtools_flagstat = SAMTOOLS_FLAGSTAT.out.flagstat + samtools_idxstats = SAMTOOLS_IDXSTATS.out.idxstats + picard_multiplemetrics = ch_picard_multiplemetrics + picard_multiplemetrics_pdf = ch_picard_multiplemetrics_pdf + picard_wgsmetrics = ch_picard_wgsmetrics + picard_hsmetrics = ch_picard_hsmetrics + versions = ch_versions } diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 58e76db6..a3959d84 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -13,7 +13,6 @@ workflow COVERAGE { main: ch_versions = channel.empty() - ch_coverageqc_files = channel.empty() MOSDEPTH( ch_meta_cram_crai_fasta_fai_roi.map { meta, cram, crai, fasta, _fai, roi -> @@ -28,17 +27,18 @@ workflow COVERAGE { } ) ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) - ch_coverageqc_files = ch_coverageqc_files.merge(SAMTOOLS_COVERAGE.out.coverage) - - ch_genelists.view() PANELCOVERAGE( - MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).map { meta, bed, index, genelists -> + MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists) + .view() + .map { meta, bed, index, genelists -> // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... - def genelists_array = genelists !instanceof List ? [genelists] : genelists + if (genelists !instanceof List) { + genelists = [genelists] + } def filtered_genelists = meta.tag.toLowerCase() == "seqcap" - ? genelists_array.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } - : genelists_array.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } + ? genelists.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } + : genelists.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } if (filtered_genelists.size() > 0) { return [ @@ -51,7 +51,6 @@ workflow COVERAGE { } ) ch_versions = ch_versions.mix(PANELCOVERAGE.out.versions.first()) - ch_coverageqc_files = ch_coverageqc_files.mix(PANELCOVERAGE.out.regiondist) emit: mosdepth_global = MOSDEPTH.out.global_txt diff --git a/subworkflows/local/fastq_align_rna/main.nf b/subworkflows/local/fastq_align_rna/main.nf index ce0d6862..1ca27833 100644 --- a/subworkflows/local/fastq_align_rna/main.nf +++ b/subworkflows/local/fastq_align_rna/main.nf @@ -5,9 +5,9 @@ // -include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" -include { GNU_SORT as SORT_MERGE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" -include { GNU_SORT as SORT_MERGE_SPLICE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" +include { STAR_ALIGN } from "../../../modules/nf-core/star/align/main.nf" +include { GNU_SORT as SORT_MERGE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" +include { GNU_SORT as SORT_MERGE_SPLICE_JUNCTIONS } from "../../../modules/nf-core/gnu/sort/main.nf" workflow FASTQ_ALIGN_RNA { take: @@ -55,15 +55,16 @@ workflow FASTQ_ALIGN_RNA { ch_versions = ch_versions.mix(SORT_MERGE_JUNCTIONS.out.versions.first()) emit: - bam = ch_bam // channel: [ [meta], bam ] - splice_junctions = SORT_MERGE_SPLICE_JUNCTIONS.out.sorted // channel: [ [meta], splice_junctions ] - junctions = SORT_MERGE_JUNCTIONS.out.sorted // channel: [ [meta], junctions ] - reports = ch_reports // channel: [ [meta], log ] - versions = ch_versions // channel: [ versions.yml ] + bam = ch_bam // channel: [ [meta], bam ] + splice_junctions = SORT_MERGE_SPLICE_JUNCTIONS.out.sorted // channel: [ [meta], splice_junctions ] + junctions = SORT_MERGE_JUNCTIONS.out.sorted // channel: [ [meta], junctions ] + reports = ch_reports // channel: [ [meta], log ] + versions = ch_versions // channel: [ versions.yml ] } def group_junctions(ch) { - return ch.map { meta, files -> + return ch + .map { meta, files -> def gk = (meta.chunks as Integer ?: 1) return [ groupKey( diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index 1460d083..1e4a23fb 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -20,7 +20,7 @@ include { getGenomeAttribute } from '../../local/utils_nfcore_preprocessing_p workflow FASTQ_TO_CRAM { take: ch_meta_reads_aligner_index_fasta_gtf // channel: [mandatory] [meta, [fastq, ...], aligner [bowtie2, bwamem, bwamem2, dragmap, snap, star], aligner_index, fasta, gtf] - markdup // string: [optional ] markdup [bamsormadup, samtools, false] + markdup // string: [optional ] markdup [bamsormadup, samtools, false] main: @@ -151,10 +151,10 @@ workflow FASTQ_TO_CRAM { ch_cram_crai.dump(tag: "FASTQ_TO_CRAM: cram and crai", pretty: true) emit: - cram_crai = ch_cram_crai - rna_splice_junctions = FASTQ_ALIGN_RNA.out.splice_junctions - rna_junctions = FASTQ_ALIGN_RNA.out.junctions - sormadup_metrics = ch_sormadup_metrics - align_reports = FASTQ_ALIGN_DNA.out.reports - versions = ch_versions + cram_crai = ch_cram_crai + rna_splice_junctions = FASTQ_ALIGN_RNA.out.splice_junctions + rna_junctions = FASTQ_ALIGN_RNA.out.junctions + sormadup_metrics = ch_sormadup_metrics + align_reports = FASTQ_ALIGN_DNA.out.reports + versions = ch_versions } diff --git a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf index c66aaf01..16fc49ab 100644 --- a/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_preprocessing_pipeline/main.nf @@ -8,15 +8,15 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' -include { paramsSummaryMap } from 'plugin/nf-schema' -include { samplesheetToList } from 'plugin/nf-schema' -include { paramsHelp } from 'plugin/nf-schema' -include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' -include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' -include { imNotification } from '../../nf-core/utils_nfcore_pipeline' -include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' -include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' +include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' +include { paramsSummaryMap } from 'plugin/nf-schema' +include { samplesheetToList } from 'plugin/nf-schema' +include { paramsHelp } from 'plugin/nf-schema' +include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' +include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' +include { imNotification } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' +include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -25,16 +25,15 @@ include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipelin */ workflow PIPELINE_INITIALISATION { - take: - version // boolean: Display version and exit - validate_params // boolean: Boolean whether to validate parameters against the schema at runtime + version // boolean: Display version and exit + validate_params // boolean: Boolean whether to validate parameters against the schema at runtime nextflow_cli_args // array: List of positional nextflow CLI args - outdir // string: The output directory where the results will be saved - input // string: Path to input samplesheet - help // boolean: Display help message and exit - help_full // boolean: Show the full help message - show_hidden // boolean: Show hidden parameters in the help message + outdir // string: The output directory where the results will be saved + input // string: Path to input samplesheet + help // boolean: Display help message and exit + help_full // boolean: Show the full help message + show_hidden // boolean: Show hidden parameters in the help message main: @@ -43,11 +42,11 @@ workflow PIPELINE_INITIALISATION { // // Print version and exit if required and dump pipeline parameters to JSON file // - UTILS_NEXTFLOW_PIPELINE ( + UTILS_NEXTFLOW_PIPELINE( version, true, outdir, - workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1 + workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1, ) // @@ -55,7 +54,7 @@ workflow PIPELINE_INITIALISATION { // command = "nextflow run ${workflow.manifest.name} -profile --input samplesheet.csv --outdir " - UTILS_NFSCHEMA_PLUGIN ( + UTILS_NFSCHEMA_PLUGIN( workflow, validate_params, null, @@ -64,13 +63,13 @@ workflow PIPELINE_INITIALISATION { show_hidden, "", "", - command + command, ) // // Check config provided to the pipeline // - UTILS_NFCORE_PIPELINE ( + UTILS_NFCORE_PIPELINE( nextflow_cli_args ) @@ -97,15 +96,14 @@ workflow PIPELINE_INITIALISATION { */ workflow PIPELINE_COMPLETION { - take: - email // string: email address - email_on_fail // string: email address sent on pipeline failure + email // string: email address + email_on_fail // string: email address sent on pipeline failure plaintext_email // boolean: Send plain-text email instead of HTML - outdir // path: Path to output directory where results will be published + outdir // path: Path to output directory where results will be published monochrome_logs // boolean: Disable ANSI colour codes in log output - hook_url // string: hook URL for notifications - multiqc_report // string: Path to MultiQC report + hook_url // string: hook URL for notifications + multiqc_report // string: Path to MultiQC report main: summary_params = paramsSummaryMap(workflow, parameters_schema: "nextflow_schema.json") @@ -134,7 +132,7 @@ workflow PIPELINE_COMPLETION { } workflow.onError { - log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting" + log.error("Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting") } } @@ -157,19 +155,19 @@ def validateInputSamplesheet(input) { def (metas, fastqs) = input[1..2] // Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end - def endedness_ok = metas.collect{ meta -> meta.single_end }.unique().size == 1 + def endedness_ok = metas.collect { meta -> meta.single_end }.unique().size == 1 if (!endedness_ok) { error("Please check input samplesheet -> Multiple runs of a sample must be of the same datatype i.e. single-end or paired-end: ${metas[0].id}") } - return [ metas[0], fastqs ] + return [metas[0], fastqs] } // // Get attribute from genome config file e.g. fasta // def getGenomeAttribute(genomes, attribute) { if (genomes && genomes.containsKey(attribute)) { - return genomes[ attribute ] + return genomes[attribute] } return null } @@ -179,11 +177,7 @@ def getGenomeAttribute(genomes, attribute) { // def genomeExistsError() { if (params.genomes && params.genome && !params.genomes.containsKey(params.genome)) { - def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + - " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + - " Currently, the available genome keys are:\n" + - " ${params.genomes.keySet().join(", ")}\n" + - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + def error_string = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " Genome '${params.genome}' not found in any config files provided to the pipeline.\n" + " Currently, the available genome keys are:\n" + " ${params.genomes.keySet().join(", ")}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" error(error_string) } } @@ -194,12 +188,7 @@ def toolCitationText() { // TODO nf-core: Optionally add in-text citation tools to this list. // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "Tool (Foo et al. 2023)" : "", // Uncomment function in methodsDescriptionText to render in MultiQC report - def citation_text = [ - "Tools used in the workflow included:", - "FastQC (Andrews 2010),", - "MultiQC (Ewels et al. 2016)", - "." - ].join(' ').trim() + def citation_text = ["Tools used in the workflow included:", "FastQC (Andrews 2010),", "MultiQC (Ewels et al. 2016)", "."].join(' ').trim() return citation_text } @@ -208,10 +197,7 @@ def toolBibliographyText() { // TODO nf-core: Optionally add bibliographic entries to this list. // Can use ternary operators to dynamically construct based conditions, e.g. params["run_xyz"] ? "
  • Author (2023) Pub name, Journal, DOI
  • " : "", // Uncomment function in methodsDescriptionText to render in MultiQC report - def reference_text = [ - "
  • Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).
  • ", - "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • " - ].join(' ').trim() + def reference_text = ["
  • Andrews S, (2010) FastQC, URL: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/).
  • ", "
  • Ewels, P., Magnusson, M., Lundin, S., & Käller, M. (2016). MultiQC: summarize analysis results for multiple tools and samples in a single report. Bioinformatics , 32(19), 3047–3048. doi: /10.1093/bioinformatics/btw354
  • "].join(' ').trim() return reference_text } @@ -233,7 +219,10 @@ def methodsDescriptionText(mqc_methods_yaml) { temp_doi_ref += "(doi: ${doi_ref.replace("https://doi.org/", "").replace(" ", "")}), " } meta["doi_text"] = temp_doi_ref.substring(0, temp_doi_ref.length() - 2) - } else meta["doi_text"] = "" + } + else { + meta["doi_text"] = "" + } meta["nodoi_text"] = meta.manifest_map.doi ? "" : "
  • If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used.
  • " // Tool references @@ -247,7 +236,7 @@ def methodsDescriptionText(mqc_methods_yaml) { def methods_text = mqc_methods_yaml.text - def engine = new groovy.text.SimpleTemplateEngine() + def engine = new groovy.text.SimpleTemplateEngine() def description_html = engine.createTemplate(methods_text).make(meta) return description_html.toString() diff --git a/tests/config/igenomes_test.config b/tests/config/igenomes_test.config index 74154eec..cac18b9e 100644 --- a/tests/config/igenomes_test.config +++ b/tests/config/igenomes_test.config @@ -1,15 +1,15 @@ params { genomes { GRCh38 { - bwamem = "s3://test-data/genomics/homo_sapiens/genome/bwa/" - dict = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict" - fai = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" - fasta = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" - star = "s3://test-data/genomics/homo_sapiens/genome/star/" - gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + bwamem = "s3://test-data/genomics/homo_sapiens/genome/bwa/" + dict = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict" + fai = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + fasta = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + star = "s3://test-data/genomics/homo_sapiens/genome/star/" + gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + genelists = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" } } - genelists = null } aws { diff --git a/tests/subworkflows/local/coverage/main.nf.test b/tests/subworkflows/local/coverage/main.nf.test index 8792b87c..7b90545d 100644 --- a/tests/subworkflows/local/coverage/main.nf.test +++ b/tests/subworkflows/local/coverage/main.nf.test @@ -23,9 +23,8 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - input[1] = Channel.value([ - file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/genelists/genelist_chr21_per_exon.bed",checkIfExists:true) - ]) + def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" + input[1] = channel.fromPath(genelists_path).collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } """ } } @@ -52,9 +51,8 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - input[1] = Channel.value([ - file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/genelists/genelist_chr21_per_exon.bed",checkIfExists:true) - ]) + def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" + input[1] = channel.fromPath(genelists_path).collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } """ } } diff --git a/tests/subworkflows/local/coverage/main.nf.test.snap b/tests/subworkflows/local/coverage/main.nf.test.snap index 4df77336..7bd91330 100644 --- a/tests/subworkflows/local/coverage/main.nf.test.snap +++ b/tests/subworkflows/local/coverage/main.nf.test.snap @@ -45,7 +45,10 @@ "single_end": false, "tag": "WES" }, - "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,e5c7b4f381721888249c57aa55be2d34" + [ + "test_Treatable_ID_per_exon.mosdepth.region.dist.txt:md5,6c2b5237d98e0a2f118a3553c2ba478e", + "test_bladder_cancer_per_exon.mosdepth.region.dist.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "14": [ @@ -232,7 +235,10 @@ "single_end": false, "tag": "WES" }, - "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,e5c7b4f381721888249c57aa55be2d34" + [ + "test_Treatable_ID_per_exon.mosdepth.region.dist.txt:md5,6c2b5237d98e0a2f118a3553c2ba478e", + "test_bladder_cancer_per_exon.mosdepth.region.dist.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "samtools_coverage": [ @@ -254,9 +260,9 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-09T12:02:48.263146" + "timestamp": "2026-02-11T14:05:13.106828" }, "Coverage - seqcap": { "content": [ @@ -298,10 +304,18 @@ ] ], "13": [ - + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test_seqcap_Connective_tissue_per_exon.mosdepth.region.dist.txt:md5,e098c901acb1da8c2cf64a248306e71c" + ] ], "14": [ "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", + "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ], "2": [ @@ -477,7 +491,14 @@ ], "panelcoverage": [ - + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test_seqcap_Connective_tissue_per_exon.mosdepth.region.dist.txt:md5,e098c901acb1da8c2cf64a248306e71c" + ] ], "samtools_coverage": [ [ @@ -491,14 +512,15 @@ ], "versions": [ "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", + "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-09T12:02:26.604953" + "timestamp": "2026-02-11T13:54:02.513877" } } \ No newline at end of file diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 12d4b8b2..8bf03814 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -59,7 +59,8 @@ workflow PREPROCESSING { roi = roi ? file(roi, checkIfExists: true) : null - genelists = genelists ? channel.value(file(genelists + "/*.bed", checkIfExists: true)) : channel.empty() + // construct a value channel containing an array of files, because the coverage subworkflow expects a channel of arrays of genelist files (to allow for multiple genelist files per sample) + ch_genelists = genelists ? channel.fromPath(genelists).collect().map { files -> [ files ] } : channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From c5e10a3082783deccf24fd15d8b7332832d94ef2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 18:05:33 +0100 Subject: [PATCH 174/202] fix genelist path parsing --- tests/subworkflows/local/coverage/main.nf.test | 8 ++++---- workflows/preprocessing.nf | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/subworkflows/local/coverage/main.nf.test b/tests/subworkflows/local/coverage/main.nf.test index 7b90545d..c13bd512 100644 --- a/tests/subworkflows/local/coverage/main.nf.test +++ b/tests/subworkflows/local/coverage/main.nf.test @@ -23,8 +23,8 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" - input[1] = channel.fromPath(genelists_path).collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } + def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists" + input[1] = channel.fromPath(genelists_path + "/*.bed").collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } """ } } @@ -51,8 +51,8 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" - input[1] = channel.fromPath(genelists_path).collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } + def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists" + input[1] = channel.fromPath(genelists_path + "/*.bed").collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } """ } } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 8bf03814..8e79fe1c 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -60,7 +60,7 @@ workflow PREPROCESSING { roi = roi ? file(roi, checkIfExists: true) : null // construct a value channel containing an array of files, because the coverage subworkflow expects a channel of arrays of genelist files (to allow for multiple genelist files per sample) - ch_genelists = genelists ? channel.fromPath(genelists).collect().map { files -> [ files ] } : channel.empty() + ch_genelists = genelists ? channel.fromPath(genelists + "/*.bed").collect().map { files -> [ files ] } : channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From f4f213d56a7916e433a8bd96ff28e33af194890f Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 18:13:12 +0100 Subject: [PATCH 175/202] fix variable name --- workflows/preprocessing.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 8e79fe1c..c590253c 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -333,7 +333,7 @@ workflow PREPROCESSING { def samtools_coverage_out = channel.empty() def panelcoverage_out = channel.empty() if (params.run_coverage) { - COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) + COVERAGE(ch_cram_crai_fasta_fai_roi, ch_genelists) ch_multiqc_files = ch_multiqc_files.mix( COVERAGE.out.mosdepth_summary, COVERAGE.out.mosdepth_global, From 20f538bcd12ed36c0fefb5a54dae61104b0e6abc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 20:42:09 +0100 Subject: [PATCH 176/202] add falco for unsupported fastq qc --- main.nf | 424 ++++++++---------- modules.json | 5 + modules/nf-core/falco/environment.yml | 7 + modules/nf-core/falco/main.nf | 57 +++ modules/nf-core/falco/meta.yml | 61 +++ modules/nf-core/falco/tests/main.nf.test | 108 +++++ modules/nf-core/falco/tests/main.nf.test.snap | 61 +++ workflows/preprocessing.nf | 103 +++-- 8 files changed, 534 insertions(+), 292 deletions(-) create mode 100644 modules/nf-core/falco/environment.yml create mode 100644 modules/nf-core/falco/main.nf create mode 100644 modules/nf-core/falco/meta.yml create mode 100644 modules/nf-core/falco/tests/main.nf.test create mode 100644 modules/nf-core/falco/tests/main.nf.test.snap diff --git a/main.nf b/main.nf index f9ce7868..dda235c6 100644 --- a/main.nf +++ b/main.nf @@ -62,35 +62,37 @@ workflow { ) publish: - demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by: 1) - demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by: 1) - demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by: 1) - demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() - fastp_json = PREPROCESSING.out.fastp_json - fastp_html = PREPROCESSING.out.fastp_html - crams = PREPROCESSING.out.crams - rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions - rna_junctions = PREPROCESSING.out.rna_junctions - align_reports = PREPROCESSING.out.align_reports - sormadup_metrics = PREPROCESSING.out.sormadup_metrics - mosdepth_global = PREPROCESSING.out.mosdepth_global - mosdepth_summary = PREPROCESSING.out.mosdepth_summary - mosdepth_regions = PREPROCESSING.out.mosdepth_regions - mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 - mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed - mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi - mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed - mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi - mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed - mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi - mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed - mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi - samtools_coverage = PREPROCESSING.out.samtools_coverage - panelcoverage = PREPROCESSING.out.panelcoverage - samtools_stats = PREPROCESSING.out.samtools_stats - samtools_flagstat = PREPROCESSING.out.samtools_flagstat - samtools_idxstats = PREPROCESSING.out.samtools_idxstats - picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics + demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by:1) + demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by:1) + demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by:1) + demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() + falco_html = PREPROCESSING.out.falco_html + falco_txt = PREPROCESSING.out.falco_txt + fastp_json = PREPROCESSING.out.fastp_json + fastp_html = PREPROCESSING.out.fastp_html + crams = PREPROCESSING.out.crams + rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions + rna_junctions = PREPROCESSING.out.rna_junctions + align_reports = PREPROCESSING.out.align_reports + sormadup_metrics = PREPROCESSING.out.sormadup_metrics + mosdepth_global = PREPROCESSING.out.mosdepth_global + mosdepth_summary = PREPROCESSING.out.mosdepth_summary + mosdepth_regions = PREPROCESSING.out.mosdepth_regions + mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 + mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed + mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi + mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed + mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi + mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed + mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi + mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi + samtools_coverage = PREPROCESSING.out.samtools_coverage + panelcoverage = PREPROCESSING.out.panelcoverage + samtools_stats = PREPROCESSING.out.samtools_stats + samtools_flagstat = PREPROCESSING.out.samtools_flagstat + samtools_idxstats = PREPROCESSING.out.samtools_idxstats + picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics picard_multiplemetrics_pdf = PREPROCESSING.out.picard_multiplemetrics_pdf picard_wgsmetrics = PREPROCESSING.out.picard_wgsmetrics picard_hsmetrics = PREPROCESSING.out.picard_hsmetrics @@ -104,221 +106,151 @@ workflow { } output { - demultiplex_interop { - path { _meta, bin -> - bin >> "Interop/${bin.name}" - } - } - demultiplex_reports { - path { meta, report -> - def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" - report >> out_path - } - } - demultiplex_logs { - path { meta, log -> - def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" - log >> out_path - } - } - demultiplex_fastq { - path { meta, fastq -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" - fastq >> out_path - } - } - fastp_json { - path { meta, json -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" - json >> out_path - } - } - fastp_html { - path { meta, html -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" - html >> out_path - } - } - crams { - path { meta, cram, crai -> - def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" - def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" - cram >> out_cram - crai >> out_crai - } - } - rna_splice_junctions { - path { meta, sjt -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" - sjt >> out_path - } - } - rna_junctions { - path { meta, junctions -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" - junctions >> out_path - } - } - align_reports { - path { meta, log -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" - log >> out_path - } - } - sormadup_metrics { - path { meta, metrics -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" - metrics >> out_path - } - } - mosdepth_global { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_summary { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_regions { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_per_base_d4 { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_per_base_bed { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_per_base_csi { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_regions_bed { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_regions_csi { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_quantized_bed { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_quantized_csi { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_thresholds_bed { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - mosdepth_thresholds_csi { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - samtools_coverage { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - panelcoverage { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - samtools_stats { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - samtools_flagstat { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - samtools_idxstats { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - picard_multiplemetrics { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - picard_multiplemetrics_pdf { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - picard_wgsmetrics { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - picard_hsmetrics { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - md5sums { - path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } - } - multiqc_main_report { - path "multiqc/" - } - multiqc_main_data { - path "multiqc/" - } - multiqc_main_plots { - path "multiqc/" - } - multiqc_library_report { - path "multiqc/" - } - multiqc_library_data { - path "multiqc/" - } - multiqc_library_plots { - path "multiqc/" - } + demultiplex_interop { path { _meta, bin -> + bin >> "Interop/${bin.name}" + } } + demultiplex_reports { path { meta, report -> + def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" + report >> out_path + } } + demultiplex_logs { path { meta, log -> + def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" + log >> out_path + } } + demultiplex_fastq { path { meta, fastq -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" + fastq >> out_path + } } + falco_html { path { meta, html -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path + } } + falco_txt { path { meta, txt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${txt.name}" as String : "${meta.samplename}/${txt.name}" + txt >> out_path + } } + fastp_json { path { meta, json -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" + json >> out_path + } } + fastp_html { path { meta, html -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path + } } + crams { path { meta, cram, crai -> + def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" + def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" + cram >> out_cram + crai >> out_crai + } } + rna_splice_junctions { path { meta, sjt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" + sjt >> out_path + } } + rna_junctions { path { meta, junctions -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" + junctions >> out_path + } } + align_reports { path { meta, log -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" + log >> out_path + } } + sormadup_metrics { path { meta, metrics -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" + metrics >> out_path + } } + mosdepth_global { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_summary { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_regions { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_per_base_d4 { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_per_base_bed { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_per_base_csi { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_regions_bed { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_regions_csi { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_quantized_bed { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_quantized_csi { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_thresholds_bed { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + mosdepth_thresholds_csi { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + samtools_coverage { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + panelcoverage { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + samtools_stats { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + samtools_flagstat { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + samtools_idxstats { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + picard_multiplemetrics { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + picard_multiplemetrics_pdf { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + picard_wgsmetrics { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + picard_hsmetrics { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + md5sums { path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } } + multiqc_main_report { path "multiqc/" } + multiqc_main_data { path "multiqc/" } + multiqc_main_plots { path "multiqc/" } + multiqc_library_report { path "multiqc/" } + multiqc_library_data { path "multiqc/" } + multiqc_library_plots { path "multiqc/" } } diff --git a/modules.json b/modules.json index 4ec35dbd..a75b44bf 100644 --- a/modules.json +++ b/modules.json @@ -46,6 +46,11 @@ "installed_by": ["fastq_align_dna"], "patch": "modules/nf-core/dragmap/align/dragmap-align.diff" }, + "falco": { + "branch": "master", + "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", + "installed_by": ["modules"] + }, "fastp": { "branch": "master", "git_sha": "a331ecfd1aa48b2b2298aab23bb4516c800e410b", diff --git a/modules/nf-core/falco/environment.yml b/modules/nf-core/falco/environment.yml new file mode 100644 index 00000000..59c973a9 --- /dev/null +++ b/modules/nf-core/falco/environment.yml @@ -0,0 +1,7 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + - bioconda::falco=1.2.1 diff --git a/modules/nf-core/falco/main.nf b/modules/nf-core/falco/main.nf new file mode 100644 index 00000000..a4b343b2 --- /dev/null +++ b/modules/nf-core/falco/main.nf @@ -0,0 +1,57 @@ +process FALCO { + 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/falco:1.2.1--h867801b_3': + 'biocontainers/falco:1.2.1--h867801b_3' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.txt") , emit: txt + 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}" + if ( reads.toList().size() == 1 ) { + """ + falco $args --threads $task.cpus ${reads} -D ${prefix}_fastqc_data.txt -S ${prefix}_summary.txt -R ${prefix}_report.html + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + falco:\$( falco --version | sed -e "s/falco//g" ) + END_VERSIONS + """ + } else { + """ + falco $args --threads $task.cpus ${reads} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + falco:\$( falco --version | sed -e "s/falco//g" ) + END_VERSIONS + """ + } + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_data.txt + touch ${prefix}_fastqc_data.html + touch ${prefix}_summary.txt + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + falco: \$( falco --version | sed -e "s/falco v//g" ) + END_VERSIONS + """ +} diff --git a/modules/nf-core/falco/meta.yml b/modules/nf-core/falco/meta.yml new file mode 100644 index 00000000..1450f2da --- /dev/null +++ b/modules/nf-core/falco/meta.yml @@ -0,0 +1,61 @@ +name: falco +description: Run falco on sequenced reads +keywords: + - quality control + - qc + - adapters + - fastq +tools: + - fastqc: + description: "falco is a drop-in C++ implementation of FastQC to assess the quality + of sequence reads." + homepage: "https://falco.readthedocs.io/" + documentation: "https://falco.readthedocs.io/" + licence: ["GPL v3"] + identifier: biotools:falco-rna +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. + ontologies: [] +output: + html: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.html": + type: file + description: FastQC like report + pattern: "*_{fastqc_report.html}" + ontologies: [] + txt: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.txt": + type: file + description: falco report data + pattern: "*_{data.txt}" + ontologies: [] + versions: + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" + ontologies: + - edam: http://edamontology.org/format_3750 # YAML +authors: + - "@lucacozzuto" +maintainers: + - "@lucacozzuto" diff --git a/modules/nf-core/falco/tests/main.nf.test b/modules/nf-core/falco/tests/main.nf.test new file mode 100644 index 00000000..816c72ba --- /dev/null +++ b/modules/nf-core/falco/tests/main.nf.test @@ -0,0 +1,108 @@ +nextflow_process { + + name "Test Process FALCO" + script "../main.nf" + process "FALCO" + + tag "modules" + tag "modules_nfcore" + tag "falco" + + test("sarscov2 - fastq - single end") { + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:true ], + [ + file( + params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], + checkIfExists: true + ), + ], + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.txt, + file(process.out.html.get(0).get(1)).list(), + ).match() + }, + ) + } + + } + + test("sarscov2 - fastq - paired end") { + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:false ], + [ + file( + params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], + checkIfExists: true + ), + file( + params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], + checkIfExists: true + ), + ], + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.txt, + process.out.html.get(0).get(1).collect{ it.split("/")[-1] }.sort(), + ).match() + }, + ) + } + + } + + test("sarscov2 - fastq - interleaved") { + + when { + process { + """ + input[0] = [ + [ id: 'test', single_end:false ], + [ + file( + params.test_data['sarscov2']['illumina']['test_interleaved_fastq_gz'], + checkIfExists: true + ), + ], + ] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.txt, + file(process.out.html.get(0).get(1)).list(), + ).match() + }, + ) + } + + } + +} diff --git a/modules/nf-core/falco/tests/main.nf.test.snap b/modules/nf-core/falco/tests/main.nf.test.snap new file mode 100644 index 00000000..34ac64e3 --- /dev/null +++ b/modules/nf-core/falco/tests/main.nf.test.snap @@ -0,0 +1,61 @@ +{ + "sarscov2 - fastq - single end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": true + }, + [ + "test_fastqc_data.txt:md5,36d989bb9e2d5a632e19452f4e6c2a4e", + "test_summary.txt:md5,a925aec214a83d2f6252847166f2ef3a" + ] + ] + ], + null + ], + "timestamp": "2024-02-02T16:28:17.756764" + }, + "sarscov2 - fastq - paired end": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_1.fastq.gz_fastqc_data.txt:md5,36d989bb9e2d5a632e19452f4e6c2a4e", + "test_1.fastq.gz_summary.txt:md5,a925aec214a83d2f6252847166f2ef3a", + "test_2.fastq.gz_fastqc_data.txt:md5,ad5c45dfc8f79754dd5d8029456b715b", + "test_2.fastq.gz_summary.txt:md5,d0cb642adefb5635a25e808f1f38780a" + ] + ] + ], + [ + "test_1.fastq.gz_fastqc_report.html", + "test_2.fastq.gz_fastqc_report.html" + ] + ], + "timestamp": "2024-02-02T16:22:11.757473" + }, + "sarscov2 - fastq - interleaved": { + "content": [ + [ + [ + { + "id": "test", + "single_end": false + }, + [ + "test_fastqc_data.txt:md5,b5e593f140fe578bdd25ceb84e98fd37", + "test_summary.txt:md5,ca52f458b1223d89db69e2d5e73cf867" + ] + ] + ], + null + ], + "timestamp": "2024-02-02T16:28:36.035899" + } +} \ No newline at end of file diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 94cb7fdb..6f10a5af 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -7,12 +7,13 @@ include { samplesheetToList } from 'plugin/nf-schema' */ // Modules -include { FASTP } from '../modules/nf-core/fastp/main' -include { MD5SUM } from '../modules/nf-core/md5sum/main' -include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' -include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' -include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' -include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' +include { FALCO } from '../modules/nf-core/falcon/main' +include { FASTP } from '../modules/nf-core/fastp/main' +include { MD5SUM } from '../modules/nf-core/md5sum/main' +include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' +include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' +include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' +include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' // Subworkflows include { BAM_QC } from '../subworkflows/local/bam_qc/main' @@ -184,6 +185,14 @@ workflow PREPROCESSING { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + // MODULE: FALCO + // Run FALCO for "unsupported" fastq QC + // FALCO([meta, fastq]) + FALCO(ch_fastq_per_sample.other, false) + ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.html) + ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.txt) + ch_versions = ch_versions.mix(FALCO.out.versions.first()) + // MODULE: fastp // Run QC, trimming and adapter removal // FASTP([meta, fastq, adapter_fasta], save_trimmed, save_merged) @@ -399,46 +408,48 @@ workflow PREPROCESSING { ) emit: - demultiplex_interop = BCL_DEMULTIPLEX.out.interop - demultiplex_reports = BCL_DEMULTIPLEX.out.reports - demultiplex_logs = BCL_DEMULTIPLEX.out.logs - demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other - fastp_json = FASTP.out.json - fastp_html = FASTP.out.html - crams = FASTQ_TO_CRAM.out.cram_crai - rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions - rna_junctions = FASTQ_TO_CRAM.out.rna_junctions - align_reports = FASTQ_TO_CRAM.out.align_reports - sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics - mosdepth_global = COVERAGE.out.mosdepth_global - mosdepth_summary = COVERAGE.out.mosdepth_summary - mosdepth_regions = COVERAGE.out.mosdepth_regions - mosdepth_per_base_d4 = COVERAGE.out.mosdepth_per_base_d4 - mosdepth_per_base_bed = COVERAGE.out.mosdepth_per_base_bed - mosdepth_per_base_csi = COVERAGE.out.mosdepth_per_base_csi - mosdepth_regions_bed = COVERAGE.out.mosdepth_regions_bed - mosdepth_regions_csi = COVERAGE.out.mosdepth_regions_csi - mosdepth_quantized_bed = COVERAGE.out.mosdepth_quantized_bed - mosdepth_quantized_csi = COVERAGE.out.mosdepth_quantized_csi - mosdepth_thresholds_bed = COVERAGE.out.mosdepth_thresholds_bed - mosdepth_thresholds_csi = COVERAGE.out.mosdepth_thresholds_csi - samtools_coverage = COVERAGE.out.samtools_coverage - panelcoverage = COVERAGE.out.panelcoverage - samtools_stats = BAM_QC.out.samtools_stats - samtools_flagstat = BAM_QC.out.samtools_flagstat - samtools_idxstats = BAM_QC.out.samtools_idxstats - picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics - picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf - picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics - picard_hsmetrics = BAM_QC.out.picard_hsmetrics - md5sums = MD5SUM.out.checksum - multiqc_main_report = MULTIQC_MAIN.out.report.toList() - multiqc_main_data = MULTIQC_MAIN.out.data.toList() - multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() - multiqc_library_report = MULTIQC_LIBRARY.out.report - multiqc_library_data = MULTIQC_LIBRARY.out.data - multiqc_library_plots = MULTIQC_LIBRARY.out.plots - versions = ch_versions + demultiplex_interop = BCL_DEMULTIPLEX.out.interop + demultiplex_reports = BCL_DEMULTIPLEX.out.reports + demultiplex_logs = BCL_DEMULTIPLEX.out.logs + demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other + falco_html = FALCO.out.html + falco_txt = FALCO.out.txt + fastp_json = FASTP.out.json + fastp_html = FASTP.out.html + crams = FASTQ_TO_CRAM.out.cram_crai + rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions + rna_junctions = FASTQ_TO_CRAM.out.rna_junctions + align_reports = FASTQ_TO_CRAM.out.align_reports + sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics + mosdepth_global = mosdepth_global_out + mosdepth_summary = mosdepth_summary_out + mosdepth_regions = mosdepth_regions_out + mosdepth_per_base_d4 = mosdepth_per_base_d4_out + mosdepth_per_base_bed = mosdepth_per_base_bed_out + mosdepth_per_base_csi = mosdepth_per_base_csi_out + mosdepth_regions_bed = mosdepth_regions_bed_out + mosdepth_regions_csi = mosdepth_regions_csi_out + mosdepth_quantized_bed = mosdepth_quantized_bed_out + mosdepth_quantized_csi = mosdepth_quantized_csi_out + mosdepth_thresholds_bed = mosdepth_thresholds_bed_out + mosdepth_thresholds_csi = mosdepth_thresholds_csi_out + samtools_coverage = samtools_coverage_out + panelcoverage = panelcoverage_out + samtools_stats = BAM_QC.out.samtools_stats + samtools_flagstat = BAM_QC.out.samtools_flagstat + samtools_idxstats = BAM_QC.out.samtools_idxstats + picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics + picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf + picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics + picard_hsmetrics = BAM_QC.out.picard_hsmetrics + md5sums = MD5SUM.out.checksum + multiqc_main_report = MULTIQC_MAIN.out.report.toList() + multiqc_main_data = MULTIQC_MAIN.out.data.toList() + multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() + multiqc_library_report = MULTIQC_LIBRARY.out.report + multiqc_library_data = MULTIQC_LIBRARY.out.data + multiqc_library_plots = MULTIQC_LIBRARY.out.plots + versions = ch_versions } /* From 0aa6686d54179a7292fa57abc44f4f62bc70f85a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 08:45:02 +0100 Subject: [PATCH 177/202] fix typo + linting --- main.nf | 438 ++++++++++++++++++++++--------------- workflows/preprocessing.nf | 117 +++++----- 2 files changed, 316 insertions(+), 239 deletions(-) diff --git a/main.nf b/main.nf index dda235c6..aed6d7b5 100644 --- a/main.nf +++ b/main.nf @@ -62,37 +62,37 @@ workflow { ) publish: - demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by:1) - demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by:1) - demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by:1) - demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() - falco_html = PREPROCESSING.out.falco_html - falco_txt = PREPROCESSING.out.falco_txt - fastp_json = PREPROCESSING.out.fastp_json - fastp_html = PREPROCESSING.out.fastp_html - crams = PREPROCESSING.out.crams - rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions - rna_junctions = PREPROCESSING.out.rna_junctions - align_reports = PREPROCESSING.out.align_reports - sormadup_metrics = PREPROCESSING.out.sormadup_metrics - mosdepth_global = PREPROCESSING.out.mosdepth_global - mosdepth_summary = PREPROCESSING.out.mosdepth_summary - mosdepth_regions = PREPROCESSING.out.mosdepth_regions - mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 - mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed - mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi - mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed - mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi - mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed - mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi - mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed - mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi - samtools_coverage = PREPROCESSING.out.samtools_coverage - panelcoverage = PREPROCESSING.out.panelcoverage - samtools_stats = PREPROCESSING.out.samtools_stats - samtools_flagstat = PREPROCESSING.out.samtools_flagstat - samtools_idxstats = PREPROCESSING.out.samtools_idxstats - picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics + demultiplex_interop = PREPROCESSING.out.demultiplex_interop.transpose(by: 1) + demultiplex_reports = PREPROCESSING.out.demultiplex_reports.transpose(by: 1) + demultiplex_logs = PREPROCESSING.out.demultiplex_logs.transpose(by: 1) + demultiplex_fastq = PREPROCESSING.out.demultiplex_fastq.transpose() + falco_html = PREPROCESSING.out.falco_html + falco_txt = PREPROCESSING.out.falco_txt + fastp_json = PREPROCESSING.out.fastp_json + fastp_html = PREPROCESSING.out.fastp_html + crams = PREPROCESSING.out.crams + rna_splice_junctions = PREPROCESSING.out.rna_splice_junctions + rna_junctions = PREPROCESSING.out.rna_junctions + align_reports = PREPROCESSING.out.align_reports + sormadup_metrics = PREPROCESSING.out.sormadup_metrics + mosdepth_global = PREPROCESSING.out.mosdepth_global + mosdepth_summary = PREPROCESSING.out.mosdepth_summary + mosdepth_regions = PREPROCESSING.out.mosdepth_regions + mosdepth_per_base_d4 = PREPROCESSING.out.mosdepth_per_base_d4 + mosdepth_per_base_bed = PREPROCESSING.out.mosdepth_per_base_bed + mosdepth_per_base_csi = PREPROCESSING.out.mosdepth_per_base_csi + mosdepth_regions_bed = PREPROCESSING.out.mosdepth_regions_bed + mosdepth_regions_csi = PREPROCESSING.out.mosdepth_regions_csi + mosdepth_quantized_bed = PREPROCESSING.out.mosdepth_quantized_bed + mosdepth_quantized_csi = PREPROCESSING.out.mosdepth_quantized_csi + mosdepth_thresholds_bed = PREPROCESSING.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi = PREPROCESSING.out.mosdepth_thresholds_csi + samtools_coverage = PREPROCESSING.out.samtools_coverage + panelcoverage = PREPROCESSING.out.panelcoverage + samtools_stats = PREPROCESSING.out.samtools_stats + samtools_flagstat = PREPROCESSING.out.samtools_flagstat + samtools_idxstats = PREPROCESSING.out.samtools_idxstats + picard_multiplemetrics = PREPROCESSING.out.picard_multiplemetrics picard_multiplemetrics_pdf = PREPROCESSING.out.picard_multiplemetrics_pdf picard_wgsmetrics = PREPROCESSING.out.picard_wgsmetrics picard_hsmetrics = PREPROCESSING.out.picard_hsmetrics @@ -106,151 +106,233 @@ workflow { } output { - demultiplex_interop { path { _meta, bin -> - bin >> "Interop/${bin.name}" - } } - demultiplex_reports { path { meta, report -> - def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" - report >> out_path - } } - demultiplex_logs { path { meta, log -> - def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" - log >> out_path - } } - demultiplex_fastq { path { meta, fastq -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" - fastq >> out_path - } } - falco_html { path { meta, html -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" - html >> out_path - } } - falco_txt { path { meta, txt -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${txt.name}" as String : "${meta.samplename}/${txt.name}" - txt >> out_path - } } - fastp_json { path { meta, json -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" - json >> out_path - } } - fastp_html { path { meta, html -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" - html >> out_path - } } - crams { path { meta, cram, crai -> - def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" - def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" - cram >> out_cram - crai >> out_crai - } } - rna_splice_junctions { path { meta, sjt -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" - sjt >> out_path - } } - rna_junctions { path { meta, junctions -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" - junctions >> out_path - } } - align_reports { path { meta, log -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" - log >> out_path - } } - sormadup_metrics { path { meta, metrics -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" - metrics >> out_path - } } - mosdepth_global { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_summary { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_d4 { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_per_base_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_regions_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_quantized_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_quantized_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_thresholds_bed { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - mosdepth_thresholds_csi { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_coverage { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - panelcoverage { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_stats { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_flagstat { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - samtools_idxstats { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_multiplemetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_multiplemetrics_pdf { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_wgsmetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - picard_hsmetrics { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - md5sums { path { meta, _file -> - def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" - return out_path - } } - multiqc_main_report { path "multiqc/" } - multiqc_main_data { path "multiqc/" } - multiqc_main_plots { path "multiqc/" } - multiqc_library_report { path "multiqc/" } - multiqc_library_data { path "multiqc/" } - multiqc_library_plots { path "multiqc/" } + demultiplex_interop { + path { _meta, bin -> + bin >> "Interop/${bin.name}" + } + } + demultiplex_reports { + path { meta, report -> + def out_path = meta.lane ? "Reports/L00${meta.lane}/${report.name}" as String : "Reports/${report.name}" + report >> out_path + } + } + demultiplex_logs { + path { meta, log -> + def out_path = meta.lane ? "Logs/L00${meta.lane}/${log.name}" as String : "Logs/${log.name}" + log >> out_path + } + } + demultiplex_fastq { + path { meta, fastq -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${fastq.name}" as String : "${meta.samplename}/${fastq.name}" + fastq >> out_path + } + } + falco_html { + path { meta, html -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path + } + } + falco_txt { + path { meta, txt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${txt.name}" as String : "${meta.samplename}/${txt.name}" + txt >> out_path + } + } + fastp_json { + path { meta, json -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${json.name}" as String : "${meta.samplename}/${json.name}" + json >> out_path + } + } + fastp_html { + path { meta, html -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${html.name}" as String : "${meta.samplename}/${html.name}" + html >> out_path + } + } + crams { + path { meta, cram, crai -> + def out_cram = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram" as String : "${meta.samplename}/${meta.samplename}.cram" + def out_crai = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.cram.crai" as String : "${meta.samplename}/${meta.samplename}.cram.crai" + cram >> out_cram + crai >> out_crai + } + } + rna_splice_junctions { + path { meta, sjt -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${sjt.name}" as String : "${meta.samplename}/${sjt.name}" + sjt >> out_path + } + } + rna_junctions { + path { meta, junctions -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${junctions.name}" as String : "${meta.samplename}/${junctions.name}" + junctions >> out_path + } + } + align_reports { + path { meta, log -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${log.name}" as String : "${meta.samplename}/${log.name}" + log >> out_path + } + } + sormadup_metrics { + path { meta, metrics -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" as String : "${meta.samplename}/${meta.samplename}.duplicate_metrics.txt" + metrics >> out_path + } + } + mosdepth_global { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_summary { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_d4 { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_per_base_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_regions_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_quantized_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_quantized_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_thresholds_bed { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + mosdepth_thresholds_csi { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_coverage { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + panelcoverage { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_stats { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_flagstat { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + samtools_idxstats { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_multiplemetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_multiplemetrics_pdf { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_wgsmetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + picard_hsmetrics { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + md5sums { + path { meta, _file -> + def out_path = meta.library ? "${meta.library}/${meta.samplename}/" as String : "${meta.samplename}/" + return out_path + } + } + multiqc_main_report { + path "multiqc/" + } + multiqc_main_data { + path "multiqc/" + } + multiqc_main_plots { + path "multiqc/" + } + multiqc_library_report { + path "multiqc/" + } + multiqc_library_data { + path "multiqc/" + } + multiqc_library_plots { + path "multiqc/" + } } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 6f10a5af..477f5fd2 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -7,13 +7,13 @@ include { samplesheetToList } from 'plugin/nf-schema' */ // Modules -include { FALCO } from '../modules/nf-core/falcon/main' -include { FASTP } from '../modules/nf-core/fastp/main' -include { MD5SUM } from '../modules/nf-core/md5sum/main' -include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' -include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' -include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' -include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' +include { FALCO } from '../modules/nf-core/falco/main' +include { FASTP } from '../modules/nf-core/fastp/main' +include { MD5SUM } from '../modules/nf-core/md5sum/main' +include { MOSDEPTH } from '../modules/nf-core/mosdepth/main' +include { MULTIQC as MULTIQC_LIBRARY } from '../modules/nf-core/multiqc/main' +include { MULTIQC as MULTIQC_MAIN } from '../modules/nf-core/multiqc/main' +include { SAMTOOLS_COVERAGE } from '../modules/nf-core/samtools/coverage/main' // Subworkflows include { BAM_QC } from '../subworkflows/local/bam_qc/main' @@ -188,22 +188,17 @@ workflow PREPROCESSING { // MODULE: FALCO // Run FALCO for "unsupported" fastq QC // FALCO([meta, fastq]) - FALCO(ch_fastq_per_sample.other, false) - ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.html) - ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.txt) - ch_versions = ch_versions.mix(FALCO.out.versions.first()) + FALCO(ch_fastq_per_sample.other) + ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.html) + ch_multiqc_files = ch_multiqc_files.mix(FALCO.out.txt) + ch_versions = ch_versions.mix(FALCO.out.versions.first()) // MODULE: fastp // Run QC, trimming and adapter removal // FASTP([meta, fastq, adapter_fasta], save_trimmed, save_merged) - FASTP( - ch_fastq_per_sample.supported.map { meta, fastq -> - return [meta, fastq, []] - }, - false, - false, - false, - ) + FASTP(ch_fastq_per_sample.supported.map { meta, fastq -> + return [meta, fastq, []] + }, false, false, false) ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) // edit meta.id to match sample name @@ -408,48 +403,48 @@ workflow PREPROCESSING { ) emit: - demultiplex_interop = BCL_DEMULTIPLEX.out.interop - demultiplex_reports = BCL_DEMULTIPLEX.out.reports - demultiplex_logs = BCL_DEMULTIPLEX.out.logs - demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other - falco_html = FALCO.out.html - falco_txt = FALCO.out.txt - fastp_json = FASTP.out.json - fastp_html = FASTP.out.html - crams = FASTQ_TO_CRAM.out.cram_crai - rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions - rna_junctions = FASTQ_TO_CRAM.out.rna_junctions - align_reports = FASTQ_TO_CRAM.out.align_reports - sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics - mosdepth_global = mosdepth_global_out - mosdepth_summary = mosdepth_summary_out - mosdepth_regions = mosdepth_regions_out - mosdepth_per_base_d4 = mosdepth_per_base_d4_out - mosdepth_per_base_bed = mosdepth_per_base_bed_out - mosdepth_per_base_csi = mosdepth_per_base_csi_out - mosdepth_regions_bed = mosdepth_regions_bed_out - mosdepth_regions_csi = mosdepth_regions_csi_out - mosdepth_quantized_bed = mosdepth_quantized_bed_out - mosdepth_quantized_csi = mosdepth_quantized_csi_out - mosdepth_thresholds_bed = mosdepth_thresholds_bed_out - mosdepth_thresholds_csi = mosdepth_thresholds_csi_out - samtools_coverage = samtools_coverage_out - panelcoverage = panelcoverage_out - samtools_stats = BAM_QC.out.samtools_stats - samtools_flagstat = BAM_QC.out.samtools_flagstat - samtools_idxstats = BAM_QC.out.samtools_idxstats - picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics - picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf - picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics - picard_hsmetrics = BAM_QC.out.picard_hsmetrics - md5sums = MD5SUM.out.checksum - multiqc_main_report = MULTIQC_MAIN.out.report.toList() - multiqc_main_data = MULTIQC_MAIN.out.data.toList() - multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() - multiqc_library_report = MULTIQC_LIBRARY.out.report - multiqc_library_data = MULTIQC_LIBRARY.out.data - multiqc_library_plots = MULTIQC_LIBRARY.out.plots - versions = ch_versions + demultiplex_interop = BCL_DEMULTIPLEX.out.interop + demultiplex_reports = BCL_DEMULTIPLEX.out.reports + demultiplex_logs = BCL_DEMULTIPLEX.out.logs + demultiplex_fastq = ch_demultiplexed_fastq_with_sampleinfo.other + falco_html = FALCO.out.html + falco_txt = FALCO.out.txt + fastp_json = FASTP.out.json + fastp_html = FASTP.out.html + crams = FASTQ_TO_CRAM.out.cram_crai + rna_splice_junctions = FASTQ_TO_CRAM.out.rna_splice_junctions + rna_junctions = FASTQ_TO_CRAM.out.rna_junctions + align_reports = FASTQ_TO_CRAM.out.align_reports + sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics + mosdepth_global = mosdepth_global_out + mosdepth_summary = mosdepth_summary_out + mosdepth_regions = mosdepth_regions_out + mosdepth_per_base_d4 = mosdepth_per_base_d4_out + mosdepth_per_base_bed = mosdepth_per_base_bed_out + mosdepth_per_base_csi = mosdepth_per_base_csi_out + mosdepth_regions_bed = mosdepth_regions_bed_out + mosdepth_regions_csi = mosdepth_regions_csi_out + mosdepth_quantized_bed = mosdepth_quantized_bed_out + mosdepth_quantized_csi = mosdepth_quantized_csi_out + mosdepth_thresholds_bed = mosdepth_thresholds_bed_out + mosdepth_thresholds_csi = mosdepth_thresholds_csi_out + samtools_coverage = samtools_coverage_out + panelcoverage = panelcoverage_out + samtools_stats = BAM_QC.out.samtools_stats + samtools_flagstat = BAM_QC.out.samtools_flagstat + samtools_idxstats = BAM_QC.out.samtools_idxstats + picard_multiplemetrics = BAM_QC.out.picard_multiplemetrics + picard_multiplemetrics_pdf = BAM_QC.out.picard_multiplemetrics_pdf + picard_wgsmetrics = BAM_QC.out.picard_wgsmetrics + picard_hsmetrics = BAM_QC.out.picard_hsmetrics + md5sums = MD5SUM.out.checksum + multiqc_main_report = MULTIQC_MAIN.out.report.toList() + multiqc_main_data = MULTIQC_MAIN.out.data.toList() + multiqc_main_plots = MULTIQC_MAIN.out.plots.toList() + multiqc_library_report = MULTIQC_LIBRARY.out.report + multiqc_library_data = MULTIQC_LIBRARY.out.data + multiqc_library_plots = MULTIQC_LIBRARY.out.plots + versions = ch_versions } /* From 2dd72229226dc557cc4a2f1c550267f45265a7fe Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:04:36 +0100 Subject: [PATCH 178/202] drop unused gh workflows --- .github/workflows/fix-linting.yml | 89 ------------------------------- .github/workflows/fix_linting.yml | 89 ------------------------------- 2 files changed, 178 deletions(-) delete mode 100644 .github/workflows/fix-linting.yml delete mode 100644 .github/workflows/fix_linting.yml diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml deleted file mode 100644 index 2230aafb..00000000 --- a/.github/workflows/fix-linting.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Fix linting from a comment -on: - issue_comment: - types: [created] - -jobs: - fix-linting: - # Only run if comment is on a PR with the main repo, and if it contains the magic keywords - if: > - contains(github.event.comment.html_url, '/pull/') && - contains(github.event.comment.body, '@nf-core-bot fix linting') && - github.repository == 'nf-cmgg/preprocessing' - runs-on: ubuntu-latest - steps: - # Use the @nf-core-bot token to check out so we can push later - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - with: - token: ${{ secrets.nf_core_bot_auth_token }} - - # indication that the linting is being fixed - - name: React on comment - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - comment-id: ${{ github.event.comment.id }} - reactions: eyes - - # Action runs on the issue comment, so we don't get the PR by default - # Use the gh cli to check out the PR - - name: Checkout Pull Request - run: gh pr checkout ${{ github.event.issue.number }} - env: - GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} - - # Install and run pre-commit - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 - with: - python-version: 3.11 - - - name: Install pre-commit - run: pip install pre-commit - - - name: Run pre-commit - id: pre-commit - run: pre-commit run --all-files - continue-on-error: true - - # indication that the linting has finished - - name: react if linting finished succesfully - if: steps.pre-commit.outcome == 'success' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - comment-id: ${{ github.event.comment.id }} - reactions: "+1" - - - name: Commit & push changes - id: commit-and-push - if: steps.pre-commit.outcome == 'failure' - run: | - git config user.email "core@nf-co.re" - git config user.name "nf-core-bot" - git config push.default upstream - git add . - git status - git commit -m "[automated] Fix code linting" - git push - - - name: react if linting errors were fixed - id: react-if-fixed - if: steps.commit-and-push.outcome == 'success' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - comment-id: ${{ github.event.comment.id }} - reactions: hooray - - - name: react if linting errors were not fixed - if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - comment-id: ${{ github.event.comment.id }} - reactions: confused - - - name: react if linting errors were not fixed - if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 - with: - issue-number: ${{ github.event.issue.number }} - body: | - @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually. - See [CI log](https://github.com/nf-cmgg/preprocessing/actions/runs/${{ github.run_id }}) for more details. diff --git a/.github/workflows/fix_linting.yml b/.github/workflows/fix_linting.yml deleted file mode 100644 index 63b82243..00000000 --- a/.github/workflows/fix_linting.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Fix linting from a comment -on: - issue_comment: - types: [created] - -jobs: - fix-linting: - # Only run if comment is on a PR with the main repo, and if it contains the magic keywords - if: > - contains(github.event.comment.html_url, '/pull/') && - contains(github.event.comment.body, '@nf-core-bot fix linting') && - github.repository == 'nf-cmgg/preprocessing' - runs-on: ubuntu-latest - steps: - # Use the @nf-core-bot token to check out so we can push later - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - with: - token: ${{ secrets.nf_core_bot_auth_token }} - - # indication that the linting is being fixed - - name: React on comment - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - comment-id: ${{ github.event.comment.id }} - reactions: eyes - - # Action runs on the issue comment, so we don't get the PR by default - # Use the gh cli to check out the PR - - name: Checkout Pull Request - run: gh pr checkout ${{ github.event.issue.number }} - env: - GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} - - # Install and run pre-commit - - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 - with: - python-version: "3.14" - - - name: Install pre-commit - run: pip install pre-commit - - - name: Run pre-commit - id: pre-commit - run: pre-commit run --all-files - continue-on-error: true - - # indication that the linting has finished - - name: react if linting finished succesfully - if: steps.pre-commit.outcome == 'success' - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - comment-id: ${{ github.event.comment.id }} - reactions: "+1" - - - name: Commit & push changes - id: commit-and-push - if: steps.pre-commit.outcome == 'failure' - run: | - git config user.email "core@nf-co.re" - git config user.name "nf-core-bot" - git config push.default upstream - git add . - git status - git commit -m "[automated] Fix code linting" - git push - - - name: react if linting errors were fixed - id: react-if-fixed - if: steps.commit-and-push.outcome == 'success' - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - comment-id: ${{ github.event.comment.id }} - reactions: hooray - - - name: react if linting errors were not fixed - if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - comment-id: ${{ github.event.comment.id }} - reactions: confused - - - name: react if linting errors were not fixed - if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 - with: - issue-number: ${{ github.event.issue.number }} - body: | - @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually. - See [CI log](https://github.com/nf-cmgg/preprocessing/actions/runs/${{ github.run_id }}) for more details. From d534d9029b21cfb8c393377c9a3c150974d4c6dc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:04:57 +0100 Subject: [PATCH 179/202] calculate checksums for fastq output --- workflows/preprocessing.nf | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 477f5fd2..541f0359 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -196,9 +196,14 @@ workflow PREPROCESSING { // MODULE: fastp // Run QC, trimming and adapter removal // FASTP([meta, fastq, adapter_fasta], save_trimmed, save_merged) - FASTP(ch_fastq_per_sample.supported.map { meta, fastq -> - return [meta, fastq, []] - }, false, false, false) + FASTP( + ch_fastq_per_sample.supported.map { meta, fastq -> + return [meta, fastq, []] + }, + false, + false, + false, + ) ch_multiqc_files = ch_multiqc_files.mix(FASTP.out.json) // edit meta.id to match sample name @@ -311,9 +316,11 @@ workflow PREPROCESSING { */ MD5SUM( - FASTQ_TO_CRAM.out.cram_crai.map { meta, cram, _crai -> - return [meta, cram] - }, + ch_fastq_per_sample.other.mix( + FASTQ_TO_CRAM.out.cram_crai.map { meta, cram, _crai -> + return [meta, cram] + } + ), false, ) ch_versions = ch_versions.mix(MD5SUM.out.versions.first()) From 670c18d2097226dde718ede0a5310d7db2630ee2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 10:03:53 +0100 Subject: [PATCH 180/202] nextflow config lint --- nextflow.config | 6 +----- nextflow_schema.json | 51 -------------------------------------------- 2 files changed, 1 insertion(+), 56 deletions(-) diff --git a/nextflow.config b/nextflow.config index 05719293..13067b73 100644 --- a/nextflow.config +++ b/nextflow.config @@ -197,11 +197,7 @@ includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !pa // Load nf-cmgg/preprocessing custom profiles from different institutions. -// TODO nf-core: Optionally, you can add a pipeline-specific nf-core config at https://github.com/nf-core/configs -// includeConfig params.custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" - -// Load nf-cmgg/preprocessing custom profiles from nf-cmgg/configs. -includeConfig params.cmgg_custom_config_base && (!System.getenv('NXF_OFFLINE') || !params.cmgg_custom_config_base.startsWith('http')) ? "${params.cmgg_custom_config_base}/pipeline/preprocessing.config" : "/dev/null" +includeConfig params.custom_config_base && params.custom_config_base.contains('nf-cmgg') && (!System.getenv('NXF_OFFLINE') || !params.custom_config_base.startsWith('http')) ? "${params.custom_config_base}/pipeline/preprocessing.config" : "/dev/null" // Set default registry for Apptainer, Docker, Podman, Charliecloud and Singularity independent of -profile // Will not be used unless Apptainer / Docker / Podman / Charliecloud / Singularity are enabled diff --git a/nextflow_schema.json b/nextflow_schema.json index 722c57ce..e0d5f227 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -123,54 +123,6 @@ } } }, - "cmgg_institutional_config_options": { - "title": "nf-cmgg config options", - "type": "object", - "fa_icon": "fas fa-university", - "description": "Parameters used to describe centralised config profiles. These should not be edited.", - "help_text": "The centralised nf-cmgg configuration profiles use a handful of pipeline parameters to describe themselves. This information is then printed to the Nextflow log when you run a pipeline. You should not need to change these values when you run a pipeline.", - "properties": { - "cmgg_custom_config_version": { - "type": "string", - "description": "Git commit id for nf-cmgg configs.", - "default": "master", - "hidden": true, - "fa_icon": "fas fa-users-cog" - }, - "cmgg_custom_config_base": { - "type": "string", - "description": "Base directory for nf-cmgg configs.", - "default": "https://raw.githubusercontent.com/nf-cmgg/configs/master", - "hidden": true, - "help_text": "If you're running offline, Nextflow will not be able to fetch the institutional config files from the internet. If you don't need them, then this is not a problem. If you do need them, you should download the files from the repo and tell Nextflow where to find them with this parameter.", - "fa_icon": "fas fa-users-cog" - }, - "cmgg_config_profile_name": { - "type": "string", - "description": "nf-cmgg config name.", - "hidden": true, - "fa_icon": "fas fa-users-cog" - }, - "cmgg_config_profile_description": { - "type": "string", - "description": "nf-cmgg config description.", - "hidden": true, - "fa_icon": "fas fa-users-cog" - }, - "cmgg_config_profile_contact": { - "type": "string", - "description": "nf-cmgg config contact information.", - "hidden": true, - "fa_icon": "fas fa-users-cog" - }, - "cmgg_config_profile_url": { - "type": "string", - "description": "nf-cmgg config URL link.", - "hidden": true, - "fa_icon": "fas fa-users-cog" - } - } - }, "generic_options": { "title": "Generic options", "type": "object", @@ -312,9 +264,6 @@ { "$ref": "#/$defs/institutional_config_options" }, - { - "$ref": "#/$defs/cmgg_institutional_config_options" - }, { "$ref": "#/$defs/generic_options" } From 5e9a2d54c05ad9f1d4a967c4207cd6b2b5f22876 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:49:18 +0100 Subject: [PATCH 181/202] fix tests --- conf/modules.config | 3 +++ modules/nf-core/picard/collecthsmetrics/main.nf | 5 +++-- modules/nf-core/picard/collectmultiplemetrics/main.nf | 2 ++ modules/nf-core/picard/collectwgsmetrics/main.nf | 2 ++ subworkflows/local/coverage/main.nf | 10 ++++------ tests/config/igenomes_test.config | 1 + 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 16f7338f..03f7047a 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -305,4 +305,7 @@ env { MOSDEPTH_Q0 = 'NO_COVERAGE' MOSDEPTH_Q1 = 'LOW_COVERAGE' MOSDEPTH_Q2 = 'CALLABLE' + + // Set TMPDIR for all modules + TMPDIR = "$PWD" } diff --git a/modules/nf-core/picard/collecthsmetrics/main.nf b/modules/nf-core/picard/collecthsmetrics/main.nf index 63b3479c..22d95d57 100644 --- a/modules/nf-core/picard/collecthsmetrics/main.nf +++ b/modules/nf-core/picard/collecthsmetrics/main.nf @@ -45,6 +45,7 @@ process PICARD_COLLECTHSMETRICS { """ + export TMP=\$PWD $bait_intervallist_cmd $target_intervallist_cmd @@ -57,8 +58,8 @@ process PICARD_COLLECTHSMETRICS { --BAIT_INTERVALS $bait_interval_list \\ --TARGET_INTERVALS $target_interval_list \\ --INPUT $bam \\ - --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics - + --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics \\ + --TMP_DIR . """ stub: diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index 158a746f..28d8eaa0 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -30,6 +30,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { avail_mem = (task.memory.mega*0.8).intValue() } """ + export TMP=\$PWD picard \\ -Xmx${avail_mem}M \\ CollectMultipleMetrics \\ @@ -37,6 +38,7 @@ process PICARD_COLLECTMULTIPLEMETRICS { --INPUT $bam \\ --OUTPUT ${prefix}.CollectMultipleMetrics \\ $intervals_cmd \\ + --TMP_DIR . \\ $reference_cmd """ diff --git a/modules/nf-core/picard/collectwgsmetrics/main.nf b/modules/nf-core/picard/collectwgsmetrics/main.nf index 63330d22..a631b03f 100644 --- a/modules/nf-core/picard/collectwgsmetrics/main.nf +++ b/modules/nf-core/picard/collectwgsmetrics/main.nf @@ -29,6 +29,7 @@ process PICARD_COLLECTWGSMETRICS { avail_mem = (task.memory.mega*0.8).intValue() } """ + export TMP=\$PWD picard \\ -Xmx${avail_mem}M \\ CollectWgsMetrics \\ @@ -36,6 +37,7 @@ process PICARD_COLLECTWGSMETRICS { --INPUT $bam \\ --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ --REFERENCE_SEQUENCE ${fasta} \\ + --TMP_DIR . \\ $interval """ diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index cca3ca59..ccbf27ad 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -30,13 +30,11 @@ workflow COVERAGE { PANELCOVERAGE( MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).map { meta, bed, index, genelists -> - if (genelists !instanceof List) { - // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... - genelists = [genelists] - } + // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... + def genelists_array = genelists !instanceof List ? [genelists] : genelists def filtered_genelists = meta.tag.toLowerCase() == "seqcap" - ? genelists.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } - : genelists.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } + ? genelists_array.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } + : genelists_array.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } if (filtered_genelists.size() > 0) { return [ diff --git a/tests/config/igenomes_test.config b/tests/config/igenomes_test.config index 80984075..74154eec 100644 --- a/tests/config/igenomes_test.config +++ b/tests/config/igenomes_test.config @@ -9,6 +9,7 @@ params { gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" } } + genelists = null } aws { From de6df09db397aaf0bbd6ee49f6a5326069f8b89e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:50:33 +0100 Subject: [PATCH 182/202] module patches --- .../picard-collecthsmetrics.diff | 18 +++++++++++++++++- .../picard-collectwgsmetrics.diff | 16 ++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff b/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff index 5907d093..1407a35a 100644 --- a/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff +++ b/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff @@ -26,7 +26,7 @@ Changes in 'picard/collecthsmetrics/main.nf': def avail_mem = 3072 if (!task.memory) { -@@ -37,14 +33,14 @@ +@@ -37,18 +33,19 @@ def bait_intervallist_cmd = "" if (bait_intervals =~ /.(bed|bed.gz)$/){ bait_interval_list = bait_intervals.toString().replaceAll(/.(bed|bed.gz)$/, ".interval_list") @@ -43,6 +43,22 @@ Changes in 'picard/collecthsmetrics/main.nf': } + """ ++ export TMP=\$PWD + + $bait_intervallist_cmd + $target_intervallist_cmd +@@ -61,8 +58,8 @@ + --BAIT_INTERVALS $bait_interval_list \\ + --TARGET_INTERVALS $target_interval_list \\ + --INPUT $bam \\ +- --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics +- ++ --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics \\ ++ --TMP_DIR . + + cat <<-END_VERSIONS > versions.yml + "${task.process}": 'modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collecthsmetrics/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff index bf843c60..04fea62a 100644 --- a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff +++ b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff @@ -15,6 +15,22 @@ Changes in 'picard/collectwgsmetrics/main.nf': path intervallist output: +@@ -31,6 +29,7 @@ + avail_mem = (task.memory.mega*0.8).intValue() + } + """ ++ export TMP=\$PWD + picard \\ + -Xmx${avail_mem}M \\ + CollectWgsMetrics \\ +@@ -38,6 +37,7 @@ + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ + --REFERENCE_SEQUENCE ${fasta} \\ ++ --TMP_DIR . \\ + $interval + + 'modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test' is unchanged From 32604dc4b2eafd1735e2a57d738c48f91418a4b3 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 12:26:28 +0100 Subject: [PATCH 183/202] fix snapshot --- tests/workflows/preprocessing.nf.test.snap | 36 ++++++++++++++++------ 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index 0bdfd83c..d40bc343 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -44,6 +44,12 @@ ], "demultiplex_reports": [ + ], + "falco_html": [ + + ], + "falco_txt": [ + ], "fastp_html": [ [ @@ -394,7 +400,7 @@ "test_data" ], "multiqc_library_plots": [ - + ], "multiqc_library_report": [ "test.html" @@ -670,9 +676,9 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-23T13:59:59.404732" + "timestamp": "2026-02-11T12:00:40.443933" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -719,6 +725,12 @@ ], "demultiplex_reports": [ + ], + "falco_html": [ + + ], + "falco_txt": [ + ], "fastp_html": [ [ @@ -853,7 +865,7 @@ "test_data" ], "multiqc_library_plots": [ - + ], "multiqc_library_report": [ "test.html" @@ -1019,9 +1031,9 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-23T14:06:35.503463" + "timestamp": "2026-02-11T12:11:20.398961" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1067,6 +1079,12 @@ ], "demultiplex_reports": [ + ], + "falco_html": [ + + ], + "falco_txt": [ + ], "fastp_html": [ [ @@ -1336,7 +1354,7 @@ "test_data" ], "multiqc_library_plots": [ - + ], "multiqc_library_report": [ "test.html" @@ -1604,8 +1622,8 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-23T14:04:00.643521" + "timestamp": "2026-02-11T12:06:12.331519" } } \ No newline at end of file From fbe585296220819e4b9bb2636e8342c5abe6a9ec Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:08:18 +0100 Subject: [PATCH 184/202] fix coverage issues --- conf/modules.config | 6 +-- subworkflows/local/coverage/main.nf | 17 +++++---- tests/config/igenomes_test.config | 14 +++---- .../subworkflows/local/coverage/main.nf.test | 10 ++--- .../local/coverage/main.nf.test.snap | 38 +++++++++++++++---- workflows/preprocessing.nf | 3 +- 6 files changed, 55 insertions(+), 33 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 03f7047a..0c65d04c 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -90,9 +90,7 @@ process { cpus = 16 memory = 32.GB ext.args = { - [ - meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : "" - ].join(" ").trim() + [meta.readgroup ? "--RGSM \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : ""].join(" ").trim() } ext.args2 = "--fast" } @@ -307,5 +305,5 @@ env { MOSDEPTH_Q2 = 'CALLABLE' // Set TMPDIR for all modules - TMPDIR = "$PWD" + TMPDIR = "\$PWD" } diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index ccbf27ad..5f9637d7 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -13,7 +13,6 @@ workflow COVERAGE { main: ch_versions = channel.empty() - ch_coverageqc_files = channel.empty() MOSDEPTH( ch_meta_cram_crai_fasta_fai_roi.map { meta, cram, crai, fasta, _fai, roi -> @@ -26,15 +25,19 @@ workflow COVERAGE { return [meta, cram, crai, fasta, fai] } ) - ch_coverageqc_files = ch_coverageqc_files.merge(SAMTOOLS_COVERAGE.out.coverage) + ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) PANELCOVERAGE( - MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).map { meta, bed, index, genelists -> + MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists) + .view() + .map { meta, bed, index, genelists -> // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... - def genelists_array = genelists !instanceof List ? [genelists] : genelists + if (genelists !instanceof List) { + genelists = [genelists] + } def filtered_genelists = meta.tag.toLowerCase() == "seqcap" - ? genelists_array.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } - : genelists_array.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } + ? genelists.findAll { genelist -> genelist.name.toLowerCase().contains("seqcap") } + : genelists.findAll { genelist -> !genelist.name.toLowerCase().contains("seqcap") } if (filtered_genelists.size() > 0) { return [ @@ -46,7 +49,7 @@ workflow COVERAGE { } } ) - ch_coverageqc_files = ch_coverageqc_files.mix(PANELCOVERAGE.out.regiondist) + ch_versions = ch_versions.mix(PANELCOVERAGE.out.versions.first()) emit: mosdepth_global = MOSDEPTH.out.global_txt diff --git a/tests/config/igenomes_test.config b/tests/config/igenomes_test.config index 74154eec..cac18b9e 100644 --- a/tests/config/igenomes_test.config +++ b/tests/config/igenomes_test.config @@ -1,15 +1,15 @@ params { genomes { GRCh38 { - bwamem = "s3://test-data/genomics/homo_sapiens/genome/bwa/" - dict = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict" - fai = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" - fasta = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" - star = "s3://test-data/genomics/homo_sapiens/genome/star/" - gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + bwamem = "s3://test-data/genomics/homo_sapiens/genome/bwa/" + dict = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.dict" + fai = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna.fai" + fasta = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" + star = "s3://test-data/genomics/homo_sapiens/genome/star/" + gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" + genelists = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" } } - genelists = null } aws { diff --git a/tests/subworkflows/local/coverage/main.nf.test b/tests/subworkflows/local/coverage/main.nf.test index 8792b87c..7b90545d 100644 --- a/tests/subworkflows/local/coverage/main.nf.test +++ b/tests/subworkflows/local/coverage/main.nf.test @@ -23,9 +23,8 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - input[1] = Channel.value([ - file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/genelists/genelist_chr21_per_exon.bed",checkIfExists:true) - ]) + def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" + input[1] = channel.fromPath(genelists_path).collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } """ } } @@ -52,9 +51,8 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - input[1] = Channel.value([ - file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/genelists/genelist_chr21_per_exon.bed",checkIfExists:true) - ]) + def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" + input[1] = channel.fromPath(genelists_path).collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } """ } } diff --git a/tests/subworkflows/local/coverage/main.nf.test.snap b/tests/subworkflows/local/coverage/main.nf.test.snap index 4df77336..7bd91330 100644 --- a/tests/subworkflows/local/coverage/main.nf.test.snap +++ b/tests/subworkflows/local/coverage/main.nf.test.snap @@ -45,7 +45,10 @@ "single_end": false, "tag": "WES" }, - "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,e5c7b4f381721888249c57aa55be2d34" + [ + "test_Treatable_ID_per_exon.mosdepth.region.dist.txt:md5,6c2b5237d98e0a2f118a3553c2ba478e", + "test_bladder_cancer_per_exon.mosdepth.region.dist.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "14": [ @@ -232,7 +235,10 @@ "single_end": false, "tag": "WES" }, - "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,e5c7b4f381721888249c57aa55be2d34" + [ + "test_Treatable_ID_per_exon.mosdepth.region.dist.txt:md5,6c2b5237d98e0a2f118a3553c2ba478e", + "test_bladder_cancer_per_exon.mosdepth.region.dist.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] ] ], "samtools_coverage": [ @@ -254,9 +260,9 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-09T12:02:48.263146" + "timestamp": "2026-02-11T14:05:13.106828" }, "Coverage - seqcap": { "content": [ @@ -298,10 +304,18 @@ ] ], "13": [ - + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test_seqcap_Connective_tissue_per_exon.mosdepth.region.dist.txt:md5,e098c901acb1da8c2cf64a248306e71c" + ] ], "14": [ "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", + "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ], "2": [ @@ -477,7 +491,14 @@ ], "panelcoverage": [ - + [ + { + "id": "test", + "single_end": false, + "tag": "seqcap" + }, + "test_seqcap_Connective_tissue_per_exon.mosdepth.region.dist.txt:md5,e098c901acb1da8c2cf64a248306e71c" + ] ], "samtools_coverage": [ [ @@ -491,14 +512,15 @@ ], "versions": [ "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", + "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-09T12:02:26.604953" + "timestamp": "2026-02-11T13:54:02.513877" } } \ No newline at end of file diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 541f0359..b1ca0220 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -54,7 +54,8 @@ workflow PREPROCESSING { error("Unable to determine input type, please check inputs") } .set { ch_inputs_from_samplesheet } - genelists = genelists ? channel.value(file(genelists + "/*.bed", checkIfExists: true)) : channel.empty() + // construct a value channel containing an array of files, because the coverage subworkflow expects a channel of arrays of genelist files (to allow for multiple genelist files per sample) + ch_genelists = genelists ? channel.fromPath(genelists).collect().map { files -> [ files ] } : channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From e0e95915aff55dffb6f74aa75409e9bee71ad88a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 18:05:33 +0100 Subject: [PATCH 185/202] fix genelist path parsing --- tests/subworkflows/local/coverage/main.nf.test | 8 ++++---- workflows/preprocessing.nf | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/subworkflows/local/coverage/main.nf.test b/tests/subworkflows/local/coverage/main.nf.test index 7b90545d..c13bd512 100644 --- a/tests/subworkflows/local/coverage/main.nf.test +++ b/tests/subworkflows/local/coverage/main.nf.test @@ -23,8 +23,8 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" - input[1] = channel.fromPath(genelists_path).collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } + def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists" + input[1] = channel.fromPath(genelists_path + "/*.bed").collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } """ } } @@ -51,8 +51,8 @@ nextflow_workflow { file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true), ]) // genelists - def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" - input[1] = channel.fromPath(genelists_path).collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } + def genelists_path = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists" + input[1] = channel.fromPath(genelists_path + "/*.bed").collect().map{ files -> [ files ] }.ifEmpty { channel.empty() } """ } } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index b1ca0220..3cdcc9c1 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -55,7 +55,7 @@ workflow PREPROCESSING { } .set { ch_inputs_from_samplesheet } // construct a value channel containing an array of files, because the coverage subworkflow expects a channel of arrays of genelist files (to allow for multiple genelist files per sample) - ch_genelists = genelists ? channel.fromPath(genelists).collect().map { files -> [ files ] } : channel.empty() + ch_genelists = genelists ? channel.fromPath(genelists + "/*.bed").collect().map { files -> [ files ] } : channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 8d2580e5b15b41840f6aed00628e980c03f0c568 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:20:21 +0100 Subject: [PATCH 186/202] deprecate global analysis params in favor of per sample settings --- modules/nf-core/picard/collectmultiplemetrics/main.nf | 3 ++- workflows/preprocessing.nf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index 28d8eaa0..d6e200f9 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -39,7 +39,8 @@ process PICARD_COLLECTMULTIPLEMETRICS { --OUTPUT ${prefix}.CollectMultipleMetrics \\ $intervals_cmd \\ --TMP_DIR . \\ - $reference_cmd + $reference_cmd \\ + $intervals_cmd """ stub: diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 3cdcc9c1..f93c2d09 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -251,7 +251,7 @@ workflow PREPROCESSING { ) ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.sormadup_metrics) - /* +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: COVERAGE ANALYSIS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From c238ce4741d22b904e72dceb5a8a5566584b6a25 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 9 Feb 2026 15:51:55 +0100 Subject: [PATCH 187/202] nextflow lint --- workflows/preprocessing.nf | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index f93c2d09..274c2013 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -258,7 +258,7 @@ workflow PREPROCESSING { */ FASTQ_TO_CRAM.out.cram_crai .filter { meta, _cram, _crai -> - meta.run_coverage && meta.run_coverage.toBoolean() + meta.run_coverage.toBoolean() } .map { meta, cram, crai -> return [ @@ -424,20 +424,20 @@ workflow PREPROCESSING { rna_junctions = FASTQ_TO_CRAM.out.rna_junctions align_reports = FASTQ_TO_CRAM.out.align_reports sormadup_metrics = FASTQ_TO_CRAM.out.sormadup_metrics - mosdepth_global = mosdepth_global_out - mosdepth_summary = mosdepth_summary_out - mosdepth_regions = mosdepth_regions_out - mosdepth_per_base_d4 = mosdepth_per_base_d4_out - mosdepth_per_base_bed = mosdepth_per_base_bed_out - mosdepth_per_base_csi = mosdepth_per_base_csi_out - mosdepth_regions_bed = mosdepth_regions_bed_out - mosdepth_regions_csi = mosdepth_regions_csi_out - mosdepth_quantized_bed = mosdepth_quantized_bed_out - mosdepth_quantized_csi = mosdepth_quantized_csi_out - mosdepth_thresholds_bed = mosdepth_thresholds_bed_out - mosdepth_thresholds_csi = mosdepth_thresholds_csi_out - samtools_coverage = samtools_coverage_out - panelcoverage = panelcoverage_out + mosdepth_global = COVERAGE.out.mosdepth_global + mosdepth_summary = COVERAGE.out.mosdepth_summary + mosdepth_regions = COVERAGE.out.mosdepth_regions + mosdepth_per_base_d4 = COVERAGE.out.mosdepth_per_base_d4 + mosdepth_per_base_bed = COVERAGE.out.mosdepth_per_base_bed + mosdepth_per_base_csi = COVERAGE.out.mosdepth_per_base_csi + mosdepth_regions_bed = COVERAGE.out.mosdepth_regions_bed + mosdepth_regions_csi = COVERAGE.out.mosdepth_regions_csi + mosdepth_quantized_bed = COVERAGE.out.mosdepth_quantized_bed + mosdepth_quantized_csi = COVERAGE.out.mosdepth_quantized_csi + mosdepth_thresholds_bed = COVERAGE.out.mosdepth_thresholds_bed + mosdepth_thresholds_csi = COVERAGE.out.mosdepth_thresholds_csi + samtools_coverage = COVERAGE.out.samtools_coverage + panelcoverage = COVERAGE.out.panelcoverage samtools_stats = BAM_QC.out.samtools_stats samtools_flagstat = BAM_QC.out.samtools_flagstat samtools_idxstats = BAM_QC.out.samtools_idxstats From d9ab5efeb06c45d595f6340f063bc6f48780b6a2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 12:24:01 +0100 Subject: [PATCH 188/202] nextflow lint entire pipeline --- subworkflows/local/bam_qc/main.nf | 1 - subworkflows/local/coverage/main.nf | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index d6e1c8bd..d9cd0f7c 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -52,7 +52,6 @@ workflow BAM_QC { PICARD_COLLECTHSMETRICS(ch_picard_coverage.hsmetrics) ch_picard_hsmetrics = PICARD_COLLECTHSMETRICS.out.metrics - ch_picard_hsmetrics = PICARD_COLLECTHSMETRICS.out.metrics emit: samtools_stats = SAMTOOLS_STATS.out.stats diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 5f9637d7..0f9a42d3 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -66,4 +66,5 @@ workflow COVERAGE { mosdepth_thresholds_csi = MOSDEPTH.out.thresholds_csi samtools_coverage = SAMTOOLS_COVERAGE.out.coverage panelcoverage = PANELCOVERAGE.out.regiondist + versions = ch_versions } From 92cb905b1c60e255c309e318d52242795257e931 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 19:36:06 +0100 Subject: [PATCH 189/202] bump picard/collectmultiplemetrics module --- modules/nf-core/picard/collectmultiplemetrics/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/nf-core/picard/collectmultiplemetrics/main.nf b/modules/nf-core/picard/collectmultiplemetrics/main.nf index d6e200f9..11b00464 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/main.nf +++ b/modules/nf-core/picard/collectmultiplemetrics/main.nf @@ -37,7 +37,6 @@ process PICARD_COLLECTMULTIPLEMETRICS { $args \\ --INPUT $bam \\ --OUTPUT ${prefix}.CollectMultipleMetrics \\ - $intervals_cmd \\ --TMP_DIR . \\ $reference_cmd \\ $intervals_cmd From 068421893213f5fd23c549c2d81d5806d70b61a9 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 10 Feb 2026 20:35:15 +0100 Subject: [PATCH 190/202] more topic work --- subworkflows/local/coverage/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 0f9a42d3..5f9637d7 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -66,5 +66,4 @@ workflow COVERAGE { mosdepth_thresholds_csi = MOSDEPTH.out.thresholds_csi samtools_coverage = SAMTOOLS_COVERAGE.out.coverage panelcoverage = PANELCOVERAGE.out.regiondist - versions = ch_versions } From a9323bbbe51b5a0bea69a56f84d10290861b9c43 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 18:56:31 +0100 Subject: [PATCH 191/202] lint (again) --- subworkflows/local/coverage/main.nf | 4 +- subworkflows/nf-core/bcl_demultiplex/main.nf | 141 ++++++------- .../bcl_demultiplex/tests/nextflow.config | 13 +- .../nf-core/utils_nextflow_pipeline/main.nf | 22 +- .../nf-core/utils_nfcore_pipeline/main.nf | 198 +++++++++--------- .../tests/nextflow.config | 2 +- .../nf-core/utils_nfschema_plugin/main.nf | 49 ++--- .../tests/nextflow.config | 2 +- workflows/preprocessing.nf | 6 +- 9 files changed, 215 insertions(+), 222 deletions(-) diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 5f9637d7..ca70e40a 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -28,9 +28,7 @@ workflow COVERAGE { ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) PANELCOVERAGE( - MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists) - .view() - .map { meta, bed, index, genelists -> + MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).view().map { meta, bed, index, genelists -> // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... if (genelists !instanceof List) { genelists = [genelists] diff --git a/subworkflows/nf-core/bcl_demultiplex/main.nf b/subworkflows/nf-core/bcl_demultiplex/main.nf index bfe1ae83..fefa3af3 100644 --- a/subworkflows/nf-core/bcl_demultiplex/main.nf +++ b/subworkflows/nf-core/bcl_demultiplex/main.nf @@ -9,66 +9,64 @@ include { BCL2FASTQ } from "../../../modules/nf-core/bcl2fastq/main" workflow BCL_DEMULTIPLEX { take: - ch_flowcell // [[id:"", lane:""], samplesheet.csv, path/to/bcl/files] - demultiplexer // bclconvert or bcl2fastq + ch_flowcell // [[id:"", lane:""], samplesheet.csv, path/to/bcl/files] + demultiplexer // bclconvert or bcl2fastq main: - ch_versions = channel.empty() - ch_fastq = channel.empty() - ch_reports = channel.empty() - ch_stats = channel.empty() - ch_interop = channel.empty() - ch_logs = channel.empty() + ch_versions = channel.empty() + ch_fastq = channel.empty() + ch_reports = channel.empty() + ch_stats = channel.empty() + ch_interop = channel.empty() + ch_logs = channel.empty() - // Split flowcells into separate channels containing run as tar and run as path - // https://nextflow.slack.com/archives/C02T98A23U7/p1650963988498929 - ch_flowcell - .branch { _meta, _samplesheet, run -> - tar: run.toString().endsWith(".tar.gz") - dir: true - }.set { ch_flowcells } + // Split flowcells into separate channels containing run as tar and run as path + // https://nextflow.slack.com/archives/C02T98A23U7/p1650963988498929 + ch_flowcell + .branch { _meta, _samplesheet, run -> + tar: run.toString().endsWith(".tar.gz") + dir: true + } + .set { ch_flowcells } - ch_flowcells.tar - .multiMap { meta, samplesheet, run -> - samplesheets: [ meta, samplesheet ] - run_dirs: [ meta, run ] - }.set { ch_flowcells_tar } + ch_flowcells.tar + .multiMap { meta, samplesheet, run -> + samplesheets: [meta, samplesheet] + run_dirs: [meta, run] + } + .set { ch_flowcells_tar } - // Runs when run_dir is a tar archive - // Re-join the metadata and the untarred run directory with the samplesheet - ch_flowcells_tar_merged = ch_flowcells_tar - .samplesheets - .join( ch_flowcells_tar.run_dirs ) + // Runs when run_dir is a tar archive + // Re-join the metadata and the untarred run directory with the samplesheet + ch_flowcells_tar_merged = ch_flowcells_tar.samplesheets.join(ch_flowcells_tar.run_dirs) - // Merge the two channels back together - ch_flowcells = ch_flowcells.dir.mix(ch_flowcells_tar_merged) + // Merge the two channels back together + ch_flowcells = ch_flowcells.dir.mix(ch_flowcells_tar_merged) - // MODULE: bclconvert - // Demultiplex the bcl files - if (demultiplexer == "bclconvert") { - BCLCONVERT( ch_flowcells ) - ch_fastq = ch_fastq.mix(BCLCONVERT.out.fastq) - ch_interop = ch_interop.mix(BCLCONVERT.out.interop) - ch_reports = ch_reports.mix(BCLCONVERT.out.reports) - ch_logs = ch_logs.mix(BCLCONVERT.out.logs) - ch_versions = ch_versions.mix(BCLCONVERT.out.versions.first()) - } + // MODULE: bclconvert + // Demultiplex the bcl files + if (demultiplexer == "bclconvert") { + BCLCONVERT(ch_flowcells) + ch_fastq = ch_fastq.mix(BCLCONVERT.out.fastq) + ch_interop = ch_interop.mix(BCLCONVERT.out.interop) + ch_reports = ch_reports.mix(BCLCONVERT.out.reports) + ch_logs = ch_logs.mix(BCLCONVERT.out.logs) + ch_versions = ch_versions.mix(BCLCONVERT.out.versions.first()) + } - // MODULE: bcl2fastq - // Demultiplex the bcl files - if (demultiplexer == "bcl2fastq") { - BCL2FASTQ( ch_flowcells ) - ch_fastq = ch_fastq.mix(BCL2FASTQ.out.fastq) - ch_interop = ch_interop.mix(BCL2FASTQ.out.interop) - ch_reports = ch_reports.mix(BCL2FASTQ.out.reports) - ch_stats = ch_stats.mix(BCL2FASTQ.out.stats) - ch_versions = ch_versions.mix(BCL2FASTQ.out.versions.first()) - } + // MODULE: bcl2fastq + // Demultiplex the bcl files + if (demultiplexer == "bcl2fastq") { + BCL2FASTQ(ch_flowcells) + ch_fastq = ch_fastq.mix(BCL2FASTQ.out.fastq) + ch_interop = ch_interop.mix(BCL2FASTQ.out.interop) + ch_reports = ch_reports.mix(BCL2FASTQ.out.reports) + ch_stats = ch_stats.mix(BCL2FASTQ.out.stats) + ch_versions = ch_versions.mix(BCL2FASTQ.out.versions.first()) + } - // Generate meta for each fastq - ch_fastq - // reshapes the channel from a single emit of [meta, [fastq, fastq, fastq...]] - // to emits per fastq file like [meta, fastq] + // Generate meta for each fastq + ch_fastq .transpose() .map { fc_meta, fastq -> def meta = [:] @@ -86,7 +84,7 @@ workflow BCL_DEMULTIPLEX { line = buffered.readLine() buffered.close() } - if ( line != null && line.startsWith('@') ) { + if (line != null && line.startsWith('@')) { line = line.substring(1) // expected format is like: // xx:yy:FLOWCELLID:LANE:... (seven fields) @@ -95,45 +93,40 @@ workflow BCL_DEMULTIPLEX { // "@::::::: :::" //def sequencer_serial = fields[0] //def run_nubmer = fields[1] - def fcid = fields[2] - def lane = fields[3] - def index = fields[-1] =~ /[GATC+-]/ ? fields[-1] : "" + def fcid = fields[2] + def lane = fields[3] + def index = fields[-1] =~ /[GATC+-]/ ? fields[-1] : "" def ID = [fcid, lane].join(".") def PU = [fcid, lane, index].findAll().join(".") def PL = "ILLUMINA" def SM = fastq.getSimpleName().toString() - ~/_S[0-9]+.*$/ - meta.readgroup = [ - "ID": ID, - "SM": SM, - "PL": PL, - "PU": PU - ] + meta.readgroup = ["ID": ID, "SM": SM, "PL": PL, "PU": PU] meta.empty = false - } else { - println "No reads were found in FASTQ file: ${fastq}" + } + else { + println("No reads were found in FASTQ file: ${fastq}") meta.readgroup = [:] meta.empty = true } return [meta, fastq] } - // Group by the meta id so that we can find mate pairs if they exist .groupTuple(by: [0]) .map { meta, fastq -> meta.single_end = fastq.size() == 1 return [meta, fastq.flatten()] } .branch { meta, _fastq -> - fastq : meta.empty == false - empty_fastq : meta.empty == true + fastq: meta.empty == false + empty_fastq: meta.empty == true } - .set{ch_fastq_with_meta} + .set { ch_fastq_with_meta } emit: - fastq = ch_fastq_with_meta.fastq - empty_fastq = ch_fastq_with_meta.empty_fastq - reports = ch_reports - stats = ch_stats - interop = ch_interop - logs = ch_logs - versions = ch_versions + fastq = ch_fastq_with_meta.fastq + empty_fastq = ch_fastq_with_meta.empty_fastq + reports = ch_reports + stats = ch_stats + interop = ch_interop + logs = ch_logs + versions = ch_versions } diff --git a/subworkflows/nf-core/bcl_demultiplex/tests/nextflow.config b/subworkflows/nf-core/bcl_demultiplex/tests/nextflow.config index dd8bfa2a..555a2ec7 100644 --- a/subworkflows/nf-core/bcl_demultiplex/tests/nextflow.config +++ b/subworkflows/nf-core/bcl_demultiplex/tests/nextflow.config @@ -1,13 +1,12 @@ process { withName: BCLCONVERT { - ext.args = {[ - meta.lane ? "--bcl-only-lane ${meta.lane}" : "", - "--force" - ].join(" ").trim()} + ext.args = { + [meta.lane ? "--bcl-only-lane ${meta.lane}" : "", "--force"].join(" ").trim() + } } withName: BCL2FASTQ { - ext.args = {[ - "--tiles s_1_1101" - ].join(" ").trim()} + ext.args = { + ["--tiles s_1_1101"].join(" ").trim() + } } } diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index d6e593e8..7049caef 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -10,9 +10,9 @@ workflow UTILS_NEXTFLOW_PIPELINE { take: - print_version // boolean: print version - dump_parameters // boolean: dump parameters - outdir // path: base directory used to publish pipeline results + print_version // boolean: print version + dump_parameters // boolean: dump parameters + outdir // path: base directory used to publish pipeline results check_conda_channels // boolean: check conda channels main: @@ -72,10 +72,10 @@ def getWorkflowVersion() { // def dumpParametersToJSON(outdir) { def timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') - def filename = "params_${timestamp}.json" - def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") - def jsonStr = groovy.json.JsonOutput.toJson(params) - temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) + def filename = "params_${timestamp}.json" + def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") + def jsonStr = groovy.json.JsonOutput.toJson(params) + temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") temp_pf.delete() @@ -91,12 +91,12 @@ def checkCondaChannels() { def config = parser.load("conda config --show channels".execute().text) channels = config.channels } - catch (NullPointerException e) { + catch (e: NullPointerException) { log.debug(e) log.warn("Could not verify conda channel configuration.") return null } - catch (IOException e) { + catch (e: IOException) { log.debug(e) log.warn("Could not verify conda channel configuration.") return null @@ -111,7 +111,8 @@ def checkCondaChannels() { def channel_priority_violation = required_channels_in_order != channels.findAll { ch -> ch in required_channels_in_order } if (channels_missing | channel_priority_violation) { - log.warn """\ + log.warn( + """\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There is a problem with your Conda configuration! You will need to set-up the conda-forge and bioconda channels correctly. @@ -122,5 +123,6 @@ def checkCondaChannels() { ${required_channels_in_order} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" """.stripIndent(true) + ) } } diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index 2f30e9a4..cf586322 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -125,12 +125,12 @@ def paramsSummaryMultiqc(summary_params) { } def yaml_file_text = "id: '${workflow.manifest.name.replace('/', '-')}-summary'\n" as String - yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" - yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" - yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" - yaml_file_text += "plot_type: 'html'\n" - yaml_file_text += "data: |\n" - yaml_file_text += "${summary_section}" + yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" + yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" + yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" + yaml_file_text += "plot_type: 'html'\n" + yaml_file_text += "data: |\n" + yaml_file_text += "${summary_section}" return yaml_file_text } @@ -138,67 +138,67 @@ def paramsSummaryMultiqc(summary_params) { // // ANSII colours used for terminal logging // -def logColours(monochrome_logs=true) { +def logColours(monochrome_logs = true) { def colorcodes = [:] as Map // Reset / Meta - colorcodes['reset'] = monochrome_logs ? '' : "\033[0m" - colorcodes['bold'] = monochrome_logs ? '' : "\033[1m" - colorcodes['dim'] = monochrome_logs ? '' : "\033[2m" + colorcodes['reset'] = monochrome_logs ? '' : "\033[0m" + colorcodes['bold'] = monochrome_logs ? '' : "\033[1m" + colorcodes['dim'] = monochrome_logs ? '' : "\033[2m" colorcodes['underlined'] = monochrome_logs ? '' : "\033[4m" - colorcodes['blink'] = monochrome_logs ? '' : "\033[5m" - colorcodes['reverse'] = monochrome_logs ? '' : "\033[7m" - colorcodes['hidden'] = monochrome_logs ? '' : "\033[8m" + colorcodes['blink'] = monochrome_logs ? '' : "\033[5m" + colorcodes['reverse'] = monochrome_logs ? '' : "\033[7m" + colorcodes['hidden'] = monochrome_logs ? '' : "\033[8m" // Regular Colors - colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" - colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" - colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" + colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" + colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" + colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" colorcodes['yellow'] = monochrome_logs ? '' : "\033[0;33m" - colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" + colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" colorcodes['purple'] = monochrome_logs ? '' : "\033[0;35m" - colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" - colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" + colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" + colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" // Bold - colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" - colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" - colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" + colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" + colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" + colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" colorcodes['byellow'] = monochrome_logs ? '' : "\033[1;33m" - colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" + colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" colorcodes['bpurple'] = monochrome_logs ? '' : "\033[1;35m" - colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" - colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" + colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" + colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" // Underline - colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" - colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" - colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" + colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" + colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" + colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" colorcodes['uyellow'] = monochrome_logs ? '' : "\033[4;33m" - colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" + colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" colorcodes['upurple'] = monochrome_logs ? '' : "\033[4;35m" - colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" - colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" + colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" + colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" // High Intensity - colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" - colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" - colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" + colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" + colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" + colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" colorcodes['iyellow'] = monochrome_logs ? '' : "\033[0;93m" - colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" + colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" colorcodes['ipurple'] = monochrome_logs ? '' : "\033[0;95m" - colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" - colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" + colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" + colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" // Bold High Intensity - colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" - colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" - colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" + colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" + colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" + colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" colorcodes['biyellow'] = monochrome_logs ? '' : "\033[1;93m" - colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" + colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" colorcodes['bipurple'] = monochrome_logs ? '' : "\033[1;95m" - colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" - colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" + colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" + colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" return colorcodes } @@ -208,17 +208,21 @@ def logColours(monochrome_logs=true) { def getSingleReport(multiqc_reports) { if (multiqc_reports instanceof Path) { return multiqc_reports - } else if (multiqc_reports instanceof List) { + } + else if (multiqc_reports instanceof List) { if (multiqc_reports.size() == 0) { log.warn("[${workflow.manifest.name}] No reports found from process 'MULTIQC'") return null - } else if (multiqc_reports.size() == 1) { + } + else if (multiqc_reports.size() == 1) { return multiqc_reports.first() - } else { + } + else { log.warn("[${workflow.manifest.name}] Found multiple reports from process 'MULTIQC', will use only one") return multiqc_reports.first() } - } else { + } + else { return null } } @@ -226,7 +230,7 @@ def getSingleReport(multiqc_reports) { // // Construct and send completion email // -def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdir, monochrome_logs=true, multiqc_report=null) { +def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdir, monochrome_logs = true, multiqc_report = null) { // Set up the e-mail variables def subject = "[${workflow.manifest.name}] Successful: ${workflow.runName}" @@ -243,35 +247,35 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi } def misc_fields = [:] - misc_fields['Date Started'] = workflow.start - misc_fields['Date Completed'] = workflow.complete + misc_fields['Date Started'] = workflow.start + misc_fields['Date Completed'] = workflow.complete misc_fields['Pipeline script file path'] = workflow.scriptFile - misc_fields['Pipeline script hash ID'] = workflow.scriptId + misc_fields['Pipeline script hash ID'] = workflow.scriptId if (workflow.repository) { - misc_fields['Pipeline repository Git URL'] = workflow.repository + misc_fields['Pipeline repository Git URL'] = workflow.repository } if (workflow.commitId) { misc_fields['Pipeline repository Git Commit'] = workflow.commitId } if (workflow.revision) { - misc_fields['Pipeline Git branch/tag'] = workflow.revision + misc_fields['Pipeline Git branch/tag'] = workflow.revision } - misc_fields['Nextflow Version'] = workflow.nextflow.version - misc_fields['Nextflow Build'] = workflow.nextflow.build + misc_fields['Nextflow Version'] = workflow.nextflow.version + misc_fields['Nextflow Build'] = workflow.nextflow.build misc_fields['Nextflow Compile Timestamp'] = workflow.nextflow.timestamp def email_fields = [:] - email_fields['version'] = getWorkflowVersion() - email_fields['runName'] = workflow.runName - email_fields['success'] = workflow.success + email_fields['version'] = getWorkflowVersion() + email_fields['runName'] = workflow.runName + email_fields['success'] = workflow.success email_fields['dateComplete'] = workflow.complete - email_fields['duration'] = workflow.duration - email_fields['exitStatus'] = workflow.exitStatus + email_fields['duration'] = workflow.duration + email_fields['exitStatus'] = workflow.exitStatus email_fields['errorMessage'] = (workflow.errorMessage ?: 'None') - email_fields['errorReport'] = (workflow.errorReport ?: 'None') - email_fields['commandLine'] = workflow.commandLine - email_fields['projectDir'] = workflow.projectDir - email_fields['summary'] = summary << misc_fields + email_fields['errorReport'] = (workflow.errorReport ?: 'None') + email_fields['commandLine'] = workflow.commandLine + email_fields['projectDir'] = workflow.projectDir + email_fields['summary'] = summary << misc_fields // On success try attach the multiqc report def mqc_report = getSingleReport(multiqc_report) @@ -283,22 +287,22 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi } // Render the TXT template - def engine = new groovy.text.GStringTemplateEngine() - def tf = new File("${workflow.projectDir}/assets/email_template.txt") + def engine = new groovy.text.GStringTemplateEngine() + def tf = new File("${workflow.projectDir}/assets/email_template.txt") def txt_template = engine.createTemplate(tf).make(email_fields) - def email_txt = txt_template.toString() + def email_txt = txt_template.toString() // Render the HTML template - def hf = new File("${workflow.projectDir}/assets/email_template.html") + def hf = new File("${workflow.projectDir}/assets/email_template.html") def html_template = engine.createTemplate(hf).make(email_fields) - def email_html = html_template.toString() + def email_html = html_template.toString() // Render the sendmail template def max_multiqc_email_size = (params.containsKey('max_multiqc_email_size') ? params.max_multiqc_email_size : 0) as MemoryUnit - def smail_fields = [email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes()] - def sf = new File("${workflow.projectDir}/assets/sendmail_template.txt") - def sendmail_template = engine.createTemplate(sf).make(smail_fields) - def sendmail_html = sendmail_template.toString() + def smail_fields = [email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes()] + def sf = new File("${workflow.projectDir}/assets/sendmail_template.txt") + def sendmail_template = engine.createTemplate(sf).make(smail_fields) + def sendmail_html = sendmail_template.toString() // Send the HTML e-mail def colors = logColours(monochrome_logs) as Map @@ -313,7 +317,7 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi ['sendmail', '-t'].execute() << sendmail_html log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Sent summary e-mail to ${email_address} (sendmail)-") } - catch (Exception msg) { + catch (msg: Exception) { log.debug(msg.toString()) log.debug("Trying with mail instead of sendmail") // Catch failures and try with plaintext @@ -339,7 +343,7 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi // // Print pipeline summary on completion // -def completionSummary(monochrome_logs=true) { +def completionSummary(monochrome_logs = true) { def colors = logColours(monochrome_logs) as Map if (workflow.success) { if (workflow.stats.ignoredCount == 0) { @@ -367,44 +371,44 @@ def imNotification(summary_params, hook_url) { } def misc_fields = [:] - misc_fields['start'] = workflow.start - misc_fields['complete'] = workflow.complete - misc_fields['scriptfile'] = workflow.scriptFile - misc_fields['scriptid'] = workflow.scriptId + misc_fields['start'] = workflow.start + misc_fields['complete'] = workflow.complete + misc_fields['scriptfile'] = workflow.scriptFile + misc_fields['scriptid'] = workflow.scriptId if (workflow.repository) { misc_fields['repository'] = workflow.repository } if (workflow.commitId) { - misc_fields['commitid'] = workflow.commitId + misc_fields['commitid'] = workflow.commitId } if (workflow.revision) { - misc_fields['revision'] = workflow.revision + misc_fields['revision'] = workflow.revision } - misc_fields['nxf_version'] = workflow.nextflow.version - misc_fields['nxf_build'] = workflow.nextflow.build - misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp + misc_fields['nxf_version'] = workflow.nextflow.version + misc_fields['nxf_build'] = workflow.nextflow.build + misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp def msg_fields = [:] - msg_fields['version'] = getWorkflowVersion() - msg_fields['runName'] = workflow.runName - msg_fields['success'] = workflow.success + msg_fields['version'] = getWorkflowVersion() + msg_fields['runName'] = workflow.runName + msg_fields['success'] = workflow.success msg_fields['dateComplete'] = workflow.complete - msg_fields['duration'] = workflow.duration - msg_fields['exitStatus'] = workflow.exitStatus + msg_fields['duration'] = workflow.duration + msg_fields['exitStatus'] = workflow.exitStatus msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None') - msg_fields['errorReport'] = (workflow.errorReport ?: 'None') - msg_fields['commandLine'] = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "") - msg_fields['projectDir'] = workflow.projectDir - msg_fields['summary'] = summary << misc_fields + msg_fields['errorReport'] = (workflow.errorReport ?: 'None') + msg_fields['commandLine'] = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "") + msg_fields['projectDir'] = workflow.projectDir + msg_fields['summary'] = summary << misc_fields // Render the JSON template - def engine = new groovy.text.GStringTemplateEngine() + def engine = new groovy.text.GStringTemplateEngine() // Different JSON depending on the service provider // Defaults to "Adaptive Cards" (https://adaptivecards.io), except Slack which has its own format - def json_path = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json" - def hf = new File("${workflow.projectDir}/assets/${json_path}") + def json_path = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json" + def hf = new File("${workflow.projectDir}/assets/${json_path}") def json_template = engine.createTemplate(hf).make(msg_fields) - def json_message = json_template.toString() + def json_message = json_template.toString() // POST def post = new URL(hook_url).openConnection() diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config index d0a926bf..a09572e5 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config @@ -3,7 +3,7 @@ manifest { author = """nf-core""" homePage = 'https://127.0.0.1' description = """Dummy pipeline""" - nextflowVersion = '!>=23.04.0' + nextflowVersion = '!>=23.04.0' version = '9.9.9' doi = 'https://doi.org/10.5281/zenodo.5070524' } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf index 1df8b76f..e2821afd 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/main.nf +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -7,25 +7,20 @@ include { validateParameters } from 'plugin/nf-schema' include { paramsHelp } from 'plugin/nf-schema' workflow UTILS_NFSCHEMA_PLUGIN { - take: - input_workflow // workflow: the workflow object used by nf-schema to get metadata from the workflow - validate_params // boolean: validate the parameters - parameters_schema // string: path to the parameters JSON schema. - // this has to be the same as the schema given to `validation.parametersSchema` - // when this input is empty it will automatically use the configured schema or - // "${projectDir}/nextflow_schema.json" as default. This input should not be empty - // for meta pipelines - help // boolean: show help message - help_full // boolean: show full help message - show_hidden // boolean: show hidden parameters in help message - before_text // string: text to show before the help message and parameters summary - after_text // string: text to show after the help message and parameters summary - command // string: an example command of the pipeline + input_workflow // workflow: the workflow object used by nf-schema to get metadata from the workflow + validate_params // boolean: validate the parameters + parameters_schema // string: path to the parameters JSON schema. + help // boolean: show help message + help_full // boolean: show full help message + show_hidden // boolean: show hidden parameters in help message + before_text // string: text to show before the help message and parameters summary + after_text // string: text to show after the help message and parameters summary + command // string: an example command of the pipeline main: - if(help || help_full) { + if (help || help_full) { help_options = [ beforeText: before_text, afterText: after_text, @@ -33,14 +28,16 @@ workflow UTILS_NFSCHEMA_PLUGIN { showHidden: show_hidden, fullHelp: help_full, ] - if(parameters_schema) { + if (parameters_schema) { help_options << [parametersSchema: parameters_schema] } - log.info paramsHelp( - help_options, - (params.help instanceof String && params.help != "true") ? params.help : "", + log.info( + paramsHelp( + help_options, + params.help instanceof String && params.help != "true" ? params.help : "", + ) ) - exit 0 + exit(0) } // @@ -49,20 +46,20 @@ workflow UTILS_NFSCHEMA_PLUGIN { // summary_options = [:] - if(parameters_schema) { + if (parameters_schema) { summary_options << [parametersSchema: parameters_schema] } - log.info before_text - log.info paramsSummaryLog(summary_options, input_workflow) - log.info after_text + log.info(before_text) + log.info(paramsSummaryLog(summary_options, input_workflow)) + log.info(after_text) // // Validate the parameters using nextflow_schema.json or the schema // given via the validation.parametersSchema configuration option // - if(validate_params) { + if (validate_params) { validateOptions = [:] - if(parameters_schema) { + if (parameters_schema) { validateOptions << [parametersSchema: parameters_schema] } validateParameters(validateOptions) diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config index f6537cc3..c8ce8606 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -4,5 +4,5 @@ plugins { validation { parametersSchema = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" - monochromeLogs = true + monochromeLogs = true } diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 274c2013..034397f4 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -55,7 +55,7 @@ workflow PREPROCESSING { } .set { ch_inputs_from_samplesheet } // construct a value channel containing an array of files, because the coverage subworkflow expects a channel of arrays of genelist files (to allow for multiple genelist files per sample) - ch_genelists = genelists ? channel.fromPath(genelists + "/*.bed").collect().map { files -> [ files ] } : channel.empty() + ch_genelists = genelists ? channel.fromPath(genelists + "/*.bed").collect().map { files -> [files] } : channel.empty() /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -251,7 +251,7 @@ workflow PREPROCESSING { ) ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TO_CRAM.out.sormadup_metrics) -/* + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // STEP: COVERAGE ANALYSIS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -272,7 +272,7 @@ workflow PREPROCESSING { } .set { ch_cram_crai_fasta_fai_roi } - COVERAGE(ch_cram_crai_fasta_fai_roi, genelists) + COVERAGE(ch_cram_crai_fasta_fai_roi, ch_genelists) ch_multiqc_files = ch_multiqc_files.mix( COVERAGE.out.mosdepth_summary, COVERAGE.out.mosdepth_global, From 53d72df3491fba9d9aa385c5aaf585f0c3121e00 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:06:55 +0100 Subject: [PATCH 192/202] nf-core linting --- modules.json | 4 +- modules/nf-core/bclconvert/bclconvert.diff | 25 --- modules/nf-core/bclconvert/main.nf | 4 +- modules/nf-core/samtools/coverage/meta.yml | 5 - .../samtools/coverage/samtools-coverage.diff | 5 +- .../samtools/coverage/tests/main.nf.test | 86 +++----- .../samtools/coverage/tests/main.nf.test.snap | 56 +---- nextflow.config | 13 +- subworkflows/local/coverage/main.nf | 2 +- subworkflows/nf-core/bcl_demultiplex/main.nf | 141 +++++++------ .../bcl_demultiplex/tests/nextflow.config | 13 +- .../nf-core/utils_nextflow_pipeline/main.nf | 22 +- .../nf-core/utils_nfcore_pipeline/main.nf | 198 +++++++++--------- .../tests/nextflow.config | 2 +- .../nf-core/utils_nfschema_plugin/main.nf | 49 +++-- .../tests/nextflow.config | 2 +- 16 files changed, 268 insertions(+), 359 deletions(-) delete mode 100644 modules/nf-core/bclconvert/bclconvert.diff diff --git a/modules.json b/modules.json index a75b44bf..3b6b2674 100644 --- a/modules.json +++ b/modules.json @@ -13,7 +13,7 @@ "bclconvert": { "branch": "master", "git_sha": "051e7c60dbdcc5d96ce7814c31426ce776f5319b", - "installed_by": ["bcl_demultiplex", "modules"], + "installed_by": ["bcl_demultiplex"], "patch": "modules/nf-core/bclconvert/bclconvert.diff" }, "biobambam/bamsormadup": { @@ -104,7 +104,7 @@ }, "samtools/coverage": { "branch": "master", - "git_sha": "4154ced8a82f5f17b57e48c68dbb03ecb0e9ca14", + "git_sha": "b2e78932ef01165fd85829513eaca29eff8e640a", "installed_by": ["modules"], "patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff" }, diff --git a/modules/nf-core/bclconvert/bclconvert.diff b/modules/nf-core/bclconvert/bclconvert.diff deleted file mode 100644 index dc0dee2d..00000000 --- a/modules/nf-core/bclconvert/bclconvert.diff +++ /dev/null @@ -1,25 +0,0 @@ -Changes in component 'nf-core/bclconvert' -'modules/nf-core/bclconvert/LICENSE' is unchanged -'modules/nf-core/bclconvert/Dockerfile' is unchanged -'modules/nf-core/bclconvert/README.md' is unchanged -'modules/nf-core/bclconvert/.gitignore' is unchanged -'modules/nf-core/bclconvert/meta.yml' is unchanged -Changes in 'bclconvert/main.nf': ---- modules/nf-core/bclconvert/main.nf -+++ modules/nf-core/bclconvert/main.nf -@@ -12,8 +12,8 @@ - tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , emit: fastq_idx , optional:true - tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined , optional:true - tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional:true -- tuple val(meta), path("output/Reports") , emit: reports -- tuple val(meta), path("output/Logs") , emit: logs -+ tuple val(meta), path("output/Reports/*") , emit: reports -+ tuple val(meta), path("output/Logs/*") , emit: logs - tuple val(meta), path("output/InterOp/*.bin") , emit: interop , optional:true - path("versions.yml") , emit: versions - - -'modules/nf-core/bclconvert/tests/main.nf.test.snap' is unchanged -'modules/nf-core/bclconvert/tests/nextflow.config' is unchanged -'modules/nf-core/bclconvert/tests/main.nf.test' is unchanged -************************************************************ diff --git a/modules/nf-core/bclconvert/main.nf b/modules/nf-core/bclconvert/main.nf index db0dac03..f1caafc3 100644 --- a/modules/nf-core/bclconvert/main.nf +++ b/modules/nf-core/bclconvert/main.nf @@ -12,8 +12,8 @@ process BCLCONVERT { tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , emit: fastq_idx , optional:true tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined , optional:true tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional:true - tuple val(meta), path("output/Reports/*") , emit: reports - tuple val(meta), path("output/Logs/*") , emit: logs + tuple val(meta), path("output/Reports") , emit: reports + tuple val(meta), path("output/Logs") , emit: logs tuple val(meta), path("output/InterOp/*.bin") , emit: interop , optional:true path("versions.yml") , emit: versions diff --git a/modules/nf-core/samtools/coverage/meta.yml b/modules/nf-core/samtools/coverage/meta.yml index 754f5f49..b2262177 100644 --- a/modules/nf-core/samtools/coverage/meta.yml +++ b/modules/nf-core/samtools/coverage/meta.yml @@ -41,11 +41,6 @@ input: description: Reference genome file pattern: "*.{fa,fasta}" ontologies: [] - - - meta3: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - fai: type: file description: Reference genome index file diff --git a/modules/nf-core/samtools/coverage/samtools-coverage.diff b/modules/nf-core/samtools/coverage/samtools-coverage.diff index 5dbbbd9e..fe18381a 100644 --- a/modules/nf-core/samtools/coverage/samtools-coverage.diff +++ b/modules/nf-core/samtools/coverage/samtools-coverage.diff @@ -4,13 +4,12 @@ Changes in component 'nf-core/samtools/coverage' Changes in 'samtools/coverage/main.nf': --- modules/nf-core/samtools/coverage/main.nf +++ modules/nf-core/samtools/coverage/main.nf -@@ -8,9 +8,7 @@ +@@ -8,8 +8,7 @@ 'biocontainers/samtools:1.22.1--h96c455f_0' }" input: - tuple val(meta), path(input), path(input_index) -- tuple val(meta2), path(fasta) -- tuple val(meta3), path(fai) +- tuple val(meta2), path(fasta), path(fai) + tuple val(meta), path(input), path(input_index), path(fasta), path(fai) output: diff --git a/modules/nf-core/samtools/coverage/tests/main.nf.test b/modules/nf-core/samtools/coverage/tests/main.nf.test index ffd36109..c59ba4f8 100644 --- a/modules/nf-core/samtools/coverage/tests/main.nf.test +++ b/modules/nf-core/samtools/coverage/tests/main.nf.test @@ -14,19 +14,12 @@ nextflow_process { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [:], // meta map - [] - ]) - input[2] = Channel.of([ - [:], // meta map - [] - ]) + ] + input[1] = [[], [], []] """ } } @@ -34,7 +27,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } } @@ -44,19 +37,16 @@ nextflow_process { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) - ]) - input[2] = Channel.of([ - [ id:'fai' ], // meta map + ] + input[1] = [ + [ id:'fasta_fai' ], + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) - ]) + ] """ } } @@ -73,19 +63,15 @@ nextflow_process { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [:], // meta map - [] - ]) - input[2] = Channel.of([ - [ id:'fai' ], // meta map + ] + input[1] = [ + [ id:'fai' ], [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) - ]) + ] """ } } @@ -102,19 +88,16 @@ nextflow_process { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) - input[2] = Channel.of([ - [:], // meta map + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), [] - ]) + ] """ } } @@ -135,19 +118,16 @@ nextflow_process { when { process { """ - input[0] = Channel.of([ - [id: 'test', single_end: false], // meta map + input[0] = [ + [id: 'test'], file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true) - ]) - input[1] = Channel.of([ - [ id:'fasta' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ]) - input[2] = Channel.of([ - [ id:'fai' ], // meta map + ] + input[1] = [ + [ id:'fasta' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) - ]) + ] """ } } @@ -155,7 +135,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out).match() } + { assert snapshot(sanitizeOutput(process.out)).match() } ) } diff --git a/modules/nf-core/samtools/coverage/tests/main.nf.test.snap b/modules/nf-core/samtools/coverage/tests/main.nf.test.snap index 2069c8c1..256c6507 100644 --- a/modules/nf-core/samtools/coverage/tests/main.nf.test.snap +++ b/modules/nf-core/samtools/coverage/tests/main.nf.test.snap @@ -2,27 +2,10 @@ "test_samtools_coverage_stub": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.txt:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - [ - "SAMTOOLS_COVERAGE", - "samtools", - "1.22.1" - ] - ], "coverage": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.txt:md5,d41d8cd98f00b204e9800998ecf8427e" ] @@ -38,34 +21,17 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.3" }, - "timestamp": "2026-01-22T10:43:34.392105918" + "timestamp": "2026-02-10T15:27:27.16473081" }, "test_samtools_coverage_bam": { "content": [ { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.txt:md5,99a521b3bf53b6acf8055a44a571ea84" - ] - ], - "1": [ - [ - "SAMTOOLS_COVERAGE", - "samtools", - "1.22.1" - ] - ], "coverage": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.txt:md5,99a521b3bf53b6acf8055a44a571ea84" ] @@ -81,9 +47,9 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.3" }, - "timestamp": "2026-01-22T10:43:08.216921812" + "timestamp": "2026-02-10T15:27:06.759689511" }, "test_samtools_coverage_cram": { "content": [ @@ -91,8 +57,7 @@ "0": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.txt:md5,ce896534bac51cfcc97e5508ae907e99" ] @@ -107,8 +72,7 @@ "coverage": [ [ { - "id": "test", - "single_end": false + "id": "test" }, "test.txt:md5,ce896534bac51cfcc97e5508ae907e99" ] @@ -124,8 +88,8 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.3" }, - "timestamp": "2026-01-22T10:43:15.389524183" + "timestamp": "2026-02-10T15:27:12.949845604" } } \ No newline at end of file diff --git a/nextflow.config b/nextflow.config index 13067b73..d3896216 100644 --- a/nextflow.config +++ b/nextflow.config @@ -47,20 +47,11 @@ params { config_profile_name = null config_profile_description = null - custom_config_version = 'master' - custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}" + custom_config_version = 'main' + custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.custom_config_version}" config_profile_contact = null config_profile_url = null - // CMGG Config options - cmgg_config_profile_name = null - cmgg_config_profile_description = null - - cmgg_custom_config_version = 'main' - cmgg_custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.cmgg_custom_config_version}" - cmgg_config_profile_contact = null - cmgg_config_profile_url = null - // Schema validation default options validate_params = true } diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index ca70e40a..82d6cb30 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -28,7 +28,7 @@ workflow COVERAGE { ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) PANELCOVERAGE( - MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).view().map { meta, bed, index, genelists -> + MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).map { meta, bed, index, genelists -> // Because groovy typing sucks ass; apparently an array of 1 is automatically converted to a string... if (genelists !instanceof List) { genelists = [genelists] diff --git a/subworkflows/nf-core/bcl_demultiplex/main.nf b/subworkflows/nf-core/bcl_demultiplex/main.nf index fefa3af3..bfe1ae83 100644 --- a/subworkflows/nf-core/bcl_demultiplex/main.nf +++ b/subworkflows/nf-core/bcl_demultiplex/main.nf @@ -9,64 +9,66 @@ include { BCL2FASTQ } from "../../../modules/nf-core/bcl2fastq/main" workflow BCL_DEMULTIPLEX { take: - ch_flowcell // [[id:"", lane:""], samplesheet.csv, path/to/bcl/files] - demultiplexer // bclconvert or bcl2fastq + ch_flowcell // [[id:"", lane:""], samplesheet.csv, path/to/bcl/files] + demultiplexer // bclconvert or bcl2fastq main: - ch_versions = channel.empty() - ch_fastq = channel.empty() - ch_reports = channel.empty() - ch_stats = channel.empty() - ch_interop = channel.empty() - ch_logs = channel.empty() + ch_versions = channel.empty() + ch_fastq = channel.empty() + ch_reports = channel.empty() + ch_stats = channel.empty() + ch_interop = channel.empty() + ch_logs = channel.empty() - // Split flowcells into separate channels containing run as tar and run as path - // https://nextflow.slack.com/archives/C02T98A23U7/p1650963988498929 - ch_flowcell - .branch { _meta, _samplesheet, run -> - tar: run.toString().endsWith(".tar.gz") - dir: true - } - .set { ch_flowcells } + // Split flowcells into separate channels containing run as tar and run as path + // https://nextflow.slack.com/archives/C02T98A23U7/p1650963988498929 + ch_flowcell + .branch { _meta, _samplesheet, run -> + tar: run.toString().endsWith(".tar.gz") + dir: true + }.set { ch_flowcells } - ch_flowcells.tar - .multiMap { meta, samplesheet, run -> - samplesheets: [meta, samplesheet] - run_dirs: [meta, run] - } - .set { ch_flowcells_tar } + ch_flowcells.tar + .multiMap { meta, samplesheet, run -> + samplesheets: [ meta, samplesheet ] + run_dirs: [ meta, run ] + }.set { ch_flowcells_tar } - // Runs when run_dir is a tar archive - // Re-join the metadata and the untarred run directory with the samplesheet - ch_flowcells_tar_merged = ch_flowcells_tar.samplesheets.join(ch_flowcells_tar.run_dirs) + // Runs when run_dir is a tar archive + // Re-join the metadata and the untarred run directory with the samplesheet + ch_flowcells_tar_merged = ch_flowcells_tar + .samplesheets + .join( ch_flowcells_tar.run_dirs ) - // Merge the two channels back together - ch_flowcells = ch_flowcells.dir.mix(ch_flowcells_tar_merged) + // Merge the two channels back together + ch_flowcells = ch_flowcells.dir.mix(ch_flowcells_tar_merged) - // MODULE: bclconvert - // Demultiplex the bcl files - if (demultiplexer == "bclconvert") { - BCLCONVERT(ch_flowcells) - ch_fastq = ch_fastq.mix(BCLCONVERT.out.fastq) - ch_interop = ch_interop.mix(BCLCONVERT.out.interop) - ch_reports = ch_reports.mix(BCLCONVERT.out.reports) - ch_logs = ch_logs.mix(BCLCONVERT.out.logs) - ch_versions = ch_versions.mix(BCLCONVERT.out.versions.first()) - } + // MODULE: bclconvert + // Demultiplex the bcl files + if (demultiplexer == "bclconvert") { + BCLCONVERT( ch_flowcells ) + ch_fastq = ch_fastq.mix(BCLCONVERT.out.fastq) + ch_interop = ch_interop.mix(BCLCONVERT.out.interop) + ch_reports = ch_reports.mix(BCLCONVERT.out.reports) + ch_logs = ch_logs.mix(BCLCONVERT.out.logs) + ch_versions = ch_versions.mix(BCLCONVERT.out.versions.first()) + } - // MODULE: bcl2fastq - // Demultiplex the bcl files - if (demultiplexer == "bcl2fastq") { - BCL2FASTQ(ch_flowcells) - ch_fastq = ch_fastq.mix(BCL2FASTQ.out.fastq) - ch_interop = ch_interop.mix(BCL2FASTQ.out.interop) - ch_reports = ch_reports.mix(BCL2FASTQ.out.reports) - ch_stats = ch_stats.mix(BCL2FASTQ.out.stats) - ch_versions = ch_versions.mix(BCL2FASTQ.out.versions.first()) - } + // MODULE: bcl2fastq + // Demultiplex the bcl files + if (demultiplexer == "bcl2fastq") { + BCL2FASTQ( ch_flowcells ) + ch_fastq = ch_fastq.mix(BCL2FASTQ.out.fastq) + ch_interop = ch_interop.mix(BCL2FASTQ.out.interop) + ch_reports = ch_reports.mix(BCL2FASTQ.out.reports) + ch_stats = ch_stats.mix(BCL2FASTQ.out.stats) + ch_versions = ch_versions.mix(BCL2FASTQ.out.versions.first()) + } - // Generate meta for each fastq - ch_fastq + // Generate meta for each fastq + ch_fastq + // reshapes the channel from a single emit of [meta, [fastq, fastq, fastq...]] + // to emits per fastq file like [meta, fastq] .transpose() .map { fc_meta, fastq -> def meta = [:] @@ -84,7 +86,7 @@ workflow BCL_DEMULTIPLEX { line = buffered.readLine() buffered.close() } - if (line != null && line.startsWith('@')) { + if ( line != null && line.startsWith('@') ) { line = line.substring(1) // expected format is like: // xx:yy:FLOWCELLID:LANE:... (seven fields) @@ -93,40 +95,45 @@ workflow BCL_DEMULTIPLEX { // "@::::::: :::" //def sequencer_serial = fields[0] //def run_nubmer = fields[1] - def fcid = fields[2] - def lane = fields[3] - def index = fields[-1] =~ /[GATC+-]/ ? fields[-1] : "" + def fcid = fields[2] + def lane = fields[3] + def index = fields[-1] =~ /[GATC+-]/ ? fields[-1] : "" def ID = [fcid, lane].join(".") def PU = [fcid, lane, index].findAll().join(".") def PL = "ILLUMINA" def SM = fastq.getSimpleName().toString() - ~/_S[0-9]+.*$/ - meta.readgroup = ["ID": ID, "SM": SM, "PL": PL, "PU": PU] + meta.readgroup = [ + "ID": ID, + "SM": SM, + "PL": PL, + "PU": PU + ] meta.empty = false - } - else { - println("No reads were found in FASTQ file: ${fastq}") + } else { + println "No reads were found in FASTQ file: ${fastq}" meta.readgroup = [:] meta.empty = true } return [meta, fastq] } + // Group by the meta id so that we can find mate pairs if they exist .groupTuple(by: [0]) .map { meta, fastq -> meta.single_end = fastq.size() == 1 return [meta, fastq.flatten()] } .branch { meta, _fastq -> - fastq: meta.empty == false - empty_fastq: meta.empty == true + fastq : meta.empty == false + empty_fastq : meta.empty == true } - .set { ch_fastq_with_meta } + .set{ch_fastq_with_meta} emit: - fastq = ch_fastq_with_meta.fastq - empty_fastq = ch_fastq_with_meta.empty_fastq - reports = ch_reports - stats = ch_stats - interop = ch_interop - logs = ch_logs - versions = ch_versions + fastq = ch_fastq_with_meta.fastq + empty_fastq = ch_fastq_with_meta.empty_fastq + reports = ch_reports + stats = ch_stats + interop = ch_interop + logs = ch_logs + versions = ch_versions } diff --git a/subworkflows/nf-core/bcl_demultiplex/tests/nextflow.config b/subworkflows/nf-core/bcl_demultiplex/tests/nextflow.config index 555a2ec7..dd8bfa2a 100644 --- a/subworkflows/nf-core/bcl_demultiplex/tests/nextflow.config +++ b/subworkflows/nf-core/bcl_demultiplex/tests/nextflow.config @@ -1,12 +1,13 @@ process { withName: BCLCONVERT { - ext.args = { - [meta.lane ? "--bcl-only-lane ${meta.lane}" : "", "--force"].join(" ").trim() - } + ext.args = {[ + meta.lane ? "--bcl-only-lane ${meta.lane}" : "", + "--force" + ].join(" ").trim()} } withName: BCL2FASTQ { - ext.args = { - ["--tiles s_1_1101"].join(" ").trim() - } + ext.args = {[ + "--tiles s_1_1101" + ].join(" ").trim()} } } diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index 7049caef..d6e593e8 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -10,9 +10,9 @@ workflow UTILS_NEXTFLOW_PIPELINE { take: - print_version // boolean: print version - dump_parameters // boolean: dump parameters - outdir // path: base directory used to publish pipeline results + print_version // boolean: print version + dump_parameters // boolean: dump parameters + outdir // path: base directory used to publish pipeline results check_conda_channels // boolean: check conda channels main: @@ -72,10 +72,10 @@ def getWorkflowVersion() { // def dumpParametersToJSON(outdir) { def timestamp = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') - def filename = "params_${timestamp}.json" - def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") - def jsonStr = groovy.json.JsonOutput.toJson(params) - temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) + def filename = "params_${timestamp}.json" + def temp_pf = new File(workflow.launchDir.toString(), ".${filename}") + def jsonStr = groovy.json.JsonOutput.toJson(params) + temp_pf.text = groovy.json.JsonOutput.prettyPrint(jsonStr) nextflow.extension.FilesEx.copyTo(temp_pf.toPath(), "${outdir}/pipeline_info/params_${timestamp}.json") temp_pf.delete() @@ -91,12 +91,12 @@ def checkCondaChannels() { def config = parser.load("conda config --show channels".execute().text) channels = config.channels } - catch (e: NullPointerException) { + catch (NullPointerException e) { log.debug(e) log.warn("Could not verify conda channel configuration.") return null } - catch (e: IOException) { + catch (IOException e) { log.debug(e) log.warn("Could not verify conda channel configuration.") return null @@ -111,8 +111,7 @@ def checkCondaChannels() { def channel_priority_violation = required_channels_in_order != channels.findAll { ch -> ch in required_channels_in_order } if (channels_missing | channel_priority_violation) { - log.warn( - """\ + log.warn """\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There is a problem with your Conda configuration! You will need to set-up the conda-forge and bioconda channels correctly. @@ -123,6 +122,5 @@ def checkCondaChannels() { ${required_channels_in_order} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" """.stripIndent(true) - ) } } diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index cf586322..2f30e9a4 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -125,12 +125,12 @@ def paramsSummaryMultiqc(summary_params) { } def yaml_file_text = "id: '${workflow.manifest.name.replace('/', '-')}-summary'\n" as String - yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" - yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" - yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" - yaml_file_text += "plot_type: 'html'\n" - yaml_file_text += "data: |\n" - yaml_file_text += "${summary_section}" + yaml_file_text += "description: ' - this information is collected when the pipeline is started.'\n" + yaml_file_text += "section_name: '${workflow.manifest.name} Workflow Summary'\n" + yaml_file_text += "section_href: 'https://github.com/${workflow.manifest.name}'\n" + yaml_file_text += "plot_type: 'html'\n" + yaml_file_text += "data: |\n" + yaml_file_text += "${summary_section}" return yaml_file_text } @@ -138,67 +138,67 @@ def paramsSummaryMultiqc(summary_params) { // // ANSII colours used for terminal logging // -def logColours(monochrome_logs = true) { +def logColours(monochrome_logs=true) { def colorcodes = [:] as Map // Reset / Meta - colorcodes['reset'] = monochrome_logs ? '' : "\033[0m" - colorcodes['bold'] = monochrome_logs ? '' : "\033[1m" - colorcodes['dim'] = monochrome_logs ? '' : "\033[2m" + colorcodes['reset'] = monochrome_logs ? '' : "\033[0m" + colorcodes['bold'] = monochrome_logs ? '' : "\033[1m" + colorcodes['dim'] = monochrome_logs ? '' : "\033[2m" colorcodes['underlined'] = monochrome_logs ? '' : "\033[4m" - colorcodes['blink'] = monochrome_logs ? '' : "\033[5m" - colorcodes['reverse'] = monochrome_logs ? '' : "\033[7m" - colorcodes['hidden'] = monochrome_logs ? '' : "\033[8m" + colorcodes['blink'] = monochrome_logs ? '' : "\033[5m" + colorcodes['reverse'] = monochrome_logs ? '' : "\033[7m" + colorcodes['hidden'] = monochrome_logs ? '' : "\033[8m" // Regular Colors - colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" - colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" - colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" + colorcodes['black'] = monochrome_logs ? '' : "\033[0;30m" + colorcodes['red'] = monochrome_logs ? '' : "\033[0;31m" + colorcodes['green'] = monochrome_logs ? '' : "\033[0;32m" colorcodes['yellow'] = monochrome_logs ? '' : "\033[0;33m" - colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" + colorcodes['blue'] = monochrome_logs ? '' : "\033[0;34m" colorcodes['purple'] = monochrome_logs ? '' : "\033[0;35m" - colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" - colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" + colorcodes['cyan'] = monochrome_logs ? '' : "\033[0;36m" + colorcodes['white'] = monochrome_logs ? '' : "\033[0;37m" // Bold - colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" - colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" - colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" + colorcodes['bblack'] = monochrome_logs ? '' : "\033[1;30m" + colorcodes['bred'] = monochrome_logs ? '' : "\033[1;31m" + colorcodes['bgreen'] = monochrome_logs ? '' : "\033[1;32m" colorcodes['byellow'] = monochrome_logs ? '' : "\033[1;33m" - colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" + colorcodes['bblue'] = monochrome_logs ? '' : "\033[1;34m" colorcodes['bpurple'] = monochrome_logs ? '' : "\033[1;35m" - colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" - colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" + colorcodes['bcyan'] = monochrome_logs ? '' : "\033[1;36m" + colorcodes['bwhite'] = monochrome_logs ? '' : "\033[1;37m" // Underline - colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" - colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" - colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" + colorcodes['ublack'] = monochrome_logs ? '' : "\033[4;30m" + colorcodes['ured'] = monochrome_logs ? '' : "\033[4;31m" + colorcodes['ugreen'] = monochrome_logs ? '' : "\033[4;32m" colorcodes['uyellow'] = monochrome_logs ? '' : "\033[4;33m" - colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" + colorcodes['ublue'] = monochrome_logs ? '' : "\033[4;34m" colorcodes['upurple'] = monochrome_logs ? '' : "\033[4;35m" - colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" - colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" + colorcodes['ucyan'] = monochrome_logs ? '' : "\033[4;36m" + colorcodes['uwhite'] = monochrome_logs ? '' : "\033[4;37m" // High Intensity - colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" - colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" - colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" + colorcodes['iblack'] = monochrome_logs ? '' : "\033[0;90m" + colorcodes['ired'] = monochrome_logs ? '' : "\033[0;91m" + colorcodes['igreen'] = monochrome_logs ? '' : "\033[0;92m" colorcodes['iyellow'] = monochrome_logs ? '' : "\033[0;93m" - colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" + colorcodes['iblue'] = monochrome_logs ? '' : "\033[0;94m" colorcodes['ipurple'] = monochrome_logs ? '' : "\033[0;95m" - colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" - colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" + colorcodes['icyan'] = monochrome_logs ? '' : "\033[0;96m" + colorcodes['iwhite'] = monochrome_logs ? '' : "\033[0;97m" // Bold High Intensity - colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" - colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" - colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" + colorcodes['biblack'] = monochrome_logs ? '' : "\033[1;90m" + colorcodes['bired'] = monochrome_logs ? '' : "\033[1;91m" + colorcodes['bigreen'] = monochrome_logs ? '' : "\033[1;92m" colorcodes['biyellow'] = monochrome_logs ? '' : "\033[1;93m" - colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" + colorcodes['biblue'] = monochrome_logs ? '' : "\033[1;94m" colorcodes['bipurple'] = monochrome_logs ? '' : "\033[1;95m" - colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" - colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" + colorcodes['bicyan'] = monochrome_logs ? '' : "\033[1;96m" + colorcodes['biwhite'] = monochrome_logs ? '' : "\033[1;97m" return colorcodes } @@ -208,21 +208,17 @@ def logColours(monochrome_logs = true) { def getSingleReport(multiqc_reports) { if (multiqc_reports instanceof Path) { return multiqc_reports - } - else if (multiqc_reports instanceof List) { + } else if (multiqc_reports instanceof List) { if (multiqc_reports.size() == 0) { log.warn("[${workflow.manifest.name}] No reports found from process 'MULTIQC'") return null - } - else if (multiqc_reports.size() == 1) { + } else if (multiqc_reports.size() == 1) { return multiqc_reports.first() - } - else { + } else { log.warn("[${workflow.manifest.name}] Found multiple reports from process 'MULTIQC', will use only one") return multiqc_reports.first() } - } - else { + } else { return null } } @@ -230,7 +226,7 @@ def getSingleReport(multiqc_reports) { // // Construct and send completion email // -def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdir, monochrome_logs = true, multiqc_report = null) { +def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdir, monochrome_logs=true, multiqc_report=null) { // Set up the e-mail variables def subject = "[${workflow.manifest.name}] Successful: ${workflow.runName}" @@ -247,35 +243,35 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi } def misc_fields = [:] - misc_fields['Date Started'] = workflow.start - misc_fields['Date Completed'] = workflow.complete + misc_fields['Date Started'] = workflow.start + misc_fields['Date Completed'] = workflow.complete misc_fields['Pipeline script file path'] = workflow.scriptFile - misc_fields['Pipeline script hash ID'] = workflow.scriptId + misc_fields['Pipeline script hash ID'] = workflow.scriptId if (workflow.repository) { - misc_fields['Pipeline repository Git URL'] = workflow.repository + misc_fields['Pipeline repository Git URL'] = workflow.repository } if (workflow.commitId) { misc_fields['Pipeline repository Git Commit'] = workflow.commitId } if (workflow.revision) { - misc_fields['Pipeline Git branch/tag'] = workflow.revision + misc_fields['Pipeline Git branch/tag'] = workflow.revision } - misc_fields['Nextflow Version'] = workflow.nextflow.version - misc_fields['Nextflow Build'] = workflow.nextflow.build + misc_fields['Nextflow Version'] = workflow.nextflow.version + misc_fields['Nextflow Build'] = workflow.nextflow.build misc_fields['Nextflow Compile Timestamp'] = workflow.nextflow.timestamp def email_fields = [:] - email_fields['version'] = getWorkflowVersion() - email_fields['runName'] = workflow.runName - email_fields['success'] = workflow.success + email_fields['version'] = getWorkflowVersion() + email_fields['runName'] = workflow.runName + email_fields['success'] = workflow.success email_fields['dateComplete'] = workflow.complete - email_fields['duration'] = workflow.duration - email_fields['exitStatus'] = workflow.exitStatus + email_fields['duration'] = workflow.duration + email_fields['exitStatus'] = workflow.exitStatus email_fields['errorMessage'] = (workflow.errorMessage ?: 'None') - email_fields['errorReport'] = (workflow.errorReport ?: 'None') - email_fields['commandLine'] = workflow.commandLine - email_fields['projectDir'] = workflow.projectDir - email_fields['summary'] = summary << misc_fields + email_fields['errorReport'] = (workflow.errorReport ?: 'None') + email_fields['commandLine'] = workflow.commandLine + email_fields['projectDir'] = workflow.projectDir + email_fields['summary'] = summary << misc_fields // On success try attach the multiqc report def mqc_report = getSingleReport(multiqc_report) @@ -287,22 +283,22 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi } // Render the TXT template - def engine = new groovy.text.GStringTemplateEngine() - def tf = new File("${workflow.projectDir}/assets/email_template.txt") + def engine = new groovy.text.GStringTemplateEngine() + def tf = new File("${workflow.projectDir}/assets/email_template.txt") def txt_template = engine.createTemplate(tf).make(email_fields) - def email_txt = txt_template.toString() + def email_txt = txt_template.toString() // Render the HTML template - def hf = new File("${workflow.projectDir}/assets/email_template.html") + def hf = new File("${workflow.projectDir}/assets/email_template.html") def html_template = engine.createTemplate(hf).make(email_fields) - def email_html = html_template.toString() + def email_html = html_template.toString() // Render the sendmail template def max_multiqc_email_size = (params.containsKey('max_multiqc_email_size') ? params.max_multiqc_email_size : 0) as MemoryUnit - def smail_fields = [email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes()] - def sf = new File("${workflow.projectDir}/assets/sendmail_template.txt") - def sendmail_template = engine.createTemplate(sf).make(smail_fields) - def sendmail_html = sendmail_template.toString() + def smail_fields = [email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, projectDir: "${workflow.projectDir}", mqcFile: mqc_report, mqcMaxSize: max_multiqc_email_size.toBytes()] + def sf = new File("${workflow.projectDir}/assets/sendmail_template.txt") + def sendmail_template = engine.createTemplate(sf).make(smail_fields) + def sendmail_html = sendmail_template.toString() // Send the HTML e-mail def colors = logColours(monochrome_logs) as Map @@ -317,7 +313,7 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi ['sendmail', '-t'].execute() << sendmail_html log.info("-${colors.purple}[${workflow.manifest.name}]${colors.green} Sent summary e-mail to ${email_address} (sendmail)-") } - catch (msg: Exception) { + catch (Exception msg) { log.debug(msg.toString()) log.debug("Trying with mail instead of sendmail") // Catch failures and try with plaintext @@ -343,7 +339,7 @@ def completionEmail(summary_params, email, email_on_fail, plaintext_email, outdi // // Print pipeline summary on completion // -def completionSummary(monochrome_logs = true) { +def completionSummary(monochrome_logs=true) { def colors = logColours(monochrome_logs) as Map if (workflow.success) { if (workflow.stats.ignoredCount == 0) { @@ -371,44 +367,44 @@ def imNotification(summary_params, hook_url) { } def misc_fields = [:] - misc_fields['start'] = workflow.start - misc_fields['complete'] = workflow.complete - misc_fields['scriptfile'] = workflow.scriptFile - misc_fields['scriptid'] = workflow.scriptId + misc_fields['start'] = workflow.start + misc_fields['complete'] = workflow.complete + misc_fields['scriptfile'] = workflow.scriptFile + misc_fields['scriptid'] = workflow.scriptId if (workflow.repository) { misc_fields['repository'] = workflow.repository } if (workflow.commitId) { - misc_fields['commitid'] = workflow.commitId + misc_fields['commitid'] = workflow.commitId } if (workflow.revision) { - misc_fields['revision'] = workflow.revision + misc_fields['revision'] = workflow.revision } - misc_fields['nxf_version'] = workflow.nextflow.version - misc_fields['nxf_build'] = workflow.nextflow.build - misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp + misc_fields['nxf_version'] = workflow.nextflow.version + misc_fields['nxf_build'] = workflow.nextflow.build + misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp def msg_fields = [:] - msg_fields['version'] = getWorkflowVersion() - msg_fields['runName'] = workflow.runName - msg_fields['success'] = workflow.success + msg_fields['version'] = getWorkflowVersion() + msg_fields['runName'] = workflow.runName + msg_fields['success'] = workflow.success msg_fields['dateComplete'] = workflow.complete - msg_fields['duration'] = workflow.duration - msg_fields['exitStatus'] = workflow.exitStatus + msg_fields['duration'] = workflow.duration + msg_fields['exitStatus'] = workflow.exitStatus msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None') - msg_fields['errorReport'] = (workflow.errorReport ?: 'None') - msg_fields['commandLine'] = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "") - msg_fields['projectDir'] = workflow.projectDir - msg_fields['summary'] = summary << misc_fields + msg_fields['errorReport'] = (workflow.errorReport ?: 'None') + msg_fields['commandLine'] = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "") + msg_fields['projectDir'] = workflow.projectDir + msg_fields['summary'] = summary << misc_fields // Render the JSON template - def engine = new groovy.text.GStringTemplateEngine() + def engine = new groovy.text.GStringTemplateEngine() // Different JSON depending on the service provider // Defaults to "Adaptive Cards" (https://adaptivecards.io), except Slack which has its own format - def json_path = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json" - def hf = new File("${workflow.projectDir}/assets/${json_path}") + def json_path = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json" + def hf = new File("${workflow.projectDir}/assets/${json_path}") def json_template = engine.createTemplate(hf).make(msg_fields) - def json_message = json_template.toString() + def json_message = json_template.toString() // POST def post = new URL(hook_url).openConnection() diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config index a09572e5..d0a926bf 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config @@ -3,7 +3,7 @@ manifest { author = """nf-core""" homePage = 'https://127.0.0.1' description = """Dummy pipeline""" - nextflowVersion = '!>=23.04.0' + nextflowVersion = '!>=23.04.0' version = '9.9.9' doi = 'https://doi.org/10.5281/zenodo.5070524' } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf index e2821afd..1df8b76f 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/main.nf +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -7,20 +7,25 @@ include { validateParameters } from 'plugin/nf-schema' include { paramsHelp } from 'plugin/nf-schema' workflow UTILS_NFSCHEMA_PLUGIN { + take: - input_workflow // workflow: the workflow object used by nf-schema to get metadata from the workflow - validate_params // boolean: validate the parameters - parameters_schema // string: path to the parameters JSON schema. - help // boolean: show help message - help_full // boolean: show full help message - show_hidden // boolean: show hidden parameters in help message - before_text // string: text to show before the help message and parameters summary - after_text // string: text to show after the help message and parameters summary - command // string: an example command of the pipeline + input_workflow // workflow: the workflow object used by nf-schema to get metadata from the workflow + validate_params // boolean: validate the parameters + parameters_schema // string: path to the parameters JSON schema. + // this has to be the same as the schema given to `validation.parametersSchema` + // when this input is empty it will automatically use the configured schema or + // "${projectDir}/nextflow_schema.json" as default. This input should not be empty + // for meta pipelines + help // boolean: show help message + help_full // boolean: show full help message + show_hidden // boolean: show hidden parameters in help message + before_text // string: text to show before the help message and parameters summary + after_text // string: text to show after the help message and parameters summary + command // string: an example command of the pipeline main: - if (help || help_full) { + if(help || help_full) { help_options = [ beforeText: before_text, afterText: after_text, @@ -28,16 +33,14 @@ workflow UTILS_NFSCHEMA_PLUGIN { showHidden: show_hidden, fullHelp: help_full, ] - if (parameters_schema) { + if(parameters_schema) { help_options << [parametersSchema: parameters_schema] } - log.info( - paramsHelp( - help_options, - params.help instanceof String && params.help != "true" ? params.help : "", - ) + log.info paramsHelp( + help_options, + (params.help instanceof String && params.help != "true") ? params.help : "", ) - exit(0) + exit 0 } // @@ -46,20 +49,20 @@ workflow UTILS_NFSCHEMA_PLUGIN { // summary_options = [:] - if (parameters_schema) { + if(parameters_schema) { summary_options << [parametersSchema: parameters_schema] } - log.info(before_text) - log.info(paramsSummaryLog(summary_options, input_workflow)) - log.info(after_text) + log.info before_text + log.info paramsSummaryLog(summary_options, input_workflow) + log.info after_text // // Validate the parameters using nextflow_schema.json or the schema // given via the validation.parametersSchema configuration option // - if (validate_params) { + if(validate_params) { validateOptions = [:] - if (parameters_schema) { + if(parameters_schema) { validateOptions << [parametersSchema: parameters_schema] } validateParameters(validateOptions) diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config index c8ce8606..f6537cc3 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -4,5 +4,5 @@ plugins { validation { parametersSchema = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" - monochromeLogs = true + monochromeLogs = true } From 58afbd1d2e0ddacc6529487468019cc3bf69726a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:12:58 +0100 Subject: [PATCH 193/202] patch modules --- .../picard-collecthsmetrics.diff | 4 +-- .../picard-collectmultiplemetrics.diff | 27 ++++++++++++++++--- .../picard-collectwgsmetrics.diff | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff b/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff index 1407a35a..f4bf1eda 100644 --- a/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff +++ b/modules/nf-core/picard/collecthsmetrics/picard-collecthsmetrics.diff @@ -56,9 +56,9 @@ Changes in 'picard/collecthsmetrics/main.nf': - + --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics \\ + --TMP_DIR . + """ - cat <<-END_VERSIONS > versions.yml - "${task.process}": + stub: 'modules/nf-core/picard/collecthsmetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collecthsmetrics/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff b/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff index 0a40ffb6..1d7cbf60 100644 --- a/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff +++ b/modules/nf-core/picard/collectmultiplemetrics/picard-collectmultiplemetrics.diff @@ -15,7 +15,17 @@ Changes in 'picard/collectmultiplemetrics/main.nf': output: tuple val(meta), path("*_metrics"), emit: metrics -@@ -31,12 +29,14 @@ +@@ -23,7 +21,8 @@ + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" +- def reference = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" ++ def intervals_cmd = intervals ? "--INTERVALS ${intervals.join(',')}" : "" ++ def reference_cmd = fasta ? "--REFERENCE_SEQUENCE ${fasta}" : "" + def avail_mem = 3072 + if (!task.memory) { + log.info '[Picard CollectMultipleMetrics] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' +@@ -31,14 +30,16 @@ avail_mem = (task.memory.mega*0.8).intValue() } """ @@ -26,10 +36,21 @@ Changes in 'picard/collectmultiplemetrics/main.nf': $args \\ --INPUT $bam \\ --OUTPUT ${prefix}.CollectMultipleMetrics \\ +- $reference +- + --TMP_DIR . \\ - $reference ++ $reference_cmd \\ ++ $intervals_cmd + """ - cat <<-END_VERSIONS > versions.yml + stub: +@@ -54,6 +55,5 @@ + touch ${prefix}.CollectMultipleMetrics.quality_by_cycle.pdf + touch ${prefix}.CollectMultipleMetrics.insert_size_histogram.pdf + touch ${prefix}.CollectMultipleMetrics.quality_distribution_metrics +- + """ + } 'modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collectmultiplemetrics/tests/main.nf.test' is unchanged diff --git a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff index 04fea62a..c7503d9b 100644 --- a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff +++ b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff @@ -30,7 +30,7 @@ Changes in 'picard/collectwgsmetrics/main.nf': + --TMP_DIR . \\ $interval - + """ 'modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap' is unchanged 'modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test' is unchanged From c627fe42115ae55596ac2499be0f76815713b0fa Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:18:17 +0100 Subject: [PATCH 194/202] remove versions --- subworkflows/local/coverage/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 82d6cb30..7df1cf7d 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -25,7 +25,6 @@ workflow COVERAGE { return [meta, cram, crai, fasta, fai] } ) - ch_versions = ch_versions.mix(SAMTOOLS_COVERAGE.out.versions.first()) PANELCOVERAGE( MOSDEPTH.out.per_base_bed.join(MOSDEPTH.out.per_base_csi).combine(ch_genelists).map { meta, bed, index, genelists -> From b875892ca4b325e9a824aa22058f83f2621e54d4 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:46:11 +0100 Subject: [PATCH 195/202] panelcoverage: topic + make parallel --- modules/local/panelcoverage/main.nf | 25 +++----------- .../local/panelcoverage/main.nf.test.snap | 34 +++++++++++++++---- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/modules/local/panelcoverage/main.nf b/modules/local/panelcoverage/main.nf index a731f817..6e29a9c6 100644 --- a/modules/local/panelcoverage/main.nf +++ b/modules/local/panelcoverage/main.nf @@ -1,6 +1,6 @@ process PANELCOVERAGE { tag "${meta.id}" - label 'process_single' + label 'process_medium' conda "${moduleDir}/environment.yml" container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container @@ -12,24 +12,13 @@ process PANELCOVERAGE { output: tuple val(meta), path("*.mosdepth.region.dist.txt"), emit: regiondist - path "versions.yml", emit: versions - - when: - task.ext.when == null || task.ext.when + tuple val("${task.process}"), val('cmgg_genelists'), eval('cmgg_genelists -v 2>&1 | sed \"s/^.*cmgg_genelists version //\"'), emit: versions_cmgg_genelists, topic: versions + tuple val("${task.process}"), val('bedtools'), eval('bedtools --version 2>&1 | sed \"s/^.*bedtools v//\"'), emit: versions_bedtools, topic: versions script: def prefix = task.ext.prefix ?: "${meta.id}" """ - for GENELIST in ${genelists} - do - cmgg_genelists regiondist --samplename ${prefix} --perbase ${perbase} --genelist \$GENELIST - done - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cmgg_genelists: \$(cmgg_genelists -v 2>&1 | sed 's/^.*cmgg_genelists version //') - bedtools: \$(echo \$(bedtools --version 2>&1) | sed 's/^.*bedtools v//' )) - END_VERSIONS + echo ${genelists} | tr ' ' '\n' | xargs -n 1 -P ${task.cpus} -I {} cmgg_genelists regiondist --samplename ${prefix} --perbase ${perbase} --genelist {} """ stub: @@ -40,11 +29,5 @@ process PANELCOVERAGE { name=\$(basename \$GENELIST .bed) touch ${prefix}_\${name}.mosdepth.region.dist.txt done - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - cmgg_genelists: \$(cmgg_genelists --version 2>&1 | sed 's/^.*cmgg_genelists version //') - bedtools: \$(echo \$(bedtools --version 2>&1) | sed 's/^.*bedtools v//' )) - END_VERSIONS """ } diff --git a/tests/modules/local/panelcoverage/main.nf.test.snap b/tests/modules/local/panelcoverage/main.nf.test.snap index cdb60adb..4a912279 100644 --- a/tests/modules/local/panelcoverage/main.nf.test.snap +++ b/tests/modules/local/panelcoverage/main.nf.test.snap @@ -12,7 +12,18 @@ ] ], "1": [ - "versions.yml:md5,2452395e283f5046f40bee1d26a09121" + [ + "PANELCOVERAGE", + "cmgg_genelists", + "0.1.0" + ] + ], + "2": [ + [ + "PANELCOVERAGE", + "bedtools", + "2.31.1" + ] ], "regiondist": [ [ @@ -23,15 +34,26 @@ "test_genelist_chr21_per_exon.mosdepth.region.dist.txt:md5,b29a7f12cef3be13215923edf6dde674" ] ], - "versions": [ - "versions.yml:md5,2452395e283f5046f40bee1d26a09121" + "versions_bedtools": [ + [ + "PANELCOVERAGE", + "bedtools", + "2.31.1" + ] + ], + "versions_cmgg_genelists": [ + [ + "PANELCOVERAGE", + "cmgg_genelists", + "0.1.0" + ] ] } ], "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" + "nf-test": "0.9.3", + "nextflow": "25.10.4" }, - "timestamp": "2024-04-12T14:47:04.895941" + "timestamp": "2026-02-11T19:45:02.994288" } } \ No newline at end of file From c6d16cde19d5cacadbc642f03e87c629eeef38a2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:47:15 +0100 Subject: [PATCH 196/202] coverage: drop versions --- subworkflows/local/coverage/main.nf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/subworkflows/local/coverage/main.nf b/subworkflows/local/coverage/main.nf index 7df1cf7d..a3458574 100644 --- a/subworkflows/local/coverage/main.nf +++ b/subworkflows/local/coverage/main.nf @@ -11,9 +11,6 @@ workflow COVERAGE { ch_genelists // channel: [optional] [genelists] main: - - ch_versions = channel.empty() - MOSDEPTH( ch_meta_cram_crai_fasta_fai_roi.map { meta, cram, crai, fasta, _fai, roi -> return [meta, cram, crai, roi, fasta] @@ -46,7 +43,6 @@ workflow COVERAGE { } } ) - ch_versions = ch_versions.mix(PANELCOVERAGE.out.versions.first()) emit: mosdepth_global = MOSDEPTH.out.global_txt From 48c69b7c868a8f94b67863a94c19dbc731c04cad Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:53:01 +0100 Subject: [PATCH 197/202] fix bcl* outputs --- modules/nf-core/bcl2fastq/bcl2fastq.diff | 101 +++++++++++++++++ modules/nf-core/bcl2fastq/main.nf | 40 +++---- .../nf-core/bcl2fastq/tests/nextflow.config | 2 +- modules/nf-core/bclconvert/bclconvert.diff | 107 ++++++++++++++++++ modules/nf-core/bclconvert/main.nf | 41 ++++--- .../nf-core/bclconvert/tests/nextflow.config | 2 +- 6 files changed, 250 insertions(+), 43 deletions(-) create mode 100644 modules/nf-core/bcl2fastq/bcl2fastq.diff create mode 100644 modules/nf-core/bclconvert/bclconvert.diff diff --git a/modules/nf-core/bcl2fastq/bcl2fastq.diff b/modules/nf-core/bcl2fastq/bcl2fastq.diff new file mode 100644 index 00000000..0e24436c --- /dev/null +++ b/modules/nf-core/bcl2fastq/bcl2fastq.diff @@ -0,0 +1,101 @@ +Changes in component 'nf-core/bcl2fastq' +'modules/nf-core/bcl2fastq/LICENSE' is unchanged +'modules/nf-core/bcl2fastq/Dockerfile' is unchanged +'modules/nf-core/bcl2fastq/README.md' is unchanged +'modules/nf-core/bcl2fastq/.gitignore' is unchanged +'modules/nf-core/bcl2fastq/meta.yml' is unchanged +Changes in 'bcl2fastq/main.nf': +--- modules/nf-core/bcl2fastq/main.nf ++++ modules/nf-core/bcl2fastq/main.nf +@@ -1,5 +1,5 @@ + process BCL2FASTQ { +- tag { "$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } ++ tag { "${meta.lane}" ? "${meta.id}" + "." + "${meta.lane}" : "${meta.id}" } + label 'process_high' + + container "nf-core/bcl2fastq:2.20.0.422" +@@ -8,14 +8,14 @@ + tuple val(meta), path(samplesheet), path(run_dir) + + output: +- tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz") , emit: fastq +- tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , optional:true, emit: fastq_idx +- tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz") , optional:true, emit: undetermined +- tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz") , optional:true, emit: undetermined_idx +- tuple val(meta), path("output/Reports") , emit: reports +- tuple val(meta), path("output/Stats") , emit: stats +- tuple val(meta), path("InterOp/*.bin") , emit: interop +- path("versions.yml") , emit: versions ++ tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz"), emit: fastq ++ tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz"), optional: true, emit: fastq_idx ++ tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), optional: true, emit: undetermined ++ tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), optional: true, emit: undetermined_idx ++ tuple val(meta), path("output/Reports/*"), emit: reports ++ tuple val(meta), path("output/Stats/*"), emit: stats ++ tuple val(meta), path("InterOp/*.bin"), emit: interop ++ path ("versions.yml"), emit: versions + + when: + task.ext.when == null || task.ext.when +@@ -23,7 +23,7 @@ + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { +- error "BCL2FASTQ module does not support Conda. Please use Docker / Singularity / Podman instead." ++ error("BCL2FASTQ module does not support Conda. Please use Docker / Singularity / Podman instead.") + } + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' +@@ -37,27 +37,27 @@ + + if ${input_tar}; then + ## Ensures --strip-components only applied when top level of tar contents is a directory +- ## If just files or multiple directories, place all in $input_dir ++ ## If just files or multiple directories, place all in ${input_dir} + + if [[ \$(tar -taf ${run_dir} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then + tar \\ +- -C $input_dir --strip-components 1 \\ ++ -C ${input_dir} --strip-components 1 \\ + -xavf \\ +- $args2 \\ +- $run_dir \\ +- $args3 ++ ${args2} \\ ++ ${run_dir} \\ ++ ${args3} + else + tar \\ +- -C $input_dir \\ ++ -C ${input_dir} \\ + -xavf \\ +- $args2 \\ +- $run_dir \\ +- $args3 ++ ${args2} \\ ++ ${run_dir} \\ ++ ${args3} + fi + fi + + bcl2fastq \\ +- $args \\ ++ ${args} \\ + --output-dir output \\ + --runfolder-dir ${input_dir} \\ + --sample-sheet ${samplesheet} \\ + +'modules/nf-core/bcl2fastq/tests/main.nf.test.snap' is unchanged +Changes in 'bcl2fastq/tests/nextflow.config': +--- modules/nf-core/bcl2fastq/tests/nextflow.config ++++ modules/nf-core/bcl2fastq/tests/nextflow.config +@@ -2,5 +2,5 @@ + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +- ext.args = "--tiles s_1_1101" ++ ext.args = "--tiles s_1_1101" + } + +'modules/nf-core/bcl2fastq/tests/main.nf.test' is unchanged +************************************************************ diff --git a/modules/nf-core/bcl2fastq/main.nf b/modules/nf-core/bcl2fastq/main.nf index 865f7951..b06bec18 100644 --- a/modules/nf-core/bcl2fastq/main.nf +++ b/modules/nf-core/bcl2fastq/main.nf @@ -1,5 +1,5 @@ process BCL2FASTQ { - tag { "$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } + tag { "${meta.lane}" ? "${meta.id}" + "." + "${meta.lane}" : "${meta.id}" } label 'process_high' container "nf-core/bcl2fastq:2.20.0.422" @@ -8,14 +8,14 @@ process BCL2FASTQ { tuple val(meta), path(samplesheet), path(run_dir) output: - tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz") , emit: fastq - tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , optional:true, emit: fastq_idx - tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz") , optional:true, emit: undetermined - tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz") , optional:true, emit: undetermined_idx - tuple val(meta), path("output/Reports") , emit: reports - tuple val(meta), path("output/Stats") , emit: stats - tuple val(meta), path("InterOp/*.bin") , emit: interop - path("versions.yml") , emit: versions + tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz"), emit: fastq + tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz"), optional: true, emit: fastq_idx + tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), optional: true, emit: undetermined + tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), optional: true, emit: undetermined_idx + tuple val(meta), path("output/Reports/*"), emit: reports + tuple val(meta), path("output/Stats/*"), emit: stats + tuple val(meta), path("InterOp/*.bin"), emit: interop + path ("versions.yml"), emit: versions when: task.ext.when == null || task.ext.when @@ -23,7 +23,7 @@ process BCL2FASTQ { script: // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "BCL2FASTQ module does not support Conda. Please use Docker / Singularity / Podman instead." + error("BCL2FASTQ module does not support Conda. Please use Docker / Singularity / Podman instead.") } def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' @@ -37,27 +37,27 @@ process BCL2FASTQ { if ${input_tar}; then ## Ensures --strip-components only applied when top level of tar contents is a directory - ## If just files or multiple directories, place all in $input_dir + ## If just files or multiple directories, place all in ${input_dir} if [[ \$(tar -taf ${run_dir} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then tar \\ - -C $input_dir --strip-components 1 \\ + -C ${input_dir} --strip-components 1 \\ -xavf \\ - $args2 \\ - $run_dir \\ - $args3 + ${args2} \\ + ${run_dir} \\ + ${args3} else tar \\ - -C $input_dir \\ + -C ${input_dir} \\ -xavf \\ - $args2 \\ - $run_dir \\ - $args3 + ${args2} \\ + ${run_dir} \\ + ${args3} fi fi bcl2fastq \\ - $args \\ + ${args} \\ --output-dir output \\ --runfolder-dir ${input_dir} \\ --sample-sheet ${samplesheet} \\ diff --git a/modules/nf-core/bcl2fastq/tests/nextflow.config b/modules/nf-core/bcl2fastq/tests/nextflow.config index d1985111..38ad79af 100644 --- a/modules/nf-core/bcl2fastq/tests/nextflow.config +++ b/modules/nf-core/bcl2fastq/tests/nextflow.config @@ -2,5 +2,5 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - ext.args = "--tiles s_1_1101" + ext.args = "--tiles s_1_1101" } diff --git a/modules/nf-core/bclconvert/bclconvert.diff b/modules/nf-core/bclconvert/bclconvert.diff new file mode 100644 index 00000000..caa6b812 --- /dev/null +++ b/modules/nf-core/bclconvert/bclconvert.diff @@ -0,0 +1,107 @@ +Changes in component 'nf-core/bclconvert' +'modules/nf-core/bclconvert/LICENSE' is unchanged +'modules/nf-core/bclconvert/Dockerfile' is unchanged +'modules/nf-core/bclconvert/README.md' is unchanged +'modules/nf-core/bclconvert/.gitignore' is unchanged +'modules/nf-core/bclconvert/meta.yml' is unchanged +Changes in 'bclconvert/main.nf': +--- modules/nf-core/bclconvert/main.nf ++++ modules/nf-core/bclconvert/main.nf +@@ -1,5 +1,5 @@ + process BCLCONVERT { +- tag { "$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } ++ tag { "${meta.lane}" ? "${meta.id}" + "." + "${meta.lane}" : "${meta.id}" } + label 'process_high' + + container "nf-core/bclconvert:4.4.6" +@@ -8,14 +8,14 @@ + tuple val(meta), path(samplesheet), path(run_dir) + + output: +- tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz") , emit: fastq +- tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , emit: fastq_idx , optional:true +- tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined , optional:true +- tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional:true +- tuple val(meta), path("output/Reports") , emit: reports +- tuple val(meta), path("output/Logs") , emit: logs +- tuple val(meta), path("output/InterOp/*.bin") , emit: interop , optional:true +- path("versions.yml") , emit: versions ++ tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz"), emit: fastq ++ tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz"), emit: fastq_idx, optional: true ++ tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined, optional: true ++ tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional: true ++ tuple val(meta), path("output/Reports/*"), emit: reports ++ tuple val(meta), path("output/Logs/*"), emit: logs ++ tuple val(meta), path("output/InterOp/*.bin"), emit: interop, optional: true ++ path ("versions.yml"), emit: versions + + when: + task.ext.when == null || task.ext.when +@@ -23,7 +23,7 @@ + script: + // Exit if running this module with -profile conda / -profile mamba + if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { +- error "BCLCONVERT module does not support Conda. Please use Docker / Singularity / Podman instead." ++ error("BCLCONVERT module does not support Conda. Please use Docker / Singularity / Podman instead.") + } + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' +@@ -37,27 +37,27 @@ + + if ${input_tar}; then + ## Ensures --strip-components only applied when top level of tar contents is a directory +- ## If just files or multiple directories, place all in $input_dir ++ ## If just files or multiple directories, place all in ${input_dir} + + if [[ \$(tar -taf ${run_dir} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then + tar \\ +- -C $input_dir --strip-components 1 \\ ++ -C ${input_dir} --strip-components 1 \\ + -xavf \\ +- $args2 \\ +- $run_dir \\ +- $args3 ++ ${args2} \\ ++ ${run_dir} \\ ++ ${args3} + else + tar \\ +- -C $input_dir \\ ++ -C ${input_dir} \\ + -xavf \\ +- $args2 \\ +- $run_dir \\ +- $args3 ++ ${args2} \\ ++ ${run_dir} \\ ++ ${args3} + fi + fi + + bcl-convert \\ +- $args \\ ++ ${args} \\ + --output-directory output \\ + --bcl-input-directory ${input_dir} \\ + --sample-sheet ${samplesheet} +@@ -107,5 +107,4 @@ + bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') + END_VERSIONS + """ +- + } + +'modules/nf-core/bclconvert/tests/main.nf.test.snap' is unchanged +Changes in 'bclconvert/tests/nextflow.config': +--- modules/nf-core/bclconvert/tests/nextflow.config ++++ modules/nf-core/bclconvert/tests/nextflow.config +@@ -1,5 +1,5 @@ + process { +- withName: "BCLCONVERT" { ++ withName: BCLCONVERT { + ext.args = params.module_args + } + } + +'modules/nf-core/bclconvert/tests/main.nf.test' is unchanged +************************************************************ diff --git a/modules/nf-core/bclconvert/main.nf b/modules/nf-core/bclconvert/main.nf index f1caafc3..6b164908 100644 --- a/modules/nf-core/bclconvert/main.nf +++ b/modules/nf-core/bclconvert/main.nf @@ -1,5 +1,5 @@ process BCLCONVERT { - tag { "$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" } + tag { "${meta.lane}" ? "${meta.id}" + "." + "${meta.lane}" : "${meta.id}" } label 'process_high' container "nf-core/bclconvert:4.4.6" @@ -8,14 +8,14 @@ process BCLCONVERT { tuple val(meta), path(samplesheet), path(run_dir) output: - tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz") , emit: fastq - tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , emit: fastq_idx , optional:true - tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined , optional:true - tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional:true - tuple val(meta), path("output/Reports") , emit: reports - tuple val(meta), path("output/Logs") , emit: logs - tuple val(meta), path("output/InterOp/*.bin") , emit: interop , optional:true - path("versions.yml") , emit: versions + tuple val(meta), path("output/**_S[1-9]*_R?_00?.fastq.gz"), emit: fastq + tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz"), emit: fastq_idx, optional: true + tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined, optional: true + tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional: true + tuple val(meta), path("output/Reports/*"), emit: reports + tuple val(meta), path("output/Logs/*"), emit: logs + tuple val(meta), path("output/InterOp/*.bin"), emit: interop, optional: true + path ("versions.yml"), emit: versions when: task.ext.when == null || task.ext.when @@ -23,7 +23,7 @@ process BCLCONVERT { script: // Exit if running this module with -profile conda / -profile mamba if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) { - error "BCLCONVERT module does not support Conda. Please use Docker / Singularity / Podman instead." + error("BCLCONVERT module does not support Conda. Please use Docker / Singularity / Podman instead.") } def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' @@ -37,27 +37,27 @@ process BCLCONVERT { if ${input_tar}; then ## Ensures --strip-components only applied when top level of tar contents is a directory - ## If just files or multiple directories, place all in $input_dir + ## If just files or multiple directories, place all in ${input_dir} if [[ \$(tar -taf ${run_dir} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then tar \\ - -C $input_dir --strip-components 1 \\ + -C ${input_dir} --strip-components 1 \\ -xavf \\ - $args2 \\ - $run_dir \\ - $args3 + ${args2} \\ + ${run_dir} \\ + ${args3} else tar \\ - -C $input_dir \\ + -C ${input_dir} \\ -xavf \\ - $args2 \\ - $run_dir \\ - $args3 + ${args2} \\ + ${run_dir} \\ + ${args3} fi fi bcl-convert \\ - $args \\ + ${args} \\ --output-directory output \\ --bcl-input-directory ${input_dir} \\ --sample-sheet ${samplesheet} @@ -107,5 +107,4 @@ process BCLCONVERT { bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') END_VERSIONS """ - } diff --git a/modules/nf-core/bclconvert/tests/nextflow.config b/modules/nf-core/bclconvert/tests/nextflow.config index 848581b5..47e194a6 100644 --- a/modules/nf-core/bclconvert/tests/nextflow.config +++ b/modules/nf-core/bclconvert/tests/nextflow.config @@ -1,5 +1,5 @@ process { - withName: "BCLCONVERT" { + withName: BCLCONVERT { ext.args = params.module_args } } From 530564b204df65ee0db1a226e8dd9b1a4a652e46 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 20:21:02 +0100 Subject: [PATCH 198/202] fix bamsormadup inputs --- modules.json | 3 +- .../local/fastq_to_aligned_cram/main.nf | 14 +++--- .../fastq_to_aligned_cram/main.nf.test.snap | 43 +++++-------------- 3 files changed, 19 insertions(+), 41 deletions(-) diff --git a/modules.json b/modules.json index 3b6b2674..253f63c6 100644 --- a/modules.json +++ b/modules.json @@ -8,7 +8,8 @@ "bcl2fastq": { "branch": "master", "git_sha": "051e7c60dbdcc5d96ce7814c31426ce776f5319b", - "installed_by": ["bcl_demultiplex"] + "installed_by": ["bcl_demultiplex"], + "patch": "modules/nf-core/bcl2fastq/bcl2fastq.diff" }, "bclconvert": { "branch": "master", diff --git a/subworkflows/local/fastq_to_aligned_cram/main.nf b/subworkflows/local/fastq_to_aligned_cram/main.nf index 9ce33bc8..dfccf2d5 100644 --- a/subworkflows/local/fastq_to_aligned_cram/main.nf +++ b/subworkflows/local/fastq_to_aligned_cram/main.nf @@ -83,16 +83,16 @@ workflow FASTQ_TO_CRAM { } .groupTuple() .map { meta, files -> - return [meta, files.flatten(), getGenomeAttribute(meta.genome_data, 'fasta')] + return [meta, files.flatten(), getGenomeAttribute(meta.genome_data, 'fasta'), getGenomeAttribute(meta.genome_data, 'fai')] } .dump(tag: "FASTQ_TO_CRAM: aligned bam per sample", pretty: true) - .branch { meta, files, fasta -> + .branch { meta, files, fasta, fai -> bamsormadup: meta.markdup == "bamsormadup" - return [meta, files, fasta] + return [meta, files, fasta, fai] samtools: meta.markdup == "samtools" - return [meta, files, fasta] + return [meta, files, fasta, fai] sort: meta.markdup == "false" || meta.markdup == false - return [meta, files, fasta] + return [meta, files, fasta, fai] unknown: true error("markdup option ${meta.markdup} not supported") } @@ -100,12 +100,12 @@ workflow FASTQ_TO_CRAM { ch_markdup_index = channel.empty() - // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta) + // BIOBAMBAM_BAMSORMADUP([meta, [bam, bam]], fasta, fai) BIOBAMBAM_BAMSORMADUP(ch_bam_fasta.bamsormadup) ch_markdup_index = ch_markdup_index.mix(BIOBAMBAM_BAMSORMADUP.out.bam.join(BIOBAMBAM_BAMSORMADUP.out.bam_index, failOnMismatch: true, failOnDuplicate: true)) ch_sormadup_metrics = ch_sormadup_metrics.mix(BIOBAMBAM_BAMSORMADUP.out.metrics) - // SAMTOOLS_SORMADUP([meta, [bam, bam]], fasta) + // SAMTOOLS_SORMADUP([meta, [bam, bam]], fasta, fai) SAMTOOLS_SORMADUP(ch_bam_fasta.samtools) ch_markdup_index = ch_markdup_index.mix(SAMTOOLS_SORMADUP.out.cram.join(SAMTOOLS_SORMADUP.out.crai, failOnMismatch: true, failOnDuplicate: true)) ch_sormadup_metrics = ch_sormadup_metrics.mix(SAMTOOLS_SORMADUP.out.metrics) diff --git a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap index 5db51b5f..eb4e865f 100644 --- a/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_to_aligned_cram/main.nf.test.snap @@ -33,18 +33,14 @@ ], "sormadup_metrics": [ - ], - "versions": [ - "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", - "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.3" + "nextflow": "25.10.4" }, - "timestamp": "2026-02-10T09:29:24.149695" + "timestamp": "2026-02-11T20:19:51.825749" }, "fastq to cram - bwa - bamsormadup": { "content": [ @@ -96,20 +92,14 @@ }, "test.merged.metrics.txt:md5,4ee20f12cb4d6077479a08310c8f6c70" ] - ], - "versions": [ - "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", - "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", - "versions.yml:md5,9598e8236a8fbab0f6745715fa0de9d3", - "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.3" + "nextflow": "25.10.4" }, - "timestamp": "2026-02-10T09:24:26.615795" + "timestamp": "2026-02-11T20:10:31.616836" }, "fastq to cram - bwa - samtools sormadup": { "content": [ @@ -161,19 +151,14 @@ }, "test.merged.metrics:md5,795c73aa836eb480e418f52db98e37cc" ] - ], - "versions": [ - "versions.yml:md5,53fb2eac4cab0b817e852418eb0ba719", - "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", - "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.3" + "nextflow": "25.10.4" }, - "timestamp": "2026-02-10T09:27:45.908866" + "timestamp": "2026-02-11T20:15:15.495706" }, "fastq to cram - star - bamsormadup": { "content": [ @@ -261,18 +246,14 @@ }, "test.merged.metrics.txt:md5,641527401576375d7c0b0b54fbaf63ab" ] - ], - "versions": [ - "versions.yml:md5,9598e8236a8fbab0f6745715fa0de9d3", - "versions.yml:md5,d8544811f6b511ef45e9c3547430a30d" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.3" + "nextflow": "25.10.4" }, - "timestamp": "2026-02-10T09:26:55.879993" + "timestamp": "2026-02-11T20:13:35.19973" }, "fastq to cram - bwa - samtools sort": { "content": [ @@ -308,17 +289,13 @@ ], "sormadup_metrics": [ - ], - "versions": [ - "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75", - "versions.yml:md5,5f142fd2dfa129d6b28f1368516bca75" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.3" + "nextflow": "25.10.4" }, - "timestamp": "2026-02-10T09:28:34.042629" + "timestamp": "2026-02-11T20:16:26.285299" } } \ No newline at end of file From 6474ddc56798cc04bcb7b1e082fe42c0646468e8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 20:44:37 +0100 Subject: [PATCH 199/202] fix bam_qc --- .../nf-core/picard/collectwgsmetrics/main.nf | 2 +- .../picard-collectwgsmetrics.diff | 2 +- subworkflows/local/bam_qc/main.nf | 2 +- .../local/bam_qc/main.nf.test.snap | 111 +++++++++++++----- 4 files changed, 87 insertions(+), 30 deletions(-) diff --git a/modules/nf-core/picard/collectwgsmetrics/main.nf b/modules/nf-core/picard/collectwgsmetrics/main.nf index a631b03f..b8d1ee42 100644 --- a/modules/nf-core/picard/collectwgsmetrics/main.nf +++ b/modules/nf-core/picard/collectwgsmetrics/main.nf @@ -8,7 +8,7 @@ process PICARD_COLLECTWGSMETRICS { 'community.wave.seqera.io/library/picard:3.4.0--e9963040df0a9bf6' }" input: - tuple val(meta), path(bam), path(bai) ,path(fasta) ,path(fai) + tuple val(meta), path(bam), path(bai) ,path(fasta) ,path(fai), path(dict) path intervallist output: diff --git a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff index c7503d9b..c1389e4e 100644 --- a/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff +++ b/modules/nf-core/picard/collectwgsmetrics/picard-collectwgsmetrics.diff @@ -11,7 +11,7 @@ Changes in 'picard/collectwgsmetrics/main.nf': - tuple val(meta), path(bam), path(bai) - tuple val(meta2), path(fasta) - tuple val(meta3), path(fai) -+ tuple val(meta), path(bam), path(bai) ,path(fasta) ,path(fai) ++ tuple val(meta), path(bam), path(bai) ,path(fasta) ,path(fai), path(dict) path intervallist output: diff --git a/subworkflows/local/bam_qc/main.nf b/subworkflows/local/bam_qc/main.nf index d9cd0f7c..b6cd772c 100644 --- a/subworkflows/local/bam_qc/main.nf +++ b/subworkflows/local/bam_qc/main.nf @@ -41,7 +41,7 @@ workflow BAM_QC { ch_picard .branch { meta, bam, bai, roi, fasta, fai, dict -> hsmetrics: roi != [] - return [meta, bam, bai, roi, fasta, fai, dict] + return [meta, bam, bai, roi, roi, fasta, fai, dict] wgsmetrics: roi == [] return [meta, bam, bai, fasta, fai, dict] } diff --git a/tests/subworkflows/local/bam_qc/main.nf.test.snap b/tests/subworkflows/local/bam_qc/main.nf.test.snap index 3392b3dd..5b809485 100644 --- a/tests/subworkflows/local/bam_qc/main.nf.test.snap +++ b/tests/subworkflows/local/bam_qc/main.nf.test.snap @@ -3,13 +3,46 @@ "content": [ { "picard_hsmetrics": [ - + [ + { + "disable_picard_metrics": false, + "id": "test", + "single_end": false + }, + "test.CollectHsMetrics.coverage_metrics" + ] ], "picard_multiplemetrics": [ - + [ + { + "disable_picard_metrics": false, + "id": "test", + "single_end": false + }, + [ + "test.CollectMultipleMetrics.alignment_summary_metrics", + "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "test.CollectMultipleMetrics.insert_size_metrics", + "test.CollectMultipleMetrics.quality_by_cycle_metrics", + "test.CollectMultipleMetrics.quality_distribution_metrics" + ] + ] ], "picard_multiplemetrics_pdf": [ - + [ + { + "disable_picard_metrics": false, + "id": "test", + "single_end": false + }, + [ + "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "test.CollectMultipleMetrics.insert_size_histogram.pdf", + "test.CollectMultipleMetrics.quality_by_cycle.pdf", + "test.CollectMultipleMetrics.quality_distribution.pdf", + "test.CollectMultipleMetrics.read_length_histogram.pdf" + ] + ] ], "picard_wgsmetrics": [ @@ -43,18 +76,14 @@ }, "test.stats:md5,3535d8d302e61ca0d77ac718db8309f1" ] - ], - "versions": [ - "versions.yml:md5,15389a9f97668f320b9628da1903a93b", - "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.3" + "nextflow": "25.10.4" }, - "timestamp": "2026-02-10T19:21:23.498543" + "timestamp": "2026-02-11T20:41:14.126057" }, "Bam QC - Samtools": { "content": [ @@ -75,7 +104,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": true }, "test.flagstat:md5,167e69b479663a15194ddf56cbc9e60e" ] @@ -84,7 +114,8 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": true }, "test.idxstats:md5,081d0431383fb7ea6b51b7077c6ec93c" ] @@ -93,22 +124,19 @@ [ { "id": "test", - "single_end": false + "single_end": false, + "disable_picard_metrics": true }, "test.stats:md5,3535d8d302e61ca0d77ac718db8309f1" ] - ], - "versions": [ - "versions.yml:md5,15389a9f97668f320b9628da1903a93b", - "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.10.4" }, - "timestamp": "2025-12-02T12:50:04.027873" + "timestamp": "2026-02-11T20:27:00.941719" }, "Bam QC - WGSmetrics": { "content": [ @@ -117,13 +145,46 @@ ], "picard_multiplemetrics": [ - + [ + { + "disable_picard_metrics": false, + "id": "test", + "single_end": false + }, + [ + "test.CollectMultipleMetrics.alignment_summary_metrics", + "test.CollectMultipleMetrics.base_distribution_by_cycle_metrics", + "test.CollectMultipleMetrics.insert_size_metrics", + "test.CollectMultipleMetrics.quality_by_cycle_metrics", + "test.CollectMultipleMetrics.quality_distribution_metrics" + ] + ] ], "picard_multiplemetrics_pdf": [ - + [ + { + "disable_picard_metrics": false, + "id": "test", + "single_end": false + }, + [ + "test.CollectMultipleMetrics.base_distribution_by_cycle.pdf", + "test.CollectMultipleMetrics.insert_size_histogram.pdf", + "test.CollectMultipleMetrics.quality_by_cycle.pdf", + "test.CollectMultipleMetrics.quality_distribution.pdf", + "test.CollectMultipleMetrics.read_length_histogram.pdf" + ] + ] ], "picard_wgsmetrics": [ - + [ + { + "disable_picard_metrics": false, + "id": "test", + "single_end": false + }, + "test.CollectWgsMetrics.coverage_metrics" + ] ], "samtools_flagstat": [ [ @@ -154,17 +215,13 @@ }, "test.stats:md5,3535d8d302e61ca0d77ac718db8309f1" ] - ], - "versions": [ - "versions.yml:md5,15389a9f97668f320b9628da1903a93b", - "versions.yml:md5,3fa45af2ff85005c0421d10e0b686bb5" ] } ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.3" + "nextflow": "25.10.4" }, - "timestamp": "2026-02-10T19:25:10.626677" + "timestamp": "2026-02-11T20:26:15.482881" } } \ No newline at end of file From 3555ab3cd87e989871eea4e8080496465b7e6bcb Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 22:20:42 +0100 Subject: [PATCH 200/202] fix more tests --- nextflow.config | 62 ++++---- tests/workflows/preprocessing.nf.test | 10 +- tests/workflows/preprocessing.nf.test.snap | 173 +++++++++++++++------ workflows/preprocessing.nf | 10 +- 4 files changed, 167 insertions(+), 88 deletions(-) diff --git a/nextflow.config b/nextflow.config index 010059f3..a5ceb27d 100644 --- a/nextflow.config +++ b/nextflow.config @@ -10,50 +10,50 @@ params { // Input options - input = null + input = null // References - genome = null - igenomes_base = '/references/' - igenomes_ignore = false + genome = null + igenomes_base = '/references/' + igenomes_ignore = false // Analysis options - split_fastq = 100000000 - genelists = null + split_fastq = 100000000 + genelists = null // MultiQC options - multiqc_config = null - multiqc_title = null - multiqc_logo = null - max_multiqc_email_size = '25.MB' - multiqc_methods_description = null + multiqc_config = null + multiqc_title = null + multiqc_logo = null + max_multiqc_email_size = '25.MB' + multiqc_methods_description = null // Boilerplate options - outdir = null - publish_dir_mode = 'copy' - email = null - email_on_fail = null - plaintext_email = false - monochrome_logs = false - hook_url = System.getenv('HOOK_URL') - help = false - help_full = false - show_hidden = false - version = false - pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' - trace_report_suffix = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') + outdir = null + publish_dir_mode = 'copy' + email = null + email_on_fail = null + plaintext_email = false + monochrome_logs = false + hook_url = System.getenv('HOOK_URL') + help = false + help_full = false + show_hidden = false + version = false + pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' + trace_report_suffix = new java.util.Date().format('yyyy-MM-dd_HH-mm-ss') // Config options - config_profile_name = null - config_profile_description = null + config_profile_name = null + config_profile_description = null - custom_config_version = 'main' - custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.custom_config_version}" - config_profile_contact = null - config_profile_url = null + custom_config_version = 'main' + custom_config_base = "https://raw.githubusercontent.com/nf-cmgg/configs/${params.custom_config_version}" + config_profile_contact = null + config_profile_url = null // Schema validation default options - validate_params = true + validate_params = true } // Load base.config by default for all pipelines diff --git a/tests/workflows/preprocessing.nf.test b/tests/workflows/preprocessing.nf.test index dfc856d0..4d5e52cc 100644 --- a/tests/workflows/preprocessing.nf.test +++ b/tests/workflows/preprocessing.nf.test @@ -24,7 +24,8 @@ nextflow_workflow { sample_type: "DNA", aligner: "bwamem", markdup: "bamsormadup", - run_coverage: true + run_coverage: true, + roi: file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true) ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -46,6 +47,7 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] + // genelists input[2] = null """ } @@ -115,6 +117,7 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] + // genelists input[2] = null """ } @@ -165,7 +168,9 @@ nextflow_workflow { sample_type: "DNA", aligner: "bwamem", markdup: "bamsormadup", - run_coverage: true + run_coverage: false, + disable_picard_metrics: true, + roi: file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", checkIfExists: true) ], //fastq_1 file("https://github.com/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/fastq/sample1_R1.fastq.gz", checkIfExists: true), @@ -187,6 +192,7 @@ nextflow_workflow { gtf: "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" ] ] + // genelists input[2] = null """ } diff --git a/tests/workflows/preprocessing.nf.test.snap b/tests/workflows/preprocessing.nf.test.snap index d40bc343..fc2144f1 100644 --- a/tests/workflows/preprocessing.nf.test.snap +++ b/tests/workflows/preprocessing.nf.test.snap @@ -21,8 +21,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -66,6 +68,7 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "readgroup": { "CN": "CMGG", @@ -76,6 +79,7 @@ "SM": "sample1" }, "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -94,6 +98,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "readgroup": { "CN": "CMGG", @@ -111,7 +118,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, "sample1.fastp.json:md5,5a65f5141251ac26b8f0a0d0a618b524" @@ -133,8 +139,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -155,6 +163,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -164,7 +175,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -182,6 +192,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -191,7 +204,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -209,6 +221,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -218,7 +233,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -239,6 +253,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -248,7 +265,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -266,6 +282,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -275,7 +294,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -293,6 +311,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -302,7 +323,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -320,6 +340,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -329,7 +352,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -347,6 +369,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -356,7 +381,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -374,6 +398,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -383,7 +410,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -439,8 +465,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -466,8 +494,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -498,8 +528,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -539,8 +571,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -566,8 +600,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -588,6 +624,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -597,7 +636,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -620,8 +658,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -642,6 +682,9 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -651,7 +694,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -659,18 +701,7 @@ ] ], "versions": [ - "versions.yml:md5,02acae00818ba01a01e2bdb03b574343", - "versions.yml:md5,23b060bcc18a02fc8f981102ef3a3006", - "versions.yml:md5,31df076e5d21d61db772cb39643350e2", - "versions.yml:md5,b702df83d9ece54caa0e765a6286cdd2", - "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", - "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", - "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", - "versions.yml:md5,cdce7da7ce14e29fbd9fd72e88505ffa", - "versions.yml:md5,d00b52835d019d68e58aafd218429a75", - "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", - "versions.yml:md5,f567cdcfb384cc7a2d9ff4dc850f3bad", - "versions.yml:md5,fe9b8b3a8dc895efcf8f7c0b3248ff2d" + "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d" ] } ], @@ -678,7 +709,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-02-11T12:00:40.443933" + "timestamp": "2026-02-11T21:21:37.068608" }, "preprocessing - fastq - bwa - bamsormadup - roi - no coverage/no picard": { "content": [ @@ -692,6 +723,7 @@ "groupSize": 1, "groupTarget": { "aligner": "bwamem", + "disable_picard_metrics": true, "genome": "GRCh38", "genome_data": { "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", @@ -702,8 +734,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": false, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -737,6 +771,7 @@ { "aligner": "bwamem", "count": 1, + "disable_picard_metrics": true, "genome": "GRCh38", "genome_data": { "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", @@ -747,6 +782,7 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "readgroup": { "CN": "CMGG", @@ -757,6 +793,7 @@ "SM": "sample1" }, "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": false, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -775,6 +812,10 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": false, + "disable_picard_metrics": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "readgroup": { "CN": "CMGG", @@ -792,7 +833,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "count": 1 }, "sample1.fastp.json:md5,5a65f5141251ac26b8f0a0d0a618b524" @@ -804,6 +844,7 @@ "groupSize": 1, "groupTarget": { "aligner": "bwamem", + "disable_picard_metrics": true, "genome": "GRCh38", "genome_data": { "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", @@ -814,8 +855,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": false, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -915,6 +958,7 @@ "groupSize": 1, "groupTarget": { "aligner": "bwamem", + "disable_picard_metrics": true, "genome": "GRCh38", "genome_data": { "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", @@ -925,8 +969,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": false, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -947,6 +993,10 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": false, + "disable_picard_metrics": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -956,7 +1006,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -969,6 +1018,7 @@ "groupSize": 1, "groupTarget": { "aligner": "bwamem", + "disable_picard_metrics": true, "genome": "GRCh38", "genome_data": { "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", @@ -979,8 +1029,10 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", + "run_coverage": false, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1001,6 +1053,10 @@ "tag": "WES", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": false, + "disable_picard_metrics": true, + "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1010,7 +1066,6 @@ "bwamem": "s3://test-data/genomics/homo_sapiens/genome/bwa/", "gtf": "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" }, - "roi": "/nf-cmgg/test-datasets/raw/preprocessing/data/genomics/homo_sapiens/illumina/regions/roi_chr21.bed", "id": "sample1" } }, @@ -1018,14 +1073,7 @@ ] ], "versions": [ - "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", - "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", - "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", - "versions.yml:md5,cdce7da7ce14e29fbd9fd72e88505ffa", - "versions.yml:md5,d00b52835d019d68e58aafd218429a75", - "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", - "versions.yml:md5,f567cdcfb384cc7a2d9ff4dc850f3bad", - "versions.yml:md5,fe9b8b3a8dc895efcf8f7c0b3248ff2d" + "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d" ] } ], @@ -1033,7 +1081,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-02-11T12:11:20.398961" + "timestamp": "2026-02-11T21:25:53.804729" }, "preprocessing - fastq - bwa - bamsormadup - no roi": { "content": [ @@ -1057,7 +1105,9 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1101,6 +1151,7 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", "readgroup": { "CN": "CMGG", @@ -1110,6 +1161,7 @@ "PU": "H5T2YDSX3.1", "SM": "sample1" }, + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1128,6 +1180,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "readgroup": { "CN": "CMGG", @@ -1166,7 +1220,9 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1187,6 +1243,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1213,6 +1271,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1239,6 +1299,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1268,6 +1330,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1294,6 +1358,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1329,6 +1395,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1396,7 +1464,9 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1427,7 +1497,9 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1458,7 +1530,9 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1490,7 +1564,9 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1516,7 +1592,9 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1537,6 +1615,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1568,7 +1648,9 @@ }, "id": "sample1", "library": "test", + "markdup": "bamsormadup", "organism": "Homo sapiens", + "run_coverage": true, "sample_type": "DNA", "samplename": "sample1", "single_end": false, @@ -1589,6 +1671,8 @@ "tag": "WGS", "sample_type": "DNA", "aligner": "bwamem", + "markdup": "bamsormadup", + "run_coverage": true, "single_end": false, "genome": "GRCh38", "genome_data": { @@ -1605,18 +1689,7 @@ ] ], "versions": [ - "versions.yml:md5,1d2a9b13790c70a69a1f62facc9b3a6c", - "versions.yml:md5,23b060bcc18a02fc8f981102ef3a3006", - "versions.yml:md5,31df076e5d21d61db772cb39643350e2", - "versions.yml:md5,b702df83d9ece54caa0e765a6286cdd2", - "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", - "versions.yml:md5,c4fcc95fcd514eab38e980cacf0d4e8c", - "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d", - "versions.yml:md5,cdce7da7ce14e29fbd9fd72e88505ffa", - "versions.yml:md5,d00b52835d019d68e58aafd218429a75", - "versions.yml:md5,d11c133ecb39ba9f6d7e081a8a6ff868", - "versions.yml:md5,f567cdcfb384cc7a2d9ff4dc850f3bad", - "versions.yml:md5,fe9b8b3a8dc895efcf8f7c0b3248ff2d" + "versions.yml:md5,c7a35abdd7b3bdda729b3e782bf5f73d" ] } ], @@ -1624,6 +1697,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-02-11T12:06:12.331519" + "timestamp": "2026-02-11T22:18:07.06828" } } \ No newline at end of file diff --git a/workflows/preprocessing.nf b/workflows/preprocessing.nf index 034397f4..3954c603 100644 --- a/workflows/preprocessing.nf +++ b/workflows/preprocessing.nf @@ -270,9 +270,9 @@ workflow PREPROCESSING { meta.roi && meta.roi != [] ? file(meta.roi, checkIfExists: true) : [], ] } - .set { ch_cram_crai_fasta_fai_roi } + .set { ch_coverage } - COVERAGE(ch_cram_crai_fasta_fai_roi, ch_genelists) + COVERAGE(ch_coverage, ch_genelists) ch_multiqc_files = ch_multiqc_files.mix( COVERAGE.out.mosdepth_summary, COVERAGE.out.mosdepth_global, @@ -291,15 +291,15 @@ workflow PREPROCESSING { meta, cram, crai, - (meta.roi && meta.roi) != [] ? file(meta.roi, checkIfExists: true) : [], + meta.roi && meta.roi != [] ? file(meta.roi, checkIfExists: true) : [], getGenomeAttribute(meta.genome_data, "fasta"), getGenomeAttribute(meta.genome_data, "fai"), getGenomeAttribute(meta.genome_data, "dict"), ] } - .set { ch_cram_crai_roi_fasta_fai_dict } + .set { ch_bam_qc } - BAM_QC(ch_cram_crai_roi_fasta_fai_dict) + BAM_QC(ch_bam_qc) ch_multiqc_files = ch_multiqc_files.mix( BAM_QC.out.samtools_stats, BAM_QC.out.samtools_flagstat, From af539d4a17e089faf663673ca7304362a5c23cb1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 22:38:28 +0100 Subject: [PATCH 201/202] fix coverage snapshot --- tests/config/igenomes_test.config | 2 +- .../local/coverage/main.nf.test.snap | 24 ++----------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/tests/config/igenomes_test.config b/tests/config/igenomes_test.config index cac18b9e..5ecb24af 100644 --- a/tests/config/igenomes_test.config +++ b/tests/config/igenomes_test.config @@ -7,7 +7,7 @@ params { fasta = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.fna" star = "s3://test-data/genomics/homo_sapiens/genome/star/" gtf = "s3://test-data/genomics/homo_sapiens/genome/seq/GCA_000001405.15_GRCh38_full_plus_hs38d1_analysis_set_chr21.gtf" - genelists = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists/*.bed" + genelists = "s3://test-data/genomics/homo_sapiens/genome/regions/genelists" } } } diff --git a/tests/subworkflows/local/coverage/main.nf.test.snap b/tests/subworkflows/local/coverage/main.nf.test.snap index 7bd91330..9934ac1f 100644 --- a/tests/subworkflows/local/coverage/main.nf.test.snap +++ b/tests/subworkflows/local/coverage/main.nf.test.snap @@ -51,11 +51,6 @@ ] ] ], - "14": [ - "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", - "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", - "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" - ], "2": [ [ { @@ -250,11 +245,6 @@ }, "test.coverage.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] - ], - "versions": [ - "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", - "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", - "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ] } ], @@ -262,7 +252,7 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-02-11T14:05:13.106828" + "timestamp": "2026-02-11T22:37:17.825377" }, "Coverage - seqcap": { "content": [ @@ -313,11 +303,6 @@ "test_seqcap_Connective_tissue_per_exon.mosdepth.region.dist.txt:md5,e098c901acb1da8c2cf64a248306e71c" ] ], - "14": [ - "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", - "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", - "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" - ], "2": [ [ { @@ -509,11 +494,6 @@ }, "test.coverage.txt:md5,2d81e108bf4175f2b892ab6e749fdf92" ] - ], - "versions": [ - "versions.yml:md5,67ac37f5eff6c19b8c605a2258aa721c", - "versions.yml:md5,731a006ffa265ac74ad677b4e5a68640", - "versions.yml:md5,8d8a3cea555f0b04692395a47351d7ef" ] } ], @@ -521,6 +501,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-02-11T13:54:02.513877" + "timestamp": "2026-02-11T22:36:21.526017" } } \ No newline at end of file From 8a64abcbd087c56305975575d4a28891d84683a1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 11 Feb 2026 22:52:12 +0100 Subject: [PATCH 202/202] fix rna snapshots --- .../local/fastq_align_rna/main.nf.test.snap | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap index cf11ffe9..88691d56 100644 --- a/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap +++ b/tests/subworkflows/local/fastq_align_rna/main.nf.test.snap @@ -93,19 +93,14 @@ }, "test.SJ.out.tab:md5,15852c5678c04e86dcb66793b7e02bb9" ] - ], - "versions": [ - "versions.yml:md5,a08c174f2d393f0b39c2cfe003ffafb9", - "versions.yml:md5,e0beb4fb46280de51c432ed766a0cdb2", - "versions.yml:md5,e1135512a195d12c4b6aaadd8e84dcf6" ] } ], "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.2" + "nf-test": "0.9.3", + "nextflow": "25.10.4" }, - "timestamp": "2025-12-17T16:44:58.048883426" + "timestamp": "2026-02-11T22:49:27.454517" }, "fastq align rna - unknown aligner": { "content": [