Skip to content
Snippets Groups Projects
Unverified Commit 99dbe5f3 authored by Ruben Vorderman's avatar Ruben Vorderman Committed by GitHub
Browse files

Merge pull request #24 from biowdl/BIOWDL-36

Changes after testing
parents e5b86e77 9305e435
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ task Classify { ...@@ -86,7 +86,7 @@ task Classify {
mkdir -p ${outputDir} mkdir -p ${outputDir}
${preCommand} ${preCommand}
centrifuge \ centrifuge \
${"-p " + threads} \ ${"-p " + select_first([threads, 4])} \
${"-x " + indexPrefix} \ ${"-x " + indexPrefix} \
${true="-f" false="" fastaInput} \ ${true="-f" false="" fastaInput} \
${true="-k" false="" defined(assignments)} ${assignments} \ ${true="-k" false="" defined(assignments)} ${assignments} \
...@@ -108,8 +108,8 @@ task Classify { ...@@ -108,8 +108,8 @@ task Classify {
} }
runtime { runtime {
cpu: select_first([threads, 1]) cpu: select_first([threads, 4])
memory: select_first([memory, 4]) memory: select_first([memory, 8])
} }
} }
......
...@@ -19,13 +19,12 @@ task ApplyBQSR { ...@@ -19,13 +19,12 @@ task ApplyBQSR {
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar then "java -Xmx" + mem + "G -jar " + gatkJar
else "gatk -Xmx" + mem + "G" else "gatk --java-options -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
${toolCommand} \ ${toolCommand} \
-Xms${mem}G -jar ${gatkJar} \
ApplyBQSR \ ApplyBQSR \
--create-output-bam-md5 \ --create-output-bam-md5 \
--add-output-sam-program-record \ --add-output-sam-program-record \
...@@ -56,12 +55,23 @@ task BaseRecalibrator { ...@@ -56,12 +55,23 @@ task BaseRecalibrator {
File inputBamIndex File inputBamIndex
String recalibrationReportPath String recalibrationReportPath
Array[File]+ sequenceGroupInterval Array[File]+ sequenceGroupInterval
Array[File]+ knownIndelsSitesVCFs Array[File]? knownIndelsSitesVCFs
Array[File]+ knownIndelsSitesIndices Array[File]? knownIndelsSitesIndices
File? dbsnpVCF
File? dbsnpVCFindex
File refDict File refDict
File refFasta File refFasta
File refFastaIndex File refFastaIndex
Array[File]+ knownIndelsSitesVCFsArg = flatten([
select_first([knownIndelsSitesVCFs, []]),
select_all([dbsnpVCF])
])
Array[File]+ knownIndelsSitesIndicesArg = flatten([
select_first([knownIndelsSitesIndices, []]),
select_all([dbsnpVCFindex])
])
Float? memory Float? memory
Float? memoryMultiplier Float? memoryMultiplier
...@@ -69,7 +79,7 @@ task BaseRecalibrator { ...@@ -69,7 +79,7 @@ task BaseRecalibrator {
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar then "java -Xmx" + mem + "G -jar " + gatkJar
else "gatk -Xmx" + mem + "G" else "gatk --java-options -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
...@@ -80,7 +90,7 @@ task BaseRecalibrator { ...@@ -80,7 +90,7 @@ task BaseRecalibrator {
-I ${inputBam} \ -I ${inputBam} \
--use-original-qualities \ --use-original-qualities \
-O ${recalibrationReportPath} \ -O ${recalibrationReportPath} \
--known-sites ${sep=" --known-sites " knownIndelsSitesVCFs} \ --known-sites ${sep=" --known-sites " knownIndelsSitesVCFsArg} \
-L ${sep=" -L " sequenceGroupInterval} -L ${sep=" -L " sequenceGroupInterval}
} }
...@@ -115,7 +125,7 @@ task CombineGVCFs { ...@@ -115,7 +125,7 @@ task CombineGVCFs {
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar then "java -Xmx" + mem + "G -jar " + gatkJar
else "gatk -Xmx" + mem + "G" else "gatk --java-options -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
...@@ -123,7 +133,6 @@ task CombineGVCFs { ...@@ -123,7 +133,6 @@ task CombineGVCFs {
if [ ${length(gvcfFiles)} -gt 1 ]; then if [ ${length(gvcfFiles)} -gt 1 ]; then
${toolCommand} \ ${toolCommand} \
-Xmx${mem}G -jar ${gatkJar} \
CombineGVCFs \ CombineGVCFs \
-R ${refFasta} \ -R ${refFasta} \
-O ${outputPath} \ -O ${outputPath} \
...@@ -159,7 +168,7 @@ task GatherBqsrReports { ...@@ -159,7 +168,7 @@ task GatherBqsrReports {
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar then "java -Xmx" + mem + "G -jar " + gatkJar
else "gatk -Xmx" + mem + "G" else "gatk --java-options -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
...@@ -193,8 +202,8 @@ task GenotypeGVCFs { ...@@ -193,8 +202,8 @@ task GenotypeGVCFs {
File refFastaIndex File refFastaIndex
File refDict File refDict
File dbsnpVCF File? dbsnpVCF
File dbsnpVCFindex File? dbsnpVCFindex
Int? compressionLevel Int? compressionLevel
Float? memory Float? memory
...@@ -204,18 +213,17 @@ task GenotypeGVCFs { ...@@ -204,18 +213,17 @@ task GenotypeGVCFs {
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar then "java -Xmx" + mem + "G -jar " + gatkJar
else "gatk -Xmx" + mem + "G" else "gatk --java-options -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
${toolCommand} \ ${toolCommand} \
-Xmx${mem}G -jar ${gatkJar} \
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 \
...@@ -247,24 +255,27 @@ task HaplotypeCallerGvcf { ...@@ -247,24 +255,27 @@ task HaplotypeCallerGvcf {
Int? compressionLevel Int? compressionLevel
String? gatkJar String? gatkJar
File? dbsnpVCF
File? dbsnpVCFindex
Float? memory Float? memory
Float? memoryMultiplier 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)
then "java -Xmx" + mem + "G -jar " + gatkJar then "java -Xmx" + mem + "G -jar " + gatkJar
else "gatk -Xmx" + mem + "G" else "gatk --java-options -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
${preCommand} ${preCommand}
${toolCommand} \ ${toolCommand} \
-Xmx${mem}G -jar ${gatkJar} \
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} \
-contamination ${default=0 contamination} \ -contamination ${default=0 contamination} \
-ERC GVCF -ERC GVCF
} }
...@@ -297,7 +308,7 @@ task SplitNCigarReads { ...@@ -297,7 +308,7 @@ task SplitNCigarReads {
String toolCommand = if defined(gatkJar) String toolCommand = if defined(gatkJar)
then "java -Xmx" + mem + "G -jar " + gatkJar then "java -Xmx" + mem + "G -jar " + gatkJar
else "gatk -Xmx" + mem + "G" else "gatk --java-options -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
......
...@@ -11,7 +11,7 @@ task ScatterIntervalList { ...@@ -11,7 +11,7 @@ task ScatterIntervalList {
String toolCommand = if defined(picardJar) String toolCommand = if defined(picardJar)
then "java -Xmx" + mem + "G -jar " + picardJar then "java -Xmx" + mem + "G -jar " + picardJar
else "gatk -Xmx" + mem + "G" else "picard -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
...@@ -52,7 +52,7 @@ task GatherBamFiles { ...@@ -52,7 +52,7 @@ task GatherBamFiles {
String toolCommand = if defined(picardJar) String toolCommand = if defined(picardJar)
then "java -Xmx" + mem + "G -jar " + picardJar then "java -Xmx" + mem + "G -jar " + picardJar
else "gatk -Xmx" + mem + "G" else "picard -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
...@@ -100,7 +100,7 @@ task MarkDuplicates { ...@@ -100,7 +100,7 @@ task MarkDuplicates {
String toolCommand = if defined(picardJar) String toolCommand = if defined(picardJar)
then "java -Xmx" + mem + "G -jar " + picardJar then "java -Xmx" + mem + "G -jar " + picardJar
else "gatk -Xmx" + mem + "G" else "picard -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
...@@ -148,7 +148,7 @@ task MergeVCFs { ...@@ -148,7 +148,7 @@ task MergeVCFs {
String toolCommand = if defined(picardJar) String toolCommand = if defined(picardJar)
then "java -Xmx" + mem + "G -jar " + picardJar then "java -Xmx" + mem + "G -jar " + picardJar
else "gatk -Xmx" + mem + "G" else "picard -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
...@@ -182,7 +182,7 @@ task SamToFastq { ...@@ -182,7 +182,7 @@ task SamToFastq {
String toolCommand = if defined(picardJar) String toolCommand = if defined(picardJar)
then "java -Xmx" + mem + "G -jar " + picardJar then "java -Xmx" + mem + "G -jar " + picardJar
else "gatk -Xmx" + mem + "G" else "picard -Xmx" + mem + "G"
command { command {
set -e -o pipefail set -e -o pipefail
......
...@@ -2,7 +2,7 @@ task Star { ...@@ -2,7 +2,7 @@ task Star {
String? preCommand String? preCommand
Array[File] inputR1 Array[File] inputR1
Array[File?] inputR2 Array[File]? inputR2
String genomeDir String genomeDir
String outFileNamePrefix String outFileNamePrefix
......
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