BamReader.reads

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).

Examples

import bio.bam.readrange;
...
auto bam = new BamReader("file.bam");
auto reads = bam.reads!withOffsets();
writeln(reads.front.start_virtual_offset);

Meta