bigdatagenomics/adam — pull request #99 by tdanford (2014-02-13 05:51:00+00:00)
Title: Encoding tag types in the ADAMRecord attributes, adding the 'tags' command

This commit fixes issue 92 (https://github.com/bigdatagenomics/adam/issues/92).

The old style of encoding the "optional fields" from the SAM/BAM was to store
them as key=value pairs in the ADAMRecord.attributes string. However, this
loses information about the _type_ of the tag/value, which is necessary if
we want to reconstruct the original value type (for example, for re-exporting
BAM files from ADAM files).

This update is non-backwards-compatible, changing the format of the attributes
field to tag:type:value and introducing a new Attribute class for parsing and
handling these values. It also adds functions to AdamRDDFunctions to allow for
filtering and subsetting of reads based on their tags, or to count the number of
distinct tags or tag-values across a set of reads.