juicer icon indicating copy to clipboard operation
juicer copied to clipboard

java out of memory error when running juicer_tools apa on server

Open bioinfo89 opened this issue 1 year ago • 2 comments

Hi,

I am trying to run the aggregate peak analysis using juicer_tools, following the command I use, #APA plots: module load juicer/1.5.6 module load java/oracle/jdk1.8.0_65

juicer_tools48g apa -r 10000 out_10kb.matrix out.interactions.intra.bedpe ChIAPET_GM

I get the following error:

Picked up _JAVA_OPTIONS: -Dhttp.proxyHost=proxy.swmed.edu -Dhttp.proxyPort=3128 -Dhttps.proxyHost=proxy.swmed.edu -Dhttps.proxyPort=3128 Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit at java.util.Arrays.copyOf(Arrays.java:3236) at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118) at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:135) at htsjdk.tribble.util.LittleEndianInputStream.readString(LittleEndianInputStream.java:121) at juicebox.data.DatasetReaderV2.getMagicString(DatasetReaderV2.java:113) at juicebox.data.HiCFileTools.extractDatasetForCLT(HiCFileTools.java:57) at juicebox.tools.clt.juicer.APA.runWithReturn(APA.java:221) at juicebox.tools.clt.juicer.APA.run(APA.java:205) at juicebox.tools.HiCTools.main(HiCTools.java:96)

It. seems that the java heap size needs to be changed, but I am not sure how should I do that using the command? Kindly assist in resolving the issue. Thank you!

bioinfo89 avatar Nov 16 '22 23:11 bioinfo89

Try running java with the Xmx flag, i.e. java -Xmx30G juicer_tools.jar .... Notice that there are no spaces -n -Xmx30G Of course, replace 30G by whatever is appropriate for your system.

moshe-olshansky avatar Nov 16 '22 23:11 moshe-olshansky

Thanks for your reply, however, after loading the juicer module on hpc, I do not find juicer_tools.jar file it has only these scripts for me to use from: juicer_arrowhead.sh juicer_hiccups.sh juicer_postprocessing.sh juicer.sh juicer_tools juicer_tools48g

bioinfo89 avatar Nov 16 '22 23:11 bioinfo89