Skip to content
Snippets Groups Projects

Dockerize GATK. Scattering now works with containers. Tabix another docker image.

Merged Ruben Vorderman requested to merge BIOWDL-199 into develop
1 file
+ 21
79
Compare changes
  • Side-by-side
  • Inline
+ 21
79
@@ -5,8 +5,6 @@ import "common.wdl"
# Apply Base Quality Score Recalibration (BQSR) model
task ApplyBQSR {
input {
String? preCommand
File? gatkJar
IndexedBamFile inputBam
String outputBamPath
File recalibrationReport
@@ -18,26 +16,21 @@ task ApplyBQSR {
String dockerTag = "4.1.0.0--0"
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
ApplyBQSR \
--create-output-bam-md5 \
--add-output-sam-program-record \
-R ~{reference.fasta} \
-I ~{inputBam.file} \
--use-original-qualities \
-O ~{outputBamPath} \
-bqsr ~{recalibrationReport} \
--static-quantized-quals 10 \
--static-quantized-quals 20 \
--static-quantized-quals 30 \
-L ~{sep=" -L " sequenceGroupInterval}
gatk --java-options -Xmx~{memory}G \
ApplyBQSR \
--create-output-bam-md5 \
--add-output-sam-program-record \
-R ~{reference.fasta} \
-I ~{inputBam.file} \
--use-original-qualities \
-O ~{outputBamPath} \
-bqsr ~{recalibrationReport} \
--static-quantized-quals 10 \
--static-quantized-quals 20 \
--static-quantized-quals 30 \
-L ~{sep=" -L " sequenceGroupInterval}
}
output {
@@ -57,8 +50,6 @@ task ApplyBQSR {
# Generate Base Quality Score Recalibration (BQSR) model
task BaseRecalibrator {
input {
String? preCommand
File? gatkJar
IndexedBamFile inputBam
String recalibrationReportPath
Array[File]+ sequenceGroupInterval
@@ -76,14 +67,9 @@ task BaseRecalibrator {
[select_first([dbsnpVCF]).file]
])
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
gatk --java-options -Xmx~{memory}G \
BaseRecalibrator \
-R ~{reference.fasta} \
-I ~{inputBam.file} \
@@ -105,14 +91,12 @@ task BaseRecalibrator {
task CombineGVCFs {
input {
String? preCommand
Array[File]+ gvcfFiles
Array[File]+ gvcfFilesIndex
Array[File]+ intervals
String outputPath
String? gatkJar
Reference reference
@@ -121,14 +105,9 @@ task CombineGVCFs {
String dockerTag = "4.1.0.0--0"
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
gatk --java-options -Xmx~{memory}G \
CombineGVCFs \
-R ~{reference.fasta} \
-O ~{outputPath} \
@@ -152,8 +131,6 @@ task CombineGVCFs {
# Combine multiple recalibration tables from scattered BaseRecalibrator runs
task GatherBqsrReports {
input {
String? preCommand
String? gatkJar
Array[File] inputBQSRreports
String outputReportPath
@@ -162,14 +139,9 @@ task GatherBqsrReports {
String dockerTag = "4.1.0.0--0"
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
gatk --java-options -Xmx~{memory}G \
GatherBQSRReports \
-I ~{sep=' -I ' inputBQSRreports} \
-O ~{outputReportPath}
@@ -187,15 +159,12 @@ task GatherBqsrReports {
task GenotypeGVCFs {
input {
String? preCommand
Array[File]+ gvcfFiles
Array[File]+ gvcfFilesIndex
Array[File]+ intervals
String outputPath
String? gatkJar
Reference reference
IndexedVcfFile? dbsnpVCF
@@ -207,14 +176,9 @@ task GenotypeGVCFs {
File dbsnpFile = if (defined(dbsnpVCF)) then select_first([dbsnpVCF]).file else ""
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
gatk --java-options -Xmx~{memory}G \
GenotypeGVCFs \
-R ~{reference.fasta} \
-O ~{outputPath} \
@@ -242,14 +206,12 @@ task GenotypeGVCFs {
# Call variants on a single sample with HaplotypeCaller to produce a GVCF
task HaplotypeCallerGvcf {
input {
String? preCommand
Array[File]+ inputBams
Array[File]+ inputBamsIndex
Array[File]+ intervalList
String gvcfPath
Reference reference
Float contamination = 0.0
String? gatkJar
IndexedVcfFile? dbsnpVCF
@@ -260,15 +222,11 @@ task HaplotypeCallerGvcf {
File dbsnpFile = if (defined(dbsnpVCF)) then select_first([dbsnpVCF]).file else ""
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
mkdir -p $(dirname ~{gvcfPath})
~{preCommand}
gatk --java-options -Xmx~{memory}G HaplotypeCaller \
gatk --java-options -Xmx~{memory}G \
HaplotypeCaller \
-R ~{reference.fasta} \
-O ~{gvcfPath} \
-I ~{sep=" -I " inputBams} \
@@ -293,8 +251,6 @@ task HaplotypeCallerGvcf {
task MuTect2 {
input {
String? preCommand
Array[File]+ inputBams
Array[File]+ inputBamsIndex
Reference reference
@@ -303,20 +259,14 @@ task MuTect2 {
String? normalSample
Array[File]+ intervals
String? gatkJar
Int memory = 4
Float memoryMultiplier = 3
String dockerTag = "4.1.0.0--0"
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
gatk --java-options -Xmx~{memory}G \
Mutect2 \
-R ~{reference.fasta} \
-I ~{sep=" -I " inputBams} \
@@ -341,12 +291,9 @@ task MuTect2 {
task SplitNCigarReads {
input {
String? preCommand
IndexedBamFile inputBam
Reference reference
String outputBam
String? gatkJar
Array[File]+ intervals
Int memory = 4
@@ -354,14 +301,9 @@ task SplitNCigarReads {
String dockerTag = "4.1.0.0--0"
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
gatk --java-options -Xmx~{memory}G \
SplitNCigarReads \
-I ~{inputBam.file} \
-R ~{reference.fasta} \
Loading