From 4ab098733a8f7df71e6b83af2893f3e6aa3a7bfc Mon Sep 17 00:00:00 2001 From: Benjamin Wingfield Date: Tue, 1 Mar 2022 18:13:05 +0000 Subject: [PATCH] set memory in MB (#1260) Co-authored-by: Sateesh <33637490+sateeshperi@users.noreply.github.com> --- modules/plink2/extract/main.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/plink2/extract/main.nf b/modules/plink2/extract/main.nf index 89cffdc3..15f9c038 100644 --- a/modules/plink2/extract/main.nf +++ b/modules/plink2/extract/main.nf @@ -23,11 +23,13 @@ process PLINK2_EXTRACT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" if( "$pgen" == "${prefix}.pgen" ) error "Input and output names are the same, use \"task.ext.prefix\" in modules.config to disambiguate!" + def mem_mb = task.memory.toMega() """ plink2 \\ + --threads $task.cpus \\ + --memory $mem_mb \\ --pfile ${pgen.baseName} \\ $args \\ - --threads $task.cpus \\ --extract $variants \\ --make-pgen vzs \\ --out ${prefix}