hoelzer / mgnify-lr

Evaluation of long-read support for the MGnify pipeline
GNU General Public License v3.0
6 stars 5 forks source link

pilon samtools sort HPC error #32

Closed hoelzer closed 4 years ago

hoelzer commented 4 years ago

possibly because tmp files are written to /tmp

changed hard coded to /scratch for testing.

If it works, resolve via error handling

hoelzer commented 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