CallMolecularConsensusReads Error java.lang.ArrayIndexOutOfBoundsException
See original GitHub issueI have a mapped BAM with UMIs on which I’ve already run the following commands without error: bwa mem; AnnotateBamWithUmis; SortBam; SetMateInformation; and GroupReadsByUmi.
I’m now attempting to run the following CallMolecularConsensusReadsCommand:
fgbio --tmp-dir=./fgbio_tmp CallMolecularConsensusReads -1 41 -i ./groupby_umi.bam -o ./call_consensus.bam -M 2 2> ./call_consensus.log
However the task keeps failing, with the log file showing the error:
Time for last 2,000,000: 242s. Last read position: */*
[2019/09/18 03:17:53 | CallMolecularConsensusReads | Info] processed 12,500,000 records. Elapsed time: 00:04:05s. Time for last 500,000: 12s. Last read position: chr8:143,563,991
[2019/09/18 03:18:03 | CallMolecularConsensusReads | Info] processed 13,000,000 records. Elapsed time: 00:04:16s. Time for last 500,000: 10s. Last read position: chr9:99,386,947
[2019/09/18 03:18:04 | FgBioMain | Info] CallMolecularConsensusReads failed. Elapsed time: 4.32 minutes.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at com.fulcrumgenomics.umi.UmiConsensusCaller.$anonfun$toSourceRead$1(UmiConsensusCaller.scala:210)
at com.fulcrumgenomics.commons.CommonsDef.forloop(CommonsDef.scala:210)
at com.fulcrumgenomics.umi.UmiConsensusCaller.toSourceRead(UmiConsensusCaller.scala:209)
at com.fulcrumgenomics.umi.UmiConsensusCaller.toSourceRead$(UmiConsensusCaller.scala:195)
at com.fulcrumgenomics.umi.VanillaUmiConsensusCaller.toSourceRead(VanillaUmiConsensusCaller.scala:102)
at com.fulcrumgenomics.umi.VanillaUmiConsensusCaller.$anonfun$consensusFromSamRecords$1(VanillaUmiConsensusCaller.scala:152)
at scala.collection.immutable.Stream.flatMap(Stream.scala:486)
at scala.collection.immutable.Stream.$anonfun$flatMap$1(Stream.scala:494)
at scala.collection.immutable.Stream.$anonfun$append$1(Stream.scala:252)
at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1169)
at scala.collection.immutable.Stream$Cons.tail(Stream.scala:1159)
at scala.collection.immutable.Stream.length(Stream.scala:309)
at scala.collection.SeqLike.sorted(SeqLike.scala:635)
at scala.collection.SeqLike.sorted$(SeqLike.scala:634)
at scala.collection.AbstractSeq.sorted(Seq.scala:41)
at scala.collection.SeqLike.sortBy(SeqLike.scala:621)
at scala.collection.SeqLike.sortBy$(SeqLike.scala:621)
at scala.collection.AbstractSeq.sortBy(Seq.scala:41)
at com.fulcrumgenomics.umi.UmiConsensusCaller.filterToMostCommonAlignment(UmiConsensusCaller.scala:290)
at com.fulcrumgenomics.umi.UmiConsensusCaller.filterToMostCommonAlignment$(UmiConsensusCaller.scala:286)
at com.fulcrumgenomics.umi.VanillaUmiConsensusCaller.filterToMostCommonAlignment(VanillaUmiConsensusCaller.scala:102)
at com.fulcrumgenomics.umi.VanillaUmiConsensusCaller.consensusFromSamRecords(VanillaUmiConsensusCaller.scala:153)
at com.fulcrumgenomics.umi.VanillaUmiConsensusCaller.consensusSamRecordsFromSamRecords(VanillaUmiConsensusCaller.scala:133)
at com.fulcrumgenomics.umi.UmiConsensusCaller.consensusReadsFromSamRecords(UmiConsensusCaller.scala:248)
at com.fulcrumgenomics.umi.UmiConsensusCaller.consensusReadsFromSamRecords$(UmiConsensusCaller.scala:246)
at com.fulcrumgenomics.umi.VanillaUmiConsensusCaller.consensusReadsFromSamRecords(VanillaUmiConsensusCaller.scala:102)
at com.fulcrumgenomics.umi.ConsensusCallingIterator.advance(ConsensusCallingIterator.scala:78)
at com.fulcrumgenomics.umi.ConsensusCallingIterator.hasNext(ConsensusCallingIterator.scala:50)
at scala.collection.Iterator.foreach(Iterator.scala:929)
at scala.collection.Iterator.foreach$(Iterator.scala:929)
at com.fulcrumgenomics.umi.ConsensusCallingIterator.foreach(ConsensusCallingIterator.scala:41)
at com.fulcrumgenomics.Writer.write(Writer.scala:37)
at com.fulcrumgenomics.Writer.write$(Writer.scala:37)
at com.fulcrumgenomics.bam.api.SamWriter.write(SamWriter.scala:101)
at com.fulcrumgenomics.Writer.$plus$plus$eq(Writer.scala:47)
at com.fulcrumgenomics.Writer.$plus$plus$eq$(Writer.scala:46)
at com.fulcrumgenomics.bam.api.SamWriter.$plus$plus$eq(SamWriter.scala:101)
at com.fulcrumgenomics.umi.CallMolecularConsensusReads.execute(CallMolecularConsensusReads.scala:165)
at com.fulcrumgenomics.cmdline.FgBioMain.makeItSo(FgBioMain.scala:99)
at com.fulcrumgenomics.cmdline.FgBioMain.makeItSoAndExit(FgBioMain.scala:80)
at com.fulcrumgenomics.cmdline.FgBioMain$.main(FgBioMain.scala:48)
at com.fulcrumgenomics.cmdline.FgBioMain.main(FgBioMain.scala)
Any advice on what might be causing the error would be greatly appreciated
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
What causes a java.lang.ArrayIndexOutOfBoundsException ...
An ArrayIndexOutOfBoundsException is caused by trying to retrive a "box" that does not exist, by passing an index that is higher than the...
Read more >CallMolecularConsensusReads | fgbio - Fulcrum Genomics
Name Flag Type Required? Max # of Values
input i PathToBam Required 1
output o PathToBam Required 1
rejects r PathToBam Optional 1
Read more >MapR OJAI thin driver throws error "java.lang ... - Support HPE
The proper exception was not being generated because of an unexpected error message from the Data Access Gateway. The thin client has been...
Read more >ArrayIndexOutOfBoundsException (Java Platform SE 8 )
Constructs an ArrayIndexOutOfBoundsException class with the specified detail message. Method Summary. Methods inherited from class java.lang.Throwable.
Read more >java.lang.ArrayIndexOutOfBoundsException caused due to ...
Deployment fails with java.lang.ArrayIndexOutOfBoundsException error caused due to broken version sequences. Example error code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lbaxter21 I think I either read the bam file into python to look for a malformed read, or I used pysam to catch the read. It was just a quick script so I’m afraid I don’t have the code I used.
thanks - in the meantime I managed to identify that one of my fastq files had been incompletely downloaded, (using a unix one-liner: for i in
ls *.gz
; do echo $(gzcat ${i} | wc -l)/4|bc; done — so that was what was causing the outofrange error in my case.I was surprised that bwa hadn’t complained about a truncated input file or a mismatch between the number of reads in R1 and R2. Annoying this slipped through and caused a problem later in the pipeline, but serves as a useful reminder for me to sanity-check input data properly!Thanks for your quick reply,L On Monday, 24 February 2020, 16:42:25 GMT, Joe Sneath Thompson notifications@github.com wrote:@lbaxter21 I think I either read the bam file into python to look for a malformed read, or I used pysam to catch the read. It was just a quick script so I’m afraid I don’t have the code I used.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.