Skip to content
Snippets Groups Projects
Commit 0e6bde49 authored by Ruben Vorderman's avatar Ruben Vorderman
Browse files

gatk to 1.0

parent 9249f3e2
No related branches found
No related tags found
1 merge request!34Move all files to version 1.0
version 1.0
# Apply Base Quality Score Recalibration (BQSR) model # Apply Base Quality Score Recalibration (BQSR) model
task ApplyBQSR { task ApplyBQSR {
String? preCommand input {
File? gatkJar String? preCommand
File inputBam File? gatkJar
File inputBamIndex File inputBam
String outputBamPath File inputBamIndex
File recalibrationReport String outputBamPath
Array[File]+ sequenceGroupInterval File recalibrationReport
File refDict Array[File]+ sequenceGroupInterval
File refFasta File refDict
File refFastaIndex File refFasta
Int? compressionLevel File refFastaIndex
Int? compressionLevel
Float? memory
Float? memoryMultiplier Float? memory
Float? memoryMultiplier
}
Int mem = ceil(select_first([memory, 4.0])) Int mem = ceil(select_first([memory, 4.0]))
...@@ -23,18 +26,18 @@ task ApplyBQSR { ...@@ -23,18 +26,18 @@ task ApplyBQSR {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ~{preCommand}
${toolCommand} \ ~{toolCommand} \
ApplyBQSR \ ApplyBQSR \
--create-output-bam-md5 \ --create-output-bam-md5 \
--add-output-sam-program-record \ --add-output-sam-program-record \
-R ${refFasta} \ -R ~{refFasta} \
-I ${inputBam} \ -I ~{inputBam} \
--use-original-qualities \ --use-original-qualities \
-O ${outputBamPath} \ -O ~{outputBamPath} \
-bqsr ${recalibrationReport} \ -bqsr ~{recalibrationReport} \
--static-quantized-quals 10 --static-quantized-quals 20 --static-quantized-quals 30 \ --static-quantized-quals 10 --static-quantized-quals 20 --static-quantized-quals 30 \
-L ${sep=" -L " sequenceGroupInterval} -L ~{sep=" -L " sequenceGroupInterval}
} }
output { output {
...@@ -49,19 +52,23 @@ task ApplyBQSR { ...@@ -49,19 +52,23 @@ task ApplyBQSR {
# Generate Base Quality Score Recalibration (BQSR) model # Generate Base Quality Score Recalibration (BQSR) model
task BaseRecalibrator { task BaseRecalibrator {
String? preCommand input {
File? gatkJar String? preCommand
File inputBam File? gatkJar
File inputBamIndex File inputBam
String recalibrationReportPath File inputBamIndex
Array[File]+ sequenceGroupInterval String recalibrationReportPath
Array[File]? knownIndelsSitesVCFs Array[File]+ sequenceGroupInterval
Array[File]? knownIndelsSitesIndices Array[File]? knownIndelsSitesVCFs
File? dbsnpVCF Array[File]? knownIndelsSitesIndices
File? dbsnpVCFindex File? dbsnpVCF
File refDict File? dbsnpVCFindex
File refFasta File refDict
File refFastaIndex File refFasta
File refFastaIndex
Float? memory
Float? memoryMultiplier
}
Array[File]+ knownIndelsSitesVCFsArg = flatten([ Array[File]+ knownIndelsSitesVCFsArg = flatten([
select_first([knownIndelsSitesVCFs, []]), select_first([knownIndelsSitesVCFs, []]),
...@@ -72,9 +79,6 @@ task BaseRecalibrator { ...@@ -72,9 +79,6 @@ task BaseRecalibrator {
select_all([dbsnpVCFindex]) select_all([dbsnpVCFindex])
]) ])
Float? memory
Float? memoryMultiplier
Int mem = ceil(select_first([memory, 4.0])) Int mem = ceil(select_first([memory, 4.0]))
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
...@@ -83,15 +87,15 @@ task BaseRecalibrator { ...@@ -83,15 +87,15 @@ task BaseRecalibrator {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ~{preCommand}
${toolCommand} \ ~{toolCommand} \
BaseRecalibrator \ BaseRecalibrator \
-R ${refFasta} \ -R ~{refFasta} \
-I ${inputBam} \ -I ~{inputBam} \
--use-original-qualities \ --use-original-qualities \
-O ${recalibrationReportPath} \ -O ~{recalibrationReportPath} \
--known-sites ${sep=" --known-sites " knownIndelsSitesVCFsArg} \ --known-sites ~{sep=" --known-sites " knownIndelsSitesVCFsArg} \
-L ${sep=" -L " sequenceGroupInterval} -L ~{sep=" -L " sequenceGroupInterval}
} }
output { output {
...@@ -104,22 +108,24 @@ task BaseRecalibrator { ...@@ -104,22 +108,24 @@ task BaseRecalibrator {
} }
task CombineGVCFs { task CombineGVCFs {
String? preCommand input {
Array[File]+ gvcfFiles String? preCommand
Array[File]+ gvcfFileIndexes Array[File]+ gvcfFiles
Array[File]+ intervals Array[File]+ gvcfFileIndexes
Array[File]+ intervals
String outputPath String outputPath
String? gatkJar String? gatkJar
File refFasta File refFasta
File refFastaIndex File refFastaIndex
File refDict File refDict
Int? compressionLevel Int? compressionLevel
Float? memory Float? memory
Float? memoryMultiplier Float? memoryMultiplier
}
Int mem = ceil(select_first([memory, 4.0])) Int mem = ceil(select_first([memory, 4.0]))
...@@ -129,18 +135,18 @@ task CombineGVCFs { ...@@ -129,18 +135,18 @@ task CombineGVCFs {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ~{preCommand}
if [ ${length(gvcfFiles)} -gt 1 ]; then if [ ~{length(gvcfFiles)} -gt 1 ]; then
${toolCommand} \ ~{toolCommand} \
CombineGVCFs \ CombineGVCFs \
-R ${refFasta} \ -R ~{refFasta} \
-O ${outputPath} \ -O ~{outputPath} \
-V ${sep=' -V ' gvcfFiles} \ -V ~{sep=' -V ' gvcfFiles} \
-L ${sep=' -L ' intervals} -L ~{sep=' -L ' intervals}
else # TODO this should be handeled in wdl else # TODO this should be handeled in wdl
ln -sf ${select_first(gvcfFiles)} ${outputPath} ln -sf ~{select_first(gvcfFiles)} ~{outputPath}
ln -sf ${select_first(gvcfFileIndexes)} ${outputPath}.tbi ln -sf ~{select_first(gvcfFileIndexes)} ~{outputPath}.tbi
fi fi
} }
...@@ -156,13 +162,15 @@ task CombineGVCFs { ...@@ -156,13 +162,15 @@ task CombineGVCFs {
# Combine multiple recalibration tables from scattered BaseRecalibrator runs # Combine multiple recalibration tables from scattered BaseRecalibrator runs
task GatherBqsrReports { task GatherBqsrReports {
String? preCommand input {
String? gatkJar String? preCommand
Array[File] inputBQSRreports String? gatkJar
String outputReportPath Array[File] inputBQSRreports
String outputReportPath
Float? memory
Float? memoryMultiplier Float? memory
Float? memoryMultiplier
}
Int mem = ceil(select_first([memory, 4.0])) Int mem = ceil(select_first([memory, 4.0]))
...@@ -172,11 +180,11 @@ task GatherBqsrReports { ...@@ -172,11 +180,11 @@ task GatherBqsrReports {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ~{preCommand}
${toolCommand} \ ~{toolCommand} \
GatherBQSRReports \ GatherBQSRReports \
-I ${sep=' -I ' inputBQSRreports} \ -I ~{sep=' -I ' inputBQSRreports} \
-O ${outputReportPath} -O ~{outputReportPath}
} }
output { output {
...@@ -189,25 +197,27 @@ task GatherBqsrReports { ...@@ -189,25 +197,27 @@ task GatherBqsrReports {
} }
task GenotypeGVCFs { task GenotypeGVCFs {
String? preCommand input {
File gvcfFiles String? preCommand
File gvcfFileIndexes File gvcfFiles
Array[File]+ intervals File gvcfFileIndexes
Array[File]+ intervals
String outputPath String outputPath
String? gatkJar String? gatkJar
File refFasta File refFasta
File refFastaIndex File refFastaIndex
File refDict File refDict
File? dbsnpVCF File? dbsnpVCF
File? dbsnpVCFindex File? dbsnpVCFindex
Int? compressionLevel Int? compressionLevel
Float? memory Float? memory
Float? memoryMultiplier Float? memoryMultiplier
}
Int mem = ceil(select_first([memory, 4.0])) Int mem = ceil(select_first([memory, 4.0]))
...@@ -217,18 +227,18 @@ task GenotypeGVCFs { ...@@ -217,18 +227,18 @@ task GenotypeGVCFs {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ~{preCommand}
${toolCommand} \ ~{toolCommand} \
GenotypeGVCFs \ GenotypeGVCFs \
-R ${refFasta} \ -R ~{refFasta} \
-O ${outputPath} \ -O ~{outputPath} \
${"-D " + dbsnpVCF} \ ~{"-D " + dbsnpVCF} \
-G StandardAnnotation \ -G StandardAnnotation \
--only-output-calls-starting-in-intervals \ --only-output-calls-starting-in-intervals \
-new-qual \ -new-qual \
-V ${gvcfFiles} \ -V ~{gvcfFiles} \
-L ${sep=' -L ' intervals} -L ~{sep=' -L ' intervals}
} }
output { output {
...@@ -243,23 +253,25 @@ task GenotypeGVCFs { ...@@ -243,23 +253,25 @@ task GenotypeGVCFs {
# Call variants on a single sample with HaplotypeCaller to produce a GVCF # Call variants on a single sample with HaplotypeCaller to produce a GVCF
task HaplotypeCallerGvcf { task HaplotypeCallerGvcf {
String? preCommand input {
Array[File]+ inputBams String? preCommand
Array[File]+ inputBamsIndex Array[File]+ inputBams
Array[File]+ intervalList Array[File]+ inputBamsIndex
String gvcfPath Array[File]+ intervalList
File refDict String gvcfPath
File refFasta File refDict
File refFastaIndex File refFasta
Float? contamination File refFastaIndex
Int? compressionLevel Float? contamination
String? gatkJar Int? compressionLevel
String? gatkJar
File? dbsnpVCF
File? dbsnpVCFindex File? dbsnpVCF
File? dbsnpVCFindex
Float? memory
Float? memoryMultiplier Float? memory
Float? memoryMultiplier
}
Int mem = ceil(select_first([memory, 4.0])) Int mem = ceil(select_first([memory, 4.0]))
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
...@@ -268,15 +280,15 @@ task HaplotypeCallerGvcf { ...@@ -268,15 +280,15 @@ task HaplotypeCallerGvcf {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ~{preCommand}
${toolCommand} \ ~{toolCommand} \
HaplotypeCaller \ HaplotypeCaller \
-R ${refFasta} \ -R ~{refFasta} \
-O ${gvcfPath} \ -O ~{gvcfPath} \
-I ${sep=" -I " inputBams} \ -I ~{sep=" -I " inputBams} \
-L ${sep=' -L ' intervalList} \ -L ~{sep=' -L ' intervalList} \
${"-D " + dbsnpVCF} \ ~{"-D " + dbsnpVCF} \
-contamination ${default=0 contamination} \ -contamination ~{default=0 contamination} \
-ERC GVCF -ERC GVCF
} }
...@@ -291,19 +303,21 @@ task HaplotypeCallerGvcf { ...@@ -291,19 +303,21 @@ task HaplotypeCallerGvcf {
} }
task SplitNCigarReads { task SplitNCigarReads {
String? preCommand input {
String? preCommand
File inputBam
File inputBamIndex File inputBam
File refFasta File inputBamIndex
File refFastaIndex File refFasta
File refDict File refFastaIndex
String outputBam File refDict
String? gatkJar String outputBam
Array[File]+ intervals String? gatkJar
Array[File]+ intervals
Float? memory
Float? memoryMultiplier Float? memory
Float? memoryMultiplier
}
Int mem = ceil(select_first([memory, 4.0])) Int mem = ceil(select_first([memory, 4.0]))
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
...@@ -312,13 +326,13 @@ task SplitNCigarReads { ...@@ -312,13 +326,13 @@ task SplitNCigarReads {
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ~{preCommand}
${toolCommand} \ ~{toolCommand} \
SplitNCigarReads \ SplitNCigarReads \
-I ${inputBam} \ -I ~{inputBam} \
-R ${refFasta} \ -R ~{refFasta} \
-O ${outputBam} \ -O ~{outputBam} \
-L ${sep=' -L ' intervals} -L ~{sep=' -L ' intervals}
} }
output { output {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment