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.
Trait Implementations§
Source§impl Debug for SyncedReader
impl Debug for SyncedReader
Auto Trait Implementations§
impl Freeze for SyncedReader
impl RefUnwindSafe for SyncedReader
impl !Send for SyncedReader
impl !Sync for SyncedReader
impl Unpin for SyncedReader
impl UnwindSafe for SyncedReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more