From fdd64607f91ca7988360821b05f39a62a4c79085 Mon Sep 17 00:00:00 2001 From: turner Date: Fri, 26 Jan 2024 10:49:58 -0500 Subject: [PATCH] Session. Handle local BAM data/index files --- js/sessionUtils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/sessionUtils.js b/js/sessionUtils.js index 127dc12..af792d1 100644 --- a/js/sessionUtils.js +++ b/js/sessionUtils.js @@ -30,7 +30,12 @@ async function initializeSessionUtilities(browser, $igvMain, initializeDropbox, for (const config of localTrackFileConfigs) { sessionLocalTrackFilesDictionary[ config.filename ] = config } - presentLocalTrackFileModal(document.querySelector('#igv-local-track-file-card'), localTrackFileConfigs.map(({filename}) => filename)) + const names = localTrackFileConfigs.map(({file}) => file) + const indexFilenames = localTrackFileConfigs.filter(config => undefined !== config.indexFile).map(({ indexFile}) => indexFile) + if (indexFilenames.length > 0) { + names.push(...indexFilenames) + } + presentLocalTrackFileModal(document.querySelector('#igv-local-track-file-card'), names) } } catch (e) {