From c14c5d2acbc0b56fb27d28bac80ad282554f8293 Mon Sep 17 00:00:00 2001 From: MarieLataretu Date: Fri, 18 Feb 2022 18:10:20 +0100 Subject: [PATCH] Index fails when FASTAs have different line len Fixes #52 --- modules/get_host.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/get_host.nf b/modules/get_host.nf index 498aeef..b9d47be 100644 --- a/modules/get_host.nf +++ b/modules/get_host.nf @@ -56,11 +56,12 @@ process check_own { """ # -L for following a symbolic link if ! ( file -L $fasta | grep -q 'gzip compressed' ); then + sed -i -e '\$a\\' ${fasta} bgzip -@ ${task.cpus} < ${fasta} > ${fasta}.gz # now $fasta'.gz' else mv ${fasta} ${fasta}.tmp - zcat ${fasta}.tmp | bgzip -@ ${task.cpus} -c > ${fasta}.gz + zcat ${fasta}.tmp | sed -e '\$a\\' | bgzip -@ ${task.cpus} -c > ${fasta}.gz fi """ }