Skip to content

Commit

Permalink
[refs #119] Adds GATK v3.8 of MuTect2
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-welsh committed Jan 7, 2020
1 parent e7afedd commit 2a2004a
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions mutect/MuTect2.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
version 1.0
# -------------------------------------------------------------------------------------------------
# Package Name: MuTect v2, GATK v3.8.1
# Task Summary: Call somatic SNPs and indels via local re-assembly of haplotypes
# Tool Name: MuTect2
# -------------------------------------------------------------------------------------------------

task MuTect2 {
input {
File ? java
File gatk

File tumor_bam
File tumor_bam_idx
String sample_id

File ? normal_bam
File ? normal_bam_idx
String ? normal_sample_id

Array[File] intervals = []
Array[File] germline_resources = []

File reference
File reference_idx
File reference_dict

File ? panel_of_normals
String ? userString

Array[String] modules = []
Float memory = 64
Int cpu = 16
}

String output_vcf_name = sample_id + '.MuTect2.vcf'
Array[String] intervalOptions = prefix("--intervals ", intervals)
Array[String] germline_resourceOptions = prefix("--germline-resource ", germline_resources)

command {
set -Eeuxo pipefail;

for MODULE in ~{sep=' ' modules}; do
module load $MODULE
done;

~{default="java" java} -jar ~{gatk}
-T MuTect2 \
-R ~{reference} \
-I:tumor ~{tumor_bam} \
~{sep=" " intervalOptions} \
~{sep=" " germline_resourceOptions} \
~{"-I:normal " + normal_bam} \
~{userString} \
~{"--panel-of-normals " + panel_of_normals} \
-o ~{output_vcf_name};
}

output {
File vcf_file = "~{output_vcf_name}"
File vcf_idx_file = "~{output_vcf_name}" + ".idx"
}

runtime {
memory: memory * 1.5 + " GB"
cpu: cpu
}

parameter_meta {
gatk: "GATK <v4.0.0 jar file"
reference: "Reference sequence file."
reference_idx: "Reference sequence index (.fai)."
reference_dict: "Reference sequence dict (.dict)."
tumor_bam: "BAM file for tumor sample; required."
sample_id: "ID for the tumor_bam."
normal_bam: "BAM file for normal sample; not required"
normal_sample_id: "ID for the normal sample; required if normal_bam is provided"
panel_of_normals: "VCF built with MuTect2 CreateSomaticPanelOfNormals"
germline_resources: "VCF of other germline events, e.g. gnomAD, dbSNP, COSMIC, etc"
intervals: "One or more genomic intervals over which to operate."
sample_id: "tumor sample id; prefix for output files"
userString: "An optional parameter which allows the user to specify additions to the command line at run time."
memory: "GB of RAM to use at runtime."
cpu: "Number of CPUs to use at runtime."
}

meta {
author: "Mark Welsh"
email: "[email protected]"
gatk_version: "3.8.1"
version: "0.1.0"
}
}

0 comments on commit 2a2004a

Please sign in to comment.