tribble-index
Read htsjdk Tribble indexes (e.g. *.vcf.idx files) using pure JavaScript. Supports only Tribble version 3 linear indexes right now.
Install
$ npm install --save tribble-index
Usage
// or without ES6var fs = var read = defaultread fs
API
Table of Contents
getBlocks
Get an array of { offset, length } objects describing regions of the indexed file containing data for the given range.
Parameters
refName
string name of the reference sequencestart
integer start coordinate of the range of interestend
integer end coordinate of the range of interest
hasRefSeq
Return true if the given reference sequence is present in the index, false otherwise
Parameters
refName
string
Returns boolean
read
Parse the index from the given Buffer object. The buffer must contain the entire index.
Parameters
input
Buffer
Returns (LinearIndex | IntervalTreeIndex) an index object supporting the getBlocks
method
License
MIT © Robert Buels