From 3a16d93f0fd4249678761475ffb22302afea0d76 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 17 Oct 2023 16:56:08 +0200 Subject: [PATCH 1/4] add skip_qualimap --- conf/modules/qc_bam.config | 6 ++++-- conf/test.config | 1 + conf/test_one_sample.config | 1 + nextflow.config | 1 + nextflow_schema.json | 5 +++++ subworkflows/local/qc_bam.nf | 9 ++++++--- 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/conf/modules/qc_bam.config b/conf/modules/qc_bam.config index eeb60b34..fe2031a9 100644 --- a/conf/modules/qc_bam.config +++ b/conf/modules/qc_bam.config @@ -33,8 +33,10 @@ process { ext.prefix = { "${meta.id}_hsmetrics" } } - withName: '.*QC_BAM:QUALIMAP_BAMQC' { - ext.prefix = { "${meta.id}_qualimap" } + if (params.skip_qualimap) { + withName: '.*QC_BAM:QUALIMAP_BAMQC' { + ext.prefix = { "${meta.id}_qualimap" } + } } withName: '.*QC_BAM:TIDDIT_COV' { diff --git a/conf/test.config b/conf/test.config index c7593f76..04c41e14 100644 --- a/conf/test.config +++ b/conf/test.config @@ -25,6 +25,7 @@ params { // analysis params skip_cnv_calling = true + skip_qualimap = true skip_mt_annotation = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip annotation on Github CI // Input data diff --git a/conf/test_one_sample.config b/conf/test_one_sample.config index 51524fe7..0a017791 100644 --- a/conf/test_one_sample.config +++ b/conf/test_one_sample.config @@ -25,6 +25,7 @@ params { // analysis params skip_cnv_calling = true + skip_qualimap = true skip_mt_annotation = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip annotation on Github CI // Input data diff --git a/nextflow.config b/nextflow.config index 9573e35c..348a92a6 100644 --- a/nextflow.config +++ b/nextflow.config @@ -25,6 +25,7 @@ params { bait_padding = 100 save_mapped_as_cram = false skip_cnv_calling = false + skip_qualimap = false skip_snv_annotation = false skip_sv_annotation = false skip_mt_annotation = false diff --git a/nextflow_schema.json b/nextflow_schema.json index a3a95f1c..9c336f06 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -388,6 +388,11 @@ "description": "Specifies whether or not to skip CNV calling.", "fa_icon": "fas fa-toggle-on" }, + "skip_qualimap": { + "type": "boolean", + "description": "Specifies whether or not to skip Qualimap.", + "fa_icon": "fas fa-toggle-on" + }, "skip_mt_annotation": { "type": "boolean", "description": "Specifies whether or not to skip annotation of mitochondrial variants.", diff --git a/subworkflows/local/qc_bam.nf b/subworkflows/local/qc_bam.nf index 9331523e..11439a7b 100644 --- a/subworkflows/local/qc_bam.nf +++ b/subworkflows/local/qc_bam.nf @@ -29,6 +29,7 @@ workflow QC_BAM { main: ch_versions = Channel.empty() + ch_qualimap = Channel.empty() PICARD_COLLECTMULTIPLEMETRICS (ch_bam_bai, ch_genome_fasta, ch_genome_fai) @@ -39,7 +40,10 @@ workflow QC_BAM { PICARD_COLLECTHSMETRICS (ch_hsmetrics_in, ch_genome_fasta, ch_genome_fai, [[],[]]) - QUALIMAP_BAMQC (ch_bam, []) + if (!params.skip_qualimap) { + ch_qualimap = QUALIMAP_BAMQC (ch_bam, []).results + ch_versions = ch_versions.mix(QUALIMAP_BAMQC.out.versions.first()) + } TIDDIT_COV (ch_bam, [[],[]]) // 2nd pos. arg is req. only for cram input @@ -60,7 +64,6 @@ workflow QC_BAM { ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) - ch_versions = ch_versions.mix(QUALIMAP_BAMQC.out.versions.first()) ch_versions = ch_versions.mix(TIDDIT_COV.out.versions.first()) ch_versions = ch_versions.mix(UCSC_WIGTOBIGWIG.out.versions.first()) ch_versions = ch_versions.mix(MOSDEPTH.out.versions.first()) @@ -70,7 +73,7 @@ workflow QC_BAM { emit: multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), path(metrics) ] hs_metrics = PICARD_COLLECTHSMETRICS.out.metrics // channel: [ val(meta), path(metrics) ] - qualimap_results = QUALIMAP_BAMQC.out.results // channel: [ val(meta), path(qualimap_dir) ] + qualimap_results = ch_qualimap // channel: [ val(meta), path(qualimap_dir) ] tiddit_wig = TIDDIT_COV.out.wig // channel: [ val(meta), path(wig) ] bigwig = UCSC_WIGTOBIGWIG.out.bw // channel: [ val(meta), path(bw) ] d4 = MOSDEPTH.out.per_base_d4 // channel: [ val(meta), path(d4) ] From 164a8f7a1e6587938109d91f7e9271030600dc6b Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 17 Oct 2023 16:58:34 +0200 Subject: [PATCH 2/4] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2def1d5b..b05be855 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 - A new parameter to skip filtering based on vep results [#416](https://github.com/nf-core/raredisease/pull/416) - A `metromap` representating the core parts of the pipeline [#428](https://github.com/nf-core/raredisease/pull/428) - Metromap and logos for light and dark theme [#432](https://github.com/nf-core/raredisease/pull/432) +- A new parameter to skip qualimap [#436](https://github.com/nf-core/raredisease/pull/436) ### `Changed` From 24e8deb359f8885c848be0efa3c0e2006abe7473 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:24:25 +0200 Subject: [PATCH 3/4] skip eklipse --- CHANGELOG.md | 2 +- conf/modules/call_sv_MT.config | 14 ++++++++------ conf/test.config | 1 + conf/test_one_sample.config | 1 + nextflow.config | 1 + nextflow_schema.json | 5 +++++ .../local/variant_calling/call_sv_MT.nf | 17 +++++++++++------ 7 files changed, 28 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b05be855..1623fc11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - A new parameter to skip filtering based on vep results [#416](https://github.com/nf-core/raredisease/pull/416) - A `metromap` representating the core parts of the pipeline [#428](https://github.com/nf-core/raredisease/pull/428) - Metromap and logos for light and dark theme [#432](https://github.com/nf-core/raredisease/pull/432) -- A new parameter to skip qualimap [#436](https://github.com/nf-core/raredisease/pull/436) +- New parameters to skip qualimap and eklipse (`--skip_qualimap` and `--skip_eklipse`) [#436](https://github.com/nf-core/raredisease/pull/436) ### `Changed` diff --git a/conf/modules/call_sv_MT.config b/conf/modules/call_sv_MT.config index 44b0e581..606ef429 100644 --- a/conf/modules/call_sv_MT.config +++ b/conf/modules/call_sv_MT.config @@ -26,12 +26,14 @@ process { ] } - withName: '.*CALL_SV_MT:EKLIPSE' { - publishDir = [ - path: { "${params.outdir}/call_sv/mitochondria" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] + if (!params.skip_eklipse){ + withName: '.*CALL_SV_MT:EKLIPSE' { + publishDir = [ + path: { "${params.outdir}/call_sv/mitochondria" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } } } diff --git a/conf/test.config b/conf/test.config index 04c41e14..8cb3e2af 100644 --- a/conf/test.config +++ b/conf/test.config @@ -25,6 +25,7 @@ params { // analysis params skip_cnv_calling = true + skip_eklipse = true skip_qualimap = true skip_mt_annotation = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip annotation on Github CI diff --git a/conf/test_one_sample.config b/conf/test_one_sample.config index 0a017791..4ad89508 100644 --- a/conf/test_one_sample.config +++ b/conf/test_one_sample.config @@ -25,6 +25,7 @@ params { // analysis params skip_cnv_calling = true + skip_eklipse = true skip_qualimap = true skip_mt_annotation = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip annotation on Github CI diff --git a/nextflow.config b/nextflow.config index 348a92a6..ed8275fe 100644 --- a/nextflow.config +++ b/nextflow.config @@ -25,6 +25,7 @@ params { bait_padding = 100 save_mapped_as_cram = false skip_cnv_calling = false + skip_eklipse = false skip_qualimap = false skip_snv_annotation = false skip_sv_annotation = false diff --git a/nextflow_schema.json b/nextflow_schema.json index 9c336f06..6d43a432 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -388,6 +388,11 @@ "description": "Specifies whether or not to skip CNV calling.", "fa_icon": "fas fa-toggle-on" }, + "skip_eklipse": { + "type": "boolean", + "description": "Specifies whether or not to skip eKLIPse.", + "fa_icon": "fas fa-toggle-on" + }, "skip_qualimap": { "type": "boolean", "description": "Specifies whether or not to skip Qualimap.", diff --git a/subworkflows/local/variant_calling/call_sv_MT.nf b/subworkflows/local/variant_calling/call_sv_MT.nf index c8fdff45..41b91119 100644 --- a/subworkflows/local/variant_calling/call_sv_MT.nf +++ b/subworkflows/local/variant_calling/call_sv_MT.nf @@ -11,19 +11,24 @@ workflow CALL_SV_MT { ch_fasta // channel: [mandatory] [ val(meta), path(fasta) ] main: - ch_versions = Channel.empty() + ch_versions = Channel.empty() + ch_eklipse_del = Channel.empty() + ch_eklipse_genes = Channel.empty() + ch_eklipse_circos = Channel.empty() - EKLIPSE(ch_bam_bai,[]) + if (!params.skip_eklipse){ + EKLIPSE(ch_bam_bai,[]) + ch_versions = ch_versions.mix(EKLIPSE.out.versions.first()) + } MT_DELETION(ch_bam_bai, ch_fasta) - ch_versions = ch_versions.mix(EKLIPSE.out.versions.first()) ch_versions = ch_versions.mix(MT_DELETION.out.versions.first()) emit: - eklipse_del = EKLIPSE.out.deletions // channel: [ val(meta), path(csv) ] - eklipse_genes = EKLIPSE.out.genes // channel: [ val(meta), path(csv) ] - eklipse_circos = EKLIPSE.out.circos // channel: [ val(meta), path(png) ] + eklipse_del = ch_eklipse_del // channel: [ val(meta), path(csv) ] + eklipse_genes = ch_eklipse_genes // channel: [ val(meta), path(csv) ] + eklipse_circos = ch_eklipse_circos // channel: [ val(meta), path(png) ] mt_del_result = MT_DELETION.out.mt_del_result // channel: [ val(meta), path(txt) ] versions = ch_versions // channel: [ path(versions.yml) ] } From 9b1b6c6c7f581324f87f4cc219dd381c2593c744 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Wed, 18 Oct 2023 12:37:31 +0200 Subject: [PATCH 4/4] review comments --- conf/modules/qc_bam.config | 2 +- subworkflows/local/variant_calling/call_sv_MT.nf | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/modules/qc_bam.config b/conf/modules/qc_bam.config index fe2031a9..cc744773 100644 --- a/conf/modules/qc_bam.config +++ b/conf/modules/qc_bam.config @@ -33,7 +33,7 @@ process { ext.prefix = { "${meta.id}_hsmetrics" } } - if (params.skip_qualimap) { + if (!params.skip_qualimap) { withName: '.*QC_BAM:QUALIMAP_BAMQC' { ext.prefix = { "${meta.id}_qualimap" } } diff --git a/subworkflows/local/variant_calling/call_sv_MT.nf b/subworkflows/local/variant_calling/call_sv_MT.nf index 41b91119..7d6f4ede 100644 --- a/subworkflows/local/variant_calling/call_sv_MT.nf +++ b/subworkflows/local/variant_calling/call_sv_MT.nf @@ -18,6 +18,9 @@ workflow CALL_SV_MT { if (!params.skip_eklipse){ EKLIPSE(ch_bam_bai,[]) + ch_eklipse_del = EKLIPSE.out.deletions + ch_eklipse_genes = EKLIPSE.out.genes + ch_eklipse_circos = EKLIPSE.out.circos ch_versions = ch_versions.mix(EKLIPSE.out.versions.first()) }