import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
import jalview.io.HMMFile;
+import jalview.util.MessageManager;
import jalview.ws.params.ArgumentI;
+import jalview.ws.params.simple.Option;
import java.io.IOException;
import java.net.MalformedURLException;
@BeforeClass(alwaysRun = true)
public void setUpBeforeClass() throws Exception
{
+ /*
+ * NB: check HMMER_PATH in testProps.jvprops is valid for
+ * the machine on which this runs
+ */
Jalview.main(
new String[]
{ "-noquestionnaire", "-nonews", "-props",
"test/jalview/hmmer/testProps.jvprops", "-open",
"examples/uniref50.fa" });
- // FastaFile file = null;
- // file = new FastaFile(
- // new FileParse("examples/uniref50.fa", DataSourceType.FILE));
- // SequenceI[] seqs = file.getSeqsAsArray();
- // AlignmentI al = new Alignment(seqs);
- // frame = new AlignFrame(al, 150, 20);
frame = Desktop.getAlignFrames()[0];
}
public void testHMMBuild()
{
- HMMBuild builder = new HMMBuild(frame,
- new ArrayList<ArgumentI>());
+ /*
+ * set up argument to run hmmbuild for the alignment
+ */
+ ArrayList<ArgumentI> params = new ArrayList<>();
+ String argName = MessageManager.getString("label.hmmbuild_for");
+ String argValue = MessageManager.getString("label.alignment");
+ params.add(
+ new Option(argName, null, false, null, argValue, null, null));
+
+ HMMBuild builder = new HMMBuild(frame, params);
builder.run();
SequenceI seq = frame.getViewport().getAlignment().getSequenceAt(0);
assertEquals(hmm.getName(), "Alignment_HMM");
assertEquals(hmm.getProperty(HMMFile.EFF_NUMBER_OF_SEQUENCES),
"0.648193");
- assertEquals(hmm.getConsensusAtAlignColumn(15), 's');
}
public void testHMMAlign()