Hi all,
I am new to compression of sequence data.
when i am trying to compress the individual chromosome BAM file i am getting out of memory exception.
Input file used is ~88MB in size.
Though, I could succesfully run cram by explicitly setting java memory size directives ( -Xms256m -Xmx2048m)
if for smaller files itself cramtools reports "Out of memory", how to run cramtools for larger files
Could anyone help me understand how to work with cramtools on larger files.
Thanks,
Pandu Kumar C
I am new to compression of sequence data.
when i am trying to compress the individual chromosome BAM file i am getting out of memory exception.
Input file used is ~88MB in size.
Code:
java -jar cramtools-2.1.jar cram -I NA19240.chrom1.sorted.bam.bam -R c hr1.fa -O test.cram Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.sf.cram.CramTools.invoke(CramTools.java:93) at net.sf.cram.CramTools.main(CramTools.java:123) Caused by: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2271) at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118) at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93) at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153) at net.sf.cram.io.ByteBufferUtils.copyLarge(ByteBufferUtils.java:615) at net.sf.cram.io.ByteBufferUtils.readFully(ByteBufferUtils.java:623) at net.sf.cram.ref.ReferenceSource.loadFromPath(ReferenceSource.java:253) at net.sf.cram.ref.ReferenceSource.findBasesByMD5(ReferenceSource.java:283) at net.sf.cram.ref.ReferenceSource.findBases(ReferenceSource.java:179) at net.sf.cram.ref.ReferenceSource.getReferenceBases(ReferenceSource.java:127) at net.sf.cram.FixBAMFileHeader.fixSequence(FixBAMFileHeader.java:54) at net.sf.cram.FixBAMFileHeader.fixSequences(FixBAMFileHeader.java:47) at net.sf.cram.Bam2Cram.main(Bam2Cram.java:307) ... 6 more
if for smaller files itself cramtools reports "Out of memory", how to run cramtools for larger files
Could anyone help me understand how to work with cramtools on larger files.
Thanks,
Pandu Kumar C
Comment