Hey everyone :wave: I have a question about Nextf...
# nostupidquestions
e
Hey everyone 👋 I have a question about Nextflow best practices : when writing process scripts, what's the recommended approach: putting scripts in
bin/
vs
templates/
? I understand the basic difference (scripts in
bin/
are directly executable and accessible in
PATH
, while
templates/
are used with the
template
directive and support variable interpolation), but I'm trying to understand: - In which cases do you prefer one over the other? - Any major pitfalls to avoid with each approach? - Is there a community consensus for nf-core pipelines in particular? Thanks !
a
I would always prefer
bin
over
templates
, in part because the template functionality is somewhat fragile and recommended against by nextflow and in part because a bin script will necessarily be more portable and force you to write more generalised code
☝️ 1
I think generally within nf-core you would be encouraged to aim for a bin script and there would need to be some justification for why you needed to use interpolation (template) rather than passing values as arguments
e
Thanks !