public static final int DEFAULT_HEIGHT = 500;
+ boolean autoAlignNewSequences;
+
+ boolean recurring;
+
/*
* The currently displayed panel (selected tabbed view if more than one)
*/
public void hmmAlign_actionPerformed(ActionEvent e)
throws IOException, InterruptedException
{
- HMMERCommands.hmmAlign(this);
+ SequenceI seq = getViewport().getAlignment()
+ .getHMMConsensusSequences(false).get(0);
+ HMMERCommands.hmmAlign(this, true, seq.getHMM());
alignPanel.repaint();
}
@Override
- public void hmmSearch_actionPerformed(ActionEvent e)
+ public void autoAlignSeqs_actionPerformed(boolean autoAlignSeqs)
{
+ autoAlignNewSequences = autoAlignSeqs;
+ alignPanel.repaint();
+ }
+ @Override
+ public void hmmSearch_actionPerformed(ActionEvent e)
+ {
alignPanel.repaint();
}
@Override
public void associatedData_actionPerformed(ActionEvent e)
+ throws IOException, InterruptedException
{
// Pick the tree file
JalviewFileChooser chooser = new JalviewFileChooser(
*
* @param e
* DOCUMENT ME!
+ * @throws InterruptedException
+ * @throws IOException
*/
@Override
protected void pasteNew_actionPerformed(ActionEvent e)
+ throws IOException, InterruptedException
{
paste(true);
}
*
* @param e
* DOCUMENT ME!
+ * @throws InterruptedException
+ * @throws IOException
*/
@Override
protected void pasteThis_actionPerformed(ActionEvent e)
+ throws IOException, InterruptedException
{
paste(false);
}
*
* @param newAlignment
* true to paste to a new alignment, otherwise add to this.
+ * @throws InterruptedException
+ * @throws IOException
*/
- void paste(boolean newAlignment)
+ void paste(boolean newAlignment) throws IOException, InterruptedException
{
boolean externalPaste = true;
try
System.out.println("Exception whilst pasting: " + ex);
// could be anything being pasted in here
}
-
}
@Override
*
* @param file
* either a filename or a URL string.
+ * @throws InterruptedException
+ * @throws IOException
*/
public void loadJalviewDataFile(String file, DataSourceType sourceType,
FileFormatI format, SequenceI assocSeq)
+ throws IOException, InterruptedException
{
try
{
// pipeline
hmmFile.parse();
HiddenMarkovModel hmm = hmmFile.getHMM();
-
- hmm.mapToReferenceAnnotation(this);
- SequenceI hmmSeq = hmm.initPlaceholder(this);
+ SequenceI hmmSeq = hmm.initHMMSequence(this, 0);
getViewport().initInformation(hmmSeq);
new Thread(new InformationThread(getViewport(),
getViewport().getAlignPanel())
}).start();
isAnnotation = true;
- alignPanel.repaint();
}
else if (FileFormat.Jnet.equals(format))
+ (format != null ? "(parsing as '" + format
+ "' file)" : ""), oom, Desktop.desktop);
}
+ if (autoAlignNewSequences && !recurring)
+ {
+ recurring = true;
+ HiddenMarkovModel hmm = getViewport().getAlignment()
+ .getHMMConsensusSequences(false).get(0).getHMM();
+ HMMERCommands.hmmAlign(this, false, hmm);
+ }
+ recurring = false;
}
/**