broadinstitute/gamgee — pull request #85 by droazen (2014-06-23 06:30:36+00:00)
Title: SamBuilder, in-place setters, partial Sam tag support

-Created SamBuilder to build Sam objects from existing data or
from scratch
-unlike in-place setters in Sam class, can restructure and
manipulate the variable-length read data in arbitrary ways
-offers both repeatable builds and the option of a (slightly
more efficient) one-time build
-supports setting data fields using existing reads, vectors,
initializer lists, and strings (least efficient)
-basic validation of logical consistency of read before each
build (eg., number of base qualities must match number of bases)

-In-place setters for data fields in the Sam class when more radical
restructuring is not needed

-Basic support for Sam TAG:TYPE:VALUE fields
-read-only support for integer, double/float, char, and string
valued tags
-can copy an existing read's tag in their entirety using SamBuilder,
but can't yet set individual tags

-Cigar::make_cigar_element() to ease creation of vectors/initializer_lists
of cigar elements

-Comprehensive tests for SamBuilder and SamTag

TODOS:

-support for tag fields of type H (byte array) and B (numeric array)
-add ability to set/modify individual tags in SamBuilder
-properly set the core.isize field in SamBuilder (currently the
only field not yet fully supported apart from the tags)
-fix issue with htslib bam_aux2i() and bam_aux2f() return value
ambiguity when field is of wrong type