label.show_experimental = Enable experimental features
label.show_experimental_tip = Enable any new and currently 'experimental' features (see Latest Release Notes for details)
label.warning_hidden = Warning: {0} {1} is currently hidden
-label.hmmalign = Align Sequences to HMM
-label.hmmbuild = Build HMM from Alignment
+label.hmmalign = hmmalign
+label.hmmbuild = hmmbuild
label.hmmbuild_group = Build HMM from Selected Group
label.group_hmmbuild = Build HMM from Group
-label.hmmsearch = Search for Related Sequences
+label.hmmsearch = hmmsearch
label.change_hmmer_location = HMMER Installation Location
warn.null_hmm = Please ensure the alignment contains a hidden Markov model.
label.ignore_below_background_frequency = Ignore Below Background Frequency
import jalview.datamodel.AlignmentView;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
+import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.HiddenSequences;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SeqCigar;
public AlignViewControllerI avc;
+ HiddenMarkovModel selectedHMM = null;
+
List<AlignmentPanel> alignPanels = new ArrayList<>();
/**
{
hmmerMenu.setEnabled(status);
}
+
+ public HiddenMarkovModel getSelectedHMM()
+ {
+ return selectedHMM;
+ }
+
+ /**
+ * Sets the selected hidden Markov model
+ *
+ * @param selectedHMM
+ */
+ public void setSelectedHMM(HiddenMarkovModel selectedHMM)
+ {
+ this.selectedHMM = selectedHMM;
+ hmmAlign.setText(MessageManager.getString("label.hmmalign") + " to "
+ + selectedHMM.getName() + "_HMM");
+ hmmSearch.setText(MessageManager.getString("label.hmmsearch") + " with "
+ + selectedHMM.getName() + "_HMM");
+ }
+
+ @Override
+ public void hmmerMenu_actionPerformed(ActionEvent e)
+ {
+ SequenceGroup grp = getViewport().getSelectionGroup();
+ if (grp != null)
+ {
+ hmmBuild.setText(MessageManager.getString("label.hmmbuild") + " from "
+ + grp.getName());
+ }
+ else
+ {
+ hmmBuild.setText(MessageManager.getString("label.hmmbuild")
+ + " from Alignment");
+ }
+ }
+
}
class PrintThread extends Thread
}
}
}
-
-
}
protected void selectHMM_actionPerformed(ActionEvent e)
{
HiddenMarkovModel hmm = ap.av.getSequenceSelection()[0].getHMM();
- ap.av.setSelectedHMM(hmm);
+ ap.alignFrame.setSelectedHMM(hmm);
}
protected void hmmAlign_actionPerformed(ActionEvent e)
{
- ap.av.setSelectedHMM(this.sequence.getHMM());
+ ap.alignFrame.setSelectedHMM(this.sequence.getHMM());
new Thread(new HMMAlignThread(ap.alignFrame, true)).start();
ap.repaint();
}
@Override
public void run()
{
- if (af.getViewport().getSelectedHMM() == null)
+ if (af.getSelectedHMM() == null)
{
JOptionPane.showMessageDialog(af,
MessageManager.getString("warn.no_selected_hmm"));
}
else
{
- hmm = af.getViewport().getSelectedHMM();
+ hmm = af.getSelectedHMM();
}
barID = System.currentTimeMillis();
af.setProgressBar(MessageManager.getString("status.running_hmmalign"),
}
else
{
- for (int i = 0; i < alignment.getAbsoluteHeight(); i++)
+ for (int i = 0; i < alignment.getAbsoluteHeight(); i++)
{
if (!alignment.getSequenceAt(i).isHMMConsensusSequence())
{
viewport.updateInformation(viewport.getAlignPanel());
viewport.getAlignPanel().adjustAnnotationHeight();
viewport.updateSequenceIdColours();
- viewport.getAlignPanel().paintAlignment(true);
+ if (viewport.getAlignPanel().alignFrame
+ .getSelectedHMM() == null)
+ {
+ viewport.getAlignPanel().alignFrame
+ .setSelectedHMM(seq.getHMM());
+ }
+ viewport.getAlignPanel().repaint();
viewport.alignmentChanged(viewport.getAlignPanel());
+
+
}
}
else
{
hmmerMenu.setEnabled(true);
}
+ hmmerMenu.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hmmerMenu_actionPerformed(e);
+ }
+ });
JMenuItem selectAllSequenceMenuItem = new JMenuItem(
MessageManager.getString("action.select_all"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_A, Toolkit
// selectMenu.add(listenToViewSelections);
}
+ public void hmmerMenu_actionPerformed(ActionEvent e)
+ {
+
+ }
+
/**
* Constructs the entries on the Colour menu (but does not add them to the
* menu).
import jalview.datamodel.CigarArray;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
-import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.HiddenSequences;
import jalview.datamodel.ProfileI;
import jalview.datamodel.Profiles;
protected Deque<CommandI> redoList = new ArrayDeque<>();
- HiddenMarkovModel selectedHMM;
/**
* alignment displayed in the viewport. Please use get/setter
*
* @return
*/
- public HiddenMarkovModel getSelectedHMM()
- {
- return selectedHMM;
- }
- /**
- * Sets the selected hidden Markov model
- *
- * @param selectedHMM
- */
- public void setSelectedHMM(HiddenMarkovModel selectedHMM)
- {
- this.selectedHMM = selectedHMM;
- }
}