rust_htslib::faidx

Function build

Source
pub fn build(path: impl Into<PathBuf>) -> Result<(), Box<dyn Error>>
Expand description

Build a faidx for input path.

ยงErrors

If indexing fails. Could be malformatted or file could not be accessible.

 use rust_htslib::faidx::build;
 let path = std::path::PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"),"/test/test_cram.fa"));
 build(&path).expect("Failed to build fasta index");