Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tasks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
biowdl
tasks
Commits
32581162
Commit
32581162
authored
6 years ago
by
ffinfo
Browse files
Options
Downloads
Patches
Plain Diff
Switch to structs
parent
8dfa702f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!61
Switch to structs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gatk.wdl
+64
-77
64 additions, 77 deletions
gatk.wdl
with
64 additions
and
77 deletions
gatk.wdl
+
64
−
77
View file @
32581162
version 1.0
import "common.wdl"
# Apply Base Quality Score Recalibration (BQSR) model
task ApplyBQSR {
input {
String? preCommand
File? gatkJar
File inputBam
File inputBamIndex
IndexedBamFile inputBam
String outputBamPath
File recalibrationReport
Array[File]+ sequenceGroupInterval
File refDict
File refFasta
File refFastaIndex
Reference reference
Int? compressionLevel
Int memory = 4
...
...
@@ -30,8 +29,8 @@ task ApplyBQSR {
ApplyBQSR \
--create-output-bam-md5 \
--add-output-sam-program-record \
-R ~{ref
F
asta} \
-I ~{inputBam} \
-R ~{ref
erence.f
asta} \
-I ~{inputBam
.file
} \
--use-original-qualities \
-O ~{outputBamPath} \
-bqsr ~{recalibrationReport} \
...
...
@@ -42,7 +41,11 @@ task ApplyBQSR {
}
output {
File recalibrated_bam = outputBamPath
IndexedBamFile recalibrated_bam = {
"file": outputBamPath,
"index": sub(outputBamPath, "\.bam$", ".bai")
}
File recalibrated_bam_checksum = outputBamPath + ".md5"
}
...
...
@@ -56,28 +59,19 @@ task BaseRecalibrator {
input {
String? preCommand
File? gatkJar
File inputBam
File inputBamIndex
IndexedBamFile inputBam
String recalibrationReportPath
Array[File]+ sequenceGroupInterval
Array[File]? knownIndelsSitesVCFs
Array[File]? knownIndelsSitesIndices
File? dbsnpVCF
File? dbsnpVCFindex
File refDict
File refFasta
File refFastaIndex
Array[IndexedVcfFile]? knownIndelsSitesVCFs
IndexedVcfFile? dbsnpVCF
Reference reference
Int memory = 4
Float memoryMultiplier = 3.0
}
Array[File]+ knownIndelsSitesVCFsArg = flatten([
select_first([knownIndelsSitesVCFs, []]),
select_all([dbsnpVCF])
])
Array[File]+ knownIndelsSitesIndicesArg = flatten([
select_first([knownIndelsSitesIndices, []]),
select_all([dbsnpVCFindex])
select_first([knownIndelsSitesVCFs.file, []]),
select_all([dbsnpVCF.file])
])
String toolCommand = if defined(gatkJar)
...
...
@@ -89,8 +83,8 @@ task BaseRecalibrator {
~{preCommand}
~{toolCommand} \
BaseRecalibrator \
-R ~{ref
F
asta} \
-I ~{inputBam} \
-R ~{ref
erence.f
asta} \
-I ~{inputBam
.file
} \
--use-original-qualities \
-O ~{recalibrationReportPath} \
--known-sites ~{sep=" --known-sites " knownIndelsSitesVCFsArg} \
...
...
@@ -109,17 +103,14 @@ task BaseRecalibrator {
task CombineGVCFs {
input {
String? preCommand
Array[File]+ gvcfFiles
Array[File]+ gvcfFileIndexes
Array[IndexedVcfFile]+ gvcfFiles
Array[File]+ intervals
String outputPath
String? gatkJar
File refFasta
File refFastaIndex
File refDict
Reference reference
Int? compressionLevel #TODO This isn't being used?
Int memory = 4
...
...
@@ -137,19 +128,21 @@ task CombineGVCFs {
if [ ~{length(gvcfFiles)} -gt 1 ]; then
~{toolCommand} \
CombineGVCFs \
-R ~{ref
F
asta} \
-R ~{ref
erence.f
asta} \
-O ~{outputPath} \
-V ~{sep=' -V ' gvcfFiles} \
-L ~{sep=' -L ' intervals}
else # TODO this should be handeled in wdl
ln -sf ~{gvcfFiles[0]} ~{outputPath}
ln -sf ~{gvcfFile
Indexes[0]
} ~{outputPath}.tbi
ln -sf ~{gvcfFiles[0]
.file
} ~{outputPath}
ln -sf ~{gvcfFile
s[0].index
} ~{outputPath}.tbi
fi
}
output {
File outputGVCF = outputPath
File outputGVCFindex = outputPath + ".tbi"
IndexedVcfFile outputVCF = {
"file": outputPath,
"index": outputPath + ".tbi"
}
}
runtime {
...
...
@@ -194,20 +187,16 @@ task GatherBqsrReports {
task GenotypeGVCFs {
input {
String? preCommand
File gvcfFiles
File gvcfFileIndexes
Array[IndexedVcfFile] gvcfFiles
Array[File]+ intervals
String outputPath
String? gatkJar
File refFasta
File refFastaIndex
File refDict
Reference reference
File? dbsnpVCF
File? dbsnpVCFindex
IndexedVcfFile? dbsnpVCF
Int? compressionLevel
Int memory = 4
...
...
@@ -223,19 +212,21 @@ task GenotypeGVCFs {
~{preCommand}
~{toolCommand} \
GenotypeGVCFs \
-R ~{ref
F
asta} \
-R ~{ref
erence.f
asta} \
-O ~{outputPath} \
~{"-D " + dbsnpVCF} \
~{"-D " + dbsnpVCF
.file
} \
-G StandardAnnotation \
--only-output-calls-starting-in-intervals \
-new-qual \
-V ~{gvcfFiles} \
-V ~{
sep=' -V '
gvcfFiles
.file
} \
-L ~{sep=' -L ' intervals}
}
output {
File outputVCF = outputPath
File outputVCFindex = outputPath + ".tbi"
IndexedVcfFile outputVCF = {
"file": outputPath,
"index": outputPath + ".tbi"
}
}
runtime{
...
...
@@ -247,19 +238,15 @@ task GenotypeGVCFs {
task HaplotypeCallerGvcf {
input {
String? preCommand
Array[File]+ inputBams
Array[File]+ inputBamsIndex
Array[IndexedBamFile]+ inputBams
Array[File]+ intervalList
String gvcfPath
File refDict
File refFasta
File refFastaIndex
Reference reference
Float contamination = 0.0
Int? compressionLevel
String? gatkJar
File? dbsnpVCF
File? dbsnpVCFindex
IndexedVcfFile? dbsnpVCF
Int memory = 4
Float memoryMultiplier = 3
...
...
@@ -274,18 +261,20 @@ task HaplotypeCallerGvcf {
~{preCommand}
~{toolCommand} \
HaplotypeCaller \
-R ~{ref
F
asta} \
-R ~{ref
erence.f
asta} \
-O ~{gvcfPath} \
-I ~{sep=" -I " inputBams} \
-I ~{sep=" -I " inputBams
.file
} \
-L ~{sep=' -L ' intervalList} \
~{"-D " + dbsnpVCF} \
~{"-D " + dbsnpVCF
.file
} \
-contamination ~{contamination} \
-ERC GVCF
}
output {
File outputGVCF = gvcfPath
File outputGVCFindex = gvcfPath + ".tbi"
IndexedVcfFile outputGVCF = {
"file": gvcfPath,
"index": gvcfPath + ".tbi"
}
}
runtime {
...
...
@@ -297,11 +286,8 @@ task MuTect2 {
input {
String? preCommand
Array[File]+ inputBams
Array[File]+ inputBamIndex
File refFasta
File refFastaIndex
File refDict
Array[IndexedBamFile]+ inputBams
Reference reference
String outputVcf
String tumorSample
String? normalSample
...
...
@@ -321,8 +307,8 @@ task MuTect2 {
~{preCommand}
~{toolCommand} \
Mutect2 \
-R ~{ref
F
asta} \
-I ~{sep=" -I " inputBams} \
-R ~{ref
erence.f
asta} \
-I ~{sep=" -I " inputBams
.file
} \
-tumor ~{tumorSample} \
~{"-normal " + normalSample} \
-O ~{outputVcf} \
...
...
@@ -330,8 +316,10 @@ task MuTect2 {
}
output {
File vcfFile = outputVcf
File vcfIndex = outputVcf + ".tbi"
IndexedVcfFile vcfFile = {
"file": outputVcf,
"index": outputVcf + ".tbi"
}
}
runtime {
...
...
@@ -343,11 +331,8 @@ task SplitNCigarReads {
input {
String? preCommand
File inputBam
File inputBamIndex
File refFasta
File refFastaIndex
File refDict
IndexedBamFile inputBam
Reference reference
String outputBam
String? gatkJar
Array[File]+ intervals
...
...
@@ -365,15 +350,17 @@ task SplitNCigarReads {
~{preCommand}
~{toolCommand} \
SplitNCigarReads \
-I ~{inputBam} \
-R ~{ref
F
asta} \
-I ~{inputBam
.file
} \
-R ~{ref
erence.f
asta} \
-O ~{outputBam} \
-L ~{sep=' -L ' intervals}
}
output {
File bam = outputBam
File bamIndex = sub(outputBam, "\.bam$", ".bai")
IndexedBamFile bam = {
"file": outputBam,
"index": sub(outputBam, "\.bam$", ".bai")
}
}
runtime {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment