+ @Test(groups = { "Functional" })
+ public void testFeatureScoreModel_HiddenColumns() throws Exception
+ {
+ AlignFrame alf = getTestAlignmentFrame();
+ // hide columns and check tree changes
+ alf.getViewport().hideColumns(3, 4);
+ alf.getViewport().hideColumns(0, 1);
+ FeatureScoreModel fsm = new FeatureScoreModel();
+ Assert.assertTrue(fsm.configureFromAlignmentView(alf.getCurrentView()
+ .getAlignPanel()));
+ alf.selectAllSequenceMenuItem_actionPerformed(null);
+ float[][] dm = fsm.findDistances(alf.getViewport().getAlignmentView(
+ true));
+ Assert.assertTrue(
+ dm[0][2] == 0f,
+ "After hiding last two columns FER1_MESCR (0) should still be identical with RAPSA (2)");
+ Assert.assertTrue(
+ dm[0][1] == 0f,
+ "After hiding last two columns FER1_MESCR (0) should now also be identical with SPIOL (1)");
+ for (int s = 0; s < 3; s++)
+ {
+ Assert.assertTrue(dm[s][3] > 0f, "After hiding last two columns "
+ + alf.getViewport().getAlignment().getSequenceAt(s).getName()
+ + "(" + s + ") should still be distinct from FER1_MAIZE (3)");
+ }