/*
* The selected HMM for this align frame
*/
- HiddenMarkovModel selectedHMM = null;
+ SequenceI selectedHMMSequence;
List<AlignmentPanel> alignPanels = new ArrayList<>();
}
@Override
- public void autoAlignSeqs_actionPerformed(boolean autoAlignSeqs)
- {
- autoAlignNewSequences = autoAlignSeqs;
- alignPanel.repaint();
- }
-
- @Override
public void hmmSearch_actionPerformed(ActionEvent e)
{
alignPanel.repaint();
*/
public HiddenMarkovModel getSelectedHMM()
{
- return selectedHMM;
+ if (selectedHMMSequence == null)
+ {
+ return null;
+ }
+ return selectedHMMSequence.getHMM();
+ }
+
+ /**
+ * Returns the selected hidden Markov model.
+ *
+ * @return
+ */
+ public SequenceI getSelectedHMMSequence()
+ {
+ return selectedHMMSequence;
}
/**
*
* @param selectedHMM
*/
- public void setSelectedHMM(HiddenMarkovModel selectedHMM)
+ public void setSelectedHMMSequence(SequenceI selectedHMM)
{
- this.selectedHMM = selectedHMM;
+ this.selectedHMMSequence = selectedHMM;
hmmAlign.setText(MessageManager.getString("label.hmmalign") + " to "
- + selectedHMM.getName() + "_HMM");
+ + selectedHMM.getHMM().getName() + "_HMM");
hmmSearch.setText(MessageManager.getString("label.hmmsearch") + " with "
- + selectedHMM.getName() + "_HMM");
+ + selectedHMM.getHMM().getName() + "_HMM");
}
@Override
import jalview.datamodel.Annotation;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.HiddenColumns;
-import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceFeature;
protected void selectHMM_actionPerformed(ActionEvent e)
{
- HiddenMarkovModel hmm = ap.av.getSequenceSelection()[0].getHMM();
- ap.alignFrame.setSelectedHMM(hmm);
+ SequenceI hmm = ap.av.getSequenceSelection()[0];
+ ap.alignFrame.setSelectedHMMSequence(hmm);
}
protected void hmmAlign_actionPerformed(ActionEvent e)
{
- ap.alignFrame.setSelectedHMM(this.sequence.getHMM());
+ ap.alignFrame.setSelectedHMMSequence(this.sequence);
new Thread(new HMMAlignThread(ap.alignFrame, true)).start();
ap.repaint();
}