Newer
Older
String outputBamPath
File recalibrationReport
Array[File]+ sequenceGroupInterval
Int memory = 4
Float memoryMultiplier = 3.0
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
ApplyBQSR \
--create-output-bam-md5 \
--add-output-sam-program-record \
--use-original-qualities \
-O ~{outputBamPath} \
-bqsr ~{recalibrationReport} \
--static-quantized-quals 10 \
--static-quantized-quals 20 \
--static-quantized-quals 30 \
-L ~{sep=" -L " sequenceGroupInterval}
IndexedBamFile recalibrated_bam = {
"file": outputBamPath,
"index": sub(outputBamPath, "\.bam$", ".bai")
}
memory: ceil(memory * memoryMultiplier)
# Generate Base Quality Score Recalibration (BQSR) model
task BaseRecalibrator {
String recalibrationReportPath
Array[File]+ sequenceGroupInterval
Array[File]? knownIndelsSitesVCFs
Array[File]? knownIndelsSitesVCFIndexes
Int memory = 4
Float memoryMultiplier = 3.0
select_first([knownIndelsSitesVCFs, []]),
[select_first([dbsnpVCF]).file]
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
--use-original-qualities \
-O ~{recalibrationReportPath} \
--known-sites ~{sep=" --known-sites " knownIndelsSitesVCFsArg} \
-L ~{sep=" -L " sequenceGroupInterval}
memory: ceil(memory * memoryMultiplier)
Int memory = 4
Float memoryMultiplier = 3.0
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
if [ ~{length(gvcfFiles)} -gt 1 ]; then
~{toolCommand} \
-O ~{outputPath} \
-V ~{sep=' -V ' gvcfFiles} \
-L ~{sep=' -L ' intervals}
ln -sf ~{gvcfFiles[0].file} ~{outputPath}
ln -sf ~{gvcfFiles[0].index} ~{outputPath}.tbi
IndexedVcfFile outputVCF = {
"file": outputPath,
"index": outputPath + ".tbi"
}
memory: ceil(memory * memoryMultiplier)
# Combine multiple recalibration tables from scattered BaseRecalibrator runs
task GatherBqsrReports {
input {
String? preCommand
String? gatkJar
Array[File] inputBQSRreports
String outputReportPath
Int memory = 4
Float memoryMultiplier = 3.0
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
-I ~{sep=' -I ' inputBQSRreports} \
-O ~{outputReportPath}
memory: ceil(memory * memoryMultiplier)
Int memory = 4
Float memoryMultiplier =3.0
String dbsnpArg = if defined(dbsnpVCF) then "-D " + select_first([dbsnpVCF]).file else ""
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
-G StandardAnnotation \
--only-output-calls-starting-in-intervals \
-new-qual \
-L ~{sep=' -L ' intervals}
IndexedVcfFile outputVCF = {
"file": outputPath,
"index": outputPath + ".tbi"
}
memory: ceil(memory * memoryMultiplier)
# Call variants on a single sample with HaplotypeCaller to produce a GVCF
task HaplotypeCallerGvcf {
Int memory = 4
Float memoryMultiplier = 3
String dbsnpArg = if (defined(dbsnpVCF)) then "-D " + select_first([dbsnpVCF]).file else ""
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
-L ~{sep=' -L ' intervalList} \
-contamination ~{contamination} \
-ERC GVCF
IndexedVcfFile outputGVCF = {
"file": gvcfPath,
"index": gvcfPath + ".tbi"
}
memory: ceil(memory * memoryMultiplier)
String outputVcf
String tumorSample
String? normalSample
Array[File]+ intervals
String? gatkJar
Int memory = 4
Float memoryMultiplier = 3
}
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} \
Mutect2 \
-tumor ~{tumorSample} \
~{"-normal " + normalSample} \
-O ~{outputVcf} \
-L ~{sep=" -L " intervals}
}
output {
IndexedVcfFile vcfFile = {
"file": outputVcf,
"index": outputVcf + ".tbi"
}
}
runtime {
memory: ceil(memory * memoryMultiplier)
}
}
String outputBam
String? gatkJar
Array[File]+ intervals
Int memory = 4
Float memoryMultiplier = 3
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
IndexedBamFile bam = {
"file": outputBam,
"index": sub(outputBam, "\.bam$", ".bai")
}
memory: ceil(memory * memoryMultiplier)