UNPKG

@gmod/bbi

Version:

Parser for BigWig/BigBed files

15 lines 537 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseBigWig = parseBigWig; async function parseBigWig(bigwig, opts) { const header = await bigwig.getHeader(opts); const allFeatures = []; for (const ref of Object.values(header.refsByNumber)) { const features = await bigwig.getFeatures(ref.name, 0, ref.length, opts); for (const feature of features) { allFeatures.push(feature); } } return allFeatures; } //# sourceMappingURL=parse-bigwig.js.map