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.
pub fn from_streams<R: Read + Seek, T: Read>(
&self,
bam_stream: R,
bai_stream: T
) -> Result<IndexedReader<R>>
pub fn from_streams<R: Read + Seek, T: Read>(
&self,
bam_stream: R,
bai_stream: T
) -> Result<IndexedReader<R>>
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.
