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

pub struct IndexedReaderBuilder { /* fields omitted */ }
Expand description

IndexedReader builder. Allows to specify paths to BAM and BAI files, as well as the number of threads and an option to ignore or warn BAI modification time check.

Implementations

Creates a new IndexedReader builder.

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

By default, IndexedReader::from_path and IndexedReaderBuilder::from_path returns an io::Error if the last modification of the BAI index was earlier than the last modification of the BAM file.

Enum ModificationTime contains options to skip this check or raise a warning instead of returning an error.

Sets the number of additional threads.

Additional threads are used to decompress bgzip blocks, while the main thread reads the blocks from a file/stream. If additional_threads is 0 (default), the main thread will decompress blocks itself.

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

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

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.