samtools/htslib — pull request #116 by SamStudio8 (2014-08-01 16:52:28+00:00)
Title: RFC: htslib header parser

Following issue #203 I have been experimenting with adding a BAM header parser in htslib and implementing use of its functionality in the reading in of BAM files for `samtools merge`, replacing the heavy and inefficient use of regular expressions. Currently this only handles the @RG and @PG lines, whose fields are each stored in a struct, which in turn make up a linked list stored in `bam_hdr_t`.

My C is a little rusty and I imagine my implementation could be simplified and polished somewhat, but I am happy to get some feedback on this as necessary so as I might be able to continue finishing this parser in the right direction.