Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in during pilon. --Java #74

Open
wdp9966 opened this issue Jan 14, 2023 · 1 comment
Open

Error in during pilon. --Java #74

wdp9966 opened this issue Jan 14, 2023 · 1 comment

Comments

@wdp9966
Copy link

wdp9966 commented Jan 14, 2023

Hello,

When I polishing, I then received this message:

Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.broadinstitute.pilon.GenomeRegion.(GenomeRegion.scala:60)
at org.broadinstitute.pilon.GenomeFile$$anonfun$contigRegions$1.apply(GenomeFile.scala:72)
at org.broadinstitute.pilon.GenomeFile$$anonfun$contigRegions$1.apply(GenomeFile.scala:72)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.immutable.Range.foreach(Range.scala:160)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at org.broadinstitute.pilon.GenomeFile.contigRegions(GenomeFile.scala:72)
at org.broadinstitute.pilon.GenomeFile$$anonfun$2.apply(GenomeFile.scala:52)
at org.broadinstitute.pilon.GenomeFile$$anonfun$2.apply(GenomeFile.scala:52)
at scala.collection.immutable.List.map(List.scala:277)
at org.broadinstitute.pilon.GenomeFile.(GenomeFile.scala:52)
at org.broadinstitute.pilon.Pilon$.main(Pilon.scala:98)
at org.broadinstitute.pilon.Pilon.main(Pilon.scala)
... 6 more

Thank you in advance

@jsgounot
Copy link
Contributor

jsgounot commented Jan 15, 2023

Hi wdp9966,

as the error message suggest, you don't have enough memory when running pilon. We did not offer an option within OPERA-MS for this issue but you can modify your OPERA-MS code this way.

In OPERA-MS.pl line 1141, you can add a java parameter this way:

run_exe("java -jar -Xmx80G $pilon_path --fix bases --threads $num_processor --genome $temp_contig --bam $temp_contig.bam --outdir $polishing_dir > $polishing_dir/pilon.out 2> $polishing_dir/pilon.err");

In this example, I specified 80G of memory. FYI - it is possible that Pilon requires a minimum memory size. I recommend running OPERA-MS on a computer with more memory if you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants