@gmod/indexedfasta
Version:
read indexed fasta and bgzipped fasta formats
29 lines • 1.2 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const bgzf_filehandle_1 = require("@gmod/bgzf-filehandle");
const generic_filehandle2_1 = require("generic-filehandle2");
const indexedFasta_ts_1 = __importDefault(require("./indexedFasta.js"));
class BgzipIndexedFasta extends indexedFasta_ts_1.default {
constructor({ fasta, path, fai, faiPath, gzi, gziPath, }) {
super({ fasta, path, fai, faiPath });
if (fasta && gzi) {
// @ts-expect-error
this.fasta = new bgzf_filehandle_1.BgzfFilehandle({
filehandle: fasta,
gziFilehandle: gzi,
});
}
else if (path && gziPath) {
// @ts-expect-error
this.fasta = new bgzf_filehandle_1.BgzfFilehandle({
filehandle: new generic_filehandle2_1.LocalFile(path),
gziFilehandle: new generic_filehandle2_1.LocalFile(gziPath),
});
}
}
}
exports.default = BgzipIndexedFasta;
//# sourceMappingURL=bgzipIndexedFasta.js.map