hts 0.1.18

Rust binding for htslib
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::VcfRecord;

impl <'a> VcfRecord<'a> {
    pub fn begin(&self) -> i64 {
        self.pos()
    }

    pub fn end(&self) -> Option<i64> {
        if self.alt_seq_str().ok()? == Some("<INS>") {
            return Some(self.pos());
        } else if let Some(Some(value)) = self.get_info(b"SVLEN\0").map(|info| info.value().get_int(0)) {
            return Some(self.pos() + value);
        } else if let Some(Some(value)) = self.get_info(b"END\0").map(|info| info.value().get_int(0)) {
            return Some(value);
        }
        None
    }
}