hi channel! if i have a module that runs a script,...
# modules
s
hi channel! if i have a module that runs a script, isn't there a way to just put the script into a "bin" folder within the module folder to be automatically recognised by nextflow? i checked other modules that use scripts, but they have all been re-written to have the whole task performed by the script and then the script is called using "template". thanks in advance!
m
Yes, you can, but on modules they're intended to be sharable so we use templates since we don't need a special flag for it: https://www.nextflow.io/docs/latest/module.html#module-binaries
s
hi mahesh! very helpful, thanks!
uhm, i have a follow up question. i tried the option
nextflow.enable.moduleBinaries = true
and it worked when i ran the pipeline locally with docker. however, when i tried running it on AWS Batch, it couldn't find the file. does this mean that it's not compatible with batch? also, how come that the implementation for this is not similar as to copying the file to the main
bin
directory within the nextflow pipeline? thanks again
m
That I don't know. I suggest making an issue for it on the nextflow github https://github.com/nextflow-io/nextflow/issues/
s
sure, thanks!