From 303ddde3f4213d8f7fbde62136a04bf6bfd0eede Mon Sep 17 00:00:00 2001 From: WackerO Date: Fri, 15 Jul 2022 10:17:40 +0000 Subject: [PATCH 01/11] Added TABIX call to the SVDB_MERGE output --- subworkflows/local/pair_variant_calling.nf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subworkflows/local/pair_variant_calling.nf b/subworkflows/local/pair_variant_calling.nf index 7522fce9a7..38fc9543ae 100644 --- a/subworkflows/local/pair_variant_calling.nf +++ b/subworkflows/local/pair_variant_calling.nf @@ -14,6 +14,7 @@ include { RUN_ASCAT_SOMATIC } from '../nf-core/variantca include { RUN_TIDDIT as RUN_TIDDIT_NORMAL } from '../nf-core/variantcalling/tiddit/main.nf' include { RUN_TIDDIT as RUN_TIDDIT_TUMOR } from '../nf-core/variantcalling/tiddit/main.nf' include { SVDB_MERGE } from '../../modules/nf-core/modules/svdb/merge/main.nf' +include { TABIX_TABIX } from '../../modules/nf-core/modules/tabix/tabix/main.nf' workflow PAIR_VARIANT_CALLING { take: @@ -231,10 +232,12 @@ workflow PAIR_VARIANT_CALLING { [meta, [vcf_normal, vcf_tumor]] }, false) tiddit_vcf = SVDB_MERGE.out.vcf + TABIX_TABIX(tiddit_vcf) ch_versions = ch_versions.mix(RUN_TIDDIT_NORMAL.out.versions) ch_versions = ch_versions.mix(RUN_TIDDIT_TUMOR.out.versions) ch_versions = ch_versions.mix(SVDB_MERGE.out.versions) + ch_versions = ch_versions.mix(TABIX_TABIX.out.versions) } emit: From 8c5393682c382250a2f9e154160503084ebb2e88 Mon Sep 17 00:00:00 2001 From: WackerO Date: Fri, 15 Jul 2022 11:51:39 +0000 Subject: [PATCH 02/11] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32e4bbad39..929d5cf222 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#629](https://github.com/nf-core/sarek/pull/629) - Added checks to catch inconsistency between supplied samples and requested tools. - [#632](https://github.com/nf-core/sarek/pull/632) - Added params `--snpeff_version` to allow more configuration on the snpeff container definition - [#632](https://github.com/nf-core/sarek/pull/632) - Added params `--vep_include_fasta` to use the fasta file for annotation +- [#637](https://github.com/nf-core/sarek/pull/637) - Added indexing step to SVDB in pair_vc ### Changed From 42bb9537b56cf081c7d3e2cdf39d06fca9511f15 Mon Sep 17 00:00:00 2001 From: WackerO Date: Mon, 18 Jul 2022 07:50:47 +0000 Subject: [PATCH 03/11] Extracted TIDDIT from pairVC into a subworkflow --- subworkflows/local/pair_variant_calling.nf | 21 +++--------- .../tiddit/tiddit_somatic/main.nf | 33 +++++++++++++++++++ 2 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf diff --git a/subworkflows/local/pair_variant_calling.nf b/subworkflows/local/pair_variant_calling.nf index 38fc9543ae..33f4bb69d7 100644 --- a/subworkflows/local/pair_variant_calling.nf +++ b/subworkflows/local/pair_variant_calling.nf @@ -11,10 +11,7 @@ include { RUN_CNVKIT_SOMATIC } from '../nf-core/variantca include { RUN_MPILEUP as RUN_MPILEUP_NORMAL } from '../nf-core/variantcalling/mpileup/main' include { RUN_MPILEUP as RUN_MPILEUP_TUMOR } from '../nf-core/variantcalling/mpileup/main' include { RUN_ASCAT_SOMATIC } from '../nf-core/variantcalling/ascat/main' -include { RUN_TIDDIT as RUN_TIDDIT_NORMAL } from '../nf-core/variantcalling/tiddit/main.nf' -include { RUN_TIDDIT as RUN_TIDDIT_TUMOR } from '../nf-core/variantcalling/tiddit/main.nf' -include { SVDB_MERGE } from '../../modules/nf-core/modules/svdb/merge/main.nf' -include { TABIX_TABIX } from '../../modules/nf-core/modules/tabix/tabix/main.nf' +include { RUN_TIDDIT_SOMATIC } from '../nf-core/variantcalling/tiddit/tiddit_somatic/main' workflow PAIR_VARIANT_CALLING { take: @@ -225,19 +222,9 @@ workflow PAIR_VARIANT_CALLING { [meta, tumor_cram, tumor_crai] } - RUN_TIDDIT_NORMAL(cram_normal, fasta, bwa) - RUN_TIDDIT_TUMOR(cram_tumor, fasta, bwa) - SVDB_MERGE(RUN_TIDDIT_NORMAL.out.tiddit_vcf.join(RUN_TIDDIT_TUMOR.out.tiddit_vcf) - .map{meta, vcf_normal, vcf_tumor -> - [meta, [vcf_normal, vcf_tumor]] - }, false) - tiddit_vcf = SVDB_MERGE.out.vcf - TABIX_TABIX(tiddit_vcf) - - ch_versions = ch_versions.mix(RUN_TIDDIT_NORMAL.out.versions) - ch_versions = ch_versions.mix(RUN_TIDDIT_TUMOR.out.versions) - ch_versions = ch_versions.mix(SVDB_MERGE.out.versions) - ch_versions = ch_versions.mix(TABIX_TABIX.out.versions) + RUN_TIDDIT_SOMATIC(cram_normal, cram_tumor, fasta, bwa) + tiddit_vcf = RUN_TIDDIT_SOMATIC.out.tiddit_vcf + ch_versions = ch_versions.mix(RUN_TIDDIT_SOMATIC.out.versions) } emit: diff --git a/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf b/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf new file mode 100644 index 0000000000..dad2897fce --- /dev/null +++ b/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf @@ -0,0 +1,33 @@ +include { RUN_TIDDIT as RUN_TIDDIT_NORMAL } from '../main.nf' +include { RUN_TIDDIT as RUN_TIDDIT_TUMOR } from '../main.nf' +include { SVDB_MERGE } from '../../../../modules/nf-core/modules/svdb/merge/main.nf' +include { TABIX_TABIX } from '../../../../modules/nf-core/modules/tabix/tabix/main.nf' + +workflow RUN_TIDDIT_SOMATIC { + take: + cram_normal + cram_tumor + fasta + bwa + + main: + + ch_versions = Channel.empty() + RUN_TIDDIT_NORMAL(cram_normal, fasta, bwa) + RUN_TIDDIT_TUMOR(cram_tumor, fasta, bwa) + SVDB_MERGE(RUN_TIDDIT_NORMAL.out.tiddit_vcf.join(RUN_TIDDIT_TUMOR.out.tiddit_vcf) + .map{meta, vcf_normal, vcf_tumor -> + [meta, [vcf_normal, vcf_tumor]] + }, false) + tiddit_vcf = SVDB_MERGE.out.vcf + TABIX_TABIX(tiddit_vcf) + + ch_versions = ch_versions.mix(RUN_TIDDIT_NORMAL.out.versions) + ch_versions = ch_versions.mix(RUN_TIDDIT_TUMOR.out.versions) + ch_versions = ch_versions.mix(SVDB_MERGE.out.versions) + ch_versions = ch_versions.mix(TABIX_TABIX.out.versions) + + emit: + versions = ch_versions + tiddit_vcf +} From 82ebe4e891de0a33755b2caec50ee1d485c385b8 Mon Sep 17 00:00:00 2001 From: WackerO Date: Mon, 18 Jul 2022 08:29:58 +0000 Subject: [PATCH 04/11] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 929d5cf222..7ea1b241b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#632](https://github.com/nf-core/sarek/pull/632) - Update `VEP` version to `106.1` and cache up to `106` - [#618](https://github.com/nf-core/sarek/pull/618) - Update `multiqc` module update test yml files - [#618](https://github.com/nf-core/sarek/pull/618) - Update test yml files +- [#651](https://github.com/nf-core/sarek/pull/651) - Added TIDDIT_SOMATIC subworkflow ### Fixed From ecd1196a346029952770273d6ef1254474d3d9cb Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 19 Jul 2022 06:50:05 +0000 Subject: [PATCH 05/11] Removed tabix --- .../nf-core/variantcalling/tiddit/tiddit_somatic/main.nf | 3 --- 1 file changed, 3 deletions(-) diff --git a/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf b/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf index dad2897fce..2661b607f5 100644 --- a/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf +++ b/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf @@ -1,7 +1,6 @@ include { RUN_TIDDIT as RUN_TIDDIT_NORMAL } from '../main.nf' include { RUN_TIDDIT as RUN_TIDDIT_TUMOR } from '../main.nf' include { SVDB_MERGE } from '../../../../modules/nf-core/modules/svdb/merge/main.nf' -include { TABIX_TABIX } from '../../../../modules/nf-core/modules/tabix/tabix/main.nf' workflow RUN_TIDDIT_SOMATIC { take: @@ -20,12 +19,10 @@ workflow RUN_TIDDIT_SOMATIC { [meta, [vcf_normal, vcf_tumor]] }, false) tiddit_vcf = SVDB_MERGE.out.vcf - TABIX_TABIX(tiddit_vcf) ch_versions = ch_versions.mix(RUN_TIDDIT_NORMAL.out.versions) ch_versions = ch_versions.mix(RUN_TIDDIT_TUMOR.out.versions) ch_versions = ch_versions.mix(SVDB_MERGE.out.versions) - ch_versions = ch_versions.mix(TABIX_TABIX.out.versions) emit: versions = ch_versions From d8946a0e2a8ddeab83664d2d09ffa4a05a2d3460 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 19 Jul 2022 09:13:25 +0000 Subject: [PATCH 06/11] tiddit now has a subworkflow --- conf/modules.config | 6 +++--- modules/nf-core/modules/svdb/merge/main.nf | 2 ++ modules/nf-core/modules/tabix/bgziptabix/main.nf | 7 +++++++ .../nf-core/variantcalling/tiddit/tiddit_somatic/main.nf | 4 +++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index a1619ba739..d0c4eafdf8 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1086,16 +1086,16 @@ process{ if (params.tools && params.tools.contains('tiddit')) { //TIDDIT - withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_NORMAL:TABIX_BGZIP_TIDDIT_SV' { + withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_SOMATIC:RUN_TIDDIT_NORMAL:TABIX_BGZIP_TIDDIT_SV' { ext.prefix = {"${meta.id}.tiddit.normal.vcf"} } - withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_TUMOR:TABIX_BGZIP_TIDDIT_SV' { + withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_SOMATIC:RUN_TIDDIT_TUMOR:TABIX_BGZIP_TIDDIT_SV' { ext.prefix = {"${meta.id}.tiddit.tumor.vcf"} } //SVDB - withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:SVDB_MERGE' { + withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_SOMATIC:SVDB_MERGE' { ext.prefix = { "${meta.id}.tiddit" } publishDir = [ mode: params.publish_dir_mode, diff --git a/modules/nf-core/modules/svdb/merge/main.nf b/modules/nf-core/modules/svdb/merge/main.nf index 0d56fea21e..6459dd5fe5 100644 --- a/modules/nf-core/modules/svdb/merge/main.nf +++ b/modules/nf-core/modules/svdb/merge/main.nf @@ -38,6 +38,8 @@ process SVDB_MERGE { --vcf $input \\ > ${prefix}_sv_merge.vcf + cp ${prefix}_sv_merge.vcf /home/centos/git/sarek/outputsave/ + cat <<-END_VERSIONS > versions.yml "${task.process}": svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) diff --git a/modules/nf-core/modules/tabix/bgziptabix/main.nf b/modules/nf-core/modules/tabix/bgziptabix/main.nf index 77fd91a58d..6d413844a0 100644 --- a/modules/nf-core/modules/tabix/bgziptabix/main.nf +++ b/modules/nf-core/modules/tabix/bgziptabix/main.nf @@ -21,10 +21,17 @@ process TABIX_BGZIPTABIX { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def pref = task.ext.prefix ? "yaaas" : "naaa" """ bgzip --threads ${task.cpus} -c $args $input > ${prefix}.gz tabix $args2 ${prefix}.gz + if [ TRUE ]; then + echo ${pref} >> /home/centos/git/sarek/outputsave/tabix/echo + echo ${prefix} >> /home/centos/git/sarek/outputsave/tabix/echo + fi + cp ${prefix}.gz /home/centos/git/sarek/outputsave/tabix + cat <<-END_VERSIONS > versions.yml "${task.process}": tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') diff --git a/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf b/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf index 2661b607f5..3b9754fca2 100644 --- a/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf +++ b/subworkflows/nf-core/variantcalling/tiddit/tiddit_somatic/main.nf @@ -1,6 +1,6 @@ include { RUN_TIDDIT as RUN_TIDDIT_NORMAL } from '../main.nf' include { RUN_TIDDIT as RUN_TIDDIT_TUMOR } from '../main.nf' -include { SVDB_MERGE } from '../../../../modules/nf-core/modules/svdb/merge/main.nf' +include { SVDB_MERGE } from '../../../../../modules/nf-core/modules/svdb/merge/main.nf' workflow RUN_TIDDIT_SOMATIC { take: @@ -14,6 +14,8 @@ workflow RUN_TIDDIT_SOMATIC { ch_versions = Channel.empty() RUN_TIDDIT_NORMAL(cram_normal, fasta, bwa) RUN_TIDDIT_TUMOR(cram_tumor, fasta, bwa) + RUN_TIDDIT_NORMAL.out.tiddit_vcf.dump(tag:"normal") + RUN_TIDDIT_TUMOR.out.tiddit_vcf.dump(tag:"tumor") SVDB_MERGE(RUN_TIDDIT_NORMAL.out.tiddit_vcf.join(RUN_TIDDIT_TUMOR.out.tiddit_vcf) .map{meta, vcf_normal, vcf_tumor -> [meta, [vcf_normal, vcf_tumor]] From 988a4afb50824321f764f155935b6e61790e09f6 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 19 Jul 2022 09:20:35 +0000 Subject: [PATCH 07/11] Restored modules --- modules/nf-core/modules/svdb/merge/main.nf | 2 -- modules/nf-core/modules/tabix/bgziptabix/main.nf | 7 ------- 2 files changed, 9 deletions(-) diff --git a/modules/nf-core/modules/svdb/merge/main.nf b/modules/nf-core/modules/svdb/merge/main.nf index 6459dd5fe5..0d56fea21e 100644 --- a/modules/nf-core/modules/svdb/merge/main.nf +++ b/modules/nf-core/modules/svdb/merge/main.nf @@ -38,8 +38,6 @@ process SVDB_MERGE { --vcf $input \\ > ${prefix}_sv_merge.vcf - cp ${prefix}_sv_merge.vcf /home/centos/git/sarek/outputsave/ - cat <<-END_VERSIONS > versions.yml "${task.process}": svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) diff --git a/modules/nf-core/modules/tabix/bgziptabix/main.nf b/modules/nf-core/modules/tabix/bgziptabix/main.nf index 2ed4fb38ef..03e3b0c320 100644 --- a/modules/nf-core/modules/tabix/bgziptabix/main.nf +++ b/modules/nf-core/modules/tabix/bgziptabix/main.nf @@ -21,17 +21,10 @@ process TABIX_BGZIPTABIX { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def pref = task.ext.prefix ? "yaaas" : "naaa" """ bgzip --threads ${task.cpus} -c $args $input > ${prefix}.${input.getExtension()}.gz tabix $args2 ${prefix}.${input.getExtension()}.gz - if [ TRUE ]; then - echo ${pref} >> /home/centos/git/sarek/outputsave/tabix/echo - echo ${prefix} >> /home/centos/git/sarek/outputsave/tabix/echo - fi - cp ${prefix}.gz /home/centos/git/sarek/outputsave/tabix - cat <<-END_VERSIONS > versions.yml "${task.process}": tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//') From d0098379780f4642787aab21475a8c89db19052d Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 19 Jul 2022 09:50:37 +0000 Subject: [PATCH 08/11] Bugfixing --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index bc01c533d2..4bc8dac71f 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1105,7 +1105,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/tiddit/${meta.id}/" }, - pattern: "*vcf" + pattern: "*{vcf,vcf.gz}" ] } } From 45953be48a17dcf33c84be0caad4eb22eb56b199 Mon Sep 17 00:00:00 2001 From: WackerO <43847497+WackerO@users.noreply.github.com> Date: Tue, 19 Jul 2022 13:11:35 +0200 Subject: [PATCH 09/11] Update conf/modules.config Co-authored-by: FriederikeHanssen --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 4bc8dac71f..a3e16e65d9 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1105,7 +1105,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/tiddit/${meta.id}/" }, - pattern: "*{vcf,vcf.gz}" + pattern: "*{vcf.gz}" ] } } From e840cdbbc76184ccfa065bb4d766b83e8a68f12f Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 19 Jul 2022 11:41:54 +0000 Subject: [PATCH 10/11] Still bugfixing --- conf/modules.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index a3e16e65d9..6245d453cf 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1092,11 +1092,11 @@ process{ if (params.tools && params.tools.split(',').contains('tiddit')) { //TIDDIT withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_SOMATIC:RUN_TIDDIT_NORMAL:TABIX_BGZIP_TIDDIT_SV' { - ext.prefix = {"${meta.id}.tiddit.normal.vcf"} + ext.prefix = {"${meta.id}.tiddit.normal"} } withName: 'NFCORE_SAREK:SAREK:PAIR_VARIANT_CALLING:RUN_TIDDIT_SOMATIC:RUN_TIDDIT_TUMOR:TABIX_BGZIP_TIDDIT_SV' { - ext.prefix = {"${meta.id}.tiddit.tumor.vcf"} + ext.prefix = {"${meta.id}.tiddit.tumor"} } //SVDB From 7b252d97a6d6dc34794d0e12baeb9b88a414f2f5 Mon Sep 17 00:00:00 2001 From: WackerO Date: Tue, 19 Jul 2022 11:46:14 +0000 Subject: [PATCH 11/11] Should work now(?) --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 6245d453cf..0689a032a3 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -1105,7 +1105,7 @@ process{ publishDir = [ mode: params.publish_dir_mode, path: { "${params.outdir}/variant_calling/tiddit/${meta.id}/" }, - pattern: "*{vcf.gz}" + pattern: "*{vcf,vcf.gz}" ] } }