Creates reader associated with file or stream.
(If stream constructor is used, no random access is possible.)
Optionally, task pool can be specified.
It will be used to unpack BGZF blocks in parallel.
Part of IBamSamReader interface
Creates BAI file. If overwrite is false, it won't touch existing index if it is already found.
If file ends with EOF block, returns virtual offset of the start of EOF block. Otherwise, returns virtual offset of the physical end of file.
Filename, if the object was created via file name constructor, null otherwise.
Get BGZF block at a given file offset.
Get BAI chunks containing all reads that overlap specified region. For ref_id = -1, use unmappedReads method.
Check if reference named ref_name is presented in BAM header.
True if BAI file was found for this BAM file.
This is necessary for any random-access operations.
Looks for files in the same directory which filename
is either the file name of BAM file with '.bai' appended,
or with the last extension replaced with '.bai'
(that is, for file.bam paths file.bai and
file.bam.bai will be checked)
Returns reference sequence named ref_name.
Range of all alignment records in the file.
Element type of the returned range depends on the policy.
Default one is $(DPREF2 bam, readrange, withoutOffsets),
in this case range element type is $(DPREF2 bam, read, BamRead).
The other option is $(DPREF2 bam, readrange, withOffsets),
which allows to track read virtual offsets in the file.
In this case range element type is $(DPREF2 bam, readrange, BamReadBlock).
Returns reference sequence with id ref_id.
Set buffer size for I/O operations. Values less than 4096 are disallowed.
This can help in multithreaded applications when several files are read
simultaneously (e.g. merging).
Unmapped reads, i.e. reads at the end of file whose reference id is -1. The file must be coordinate-sorted and indexed.
SAM header
Information about reference sequences
All reads in the file
Filename
BAM file reader, featuring parallel decompression of BGZF blocks.