Struct rust_htslib::bam::buffer::RecordBuffer
[−]
[src]
pub struct RecordBuffer { /* fields omitted */ }
A buffer for BAM records. This allows access regions in a sorted BAM file while iterating over it in a single pass. The buffer is implemented as a ringbuffer, such that extension or movement to the right has linear complexity. The buffer makes use of indexed random access. Hence, when fetching a region at the very end of the BAM, everything before is omitted without cost.
Methods
impl RecordBuffer
[src]
fn new(bam: IndexedReader) -> Self
[src]
Create a new RecordBuffer
.
fn fetch(
&mut self,
chrom: &[u8],
start: u32,
end: u32
) -> Result<(), Box<Error>>
[src]
&mut self,
chrom: &[u8],
start: u32,
end: u32
) -> Result<(), Box<Error>>
Fill buffer at the given interval. The start coordinate has to be left of
the start coordinate of any previous fill
operation.
Coordinates are 0-based, and end is exclusive.
fn iter(&self) -> Iter<Record>
[src]
Iterate over records that have been fetched with fetch
.