DamageProfiler
DamageProfiler copied to clipboard
OutOfMemoryError: Java heap space
Hi there!
I am using DamageProfiler 1.1 via the conda package, which means that the call to run the command line version simply is
damageprofiler [options]
instead of the call
java -jar DamageProfiler-VERSION.jar [options]
that is given in the documentation.
Now, for some large datasets, I am getting
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
and my guess after a bit of searching is that I need to provide Java with
-Xmx<amount of memory>
for this to work (NB: WTF Java?! Just use the available memory!).
My questions here are: Is that indeed the solution to the issue? And if so, how do I provide this with the conda version? Trying to locate the jar file within the conda env directory does not seem like a robust idea - what is the canonical way of solving this?
Thanks in advance and so long Lucas
Hi Lucas, sorry for the late reply. Actually, that's the way I usually solve this issue ;)
However, you can try to increase the general JVM heap space used for java applications (However, I'm not sure if this also works for the conda package): export _JAVA_OPTIONS="-Xms512m -Xmx1024m"
Let me know if that works! I'll try to find another/an additional solution. Or @jfy133 do you have any idea?
I'm pretty sure I've done it somehow inthe past but can't remember atm.
At least the python script used with the damageprofiler variable, that calls the jar includes the following line:
https://github.com/bioconda/bioconda-recipes/blob/73395171feca2b41f495c660b91964d5e70f7d1e/recipes/damageprofiler/damageprofiler.py#L16
I guess 'default' would imply it's changeable, but won't be able to check until tomorrow. @apeltzer has more bioconda experience though!
Quickly looking at the script, maybe try damageprofiler -Xm 000g?
Regardless, congrats on having so many read s;) b
Linking to an issue in one of my other pipelines for bacterial assembly, where we had similar issues: https://github.com/nf-core/bacass/issues/28
Recommendation was to simply replace it - see here https://github.com/bioconda/bioconda-recipes/issues/24749
e.g. a damageprofiler -Xmx64g could already do the trick maybe?
Hi @lczech
could this solve your problem?
Hi @JudithNeukamm,
thanks for the follow up. Unfortunately, I did not yet get back to that project, so as of now, I don't know whether that solution works. I'll post here once I know.
Thank you and all the best Lucas