From e72b8897132b1ba141a2f48d5c77eaf05793512c Mon Sep 17 00:00:00 2001 From: Emilio Palumbo Date: Fri, 3 May 2024 17:19:27 +0200 Subject: [PATCH] Add back RSEM support for IHEC profile --- modules/quantification/rsem/main.nf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/quantification/rsem/main.nf b/modules/quantification/rsem/main.nf index d0df9e9..3bb15f3 100644 --- a/modules/quantification/rsem/main.nf +++ b/modules/quantification/rsem/main.nf @@ -91,11 +91,14 @@ process calculateExpression { def cmd = [] if ( convertBam ) { rsemPrefix = "${rsemPrefix}.rsem" - def convertMemory = Math.max(1024, ( memory / task.cpus / 2 ) as long) + def convertOpts = "" + if ( params.rsemVersion.startsWith("1.3") && ( ! params.container.contains("ihec") ) ) { + def convertMemory = Math.max(1024, ( memory / task.cpus / 2 ) as long) + convertOpts = "-p ${task.cpus} --memory-per-thread ${convertMemory}M" + } cmd << """\ mkfifo ${rsemPrefix}.bam - convert-sam-for-rsem -p ${task.cpus} \\ - --memory-per-thread ${convertMemory}M \\ + convert-sam-for-rsem ${convertOpts} \\ ${bam} \\ ${rsemPrefix} & """.stripIndent()