[][src]Struct bam::bam_reader::IndexedReaderBuilder

pub struct IndexedReaderBuilder { /* fields omitted */ }

IndexedReader builder. Allows to specify paths to BAM and BAI files, as well as LRU cache size and the option to skip BAI modification time check.

Methods

impl IndexedReaderBuilder[src]

pub fn new() -> Self[src]

Creates a new indexed reader builder.

pub fn bai_path<P: AsRef<Path>>(&mut self, path: P) -> &mut Self[src]

Sets a path to a BAI index. By default, it is {bam_path}.bai. Overwrites the last value, if any.

pub fn check_time(&mut self, value: bool) -> &mut Self[src]

Sets or unsets BAI modification time check (set by default).

If on, the build will fail if the BAI index is younger than the BAM file.

pub fn cache_capacity(&mut self, cache_capacity: usize) -> &mut Self[src]

Sets new LRU cache capacity. See cache_capacity for more details.

pub fn from_path<P: AsRef<Path>>(
    &self,
    bam_path: P
) -> Result<IndexedReader<File>>
[src]

Creates a new IndexedReader from bam_path. If BAI path was not specified, the functions tries to open {bam_path}.bai.

pub fn from_streams<R: Seek + Read, T: Read>(
    &self,
    bam_stream: R,
    bai_stream: T
) -> Result<IndexedReader<R>>
[src]

Creates a new IndexedReader from two streams. BAM stream should support random access, while BAI stream does not need to. check_time and bai_path values are ignored.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]