I got a java.nio.BufferUnderflowException exception after running JACUSA2 for about 30 mins with the following command:
java -Xmx50g -jar ~/programs/JACUSA/JACUSA_v2.0.0-RC22.jar call-2 -p $NCPUS -F 1024 -P2 RF-FIRSTSTRAND -r $condition.out -s -a D,Y,H:condition=1 Dedup_genome.bam Dedup_${condition}_rep1_hisat2.sorted.bam,Dedup_${condition}_rep2_hisat2.sorted.bam,Dedup_${condition}_rep3_hisat2.sorted.bam,Dedup_${condition}_rep4_hisat2.sorted.bam
I am wondering why did I get this error and how can I get through it? I suspect it might be caused by the large size of my bam files. My genome bam is 120G and each RNA-seq bam is about 4G.
The full error message is attached here:
java.nio.BufferUnderflowException at java.nio.Buffer.nextGetIndex(Buffer.java:506) at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:681) at htsjdk.samtools.AbstractBAMFileIndex$MemoryMappedFileBuffer.readInteger(AbstractBAMFileIndex.java:498) at htsjdk.samtools.AbstractBAMFileIndex.readInteger(AbstractBAMFileIndex.java:442) at htsjdk.samtools.AbstractBAMFileIndex.query(AbstractBAMFileIndex.java:279) at htsjdk.samtools.CachingBAMFileIndex.getQueryResults(CachingBAMFileIndex.java:163) at htsjdk.samtools.CachingBAMFileIndex.getSpanOverlapping(CachingBAMFileIndex.java:66) at htsjdk.samtools.BAMFileReader.getFileSpan(BAMFileReader.java:898) at htsjdk.samtools.BAMFileReader.createIndexIterator(BAMFileReader.java:915) at htsjdk.samtools.BAMFileReader.query(BAMFileReader.java:575) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.query(SamReader.java:528) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.query(SamReader.java:533) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.queryOverlapping(SamReader.java:395) at lib.util.coordinate.provider.SAMCoordinateAdvancedProvider.getNextCoveredPosition(SAMCoordinateAdvancedProvider.java:161) at lib.util.coordinate.provider.SAMCoordinateAdvancedProvider.searchNext(SAMCoordinateAdvancedProvider.java:134) at lib.util.coordinate.provider.SAMCoordinateAdvancedProvider.hasNext(SAMCoordinateAdvancedProvider.java:92) at lib.worker.WorkerDispatcher.hasNext(WorkerDispatcher.java:60) at lib.worker.AbstractWorker.processInit(AbstractWorker.java:177) at lib.worker.AbstractWorker.run(AbstractWorker.java:218)
I tried to re-run the sam command with more memory, but it always stoped at the same scaffold.
Hi,
I got a
java.nio.BufferUnderflowException
exception after running JACUSA2 for about 30 mins with the following command:java -Xmx50g -jar ~/programs/JACUSA/JACUSA_v2.0.0-RC22.jar call-2 -p $NCPUS -F 1024 -P2 RF-FIRSTSTRAND -r $condition.out -s -a D,Y,H:condition=1 Dedup_genome.bam Dedup_${condition}_rep1_hisat2.sorted.bam,Dedup_${condition}_rep2_hisat2.sorted.bam,Dedup_${condition}_rep3_hisat2.sorted.bam,Dedup_${condition}_rep4_hisat2.sorted.bam
I am wondering why did I get this error and how can I get through it? I suspect it might be caused by the large size of my bam files. My genome bam is 120G and each RNA-seq bam is about 4G.
The full error message is attached here:
java.nio.BufferUnderflowException at java.nio.Buffer.nextGetIndex(Buffer.java:506) at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:681) at htsjdk.samtools.AbstractBAMFileIndex$MemoryMappedFileBuffer.readInteger(AbstractBAMFileIndex.java:498) at htsjdk.samtools.AbstractBAMFileIndex.readInteger(AbstractBAMFileIndex.java:442) at htsjdk.samtools.AbstractBAMFileIndex.query(AbstractBAMFileIndex.java:279) at htsjdk.samtools.CachingBAMFileIndex.getQueryResults(CachingBAMFileIndex.java:163) at htsjdk.samtools.CachingBAMFileIndex.getSpanOverlapping(CachingBAMFileIndex.java:66) at htsjdk.samtools.BAMFileReader.getFileSpan(BAMFileReader.java:898) at htsjdk.samtools.BAMFileReader.createIndexIterator(BAMFileReader.java:915) at htsjdk.samtools.BAMFileReader.query(BAMFileReader.java:575) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.query(SamReader.java:528) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.query(SamReader.java:533) at htsjdk.samtools.SamReader$PrimitiveSamReaderToSamReaderAdapter.queryOverlapping(SamReader.java:395) at lib.util.coordinate.provider.SAMCoordinateAdvancedProvider.getNextCoveredPosition(SAMCoordinateAdvancedProvider.java:161) at lib.util.coordinate.provider.SAMCoordinateAdvancedProvider.searchNext(SAMCoordinateAdvancedProvider.java:134) at lib.util.coordinate.provider.SAMCoordinateAdvancedProvider.hasNext(SAMCoordinateAdvancedProvider.java:92) at lib.worker.WorkerDispatcher.hasNext(WorkerDispatcher.java:60) at lib.worker.AbstractWorker.processInit(AbstractWorker.java:177) at lib.worker.AbstractWorker.run(AbstractWorker.java:218)
I tried to re-run the sam command with more memory, but it always stoped at the same scaffold.