Skip to content

Commit

Permalink
Merge pull request #325 from uclahs-cds/sfitz-fix-single-tool-runs
Browse files Browse the repository at this point in the history
Sfitz fix single tool runs
  • Loading branch information
sorelfitzgibbon authored Nov 22, 2024
2 parents 248c58a + fda0412 commit 89998db
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 33 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 19 additions & 18 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -232,30 +232,31 @@ 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 }
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()
Expand Down
28 changes: 14 additions & 14 deletions nftest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.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/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/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.6.1.0_TWGSAMIN_S2-v1.1.5_SNV.vcf.gz
script: test/assert_vcf.sh

- name: a_mini-mutect2-multiple-samples
Expand All @@ -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.6.1.0_TWGSAMIN_TWGSAMIN000001_SNV.vcf.gz
script: test/assert_vcf.sh

- name: a_mini-two-tools
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/yaml/a_mini-vcf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 89998db

Please sign in to comment.