Skip to content
Snippets Groups Projects
Commit 0d3ab44c authored by ffinfo's avatar ffinfo
Browse files

Fixing validate issues

parent 700b25aa
No related branches found
No related tags found
1 merge request!61Switch to structs
...@@ -61,7 +61,8 @@ task BaseRecalibrator { ...@@ -61,7 +61,8 @@ task BaseRecalibrator {
IndexedBamFile inputBam IndexedBamFile inputBam
String recalibrationReportPath String recalibrationReportPath
Array[File]+ sequenceGroupInterval Array[File]+ sequenceGroupInterval
Array[IndexedVcfFile]? knownIndelsSitesVCFs Array[File]? knownIndelsSitesVCFs
Array[File]? knownIndelsSitesVCFIndexes
IndexedVcfFile? dbsnpVCF IndexedVcfFile? dbsnpVCF
Reference reference Reference reference
Int memory = 4 Int memory = 4
...@@ -69,8 +70,8 @@ task BaseRecalibrator { ...@@ -69,8 +70,8 @@ task BaseRecalibrator {
} }
Array[File]+ knownIndelsSitesVCFsArg = flatten([ Array[File]+ knownIndelsSitesVCFsArg = flatten([
select_first([knownIndelsSitesVCFs.file, []]), select_first([knownIndelsSitesVCFs, []]),
select_all([dbsnpVCF.file]) [select_first([dbsnpVCF]).file]
]) ])
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
...@@ -185,7 +186,8 @@ task GatherBqsrReports { ...@@ -185,7 +186,8 @@ task GatherBqsrReports {
task GenotypeGVCFs { task GenotypeGVCFs {
input { input {
String? preCommand String? preCommand
Array[IndexedVcfFile] gvcfFiles Array[File]+ gvcfFiles
Array[File]+ gvcfFileIndex
Array[File]+ intervals Array[File]+ intervals
String outputPath String outputPath
...@@ -200,6 +202,8 @@ task GenotypeGVCFs { ...@@ -200,6 +202,8 @@ task GenotypeGVCFs {
Float memoryMultiplier =3.0 Float memoryMultiplier =3.0
} }
String dbsnpArg = if defined(dbsnpVCF) then "-D " + select_first([dbsnpVCF]).file else ""
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G" else "gatk --java-options -Xmx" + memory + "G"
...@@ -211,11 +215,11 @@ task GenotypeGVCFs { ...@@ -211,11 +215,11 @@ task GenotypeGVCFs {
GenotypeGVCFs \ GenotypeGVCFs \
-R ~{reference.fasta} \ -R ~{reference.fasta} \
-O ~{outputPath} \ -O ~{outputPath} \
~{"-D " + dbsnpVCF.file} \ ~{dbsnpArg} \
-G StandardAnnotation \ -G StandardAnnotation \
--only-output-calls-starting-in-intervals \ --only-output-calls-starting-in-intervals \
-new-qual \ -new-qual \
-V ~{sep=' -V ' gvcfFiles.file} \ -V ~{sep=' -V ' gvcfFiles} \
-L ~{sep=' -L ' intervals} -L ~{sep=' -L ' intervals}
} }
...@@ -235,7 +239,8 @@ task GenotypeGVCFs { ...@@ -235,7 +239,8 @@ task GenotypeGVCFs {
task HaplotypeCallerGvcf { task HaplotypeCallerGvcf {
input { input {
String? preCommand String? preCommand
Array[IndexedBamFile]+ inputBams Array[File]+ inputBams
Array[File]+ inputBamsIndex
Array[File]+ intervalList Array[File]+ intervalList
String gvcfPath String gvcfPath
Reference reference Reference reference
...@@ -248,6 +253,8 @@ task HaplotypeCallerGvcf { ...@@ -248,6 +253,8 @@ task HaplotypeCallerGvcf {
Float memoryMultiplier = 3 Float memoryMultiplier = 3
} }
String dbsnpArg = if (defined(dbsnpVCF)) then "-D " + select_first([dbsnpVCF]).file else ""
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G" else "gatk --java-options -Xmx" + memory + "G"
...@@ -259,9 +266,9 @@ task HaplotypeCallerGvcf { ...@@ -259,9 +266,9 @@ task HaplotypeCallerGvcf {
HaplotypeCaller \ HaplotypeCaller \
-R ~{reference.fasta} \ -R ~{reference.fasta} \
-O ~{gvcfPath} \ -O ~{gvcfPath} \
-I ~{sep=" -I " inputBams.file} \ -I ~{sep=" -I " inputBams} \
-L ~{sep=' -L ' intervalList} \ -L ~{sep=' -L ' intervalList} \
~{"-D " + dbsnpVCF.file} \ ~{dbsnpArg} \
-contamination ~{contamination} \ -contamination ~{contamination} \
-ERC GVCF -ERC GVCF
} }
...@@ -282,7 +289,8 @@ task MuTect2 { ...@@ -282,7 +289,8 @@ task MuTect2 {
input { input {
String? preCommand String? preCommand
Array[IndexedBamFile]+ inputBams Array[File]+ inputBams
Array[File]+ inputBamsIndex
Reference reference Reference reference
String outputVcf String outputVcf
String tumorSample String tumorSample
...@@ -304,7 +312,7 @@ task MuTect2 { ...@@ -304,7 +312,7 @@ task MuTect2 {
~{toolCommand} \ ~{toolCommand} \
Mutect2 \ Mutect2 \
-R ~{reference.fasta} \ -R ~{reference.fasta} \
-I ~{sep=" -I " inputBams.file} \ -I ~{sep=" -I " inputBams} \
-tumor ~{tumorSample} \ -tumor ~{tumorSample} \
~{"-normal " + normalSample} \ ~{"-normal " + normalSample} \
-O ~{outputVcf} \ -O ~{outputVcf} \
......
...@@ -203,7 +203,7 @@ task CollectTargetedPcrMetrics { ...@@ -203,7 +203,7 @@ task CollectTargetedPcrMetrics {
task GatherBamFiles { task GatherBamFiles {
input { input {
String? preCommand String? preCommand
Array[IndexedBamFile]+ inputBams Array[File]+ inputBams
String outputBamPath String outputBamPath
String? picardJar String? picardJar
...@@ -220,7 +220,7 @@ task GatherBamFiles { ...@@ -220,7 +220,7 @@ task GatherBamFiles {
~{preCommand} ~{preCommand}
~{toolCommand} \ ~{toolCommand} \
GatherBamFiles \ GatherBamFiles \
INPUT=~{sep=' INPUT=' inputBams.file} \ INPUT=~{sep=' INPUT=' inputBams} \
OUTPUT=~{outputBamPath} \ OUTPUT=~{outputBamPath} \
CREATE_INDEX=true \ CREATE_INDEX=true \
CREATE_MD5_FILE=true CREATE_MD5_FILE=true
...@@ -243,7 +243,8 @@ task GatherBamFiles { ...@@ -243,7 +243,8 @@ task GatherBamFiles {
task MarkDuplicates { task MarkDuplicates {
input { input {
String? preCommand String? preCommand
Array[IndexedBamFile] inputBams Array[File]+ inputBams
Array[File] inputBamIndexes
String outputBamPath String outputBamPath
String metricsPath String metricsPath
String? picardJar String? picardJar
...@@ -271,7 +272,7 @@ task MarkDuplicates { ...@@ -271,7 +272,7 @@ task MarkDuplicates {
mkdir -p $(dirname ~{outputBamPath}) mkdir -p $(dirname ~{outputBamPath})
~{toolCommand} \ ~{toolCommand} \
MarkDuplicates \ MarkDuplicates \
INPUT=~{sep=' INPUT=' inputBams.file} \ INPUT=~{sep=' INPUT=' inputBams} \
OUTPUT=~{outputBamPath} \ OUTPUT=~{outputBamPath} \
METRICS_FILE=~{metricsPath} \ METRICS_FILE=~{metricsPath} \
VALIDATION_STRINGENCY=SILENT \ VALIDATION_STRINGENCY=SILENT \
......
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