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

source

pub fn new() -> Result<Self>

source

pub fn set_require_index(&mut self, do_require: bool)

Enable or disable requiring of index

source

pub fn set_pairing(&mut self, bitmask: u32)

Set the given bitmask of values from sr_pairing module.

source

pub fn add_reader<P: AsRef<Path>>(&mut self, path: P) -> Result<()>

Add new reader with the path to the file.

source

pub fn remove_reader(&mut self, idx: u32)

Remove reader with the given index.

source

pub fn reader_count(&self) -> u32

Return number of open files/readers.

source

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).

source

pub fn has_line(&self, idx: u32) -> bool

Return whether the given reader has the line.

source

pub fn record(&self, idx: u32) -> Option<Record>

Return record from the given reader, if any.

source

pub fn header(&self, idx: u32) -> &HeaderView

Return header from the given reader.

source

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; use HeaderView::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

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for SyncedReader

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.