From 2aba7899cdf1a76d2afa089e230335bf0843b72c Mon Sep 17 00:00:00 2001
From: DavyCats <davycats.dc@gmail.com>
Date: Thu, 25 Mar 2021 12:59:54 +0100
Subject: [PATCH] increase memory bwa

---
 bwa.wdl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bwa.wdl b/bwa.wdl
index cc8ea0c..670f00d 100644
--- a/bwa.wdl
+++ b/bwa.wdl
@@ -48,7 +48,7 @@ task Mem {
     Int estimatedSortThreads = if threads == 1 then 1 else 1 + ceil(threads / 4.0)
     Int totalSortThreads = select_first([sortThreads, estimatedSortThreads])
     # BWA needs slightly more memory than the size of the index files (~10%). Add a margin for safety here.
-    Int estimatedMemoryGb = 1 + ceil(size(bwaIndex.indexFiles, "G") * 2) + sortMemoryPerThreadGb * totalSortThreads
+    Int estimatedMemoryGb = 10 + ceil(size(bwaIndex.indexFiles, "G") * 3) + sortMemoryPerThreadGb * totalSortThreads
     
     # The bwa postalt script is out commented as soon as usePostalt = false.
     # This hack was tested with bash, dash and ash. It seems that comments in between pipes work for all of them.
-- 
GitLab