We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

A ridiculus amount of memory

hI,

PICARD dies on me after using a ridiculus amount of memory. The command line was:


/gpfs0/biores/home/erubin/jdk/jdk1.8.0_131/bin/java -jar /gpfs0/biores/users/erubin/jars/picard-2.11.0.jar ReorderSam I=Data
/RNAseq/5-1524_S1_merged_R1_001.Aligned.dedupped.bam O=Data/RNAseq/5-1524_S1_merged_R1_001.Aligned.dedupped.reorder.bam R=/gp
fs0/biores/home/erubin/ess0/Haviv/Analysis5/GenomeDir/GCF_000001405.39_GRCh38.p13_genomic.fna CREATE_INDEX=TRUE

And this is what I got (only the end of it):


INFO 2019-12-29 00:08:30 ReorderSam Processing NT_187693.1
INFO 2019-12-29 00:08:30 ReorderSam Wrote 727 reads
[Sun Dec 29 00:08:30 IST 2019] picard.sam.ReorderSam done. Elapsed time: 10.78 minutes.
Runtime.totalMemory()=514501640192
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
Exception in thread "main" 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.DiskBasedBAMFileIndex.getSpanOverlapping(DiskBasedBAMFileIndex.java:61)
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 picard.sam.ReorderSam.doWork(ReorderSam.java:141)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:268)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:98)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:108)

Answers

  • Forgot to mention: I am first setting memory using the environment:


    export _JAVA_OPTIONS="-Xmx600g -Xms500g"
  • akovalskakovalsk Member, Broadie, Moderator admin

    Hi @erubin1967 thanks for your question!

    It looks like there might be a couple of things going on here. Firstly, the version of Picard you are using is a bit out of date, so you should update to the latest version. If the problem persists, one likely possibility is that you have a corrupt bam index.

Sign In or Register to comment.