From: kiramt Date: Thu, 9 Mar 2017 10:29:06 +0000 (+0000) Subject: JAL-2388 Minor fix for annotation graph, removed unit test dep on gui X-Git-Tag: Release_2_10_2~3^2~92^2~45 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ed8a4149077b4debd9d51cca5141287e17b25fad;p=jalview.git JAL-2388 Minor fix for annotation graph, removed unit test dep on gui --- diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 8f91835..836a800 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -75,12 +75,12 @@ public class OverviewPanel extends Panel implements Runnable, sr.forOverview = true; fr = new FeatureRenderer(av); - boolean showAnnotation = false; + boolean showAnnotation = true; // TODO: in applet this was getSequenceConsensusHash() // check if it makes any functional difference: hconsensus or conservation if (av.getAlignmentConservationAnnotation() == null) { - showAnnotation = true; + showAnnotation = false; } od = new OverviewDimensions(av.getPosProps(), showAnnotation); diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index e399bc1..923616f 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -88,12 +88,12 @@ public class OverviewPanel extends JPanel implements Runnable sr.forOverview = true; fr = new FeatureRenderer(alPanel); - boolean showAnnotation = false; + boolean showAnnotation = true; // TODO: in applet this was getSequenceConsensusHash() // check if it makes any functional difference: hconsensus or conservation if (av.getAlignmentConservationAnnotation() == null) { - showAnnotation = true; + showAnnotation = false; } od = new OverviewDimensions(av.getPosProps(), showAnnotation); diff --git a/test/jalview/viewmodel/OverviewDimensionsTest.java b/test/jalview/viewmodel/OverviewDimensionsTest.java index 8184b52..e86f41b 100644 --- a/test/jalview/viewmodel/OverviewDimensionsTest.java +++ b/test/jalview/viewmodel/OverviewDimensionsTest.java @@ -23,23 +23,17 @@ package jalview.viewmodel; import static org.testng.Assert.assertEquals; import jalview.analysis.AlignmentGenerator; -import jalview.bin.Jalview; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; +import jalview.datamodel.ColumnSelection; import jalview.datamodel.Sequence; +import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; -import jalview.gui.AlignFrame; -import jalview.gui.AlignViewport; -import jalview.gui.Desktop; -import jalview.gui.JvOptionPane; -import jalview.io.DataSourceType; -import jalview.io.FileLoader; -import java.util.List; +import java.util.Hashtable; import org.testng.annotations.AfterClass; -import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -67,8 +61,6 @@ public class OverviewDimensionsTest { "Seq5", "ABCABCABCABCABCABCABCABCBACBACBACBACABCABCABCABCABCABCABCABCBACBACBACBACABCABCABCABCABCABCABCABCBACBACBACBAC"); - AlignFrame af; - AlignViewport av; AlignmentI al; OverviewDimensions od; @@ -80,12 +72,15 @@ public class OverviewDimensionsTest { int alheight; int alwidth; + ViewportPositionProps posProps; + + Hashtable hiddenRepSequences = new Hashtable(); + + ColumnSelection hiddenCols = new ColumnSelection(); + @BeforeClass(alwaysRun = true) public void setUpJvOptionPane() { - JvOptionPane.setInteractiveMode(false); - JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION); - // create random alignment AlignmentGenerator gen = new AlignmentGenerator(false); al = gen.generate(157, 525, 123, 5, 5); @@ -94,107 +89,40 @@ public class OverviewDimensionsTest { @BeforeMethod(alwaysRun = true) public void setUp() { - Jalview.main(new String[] { "-nonews", "-props", - "test/jalview/testProps.jvprops" }); - - af = new FileLoader().LoadFileWaitTillLoaded(al.toString(), - DataSourceType.PASTE); - - /* - * wait for Consensus thread to complete - */ - synchronized (this) + if (!hiddenRepSequences.isEmpty()) { - while (af.getViewport().getConsensusSeq() == null) - { - try - { - wait(50); - } catch (InterruptedException e) - { - } - } + al.getHiddenSequences().showAll(hiddenRepSequences); } + hiddenCols.revealAllHiddenColumns(); - av = af.getViewport(); - + posProps = new ViewportPositionProps(al); + posProps.setStartRes(0); + posProps.setEndRes(62); + posProps.setStartSeq(0); + posProps.setEndSeq(17); + viewHeight = posProps.getEndSeq() - posProps.getStartSeq() + 1; + viewWidth = posProps.getEndRes() - posProps.getStartRes() + 1; - while (av.isCalcInProgress()) - { - try - { - Thread.sleep(50); - } catch (InterruptedException e) - { - - } - } - - av.showAllHiddenColumns(); - av.showAllHiddenSeqs(); - av.setSelectionGroup(null); - // o/w hidden seqs retain selection group, causes problems later when hiding - // sequences - - // wait for conservation calc to complete again - while (av.isCalcInProgress()) - { - try - { - Thread.sleep(50); - } catch (InterruptedException e) - { - - } - } - - viewHeight = av.getEndSeq() - av.getStartSeq() + 1; - viewWidth = av.getEndRes() - av.getStartRes() + 1; - - // wait for gui to get set up - // this does actually appear to be necessary - while (viewHeight != 18 || viewWidth != 63) - { - try - { - Thread.sleep(50); - av.getAlignPanel().setScrollValues(0, 1); - av.getAlignPanel().setScrollValues(1, 0); - viewHeight = av.getEndSeq() - av.getStartSeq() + 1; - viewWidth = av.getEndRes() - av.getStartRes() + 1; - } catch (InterruptedException e) - { - - } - } + ColumnSelection hiddenCols = new ColumnSelection(); - od = new OverviewDimensions(av.getPosProps(), true); + od = new OverviewDimensions(posProps, true); // Initial box sizing - default path through code - od.setBoxPosition(av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); mouseClick(od, 0, 0); moveViewport(0, 0); // calculate before hidden columns so we get absolute values - alheight = av.getAlignment().getHeight(); - alwidth = av.getAlignment().getWidth(); + alheight = posProps.getAbsoluteAlignmentHeight(); + alwidth = posProps.getAbsoluteAlignmentWidth(); - boxWidth = Math.round((float) (av.getEndRes() - av.getStartRes() + 1) + boxWidth = Math.round((float) (posProps.getEndRes() + - posProps.getStartRes() + 1) * od.getWidth() / alwidth); - boxHeight = Math.round((float) (av.getEndSeq() - av.getStartSeq() + 1) + boxHeight = Math.round((float) (posProps.getEndSeq() + - posProps.getStartSeq() + 1) * od.getSequencesHeight() / alheight); - System.out.println(boxHeight); - - } - - @AfterMethod(alwaysRun = true) - public void tearDown() - { - af = null; - av = null; - Desktop.instance.closeAll_actionPerformed(null); } @AfterClass(alwaysRun = true) @@ -226,10 +154,9 @@ public class OverviewDimensionsTest { // test for alignment with width > height SequenceI[] seqs1 = new SequenceI[] { seqa, seqb }; Alignment al1 = new Alignment(seqs1); - al1.setDataset(null); - AlignViewport av1 = new AlignViewport(al1); + ViewportPositionProps props = new ViewportPositionProps(al1); - OverviewDimensions od = new OverviewDimensions(av1.getPosProps(), true); + OverviewDimensions od = new OverviewDimensions(props, true); int scaledHeight = 266; assertEquals(od.getGraphHeight(), defaultGraphHeight); assertEquals(od.getSequencesHeight(), scaledHeight); @@ -239,10 +166,9 @@ public class OverviewDimensionsTest { // test for alignment with width < height SequenceI[] seqs2 = new SequenceI[] { seqa, seqb, seqc, seqd }; Alignment al2 = new Alignment(seqs2); - al2.setDataset(null); - AlignViewport av2 = new AlignViewport(al2); + props = new ViewportPositionProps(al2); - od = new OverviewDimensions(av2.getPosProps(), true); + od = new OverviewDimensions(props, true); int scaledWidth = 300; assertEquals(od.getGraphHeight(), defaultGraphHeight); assertEquals(od.getSequencesHeight(), maxSeqHeight); @@ -253,10 +179,9 @@ public class OverviewDimensionsTest { // min value SequenceI[] seqs3 = new SequenceI[] { seqe }; Alignment al3 = new Alignment(seqs3); - al3.setDataset(null); - AlignViewport av3 = new AlignViewport(al3); + props = new ViewportPositionProps(al3); - od = new OverviewDimensions(av3.getPosProps(), true); + od = new OverviewDimensions(props, true); assertEquals(od.getGraphHeight(), defaultGraphHeight); assertEquals(od.getSequencesHeight(), minSeqHeight); assertEquals(od.getWidth(), maxWidth); @@ -266,20 +191,18 @@ public class OverviewDimensionsTest { SequenceI[] seqs4 = new SequenceI[] { seqa, seqb, seqc, seqd, seqa, seqb, seqc, seqd, seqa, seqb, seqc, seqd, seqa, seqb, seqc, seqd }; Alignment al4 = new Alignment(seqs4); - al4.setDataset(null); - AlignViewport av4 = new AlignViewport(al4); + props = new ViewportPositionProps(al4); - od = new OverviewDimensions(av4.getPosProps(), true); + od = new OverviewDimensions(props, true); assertEquals(od.getGraphHeight(), defaultGraphHeight); assertEquals(od.getSequencesHeight(), maxSeqHeight); assertEquals(od.getWidth(), minWidth); assertEquals(od.getHeight(), maxSeqHeight + defaultGraphHeight); Alignment al5 = new Alignment(seqs4); - al5.setDataset(null); - AlignViewport av5 = new AlignViewport(al5); + props = new ViewportPositionProps(al5); - od = new OverviewDimensions(av5.getPosProps(), false); + od = new OverviewDimensions(props, false); assertEquals(od.getGraphHeight(), 0); assertEquals(od.getSequencesHeight(), maxSeqHeight); assertEquals(od.getWidth(), minWidth); @@ -290,18 +213,12 @@ public class OverviewDimensionsTest { * Test that validation after mouse adjustments to boxX and boxY sets box * dimensions and scroll values correctly, when there are no hidden rows or * columns. - * - * The current implementation uses multiple transformations between coordinate - * systems which often involve casting to int, which causes values to be - * truncated. As a result we can lose accuracy. The tests below use - * approximate test values where appropriate. */ @Test(groups = { "Functional" }) public void testSetBoxFromMouseClick() { - od.updateViewportFromMouse(0, 0, - av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.updateViewportFromMouse(0, 0, al.getHiddenSequences(), hiddenCols, + posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); @@ -395,9 +312,8 @@ public class OverviewDimensionsTest { @Test(groups = { "Functional" }) public void testFromMouseWithHiddenColsAtStart() { - od.updateViewportFromMouse(0, 0, - av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.updateViewportFromMouse(0, 0, al.getHiddenSequences(), hiddenCols, + posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); @@ -407,10 +323,9 @@ public class OverviewDimensionsTest { // hide cols at start and check updated box position is correct // changes boxX but not boxwidth int lastHiddenCol = 30; - hideColumns(0, lastHiddenCol); + hiddenCols.hideColumns(0, lastHiddenCol); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); assertEquals(od.getBoxX(), Math.round((float) (lastHiddenCol + 1) * od.getWidth() / alwidth)); @@ -463,9 +378,8 @@ public class OverviewDimensionsTest { @Test(groups = { "Functional" }) public void testFromMouseWithHiddenColsInMiddle() { - od.updateViewportFromMouse(0, 0, - av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.updateViewportFromMouse(0, 0, al.getHiddenSequences(), hiddenCols, + posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); @@ -475,10 +389,9 @@ public class OverviewDimensionsTest { // hide columns 63-73, no change to box position or dimensions int firstHidden = 63; int lastHidden = 73; - hideColumns(firstHidden, lastHidden); + hiddenCols.hideColumns(firstHidden, lastHidden); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); @@ -567,9 +480,8 @@ public class OverviewDimensionsTest { @Test(groups = { "Functional" }) public void testFromMouseWithHiddenColsAtEnd() { - od.updateViewportFromMouse(0, 0, - av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.updateViewportFromMouse(0, 0, al.getHiddenSequences(), hiddenCols, + posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); @@ -579,9 +491,8 @@ public class OverviewDimensionsTest { // hide columns 140-164, no change to box position or dimensions int firstHidden = 140; int lastHidden = 164; - hideColumns(firstHidden, lastHidden); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + hiddenCols.hideColumns(firstHidden, lastHidden); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); @@ -692,7 +603,7 @@ public class OverviewDimensionsTest { { int firstHidden = 0; int lastHidden = 20; - hideColumns(firstHidden, lastHidden); + hiddenCols.hideColumns(firstHidden, lastHidden); // move viewport to start of alignment moveViewport(0, 0); @@ -721,7 +632,7 @@ public class OverviewDimensionsTest { { int firstHidden = 68; int lastHidden = 78; - hideColumns(firstHidden, lastHidden); + hiddenCols.hideColumns(firstHidden, lastHidden); // move viewport before hidden columns moveViewport(3, 0); @@ -777,7 +688,7 @@ public class OverviewDimensionsTest { { int firstHidden = 152; int lastHidden = 164; - hideColumns(firstHidden, lastHidden); + hiddenCols.hideColumns(firstHidden, lastHidden); // move viewport before hidden columns moveViewport(3, 0); @@ -807,7 +718,7 @@ public class OverviewDimensionsTest { { int firstHidden = 0; int lastHidden = 20; - hideSequences(firstHidden, lastHidden + 1, lastHidden + 1); + hideSequences(firstHidden, lastHidden); // move viewport to start of alignment: // box moves to below hidden rows, height remains same @@ -839,7 +750,7 @@ public class OverviewDimensionsTest { { int firstHidden = 200; int lastHidden = 210; - hideSequences(firstHidden, lastHidden + 1, lastHidden + 1); + hideSequences(firstHidden, lastHidden); // move viewport to start of alignment: // box, height etc as in non-hidden case @@ -870,7 +781,7 @@ public class OverviewDimensionsTest { { int firstHidden = 500; int lastHidden = 524; - hideSequences(firstHidden - 1, lastHidden, firstHidden - 1); + hideSequences(firstHidden, lastHidden); // move viewport to start of alignment: // box, height etc as in non-hidden case @@ -900,9 +811,8 @@ public class OverviewDimensionsTest { @Test(groups = { "Functional" }) public void testFromMouseWithHiddenRowsAtStart() { - od.updateViewportFromMouse(0, 0, - av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.updateViewportFromMouse(0, 0, al.getHiddenSequences(), hiddenCols, + posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxHeight(), boxHeight); @@ -913,10 +823,9 @@ public class OverviewDimensionsTest { // hide rows at start and check updated box position is correct // changes boxY but not boxheight int lastHiddenRow = 30; - hideSequences(0, lastHiddenRow + 1, lastHiddenRow + 1); + hideSequences(0, lastHiddenRow); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), Math.round((float) (lastHiddenRow + 1) @@ -949,9 +858,8 @@ public class OverviewDimensionsTest { @Test(groups = { "Functional" }) public void testFromMouseWithHiddenRowsInMiddle() { - od.updateViewportFromMouse(0, 0, - av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.updateViewportFromMouse(0, 0, al.getHiddenSequences(), hiddenCols, + posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); @@ -964,10 +872,9 @@ public class OverviewDimensionsTest { // no changes int firstHiddenRow = 50; int lastHiddenRow = 60; - hideSequences(firstHiddenRow, lastHiddenRow + 1, lastHiddenRow + 1); + hideSequences(firstHiddenRow, lastHiddenRow); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); @@ -1012,9 +919,8 @@ public class OverviewDimensionsTest { @Test(groups = { "Functional" }) public void testFromMouseWithHiddenRowsAtEnd() { - od.updateViewportFromMouse(0, 0, - av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.updateViewportFromMouse(0, 0, al.getHiddenSequences(), hiddenCols, + posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); @@ -1026,10 +932,9 @@ public class OverviewDimensionsTest { // no changes int firstHidden = 500; int lastHidden = 524; - hideSequences(firstHidden - 1, lastHidden, firstHidden - 1); + hideSequences(firstHidden, lastHidden); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); assertEquals(od.getBoxX(), 0); assertEquals(od.getBoxY(), 0); assertEquals(od.getBoxWidth(), boxWidth); @@ -1077,10 +982,9 @@ public class OverviewDimensionsTest { */ private void moveViewportH(int startRes) { - av.setStartRes(startRes); - av.setEndRes(startRes + viewWidth - 1); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + posProps.setStartRes(startRes); + posProps.setEndRes(startRes + viewWidth - 1); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); } /* @@ -1088,10 +992,9 @@ public class OverviewDimensionsTest { */ private void moveViewportV(int startSeq) { - av.setStartSeq(startSeq); - av.setEndSeq(startSeq + viewHeight - 1); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + posProps.setStartSeq(startSeq); + posProps.setEndSeq(startSeq + viewHeight - 1); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); } /* @@ -1099,12 +1002,11 @@ public class OverviewDimensionsTest { */ private void moveViewport(int startRes, int startSeq) { - av.setStartRes(startRes); - av.setEndRes(startRes + viewWidth - 1); - av.setStartSeq(startSeq); - av.setEndSeq(startSeq + viewHeight - 1); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + posProps.setStartRes(startRes); + posProps.setEndRes(startRes + viewWidth - 1); + posProps.setStartSeq(startSeq); + posProps.setEndSeq(startSeq + viewHeight - 1); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); } /* @@ -1112,22 +1014,24 @@ public class OverviewDimensionsTest { */ private void mouseClick(OverviewDimensions od, int x, int y) { - od.updateViewportFromMouse(x, y, - av.getAlignment().getHiddenSequences(), - av.getColumnSelection(), av.getPosProps()); + od.updateViewportFromMouse(x, y, al.getHiddenSequences(), hiddenCols, + posProps); + // updates require an OverviewPanel to exist which it doesn't here // so call setBoxPosition() as it would be called by the AlignmentPanel // normally - // int width = av.getEndRes() - av.getStartRes(); - // int height = av.getEndSeq() - av.getStartSeq(); - av.setStartRes(od.getScrollCol()); - av.setEndRes(od.getScrollCol() + viewWidth - 1); - av.setStartSeq(od.getScrollRow()); - av.setEndSeq(od.getScrollRow() + viewHeight - 1); - od.setBoxPosition(av.getAlignment() - .getHiddenSequences(), av.getColumnSelection(), av.getPosProps()); + + posProps.setStartRes(od.getScrollCol()); + posProps.setEndRes(od.getScrollCol() + viewWidth - 1); + posProps.setStartSeq(od.getScrollRow()); + posProps.setEndSeq(od.getScrollRow() + viewHeight - 1); + od.setBoxPosition(al.getHiddenSequences(), hiddenCols, posProps); } + /* + * Test that the box is positioned with the top left corner at xpos, ypos + * and with the original width and height + */ private void testBoxIsAtClickPoint(int xpos, int ypos) { mouseClick(od, xpos, ypos); @@ -1139,49 +1043,19 @@ public class OverviewDimensionsTest { } /* - * Hide sequences between start and end, using hideseq to do the hiding - * (start <= hideseq <= end. Sequence hideseq is not hidden but the others are + * Hide sequences between start and end */ - private void hideSequences(int start, int end, int hideseq) + private void hideSequences(int start, int end) { - SequenceGroup sg = new SequenceGroup(); - List allseqs = av.getAlignment().getSequences(); - for (int i = start; i <= end; ++i) - { - sg.addSequence(allseqs.get(i), false); - } - av.setSelectionGroup(sg); - - /* - * hide group - */ - av.hideSequences(allseqs.get(hideseq), true); - - while (av.isCalcInProgress()) + SequenceI[] allseqs = al.getSequencesArray(); + SequenceGroup theseSeqs = new SequenceGroup(); + + for (int i = start; i <= end; i++) { - try - { - Thread.sleep(50); - } catch (InterruptedException e) - { - System.out.println("Hiding seqs interruption"); - } + theseSeqs.addSequence(allseqs[i], false); + al.getHiddenSequences().hideSequence(allseqs[i]); } - } - private void hideColumns(int firstHidden, int lastHidden) - { - av.hideColumns(firstHidden, lastHidden); - - while (av.isCalcInProgress()) - { - try - { - Thread.sleep(50); - } catch (InterruptedException e) - { - System.out.println("Hiding cols interruption"); - } - } + hiddenRepSequences.put(allseqs[start], theseSeqs); } }