Create a new BAI reader for the specified index file
Path to BAI index file
Reader configuration options
Read and parse the complete BAI index from file
Promise resolving to parsed BAI index
Query genomic region and return relevant chunks for BAM file access
Reference sequence ID (0-based)
Start coordinate (0-based, inclusive)
End coordinate (0-based, exclusive)
Promise resolving to query result with chunks
Get linear index for a reference sequence
Reference sequence ID
Promise resolving to linear index data
Validate index integrity and structure
Whether to perform thorough validation (slower)
Promise resolving to validation result
Get statistics about the loaded index
Promise resolving to index statistics
Close the reader and clean up resources
BAI reader class for loading and querying BAM index files
Optimized for both small indexes (loaded entirely in memory) and large indexes (streaming access with selective caching).
Example: Basic usage
Example: With options