@gmod/indexedfasta
Version:
read indexed fasta and bgzipped fasta formats
23 lines • 823 B
JavaScript
import { BgzfFilehandle } from '@gmod/bgzf-filehandle';
import { LocalFile } from 'generic-filehandle2';
import IndexedFasta from "./indexedFasta.js";
export default class BgzipIndexedFasta extends IndexedFasta {
constructor({ fasta, path, fai, faiPath, gzi, gziPath, }) {
super({ fasta, path, fai, faiPath });
if (fasta && gzi) {
// @ts-expect-error
this.fasta = new BgzfFilehandle({
filehandle: fasta,
gziFilehandle: gzi,
});
}
else if (path && gziPath) {
// @ts-expect-error
this.fasta = new BgzfFilehandle({
filehandle: new LocalFile(path),
gziFilehandle: new LocalFile(gziPath),
});
}
}
}
//# sourceMappingURL=bgzipIndexedFasta.js.map