Closed hoelzer closed 4 years ago
Nope, the problem is that PILON uses more memory than requested for the machine, solution:
script:
"""
MEM=\$(echo ${task.memory} | awk '{print \$1}')
#only allow pilon to use 80% of the available memory
ADJUSTEDMEM=$(echo 0.8*\$MEM | bc | awk 'BEGIN{FS="."};{print \$1}')
pilon -Xmx\${ADJUSTEDMEM}g --threads ${task.cpus} --genome ${assembly} --frags ${bam} --output ${name}_polished_${round}
"""
see also PILON handling here: https://github.com/nanozoo/wf_reconstruct-strains_eukaryotic/blob/master/modules/pilon.nf
possibly because tmp files are written to /tmp
changed hard coded to /scratch for testing.
If it works, resolve via error handling