java.lang.ArrayIndexOutOfBoundsException

327 views
Skip to first unread message

kazuharu

unread,
Nov 6, 2013, 3:02:57 AM11/6/13
to qual...@googlegroups.com
Dear All,

I am new to qualimap, and I get the following java.lang.ArrayIndexOutOfBoundsException error when trying to run bamqc. Any help will be appreciated.
I have tried both the v0.7.1 and the latest build (11-09-13).

Kazuharu Arakawa



$ ~/qualimap-build-11-09-13/qualimap bamqc -bam mem.sorted.bam --java-mem-size=20G

Java memory size is set to 20G

Launching application...




QualiMap v.0.8-dev

Built on 2013-09-11 11:08




Selected tool: bamqc

Available memory (Mb): 32

Max memory (Mb): 19088

Wed Nov 06 16:52:26 JST 2013 WARNING output folder already exists

Starting bam qc....

Loading sam header...

Wed Nov 06 16:52:26 JST 2013 WARNING @HD line is not presented in the BAM file header.

Loading locator...

Loading reference...

Number of windows: 400, effective number of windows: 400

Chunk of reads size: 1000

Number of threads: 24

java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 0

at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)

at java.util.concurrent.FutureTask.get(FutureTask.java:111)

at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.collectAnalysisResults(BamStatsAnalysis.java:554)

at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.run(BamStatsAnalysis.java:369)

at org.bioinfo.ngs.qc.qualimap.main.BamQcTool.execute(BamQcTool.java:198)

at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:177)

at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:98)

Caused by: java.lang.ArrayIndexOutOfBoundsException: 0

at org.bioinfo.ngs.qc.qualimap.process.ProcessBunchOfReadsTask.computeReadAlignment(ProcessBunchOfReadsTask.java:273)

at org.bioinfo.ngs.qc.qualimap.process.ProcessBunchOfReadsTask.call(ProcessBunchOfReadsTask.java:157)

at org.bioinfo.ngs.qc.qualimap.process.ProcessBunchOfReadsTask.call(ProcessBunchOfReadsTask.java:38)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

at java.util.concurrent.FutureTask.run(FutureTask.java:166)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:679)

Konstantin Okonechnikov

unread,
Nov 6, 2013, 10:27:07 AM11/6/13
to qual...@googlegroups.com
Hi!

Could you please send the header of your BAM file? The header can be  extracted with samtools:

samtools view -H mem.sorted.bam

Also, could you perhaps create a small subset of your BAM file and try running Qualimap on it to see if it still crashes?

Random subset containing 1% of the reads can be also created using samtools:

samtools view -s 0.01 -b mem.sorted.bam > mem.sorted.sample.bam


--
 Konstantin






--
You received this message because you are subscribed to the Google Groups "QualiMap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qualimap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Kazuharu Arakawa

unread,
Nov 11, 2013, 6:36:48 AM11/11/13
to qual...@googlegroups.com
Hi Konstantin,

Apologies for my delay, following is the result of the requested command.

$ samtools view -H mem.sorted.bam
@SQ SN:gi|49175990|ref|NC_000913.2| LN:4639675
The bam file is generated by mapping with BWA MEM, subsequently converted to bam and sorted using samtools 0.1.18.

Use of small subset still produces an error.
$ samtools view -s 0.01 -b 13.7.30_K12mutL.mem.sorted.bam > random.bam
$ ~/qualimap_v0.7.1/qualimap bamqc -bam random.bam
Java memory size is set to 1200M
Launching application...

QualiMap v.0.7.1
Built on 2013-04-19 14:07

Selected tool: bamqc
Available memory (Mb): 32
Max memory (Mb): 1118
Starting bam qc....
Loading sam header...
Mon Nov 11 20:35:06 JST 2013 WARNING @HD line is not presented in the BAM file header.
Loading locator...
Loading reference...
Number of windows: 400, effective number of windows: 400
Chunk of reads size: 1000
Number of threads: 24
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 0
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.collectAnalysisResults(BamStatsAnalysis.java:555)
at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.run(BamStatsAnalysis.java:348)
at org.bioinfo.ngs.qc.qualimap.main.BamQcTool.execute(BamQcTool.java:198)
at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:166)
at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:94)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.bioinfo.ngs.qc.qualimap.process.ProcessBunchOfReadsTask.computeReadAlignment(ProcessBunchOfReadsTask.java:273)
at org.bioinfo.ngs.qc.qualimap.process.ProcessBunchOfReadsTask.call(ProcessBunchOfReadsTask.java:157)
at org.bioinfo.ngs.qc.qualimap.process.ProcessBunchOfReadsTask.call(ProcessBunchOfReadsTask.java:38)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)


regards,

Kazuharu

Konstantin Okonechnikov

unread,
Nov 11, 2013, 9:17:51 AM11/11/13
to qual...@googlegroups.com
Dear Kazuharu,

unfortunately it is still not clear from the given output what might cause the problem.

Is it possible you could share the generated small random subset? Or maybe just the first 100 lines of the BAM file? Quick command for that:

samtools view -h  3.7.30_K12mutL.mem.sorted.bam | head -n 100 | samtools view -Sb - > subset.bam


--
 Konstantin

Konstantin Okonechnikov

unread,
Nov 12, 2013, 4:22:28 AM11/12/13
to qual...@googlegroups.com, k.okone...@gmail.com
Thanks to additional report from Kazuharu the bug is now fixed.

The problem was related to SAM records without sequence.

The bug-fix will be included in next version and currently available from the latest development snapshot:

https://www.dropbox.com/sh/0zpbl8b2yw5doxp/CTdPD433ob/qualimap-build-11-11-13.tar.gz

Best regards,
   Konstantin

Pinal Kanabar

unread,
Jan 17, 2014, 5:32:23 PM1/17/14
to qual...@googlegroups.com, k.okone...@gmail.com
Hi,

I downloaded updated files from dropbox -- but I still get the error
Data Source : Proton
Mapping Tool : bwa mem

Thanks
-P

Details :
 
Java memory size is set to 8G
Launching application...

QualiMap v.0.8-dev
Built on 2013-11-11 18:08

Selected tool: bamqc
Available memory (Mb): 32
Max memory (Mb): 7635
Fri Jan 17 16:23:50 CST 2014 WARNING output folder already exists
Starting bam qc....
Loading sam header...
Loading locator...
Loading reference...
Number of windows: 400, effective number of windows: 492
Chunk of reads size: 1000
Number of threads: 24
Processed 50 out of 492 windows...
Processed 100 out of 492 windows...
Processed 150 out of 492 windows...
Processed 200 out of 492 windows...
Processed 250 out of 492 windows...
Processed 300 out of 492 windows...
Processed 350 out of 492 windows...
Processed 400 out of 492 windows...
Processed 450 out of 492 windows...
Total processed windows:492
Number of reads: 18438474
Number of valid reads: 18428039
Number of duplicated reads: 0
Number of correct strand reads:0

Inside of regions...
Num mapped reads: 18428039
Num mapped first of pair: 0
Num mapped second of pair: 0
Num singletons: 0
Time taken to analyze reads: 170
Computing descriptors...
numberOfMappedBases: 1449112717
referenceSize: 3137161264
numberOfSequencedBases: 1446189634
numberOfAs: 373072051
Computing per chromosome statistics...
Computing histograms...
java.lang.IndexOutOfBoundsException: Index: 257, Size: 257
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.bioinfo.ngs.qc.qualimap.beans.BamStats.computeReadsContentHistogrmas(BamStats.java:870)
at org.bioinfo.ngs.qc.qualimap.beans.BamStats.computeHistograms(BamStats.java:795)
at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.run(BamStatsAnalysis.java:480)
at org.bioinfo.ngs.qc.qualimap.main.BamQcTool.execute(BamQcTool.java:198)
at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:177)
at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:98)
Message has been deleted

dul...@gmail.com

unread,
Mar 25, 2014, 11:46:55 AM3/25/14
to qual...@googlegroups.com, k.okone...@gmail.com
Hi,
   Have you resolved this problem,I also get the error
   Data Source : ILLUMINA
   Mapping tool: bwa 
 
Thanks 

Datails:
java.lang.IndexOutOfBoundsException: Index: 65, Size: 65
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at org.bioinfo.ngs.qc.qualimap.beans.BamStats.computeReadsContentHistogrmas(BamStats.java:875)
        at org.bioinfo.ngs.qc.qualimap.beans.BamStats.computeHistograms(BamStats.java:774)
        at org.bioinfo.ngs.qc.qualimap.process.BamStatsAnalysis.run(BamStatsAnalysis.java:475)
        at org.bioinfo.ngs.qc.qualimap.main.BamQcTool.execute(BamQcTool.java:201)
        at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:151)
        at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:92)
Reply all
Reply to author
Forward
0 new messages