diff --git a/src/main/java/org/broad/igv/feature/genome/GenomeManager.java b/src/main/java/org/broad/igv/feature/genome/GenomeManager.java index 41f227fc7..8c6177ae5 100644 --- a/src/main/java/org/broad/igv/feature/genome/GenomeManager.java +++ b/src/main/java/org/broad/igv/feature/genome/GenomeManager.java @@ -234,15 +234,19 @@ public void setCurrentGenome(String genomePath, Genome newGenome) { if (IGV.hasInstance()) { IGV.getInstance().goToLocus(newGenome.getHomeChromosome()); // newGenome.getDefaultPos()); FrameManager.getDefaultFrame().setChromosomeName(newGenome.getHomeChromosome(), true); - loadGenomeAnnotations(newGenome); IGV.getInstance().resetFrames(); IGV.getInstance().getSession().clearHistory(); - PreferencesManager.getPreferences().setLastGenome(newGenome.getId()); + if(newGenome != Genome.nullGenome()) { + // This should only occur on startup failure + PreferencesManager.getPreferences().setLastGenome(newGenome.getId()); + } + if (PreferencesManager.getPreferences().getAsBoolean(Constants.CIRC_VIEW_ENABLED) && CircularViewUtilities.ping()) { CircularViewUtilities.changeGenome(newGenome); } + IGVEventBus.getInstance().post(new GenomeChangeEvent(newGenome)); } } diff --git a/src/main/java/org/broad/igv/feature/genome/load/JsonGenomeLoader.java b/src/main/java/org/broad/igv/feature/genome/load/JsonGenomeLoader.java index 3ce550622..c4c87db37 100644 --- a/src/main/java/org/broad/igv/feature/genome/load/JsonGenomeLoader.java +++ b/src/main/java/org/broad/igv/feature/genome/load/JsonGenomeLoader.java @@ -38,7 +38,7 @@ public JsonGenomeLoader(String genomePath) { public Genome loadGenome() throws IOException { - try (InputStream is = ParsingUtils.openInputStream(genomePath + "..")){ + try (InputStream is = ParsingUtils.openInputStream(genomePath)){ String jsonString = ParsingUtils.readContentsFromStream(is);