UNPKG

taxonium-component

Version:

React component for exploring large phylogenetic trees in the browser

32 lines (31 loc) 876 B
import { B as n } from "./index-BnQfM3Nw.js"; import { a4 as o } from "./JBrowsePanel-uJIA-L6s.js"; class h extends n.BaseAdapter { async setupPre() { const t = this.pluginManager, r = await o.openLocation(this.getConf("chromSizesLocation"), t).readFile("utf8"); return Object.fromEntries(r.split(/\n|\r\n|\r/).map((e) => e.trim()).filter((e) => !!e).map((e) => { const [a, i] = e.split(" "); return [a, +i]; })); } async setup() { return this.setupP || (this.setupP = this.setupPre().catch((t) => { throw this.setupP = void 0, t; })), this.setupP; } async getRegions() { const t = await this.setup(); return Object.keys(t).map((s) => ({ refName: s, start: 0, end: t[s] })); } getHeader() { return {}; } } export { h as default }; //# sourceMappingURL=ChromSizesAdapter-DF_ZiYSJ.js.map