#1 RunLength Quality encoding crashes if > short.MAX

closed-fixed
Dan Katzel
None
5
2013-02-06
2013-02-06
Dan Katzel
No

If a quality sequence with more than Short.MAX_VALUE consecutive values is created it will crash with a Exception in thread "main" java.nio.BufferUnderflowException
at java.nio.Buffer.nextGetIndex(Buffer.java:474)
at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:117)

Modify RunLengthEncoding to support longer run lengths

Discussion

  • Dan Katzel
    Dan Katzel
    2013-02-06

    • assigned_to: nobody --> dkatzel
     
  • Dan Katzel
    Dan Katzel
    2013-02-06

    Fixed RunLengthQualityCodec to use variable length run length instead of shorts. This allows run lengths up to longs while keeping memory low. Run length encoded byte array now takes an extra byte in the header but often one less byte per run length so in general memory usage will be lower. Example fastq records take up .5% to 1% less memory than they used to.

    Code change was committed in revision 1702

     
  • Dan Katzel
    Dan Katzel
    2013-02-06

    • status: open --> closed-fixed