ArrayIndexOutOfBoundsException when using juicer pre

523 views
Skip to first unread message

Haobin Zhan

unread,
Apr 3, 2019, 11:58:13 PM4/3/19
to 3D Genomics

Dear friends:

I'm learning to use juicer tool to convert my raw matrix to .hic file recently. But when I run the command pre there is always an exception of  ArrayIndexOutOfBoundsException.

I have read some solutions of this exception but I find that  the StackTrace of the exception is different from the problem that had been resolved.

So I really want to know how to resolve it.


exception.png


These are last several lines of my data which is converted from a raw matrix:

0 9 140000000 0 0 9 140040000 1 15
0 9 140000000 0 0 9 140080000 1 47
0 9 140000000 0 0 9 140120000 1 6
0 9 140000000 0 0 9 140160000 1 1
0 9 140000000 0 0 9 140200000 1 1
0 9 140040000 0 0 9 140080000 1 15
0 9 140080000 0 0 9 140120000 1 9
0 9 140080000 0 0 9 140160000 1 2
0 9 140120000 0 0 9 140160000 1 2
0 9 140160000 0 0 9 140200000 1 1


Thanks.

Haobin Zhan

unread,
Apr 4, 2019, 3:07:25 AM4/4/19
to 3D Genomics

The command and exception are as follows:

[ZhangShuo@bio6 juicer_tools]$ java -Xmx2g -jar juicer_tools.1.9.9_jcuda.0.8.jar pre /home/ZhangShuo/hicData/hESpre_01_mid_score_nodi_less.txt  /home/ZhangShuo/hicData/mES_less.hic hg19 
Not including fragment map
Start preprocess
Writing header
Writing body
.......................
Writing footer

Finished preprocess

Calculating norms for zoom BP_2500000java.lang.ArrayIndexOutOfBoundsException: 25
at juicebox.tools.utils.original.NormalizationCalculations.computeVC(NormalizationCalculations.java:319)
at juicebox.tools.utils.original.NormalizationVectorUpdater.updateHicFile(NormalizationVectorUpdater.java:161)
at juicebox.tools.clt.old.PreProcessing.run(PreProcessing.java:121)
at juicebox.tools.HiCTools.main(HiCTools.java:96)

Haobin Zhan

unread,
Apr 9, 2019, 10:15:13 PM4/9/19
to 3D Genomics
OK...I think I have already found the key.
The reference genome defines the length of each chromosome. When I try to convert a raw matrix to .hic file, a few locus coordinates may overflow. That is why the exception occurs.

Kaya Guvendi

unread,
Aug 5, 2022, 3:24:48 PM8/5/22
to 3D Genomics
Hello, I think I am having the same issue with my work currently (have been struggling with this bug for a few days actually). I could not quite understand what you exactly mean by that last line; which chromosome lengths had a mismatch in your case? (as in was it an issue with chrom.sizes (-p flag) vs fasta file (-z flag) or something?)

谢坤

unread,
Apr 2, 2023, 7:41:32 PM4/2/23
to 3D Genomics
Hi, have you solved this problem? How to deal with this situation?
Best,
Kun

Olga Dudchenko

unread,
Apr 21, 2023, 1:59:49 PM4/21/23
to 3D Genomics
Make sure you are not trying to use new Juicer tools with old mnd. I think they are not backwards compatible, as in Juicer 2 pre will only take in the short mnd format. -Olga
Reply all
Reply to author
Forward
0 new messages