noodles_bam::bai

Function read

Source
pub fn read<P>(src: P) -> Result<Index>
where P: AsRef<Path>,
Expand description

Reads the entire contents of a BAM index.

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

ยงExamples

use noodles_bam::bai;
let index = bai::read("sample.bam.bai")?;