pub const BAM_FPAIRED: u16 = 0x1;
pub const BAM_FPROPER_PAIR: u16 = 0x2;
pub const BAM_FUNMAP: u16 = 0x4;
pub const BAM_FMUNMAP: u16 = 0x8;
pub const BAM_FREVERSE: u16 = 0x10;
pub const BAM_FMREVERSE: u16 = 0x20;
pub const BAM_FREAD1: u16 = 0x40;
pub const BAM_FREAD2: u16 = 0x80;
pub const BAM_FSECONDARY: u16 = 0x100;
pub const BAM_FQCFAIL: u16 = 0x200;
pub const BAM_FDUP: u16 = 0x400;
pub const BAM_FSUPPLEMENTARY: u16 = 0x800;
pub fn get_aux_int(record: &rust_htslib::bam::Record, tag: &[u8]) -> Option<i64> {
use rust_htslib::bam::record::Aux;
match record.aux(tag) {
Ok(Aux::U8(v)) => Some(v as i64),
Ok(Aux::U16(v)) => Some(v as i64),
Ok(Aux::U32(v)) => Some(v as i64),
Ok(Aux::I8(v)) => Some(v as i64),
Ok(Aux::I16(v)) => Some(v as i64),
Ok(Aux::I32(v)) => Some(v as i64),
_ => None,
}
}