Struct rust_htslib::bcf::IndexedReader
source · pub struct IndexedReader { /* private fields */ }
Expand description
An indexed VCF/BCF reader.
Implementations§
source§impl IndexedReader
impl IndexedReader
sourcepub fn from_url(url: &Url) -> Result<Self, IndexedReaderError>
pub fn from_url(url: &Url) -> Result<Self, IndexedReaderError>
Create a new IndexedReader
from an URL.
sourcepub fn fetch(&mut self, rid: u32, start: u32, end: u32) -> Result<(), FetchError>
pub fn fetch(&mut self, rid: u32, start: u32, end: u32) -> Result<(), FetchError>
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 start coordinate of region on reference.end
-0
-based end coordinate of region on reference.
Trait Implementations§
source§impl Debug for IndexedReader
impl Debug for IndexedReader
source§impl Drop for IndexedReader
impl Drop for IndexedReader
source§impl Read for IndexedReader
impl Read for IndexedReader
source§fn read(&mut self, record: &mut Record) -> Result<(), ReadError>
fn read(&mut self, record: &mut Record) -> Result<(), ReadError>
Read the next record. Read more
source§fn records(&mut self) -> Records<'_, Self> ⓘ
fn records(&mut self) -> Records<'_, Self> ⓘ
Return an iterator over all records of the VCF/BCF file.
source§fn set_threads(&mut self, n_threads: usize) -> Result<(), ThreadingError>
fn set_threads(&mut self, n_threads: usize) -> Result<(), ThreadingError>
Activate multi-threaded BCF/VCF read support in htslib. This should permit faster
reading of large VCF files. Read more
source§fn header(&self) -> &HeaderView
fn header(&self) -> &HeaderView
Return the header.
source§fn empty_record(&self) -> Record
fn empty_record(&self) -> Record
Return empty record. Can be reused multiple times.