@Override
public void run()
{
- if (af.getViewport().getSelectedHMM() == null)
+ if (af.getViewport().getSelectedHMM() == null)
{
JOptionPane.showMessageDialog(af,
MessageManager.getString("warn.no_selected_hmm"));
}
else
{
- hmm = af.getViewport().getSelectedHMM();
+ hmm = af.getViewport().getSelectedHMM();
}
barID = System.currentTimeMillis();
- af.setProgressBar(MessageManager.getString("status.running_hmmbuild"),
+ af.setProgressBar(MessageManager.getString("status.running_hmmalign"),
barID);
cmds.HMMERFOLDER = Cache.getProperty(Preferences.HMMER_PATH);
DataSourceType.FILE);
SequenceI[] result = file.getSeqsAsArray();
AlignmentOrder msaorder = new AlignmentOrder(result);
- // always recover the order - makes parseResult()'s life easier.
jalview.analysis.AlignmentSorter.recoverOrder(result);
jalview.analysis.SeqsetUtils.deuniquify(cmds.hash, result);
allOrders.add(msaorder);
allResults[index] = result;
-
- /*
- if (newFrame)
- {
- FileLoader loader = new FileLoader();
- AlignFrame aFrame = new AlignFrame(new Alignment(new SequenceI[1]),
- AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
- Desktop.addInternalFrame(aFrame, aFrame.getTitle(),
- AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
- aFrame.setTitle(
- af.getName() + "Aligned to " + hmm.getName() + "'s HMM");
- af.getViewport().setAlignment(null);
-
- aFrame.loadJalviewDataFile(inputTemp.getAbsolutePath(),
- DataSourceType.FILE, FileFormat.Stockholm, null);
-
-
-
- Map<Integer, SequenceI> copy = new HashMap<>(
- hmmSeqs);
- addSeqs(aFrame, copy);
- SequenceI seq = aFrame.getViewport().getAlignment()
- .getSequenceAt(0);
- seq.getHMM().mapToReferenceAnnotation(aFrame, seq);
- addSeqs(af, hmmSeqs);
- }
- else
- {
- af.getViewport().getAlignment().getSequences().clear();
- af.setIsRecurring(true);
- af.loadJalviewDataFile(inputTemp.getAbsolutePath(),
- DataSourceType.FILE, FileFormat.Stockholm, null);
- af.setIsRecurring(false);
- addSeqs(af, hmmSeqs);
- }
- */
hmmTemp.delete();
outTemp.delete();
inputTemp.delete();
alignment.getWidth() - sg.getEndRes(), '-');
SequenceI topSeq = sg.getSequencesInOrder(alignment)[0];
int topIndex = alignment.findIndex(topSeq);
- alignment.getSequences().add(topIndex, seq);
+ alignment.insertSequenceAt(topIndex, seq);
sg.setSeqrep(seq);
viewport.getSelectionGroup().addSequence(seq, false);
}
else
{
- for (int i = 0; i < alignment.getAbsoluteHeight(); i++)
- {
- if (!alignment.getSequenceAt(i).isHMMConsensusSequence())
+ for (int i = 0; i < alignment.getAbsoluteHeight(); i++)
{
- alignment.getSequences().add(i, seq);
- break;
- }
-
+ if (!alignment.getSequenceAt(i).isHMMConsensusSequence())
+ {
+ alignment.getSequences().add(i, seq);
+ break;
+ }
}
}
viewport.setAlignment(alignment);