Have you checked the docs?
Description of the bug
seqtk/subseq builds its output filename by concatenating the input filename and ext.prefix with no separator between them:
https://github.com/nf-core/modules/blob/master/modules/nf-core/seqtk/subseq/main.nf#L32
gzip --no-name > ${sequences}${prefix}.${ext}.gz
$sequences is the input file's full name, extension included, and prefix defaults to ${meta.id}, so with the default prefix the module produces names like:
domain_16s.fnaarc.fa.gz
domain_16s.fnabac16s.fa.gz
for meta.id values arc and bac16s searched against domain_16s.fna. The input extension is kept in the middle of the name and the id is glued straight onto it.
The module's own test hides this by setting a prefix that carries its own leading dot (tests/standard.config):
ext.prefix = { ".filtered" }
which yields genome.fasta.filtered.fa.gz. So the implicit contract is "ext.prefix is a suffix appended to the input filename and must supply its own separator". That is the opposite of the usual nf-core meaning of ext.prefix (the output basename), it is not documented in meta.yml, and it makes the default value of prefix unusable: ${meta.id} can never produce a well-formed name.
Found while working on nf-core/phyloplace, where seqtk/subseq is called from fasta_hmmsearch_rank_fastas with the default prefix.
Suggested fix
Follow the normal convention and let the prefix determine the basename:
gzip --no-name > ${prefix}.${ext}.gz
with the same change in the stub block, and drop the leading dot from tests/standard.config.
This changes output filenames for existing callers, so it needs a snapshot update here and in any pipeline that consumes the module, hence an issue rather than a straight PR. If keeping the input filename in the output is considered worth preserving, ${sequences.baseName}.${prefix}.${ext}.gz would be the compatible-in-spirit alternative, still a rename but at least a well-formed one.
Happy to open the PR once there is agreement on which of the two the module should produce.
System information
- Nextflow 26.04.6
- Desktop, local executor
- Docker
- Ubuntu, Linux 6.8
quay.io/biocontainers/seqtk:1.4--he4a0461_1
Have you checked the docs?
Description of the bug
seqtk/subseqbuilds its output filename by concatenating the input filename andext.prefixwith no separator between them:https://github.com/nf-core/modules/blob/master/modules/nf-core/seqtk/subseq/main.nf#L32
$sequencesis the input file's full name, extension included, andprefixdefaults to${meta.id}, so with the default prefix the module produces names like:for
meta.idvaluesarcandbac16ssearched againstdomain_16s.fna. The input extension is kept in the middle of the name and the id is glued straight onto it.The module's own test hides this by setting a prefix that carries its own leading dot (
tests/standard.config):which yields
genome.fasta.filtered.fa.gz. So the implicit contract is "ext.prefixis a suffix appended to the input filename and must supply its own separator". That is the opposite of the usual nf-core meaning ofext.prefix(the output basename), it is not documented inmeta.yml, and it makes the default value ofprefixunusable:${meta.id}can never produce a well-formed name.Found while working on nf-core/phyloplace, where
seqtk/subseqis called fromfasta_hmmsearch_rank_fastaswith the default prefix.Suggested fix
Follow the normal convention and let the prefix determine the basename:
with the same change in the
stubblock, and drop the leading dot fromtests/standard.config.This changes output filenames for existing callers, so it needs a snapshot update here and in any pipeline that consumes the module, hence an issue rather than a straight PR. If keeping the input filename in the output is considered worth preserving,
${sequences.baseName}.${prefix}.${ext}.gzwould be the compatible-in-spirit alternative, still a rename but at least a well-formed one.Happy to open the PR once there is agreement on which of the two the module should produce.
System information
quay.io/biocontainers/seqtk:1.4--he4a0461_1