Skip to content
Snippets Groups Projects
Commit 802b65e6 authored by Ruben Vorderman's avatar Ruben Vorderman
Browse files

make estimates overrideable

parent 619781f2
No related branches found
No related tags found
No related merge requests found
...@@ -38,11 +38,14 @@ task Fastqc { ...@@ -38,11 +38,14 @@ task Fastqc {
String? dir String? dir
Int threads = 1 Int threads = 1
String memory = "1G" String? memory
Int? runtimeMinutes
String dockerImage = "quay.io/biocontainers/fastqc:0.11.9--0" String dockerImage = "quay.io/biocontainers/fastqc:0.11.9--0"
Array[File]? NoneArray Array[File]? NoneArray
File? NoneFile File? NoneFile
} }
String estimatedMemoryMB = "~{250 + 250 * threads}M"
Int estimatedRuntimeMin = 1 + ceil(size(seqFile, "G")) * 4
# Chops of the .gz extension if present. # Chops of the .gz extension if present.
# The Basename needs to be taken here. Otherwise paths might differ between similar jobs. # The Basename needs to be taken here. Otherwise paths might differ between similar jobs.
...@@ -80,12 +83,11 @@ task Fastqc { ...@@ -80,12 +83,11 @@ task Fastqc {
Array[File]? images = if extract then glob(reportDir + "/Images/*.png") else NoneArray Array[File]? images = if extract then glob(reportDir + "/Images/*.png") else NoneArray
} }
Int estimatedRuntime = 1 + ceil(size(seqFile, "G")) * 4
runtime { runtime {
cpu: threads cpu: threads
memory: memory memory: select_first([memory, estimatedMemoryMB])
docker: dockerImage docker: dockerImage
runtime_minutes: estimatedRuntime runtime_minutes: select_first([runtimeMinutes, estimatedRuntimeMin])
} }
parameter_meta { parameter_meta {
......
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