Skip to content

Commit

Permalink
fix some edge cases on startup with initial session
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Oct 28, 2023
1 parent 7ad1c56 commit d3b8a2b
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions js/igv-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function removeAllBrowsers() {
}

function getAllBrowsers() {
return allBrowsers;
return allBrowsers
}

/**
Expand Down Expand Up @@ -239,18 +239,26 @@ function extractQuery(config) {
} else if ('name' === key) {
// IGV desktop style index parameter
names = value.split(',')
} else if ('genome' === key && ((value.startsWith("https://") || value.startsWith("http://")) && !value.endsWith(".json"))) {
// IGV desktop compatibility -- assuming url to fasta
config['reference'] = {
fastaURL: value,
indexURL: value + ".fai"
} else if ('genome' === key) {
if ((value.startsWith("https://") || value.startsWith("http://")) && !value.endsWith(".json")) {
// IGV desktop compatibility -- assuming url to fasta
config['reference'] = {
fastaURL: value,
indexURL: value + ".fai"
}
} else {
config[key] = value
config['reference'] = undefined
}
} else {
if ('reference' === key) {
config['genome'] = undefined // Can specify either reference or genome, not both
}
config[key] = value
}
i = j + 1
} else {
i++;
i++
}
}
}
Expand Down

0 comments on commit d3b8a2b

Please sign in to comment.