See Will Stokes' request at https://sourceforge.net/p/samtools/mailman/message/36454348/
We desire a way to construct a BAM record from the component pieces that isn't just a manual mess of bit/byte shuffling. Most of it is easy, but some things such as creation of the sequence is complex.
CRAM has an internal function for this (bam_construct_seq), so looking at that and surrounding functions may be a suitable starting point.
See Will Stokes' request at https://sourceforge.net/p/samtools/mailman/message/36454348/
We desire a way to construct a BAM record from the component pieces that isn't just a manual mess of bit/byte shuffling. Most of it is easy, but some things such as creation of the sequence is complex.
CRAM has an internal function for this (bam_construct_seq), so looking at that and surrounding functions may be a suitable starting point.