Ammar Aziz
02/20/2026, 4:52 AMinput:
tuple val(meta), path(reads)
....
"""
fastcat \\
$args \\
--threads $task.cpus \\
--sample ${prefix} \\
${reads.join(' ')} 2&>1 /dev/null <--- this
"""Simon Pearce
02/20/2026, 5:17 AM${reads} will expand to file1.ext file2.ext file3.ext ...
If you need to give them each a flag (e.g. -i) you can do something like:
https://github.com/nf-core/modules/blob/96398d76ad719f9b57f27ff39c09834b7815461b/modules/nf-core/sentieon/dedup/main.nf#L36Ammar Aziz
02/20/2026, 5:51 AMAmmar Aziz
02/20/2026, 5:51 AMSimon Pearce
02/20/2026, 8:20 AMAlexander Nater
02/23/2026, 10:06 AMjoin method will not be found in this case. Therefore, you should use path(reads, arity: '1..*') to always force it into a list.Ammar Aziz
02/23/2026, 10:45 PMAmmar Aziz
02/23/2026, 10:45 PMAlexander Nater
02/24/2026, 12:33 PMarity: '1..*' will make sure that reads is always a list, even if only a single input file is provided. This will make sure that the reads object will always have a join method to call. But of course, you don't need the join at all in this case.Ammar Aziz
02/24/2026, 10:48 PM