Skip to content

Commit

Permalink
Add error message if mutect2 and no_intervals is used. Test for it
Browse files Browse the repository at this point in the history
  • Loading branch information
FriederikeHanssen committed May 16, 2022
1 parent 6a42379 commit 14457ba
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 37 deletions.
59 changes: 22 additions & 37 deletions tests/test_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,24 +304,17 @@
- path: results/variant_calling/sample2/mutect2/sample2.filtered.vcf.gz.tbi
- path: results/variant_calling/sample2/mutect2/sample2.filtered.vcf.gz.filteringStats.tsv

# - name: Run variant calling on tumoronly sample with mutect2 without intervals
# command: nextflow run main.nf -profile test,tools_tumoronly,docker --tools mutect2 --no_intervals
# tags:
# - mutect2
# - no_intervals
# - tumor_only
# - variant_calling
# files:
# - path: results/variant_calling/sample2/mutect2/sample2.vcf.gz
# - path: results/variant_calling/sample2/mutect2/sample2.vcf.gz.tbi
# - path: results/variant_calling/sample2/mutect2/sample2.vcf.gz.stats
# - path: results/variant_calling/sample2/mutect2/sample2.contamination.table
# - path: results/variant_calling/sample2/mutect2/sample2.segmentation.table
# - path: results/variant_calling/sample2/mutect2/sample2.learnreadorientationmodel.tar.gz
# - path: results/variant_calling/sample2/mutect2/sample2.pileups.table
# - path: results/variant_calling/sample2/mutect2/sample2.filtered.vcf.gz
# - path: results/variant_calling/sample2/mutect2/sample2.filtered.vcf.gz.tbi
# - path: results/variant_calling/sample2/mutect2/sample2.filtered.vcf.gz.filteringStats.tsv
- name: Run variant calling on tumoronly sample with mutect2 without intervals
command: nextflow run main.nf -profile test,tools_tumoronly,docker --tools mutect2 --no_intervals
tags:
- mutect2
- no_intervals
- tumor_only
- variant_calling
exit_code: 1
stdout:
contains:
- "--tools mutect2 and --no_intervals cannot be used together."

- name: Run variant calling on somatic sample with mutect2
command: nextflow run main.nf -profile test,tools_somatic,docker --tools mutect2 -c ./tests/nextflow.config
Expand All @@ -342,25 +335,17 @@
- path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.filtered.vcf.gz.tbi
- path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.filtered.vcf.gz.filteringStats.tsv

# - name: Run variant calling on somatic sample with mutect2 without intervals
# command: nextflow run main.nf -profile test,tools_somatic,docker --tools mutect2 --no_intervals
# tags:
# - mutect2
# - no_intervals
# - somatic
# - variant_calling
# files:
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.vcf.gz
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.vcf.gz.tbi
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.vcf.gz.stats
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.contamination.table
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.segmentation.table
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample3.pileups.table
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4.pileups.table
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.learnreadorientationmodel.tar.gz
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.filtered.vcf.gz
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.filtered.vcf.gz.tbi
# - path: results/variant_calling/sample4_vs_sample3/mutect2/sample4_vs_sample3.filtered.vcf.gz.filteringStats.tsv
- name: Run variant calling on somatic sample with mutect2 without intervals
command: nextflow run main.nf -profile test,tools_somatic,docker --tools mutect2 --no_intervals
tags:
- mutect2
- no_intervals
- somatic
- variant_calling
exit_code: 1
stdout:
contains:
- "--tools mutect2 and --no_intervals cannot be used together."

- name: Run variant calling on somatic sample with msisensor-pro
command: nextflow run main.nf -profile test,tools_somatic,docker --tools msisensorpro
Expand Down
5 changes: 5 additions & 0 deletions workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ if (params.wes) {
if (params.intervals && !params.intervals.endsWith("bed") && !params.intervals.endsWith("interval_list")) exit 1, "Interval file must end with .bed or .interval_list"
}


if(params.tools && params.tools.contains('mutect2') && params.no_intervals){
log.error "--tools mutect2 and --no_intervals cannot be used together.\nOne of the tools within the Mutect2 subworkflow requires intervals. They can be provided to the pipeline with --intervals. If none are provided, they will be generated from the FASTA file.\nFor more information on the Mutect2 workflow, see here: https://gatk.broadinstitute.org/hc/en-us/articles/360035531132--How-to-Call-somatic-mutations-using-GATK4-Mutect2.\nFor more information on GetPileupsummaries, see here: https://gatk.broadinstitute.org/hc/en-us/articles/5358860217115-GetPileupSummaries"
exit 1
}
// Save AWS IGenomes file containing annotation version
def anno_readme = params.genomes[params.genome]?.readme
if (anno_readme && file(anno_readme).exists()) {
Expand Down

0 comments on commit 14457ba

Please sign in to comment.