HMMERCommands cmds = new HMMERCommands();
AlignFrame af;
AlignmentI alignment;
-
SequenceGroup group;
+ boolean forGroup = false;
boolean canRun = true;
File hmmTemp = null;
if (af.getViewport().getSelectionGroup() != null)
{
group = af.getViewport().getSelectionGroup();
+ forGroup = true;
}
alignment = af.getViewport().getAlignment();
List<SequenceI> seqs = alignment
.getHMMConsensusSequences(true);
cmds.setHmmSeqs(seqs);
- if (group != null)
+ if (forGroup)
{
array = group.getSelectionAsNewSequences(alignment);
}
}
array = alignment.getSequencesArray();
}
+
SequenceI[] newArr = new SequenceI[array.length];
int index = 0;
for (SequenceI seq : array)
newArr[index] = new Sequence(seq);
index++;
}
+
cmds.uniquifySequences(newArr);
cmds.exportData(newArr, stoTemp, null, null);
jalview.analysis.SeqsetUtils.deuniquify(cmds.hash, array);
{
return false;
}
- String command = cmds.HMMERFOLDER + cmds.HMMBUILD + cmds.NAME
- + af.getName() + cmds.SPACE;
+ String command = cmds.HMMERFOLDER + cmds.HMMBUILD + cmds.NAME;
+ if (forGroup)
+ {
+ command += group.getName();
+ }
+ else
+ {
+ String name = af.getName();
+ if (name == null)
+ {
+ name = "Alignment";
+ }
+ command += name;
+ }
+ command += cmds.SPACE;
if (!alignment.isNucleotide())
{
command += cmds.FORCEAMINO; // TODO check for rna