taxonium-component
Version:
React component for exploring large phylogenetic trees in the browser
35 lines (34 loc) • 1.31 kB
JavaScript
import { O as F, Q as S, u as o, R as y, t as k, j as s } from "./JBrowsePanel-uJIA-L6s.js";
import { a as x } from "./aborting-DAWWmOkt.js";
function A(t) {
F(t, S(async () => {
try {
const e = o.getContainingView(t);
if (!e.initialized || !t.statsReadyAndRegionNotTooLarge)
return;
const a = y.createStopToken();
t.setSimplifiedFeaturesLoading(a);
const { rpcManager: r } = o.getSession(t), { lengthCutoffFilter: c, sources: i, minorAlleleFrequencyFilter: p, adapterConfig: u } = t;
if (i) {
const n = k.getRpcSessionId(t), { sampleInfo: d, hasPhased: g, features: m } = await r.call(n, "MultiVariantGetSimplifiedFeatures", {
regions: e.dynamicBlocks.contentBlocks,
sources: i,
minorAlleleFrequencyFilter: p,
lengthCutoffFilter: c,
sessionId: n,
adapterConfig: u,
stopToken: a
});
s(t) && (t.setHasPhased(g), t.setSampleInfo(d), t.setFeatures(m.map((l) => new o.SimpleFeature(l))));
}
} catch (e) {
console.error(e), !x.isAbortException(e) && s(t) && o.getSession(t).notifyError(`${e}`, e);
}
}, {
delay: 1e3
}));
}
export {
A as getMultiVariantFeaturesAutorun
};
//# sourceMappingURL=getMultiVariantFeaturesAutorun-Dtz0xtxh.js.map