diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f082a8c..038b7090 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 ### `Changed` +- Merge output from germlinecnvcaller [#635](https://github.com/nf-core/raredisease/pull/635) - Update tools [#623](https://github.com/nf-core/raredisease/pull/623) - Update output file name prefix for upd and chromograph to sample-based [#620](https://github.com/nf-core/raredisease/pull/620) - Update tools [#619](https://github.com/nf-core/raredisease/pull/619) diff --git a/conf/modules/call_sv_germlinecnvcaller.config b/conf/modules/call_sv_germlinecnvcaller.config index a63da3d3..c1efa375 100644 --- a/conf/modules/call_sv_germlinecnvcaller.config +++ b/conf/modules/call_sv_germlinecnvcaller.config @@ -34,4 +34,9 @@ process { ext.prefix = { "${meta.id}_gatkcnv_segments_refiltered" } ext.args = { '--output-type z --exclude "N_ALT = 0" ' } } + + withName: '.*CALL_STRUCTURAL_VARIANTS:CALL_SV_GERMLINECNVCALLER:SVDB_MERGE_GCNVCALLER' { + ext.args = '--notag --pass_only' + ext.prefix = { "${meta.id}_gcnvcaller" } + } } diff --git a/conf/wes.config b/conf/wes.config deleted file mode 100644 index b056190d..00000000 --- a/conf/wes.config +++ /dev/null @@ -1,21 +0,0 @@ -/* -======================================================================================== - nf-core/raredisease Nextflow whole-exome sequencing (WES) config file -======================================================================================== - This config file is invoked when `--analysis_type` = 'wes'. - The purpose is to reduce the amount of resources used compared to WGS data. ----------------------------------------------------------------------------------------- -*/ - -process { - withLabel:process_medium { - cpus = { check_max( 3 * task.attempt, 'cpus' ) } - memory = { check_max( 30.GB * task.attempt, 'memory' ) } - time = { check_max( 8.h * task.attempt, 'time' ) } - } - withLabel:process_high { - cpus = { check_max( 6 * task.attempt, 'cpus' ) } - memory = { check_max( 60.GB * task.attempt, 'memory' ) } - time = { check_max( 16.h * task.attempt, 'time' ) } - } -} diff --git a/nextflow.config b/nextflow.config index cb12cf84..72717041 100644 --- a/nextflow.config +++ b/nextflow.config @@ -283,11 +283,6 @@ podman.registry = 'quay.io' singularity.registry = 'quay.io' charliecloud.registry = 'quay.io' -// Load wes.config if --analysis_type='wes' -if (params.analysis_type == 'wes') { - includeConfig 'conf/wes.config' -} - // Load igenomes.config if required includeConfig !params.igenomes_ignore ? 'conf/igenomes.config' : 'conf/igenomes_ignored.config' diff --git a/subworkflows/local/call_structural_variants.nf b/subworkflows/local/call_structural_variants.nf index c7d251b9..3222c9b9 100644 --- a/subworkflows/local/call_structural_variants.nf +++ b/subworkflows/local/call_structural_variants.nf @@ -58,7 +58,7 @@ workflow CALL_STRUCTURAL_VARIANTS { } if (!params.skip_germlinecnvcaller) { - CALL_SV_GERMLINECNVCALLER (ch_genome_bam_bai, ch_genome_fasta, ch_genome_fai, ch_readcount_intervals, ch_genome_dictionary, ch_ploidy_model, ch_gcnvcaller_model) + CALL_SV_GERMLINECNVCALLER (ch_genome_bam_bai, ch_genome_fasta, ch_genome_fai, ch_readcount_intervals, ch_genome_dictionary, ch_ploidy_model, ch_gcnvcaller_model, ch_case_info) .genotyped_filtered_segments_vcf .collect{it[1]} .set { gcnvcaller_vcf } diff --git a/subworkflows/local/variant_calling/call_sv_cnvnator.nf b/subworkflows/local/variant_calling/call_sv_cnvnator.nf index 995b6919..62074ecb 100644 --- a/subworkflows/local/variant_calling/call_sv_cnvnator.nf +++ b/subworkflows/local/variant_calling/call_sv_cnvnator.nf @@ -44,6 +44,7 @@ workflow CALL_SV_CNVNATOR { ch_versions = ch_versions.mix(CNVNATOR_PARTITION.out.versions) ch_versions = ch_versions.mix(CNVNATOR_CALL.out.versions) ch_versions = ch_versions.mix(CNVNATOR_CONVERT2VCF.out.versions) + ch_versions = ch_versions.mix(SVDB_MERGE_CNVNATOR.out.versions) emit: vcf = SVDB_MERGE_CNVNATOR.out.vcf // channel: [ val(meta), path(*.tar.gz) ] diff --git a/subworkflows/local/variant_calling/call_sv_germlinecnvcaller.nf b/subworkflows/local/variant_calling/call_sv_germlinecnvcaller.nf index 57ed2552..566bfc2e 100644 --- a/subworkflows/local/variant_calling/call_sv_germlinecnvcaller.nf +++ b/subworkflows/local/variant_calling/call_sv_germlinecnvcaller.nf @@ -8,6 +8,7 @@ include { GATK4_GERMLINECNVCALLER } from '../../../modules/nf-core/g include { GATK4_POSTPROCESSGERMLINECNVCALLS } from '../../../modules/nf-core/gatk4/postprocessgermlinecnvcalls/main.nf' include { BCFTOOLS_VIEW } from '../../../modules/nf-core/bcftools/view/main' include { TABIX_TABIX } from '../../../modules/nf-core/tabix/tabix/main' +include { SVDB_MERGE as SVDB_MERGE_GCNVCALLER } from '../../../modules/nf-core/svdb/merge/main' workflow CALL_SV_GERMLINECNVCALLER { take: @@ -18,6 +19,7 @@ workflow CALL_SV_GERMLINECNVCALLER { ch_genome_dictionary // channel: [mandatory][ val(meta), path(ch_dict) ] ch_ploidy_model // channel: [mandatory][ path(ch_ploidy_model) ] ch_gcnvcaller_model // channel: [mandatory][ path(ch_gcnvcaller_model) ] + ch_case_info // channel: [mandatory] [ val(case_info) ] main: ch_versions = Channel.empty() @@ -56,17 +58,29 @@ workflow CALL_SV_GERMLINECNVCALLER { // Filter out reference only (0/0) segments BCFTOOLS_VIEW (ch_segments_in , [], [], [] ) + BCFTOOLS_VIEW.out.vcf + .collect{it[1]} + .toList() + .set { vcf_file_list } + + ch_case_info + .combine(vcf_file_list) + .set { merge_input_vcfs } + + SVDB_MERGE_GCNVCALLER ( merge_input_vcfs, [] ) + ch_versions = ch_versions.mix(GATK4_COLLECTREADCOUNTS.out.versions) ch_versions = ch_versions.mix(GATK4_DETERMINEGERMLINECONTIGPLOIDY.out.versions) ch_versions = ch_versions.mix(GATK4_GERMLINECNVCALLER.out.versions) ch_versions = ch_versions.mix(GATK4_POSTPROCESSGERMLINECNVCALLS.out.versions) ch_versions = ch_versions.mix(TABIX_TABIX.out.versions) ch_versions = ch_versions.mix(BCFTOOLS_VIEW.out.versions) + ch_versions = ch_versions.mix(SVDB_MERGE_GCNVCALLER.out.versions) emit: genotyped_intervals_vcf = GATK4_POSTPROCESSGERMLINECNVCALLS.out.intervals // channel: [ val(meta), path(*.vcf.gz) ] genotyped_segments_vcf = GATK4_POSTPROCESSGERMLINECNVCALLS.out.segments // channel: [ val(meta), path(*.vcf.gz) ] - genotyped_filtered_segments_vcf = BCFTOOLS_VIEW.out.vcf // channel: [ val(meta), path(*.vcf.gz) ] + genotyped_filtered_segments_vcf = SVDB_MERGE_GCNVCALLER.out.vcf // channel: [ val(meta), path(*.vcf.gz) ] denoised_vcf = GATK4_POSTPROCESSGERMLINECNVCALLS.out.denoised // channel: [ val(meta), path(*.vcf.gz) ] versions = ch_versions // channel: [ versions.yml ] }