Struct rust_htslib::bcf::IndexedReader
source · [−]pub struct IndexedReader { /* private fields */ }
Expand description
An indexed VCF/BCF reader.
Implementations
sourceimpl IndexedReader
impl IndexedReader
sourcepub fn fetch(&mut self, rid: u32, start: u64, end: Option<u64>) -> Result<()>
pub fn fetch(&mut self, rid: u32, start: u64, end: Option<u64>) -> Result<()>
Jump to the given region.
Arguments
rid
- numeric ID of the reference to jump to; useHeaderView::name2rid
for resolving contig name to ID.start
-0
-based inclusive start coordinate of region on reference.end
- Optional0
-based inclusive end coordinate of region on reference. IfNone
is given, records are fetched fromstart
until the end of the contig.
Note
The entire contig can be fetched by setting start
to 0
and end
to None
.
Trait Implementations
sourceimpl Debug for IndexedReader
impl Debug for IndexedReader
sourceimpl Drop for IndexedReader
impl Drop for IndexedReader
sourceimpl Read for IndexedReader
impl Read for IndexedReader
sourcefn records(&mut self) -> Records<'_, Self>ⓘNotable traits for Records<'a, R>impl<'a, R: Read> Iterator for Records<'a, R> type Item = Result<Record>;
fn records(&mut self) -> Records<'_, Self>ⓘNotable traits for Records<'a, R>impl<'a, R: Read> Iterator for Records<'a, R> type Item = Result<Record>;
Return an iterator over all records of the VCF/BCF file.
sourcefn set_threads(&mut self, n_threads: usize) -> Result<()>
fn set_threads(&mut self, n_threads: usize) -> Result<()>
Activate multi-threaded BCF/VCF read support in htslib. This should permit faster
reading of large VCF files. Read more
sourcefn header(&self) -> &HeaderView
fn header(&self) -> &HeaderView
Return the header.
sourcefn empty_record(&self) -> Record
fn empty_record(&self) -> Record
Return empty record. Can be reused multiple times.
impl Send for IndexedReader
Auto Trait Implementations
impl RefUnwindSafe for IndexedReader
impl !Sync for IndexedReader
impl Unpin for IndexedReader
impl UnwindSafe for IndexedReader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more