From 9fcaa21bfa01cc3807295ccaa0509800a3916ecd Mon Sep 17 00:00:00 2001 From: Sorel Fitz-Gibbon Date: Thu, 14 Nov 2024 12:41:57 -0800 Subject: [PATCH 1/5] update nftest path --- nftest.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/nftest.yml b/nftest.yml index c7b31948..8c56f509 100644 --- a/nftest.yml +++ b/nftest.yml @@ -91,15 +91,15 @@ cases: verbose: true asserts: - actual: call-sSNV-*/S2-v1.1.5/Mutect2-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_Indel.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_Indel.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_Indel.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Mutect2-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_MNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_MNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_MNV.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Mutect2-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.6.1.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz script: test/assert_vcf.sh - name: a_mini-mutect2-multiple-samples @@ -111,15 +111,15 @@ cases: verbose: true asserts: - actual: call-sSNV-*/TWGSAMIN000001/Mutect2-*/output/Mutect2-*_TWGSAMIN_TWGSAMIN000001_Indel.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.4.4.0_TWGSAMIN_TWGSAMIN000001_Indel.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-multiple-samples/Mutect2-4.4.0.0_TWGSAMIN_TWGSAMIN000001_Indel.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/TWGSAMIN000001/Mutect2-*/output/Mutect2-*_TWGSAMIN_TWGSAMIN000001_MNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.4.0.0_TWGSAMIN_TWGSAMIN000001_MNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-multiple-samples/Mutect2-4.4.0.0_TWGSAMIN_TWGSAMIN000001_MNV.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/TWGSAMIN000001/Mutect2-*/output/Mutect2-*_TWGSAMIN_TWGSAMIN000001_SNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.6.1.0_TWGSAMIN_TWGSAMIN000001_SNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-multiple-samples/Mutect2-4.4.0.0_TWGSAMIN_TWGSAMIN000001_SNV.vcf.gz script: test/assert_vcf.sh - name: a_mini-two-tools @@ -143,31 +143,31 @@ cases: script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/BCFtools-*_TWGSAMIN_S2-v1.1.5_SNV-concat.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_SNV-concat.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-two-tools/Intersect-BCFtools/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_SNV-concat.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/BCFtools-*_TWGSAMIN_S2-v1.1.5_SNV-concat.maf.bz2 - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_SNV-concat.maf.bz2 + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-two-tools/Intersect-BCFtools/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_SNV-concat.maf.bz2 method: md5 - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/BCFtools-*_TWGSAMIN_S2-v1.1.5_Venn-diagram.tiff - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_Venn-diagram.tiff + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-two-tools/Intersect-BCFtools/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_Venn-diagram.tiff method: md5 - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/isec-1-or-more/BCFtools-*_TWGSAMIN_S2-v1.1.5_sites.txt - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/isec-1-or-more/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_sites.txt + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-two-tools/Intersect-BCFtools/isec-1-or-more/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_sites.txt method: md5 - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/isec-2-or-more/BCFtools-*_TWGSAMIN_S2-v1.1.5_sites.txt - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/isec-2-or-more/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_sites.txt + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-two-tools/Intersect-BCFtools/isec-2-or-more/BCFtools-1.17_TWGSAMIN_S2-v1.1.5_sites.txt method: md5 - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/SomaticSniper-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-two-tools/Intersect-BCFtools/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/Strelka2-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Strelka2-2.9.10_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-two-tools/Intersect-BCFtools/Strelka2-2.9.10_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz script: test/assert_vcf.sh - name: a_mini-somaticsniper @@ -179,7 +179,7 @@ cases: verbose: true asserts: - actual: call-sSNV-*/S2-v1.1.5/SomaticSniper-*/output/SomaticSniper-*_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-somaticsniper/S2-v1.1.5/SomaticSniper-1.0.5.0/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz script: test/assert_vcf.sh - name: a_mini-strelka2 @@ -215,7 +215,7 @@ cases: script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Mutect2-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.6.1.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz script: test/assert_vcf.sh - name: a_mini-muse @@ -263,7 +263,7 @@ cases: script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.6.1.0_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Intersect-BCFtools-*/output/SomaticSniper-*_TWGSAMIN_S2-v1.1.5_SNV-intersect.vcf.gz From c025b18658b4737bd678d2bcc6d5fc651060cdd1 Mon Sep 17 00:00:00 2001 From: Sorel Fitz-Gibbon Date: Thu, 14 Nov 2024 18:12:02 -0800 Subject: [PATCH 2/5] fix single tool runs --- main.nf | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/main.nf b/main.nf index cec97446..45822002 100755 --- a/main.nf +++ b/main.nf @@ -251,23 +251,25 @@ workflow { process_vcfs.out.idx.set { tool_indices } } - intersect( - tool_gzvcfs, - tool_indices, - script_dir_ch, - ) + if (params.algorithm.size() > 1 || params.input_type == 'vcf') { + intersect( + tool_gzvcfs, + tool_indices, + script_dir_ch, + ) - all_files = tool_gzvcfs.mix(tool_indices) - .flatten() - .collect() + all_files = tool_gzvcfs.mix(tool_indices) + .flatten() + .collect() - identified_gzvcfs = tool_gzvcfs.flatten() - .map{ [algorithm: getToolName(it), path: it] } - .collect() + identified_gzvcfs = tool_gzvcfs.flatten() + .map{ [algorithm: getToolName(it), path: it] } + .collect() - plot_vaf( - identified_gzvcfs, - all_files - ) + plot_vaf( + identified_gzvcfs, + all_files + ) + } } From f03ef893c0510d185b7795994ce3439b46887bd9 Mon Sep 17 00:00:00 2001 From: Sorel Fitz-Gibbon Date: Thu, 14 Nov 2024 18:12:21 -0800 Subject: [PATCH 3/5] update nftest --- nftest.yml | 12 ++++++------ test/yaml/a_mini-vcf.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nftest.yml b/nftest.yml index 8c56f509..8a164dd8 100644 --- a/nftest.yml +++ b/nftest.yml @@ -91,15 +91,15 @@ cases: verbose: true asserts: - actual: call-sSNV-*/S2-v1.1.5/Mutect2-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_Indel.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_Indel.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.6.1.0_TWGSAMIN_S2-v1.1.5_Indel.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Mutect2-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_MNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_MNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.6.1.0_TWGSAMIN_S2-v1.1.5_MNV.vcf.gz script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Mutect2-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-tumor-only/Mutect2-4.6.1.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz script: test/assert_vcf.sh - name: a_mini-mutect2-multiple-samples @@ -119,7 +119,7 @@ cases: script: test/assert_vcf.sh - actual: call-sSNV-*/TWGSAMIN000001/Mutect2-*/output/Mutect2-*_TWGSAMIN_TWGSAMIN000001_SNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-multiple-samples/Mutect2-4.4.0.0_TWGSAMIN_TWGSAMIN000001_SNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-mutect2-multiple-samples/Mutect2-4.6.1.0_TWGSAMIN_TWGSAMIN000001_SNV.vcf.gz script: test/assert_vcf.sh - name: a_mini-two-tools @@ -179,7 +179,7 @@ cases: verbose: true asserts: - actual: call-sSNV-*/S2-v1.1.5/SomaticSniper-*/output/SomaticSniper-*_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/a_mini-somaticsniper/S2-v1.1.5/SomaticSniper-1.0.5.0/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz script: test/assert_vcf.sh - name: a_mini-strelka2 @@ -215,7 +215,7 @@ cases: script: test/assert_vcf.sh - actual: call-sSNV-*/S2-v1.1.5/Mutect2-*/output/Mutect2-*_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz - expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.4.0.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz + expect: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-output/Mutect2-4.6.1.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz script: test/assert_vcf.sh - name: a_mini-muse diff --git a/test/yaml/a_mini-vcf.yaml b/test/yaml/a_mini-vcf.yaml index 333d2370..f48a1286 100644 --- a/test/yaml/a_mini-vcf.yaml +++ b/test/yaml/a_mini-vcf.yaml @@ -5,6 +5,6 @@ input_tumor_id: 'S2_v1.1.5' # tumor ID in the VCF files must match this or 'TUMO input_normal_id: 'HG002.N' # normal ID in the VCF files must match this or 'NORMAL' input: muse: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/MuSE-2.0.4_TWGSAMIN_S2-v1.1.5_SNV-pass.vcf.gz - mutect2: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/Mutect2-4.5.0.0_TWGSAMIN_S2-v1.1.5_all-pass.vcf.gz + mutect2: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/Mutect2-4.6.1.0_TWGSAMIN_S2-v1.1.5_all-pass.vcf.gz somaticsniper: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/SomaticSniper-1.0.5.0_TWGSAMIN_S2-v1.1.5_hc.vcf.gz strelka2: /hot/software/pipeline/pipeline-call-sSNV/Nextflow/development/test-input/Strelka2-2.9.10_TWGSAMIN_S2-v1.1.5_SNV-pass.vcf.gz From c988c8d9a7fa825b5064b18faf0af8d73ee798e1 Mon Sep 17 00:00:00 2001 From: Sorel Fitz-Gibbon Date: Thu, 14 Nov 2024 18:25:02 -0800 Subject: [PATCH 4/5] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e162442..26a1a835 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed +- Update NFTest paths +- Fix single tool run logic - Update PipeVal 4.0.0-rc.2 -> 5.1.0 - Update GATK 4.5.0.0 -> 4.6.1.0 - Update bam_readcount 0.8.0 -> 1.0.1 From fda0412ad5071ee234f71af5a168443db59faabe Mon Sep 17 00:00:00 2001 From: Sorel Fitz-Gibbon Date: Fri, 15 Nov 2024 15:19:11 -0800 Subject: [PATCH 5/5] keep plot_vaf for single algorithm runs --- main.nf | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/main.nf b/main.nf index 45822002..9ba505e2 100755 --- a/main.nf +++ b/main.nf @@ -232,19 +232,18 @@ workflow { mutect2.out.gzvcf.set { mutect2_gzvcf_ch } mutect2.out.idx.set { mutect2_idx_ch } } - // Intersect all vcf files - if (params.algorithm.size() > 1) { - tool_gzvcfs = (somaticsniper_gzvcf_ch - .mix(strelka2_gzvcf_ch) - .mix(mutect2_gzvcf_ch) - .mix(muse_gzvcf_ch)) - .collect() - tool_indices = (somaticsniper_idx_ch - .mix(strelka2_idx_ch) - .mix(mutect2_idx_ch) - .mix(muse_idx_ch)) - .collect() - } + + tool_gzvcfs = (somaticsniper_gzvcf_ch + .mix(strelka2_gzvcf_ch) + .mix(mutect2_gzvcf_ch) + .mix(muse_gzvcf_ch)) + .collect() + tool_indices = (somaticsniper_idx_ch + .mix(strelka2_idx_ch) + .mix(mutect2_idx_ch) + .mix(muse_idx_ch)) + .collect() + } else if (params.input_type == 'vcf') { process_vcfs(samplesToProcess_ch) process_vcfs.out.gzvcf.set { tool_gzvcfs } @@ -257,19 +256,19 @@ workflow { tool_indices, script_dir_ch, ) + } - all_files = tool_gzvcfs.mix(tool_indices) - .flatten() - .collect() + all_files = tool_gzvcfs.mix(tool_indices) + .flatten() + .collect() - identified_gzvcfs = tool_gzvcfs.flatten() - .map{ [algorithm: getToolName(it), path: it] } - .collect() + identified_gzvcfs = tool_gzvcfs.flatten() + .map{ [algorithm: getToolName(it), path: it] } + .collect() - plot_vaf( - identified_gzvcfs, - all_files - ) + plot_vaf( + identified_gzvcfs, + all_files + ) - } }