From 3531824af826c16cd252bc5aa82ae169b244ebaa Mon Sep 17 00:00:00 2001 From: Mahwash Jamy <40695699+mjamy@users.noreply.github.com> Date: Thu, 14 Jul 2022 16:18:28 +0200 Subject: [PATCH] Update DIAMOND module to output log file (#1879) * Update DIAMOND module to output log file * Updating DIAMOND module to output log file - with jfy133 suggestions Co-authored-by: Mahwash Jamy Co-authored-by: James A. Fellows Yates --- modules/diamond/blastx/main.nf | 6 +++++- modules/diamond/blastx/meta.yml | 5 +++++ tests/modules/diamond/blastx/test.yml | 13 ++++++++----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index d3272279..1f4ff257 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -21,6 +21,7 @@ process DIAMOND_BLASTX { tuple val(meta), path('*.sam') , optional: true, emit: sam tuple val(meta), path('*.tsv') , optional: true, emit: tsv tuple val(meta), path('*.paf') , optional: true, emit: paf + tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions when: @@ -54,7 +55,10 @@ process DIAMOND_BLASTX { --query $fasta \\ --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.${out_ext} + --out ${prefix}.${out_ext} \\ + --log + + mv diamond.log ${prefix}.log cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 2dcd7bc6..327b8937 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -70,7 +70,12 @@ output: type: file description: File containing software versions pattern: "versions.yml" + - log: + type: file + description: Log file containing stdout information + pattern: "*.{log}" authors: - "@spficklin" - "@jfy133" + - "@mjamy" diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index b2b6149f..9f62d2ef 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -1,18 +1,21 @@ - name: diamond blastx test_diamond_blastx - command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx -c tests/config/nextflow.config + command: nextflow run ./tests/modules/diamond/blastx -entry test_diamond_blastx -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastx/nextflow.config tags: - diamond - diamond/blastx files: + - path: output/diamond/proteome.fasta.dmnd + - path: output/diamond/test.diamond_blastx.log + contains: ["queries aligned"] - path: output/diamond/test.diamond_blastx.txt - - path: output/diamond/versions.yml - name: diamond blastx test_diamond_blastx_daa - command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx_daa -c tests/config/nextflow.config + command: nextflow run ./tests/modules/diamond/blastx -entry test_diamond_blastx_daa -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastx/nextflow.config tags: - diamond - diamond/blastx files: + - path: output/diamond/proteome.fasta.dmnd - path: output/diamond/test.diamond_blastx.daa - md5sum: 0df4a833408416f32981415873facc11 - - path: output/diamond/versions.yml + - path: output/diamond/test.diamond_blastx.log + contains: ["queries aligned"]