Struct rust_htslib::bcf::synced::SyncedReader
source · pub struct SyncedReader { /* private fields */ }
Expand description
A wrapper for bcf_srs_t
; allows joint traversal of multiple VCF and/or BCF files.
Implementations§
source§impl SyncedReader
impl SyncedReader
pub fn new() -> Result<Self>
sourcepub fn set_require_index(&mut self, do_require: bool)
pub fn set_require_index(&mut self, do_require: bool)
Enable or disable requiring of index
sourcepub fn set_pairing(&mut self, bitmask: u32)
pub fn set_pairing(&mut self, bitmask: u32)
Set the given bitmask of values from sr_pairing
module.
sourcepub fn add_reader<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
pub fn add_reader<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Add new reader with the path to the file.
sourcepub fn remove_reader(&mut self, idx: u32)
pub fn remove_reader(&mut self, idx: u32)
Remove reader with the given index.
sourcepub fn reader_count(&self) -> u32
pub fn reader_count(&self) -> u32
Return number of open files/readers.
sourcepub fn read_next(&mut self) -> Result<u32>
pub fn read_next(&mut self) -> Result<u32>
Read next line and return number of readers that have the given line (0 if end of all files is reached).
sourcepub fn header(&self, idx: u32) -> &HeaderView
pub fn header(&self, idx: u32) -> &HeaderView
Return header from the given reader.
sourcepub fn fetch(&mut self, rid: u32, start: u64, end: u64) -> Result<()>
pub fn fetch(&mut self, rid: u32, start: u64, end: 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 start coordinate of region on reference.end
-0
-based end coordinate of region on reference.