set memory in MB (#1260)

Co-authored-by: Sateesh <33637490+sateeshperi@users.noreply.github.com>
This commit is contained in:
Benjamin Wingfield 2022-03-01 18:13:05 +00:00 committed by GitHub
parent fe4eb459fb
commit 4ab098733a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}