Function noodles_tabix::async::write

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

Writes a tabix index to a file.

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

§Examples

use noodles_csi::binning_index::index::Header;
use noodles_tabix as tabix;

let index = tabix::Index::builder().set_header(Header::default()).build();
tabix::r#async::write("sample.vcf.gz.tbi", &index).await?;