Skip to content
This repository was archived by the owner on Jul 21, 2020. It is now read-only.

Commit 7794e87

Browse files
author
bshifaw
authored
Dev (#30)
* updated docker to 4.1.4.1, updated mutect.wdl to 4.1.4.1 gatk release
1 parent 92e942d commit 7794e87

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

mutect2.inputs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Mutect2.gatk_docker": "broadinstitute/gatk:4.1.4.0",
2+
"Mutect2.gatk_docker": "broadinstitute/gatk:4.1.4.1",
33

44
"Mutect2.intervals": "gs://gatk-best-practices/somatic-b37/whole_exome_agilent_1.1_refseq_plus_3_boosters.Homo_sapiens_assembly19.baits.interval_list",
55
"Mutect2.scatter_count": 50,

mutect2.wdl

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ workflow Mutect2 {
275275
276276
Int merged_vcf_size = ceil(size(M2.unfiltered_vcf, "GB"))
277277
Int merged_bamout_size = ceil(size(M2.output_bamOut, "GB"))
278-
Int merged_tumor_pileups_size = ceil(size(M2.tumor_pileups, "GB"))
279-
Int merged_normal_pileups_size = ceil(size(M2.tumor_pileups, "GB"))
280278
281279
if (run_ob_filter) {
282280
call LearnReadOrientationModel {
@@ -314,7 +312,7 @@ workflow Mutect2 {
314312
if (defined(variants_for_contamination)) {
315313
call MergePileupSummaries as MergeTumorPileups {
316314
input:
317-
input_tables = M2.tumor_pileups,
315+
input_tables = flatten(M2.tumor_pileups),
318316
output_name = output_basename,
319317
ref_dict = ref_dict,
320318
runtime_params = standard_runtime
@@ -323,7 +321,7 @@ workflow Mutect2 {
323321
if (defined(normal_bam)){
324322
call MergePileupSummaries as MergeNormalPileups {
325323
input:
326-
input_tables = M2.normal_pileups,
324+
input_tables = flatten(M2.normal_pileups),
327325
output_name = output_basename,
328326
ref_dict = ref_dict,
329327
runtime_params = standard_runtime
@@ -596,10 +594,15 @@ task M2 {
596594
~{true='--f1r2-tar-gz f1r2.tar.gz' false='' run_ob_filter} \
597595
~{m2_extra_args}
598596
597+
m2_exit_code=$?
598+
599599
### GetPileupSummaries
600-
# These must be created, even if they remain empty, as cromwell doesn't support optional output
601-
touch tumor-pileups.table
602-
touch normal-pileups.table
600+
601+
# If the variants for contamination and the intervals for this scatter don't intersect, GetPileupSummaries
602+
# throws an error. However, there is nothing wrong with an empty intersection for our purposes; it simply doesn't
603+
# contribute to the merged pileup summaries that we create downstream. We implement this by with array outputs.
604+
# If the tool errors, no table is created and the glob yields an empty array.
605+
set +e
603606
604607
if [[ ! -z "~{variants_for_contamination}" ]]; then
605608
gatk --java-options "-Xmx~{command_mem}m" GetPileupSummaries -R ~{ref_fasta} -I ~{tumor_bam} ~{"--interval-set-rule INTERSECTION -L " + intervals} \
@@ -610,6 +613,9 @@ task M2 {
610613
-V ~{variants_for_contamination} -L ~{variants_for_contamination} -O normal-pileups.table
611614
fi
612615
fi
616+
617+
# the script only fails if Mutect2 itself fails
618+
exit $m2_exit_code
613619
>>>
614620

615621
runtime {
@@ -630,8 +636,8 @@ task M2 {
630636
String normal_sample = read_string("normal_name.txt")
631637
File stats = "~{output_stats}"
632638
File f1r2_counts = "f1r2.tar.gz"
633-
File tumor_pileups = "tumor-pileups.table"
634-
File normal_pileups = "normal-pileups.table"
639+
Array[File] tumor_pileups = glob("*tumor-pileups.table")
640+
Array[File] normal_pileups = glob("*normal-pileups.table")
635641
}
636642
}
637643

@@ -726,7 +732,6 @@ task MergeStats {
726732
set -e
727733
export GATK_LOCAL_JAR=~{default="/root/gatk.jar" runtime_params.gatk_override}
728734
729-
730735
gatk --java-options "-Xmx~{runtime_params.command_mem}m" MergeMutectStats \
731736
-stats ~{sep=" -stats " stats} -O merged.stats
732737
}

mutect2_pon.inputs.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"Mutect2_Panel.pon_name":"panel_of_normal",
3-
"Mutect2_Panel.normal_bams":"Array[File]",
4-
"Mutect2_Panel.normal_bais":"Array[File]",
3+
"Mutect2_Panel.normal_bams":"Array[String]",
4+
"Mutect2_Panel.normal_bais":"Array[String]",
55

66
"Mutect2_Panel.ref_fasta":"gs://gatk-best-practices/somatic-b37/Homo_sapiens_assembly19.fasta",
77
"Mutect2_Panel.ref_fai":"gs://gatk-best-practices/somatic-b37/Homo_sapiens_assembly19.fasta.fai",
@@ -12,5 +12,5 @@
1212
"Mutect2_Panel.Mutect2.variants_for_contamination":"gs://gatk-best-practices/somatic-b37/small_exac_common_3.vcf",
1313
"Mutect2_Panel.gnomad":"gs://gatk-best-practices/somatic-b37/af-only-gnomad.raw.sites.vcf",
1414

15-
"Mutect2_Panel.gatk_docker":"broadinstitute/gatk:4.1.4.0"
15+
"Mutect2_Panel.gatk_docker":"broadinstitute/gatk:4.1.4.1"
1616
}

0 commit comments

Comments
 (0)