Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const init = (uid, bamUrl, chromSizesUrl) => {
if (!bamFiles[bamUrl]) {
bamFiles[bamUrl] = new BamFile({
bamUrl,
});
// we have to fetch the header before we can fetch data
bamHeaders[bamUrl] = bamFiles[bamUrl].getHeader();
}
chromSizes[chromSizesUrl] = chromSizes[chromSizesUrl]
|| new Promise((resolve, reject) => {
ChromosomeInfo(chromSizesUrl, resolve);
});
dataConfs[uid] = {
bamUrl, chromSizesUrl
};
};