Hi, can someone explain to me about chunk in bam index file (*.bai) especially about the value from chunk-beg and chunk-end? What is that value? I still cannot figure it out about that. For example:
"A chunk is an interval in BAM. Given a chunk with bin $b, most reads in this interval have the same bin $b. None of reads outside the interval have bin $b. By going through the chunks in the bin $b, you will get all the reads with bin $b."
chunk_beg..chunk_end is the range of file offsets within the BAM file telling you where in the file the records are. There can be several chunks because the read records within a bin are not necessarily all contiguous in the BAM file — there can be reads from other bins interspersed with them.
But they are virtual file offsets, as described in §4.1.1 (“Random access”) of the SAM specification. If you haven't already, you should read the discussion of indexing (§5 and §5.2) BGZF-based files (§4.1) in the SAM specification.
Is that represent byte? Thanks for your explanation