Hi,
I am porting some Nextflow scripts (which run fine locally) to use with PBS. I have Modules installed, and would like to use the nextflow.config file to specify what modules are loaded globally. I have tested loading in processes, e.g.
process java_required {
input:
set sampleID, file(read1), file(read2) from reads
output:
set sampleID, file('*.fastq.gz') into next_process
"""
module load jdk/1.8.0_131
sh ${params.requireJava} in1=$read1 in2=$read2 out=$sampleID".fastq.gz"
"""
}
NB that loading the module in this way works, as well as the way in the docs (e.g. module 'jdk/1.8.0_131' outside of script block).
I saw an issue on Github where the user specified syntax like
in the config, but in my hands this does not work. I tried inside an env{} block also, but keep getting the error based on the script being run requiring Java, which is not found.
Can someone please show their nextflow.config with PBS as executor loading modules?
Many thanks, and I am really enjoying rewriting scripts into Nextflow, it's quite intuitive and obviously powerful!
Bruce.