diff --git a/common.wdl b/common.wdl
index b533930da9018cc6a2a3c46ed58240786b9d6001..79b549a7d70a9e1902f05870f4e4c56fb5e9c017 100644
--- a/common.wdl
+++ b/common.wdl
@@ -16,7 +16,7 @@ task AppendToStringArray {
     }
 
     runtime {
-        memory: 1
+        memory: "1G"
     }
 }
 
@@ -66,7 +66,7 @@ task ConcatenateTextFiles {
     }
 
     runtime {
-        memory: 1
+        memory: "1G"
     }
 }
 
@@ -129,7 +129,7 @@ task MapMd5 {
     }
 
     runtime {
-        memory: 1
+        memory: "1G"
         docker: dockerImage
     }
 }
@@ -193,7 +193,7 @@ task StringArrayMd5 {
     }
 
     runtime {
-        memory: 1
+        memory: "1G"
         docker: dockerImage
     }
 }
diff --git a/cutadapt.wdl b/cutadapt.wdl
index c300111d4c1fac77e5f85bc6fa0e92ca37fe18b8..ff2be2f3c8da0c9887fc116414043dc62fb08f08 100644
--- a/cutadapt.wdl
+++ b/cutadapt.wdl
@@ -61,7 +61,7 @@ task Cutadapt {
         #~{"--compression-level=" + compressionLevel} \
         Boolean Z = true  # equal to compressionLevel=1  # Fixme: replace once upstream is fixed.
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "quay.io/biocontainers/cutadapt:2.4--py37h14c3975_0"
     }
 
diff --git a/fastqc.wdl b/fastqc.wdl
index d4386b8198c2d7965cd8653d732d67469ab419b9..4c68cd26b13f4af531e84dc4de2851b3da76bd96 100644
--- a/fastqc.wdl
+++ b/fastqc.wdl
@@ -67,7 +67,7 @@ task Fastqc {
 
 task GetConfiguration {
     input {
-        String dockerTag = "0.11.7--4"
+        String dockerImage = "quay.io/biocontainers/fastqc:0.11.7--4"
     }
 
     command <<<
@@ -86,7 +86,7 @@ task GetConfiguration {
     }
 
     runtime {
-        memory: 2 # Needs more than 1 to pull the docker image
-        docker: "quay.io/biocontainers/fastqc:" + dockerTag
+        memory: "2G" # Needs more than 1 to pull the docker image
+        docker: dockerImage
     }
 }
diff --git a/fastqsplitter.wdl b/fastqsplitter.wdl
index cbbb7f307595c0e4732f82e8ee9f983cb81f944f..25c565526418879ed64189790ffc358c0dd754f3 100644
--- a/fastqsplitter.wdl
+++ b/fastqsplitter.wdl
@@ -58,7 +58,7 @@ task Fastqsplitter {
     Int memory = if fastqsplitterMemory <= 2 then 2 else fastqsplitterMemory
 
     runtime {
-        memory: memory
+        memory: "~{memory}G"
         docker: dockerImage
         cpu: cores
     }
diff --git a/gatk.wdl b/gatk.wdl
index bbc00becaefacdd4258c3002efa6e30eb5f5711f..cc8f830f29f16edf74f91df2f5655406ebd855c0 100644
--- a/gatk.wdl
+++ b/gatk.wdl
@@ -12,15 +12,15 @@ task ApplyBQSR {
         File referenceFastaDict
         File referenceFastaFai
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.0.0--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputBamPath})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         ApplyBQSR \
         --create-output-bam-md5 \
         --add-output-sam-program-record \
@@ -43,7 +43,7 @@ task ApplyBQSR {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -62,15 +62,15 @@ task BaseRecalibrator {
         File referenceFastaDict
         File referenceFastaFai
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.0.0--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{recalibrationReportPath})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         BaseRecalibrator \
         -R ~{referenceFasta} \
         -I ~{inputBam} \
@@ -87,7 +87,7 @@ task BaseRecalibrator {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -101,15 +101,15 @@ task CombineGVCFs {
         File referenceFastaDict
         File referenceFastaFai
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.0.0--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputPath})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx}G \
         CombineGVCFs \
         -R ~{referenceFasta} \
         -O ~{outputPath} \
@@ -124,7 +124,7 @@ task CombineGVCFs {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -134,15 +134,15 @@ task GatherBqsrReports {
         Array[File] inputBQSRreports
         String outputReportPath
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.0.0--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputReportPath})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         GatherBQSRReports \
         -I ~{sep=' -I ' inputBQSRreports} \
         -O ~{outputReportPath}
@@ -154,7 +154,7 @@ task GatherBqsrReports {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -169,15 +169,16 @@ task GenotypeGVCFs {
         File referenceFastaFai
         File? dbsnpVCF
         File? dbsnpVCFIndex
-        Int memory = 6
-        Float memoryMultiplier = 3.0
+
+        String memory = "18G"
+        String javaXmx = "6G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.0.0--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputPath})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         GenotypeGVCFs \
         -R ~{referenceFasta} \
         -O ~{outputPath} \
@@ -197,7 +198,7 @@ task GenotypeGVCFs {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -214,15 +215,16 @@ task HaplotypeCallerGvcf {
         Float contamination = 0.0
         File? dbsnpVCF
         File? dbsnpVCFIndex
-        Int memory = 4
-        Float memoryMultiplier = 3
+
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.0.0--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{gvcfPath})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         HaplotypeCaller \
         -R ~{referenceFasta} \
         -O ~{gvcfPath} \
@@ -240,7 +242,7 @@ task HaplotypeCallerGvcf {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -262,15 +264,15 @@ task MuTect2 {
         Array[File]+ intervals
         String outputStats = outputVcf + ".stats"
 
-        Int memory = 4
-        Float memoryMultiplier = 4
+        String memory = "16G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.2.0--1"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputVcf})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         Mutect2 \
         -R ~{referenceFasta} \
         -I ~{sep=" -I " inputBams} \
@@ -292,7 +294,7 @@ task MuTect2 {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -300,14 +302,14 @@ task LearnReadOrientationModel {
     input {
         Array[File]+ f1r2TarGz
 
-        Int memory = 12
-        Float memoryMultiplier = 2
+        String memory = "24G"
+        String javaXmx = "12G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.2.0--1"
     }
 
     command {
         set -e
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         LearnReadOrientationModel \
         -I ~{sep=" -I " f1r2TarGz} \
         -O "artifact-priors.tar.gz"
@@ -319,7 +321,7 @@ task LearnReadOrientationModel {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -327,14 +329,14 @@ task MergeStats {
     input {
         Array[File]+ stats
 
-        Int memory = 14
-        Float memoryMultiplier = 2
+        String memory = "28G"
+        String javaXmx = "14G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.2.0--1"
     }
 
     command {
         set -e
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         MergeMutectStats \
         -stats ~{sep=" -stats " stats} \
         -O "merged.stats"
@@ -346,7 +348,7 @@ task MergeStats {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -360,14 +362,14 @@ task GetPileupSummaries {
         File sitesForContaminationIndex
         String outputPrefix
 
-        Int memory = 12
-        Float memoryMultiplier = 2
+        String memory = "24G"
+        String javaXmx = "12G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.2.0--1"
     }
 
     command {
         set -e
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         GetPileupSummaries \
         -I ~{sampleBam} \
         -V ~{variantsForContamination} \
@@ -381,7 +383,7 @@ task GetPileupSummaries {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -390,14 +392,14 @@ task CalculateContamination {
         File tumorPileups
         File? normalPileups
 
-        Int memory = 12
-        Float memoryMultiplier = 2
+        String memory = "24G"
+        String javaXmx = "12G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.2.0--1"
     }
 
     command {
         set -e
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         CalculateContamination \
         -I ~{tumorPileups} \
         ~{"-matched " + normalPileups} \
@@ -412,7 +414,7 @@ task CalculateContamination {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -431,15 +433,15 @@ task FilterMutectCalls {
         File mutect2Stats
         String? extraArgs
 
-        Int memory = 12
-        Float memoryMultiplier = 2
+        String memory = "24G"
+        String javaXmx = "12G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.2.0--1"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputVcf})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         FilterMutectCalls \
         -R ~{referenceFasta} \
         -V ~{unfilteredVcf} \
@@ -462,7 +464,7 @@ task FilterMutectCalls {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -476,15 +478,15 @@ task SplitNCigarReads {
         String outputBam
         Array[File] intervals = []
 
-        Int memory = 4
-        Float memoryMultiplier = 4
+        String memory = "16G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/gatk4:4.1.0.0--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputBam})
-        gatk --java-options -Xmx~{memory}G \
+        gatk --java-options -Xmx~{javaXmx} \
         SplitNCigarReads \
         -I ~{inputBam} \
         -R ~{referenceFasta} \
@@ -499,7 +501,7 @@ task SplitNCigarReads {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -517,8 +519,8 @@ task CombineVariants {
         Array[File]+ variantIndexes
         String outputPath
 
-        Int memory = 12
-        Float memoryMultiplier = 2
+        String memory = "24G"
+        String javaXmx = "12G"
         String dockerImage = "broadinstitute/gatk3:3.8-1"
     }
 
@@ -538,7 +540,7 @@ task CombineVariants {
                 printf -- "-V:%s %s " "${ids[i]}" "${vars[i]}"
               done
         )
-        java -Xmx~{memory}G -jar ~{installDir}/GenomeAnalysisTK.jar \
+        java -Xmx~{javaXmx} -jar ~{installDir}/GenomeAnalysisTK.jar \
         -T CombineVariants \
         -R ~{referenceFasta} \
         --genotypemergeoption ~{genotypeMergeOption} \
@@ -555,6 +557,6 @@ task CombineVariants {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
diff --git a/hisat2.wdl b/hisat2.wdl
index 27d9dedf62519f395576168286d7aab7a3b0c5f8..305eb28a6f8f123ad7ad85b94fbdf18fe6d38f32 100644
--- a/hisat2.wdl
+++ b/hisat2.wdl
@@ -13,7 +13,7 @@ task Hisat2 {
         Boolean downstreamTranscriptomeAssembly = true
 
         Int threads = 1
-        Int memory = 48
+        String memory = "48G"
         # quay.io/biocontainers/mulled-v2-a97e90b3b802d1da3d6958e0867610c718cb5eb1
         # is a combination of hisat2 and samtools
         # hisat2=2.1.0, samtools=1.8
@@ -41,7 +41,7 @@ task Hisat2 {
     }
 
     runtime {
-        memory: (memory / threads) + 1
+        memory: memory
         cpu: threads + 1
         docker: dockerImage
     }
diff --git a/htseq.wdl b/htseq.wdl
index 2528671ad0f44596649a9087c015ed0e52198242..d8009a3b5c7fa3ea14fb3f9b5d0dbc83fa12b15f 100644
--- a/htseq.wdl
+++ b/htseq.wdl
@@ -12,7 +12,7 @@ task HTSeqCount {
         String? idattr
         Array[String] additionalAttributes = []
 
-        Int memory = 40
+        String memory = "40G"
         String dockerImage = "quay.io/biocontainers/htseq:0.9.1--py36h7eb728f_2"
     }
 
diff --git a/macs2.wdl b/macs2.wdl
index 385cf62cd2330f2331d4cd0b75e6c7860045bc18..9e4c4c2cc3392fc682d58b1ae03b1e727c7f7741 100644
--- a/macs2.wdl
+++ b/macs2.wdl
@@ -11,7 +11,8 @@ task PeakCalling {
         Boolean nomodel = false
 
         Int threads = 1
-        Int memory = 8
+        String memory = "8G"
+        String dockerImage = "quay.io/biocontainers/macs2:2.1.2--py27r351_0"
     }
 
     command {
@@ -31,6 +32,6 @@ task PeakCalling {
     runtime {
         cpu: threads
         memory: memory
-        docker: "quay.io/biocontainers/macs2:2.1.2--py27r351_0"
+        docker: dockerImage
     }
 }
\ No newline at end of file
diff --git a/manta.wdl b/manta.wdl
index f2e1d43d37947ed71c48de543683079fce9bf8a5..21dd21c3fcb60abb343a66bd6f7a74be37cd1cf6 100644
--- a/manta.wdl
+++ b/manta.wdl
@@ -16,7 +16,7 @@ task Somatic {
         Boolean exome = false
 
         Int cores = 1
-        Int memory = 4
+        Int memoryGb = 4
         String dockerImage = "quay.io/biocontainers/manta:1.4.0--py27_1"
 
     }
@@ -33,7 +33,7 @@ task Somatic {
         ~{runDir}/runWorkflow.py \
         -m local \
         -j ~{cores} \
-        -g ~{memory}
+        -g ~{memoryGb}
     }
 
     output {
@@ -53,7 +53,7 @@ task Somatic {
 
     runtime {
         cpu: cores
-        memory: memory
+        memory: "~{memoryGb}G"
         docker: dockerImage
     }
 }
diff --git a/minimap2.wdl b/minimap2.wdl
index c293c563bc8c47facdeef3fd2165c6a6ec612bb7..6ff8cf3eaca431098e6234d6bbbd4f7ae9d0670c 100644
--- a/minimap2.wdl
+++ b/minimap2.wdl
@@ -31,7 +31,7 @@ task Indexing {
         Int? splitIndex
 
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "quay.io/biocontainers/minimap2:2.17--h84994c4_0"
     }
 
@@ -90,7 +90,7 @@ task Mapping {
         Boolean? addMDtagToSAM
 
         Int cores = 4
-        Int memory = 7
+        String memory = "30G"
         String dockerImage = "quay.io/biocontainers/minimap2:2.17--h84994c4_0"
     }
 
diff --git a/multiqc.wdl b/multiqc.wdl
index d5a83c63cea4d65bcf13cf7e944a3fdcf89af04c..1c5ecfd49a56ca5efd35ff64f6dfaeae33ca76b1 100644
--- a/multiqc.wdl
+++ b/multiqc.wdl
@@ -38,7 +38,7 @@ task MultiQC {
         Boolean quiet = false
         Array[Boolean] finished = []  # An array of booleans that can be used to let multiqc wait on stuff.
 
-        Int memory = 4
+        String memory = "4G"
 
         String dockerImage = "quay.io/biocontainers/multiqc:1.7--py_1"
     }
diff --git a/picard.wdl b/picard.wdl
index 450b475e60bd6191f0c9013392774e2f3ab096d8..12e8d880d177abedba412b5be38bfa7ef9ee4035 100644
--- a/picard.wdl
+++ b/picard.wdl
@@ -6,15 +6,15 @@ task BedToIntervalList {
         File dict
         String outputPath
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname "~{outputPath}")
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         BedToIntervalList \
         I=~{bedFile} \
         O=~{outputPath} \
@@ -27,7 +27,7 @@ task BedToIntervalList {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -50,8 +50,8 @@ task CollectMultipleMetrics {
         Boolean collectSequencingArtifactMetrics = true
         Boolean collectQualityYieldMetrics = true
 
-        Int memory = 8
-        Float memoryMultiplier = 4
+        String memory = "32G"
+        String javaXmx = "8G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
     }
 
@@ -59,7 +59,7 @@ task CollectMultipleMetrics {
     command {
         set -e
         mkdir -p $(dirname "~{basename}")
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         CollectMultipleMetrics \
         I=~{inputBam} \
         R=~{referenceFasta} \
@@ -121,7 +121,7 @@ task CollectMultipleMetrics {
     runtime {
 
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -133,15 +133,15 @@ task CollectRnaSeqMetrics {
         String basename
         String strandSpecificity = "NONE"
 
-        Int memory = 8
-        Float memoryMultiplier = 4.0
+        String memory = "32G"
+        String javaXmx =  "8G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname "~{basename}")
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         CollectRnaSeqMetrics \
         I=~{inputBam} \
         O=~{basename}.RNA_Metrics \
@@ -157,7 +157,7 @@ task CollectRnaSeqMetrics {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -172,15 +172,15 @@ task CollectTargetedPcrMetrics {
         Array[File]+ targetIntervals
         String basename
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname "~{basename}")
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         CollectTargetedPcrMetrics \
         I=~{inputBam} \
         R=~{referenceFasta} \
@@ -199,7 +199,7 @@ task CollectTargetedPcrMetrics {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -210,15 +210,15 @@ task GatherBamFiles {
         Array[File]+ inputBamsIndex
         String outputBamPath
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputBamPath})
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         GatherBamFiles \
         INPUT=~{sep=' INPUT=' inputBams} \
         OUTPUT=~{outputBamPath} \
@@ -234,7 +234,7 @@ task GatherBamFiles {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -244,15 +244,15 @@ task GatherVcfs {
         Array[File]+ inputVcfIndexes
         String outputVcfPath = "out.vcf.gz"
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
     }
 
     command {
         set -e
         mkdir -p $(dirname ~{outputVcfPath})
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         GatherVcfs \
         INPUT=~{sep=' INPUT=' inputVcfs} \
         OUTPUT=~{outputVcfPath}
@@ -264,7 +264,7 @@ task GatherVcfs {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -276,8 +276,8 @@ task MarkDuplicates {
         String outputBamPath
         String metricsPath
 
-        Int memory = 8
-        Float memoryMultiplier = 3.0
+        String memory = "24G"
+        String javaXmx = "8G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
 
         # The program default for READ_NAME_REGEX is appropriate in nearly every case.
@@ -295,7 +295,7 @@ task MarkDuplicates {
     command {
         set -e
         mkdir -p $(dirname ~{outputBamPath})
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         MarkDuplicates \
         INPUT=~{sep=' INPUT=' inputBams} \
         OUTPUT=~{outputBamPath} \
@@ -318,7 +318,7 @@ task MarkDuplicates {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -329,8 +329,8 @@ task MergeVCFs {
         Array[File]+ inputVCFsIndexes
         String outputVcfPath
 
-        Int memory = 8
-        Float memoryMultiplier = 3.0
+        String memory = "24G"
+        String javaXmx = "8G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
     }
 
@@ -340,7 +340,7 @@ task MergeVCFs {
     command {
         set -e
         mkdir -p $(dirname ~{outputVcfPath})
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         MergeVcfs \
         INPUT=~{sep=' INPUT=' inputVCFs} \
         OUTPUT=~{outputVcfPath}
@@ -353,7 +353,7 @@ task MergeVCFs {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -363,8 +363,8 @@ task SamToFastq {
         File inputBamIndex
         Boolean paired = true
 
-        Int memory = 16 # High memory default to avoid crashes.
-        Float memoryMultiplier = 3.0
+        String memory = "48G"
+        String javaXmx = "16G" # High memory default to avoid crashes.
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
         File? NONE
     }
@@ -375,7 +375,7 @@ task SamToFastq {
 
     command {
         set -e
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         SamToFastq \
         I=~{inputBam} \
         ~{"FASTQ=" + outputRead1} \
@@ -391,7 +391,7 @@ task SamToFastq {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -400,15 +400,15 @@ task ScatterIntervalList {
         File interval_list
         Int scatter_count
 
-        Int memory = 4
-        Float memoryMultiplier = 3.0
+        String memory = "12G"
+        String javaXmx = "4G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
     }
 
     command {
         set -e
         mkdir scatter_list
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         IntervalListTools \
         SCATTER_COUNT=~{scatter_count} \
         SUBDIVISION_MODE=BALANCING_WITHOUT_INTERVAL_SUBDIVISION_WITH_OVERFLOW \
@@ -425,7 +425,7 @@ task ScatterIntervalList {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
 
@@ -435,8 +435,8 @@ task SortVcf {
         String outputVcfPath
         File? dict
 
-        Int memory = 8
-        Float memoryMultiplier = 3.0
+        String memory = "24G"
+        String javaXmx = "8G"
         String dockerImage = "quay.io/biocontainers/picard:2.20.5--0"
         }
 
@@ -444,7 +444,7 @@ task SortVcf {
     command {
         set -e
         mkdir -p $(dirname ~{outputVcfPath})
-        picard -Xmx~{memory}G \
+        picard -Xmx~{javaXmx} \
         SortVcf \
         I=~{sep=" I=" vcfFiles} \
         ~{"SEQUENCE_DICTIONARY=" + dict} \
@@ -458,6 +458,6 @@ task SortVcf {
 
     runtime {
         docker: dockerImage
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
     }
 }
\ No newline at end of file
diff --git a/samtools.wdl b/samtools.wdl
index 861bc869fbbbd9dd4031dbeedeccc41b21f457d1..7c1143c81d75ba8a3f6788fd6f65cf990a16a3aa 100644
--- a/samtools.wdl
+++ b/samtools.wdl
@@ -171,7 +171,7 @@ task Fastq {
         Int? compressionLevel
 
         Int threads = 1
-        Int memory = 1
+        String memory = "1G"
         String dockerImage = "quay.io/biocontainers/samtools:1.8--h46bd0b3_5"
     }
 
@@ -253,7 +253,7 @@ task View {
         Int? MAPQthreshold
 
         Int threads = 1
-        Int memory = 1
+        String memory = "1G"
         String dockerImage = "quay.io/biocontainers/samtools:1.8--h46bd0b3_5"
     }
     String outputIndexPath = basename(outputFileName) + ".bai"
diff --git a/spades.wdl b/spades.wdl
index 09f4bb0af05d38d066149c4947e2d69cdf680fc6..a0d5fa1eadba37880c87fd6ef3f4c86e19b50d1b 100644
--- a/spades.wdl
+++ b/spades.wdl
@@ -25,16 +25,13 @@ task Spades {
         Boolean? disableRepeatResolution
         File? dataset
         Int threads = 1
-        Float memoryGb = 16.0
+        Int memoryGb = 16
         File? tmpDir
         String? k
         Float? covCutoff
         Int? phredOffset
     }
 
-    Int clusterMemory = ceil(memoryGb / threads * 1.2)
-    Int memoryArg = ceil(memoryGb)
-
     command {
         set -e -o pipefail
         ~{preCommand}
@@ -61,7 +58,7 @@ task Spades {
         ~{true="--disable-rr" false="" disableRepeatResolution} \
         ~{"--dataset " + dataset} \
         ~{"--threads " + threads} \
-        ~{"--memory " + memoryArg} \
+        ~{"--memory " + memoryGb} \
         ~{"-k " + k} \
         ~{"--cov-cutoff " + covCutoff} \
         ~{"--phred-offset " + phredOffset}
@@ -81,6 +78,6 @@ task Spades {
 
     runtime {
         cpu: threads
-        memory: clusterMemory
+        memory: "~{memoryGb}G"
     }
 }
\ No newline at end of file
diff --git a/star.wdl b/star.wdl
index e518715a82dc3b5adab775d3afba4391ec570c70..19105bbd4906eeae91c15cce3f057de0f9d6373b 100644
--- a/star.wdl
+++ b/star.wdl
@@ -15,7 +15,7 @@ task Star {
         Int? limitBAMsortRAM
 
         Int runThreadN = 4
-        Int memory = 48
+        String memory = "48G"
         String dockerImage = "quay.io/biocontainers/star:2.6.0c--0"
     }
 
@@ -45,9 +45,7 @@ task Star {
 
     runtime {
         cpu: runThreadN
-        # Return memory per CPU here due to SGE backend.
-        # Can also work with slurms mem-per-cpu flag
-        memory: (memory / runThreadN) + 1
+        memory: memory
         docker: dockerImage
     }
 }
diff --git a/strelka.wdl b/strelka.wdl
index f5cd525df88e1569b17c9f304264fc1cb5d202c1..2c8b5a06728580f0bd199cf369a95b802d78e6ce 100644
--- a/strelka.wdl
+++ b/strelka.wdl
@@ -15,7 +15,7 @@ task Germline {
         Boolean rna = false
 
         Int cores = 1
-        Int memory = 4
+        Int memoryGb = 4
         String dockerImage = "quay.io/biocontainers/strelka:2.9.7--0"
     }
 
@@ -31,7 +31,7 @@ task Germline {
         ~{runDir}/runWorkflow.py \
         -m local \
         -j ~{cores} \
-        -g ~{memory}
+        -g ~{memoryGb}
     }
 
     output {
@@ -42,7 +42,7 @@ task Germline {
     runtime {
         docker: dockerImage
         cpu: cores
-        memory: memory
+        memory: "~{memoryGb}G"
     }
 }
 
@@ -62,7 +62,7 @@ task Somatic {
         Boolean exome = false
 
         Int cores = 1
-        Int memory = 4
+        Int memoryGb = 4
         String dockerImage = "quay.io/biocontainers/strelka:2.9.7--0"
 
         File? doNotDefineThis #FIXME
@@ -81,7 +81,7 @@ task Somatic {
         ~{runDir}/runWorkflow.py \
         -m local \
         -j ~{cores} \
-        -g ~{memory}
+        -g ~{memoryGb}
     }
 
     output {
@@ -94,6 +94,6 @@ task Somatic {
     runtime {
         docker: dockerImage
         cpu: cores
-        memory: memory
+        memory: "~{memoryGb}G"
     }
 }
\ No newline at end of file
diff --git a/stringtie.wdl b/stringtie.wdl
index 9c7c1013c124187ba777629099d92508a68483de..d9b7cdcc1a21ebaa63e4c43f93ee630c44962772 100644
--- a/stringtie.wdl
+++ b/stringtie.wdl
@@ -12,7 +12,7 @@ task Stringtie {
         String? geneAbundanceFile
 
         Int threads = 1
-        Int memory = 10
+        String memory = "10G"
         String dockerImage = "quay.io/biocontainers/stringtie:1.3.4--py35_0"
     }
 
diff --git a/talon.wdl b/talon.wdl
index 85602d87a91e20de725f4165c1bf115bf532ba61..b5cd0d3fd8e525c7492cd6301a8f3ca199192dd5 100644
--- a/talon.wdl
+++ b/talon.wdl
@@ -31,7 +31,7 @@ task CreateAbundanceFileFromDatabase {
         File? filterPairingsFile
 
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "biocontainers/talon:v4.2_cv2"
     }
 
@@ -80,7 +80,7 @@ task CreateGtfAbundanceFromDatabase {
         File? filterPairingsFile
 
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "biocontainers/talon:v4.2_cv2"
     }
 
@@ -132,7 +132,7 @@ task CreateGtfFromDatabase {
         File? datasetFile
 
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "biocontainers/talon:v4.2_cv2"
     }
 
@@ -184,7 +184,7 @@ task InitializeTalonDatabase {
         Int cutoff3p = 300
 
         Int cores = 1
-        Int memory = 10
+        String memory = "10G"
         String dockerImage = "biocontainers/talon:v4.2_cv2"
     }
 
@@ -233,7 +233,7 @@ task MapAntisenseGenesToSense {
         String annotationVersion
 
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "biocontainers/talon:v4.2_cv2"
     }
 
@@ -273,7 +273,7 @@ task SummarizeDatasets {
         File? datasetGroupsCSV
 
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "biocontainers/talon:v4.2_cv2"
     }
 
@@ -318,7 +318,7 @@ task Talon {
         Int minimumIdentity = 0
 
         Int cores = 1
-        Int memory = 20
+        String memory = "20G"
         String dockerImage = "biocontainers/talon:v4.2_cv2"
     }
 
diff --git a/transcriptclean.wdl b/transcriptclean.wdl
index 71f8a4533bd25936cfefe5929820f01165cffaa6..48f5c525d8dc1cbb0b368be391e64b040e03783a 100644
--- a/transcriptclean.wdl
+++ b/transcriptclean.wdl
@@ -30,7 +30,7 @@ task CleanSpliceJunctions {
         File? variantFile
 
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "biocontainers/transcriptclean:v1.0.8_cv1"
     }
 
@@ -72,7 +72,7 @@ task GetCorrectedSJsFromLog {
         String outputPrefix
 
         Int cores = 1
-        Int memory = 5
+        String memory = "5G"
         String dockerImage = "biocontainers/transcriptclean:v1.0.8_cv1"
     }
 
@@ -110,7 +110,7 @@ task GetSJsFromGtf {
         Int minIntronSize = 21
 
         Int cores = 1
-        Int memory = 8
+        String memory = "8G"
         String dockerImage = "biocontainers/transcriptclean:v1.0.8_cv1"
     }
 
@@ -150,7 +150,7 @@ task GetTranscriptCleanStats {
         String outputPrefix
 
         Int cores = 1
-        Int memory = 4
+        String memory = "4G"
         String dockerImage = "biocontainers/transcriptclean:v1.0.8_cv1"
     }
 
@@ -197,7 +197,7 @@ task TranscriptClean {
         Boolean? correctSJs
 
         Int cores = 1
-        Int memory = 25
+        String memory = "25G"
         String dockerImage = "biocontainers/transcriptclean:v1.0.8_cv1"
     }
 
diff --git a/unicycler.wdl b/unicycler.wdl
index c5b30ba93c184a1aef7417e16997053ca507101e..642d7a863e90cbf93ad7cca7876c31125e5e24e4 100644
--- a/unicycler.wdl
+++ b/unicycler.wdl
@@ -12,8 +12,6 @@ task Unicycler {
         Int? minFastaLength
         Int? keep
         Boolean? vcf
-        Int threads = 1
-        Int memory = 4
         String? mode
         Float? minBridgeQual
         Int? linearSeqs
@@ -45,6 +43,9 @@ task Unicycler {
         File? contamination
         String? scores
         String? lowScore
+
+        Int threads = 1
+        String memory = "4G"
     }
 
     command {
diff --git a/vardict.wdl b/vardict.wdl
index 69a5441c22f47afccf011bddf98fb4888c10c989..85e5fd2baf38c29a48e16cc06aa5b4c5ae1d495f 100644
--- a/vardict.wdl
+++ b/vardict.wdl
@@ -28,15 +28,14 @@ task VarDict {
         Float minimumAlleleFrequency = 0.02
 
         Int threads = 1
-        Int memory = 16
-        Float memoryMultiplier = 2.5
+        String memory = "40G"
+        String javaXmx = "16G"
         String dockerImage = "quay.io/biocontainers/vardict-java:1.5.8--1"
-
     }
 
     command {
         set -e -o pipefail
-        export JAVA_OPTS="-Xmx~{memory}G"
+        export JAVA_OPTS="-Xmx~{javaXmx}"
         vardict-java \
         ~{"-th " + threads} \
         -G ~{referenceFasta} \
@@ -67,7 +66,7 @@ task VarDict {
 
     runtime {
         cpu: threads + 2
-        memory: ceil(memory * memoryMultiplier)
+        memory: memory
         docker: dockerImage
     }
 }
diff --git a/wisestork.wdl b/wisestork.wdl
index fab5ca68fa53d768fab8e36edf6ac09125aacd28..95bfcd0663b3c7ce0104da65ddba742361157f3f 100644
--- a/wisestork.wdl
+++ b/wisestork.wdl
@@ -117,9 +117,11 @@ task Newref {
         File bedFile = outputBed
     }
 
+    Int memory = 2 + ceil(length(inputBeds) * 0.15)
+
     runtime {
         docker: dockerImage
-        memory: 2 + ceil(length(inputBeds) * 0.15)
+        memory: "~{memory}G"
     }
 }