UNPKG

taxonium-component

Version:

React component for exploring large phylogenetic trees in the browser

34 lines (33 loc) 944 B
import { ae as M, af as m, ag as x, ah as h, ai as y } from "./JBrowsePanel-uJIA-L6s.js"; function q(o, g) { const r = o.get("strand"), l = o.get("seq"), p = M(o, "MM", "Mm") || "", f = g || m(o.get("CIGAR")); if (l) { const P = x(p, l, r), a = h(o), t = []; let b = 0; for (const { type: c, positions: e } of P) { for (const { ref: n, idx: d } of y(f, e)) { const s = (a == null ? void 0 : a[b + (r === -1 ? e.length - 1 - d : d)]) || 0; if (!t[n]) t[n] = { type: c, prob: s, allProbs: [s] }; else { const i = t[n]; t[n] = { allProbs: [...i.allProbs, s], prob: Math.max(i.prob, s), type: i.prob > s ? i.type : c }; } } b += e.length; } return t; } } export { q as g }; //# sourceMappingURL=getMaximumModificationAtEachPosition-WpooMLNB.js.map