mozack/abra2

Negative Array Size Exception

drsuuzzz opened this issue · 7 comments

Any thoughts on how to get around this error? It's executed as:
abra2-2.09.jar --in B.bam --out B_realigned.bam --ref hg19.fa --targets targets.bed --threads 12 --tmpdir ABRA_tmp_B --mad 999999 --mrr 999999

and here is the stack trace with the error:

INFO Tue Sep 26 11:10:41 EDT 2017 PROCESS_REGION_MSECS: chr3_121351913_121352018 1 0 0 0
INFO Tue Sep 26 11:10:41 EDT 2017 PROCESS_REGION_MSECS: chr3_129389372_129389772 268 7 6 0
java.lang.NegativeArraySizeException
at java.lang.AbstractStringBuilder.(AbstractStringBuilder.java:68)
at java.lang.StringBuffer.(StringBuffer.java:128)
at abra.CompareToReference2.getSequence(CompareToReference2.java:393)
at abra.KmerSizeEvaluator.getBases(KmerSizeEvaluator.java:44)
at abra.KmerSizeEvaluator.identifyMinKmer(KmerSizeEvaluator.java:98)
at abra.NativeAssembler.assembleContigs(NativeAssembler.java:268)
at abra.ReAligner.assemble(ReAligner.java:1026)
at abra.ReAligner.processRegion(ReAligner.java:1200)
at abra.ReAligner.processChromosomeChunk(ReAligner.java:336)
at abra.ReAlignerRunnable.go(ReAlignerRunnable.java:21)
at abra.AbraRunnable.run(AbraRunnable.java:20)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:745)
java.lang.RuntimeException: java.lang.NegativeArraySizeException
at abra.NativeAssembler.assembleContigs(NativeAssembler.java:390)
at abra.ReAligner.assemble(ReAligner.java:1026)
at abra.ReAligner.processRegion(ReAligner.java:1200)
at abra.ReAligner.processChromosomeChunk(ReAligner.java:336)
at abra.ReAlignerRunnable.go(ReAlignerRunnable.java:21)
at abra.AbraRunnable.run(AbraRunnable.java:20)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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:745)
Caused by: java.lang.NegativeArraySizeException
at java.lang.AbstractStringBuilder.(AbstractStringBuilder.java:68)
at java.lang.StringBuffer.(StringBuffer.java:128)
at abra.CompareToReference2.getSequence(CompareToReference2.java:393)
at abra.KmerSizeEvaluator.getBases(KmerSizeEvaluator.java:44)
at abra.KmerSizeEvaluator.identifyMinKmer(KmerSizeEvaluator.java:98)
at abra.NativeAssembler.assembleContigs(NativeAssembler.java:268)
... 10 more
INFO Tue Sep 26 11:10:41 EDT 2017 PROCESS_REGION_MSECS: chr3_42259734_42260134 508 20 13 0

Are you able to share a small BAM file that can be used to reproduce the problem?

I will see what I can do.....

I've managed to narrow it down to this region, chr2:183990145-184005273. I've attached the bam file.

B_rep1_rmdupd_reg.zip

Thanks. Could you also please share your targets.bed file?

Sure, made a small one that can replicate this issue with the bam file I attached previously. sorry i didn't include this before
test.zip

i think i figured it out. there is an exon in my bed file with the length of 1 base :(

Thanks for sharing the test data. Very small region sizes are handled more elegantly in v2.10