diff --git a/biopet.wdl b/biopet.wdl index 2eb29883099fcf2664e3de86a1f90d87b9ffdba6..3ae549023b278f5ae9ddb2c43c5e42db5690a80b 100644 --- a/biopet.wdl +++ b/biopet.wdl @@ -32,11 +32,14 @@ task ScatterRegions { Int? scatterSize File? regions + Float? memory + Float? memoryMultiplier + command { set -e -o pipefail ${preCommand} mkdir -p ${outputDirPath} - java -Xmx2G -jar ${tool_jar} \ + java -Xmx${true=memory false="2" defined(memory)}G -jar ${tool_jar} \ -R ${ref_fasta} \ -o ${outputDirPath} \ ${"-s " + scatterSize} \ @@ -46,6 +49,10 @@ task ScatterRegions { output { Array[File] scatters = glob(outputDirPath + "/scatter-*.bed") } + + runtime { + memory: ceil(select_first([memory, 2.0]) * select_first([memoryMultiplier, 2.0])) + } } task SampleConfig {