From e97d4cd32baf206903b8e15e0ff9b893ae8439d5 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Fri, 9 Sep 2022 09:54:03 +0200 Subject: [PATCH] epang: Output gzipped jplace (#2037) * Output gzipped jplace --- modules/epang/main.nf | 7 +++++-- modules/epang/meta.yml | 4 ++-- tests/modules/epang/test.yml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/epang/main.nf b/modules/epang/main.nf index 8eaaa226..11d8dbea 100644 --- a/modules/epang/main.nf +++ b/modules/epang/main.nf @@ -45,8 +45,11 @@ process EPANG { $splitarg \\ $binaryarg - [ -e epa_result.jplace ] && mv epa_result.jplace ${prefix}.epa_result.jplace - [ -e epa_info.log ] && mv epa_info.log ${prefix}.epa_info.log + if [ -e epa_result.jplace ]; then + gzip epa_result.jplace + cp epa_result.jplace.gz ${prefix}.epa_result.jplace.gz + fi + [ -e epa_info.log ] && cp epa_info.log ${prefix}.epa_info.log cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/epang/meta.yml b/modules/epang/meta.yml index 18357b9e..c1418693 100644 --- a/modules/epang/meta.yml +++ b/modules/epang/meta.yml @@ -55,8 +55,8 @@ output: description: directory in which EPA-NG was run - jplace: type: file - description: file with placement information - pattern: "*.jplace" + description: gzipped file with placement information + pattern: "*.jplace.gz" - log: type: file description: log file from placement diff --git a/tests/modules/epang/test.yml b/tests/modules/epang/test.yml index 84630b1f..b4b861c1 100644 --- a/tests/modules/epang/test.yml +++ b/tests/modules/epang/test.yml @@ -6,7 +6,7 @@ - path: output/epang/test.epa_info.log contains: - "INFO 3 Sequences done" - - path: output/epang/test.epa_result.jplace + - path: output/epang/test.epa_result.jplace.gz contains: - '"placements":' - '"metadata": {"invocation": "epa-ng --model LG --threads 2 --query query.alnfaa.gz --ref-msa reference.alnfaa.gz --tree reference.newick "}'