broadinstitute / pilon

Pilon is an automated genome assembly improvement and variant detection tool
GNU General Public License v2.0
340 stars 60 forks source link

Pilon OutOfMemoryError #26

Closed lijingjing1 closed 7 years ago

lijingjing1 commented 7 years ago

Hi

I use pilon to correct a genome size about 2.7 Gb on Memory 1T CPU 96 machine with args -Xmx512G.

At last it make a error about "Caused by: java.lang.OutOfMemoryError: Java heap space".So what is the problem of my question?

w1bw commented 7 years ago

With a genome that large, you will almost certainly want to subset the input genome either by breaking it into pieces, or by using the --targets argument to process subsets of the fasta elements. You also might want to subset the BAMs, but if you do, please try to include not only the reads which align to the scaffolds in question, but also their mates.

Several people on the pilon-users mailing list have some up with best practices for handling large genomes...you might want to ask there (I don't have much personal experience with it; I only offer advice!).

nick-youngblut commented 6 years ago

I'm running pilon in a snakemake pipeline where it's not so straight-forward to subsample reads only too many reads are in the input. I'm assuming that pilon has hard-coded the amount of memory used for Java. Can the java memory be added as a option for pilon? Knowing how much memory is used by Java would also be useful for SGE jobs.

CristianRiccio commented 5 years ago

I installed pilon with conda here: /Users/user/anaconda/bin/pilon. I opened that file in vim and changed the memory limit from 1G to 14G and now it's running whereas before it stopped immediately and complained about insufficient memory.

crysclitheroe commented 4 years ago

@CristianRiccio where did you change the mem limit option? I installed from source and attempted to change the Pilon.scala script in the same way but cannot find a java memory option.

CristianRiccio commented 4 years ago

@Tipplynne Try installing it with conda and change the memory in the file Users/user/anaconda/bin/pilon like I did.

KasperThystrup commented 2 years ago

One approach when using Pilon in a pipeline (e.g. snakemake) is to add the java flag to the pilon command. pilon --genome x --threads y ... -Xmx3G