Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function initializeIgv(containerId, bamAndBaiFiles, gtfFiles, uniqueGenes) {
// Bail if already displayed
delete igv.browser
const igvContainer = document.getElementById(containerId)
igvContainer.innerHTML = ''
const genomeId = bamAndBaiFiles[0].genomeAssembly
let reference
let searchOptions
let fallbackLocus
if (genomeId === 'Macaca_fascicularis_5.0') {
fallbackLocus = 'chr1:1-2'
// To consider:
// - Update genomes pipeline to make such files automatically reproducible
const genomeAnnotationObj = bamAndBaiFiles[0].genomeAnnotation
const genomePath =