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..a7125fde 100644 --- a/conf/wes.config +++ b/conf/wes.config @@ -5,9 +5,11 @@ */ 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 + filter = true + skip_merged_cram_output = true } diff --git a/main.nf b/main.nf index 159727d6..b9c3e4c9 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 @@ -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" 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) ]