Newer
Older
input {
String? preCommand
File? gatkJar
File inputBam
File inputBamIndex
String outputBamPath
File recalibrationReport
Array[File]+ sequenceGroupInterval
File refDict
File refFasta
File refFastaIndex
Int? compressionLevel
Float? memory
Float? memoryMultiplier
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar
ApplyBQSR \
--create-output-bam-md5 \
--add-output-sam-program-record \
--static-quantized-quals 10 --static-quantized-quals 20 --static-quantized-quals 30 \
File recalibrated_bam = outputBamPath
File recalibrated_bam_checksum = outputBamPath + ".md5"
memory: ceil(mem * select_first([memoryMultiplier, 3.0]))
# Generate Base Quality Score Recalibration (BQSR) model
task BaseRecalibrator {
input {
String? preCommand
File? gatkJar
File inputBam
File inputBamIndex
String recalibrationReportPath
Array[File]+ sequenceGroupInterval
Array[File]? knownIndelsSitesVCFs
Array[File]? knownIndelsSitesIndices
File? dbsnpVCF
File? dbsnpVCFindex
File refDict
File refFasta
File refFastaIndex
Float? memory
Float? memoryMultiplier
}
Array[File]+ knownIndelsSitesVCFsArg = flatten([
select_first([knownIndelsSitesVCFs, []]),
select_all([dbsnpVCF])
])
Array[File]+ knownIndelsSitesIndicesArg = flatten([
select_first([knownIndelsSitesIndices, []]),
select_all([dbsnpVCFindex])
])
String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar
-O ~{recalibrationReportPath} \
--known-sites ~{sep=" --known-sites " knownIndelsSitesVCFsArg} \
-L ~{sep=" -L " sequenceGroupInterval}
memory: ceil(mem * select_first([memoryMultiplier, 3.0]))
input {
String? preCommand
Array[File]+ gvcfFiles
Array[File]+ gvcfFileIndexes
Array[File]+ intervals
Int? compressionLevel
Float? memory
Float? memoryMultiplier
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar
if [ ~{length(gvcfFiles)} -gt 1 ]; then
~{toolCommand} \
-R ~{refFasta} \
-O ~{outputPath} \
-V ~{sep=' -V ' gvcfFiles} \
-L ~{sep=' -L ' intervals}
ln -sf ~{select_first(gvcfFiles)} ~{outputPath}
ln -sf ~{select_first(gvcfFileIndexes)} ~{outputPath}.tbi
File outputGVCF = outputPath
File outputGVCFindex = outputPath + ".tbi"
memory: ceil(mem * select_first([memoryMultiplier, 3.0]))
# Combine multiple recalibration tables from scattered BaseRecalibrator runs
task GatherBqsrReports {
input {
String? preCommand
String? gatkJar
Array[File] inputBQSRreports
String outputReportPath
Float? memory
Float? memoryMultiplier
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar
-I ~{sep=' -I ' inputBQSRreports} \
-O ~{outputReportPath}
memory: ceil(mem * select_first([memoryMultiplier, 3.0]))
input {
String? preCommand
File gvcfFiles
File gvcfFileIndexes
Array[File]+ intervals
Int? compressionLevel
Float? memory
Float? memoryMultiplier
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar
-R ~{refFasta} \
-O ~{outputPath} \
~{"-D " + dbsnpVCF} \
-G StandardAnnotation \
--only-output-calls-starting-in-intervals \
-new-qual \
File outputVCF = outputPath
File outputVCFindex = outputPath + ".tbi"
memory: ceil(mem * select_first([memoryMultiplier, 3.0]))
# 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
File refDict
File refFasta
File refFastaIndex
Float? contamination
Int? compressionLevel
String? gatkJar
File? dbsnpVCF
File? dbsnpVCFindex
Float? memory
Float? memoryMultiplier
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar
-R ~{refFasta} \
-O ~{gvcfPath} \
-I ~{sep=" -I " inputBams} \
-L ~{sep=' -L ' intervalList} \
~{"-D " + dbsnpVCF} \
-contamination ~{default=0 contamination} \
memory: ceil(mem * select_first([memoryMultiplier, 3.0]))
input {
String? preCommand
File inputBam
File inputBamIndex
File refFasta
File refFastaIndex
File refDict
String outputBam
String? gatkJar
Array[File]+ intervals
Float? memory
Float? memoryMultiplier
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar
-I ~{inputBam} \
-R ~{refFasta} \
-O ~{outputBam} \
-L ~{sep=' -L ' intervals}
memory: ceil(mem * select_first([memoryMultiplier, 3.0]))