Skip to content

Commit

Permalink
Load Track Hub via Genome url
Browse files Browse the repository at this point in the history
  • Loading branch information
turner committed Oct 25, 2023
1 parent 8e05bc0 commit 84bcb0c
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,26 @@ async function initializationHelper(browser, container, options) {

const $igvMain = $('#igv-main')

const genomeLoader = async configuration => {

if (configuration.url && configuration.url.endsWith('hub.txt')) {
const hub = await igv.Hub.loadHub(configuration.url)
await Globals.browser.loadSession({ url: configuration.url })
await updateTrackMenusWithTrackHub(hub)
} else if (configuration.id !== browser.genome.id) {
await loadGenome(configuration)
}

}

const genomeFileLoadConfig =
{
localFileInput: document.getElementById('igv-app-dropdown-local-genome-file-input'),
initializeDropbox,
dropboxButton: options.dropboxAPIKey ? document.getElementById('igv-app-dropdown-dropbox-genome-file-button') : undefined,
googleEnabled: googleEnabled,
googleDriveButton: document.getElementById('igv-app-dropdown-google-drive-genome-file-button'),
loadHandler: async configuration => {

if (configuration.id !== browser.genome.id) {
await loadGenome(configuration)
}

}
loadHandler: genomeLoader
}

createGenomeWidgets({
Expand Down

0 comments on commit 84bcb0c

Please sign in to comment.