UNPKG

bakana

Version:

Backend for kana's single-cell analyses. This supports single or multiple samples, execution in Node.js or the browser, in-memory caching of results for iterative analyses, and serialization to/from file for redistribution.

15 lines (12 loc) 571 B
/** * Webpack (or something in kana's build system) specifically recognizes the * hard-coded path in this 'new Worker(new URL(...))' pattern. This is why we * have hard-coded creators for the workers rather than allowing callers to * pass in the URL as a variable, as that doesn't pack the worker's JS. */ export function createTsneWorker() { return new Worker(new URL("../tsne.worker.js", import.meta.url), { type: "module" }); } export function createUmapWorker() { return new Worker(new URL("../umap.worker.js", import.meta.url), { type: "module" }); }