AddNorm Error: ArrayIndexOutOfBoundsException

130 views
Skip to first unread message

Kaya Guvendi

unread,
Aug 7, 2022, 3:24:30 AM8/7/22
to 3D Genomics
Hello,
I am using Juicer to process fastq data from the T2T consortium (CHM13) into .hic, using the juicer.sh script (SLURM version). I have gotten it to work until the addNorm command, occurring in one of the last scripts submitted by juicer.sh, right after the .hic files are formed. During the execution of this command, all initially seems well, until in the BP_100 step, an ArrayIndexOutOfRange error is thrown, with the index indicating that this happened during the processing of ChrM. Comparing this index with my chrom.sizes file, I can see that it is in fact located beyond the bounds of ChrM as my chrom.sizes specified, by 1 index, as one would expect the defined indices to run out. I am very confused by this error and have been trying to diagnose it for the last 2 days, including looking at the source code, which seems safe enough from such exceptions, leaving me unable to understand what may have caused this bug. I will be leaving below the stack traces for both the single and multi core runs of this step. 

java.lang.ArrayIndexOutOfBoundsException: 167
        at juicebox.tools.utils.norm.NormalizationCalculations.computeVC(NormalizationCalculations.java:355)
        at juicebox.tools.utils.norm.NormalizationVectorUpdater.buildVCOrVCSQRT(NormalizationVectorUpdater.java:186)
        at juicebox.tools.utils.norm.NormalizationVectorUpdater.updateHicFile(NormalizationVectorUpdater.java:139)
        at juicebox.tools.clt.old.AddNorm.run(AddNorm.java:128)
        at juicebox.tools.HiCTools.main(HiCTools.java:94)

-------------------------------------------------------------------------
Exception in thread "pool-15-thread-6" java.lang.ArrayIndexOutOfBoundsException: 167
        at juicebox.tools.utils.norm.NormalizationCalculations.computeVC(NormalizationCalculations.java:355)
        at juicebox.tools.utils.norm.MultithreadedNormalizationVectorUpdater.buildVCOrVCSQRT(MultithreadedNormalizationVectorUpdater.java:273)
        at juicebox.tools.utils.norm.MultithreadedNormalizationVectorUpdater.runIndividualChromosomeCode(MultithreadedNormalizationVectorUpdater.java:252)
        at juicebox.tools.utils.norm.MultithreadedNormalizationVectorUpdater$1.run(MultithreadedNormalizationVectorUpdater.java:141)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)


Moshe Olshansky

unread,
Aug 8, 2022, 8:38:37 PM8/8/22
to 3D Genomics
Hi there,

What was your exact command to run juicer.sh?

Kaya Guvendi

unread,
Aug 10, 2022, 11:14:10 AM8/10/22
to 3D Genomics
Hello,
The command that caused this error to be thrown was:
bash juicer.sh -g t2t -z fasta/chm13v2.0.fa -p fasta/t2t.chrom.sizes -y restriction/alt/t2t_Arima.txt -S final
(with -S early called and completed before)

The command I used during debugging to produce the second output above was:
time juicerScripts/scripts/juicer_tools addNorm --threads8 aligned/inter.hic

Thanks for your response.

Moshe Olshansky

unread,
Aug 14, 2022, 1:14:33 AM8/14/22
to 3D Genomics
Hello,

Could you please check the length of chrM in your chm13v2.0.fa and t2t.chrom.sizes files? Are they the same? If so, are there any alignments to chrM which exceed this length (look in the split folder)?

Kaya Guvendi

unread,
Aug 14, 2022, 7:54:39 PM8/14/22
to 3D Genomics
I resolved this issue by removing all chrM data in an intermediate step as it was not relevant to my intended analysis.
Reply all
Reply to author
Forward
0 new messages