Function get_seq_faidx

Source
pub fn get_seq_faidx(file: &str, range: &str) -> Result<String>
Expand description
match which::which("samtools") {
    Ok(_) => {
        let seq = intspan::get_seq_faidx("tests/fasr/NC_000932.fa", "NC_000932:1-10").unwrap();
        assert_eq!(seq, "ATGGGCGAAC".to_string());
        let res = intspan::get_seq_faidx("tests/fasr/NC_000932.fa", "FAKE:1-10");
        assert_eq!(format!("{}", res.unwrap_err()), "Command executed with failing error code");
    }
    Err(_) => {}
}