diff --git a/src/main/java/org/broad/igv/ui/IGVMenuBar.java b/src/main/java/org/broad/igv/ui/IGVMenuBar.java index a0427907d..fda2e3510 100644 --- a/src/main/java/org/broad/igv/ui/IGVMenuBar.java +++ b/src/main/java/org/broad/igv/ui/IGVMenuBar.java @@ -303,7 +303,37 @@ JMenu createFileMenu() { menuItems.add(MenuAndToolbarUtils.createMenuItem(menuAction)); } - addEncodeItems(menuItems, genomeId); + // ENCODE items. These will be hidden / shown depending on genome chosen + JSeparator separator = new JSeparator(); + menuItems.add(separator); + + JLabel encodeLabel = new JLabel(" ENCODE"); + encodeLabel.setFont(encodeLabel.getFont().deriveFont(Font.BOLD)); + menuItems.add(encodeLabel); + + // Post 2012 ENCODE menu + JMenuItem chipItem = new JMenuItem(); + chipItem.setAction(new BrowseEncodeAction("Signals ChIP ...", 0, BrowseEncodeAction.Type.SIGNALS_CHIP, igv)); + encodeMenuItems.add(chipItem); + + JMenuItem otherSignalsItem = new JMenuItem(); + otherSignalsItem.setAction(new BrowseEncodeAction("Signals Other ...", 0, BrowseEncodeAction.Type.SIGNALS_OTHER, igv)); + encodeMenuItems.add(otherSignalsItem); + + JMenuItem otherItem = new JMenuItem(); + otherItem.setAction(new BrowseEncodeAction("Other ...", 0, BrowseEncodeAction.Type.OTHER, igv)); + encodeMenuItems.add(otherItem); + + for(JComponent item : encodeMenuItems) { + menuItems.add(item); + item.setVisible(EncodeTrackChooser.genomeSupported(genomeId)); + } + + // UCSC hosted ENCODE menu. + encodeUCSCMenuItem = MenuAndToolbarUtils.createMenuItem( + new BrowseEncodeAction("UCSC Repository (2012) ...", KeyEvent.VK_E, BrowseEncodeAction.Type.UCSC, igv)); + encodeUCSCMenuItem.setVisible(EncodeTrackChooser.genomeSupportedUCSC(genomeId)); + menuItems.add(encodeUCSCMenuItem); menuItems.add(new JSeparator()); menuAction = new ReloadTracksMenuAction("Reload Tracks", -1, igv);