Function noodles::bam::bai::write

source ·
pub fn write<P>(
    dst: P,
    index: &Index<Vec<VirtualPosition>>
) -> Result<(), Error>
where P: AsRef<Path>,
Expand description

Writes a BAM index to a file.

This is a convenience function and is equivalent to creating a file at the given path, writing the header, and writing the index.

§Examples

use noodles_bam::bai;
let index = bai::Index::default();
bai::write("sample.bam.bai", &index)?;