Is it possible to add a command before bash in nxf_trace() of .command.run? #4846
-
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Absolutely! There are in fact a couple of ways. You might consider adding it in the shebang line of the script block. process Demo {
script:
"""
#!/path/to/stat_tool
echo 'Hello world!'
"""
} Nextflow will detect the shebang line and adjust the nxf_launch() {
/path/to/stat_tool /private/tmp/lishengting/work/a7/9f73aef2239268b6a44213553372cc/.command.sh
} You can also adjust the interpreter with the process Demo {
debug true
shell '/path/to/stat_tool', '--extra-args', 'if_necessary'
script:
"echo 'Hello world!'"
} Of course, because this is a process directive it can also be overridden via configuration. You might have a process {
withName: Demo {
shell = '/path/to/stat_tool'
}
} |
Beta Was this translation helpful? Give feedback.
Absolutely! There are in fact a couple of ways.
You might consider adding it in the shebang line of the script block.
Nextflow will detect the shebang line and adjust the
.command.run
statement accordingly:nxf_launch() { /path/to/stat_tool /private/tmp/lishengting/work/a7/9f73aef2239268b6a44213553372cc/.command.sh }
You can also adjust the interpreter with the
shell
process directive (documentation here):Of course, because this is a process directive it can al…