noodles_bam::bai::async

Function read

Source
pub async 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::r#async::read("sample.bam.bai").await?;