rust_htslib::bcf::synced

Struct 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>,

Source§

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>,

Source§

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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T