From b6ed584443ad68ac41e6975994139454a4f23c18 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 13 Jul 2022 11:26:27 +0200 Subject: [PATCH] Update MOTUS/PROFILE module to output log file (#1871) * Add saving of stderr output as a log file as it contains summary statistics * Apply suggestions from code review --- modules/motus/profile/main.nf | 4 +++- modules/motus/profile/meta.yml | 4 ++++ tests/modules/motus/profile/test.yml | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/motus/profile/main.nf b/modules/motus/profile/main.nf index 27479844..bd7a1273 100644 --- a/modules/motus/profile/main.nf +++ b/modules/motus/profile/main.nf @@ -15,6 +15,7 @@ process MOTUS_PROFILE { tuple val(meta), path("*.out"), emit: out tuple val(meta), path("*.bam"), optional: true, emit: bam tuple val(meta), path("*.mgc"), optional: true, emit: mgc + tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions when: @@ -36,7 +37,8 @@ process MOTUS_PROFILE { $refdb \\ -t $task.cpus \\ -n $prefix \\ - -o ${prefix}.out + -o ${prefix}.out \\ + 2> ${prefix}.log ## mOTUs version number is not available from command line. ## mOTUs save the version number in index database folder. diff --git a/modules/motus/profile/meta.yml b/modules/motus/profile/meta.yml index 19803bdc..3c3b6604 100644 --- a/modules/motus/profile/meta.yml +++ b/modules/motus/profile/meta.yml @@ -56,6 +56,10 @@ output: type: file description: Optional intermediate mgc read count table file saved with `-M`. pattern: "*.{mgc}" + - log: + type: file + description: Standard error logging file containing summary statistics + pattern: "*.log" authors: - "@jianhong" diff --git a/tests/modules/motus/profile/test.yml b/tests/modules/motus/profile/test.yml index 8031d5ab..f5ce5bf7 100644 --- a/tests/modules/motus/profile/test.yml +++ b/tests/modules/motus/profile/test.yml @@ -6,3 +6,5 @@ files: - path: output/motus/test.out contains: ["#consensus_taxonomy\ttest"] + - path: output/motus/test.log + contains: ["Finished computation"]