From 524364e301c01e40c5bbbbcce3ccd24e4a3956b6 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:11:45 +0200 Subject: [PATCH 1/4] output all cram files --- main.nf | 2 +- subworkflows/local/cram_prepare_samtools_bedtools/main.nf | 1 - workflows/smallvariants.nf | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main.nf b/main.nf index 159727d6..24ec852a 100644 --- a/main.nf +++ b/main.nf @@ -209,7 +209,7 @@ workflow { ) publish: - merged_crams = SMALLVARIANTS.out.merged_crams + crams = SMALLVARIANTS.out.crams mosdepth_reports = SMALLVARIANTS.out.mosdepth_reports gvcfs = SMALLVARIANTS.out.gvcfs.filter { _meta, gvcf, _tbi -> gvcf.startsWith(workflow.workDir) } // Filtering out input GVCFs from the output publishing fixes an issue in the current implementation of the workflow output definitions: https://github.com/nextflow-io/nextflow/issues/5480 single_beds = SMALLVARIANTS.out.single_beds diff --git a/subworkflows/local/cram_prepare_samtools_bedtools/main.nf b/subworkflows/local/cram_prepare_samtools_bedtools/main.nf index ff4bd5c3..1fe8fa9f 100644 --- a/subworkflows/local/cram_prepare_samtools_bedtools/main.nf +++ b/subworkflows/local/cram_prepare_samtools_bedtools/main.nf @@ -176,7 +176,6 @@ workflow CRAM_PREPARE_SAMTOOLS_BEDTOOLS { emit: ready_crams = ch_ready_crams // [ val(meta), path(cram), path(crai) ] - merged_crams = ch_merged_crams // [ val(meta), path(cram), path(crai) ] ready_bams = ch_ready_bams // [ val(meta), path(bam), path(bai) ] ready_beds = ch_ready_beds // [ val(meta), path(bed) ] perbase_beds = ch_perbase_beds // [ val(meta), path(bed), path(csi) ] diff --git a/workflows/smallvariants.nf b/workflows/smallvariants.nf index 99ec9b18..7c6452c1 100644 --- a/workflows/smallvariants.nf +++ b/workflows/smallvariants.nf @@ -416,7 +416,7 @@ workflow SMALLVARIANTS { ch_reports = ch_reports.mix(CRAM_PREPARE_SAMTOOLS_BEDTOOLS.out.reports) def ch_single_beds = CRAM_PREPARE_SAMTOOLS_BEDTOOLS.out.ready_beds def ch_perbase_beds = CRAM_PREPARE_SAMTOOLS_BEDTOOLS.out.perbase_beds - def ch_merged_crams = CRAM_PREPARE_SAMTOOLS_BEDTOOLS.out.merged_crams + def ch_ready_crams = CRAM_PREPARE_SAMTOOLS_BEDTOOLS.out.ready_crams def ch_mosdepth_reports = CRAM_PREPARE_SAMTOOLS_BEDTOOLS.out.mosdepth_reports // @@ -868,7 +868,7 @@ workflow SMALLVARIANTS { ) emit: - merged_crams = ch_merged_crams // channel: [ val(meta), path(cram), path(crai) ] + crams = ch_ready_crams // channel: [ val(meta), path(cram), path(crai) ] mosdepth_reports = ch_mosdepth_reports // channel: [ val(meta), path(mosdepth_report) ] gvcfs = ch_gvcfs_ready // channel: [ val(meta), path(gvcf), path(tbi) ] genomicsdb = ch_final_genomicsdb // channel: [ val(meta), path(genomicsdb) ] From 0800d4a7138c1995747d1f8c4f8f8a5ecd20a3bb Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:50:22 +0200 Subject: [PATCH 2/4] disable cram output (#277) --- conf/copgt.config | 11 ++++++----- conf/copgt_joint.config | 1 + conf/seqplorer.config | 2 ++ conf/wes.config | 11 ++++++----- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/conf/copgt.config b/conf/copgt.config index edbae1fe..4ac8ac5f 100644 --- a/conf/copgt.config +++ b/conf/copgt.config @@ -5,9 +5,10 @@ */ params { - callers = "haplotypecaller" - only_call = true - roi = "${params.genomes_base}/Hsapiens/GRCh38/regions/coPGT-M/coPGT-M_v1.bed" - scatter_count = 8 - filter = true + callers = "haplotypecaller" + only_call = true + roi = "${params.genomes_base}/Hsapiens/GRCh38/regions/coPGT-M/coPGT-M_v1.bed" + scatter_count = 8 + filter = true + skip_merged_cram_output = true } diff --git a/conf/copgt_joint.config b/conf/copgt_joint.config index 2037768e..fac72269 100644 --- a/conf/copgt_joint.config +++ b/conf/copgt_joint.config @@ -11,4 +11,5 @@ params { roi = "${params.genomes_base}/Hsapiens/GRCh38/regions/coPGT-M/coPGT-M_v1.bed" scatter_count = 8 filter = true + skip_merged_cram_output = true } diff --git a/conf/seqplorer.config b/conf/seqplorer.config index b0e39b81..551b644d 100644 --- a/conf/seqplorer.config +++ b/conf/seqplorer.config @@ -20,4 +20,6 @@ params { vcfanno_config = "https://raw.githubusercontent.com/CenterForMedicalGeneticsGhent/nf-cmgg-configs/main/conf/Hsapiens/vcfanno/cmgg_vcfanno.toml" vcfanno_resources = "${params.genomes_base}/Hsapiens/GRCh38/variation/dbscSNV-1.1/dbscSNV.txt.gz;${params.genomes_base}/Hsapiens/GRCh38/variation/dbscSNV-1.1/dbscSNV.txt.gz.tbi;${params.genomes_base}/Hsapiens/GRCh38/variation/gnomAD/exomes/r2.2.1/gnomad_exomes.vcf.gz;${params.genomes_base}/Hsapiens/GRCh38/variation/gnomAD/exomes/r2.2.1/gnomad_exomes.vcf.gz.csi;${params.genomes_base}/Hsapiens/GRCh38/variation/clinvar/clinvar_20221119.vcf.gz;${params.genomes_base}/Hsapiens/GRCh38/variation/clinvar/clinvar_20221119.vcf.gz.tbi;${params.genomes_base}/Hsapiens/GRCh38/variation/gnomAD/genomes/r3.1.2/gnomad_genomes.vcf.gz;${params.genomes_base}/Hsapiens/GRCh38/variation/gnomAD/genomes/r3.1.2/gnomad_genomes.vcf.gz.csi;${params.genomes_base}/Hsapiens/GRCh38/variation/dbNSFP-4.3/dbNSFP4.3a_grch38.gz;${params.genomes_base}/Hsapiens/GRCh38/variation/dbNSFP-4.3/dbNSFP4.3a_grch38.gz.tbi" + + skip_merged_cram_output = true } diff --git a/conf/wes.config b/conf/wes.config index 71105ec5..5ebb199e 100644 --- a/conf/wes.config +++ b/conf/wes.config @@ -5,9 +5,10 @@ */ params { - callers = "haplotypecaller" - scatter_count = 8 - roi = "${params.genomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" - updio = true - automap = true + callers = "haplotypecaller" + scatter_count = 8 + roi = "${params.genomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" + updio = true + automap = true + skip_merged_cram_output = true } From 1c1eb82a4d810a70062525bab3afd9e786f5a884 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:56:02 +0200 Subject: [PATCH 3/4] add filter to stand alone wes config (#276) --- conf/wes.config | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/wes.config b/conf/wes.config index 5ebb199e..a7125fde 100644 --- a/conf/wes.config +++ b/conf/wes.config @@ -10,5 +10,6 @@ params { roi = "${params.genomes_base}/Hsapiens/GRCh38/regions/CMGG_WES_analysis_ROI_v6.bed" updio = true automap = true + filter = true skip_merged_cram_output = true } From f88f93453838fa8bc3ab55e7cebb86dde0e5b9c0 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Mon, 2 Jun 2025 10:06:55 +0200 Subject: [PATCH 4/4] typo --- main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.nf b/main.nf index 24ec852a..b9c3e4c9 100644 --- a/main.nf +++ b/main.nf @@ -229,7 +229,7 @@ workflow { } output { - merged_crams { + crams { path { meta, cram, crai -> cram >> "${meta.family}/${meta.id}_${params.unique_out}/${meta.id}.cram" crai >> "${meta.family}/${meta.id}_${params.unique_out}/${meta.id}.cram.crai"