From 8c865b34fb48c55582c2c77609cd04f96819ceef Mon Sep 17 00:00:00 2001 From: TZVanaalten Date: Sun, 13 Aug 2017 12:00:40 +0100 Subject: [PATCH] JAL-2629 hmmalign can now be run from the sequence pop-up menu --- src/jalview/gui/PopupMenu.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index e75798c..fd652b2 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -40,6 +40,7 @@ import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.gui.ColourMenuHelper.ColourChangeListener; +import jalview.hmmer.HMMAlignThread; import jalview.hmmer.HMMBuildThread; import jalview.io.FileFormatI; import jalview.io.FileFormats; @@ -371,6 +372,19 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener } }); add(selectHMM); + + JMenuItem hmmAlign = new JCheckBoxMenuItem(); + hmmAlign.setText(MessageManager.getString("label.hmmalign")); + hmmAlign.addActionListener(new ActionListener() + { + + @Override + public void actionPerformed(ActionEvent e) + { + hmmAlign_actionPerformed(e); + } + }); + add(hmmAlign); } if (ap.av.getSelectionGroup() != null @@ -1284,6 +1298,13 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener ap.av.setSelectedHMM(hmm); } + protected void hmmAlign_actionPerformed(ActionEvent e) + { + ap.av.setSelectedHMM(this.sequence.getHMM()); + new Thread(new HMMAlignThread(ap.alignFrame, true)).start(); + ap.repaint(); + } + /** * Constructs the entries for the colour menu */ -- 1.7.10.2