From d1b3755f72a5c91dc6ed7e36252d24b0ac85c6b7 Mon Sep 17 00:00:00 2001 From: turner Date: Wed, 25 Oct 2023 09:38:35 -0400 Subject: [PATCH] track hubs build out --- js/app.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index ca5ded8..0bbb8bd 100644 --- a/js/app.js +++ b/js/app.js @@ -119,7 +119,7 @@ async function main(container, config) { hub = await igv.Hub.loadHub(paramHash.hubURL) trackConfigs = hub.getTrackConfigurations() } - + await initializationHelper(browser, container, trackConfigs ? Object.assign(config, { trackConfigs }) : config) } } @@ -220,6 +220,14 @@ async function initializationHelper(browser, container, options) { console.error(e) AlertSingleton.present(e) } + + if (config.url && config.url.endsWith('hub.txt')) { + const hub = await igv.Hub.loadHub(config.url) + const { id } = hub.getGenomeConfig() + const trackConfigs = hub.getTrackConfigurations() + await updateTrackMenusWithTrackConfigurations(id, undefined, trackConfigs, $('#igv-app-track-dropdown-menu')) + } + } createSessionWidgets($igvMain,