samtools/htslib — pull request #151 by jkbonfield (2014-11-28 09:41:57+00:00)
Title: Improvements to read-name generation in CRAM

When dealing with lossy cramtools.jar output (not preserving read names), this code has to auto-generate a name. This fixes it in two ways.

1) The name now matches the one used in Cramtools (bar the addition of a prefix string, which we ought to amend at some stage to be user defineable; ie except CRAM_OPT_PREFIX).

Additionally it replaces the 32-bit record counter with a 64-bit one and uses it as fully 64-bit for CRAMv3.

2) Replaces sprintf with a custom fast integer encoder.

The former of these changes needs merging, the latter is more questionable and maybe tidier done in another way. See issue #150.