RandomAccessManager

Class which random access tasks are delegated to.

Constructors

this
this(string filename)
this(BamReader reader)

Constructs new manager for BAM file

this
this(string filename, BaiFile bai)
this(BamReader reader, BaiFile bai)

Constructs new manager with given index file. This allows to do random-access interval queries.

Members

Functions

createStreamStartingFrom
BgzfInputStream createStreamStartingFrom(VirtualOffset offset)

Get new BgzfInputStream starting from specified virtual offset.

eofVirtualOffset
VirtualOffset eofVirtualOffset()

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.

found_index_file
bool found_index_file()
Undocumented in source. Be warned that the author may not have intended to support it.
getBai
const(BaiFile) getBai()

BAI file

getBgzfBlockAt
BgzfBlock getBgzfBlockAt(ulong offset)

Get BGZF block at a given offset.

getChunks
Chunk[] getChunks(BamRegion region)

Get BAI chunks containing all alignment records overlapping the region

getReadAt
BamRead getReadAt(VirtualOffset offset)

Get single read at a given virtual offset. Every time new stream is used.

getReads
auto getReads(BamRegion region)

Fetch alignments with given reference sequence id, overlapping [beg..end)

getReads
auto getReads(BamRegion[] regions)
Undocumented in source. Be warned that the author may not have intended to support it.
getReadsBetween
auto getReadsBetween(VirtualOffset from, VirtualOffset to)

Get reads between two virtual offsets. First virtual offset must point to a start of an alignment record.

hasEofBlock
bool hasEofBlock()

Returns true if the file ends with EOF block, and false otherwise.

setBufferSize
void setBufferSize(size_t buffer_size)
Undocumented in source. Be warned that the author may not have intended to support it.
setTaskPool
void setTaskPool(TaskPool task_pool)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

filterBamReads
auto filterBamReads(R r, BamRegion[] regions)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

BamReadFilter
struct BamReadFilter(R)
Undocumented in source.

Meta