Convert bam2bcf_indel.c to use the htslib API directly