package jalview.hmmer;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.fail;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
+import java.util.List;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@AfterClass(alwaysRun = true)
public static void tearDownAfterClass() throws Exception
{
- Desktop.instance.closeAll_actionPerformed(null);
+ Desktop.getInstance().closeAll_actionPerformed(null);
}
/**
throws MalformedURLException, IOException
{
/*
- * run hmmbuild - note the side-effect of selecting the HMM
- * sequence that gets added to the alignment
+ * run hmmbuild
*/
testHMMBuild();
- HiddenMarkovModel hmm = frame.getSelectedHMM();
- assertNotNull(hmm);
+ List<SequenceI> hmms = frame.getViewport().getAlignment()
+ .getHmmSequences();
+ assertFalse(hmms.isEmpty());
/*
- * now run hmmalign - with respect to the select HMM profile
+ * now run hmmalign - by default with respect to the added HMM profile
*/
testHMMAlign();
}
public void testHMMAlign()
{
- HMMAlign thread = new HMMAlign(frame,
+ HmmerCommand thread = new HMMAlign(frame,
new ArrayList<ArgumentI>());
thread.run();
assertNotNull(original);
AlignmentI realigned = alignFrames[1].getViewport().getAlignment();
assertNotNull(realigned);
- assertNotNull(original.getHmmConsensus());
- assertNotNull(realigned.getHmmConsensus());
+ assertFalse(original.getHmmSequences().isEmpty());
+ assertFalse(realigned.getHmmSequences().isEmpty());
SequenceI ferCapan = original.findName("FER_CAPAN");
assertTrue(ferCapan.getSequenceAsString().startsWith("MA------SVSAT"));