rust-bio / rust-htslib

This library provides HTSlib bindings and a high level Rust API for reading and writing BAM files.
MIT License
309 stars 80 forks source link

Add update_aux function to BAM records. #335

Open ghuls opened 3 years ago

ghuls commented 3 years ago

Add update_aux function to BAM records as htslib now has the following functions:

bam_aux_update_str
bam_aux_update_int
bam_aux_update_float
jch-13 commented 3 years ago

I was hoping that there is no need to implement bam_aux_update... functions because we can delete and recreate Aux fields—but I'll be happy to add them if there is a need.

ghuls commented 3 years ago

@jch-13 It might be worth to add as it can be faster than removing and appending an Aux field (especially if it can be updated in place).

See: https://github.com/samtools/htslib/pull/694