Skip to content

Commit

Permalink
Bug fix - "Select hosted genomes" did not download.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Feb 10, 2025
1 parent eb810fb commit 066f3af
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/main/java/org/broad/igv/ucsc/hub/Hub.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ public GenomeConfig getGenomeConfig() {
if (genomeStanza.hasProperty("chromAliasBb")) {
config.setChromAliasBbURL(genomeStanza.getProperty("chromAliasBb"));
}
if (genomeStanza.hasProperty("twoBitBptURL")) {
config.setTwoBitBptURL(genomeStanza.getProperty("twoBitBptURL"));
}
if (genomeStanza.hasProperty("twoBitBptUrl")) {
config.setTwoBitBptURL(genomeStanza.getProperty("twoBitBptUrl"));
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/broad/igv/ui/IGVMenuBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ JMenu createFileMenu(Genome genome) {
// Track hubs
if (genome.getTrackHubs().size() > 0) {
menuItems.add(new JSeparator());
menuItems.add(new JLabel("Track Hubs"));
for (Hub trackHub : genome.getTrackHubs()) {
menuAction = new SelectHubTracksAction(trackHub.getShortLabel(), igv, trackHub);
menuAction.setToolTipText(trackHub.getLongLabel());
Expand Down Expand Up @@ -441,8 +440,8 @@ private JMenu createGenomesMenu() {

JMenu menu = new JMenu("Genomes");

loadGenomeFromServerMenuItem = new JMenuItem("Select Hosted Genome...");
loadGenomeFromServerMenuItem.addActionListener(e -> HostedGenomeSelectionDialog.selectHostedGenome());
loadGenomeFromServerMenuItem = new JMenuItem("Download Hosted Genome...");
loadGenomeFromServerMenuItem.addActionListener(e -> HostedGenomeSelectionDialog.downloadHostedGenome());
loadGenomeFromServerMenuItem.setToolTipText(LOAD_GENOME_SERVER_TOOLTIP);
menu.add(loadGenomeFromServerMenuItem);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void actionPerformed(ActionEvent actionEvent) {
if (genomeListItem != null && genomeListItem.getPath() != null) {

if (genomeListItem == GenomeListItem.DOWNLOAD_ITEM) {
HostedGenomeSelectionDialog.selectHostedGenome();
HostedGenomeSelectionDialog.downloadHostedGenome();
} else {

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class HostedGenomeSelectionDialog extends org.broad.igv.ui.IGVDialog {
* Open a selection list to load a genome from the server. This method is static because its used by multiple
* UI elements (menu bar and genome selection pulldown).
*/
public static void selectHostedGenome() {
public static void downloadHostedGenome() {

Runnable showDialog = () -> {

Expand All @@ -109,11 +109,7 @@ public static void selectHostedGenome() {
boolean downloadSequence = dialog.isDownloadSequence();
boolean downloadAnnotations = dialog.isDownloadAnnotations();

File downloadPath = null;
if (downloadSequence || downloadAnnotations || selectedItem.getPath().endsWith(".genome")) {
downloadPath = GenomeManager.getInstance().downloadGenome(selectedItem, downloadSequence, downloadAnnotations);
}

File downloadPath = GenomeManager.getInstance().downloadGenome(selectedItem, downloadSequence, downloadAnnotations);

try {
if (downloadPath != null) {
Expand Down

0 comments on commit 066f3af

Please sign in to comment.