From 34af8de8fbe9af8d23fa412f5f8d550199b36ced Mon Sep 17 00:00:00 2001 From: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com> Date: Thu, 28 Sep 2023 13:31:20 +0100 Subject: [PATCH] Update main.nf to include stub (#3876) * Update main.nf to include stub Adding the stub for SeqKit Sliding * Review fix --- modules/nf-core/seqkit/sliding/main.nf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/nf-core/seqkit/sliding/main.nf b/modules/nf-core/seqkit/sliding/main.nf index ffa570eb58f..0f385c68cef 100644 --- a/modules/nf-core/seqkit/sliding/main.nf +++ b/modules/nf-core/seqkit/sliding/main.nf @@ -37,4 +37,18 @@ process SEQKIT_SLIDING { seqkit: \$( seqkit | sed '3!d; s/Version: //' ) END_VERSIONS """ + + stub: + prefix = task.ext.prefix ?: "${meta.id}" + if ("$fastx" ==~ /.+\.fasta$|.+\.fa$|.+\.fas$|.+\.fna$/) { + extension = "fasta" + } + """ + touch ${prefix}.${extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seqkit: \$( seqkit | sed '3!d; s/Version: //' ) + END_VERSIONS + """ }