taxonium-component
Version:
React component for exploring large phylogenetic trees in the browser
22 lines (21 loc) • 895 B
JavaScript
import { B as f } from "./index-BnQfM3Nw.js";
import { a4 as p } from "./JBrowsePanel-uJIA-L6s.js";
class N extends f.BaseAdapter {
async getRefNameAliases() {
const t = this.getConf("location");
if (t.uri === "" || t.uri === "/path/to/my/aliases.txt")
return [];
const o = await p.openLocation(t, this.pluginManager).readFile("utf8"), n = this.getConf("refNameColumn"), a = this.getConf("refNameColumnHeaderName"), s = o.trim().split(/\n|\r\n|\r/).filter((e) => !!e), r = s.filter((e) => e.startsWith("#")), l = a && r.length ? r.at(-1).slice(1).split(" ").map((e) => e.trim()).indexOf(a) : n;
return s.filter((e) => !e.startsWith("#")).map((e) => {
const i = e.split(" ");
return {
refName: i[l],
aliases: i.filter((m) => !!m.trim())
};
});
}
}
export {
N as default
};
//# sourceMappingURL=RefNameAliasAdapter-DRyfMSRt.js.map