Struct noodles::bam::bai::index::Builder [−][src]
pub struct Builder { /* fields omitted */ }
Expand description
A BAM index builder.
Implementations
Adds a record.
The record must have an associated chunk denoting its start and end position in the file.
Examples
use noodles_bam::{self as bam, bai};
use noodles_bgzf as bgzf;
use noodles_csi::index::reference_sequence::bin::Chunk;
let mut builder = bai::Index::builder();
let record = bam::Record::default();
let chunk = Chunk::new(
bgzf::VirtualPosition::from(233),
bgzf::VirtualPosition::from(377),
);
builder.add_record(&record, chunk);