diff --git a/bwa.wdl b/bwa.wdl index 2d9502efc25d1aaa23c5d04b3299edb83894c4ef..e97ae481fc592b2ecdfb91c9f53049de32d7530f 100644 --- a/bwa.wdl +++ b/bwa.wdl @@ -1,4 +1,4 @@ -task BwaMem { +task mem { String? preCommand File inputR1 File? inputR2 @@ -10,6 +10,7 @@ task BwaMem { Int? threads Int? memory + command { set -e -o pipefail mkdir -p $(dirname ${outputPath}) @@ -23,8 +24,8 @@ task BwaMem { File bamFile = outputPath } runtime{ - cpu: if defined(threads) then threads else 1 - memory: if defined(memory) then memory else 8 + cpu: select_first([threads,1]) + memory: select_first([memory,8]) } }